-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add state migration for new Cadence storage format v4 #638
Add state migration for new Cadence storage format v4 #638
Conversation
error | ||
}) | ||
|
||
workerCount := runtime.NumCPU() |
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.
does this work on GCP virtual machine env?
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 guess so, do you have any concerns why it would not?
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 good to me, though I don't have the full context to verify that rencodeValueV4 is inclusive.
dca2a5e
to
4b76e41
Compare
@ramtinms What do you mean with "rencodeValueV4 is inclusive"? |
Ah, OK, thank you! I'll re-run CI |
Closes dapperlabs/flow-go#5422
The next Cadence release will introduce a new storage format, which means the whole execution state needs to be migrated from an old format (there are multiple older versions) to the new format.
Implement a state migration function which decodes all Cadence values using the old decoder and encodes them using the new encoder.
As a sanity check, the newly encoded data is re-decoded, and the resulting value is compared to the value which was initially decoded from the original data using the old decoder.