Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion relay-clients/client-bridge-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ bp-bridge-hub-kusama = { git = "https://github.com/paritytech/polkadot-sdk", bra
bp-header-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" }
bp-messages = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" }
bp-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" }
bp-polkadot = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" }
bp-polkadot-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" }
bp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" }
bridge-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" }
Expand Down
3 changes: 1 addition & 2 deletions relay-clients/client-bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
pub mod codegen_runtime;

use bp_bridge_hub_kusama::AVERAGE_BLOCK_INTERVAL;
use bp_polkadot::SuffixedCommonSignedExtensionExt;
use bp_polkadot_core::SuffixedCommonSignedExtension;
use bp_polkadot_core::{SuffixedCommonSignedExtension, SuffixedCommonSignedExtensionExt};
use codec::Encode;
use relay_substrate_client::{
calls::UtilityCall as MockUtilityCall, Chain, ChainWithBalances, ChainWithMessages,
Expand Down
25 changes: 24 additions & 1 deletion relay-clients/client-bridge-hub-polkadot/src/codegen_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! Autogenerated runtime API
//! THIS FILE WAS AUTOGENERATED USING parity-bridges-common::runtime-codegen
//! EXECUTED COMMAND: target/debug/runtime-codegen --from-wasm-file
//! bridge-hub-polkadot_runtime-v1002004.compact.compressed.wasm
//! bridge-hub-polkadot_runtime-v1002005.compact.compressed.wasm

#[allow(dead_code, unused_imports, non_camel_case_types)]
#[allow(clippy::all)]
Expand Down Expand Up @@ -708,6 +708,29 @@ pub mod api {
pub id: _3,
}
}
pub mod frame_metadata_hash_extension {
use super::runtime_types;
#[derive(::codec::Decode, ::codec::Encode, Clone, Debug, PartialEq)]
pub struct CheckMetadataHash {
pub mode: runtime_types::frame_metadata_hash_extension::Mode,
}
#[derive(
::codec::Decode,
::codec::Encode,
Clone,
Debug,
Eq,
PartialEq,
scale_info::TypeInfo,
Copy,
)]
pub enum Mode {
#[codec(index = 0)]
Disabled,
#[codec(index = 1)]
Enabled,
}
}
pub mod frame_support {
use super::runtime_types;
pub mod dispatch {
Expand Down
22 changes: 18 additions & 4 deletions relay-clients/client-bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pub mod codegen_runtime;

use bp_bridge_hub_polkadot::{SignedExtension, AVERAGE_BLOCK_INTERVAL};
use bp_polkadot_core::SuffixedCommonSignedExtensionExt;
use bp_bridge_hub_polkadot::AVERAGE_BLOCK_INTERVAL;
use bp_polkadot_core::{SuffixedCommonSignedExtension, SuffixedCommonSignedExtensionExt};
use codec::Encode;
use relay_substrate_client::{
calls::UtilityCall as MockUtilityCall, Chain, ChainWithBalances, ChainWithMessages,
Expand All @@ -32,6 +32,20 @@ use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount};
use std::time::Duration;

pub use codegen_runtime::api::runtime_types;
use runtime_types::frame_metadata_hash_extension::Mode;

use bp_runtime::extensions::{
BridgeRejectObsoleteHeadersAndMessages, GenericSignedExtensionSchema,
RefundBridgedParachainMessagesSchema,
};

pub type CheckMetadataHash = GenericSignedExtensionSchema<Mode, Option<[u8; 32]>>;

pub type SignedExtension = SuffixedCommonSignedExtension<(
BridgeRejectObsoleteHeadersAndMessages,
RefundBridgedParachainMessagesSchema,
CheckMetadataHash,
)>;

pub type RuntimeCall = runtime_types::bridge_hub_polkadot_runtime::RuntimeCall;
// TODO: https://github.com/paritytech/parity-bridges-common/issues/2547 - regenerate when ready
Expand Down Expand Up @@ -100,7 +114,7 @@ impl ChainWithTransactions for BridgeHubPolkadot {
param.genesis_hash,
unsigned.nonce,
unsigned.tip,
(((), ()), ((), ())),
(((), (), Mode::Disabled), ((), (), None)),
),
)?;

Expand Down Expand Up @@ -129,5 +143,5 @@ impl ChainWithMessages for BridgeHubPolkadot {

impl ChainWithRuntimeVersion for BridgeHubPolkadot {
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion { spec_version: 1_002_004, transaction_version: 3 });
Some(SimpleRuntimeVersion { spec_version: 1_002_005, transaction_version: 4 });
}
2 changes: 1 addition & 1 deletion substrate-relay/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "substrate-relay"
version = "1.6.4"
version = "1.6.5"
authors.workspace = true
edition.workspace = true
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
Expand Down