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

P 970 pallet state trie migration #3242

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

higherordertech
Copy link
Contributor

Context

as titles, this is use new state_version

Labels

Please apply following PR-related labels when appropriate:

  • C0-breaking: if your change could break the existing client, e.g. API change, critical logic change
  • C1-noteworthy: if your change is non-breaking, but is still worth noticing for the client, e.g. reference code improvement

How (Optional)

Testing Evidences

Please attach any relevant evidences if applicable

Migration Test steps:

  1. Run below scripts in project root to rebuild chain
    make clean-all-build
    make build-node
    make build-runtime-litentry
    make build-runtime-paseo
  2. Run below script in project root to start chain
    ./local-setup/launch.py -p standalone
  3. After chain started, go to polkadot console extrinsics page:
    https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/extrinsics
    Running the automatic migration
  4. Select sudo->sudo(call)->stateTrieMigration->consoleAutoMigration(maybeConfig)
  5. Switch include option on and type the migration size and item length limit you need, e.g. size: 4096, item: 16.
  6. Click Submit Transaction Button and then click Sign and Submit in popup to send this transaction.
  7. Go to polkadot console explorer page: https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/explorer
  8. You will see stateTrieMigration.Migrated events are coming, and after the stateTrieMigration.AutoMigrationFinished event comes, the auto migration is finished.
    Running the signed migration
  9. Select sudo->sudo(call)->stateTrieMigration->setSignedMaxLimits(limits)
  10. Switch include option on and type the migration size and item length limit you need, e.g. size: 4096, item: 16.
  11. Click Submit Transaction Button and then click Sign and Submit in popup to send this transaction.
  12. Go to polkadot console explorer page: https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/explorer
    [TODOD] 13) !!!I am not receiving the related events in the local environment, so we need to verify this step in another environment and update the step.
    The parachain log is in /tmp/parachain_dev_xxx/para.alice.log, once you run the start script, the path will log in console.lgo

Copy link

linear bot commented Jan 28, 2025

@higherordertech higherordertech requested a review from a team January 28, 2025 06:10
Copy link
Collaborator

@Kailai-Wang Kailai-Wang left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

I'm wondering have you tried it out locally? With the help of chopsticks and try-runtime-cli? Or the GHA

@higherordertech higherordertech force-pushed the P-970-pallet-state-trie-migration branch from 037a2a9 to 2afd901 Compare January 29, 2025 04:03
@higherordertech
Copy link
Contributor Author

Looks good, thanks!

I'm wondering have you tried it out locally? With the help of chopsticks and try-runtime-cli? Or the GHA

I did tested via trigger automaticMigration extrinsic:

state-trie-migration.mp4

@higherordertech higherordertech force-pushed the P-970-pallet-state-trie-migration branch from d1c6613 to eae7414 Compare January 29, 2025 22:43
@higherordertech higherordertech enabled auto-merge (squash) January 29, 2025 22:44
@higherordertech higherordertech merged commit cdc652d into dev Jan 30, 2025
20 checks passed
@higherordertech higherordertech deleted the P-970-pallet-state-trie-migration branch January 30, 2025 00:01
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