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

Schema Migration fix for newer mainnet schema data #2165

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

wilwade
Copy link
Collaborator

@wilwade wilwade commented Sep 25, 2024

Goal

The goal of this PR is to update the schemas migration with respect to the newer data on chain.

Part of #2006

Discussion

  • Only reset the name list as needed
  • Add in schema 19 so that it is re-added at the top of the list

Result of try-runtime

[2024-09-26T20:42:48Z INFO runtime::schemas] Running pre_upgrade...
[2024-09-26T20:42:48Z INFO runtime::schemas] Running storage migration...
[2024-09-26T20:42:48Z INFO runtime::schemas] Storage migrated to version 4 read=15, write=15, bytes=11138
[2024-09-26T20:42:48Z INFO runtime::schemas] Migration Calculated weights=Weight { ref_time: 1824840000, proof_size: 11138 }
[2024-09-26T20:42:48Z INFO runtime::schemas] Running post_upgrade...
[2024-09-26T20:42:48Z INFO runtime::schemas] Finished post_upgrade

@wilwade wilwade force-pushed the bug/update-schema-name-migration branch from a851083 to d8d26d9 Compare September 25, 2024 17:04
@wilwade wilwade force-pushed the bug/update-schema-name-migration branch from d8d26d9 to 0246715 Compare September 25, 2024 17:09
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pallets/schemas/src/migration/v4.rs 18.18% 9 Missing ⚠️
Files with missing lines Coverage Δ
pallets/schemas/src/migration/v4.rs 40.29% <18.18%> (-1.24%) ⬇️

@aramikm
Copy link
Collaborator

aramikm commented Sep 25, 2024

here is the command I ran to check the migration against the mainnet. You need to compile the runtime with frequency and try-runtime flags

cargo build --features frequency,try-runtime

RUST_LOG=debug try-runtime --runtime ./target/debug/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade live --uri wss://1.rpc.frequency.xyz:443 --pallet System --pallet Schemas

Copy link
Collaborator

@aramikm aramikm 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.
I would recommend to run try-runtime against mainnet for additional verification.

@wilwade wilwade requested review from a team, shannonwells, mattheworris, enddynayn, claireolmstead and JoeCap08055 and removed request for a team September 25, 2024 20:17
@wilwade wilwade enabled auto-merge (squash) September 26, 2024 21:54
Copy link
Collaborator

@enddynayn enddynayn left a comment

Choose a reason for hiding this comment

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

Great! 👍

@wilwade wilwade merged commit 3a59277 into main Sep 27, 2024
27 checks passed
@wilwade wilwade deleted the bug/update-schema-name-migration branch September 27, 2024 14: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.

4 participants