Skip to content

Commit

Permalink
Fix/staging 1.4.0 (#326)
Browse files Browse the repository at this point in the history
* Revert "Revert "Update partner-chain-smart-contracts to v7.0.1""

This reverts commit c361481.

* ocs: fix indentation

* chore: update deployment epoch and version - remove docker files
  • Loading branch information
ladamesny authored Dec 12, 2024
1 parent c329a99 commit 7460ad6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ result

# Local environment
dev/local-environment/.env
dev/local-environment/.env.bak
dev/local-environment/docker-compose.yml
dev/local-environment/docker-compose.yml.bak
dev/local-environment/configurations/tests/e2e-tests
dev/local-environment/configurations/pc-contracts-cli/overrides

Expand Down
7 changes: 3 additions & 4 deletions E2E-tests/config/substrate/staging_nodes.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"deployment_mc_epoch": 770,
"initial_pc_epoch": 4814532,
"genesis_utxo": "4e65eddc6132c1b9891d43f9d67a4a0a7b6e614b648f59dc97538f3f23eb96bf#1",
"deployment_version": "v1.4.0-rc2",
"deployment_mc_epoch": 779,
"genesis_utxo": "de7b8efb08243b770be30cfa22a9ed64317c50052bb4394392960ddcc9810048#1",
"deployment_version": "v1.4.0",
"test_environment": "staging",
"nodes_config": {
"nodes": {
Expand Down
2 changes: 1 addition & 1 deletion E2E-tests/config/substrate/staging_stack.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ssh": "${stack_config[ssh]}"
},
"generate_signatures_cli": {
"cli": "/tools/v1.3.0-rc1/partner-chains-node",
"cli": "/tools/partner-chains-node",
"ssh": "${stack_config[ssh]}"
},
"bech32": {
Expand Down
25 changes: 13 additions & 12 deletions docs/developer-guides/migration-guide-1.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,19 @@ scripts to observe.

1. Update Partner Chains SDK dependencies in your `Cargo.toml` to `v1.3.1`
2. Add the following configuration to your runtime configuration:
```rust
impl pallet_sidechain::Config for Runtime {
// ... other parameters
type MainChainScripts = sp_session_validator_management::MainChainScripts;

fn set_main_chain_scripts(scripts: Self::MainChainScripts) {
pallet_session_validator_management::MainChainScriptsConfiguration::<Runtime>::set(scripts);
}
}
```
This will allow the `sidechain/upgrade_and_set_addresses` extrinsic to update configuration of the SessionValidatorManagement
pallet together with the Runtime code.
```rust
impl pallet_sidechain::Config for Runtime {
// ... other parameters
type MainChainScripts = sp_session_validator_management::MainChainScripts;

fn set_main_chain_scripts(scripts: Self::MainChainScripts) {
pallet_session_validator_management::MainChainScriptsConfiguration::<Runtime>::set(scripts);
}
}
```
This will allow the `upgrade_and_set_addresses` extrinsic to update configuration of the SessionValidatorManagement
pallet together with the Runtime code.

3. Increment the `spec_version` in your runtime configuration.
4. Build the new Runtime WASM (you can do it by running `cargo build --release`)
5. Upgrade the runtime of the chain using the newly built WASM (it can be found in `$CARGO_TARGET_DIR/release/wbuild/<runtime name>/<runtime name>.compressed.wasm`) and the
Expand Down

0 comments on commit 7460ad6

Please sign in to comment.