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

Remove account storage format V1 #3814

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Mar 13, 2025

Follow-up to #3584

Description

Now that all production networks were migrated to storage format V2, we can remove format V1.

However, to avoid having to deploy this change in a HCU / avoid making this change produce a different execution result, we need to keep the existing logic / reads to determine the storage format.

If an account in format V1 is detected, abort execution with a new error.


  • 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 turbolent requested a review from fxamacker March 13, 2025 17:06
@turbolent turbolent force-pushed the bastian/remove-account-storage-format-v1 branch from 51dd11b to d10d916 Compare March 13, 2025 17:08
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 61b9ab6
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 force-pushed the bastian/remove-account-storage-format-v1 branch from d10d916 to 390d4fe Compare March 13, 2025 19:50
}

// StorageFormatV2 is enabled.

// Check if cached account format is available.
Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately we won't be able to remove the read of the domain register / V1 reads here, because that will produce a different execution result, i.e. require a HCU.

@turbolent turbolent self-assigned this Mar 13, 2025
@turbolent turbolent marked this pull request as ready for review March 13, 2025 19:52
@turbolent turbolent requested a review from SupunS as a code owner March 13, 2025 19:52
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.

Nice! Thanks for removing code related to storage format V1.

Since there are still register reads related to storage format V1, I opened an issue #3815 as a reminder for next HCU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants