-
Notifications
You must be signed in to change notification settings - Fork 158
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
Implement the remaining upgradable families #3714
Conversation
bc47e5c
to
5c2617c
Compare
Rebased, solved merge conflicts and compilation problems caused by changes happening since the PR |
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.
Could use a few minor improvements, otherwise this is exactly what I was hoping for.
6c179a8
to
4244b9e
Compare
4cb2c89
to
466daee
Compare
- `upgradeTxBody` - `upgradeTxWits` - `upgradeTx` We introduce a few helpers to assist, which follow the same pattern outside of an era-indexed family: - `upgradeData` - `upgradeTxDats` - `upgradeRedeemers`
Also implement 'Memoized' for 'ShelleyTx', which admits a trivial instance but was missing it.
This happens if the Mary transaction attempts to pass a protocol parameter update which updates the min ADA, since this field is not effectively translatable to Alonzo.
We switch this off in Alonzo, since the translation path does not directly deserialise, rather pulling together the body and witnesses data separately.
- We need to avoid comparing the size for 'Sized' fields. - 'coinsPerUTxOByte' is translated through binary translation naively as 'coinsPerUTxOWord'. We need to reflect this to preserve transaction validity. - Two other protocol parameters were removed and will cause the translation to fail, so must be accounted for in the upgrade.
and use it in Allegra and Mary upgrade
99978f2
to
48e400d
Compare
48e400d
to
9527ec0
Compare
Updated CHANGELOG and adjusted versions: set cardano-ledger-core depedency lower bound to 1.7 for all ears. Merging! |
👂 🦻 |
Description
This PR adds the remaining upgrade functions described in #3618
upgradeTxBody
,upgradeTxWits
, andupgradeTx
ToExpr
in various places throughout the code in order to print the diffsisValid
and not doing translation via deserialisation of the Tx.coinsPerUTxOWord
will deserialise correctly in Babbage but with an altered meaning. We account for this in the upgrade function. An alternative would be to explicitly fail on any transactions that attempted to update this field, but this would require that the translation logic unpack the transaction, and doesn't seem worth it since these will never occur.Resolves #3618
Checklist
.cabal
andCHANGELOG.md
files according to theversioning process.
.cabal
files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)CHANGELOG.md
for the affected packages. New section is never added with the code changes. (See RELEASING.md)fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)