-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix datum in tx and ref scripts #3882
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @ch1bo. Just one comment.
upgradeSimpleScripts sbe content@TxBodyContent{txOuts} = | ||
content{txOuts = map (upgradeSimpleRefScript sbe) txOuts } | ||
|
||
upgradeSimpleRefScript sbe (TxOut address value datum refScript) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a type signature here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, but I changed the implementation to something else after opening the PR on friday. You seem to have reviewed the first implementation. The current one is less hacky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the current implementation: https://github.com/input-output-hk/cardano-node/pull/3882/files#diff-fbcbdd541a4b962af6f9b72d66ae6d2e6968076fd3755caf99f0d75d9d9f49f8R25-R71
5ea5dea
to
e4b8305
Compare
The property accepts two exceptions: - SimpleScriptV1 reference scripts may become SimpleScriptV2 - TxOutDatumHash may become TxOutDatumInTx
…xOuts This behavior was the only way to resolve full datums from Alonzo TxOuts. In Babbage, there are also inline datums, which were incorrectly "observed" when a transaction had outputs with datum hashes and full datums attached. These cases yield now a 'TxOutDatumInTx'. Fixes #3866
e4b8305
to
cf150b4
Compare
@Jimbo4350 squashed commits correctly and added type signatures to all functions in |
bors merge |
3852: cardano-tracer: init RTView r=denisshevchenko a=denisshevchenko This is pre-MVP for RTView. 3882: Fix datum in tx and ref scripts r=Jimbo4350 a=ch1bo (Couldn't reopen #3881, so created this one) :snowflake: Add a roundtrip property `TxBodyContent -> TxBody -> TxBodyContent` This helped in fixing the :bug: and uncover the two additional gaps in the code. I'm not 100% happy with the current implementation of the property though! I needed to accept two exceptions to the general `===`: 1. `SimpleScriptV1` reference scripts may become `SimpleScriptV2` 2. A `TxOutDatumHash` + a matching `ScriptData` may become a `TxOutDatumTx` :snowflake: Resolve datum hash + matching datum in transaction to `TxOutDatumInTx`, fixes #3866 ❄️ Add missing script languages to `scriptLanguageSupportedInEra` for `BabbageEra` ❄️ Allow scripts in any language as refeference scripts Co-authored-by: Denis Shevchenko <denis.shevchenko@iohk.io> Co-authored-by: Kosyrev Serge <serge.kosyrev@iohk.io> Co-authored-by: Sebastian Nagel <sebastian.nagel@ncoding.at>
This PR was included in a batch that successfully built, but then failed to merge into master. It will not be retried. Additional information: {"message":"Waiting on code owner review from DavidEichmann, JaredCorduan, Jimbo4350, dcoutts, erikd, nc6, and/or newhoggy.","documentation_url":"https://docs.github.com/articles/about-protected-branches"} |
bors r+ |
3852: cardano-tracer: init RTView r=deepfire a=denisshevchenko This is pre-MVP for RTView. 3880: Old peers tracing was erroneously called in new tracing r=deepfire a=jutaro /nix/store/qaplqccmisqy8n7ai65nssafzkxyyc7p-cabal-install-exe-cabal-3.6.2.0/bin/cabal --project-file=/home/deepfire/cardano-node/.nix-shell-cabal.project run exe:cardano-node -- +RTS -sghc-rts-report.txt -RTS run --config config.json --database-path run/current/node-0/db-testnet --topology topology.json --host-addr 127.0.0.1 --port 30000 --socket-path node.socket +RTS -N2 -I0 -A16m -qg -qb --disable-delayed-os-memory-return -RTS cardano-node: ExceptionInLinkedThread (ThreadId 11) The name ""peersFromNodeKernel"" is already taken by a metric. CallStack (from HasCallStack): error, called at ./System/Metrics.hs:214:5 in ekg-core-0.1.1.7-FjoslY1tzknIAl90c73kOZ:System.Metrics 3882: Fix datum in tx and ref scripts r=Jimbo4350 a=ch1bo (Couldn't reopen #3881, so created this one) :snowflake: Add a roundtrip property `TxBodyContent -> TxBody -> TxBodyContent` This helped in fixing the :bug: and uncover the two additional gaps in the code. I'm not 100% happy with the current implementation of the property though! I needed to accept two exceptions to the general `===`: 1. `SimpleScriptV1` reference scripts may become `SimpleScriptV2` 2. A `TxOutDatumHash` + a matching `ScriptData` may become a `TxOutDatumTx` :snowflake: Resolve datum hash + matching datum in transaction to `TxOutDatumInTx`, fixes #3866 ❄️ Add missing script languages to `scriptLanguageSupportedInEra` for `BabbageEra` ❄️ Allow scripts in any language as refeference scripts Co-authored-by: Denis Shevchenko <denis.shevchenko@iohk.io> Co-authored-by: Kosyrev Serge <serge.kosyrev@iohk.io> Co-authored-by: Yupanqui <jnf@arcor.de> Co-authored-by: Sebastian Nagel <sebastian.nagel@ncoding.at>
This PR was included in a batch that successfully built, but then failed to merge into master. It will not be retried. Additional information: {"message":"Waiting on code owner review from DavidEichmann, JaredCorduan, Jimbo4350, dcoutts, erikd, nc6, and/or newhoggy.","documentation_url":"https://docs.github.com/articles/about-protected-branches"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bors merge |
3882: Fix datum in tx and ref scripts r=nc6 a=ch1bo (Couldn't reopen #3881, so created this one) :snowflake: Add a roundtrip property `TxBodyContent -> TxBody -> TxBodyContent` This helped in fixing the :bug: and uncover the two additional gaps in the code. I'm not 100% happy with the current implementation of the property though! I needed to accept two exceptions to the general `===`: 1. `SimpleScriptV1` reference scripts may become `SimpleScriptV2` 2. A `TxOutDatumHash` + a matching `ScriptData` may become a `TxOutDatumTx` :snowflake: Resolve datum hash + matching datum in transaction to `TxOutDatumInTx`, fixes #3866 ❄️ Add missing script languages to `scriptLanguageSupportedInEra` for `BabbageEra` ❄️ Allow scripts in any language as refeference scripts Co-authored-by: Sebastian Nagel <sebastian.nagel@ncoding.at>
Timed out. |
(Couldn't reopen #3881, so created this one)
❄️ Add a roundtrip property
TxBodyContent -> TxBody -> TxBodyContent
This helped in fixing the 🐛 and uncover the two additional gaps in the code. I'm not 100% happy with the current implementation of the property though! I needed to accept two exceptions to the general
===
:SimpleScriptV1
reference scripts may becomeSimpleScriptV2
TxOutDatumHash
+ a matchingScriptData
may become aTxOutDatumTx
❄️ Resolve datum hash + matching datum in transaction to
TxOutDatumInTx
, fixes #3866❄️ Add missing script languages to
scriptLanguageSupportedInEra
forBabbageEra
❄️ Allow scripts in any language as refeference scripts