-
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
Alonzo support for protocol parameter updates #2784
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newhoggy
force-pushed
the
direct-serialisation-instances
branch
2 times, most recently
from
June 4, 2021 07:36
f7170c7
to
9614f9b
Compare
dcoutts
force-pushed
the
direct-serialisation-instances
branch
from
June 8, 2021 00:42
9614f9b
to
8a2a984
Compare
dcoutts
approved these changes
Jun 8, 2021
This should mean that CLI protocol param updates for new Alonzo era protocol params works (but not yet tested). |
dcoutts
force-pushed
the
direct-serialisation-instances
branch
2 times, most recently
from
June 8, 2021 11:33
d079805
to
3915b99
Compare
dcoutts
changed the title
Direct serialisation instances
Alonzo support for protocol parameter updates
Jun 8, 2021
dcoutts
force-pushed
the
direct-serialisation-instances
branch
3 times, most recently
from
June 8, 2021 22:56
bab5dac
to
478c070
Compare
bors merge |
iohk-bors bot
added a commit
that referenced
this pull request
Jun 8, 2021
2784: Alonzo support for protocol parameter updates r=dcoutts a=newhoggy Add direct serialisation instances for UpdateProposal and related types. Extend the CLI for the new parameters. Also refactor the "deriving via" machinery to make some of the instances simpler. Add more round trip tests for the protocol params and related types. Co-authored-by: Duncan Coutts <duncan@well-typed.com> Co-authored-by: John Ky <john.ky@iohk.io>
Timed out. |
For the UsingRawBytesHex type, which we're going to extend and add other similar types. The imports are such that it's easier in a separate module. Additionally, these types can provide many instances so it's not really specific to the SerialiseAsRawBytes class.
And ToJSONKey/FromJSONKey
This provides To/FromCBOR based on the SerialiseAsRawBytes instance. The example is > deriving (ToCBOR, FromCBOR) via (UsingRawBytes Blah)
This provides the same instances as UsingRawBytesHex but based on the bech32 encoding rather than hex encoding.
And other minor related tidy ups of the deriving instances.
deriving via UsingRawBytes
Previously we serialised UpdateProposal to CBOR using the underlying CBOR instance for the Shelley.Update type. We can no longer do this because our strategy in the API for the protocol params is to use a single representation across all eras, rather than an era-dependent representation. This means that no single era from the underlying ledger can represent all the protocol params. Thus for serialisation we need a direct instance, rather than going via the ledger types. This requires To/FromCBOR instances for ProtocolParametersUpdate, which entail To/FromCBOR instances for a few other types. Co-authored-by: John Ky <john.ky@iohk.io>
Extend the generators for the new Alonzo era fields. Add a CBOR round trip test for UpdateProposals. Fix some bugs in the JSON serialisation for the new Alonzo fields in the ProtocolParameters type, as found by the round trip test.
Co-authored-by: Duncan Coutts <duncan@well-typed.com>
We have --tx-in and --mint so the corresponding script flags should be called --tx-in-script-file and --mint-script-file to match. For backwards compat we keep the old names as hidden aliases.
newhoggy
force-pushed
the
direct-serialisation-instances
branch
from
June 9, 2021 02:20
ba31337
to
d8025a6
Compare
Rebased |
bors merge |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add direct serialisation instances for UpdateProposal and related types. Extend the CLI for the new parameters.
Also refactor the "deriving via" machinery to make some of the instances simpler.
Add more round trip tests for the protocol params and related types.