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

Cadence Account Storage Map Migration #6761

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Nov 26, 2024

Start work on the migration logic for onflow/cadence#3584

  • Add a new system contract AccountV2Migration, which is deployed to the service account during bootstrapping. Its Admin resource is able to trigger the migration for the next batch of accounts to be migrated, by calling the injected scheduleAccountV2Migration function
  • Expose a new function fun scheduleAccountV2Migration(addressStartIndex: UInt64, count: UInt64): Bool to the new contract AccountV2Migration in the service account. It generates the addresses in the given range, and schedules the migration to the new account storage format V2. It essentially just calls the internal Go function runtime.Storage.ScheduleV2Migration() provided by Cadence.

@turbolent turbolent requested review from fxamacker and a team November 26, 2024 00:29
@turbolent turbolent self-assigned this Nov 26, 2024
@fxamacker
Copy link
Member

@turbolent Thanks for working on this part of the integration!

Do we want to create a feature branch and target this PR to the feature branch?

@turbolent
Copy link
Member Author

@onflow/flow-cadence-execution is there a way to call accountV2Migration.DeclareScheduleAccountV2MigrationFunction during bootstrapping?

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

Successfully merging this pull request may close these issues.

2 participants