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

Relay v1.6.1: added support for bridge-hub-kusama/1002004 + aligned kusama/1002004, P to polkadot/1002000 #3007

Merged
merged 8 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,25 +121,25 @@ chain runtimes are changes: `Polkadot`, `Kusama`, `PBH`, `KBH`.
When one of involved chains is upgraded, we need to update the relayer code to
support it. Normally it means:

1. Bumping bundled chain versions in following places:
1. Bumping bundled chain versions (`spec_version`, `transaction_version`) in following places:

- for `Rococo` and `RBH`: [here](https://github.com/paritytech/parity-bridges-common/blob/master/relays/bin-substrate/src/chains/rococo.rs);
- for `Rococo` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-rococo/src/lib.rs) and `RBH` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-bridge-hub-rococo/src/lib.rs);

- for `Westend` and `WBH`: [here](https://github.com/paritytech/parity-bridges-common/blob/master/relays/bin-substrate/src/chains/westend.rs);
- for `Westend` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-westend/src/lib.rs) and `WBH` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-bridge-hub-westend/src/lib.rs);

- for `Kusama` and `KBH`: [here](https://github.com/paritytech/parity-bridges-common/blob/master/relays/bin-substrate/src/chains/polkadot.rs)
- for `Kusama` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-kusama/src/lib.rs) and `KBH` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-bridge-hub-kusama/src/lib.rs);

- for `Polkadot` and `PBH`: [here](https://github.com/paritytech/parity-bridges-common/blob/master/relays/bin-substrate/src/chains/polkadot.rs);
- for `Polkadot` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-polkadot/src/lib.rs) and `PBH` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-bridge-hub-polkadot/src/lib.rs);

- for `PBC`: [here](https://github.com/paritytech/parity-bridges-common/blob/master/relays/bin-substrate/src/chains/polkadot_bulletin.rs).
- for `PBC` [here](https://github.com/paritytech/parity-bridges-common/blob/master/relay-clients/client-polkadot-bulletin/src/lib.rs).

2. Regenerating bundled runtime wrapper code using `runtime-codegen` binary:

If you can start updated chain node, it could be done using following command
(assuming you're in the root of the repository):
```sh
cd tools/runtime-codegen
cargo run --bin runtime-codegen -- --from-node-url "wss://rococo-rpc.polkadot.io:443" > ../../relays/client-rococo/src/codegen_runtime.rs
cargo run --bin runtime-codegen -- --from-node-url "wss://rococo-rpc.polkadot.io:443" > ../../relay-clients/client-rococo/src/codegen_runtime.rs
```

Otherwise, you'll need a runtime file. You may download it from:
Expand All @@ -158,9 +158,11 @@ cargo run --bin runtime-codegen -- --from-wasm-file rococo_runtime.compact.compr

**IMPORTANT**: due to [well-known issue](https://github.com/paritytech/parity-bridges-common/issues/2669)
with runtime codegen, you'll get compilation errors after updating.
To fix it, execute following commands:
To fix it, execute following commands
(assuming you're back in the root of the repository):
```sh
cargo +nightly fmt --all
find . -name codegen_runtime.rs -exec \
sed -i 's/::sp_runtime::generic::Header<::core::primitive::u32>/::sp_runtime::generic::Header<::core::primitive::u32, ::sp_runtime::traits::BlakeTwo256>/g' {} +
cargo +nightly fmt --all
```
1,425 changes: 438 additions & 987 deletions relay-clients/client-bridge-hub-kusama/src/codegen_runtime.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion relay-clients/client-bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ impl ChainWithMessages for BridgeHubKusama {

impl ChainWithRuntimeVersion for BridgeHubKusama {
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion { spec_version: 1_002_000, transaction_version: 4 });
Some(SimpleRuntimeVersion { spec_version: 1_002_004, transaction_version: 4 });
}
71 changes: 0 additions & 71 deletions relay-clients/client-bridge-hub-kusama/src/runtime_wrapper.rs

This file was deleted.

130 changes: 0 additions & 130 deletions relay-clients/client-bridge-hub-polkadot/src/runtime_wrapper.rs

This file was deleted.

Loading