-
Notifications
You must be signed in to change notification settings - Fork 145
Fix codeHash types to match (static and runtime)
#2529
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
Fix codeHash types to match (static and runtime)
#2529
Conversation
Currently, static type and runtime type doesn't match. For example, flow.AccountContractAdded: - event type has codeHash field type [UInt8; 32] (static type). - event value has codeHash field as [UInt8] (runtime type). This commit changes runtime type to [UInt8; 32] to be consistent with static type.
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 1044a9b Collapsed results for better readability
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Codecov Report
@@ Coverage Diff @@
## master #2529 +/- ##
=======================================
Coverage 78.46% 78.47%
=======================================
Files 336 336
Lines 77298 77324 +26
=======================================
+ Hits 60652 60678 +26
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 a test case for this
Co-authored-by: Bastian Müller <bastian@turbolent.com>
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.
Nice! We should add a runtime test that asserts the type is correct
Good point. 👍 I will merge this PR to unblock onflow/flow-go#4417 and then open issue for more tests to be added. |
|
@fxamacker Sounds good! Opened #2532 |
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 #2527
Description
Currently,
codeHashstatic type and runtime type doesn't match.For example,
flow.AccountContractAdded:codeHashfield type[UInt8; 32](static type).codeHashfield as[UInt8](runtime type).This commit changes runtime type to
[UInt8; 32]to be consistent with static type.Thanks @turbolent commenting on issue #2527 during weekend. 👍
masterbranchFiles changedin the Github PR explorer