You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like there was deviation in the ledger implementation from specification in the Babbage era. Specification required witnesses for native (phase1) scripts present in reference inputs.
This was never implemented in this way and we only discovered this recently thanks to the conformance tests.
This is not a very important feature for two reasons:
Native scripts aren't really used that much in reference inputs
There is a CIP-112 that is planned for implementation for the next era, which will provide a proper solution for enforcing arbitrary script execution.
So we need to:
Stop requiring witnesses for reference scripts in the conway formal specification defined in this repo
Fix Babbage specification to reflect the reality.
The last point could benefit from other fixes that probably lead to this discrepancy to begin with:
The predicate passes neededHashes as the argument to txscripts, which would imply that it filters out only the scripts that were used in the transaction:
But the implementation of txscripts totally ignores the argument. In fact it doesn't even use the correct type, it should have been a set and it also accepts a Tx as its first argument, while its usage supplies tx witnesses: txw.
The text was updated successfully, but these errors were encountered:
∙ ∀[ s ∈ mapPartial isInj₁ (txscripts tx utxo) ] validP1Script witsKeyHashes txvldt s
needs to be changed to
∙ ∀[ s ∈ mapPartial isInj₁ (txscripts tx utxo) ] (hash s ∈ neededHashes → validP1Script witsKeyHashes txvldt s)
and then whatever type errors appear need to be fixed. Alternatively, if this turns out to be too difficult because of the implication it could also be filtered within the ∀ binder.
In the Babbage spec this needs to be handled more carefully. This is a semantic difference that affects script validity, so it shouldn't just be silently adjusted. The Shelley spec has a bunch of errata, and I suggest to do the same here. So the logic should be changed and this situation should be documented in the erratum.
It looks like there was deviation in the ledger implementation from specification in the Babbage era. Specification required witnesses for native (phase1) scripts present in reference inputs.
This was never implemented in this way and we only discovered this recently thanks to the conformance tests.
This is not a very important feature for two reasons:
So we need to:
The last point could benefit from other fixes that probably lead to this discrepancy to begin with:
The predicate passes
neededHashes
as the argument totxscripts
, which would imply that it filters out only the scripts that were used in the transaction:But the implementation of
txscripts
totally ignores the argument. In fact it doesn't even use the correct type, it should have been a set and it also accepts aTx
as its first argument, while its usage supplies tx witnesses:txw
.The text was updated successfully, but these errors were encountered: