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

🚑️ Fix corrupted Linear Release entries #465

Open
wants to merge 1 commit into
base: 03-03-fix_update_the_integration_tests
Choose a base branch
from

Conversation

lrazovic
Copy link
Member

@lrazovic lrazovic commented Mar 4, 2025

What?

During a previous runtime upgrade, we simplified the RuntimeHoldReason, but we forgot to migrate the LinearRelease:Vesting keys to reflect this change.

Reasoning

I tried to translate the current entries, but the types were conflicting. Then I started to drain the entries and add the new ones, but since I was operating on the same storage I had few non deterministic results. Since we only have 15 entries, I decided to perform a simple migration that removes the current corrupted entries, and create new ones, with the right key.

Testing

Tested via chopsticks and via the try-runtime-cli

New Migration:

  • Implemented a new migration for the Linear Release Vesting in runtimes/polimec/src/custom_migrations/linear_release.rs. (runtimes/polimec/src/custom_migrations/linear_release.rs - runtimes/polimec/src/custom_migrations/linear_release.rsR1-R110)
  • Included the new migration script in the mod.rs and lib.rs files of the polimec runtime. (runtimes/polimec/src/custom_migrations/mod.rs - [1] runtimes/polimec/src/lib.rs - [2]

Dependency Updates:

  • Updated jwt-compact and substrate-fixed dependencies in Cargo.toml to use specific versions instead of git references. (Cargo.toml - Cargo.tomlL76-R84)

Integration Tests Configuration:

  • Added new entries to the std array in integration-tests/Cargo.toml. (integration-tests/Cargo.toml - integration-tests/Cargo.tomlR152)
  • Added .gitignore and package.json files to the integration-tests/chopsticks/.papi/descriptors directory. (integration-tests/chopsticks/.papi/descriptors/.gitignore - [1] integration-tests/chopsticks/.papi/descriptors/package.json - [2]
  • Added a new polkadot-api.json configuration file for integration tests. (integration-tests/chopsticks/.papi/polkadot-api.json - integration-tests/chopsticks/.papi/polkadot-api.jsonR1-R24)

@lrazovic lrazovic changed the title fix: corrupted release entries 🚑️ Fix corrupted Linear Release entries Mar 4, 2025
@lrazovic lrazovic marked this pull request as ready for review March 4, 2025 09:23
@lrazovic lrazovic requested a review from dastansam March 4, 2025 09:24
Copy link

graphite-app bot commented Mar 4, 2025

Graphite Automations

"Auto-assign PRs to author" took an action on this PR • (03/04/25)

1 assignee was added to this PR based on Juan Ignacio Rios's automation.

@lrazovic lrazovic force-pushed the 03-03-fix_update_the_integration_tests branch from 890cc94 to 7f21caa Compare March 4, 2025 12:23
@lrazovic lrazovic force-pushed the 03-04-fix_corrupted_release_entries branch 4 times, most recently from 87f35dc to 6893689 Compare March 4, 2025 12:35
@lrazovic lrazovic force-pushed the 03-03-fix_update_the_integration_tests branch from 7f21caa to 484326d Compare March 4, 2025 12:35
@lrazovic lrazovic force-pushed the 03-04-fix_corrupted_release_entries branch from 6893689 to e6202a1 Compare March 4, 2025 14:33
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