-
Notifications
You must be signed in to change notification settings - Fork 145
Fix publicKey to have matching static and runtime types
#2528
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
Conversation
There are two versions of AccountKeyAdded and AccountKeyRemoved events. Currently, publicKey field's static type and runtime type are different in the latest version. For example, `flow.AccountKeyAdded`: - event type has `publicKey` field type `[UInt8]` (static type). - event value has `publicKey` field as `Struct` (runtime type). This change updates publicKey field's static type to match runtime type for both events in the lastest version.
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 1044a9b Collapsed results for better readability
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Codecov Report
@@ Coverage Diff @@
## master #2528 +/- ##
=======================================
Coverage 78.46% 78.46%
=======================================
Files 336 336
Lines 77298 77298
=======================================
Hits 60652 60652
Misses 14376 14376
Partials 2270 2270
Flags with carried forward coverage won't be shown. Click here to find out more.
|
turbolent
left a comment
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.
Thank you for fixing this! We should add two runtime tests that assert the types are correct
|
Just checked, the existing/modified runtime tests already should be sufficient, so this can be merged |
4417: [Exec] Use CCF in self-describing mode to encode events (replaces JSON-CDC) r=fxamacker a=fxamacker Updates onflow/cadence#2283 This PR uses CCF in fully self-describing mode, so events will encode to about 1/2 the size of JSON-CDC encoding. Using CCF in partially self-describing mode can encode events to 1/14 the size of JSON-CDC but that requires other changes outside of CCF codec and other resulting work. ### TODO - [x] Update this PR after #4390 is merged. - [x] After the update, run CI tests and resolve any issues. :heavy_check_mark: Requires PR #4390 (merged on June 2, 2023). :heavy_check_mark: Requires PR onflow/cadence#2528 ✔️ Requires PR onflow/cadence#2529 ✔️ Requires PR onflow/flow-emulator#408 Co-authored-by: Faye Amacker <33205765+fxamacker@users.noreply.github.com> Co-authored-by: Amlandeep Bhadra <amlandeep1912@gmail.com>
Closes #2525
Updates onflow/flow-go#4417
Changes
This PR updates
publicKeyfield's static type to match runtime type forAccountKeyAddedandAccountKeyRemovedevents.Reason for change
Currently,
publicKeyfield's static type and runtime type are different in the latest version ofAccountKeyAddedandAccountKeyRemovedevents.For example,
flow.AccountKeyAdded:publicKeyfield type[UInt8](static type).publicKeyfield asStruct(runtime type).masterbranchFiles changedin the Github PR explorer