-
Notifications
You must be signed in to change notification settings - Fork 58
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
Feat/lw 9927 review protocol params update #1212
base: master
Are you sure you want to change the base?
Conversation
|
b5e2cb2
to
3376cbe
Compare
3376cbe
to
8226fd9
Compare
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.
Good enough till here!
We could make the serialization / de-serialization a bit more strict by checking for the absence of key 14
in protocol_param_update
when it appears in the context of a parameter_change_action
i.e. the transaction is from Conway era.
5e368f1
to
dd3a43b
Compare
I enforced serialisation for ConwayEra valid protocol params in dd3a43b. |
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.
Exceptional type safe implementation! 🚀
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.
Looks great @mirceahasegan 🚀
@@ -470,14 +472,10 @@ export class ProtocolParamUpdate { | |||
? UnitInterval.fromFloat(Number(parametersUpdate.decentralizationParameter)) |
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.
decentralizationParameter was also removed in conway era.
I am investigating this and a few other serialization issues on the conway-era branch.
I will update this PR once the implementation is stable.
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.
decentralizationParameter was actually deprecated in babbage era, but there shouldn't be a need to remove this, that way the serialization utils can be use to serialize/deserialize older transactions too. When this fields are deprecated their key is no longer used (in this case I believe is 12), but no other field can take its place, so there is no harm on leaving them there
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.
In my particular case (e2e test), the raw txBuilder is passing a manually built protocol params to a conway params update proposal.
I am trying to prevent this by building the typesafe version of the fromCore
when called via conway governance.
Otherwise, the effect is that txbuilder will build the tx for you, even if those protocol params were deprecated.
But the change will not cripple the ser/des part, it will only make it more restrictive when called from the gov path
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.
thats a pretty good solution 🚀
Context
Update Core types and serialization to account for the 2 new protocol parameters:
Proposed Solution
This will be covered in two PRs:
master
branch: update the core types and serialization.conway-era
branch: updateDbSyncChainHistoryProvider
to get the values from db-syncThis PR is
1
from above.Important Changes Introduced
Serialisation changes could not be tested as CSL does not support them yet.
I will attempt to validate via e2e tests as part of
conwa-era
e2e tests.