Set R/WococoBridgeHub bundle runtime version (#1756)

* Define SimpleRuntimeVersion

* Set R/WococoBridgeHub bundle runtime version
This commit is contained in:
Serban Iorga
2023-01-11 09:45:22 +02:00
committed by Bastian Köcher
parent 70eb076ab2
commit b4c338f77d
14 changed files with 68 additions and 50 deletions
@@ -20,7 +20,7 @@ use crate::cli::{bridge, encode_message::CliEncodeMessage, CliChain};
use bp_rialto_parachain::RIALTO_PARACHAIN_ID;
use bp_runtime::EncodedOrDecodedCall;
use relay_millau_client::Millau;
use sp_version::RuntimeVersion;
use relay_substrate_client::SimpleRuntimeVersion;
use xcm::latest::prelude::*;
impl CliEncodeMessage for Millau {
@@ -53,5 +53,6 @@ impl CliEncodeMessage for Millau {
}
impl CliChain for Millau {
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(millau_runtime::VERSION);
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion::from_runtime_version(&millau_runtime::VERSION));
}
@@ -19,7 +19,7 @@
use crate::cli::{bridge, encode_message::CliEncodeMessage, CliChain};
use bp_runtime::EncodedOrDecodedCall;
use relay_rialto_client::Rialto;
use sp_version::RuntimeVersion;
use relay_substrate_client::SimpleRuntimeVersion;
use xcm::latest::prelude::*;
impl CliEncodeMessage for Rialto {
@@ -45,5 +45,6 @@ impl CliEncodeMessage for Rialto {
}
impl CliChain for Rialto {
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(rialto_runtime::VERSION);
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion::from_runtime_version(&rialto_runtime::VERSION));
}
@@ -20,8 +20,7 @@ use crate::cli::{bridge, encode_message::CliEncodeMessage, CliChain};
use bp_runtime::EncodedOrDecodedCall;
use bridge_runtime_common::CustomNetworkId;
use relay_rialto_parachain_client::RialtoParachain;
use relay_substrate_client::calls::XcmCall;
use sp_version::RuntimeVersion;
use relay_substrate_client::{calls::XcmCall, SimpleRuntimeVersion};
use xcm::latest::prelude::*;
impl CliEncodeMessage for RialtoParachain {
@@ -45,5 +44,5 @@ impl CliEncodeMessage for RialtoParachain {
}
impl CliChain for RialtoParachain {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> = None;
}
@@ -19,12 +19,13 @@
use crate::cli::CliChain;
use relay_bridge_hub_rococo_client::BridgeHubRococo;
use relay_rococo_client::Rococo;
use sp_version::RuntimeVersion;
use relay_substrate_client::SimpleRuntimeVersion;
impl CliChain for Rococo {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> = None;
}
impl CliChain for BridgeHubRococo {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion { spec_version: 9302, transaction_version: 1 });
}
@@ -52,7 +52,7 @@ impl SubstrateFinalitySyncPipeline for RococoFinalityToBridgeHubWococo {
if enable_version_guard {
relay_substrate_client::guard::abort_on_spec_version_change(
target_client.clone(),
target_client.simple_runtime_version().await?.0,
target_client.simple_runtime_version().await?.spec_version,
);
}
Ok(())
@@ -17,13 +17,13 @@
//! Westend chain specification for CLI.
use crate::cli::CliChain;
use relay_substrate_client::SimpleRuntimeVersion;
use relay_westend_client::{Westend, Westmint};
use sp_version::RuntimeVersion;
impl CliChain for Westend {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> = None;
}
impl CliChain for Westmint {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> = None;
}
@@ -18,13 +18,14 @@
use crate::cli::CliChain;
use relay_bridge_hub_wococo_client::BridgeHubWococo;
use relay_substrate_client::SimpleRuntimeVersion;
use relay_wococo_client::Wococo;
use sp_version::RuntimeVersion;
impl CliChain for Wococo {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> = None;
}
impl CliChain for BridgeHubWococo {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion { spec_version: 9302, transaction_version: 1 });
}
@@ -52,7 +52,7 @@ impl SubstrateFinalitySyncPipeline for WococoFinalityToBridgeHubRococo {
if enable_version_guard {
relay_substrate_client::guard::abort_on_spec_version_change(
target_client.clone(),
target_client.simple_runtime_version().await?.0,
target_client.simple_runtime_version().await?.spec_version,
);
}
Ok(())