-
Notifications
You must be signed in to change notification settings - Fork 586
Stricter pad-app-state option for runtime genesis ledger #18077
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
base: compatible
Are you sure you want to change the base?
Stricter pad-app-state option for runtime genesis ledger #18077
Conversation
…-delta`, now this flag requires passing in exact number of padding to apply.
|
!ci-build-me |
| in | ||
| app_state @ zeros | ||
| else app_state | ||
| let padded_app_state_size = |
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.
Don't shoot , but any unit test to add? :)
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.
Well, no test added now. This will be used in HF test from compatible/master -> mesa though. I need to think of how to have a proper unit test here
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.
It sort of depends on what we want. I think the zkapp state is a list of length equal to the max state size parameter, right? So in my opinion the should either be unrestricted if we want to be able to have any particular state size, or it should be exactly the mesa size if we only care about generating mesa-compatible ledgers. (Mesa or Berkeley compatible ledgers that is).
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.
I was thinking the runtime genesis ledger could by default generate mesa ledgers, and then have a --legacy flag if you wanted to create a Berkeley ledger. Or some kind of --to (berkeley|mesa) format specifier.
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.
If we wanted to enforce that mesa ledgers were created in the right format then we might be able to use the yojson instance for the hardfork account type?
This flag now enforce passing exact number of zeros to pad for app state in zkapp account.