-
Notifications
You must be signed in to change notification settings - Fork 724
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
Filling in more Alonzo API extensions for the Tx and TxBody #2738
Commits on May 27, 2021
-
Add TxBodyRedeemers to the TxBody
This is a further step along the path to Alonzo support in the API. The TxBody's ShelleyTxBody constructor holds all the info that goes with the tx body. This includes scripts and aux data. For Alonzo it now also has to include the script data, which the ledger calls the redeemers. This is a big mapping of each use of a script to the script redeemer data and execution units. This patch adds it to the TxBody but does not yet do the main conversion step of constructing the redeemer pointer mapping.
Configuration menu - View commit details
-
Copy full SHA for cf059f7 - Browse repository at this point
Copy the full SHA cf059f7View commit details -
Build the Alonzo redeemer pointer mapping
Based on the script witnesses used within the tx body. Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
Configuration menu - View commit details
-
Copy full SHA for 6ba64b9 - Browse repository at this point
Copy the full SHA 6ba64b9View commit details -
Make getTransactionBodyContent total and add TxBody pattern
The getTransactionBodyContent function and the functions it was calling were doing unnecessary checks that made them partial. We do not need to validate when converting from a ledger transaction, only when building one. By eliminating unnecessary checks and making this pure we can now introduce a TxBody pattern that lets one get at the TxBodyContent. This makes for a nicer API. Also eliminate a couple deprecated functions that will be awkward to update for new features, and are no longer used.
Configuration menu - View commit details
-
Copy full SHA for c824892 - Browse repository at this point
Copy the full SHA c824892View commit details -
Add toLedgerPParams conversion function
It will be needed for the Alonzo tx construction. Co-authored-by: Duncan Coutts <duncan@well-typed.com>
Configuration menu - View commit details
-
Copy full SHA for 3e92a37 - Browse repository at this point
Copy the full SHA 3e92a37View commit details -
Add optional ProtocolParameters to the TxBodyContent
Needed to construct the hash of the script-relevant protocol params and the redeemers. It is only supplied when building the transaction and is not available when viewing it.
Configuration menu - View commit details
-
Copy full SHA for a4222e7 - Browse repository at this point
Copy the full SHA a4222e7View commit details -
Fill in network magic in Alonzo tx body construction
For now always fill it in with Nothing. This is a rarely used feature that we can complete at the end. It is a bit annoying however: it needs a Shelley network identifier, which is not the same as the API NetworkId type, since that also contains the NetworkMagic. That means we cannot use that type since we would not be able to round-trip it to/from a ledger transaction. So this will need some extension and/or refactoring of the NetworkId type and utils. Co-authored-by: Duncan Coutts <duncan@well-typed.com>
Configuration menu - View commit details
-
Copy full SHA for a7280d8 - Browse repository at this point
Copy the full SHA a7280d8View commit details -
Add TxExtraKeyWitnesses to TxBodyContent
These specify that extra key witnesses are required, and this fact is visible to Plutus scripts. It thereby provides a mechaism for Plutus scripts to check that the transaction has been signed by a particular key. Co-authored-by: Duncan Coutts <duncan@well-typed.com>
Configuration menu - View commit details
-
Copy full SHA for ecfaa63 - Browse repository at this point
Copy the full SHA ecfaa63View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6544ca8 - Browse repository at this point
Copy the full SHA 6544ca8View commit details