-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚑️ Fix corrupted Linear Release entries (#465)
## What? During a [previous runtime upgrade](https://github.com/Polimec/polimec-node/pull/383/files#diff-bbe1a30f3b7ec00a084641777c8b3da45df415b120b4e205d016c625a77284a0), 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](diffhunk://#diff-c47feabf076eb45e19f973367310bbee30b1b6c39cec965f9a22c5bb0cdb6d0cR1-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]](diffhunk://#diff-63e5609b322bad6be8ef1b127b8161c52602cff85ab9cf67f6b5ac03be68fc3aR21) `runtimes/polimec/src/lib.rs` - [[2]](diffhunk://#diff-fa44a5ad015c5d189a690374b9164d3a58b7218228b56c151327dd62d143ee1bR178) ### 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](diffhunk://#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L76-R84)) ### Integration Tests Configuration: * Added new entries to the `std` array in `integration-tests/Cargo.toml`. (`integration-tests/Cargo.toml` - [integration-tests/Cargo.tomlR152](diffhunk://#diff-ca620c1799a0fbfe846664793344b0d95a4f906636d2fbf307bff69f6ec81849R152)) * Added `.gitignore` and `package.json` files to the `integration-tests/chopsticks/.papi/descriptors` directory. (`integration-tests/chopsticks/.papi/descriptors/.gitignore` - [[1]](diffhunk://#diff-690eb99abc62e8194923cf1778d83fd7d93265fb81da24befdadf202d2136e92R1-R3) `integration-tests/chopsticks/.papi/descriptors/package.json` - [[2]](diffhunk://#diff-6d0112b7a63eb37cb4615006d54aca7b3aabf27e34cb439624e11b66c2a751b8R1-R24) * 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](diffhunk://#diff-960b223eb17890451aebb5ad607cd709f7bd8ec42023cb94d48e006ad6234ef8R1-R24))
- Loading branch information
Showing
18 changed files
with
291 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!.gitignore | ||
!package.json |
24 changes: 24 additions & 0 deletions
24
integration-tests/chopsticks/.papi/descriptors/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"version": "0.1.0-autogenerated.16545816865329173211", | ||
"name": "@polkadot-api/descriptors", | ||
"files": [ | ||
"dist" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"module": "./dist/index.mjs", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"browser": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"sideEffects": false, | ||
"peerDependencies": { | ||
"polkadot-api": "*" | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"version": 0, | ||
"descriptorPath": ".papi/descriptors", | ||
"entries": { | ||
"polkadot": { | ||
"wsUrl": "wss://rpc.ibp.network/polkadot", | ||
"metadata": ".papi/metadata/polkadot.scale", | ||
"genesis": "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" | ||
}, | ||
"bridge": { | ||
"wsUrl": "wss://sys.ibp.network/bridgehub-polkadot", | ||
"metadata": ".papi/metadata/bridge.scale", | ||
"genesis": "0xdcf691b5a3fbe24adc99ddc959c0561b973e329b1aef4c4b22e7bb2ddecb4464" | ||
}, | ||
"pah": { | ||
"wsUrl": "wss://sys.ibp.network/statemint", | ||
"metadata": ".papi/metadata/pah.scale", | ||
"genesis": "0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f" | ||
}, | ||
"polimec": { | ||
"metadata": ".papi/metadata/polimec.scale" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ std = [ | |
"serde/std", | ||
"sp-io/std", | ||
"sp-runtime/std", | ||
"xcm/std" | ||
] | ||
|
||
try-runtime = [ | ||
|
Oops, something went wrong.