-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Migration from v1.3.0 to v1.3.1 | ||
|
||
This guide present steps required to migrate you project from Partner Chains SDK v1.3.0 to v1.3.1. | ||
|
||
## Update SDK dependency | ||
|
||
In your cargo.toml files, update the `partner-chains` dependency from `v1.3.0` to `v1.3.1`. | ||
|
||
## Update Runtime | ||
|
||
In your Runtime crate find where instance of `RuntimeVersion` is created and increase the `spec_version`, | ||
because runtime code update is required. | ||
|
||
In your Rutime find `impl pallet_sidechain::Config` for your runtime, | ||
and add following code to it: | ||
```rust | ||
type MainChainScripts = sp_session_validator_management::MainChainScripts; | ||
|
||
fn set_main_chain_scripts(scripts: Self::MainChainScripts) { | ||
pallet_session_validator_management::MainChainScriptsConfiguration::<Runtime>::set(scripts); | ||
} | ||
``` | ||
|
||
If you have any Runtime test, is will be necessary to update mock as well: | ||
```rust | ||
type MainChainScripts = (); | ||
|
||
fn set_main_chain_scripts(scripts: Self::MainChainScripts) {} | ||
``` | ||
|
||
## Update the on-chain runtime code | ||
|
||
Perform regular runtime code update procedure: | ||
* update nodes to version build with Partner Chains SDK v1.3.1 | ||
* use `system/setCode` extrinsic to update runtime code build with Partner Chains SDK v1.3.1 |