-
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
More API updates for the Allegra and Mary eras #2111
Commits on Nov 21, 2020
-
Generalise toShelleyStakeAddr to work for any ledger era
Will be needed for constructing txs in later ledger eras.
Configuration menu - View commit details
-
Copy full SHA for fc87d88 - Browse repository at this point
Copy the full SHA fc87d88View commit details -
Move and generalise toShelley{Metadata,MetadataHash} functions
Move them into the TxMetadata module and generalise toShelleyMetadataHash to work over all ledger eras. Will be needed for creating txs in later ledger eras.
Configuration menu - View commit details
-
Copy full SHA for 12fd233 - Browse repository at this point
Copy the full SHA 12fd233View commit details -
Generalise toShelleyWithdrawal over all ledger eras
Will be needed for making txs for later ledger eras.
Configuration menu - View commit details
-
Copy full SHA for b10061d - Browse repository at this point
Copy the full SHA b10061dView commit details -
Move toShelleyUpdate to the ProtocolParameters module
Not yet generalised over ledger eras.
Configuration menu - View commit details
-
Copy full SHA for 1d32e24 - Browse repository at this point
Copy the full SHA 1d32e24View commit details -
Change type of Praos extra entropy update parameter
We would like the ProtocolParametersUpdate type to be able to be converted both to and from the equivalent underlying ledger type. We would like this for a couple reasons: 1. so that we can use this same type later for programs that analyse the blockchain and want to see the content of update proposals; 2. so we can switch UpdateProposal to use the representation of the surface API types, while still using the on-chain format for the binary serialisation. This requires converting in both directions. We want to do 2. now because we want a single era-independent representation for update proposals, and to convert into the era-dependent ledger types on-demand when we make a transaction.
Configuration menu - View commit details
-
Copy full SHA for 3225463 - Browse repository at this point
Copy the full SHA 3225463View commit details -
Add functions to convert from Shelley update proposal types
So we now have conversions in both directions.
Configuration menu - View commit details
-
Copy full SHA for dfdb712 - Browse repository at this point
Copy the full SHA dfdb712View commit details -
Change representation of UpdateProposal to use the API types
Switch the UpdateProposal to use the representation of the surface API types. We stick to the existing on-chain binary serialisation format. We want to do this now to add support for more ledger eras. We want a single era-independent representation for update proposals, and to convert into the era-dependent ledger types on-demand when we make a transaction for a specific era.
Configuration menu - View commit details
-
Copy full SHA for 73a6ebf - Browse repository at this point
Copy the full SHA 73a6ebfView commit details -
Export UpdateProposal and protocol params from the API
The protocol params should always have been exported since it is a API surface type. The UpdateProposal repreentation can now be public since it now uses the API surface types too.
Configuration menu - View commit details
-
Copy full SHA for 9fff1ad - Browse repository at this point
Copy the full SHA 9fff1adView commit details -
Configuration menu - View commit details
-
Copy full SHA for e9b2245 - Browse repository at this point
Copy the full SHA e9b2245View commit details -
Change the API's stake pool metadata URL type to match ledger type
Use Text instead of URI. We will want to allow conversion in both directions which means we cannot be more restrictive than the ledger's validity rules.
Configuration menu - View commit details
-
Copy full SHA for e29ce3c - Browse repository at this point
Copy the full SHA e29ce3cView commit details -
Add a fromShelleyPoolParams to allow conversion both ways
We'll use this next to change the representation of certificates
Configuration menu - View commit details
-
Copy full SHA for 92b8158 - Browse repository at this point
Copy the full SHA 92b8158View commit details -
Add to/fromShelleyCertificate conversion functions
We will switch the representation shortly and so these conversion functions will become non-trivial.
Configuration menu - View commit details
-
Copy full SHA for 1354aa3 - Browse repository at this point
Copy the full SHA 1354aa3View commit details
Commits on Nov 22, 2020
-
Change certificate representation to use surface types
This will make it easier to convert from a common era-independent type into ledger era-dependent types. We still use the same on-chain binary format.
Configuration menu - View commit details
-
Copy full SHA for c026892 - Browse repository at this point
Copy the full SHA c026892View commit details -
Generalise the toShelley*Credential functions for all eras
Needed both directly and to be able to generalise other such conversion functions.
Configuration menu - View commit details
-
Copy full SHA for e85ad6e - Browse repository at this point
Copy the full SHA e85ad6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for eb6ea84 - Browse repository at this point
Copy the full SHA eb6ea84View commit details
Commits on Nov 23, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f095db2 - Browse repository at this point
Copy the full SHA f095db2View commit details -
Use single Eq, Show and HasTypeProxy instance for TxBody
Replace per-era instances with a single era-paramaterised instance. This will be simpler as we add more eras.
Configuration menu - View commit details
-
Copy full SHA for 7a9cd1f - Browse repository at this point
Copy the full SHA 7a9cd1fView commit details -
Use single SerialiseAsCBOR and HasTextEnvelope instance for TxBody
Replace per-era instances with a single era-paramaterised instance. This will be simpler as we add more eras.
Configuration menu - View commit details
-
Copy full SHA for afa2961 - Browse repository at this point
Copy the full SHA afa2961View commit details -
Initial step to generalise makeShelleyTransaction over other eras
Generalise over the IsShelleyBasedEra class. The Allegra and Mary cases remain to do.
Configuration menu - View commit details
-
Copy full SHA for 580e50c - Browse repository at this point
Copy the full SHA 580e50cView commit details -
Switch TxBody from Shelley-specific type to era-dependent
Switch from the Shelley.TxBody concrete type, to using the Ledger.TxBody type family. The type family has different representations for different eras. For this step the specific era remains the same, so there are no other changes. The next step will be to cover multiple eras, at which point we will take advantage of the different tx body representations for each era.
Configuration menu - View commit details
-
Copy full SHA for 630f02d - Browse repository at this point
Copy the full SHA 630f02dView commit details -
Generalise the ShelleyTxBody representation over multiple eras
The 'ShelleyBasedEra' GADT tells us what era we are in. The 'ShelleyLedgerEra' type family maps that to the era type from the ledger lib. The 'Ledger.TxBody' type family maps that to a specific tx body type, which is different for each Shelley-based era. Due to this use of GADTs We now need custom Eq and Show instances. Do the minimal changes elsewhere, inserting error cases to fill in next.
Configuration menu - View commit details
-
Copy full SHA for 67b78cf - Browse repository at this point
Copy the full SHA 67b78cfView commit details -
Generalise several tx and witness functions over eras
This is partial in that we generalise the type, but the Allegra and Mary cases are error TODOs for now. This is still helpful to allow downstream code to type check at other eras.
Configuration menu - View commit details
-
Copy full SHA for 134403f - Browse repository at this point
Copy the full SHA 134403fView commit details -
Extend TxBody serialisation to the Allegra and Mary eras
All the Shelley-based eras are supported with one overloaded implementation used at different types.
Configuration menu - View commit details
-
Copy full SHA for b54ad58 - Browse repository at this point
Copy the full SHA b54ad58View commit details -
Partially fill in makeShelleyTransaction for the Allegra & Mary eras
Still TODOs for validity intervals and minting.
Configuration menu - View commit details
-
Copy full SHA for 49edfcb - Browse repository at this point
Copy the full SHA 49edfcbView commit details -
Add to/fromShelleyScriptHash and use them
We sort-of already had implementations of these in the impl of to/fromShelleyAddress functions. Pull them out to top level functions and put them next to the definition of the ScriptHash type. We'll reuse these new functions in the next patch.
Configuration menu - View commit details
-
Copy full SHA for ea18858 - Browse repository at this point
Copy the full SHA ea18858View commit details -
Add to/fromMaryValue for converting the Value type
To/from the equivalent ledger library type. The ledger representation is a pair of the lovelace value and a nested map of the non-ada assets.
Configuration menu - View commit details
-
Copy full SHA for 4b476ce - Browse repository at this point
Copy the full SHA 4b476ceView commit details -
Cover the multi-asset case in toShelleyTxOut
Now that we have toMaryValue
Configuration menu - View commit details
-
Copy full SHA for f6db51c - Browse repository at this point
Copy the full SHA f6db51cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 844dde7 - Browse repository at this point
Copy the full SHA 844dde7View commit details
Commits on Nov 24, 2020
-
Move toByronLovelace and TxIn/TxOut declarations
Move toByronLovelace to the Value module, and split the TxBody module section on TxIn and TxOut so they're in separate sections. We're about to add a bunch more sections for types used in the body.
Configuration menu - View commit details
-
Copy full SHA for eaa770e - Browse repository at this point
Copy the full SHA eaa770eView commit details -
Move TxOutValue and MintValue types to TxBody module
Move the TxOutValue, MintValue and related functions from the Value module to the TxBody module. We're going to end up with a whole bunch of these era-dependent field types for the tx body and it makes most sense to keep them all together in one module.
Configuration menu - View commit details
-
Copy full SHA for dde3664 - Browse repository at this point
Copy the full SHA dde3664View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee54b49 - Browse repository at this point
Copy the full SHA ee54b49View commit details