Skip to content
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

Port internal fixes #3740

Merged
merged 83 commits into from
Jan 29, 2025
Merged

Port internal fixes #3740

merged 83 commits into from
Jan 29, 2025

Conversation

turbolent
Copy link
Member

Description

Port the internal fixes originally for v1.0 to master.

Given that master has a significantly different structure compared to the v1.0 branch, I merged v1.0 into master, and used patchutils' filterdiff to extract individual commits' changes to e.g. value.go and applying them to the respective value type's value_xxx.go file.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

turbolent and others added 30 commits November 21, 2024 17:41
Merge `release/v1.0.3` to `v1.0`
Currently, Cadence interpreter.SomeValue is opaque to packages
like Atree, so interpreter.SomeValue is treated as atomic value.
This causes container wrapped by interpreter.SomeValue to be
treated as atomic value since it becomes opaque.

Given this, the integration between Cadence and Atree does not
establish parent-child relationship of a wrapped container since
the inner values of interpreter.SomeValue are not visible to Atree.

Resolving this issue requires unwrapping containers wrapped
by interpreter.SomeValue.

This commit implements these new interfaces provided by atree
to unwrap inner Value and inner Storable in Cadence:
- atree.WrapperValue
- atree.WrapperStorable

When Cadence passes objects that implement these interfaces, Atree
will call the interface functions (that implement unwrapping)
when setting child-parent callbacks.
This commit adds an integration test that uses a
hardcoded seed which produced a test failure.
This commit implements a new interface function
available in atree.WrapperStorable:
- WrapAtreeStorable(Storable) Storable
Co-authored-by: Bastian Müller <[email protected]>
@turbolent turbolent self-assigned this Jan 28, 2025
@turbolent turbolent requested a review from SupunS as a code owner January 28, 2025 16:55
@turbolent
Copy link
Member Author

Unlike on v1.0, I had to disable the atree health storage validation during the test setup, when writing the test value to the storage map, see 9fb44fd.

I think that makes sense: With the account storage map refactor on master, the storage map itself is not immediately referenced from the root of the account (but maybe should? 🤔).

@fxamacker Could you please have a look and see if that looks right?

Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 764dae5
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -benchmem -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Collapsed results for better readability

@turbolent turbolent requested a review from jsproz January 28, 2025 22:34
@fxamacker
Copy link
Member

Unlike on v1.0, I had to disable the atree health storage validation during the test setup, when writing the test value to the storage map, see 9fb44fd.

I think that makes sense: With the account storage map refactor on master, the storage map itself is not immediately referenced from the root of the account (but maybe should? 🤔).

@fxamacker Could you please have a look and see if that looks right?

@turbolent It looks good to me.

@turbolent turbolent merged commit f2f438f into master Jan 29, 2025
12 checks passed
Copy link
Member

@fxamacker fxamacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@turbolent LGTM! I focused on changes related to cadence-internal issue 286.

@turbolent turbolent deleted the bastian/port-fixes-master branch January 30, 2025 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants