Skip to content

Commit

Permalink
Merge branch 'master' into sv-bridge-relayer-compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik committed May 3, 2024
2 parents 5ece51c + 4ca1ff3 commit 9d2995b
Showing 28 changed files with 188 additions and 47 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -53,6 +53,6 @@ complexity = { level = "deny", priority = 1 }
[workspace.dependencies]
log = { version = "0.4.20", default-features = false }
quote = { version = "1.0.36" }
serde = { version = "1.0.197", default-features = false }
serde = { version = "1.0.199", default-features = false }
serde_json = { version = "1.0.115", default-features = false }
thiserror = { version = "1.0.59" }
2 changes: 2 additions & 0 deletions relay-clients/client-bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
@@ -54,6 +54,8 @@ impl Chain for BridgeHubKusama {
bp_bridge_hub_kusama::BEST_FINALIZED_BRIDGE_HUB_KUSAMA_HEADER_METHOD;
const WITH_CHAIN_COMPATIBLE_FINALITY_RELAYER_VERSION_METHOD: &'static str =
bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_FINALITY_COMPATIBLE_RELAYER_VERSION;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_bridge_hub_kusama::FREE_HEADERS_INTERVAL_FOR_BRIDGE_HUB_KUSAMA_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = AVERAGE_BLOCK_INTERVAL;

type SignedBlock = bp_bridge_hub_kusama::SignedBlock;
2 changes: 2 additions & 0 deletions relay-clients/client-bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
@@ -58,6 +58,8 @@ impl Chain for BridgeHubPolkadot {
bp_bridge_hub_polkadot::BEST_FINALIZED_BRIDGE_HUB_POLKADOT_HEADER_METHOD;
const WITH_CHAIN_COMPATIBLE_FINALITY_RELAYER_VERSION_METHOD: &'static str =
bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_FINALITY_COMPATIBLE_RELAYER_VERSION;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_bridge_hub_polkadot::FREE_HEADERS_INTERVAL_FOR_BRIDGE_HUB_POLKADOT_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = AVERAGE_BLOCK_INTERVAL;

type SignedBlock = bp_bridge_hub_polkadot::SignedBlock;
58 changes: 45 additions & 13 deletions relay-clients/client-bridge-hub-rococo/src/codegen_runtime.rs
Original file line number Diff line number Diff line change
@@ -330,7 +330,7 @@ pub mod api {
),
#[codec(index = 83)]
EthereumSystem(runtime_types::snowbridge_pallet_system::pallet::Call),
#[codec(index = 250)]
#[codec(index = 175)]
MessageQueue(runtime_types::pallet_message_queue::pallet::Call),
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -379,7 +379,7 @@ pub mod api {
),
#[codec(index = 83)]
EthereumSystem(runtime_types::snowbridge_pallet_system::pallet::Error),
#[codec(index = 250)]
#[codec(index = 175)]
MessageQueue(runtime_types::pallet_message_queue::pallet::Error),
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -432,7 +432,7 @@ pub mod api {
),
#[codec(index = 83)]
EthereumSystem(runtime_types::snowbridge_pallet_system::pallet::Event),
#[codec(index = 250)]
#[codec(index = 175)]
MessageQueue(runtime_types::pallet_message_queue::pallet::Event),
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -444,6 +444,18 @@ pub mod api {
}
pub mod bridge_runtime_common {
use super::runtime_types;
pub mod extensions {
use super::runtime_types;
pub mod refund_relayer_extension {
use super::runtime_types;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundBridgedGrandpaMessages;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundBridgedMessages;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundTransactionExtensionAdapter<_0>(pub _0);
}
}
pub mod messages_xcm_extension {
use super::runtime_types;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -456,15 +468,6 @@ pub mod api {
NotDispatched,
}
}
pub mod refund_relayer_extension {
use super::runtime_types;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundBridgedGrandpaMessages;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundBridgedParachainMessages;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundTransactionExtensionAdapter<_0>(pub _0);
}
}
pub mod cumulus_pallet_parachain_system {
use super::runtime_types;
@@ -859,8 +862,10 @@ pub mod api {
#[codec(index = 5)]
CallFiltered,
#[codec(index = 6)]
NothingAuthorized,
MultiBlockMigrationsOngoing,
#[codec(index = 7)]
NothingAuthorized,
#[codec(index = 8)]
Unauthorized,
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -1192,6 +1197,7 @@ pub mod api {
>,
>,
current_set_id: ::core::primitive::u64,
is_free_execution_expected: ::core::primitive::bool,
},
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -1241,6 +1247,7 @@ pub mod api {
>,
>,
current_set_id: ::core::primitive::u64,
is_free_execution_expected: ::core::primitive::bool,
},
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -1263,6 +1270,10 @@ pub mod api {
BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError),
#[codec(index = 8)]
InvalidAuthoritySetId,
#[codec(index = 9)]
FreeHeadersLimitExceded,
#[codec(index = 10)]
BelowFreeHeaderInterval,
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Error2 {
@@ -1284,6 +1295,10 @@ pub mod api {
BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError),
#[codec(index = 8)]
InvalidAuthoritySetId,
#[codec(index = 9)]
FreeHeadersLimitExceded,
#[codec(index = 10)]
BelowFreeHeaderInterval,
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Event {
@@ -1399,6 +1414,16 @@ pub mod api {
set_operating_mode {
operating_mode: runtime_types::bp_runtime::BasicOperatingMode,
},
#[codec(index = 3)]
submit_parachain_heads_ex {
at_relay_block: (::core::primitive::u32, ::subxt::utils::H256),
parachains: ::std::vec::Vec<(
::bp_polkadot_core::parachains::ParaId,
::subxt::utils::H256,
)>,
parachain_heads_proof: ::bp_polkadot_core::parachains::ParaHeadsProof,
is_free_execution_expected: ::core::primitive::bool,
},
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Error {
@@ -2063,6 +2088,11 @@ pub mod api {
fee_asset_item: ::core::primitive::u32,
weight_limit: runtime_types::xcm::v3::WeightLimit,
},
#[codec(index = 12)]
claim_assets {
assets: ::std::boxed::Box<runtime_types::xcm::VersionedAssets>,
beneficiary: ::std::boxed::Box<runtime_types::xcm::VersionedLocation>,
},
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Error {
@@ -2251,6 +2281,8 @@ pub mod api {
origin: runtime_types::staging_xcm::v4::location::Location,
assets: runtime_types::xcm::VersionedAssets,
},
#[codec(index = 23)]
VersionMigrationFinished { version: ::core::primitive::u32 },
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Origin {
4 changes: 3 additions & 1 deletion relay-clients/client-bridge-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
@@ -56,6 +56,8 @@ impl Chain for BridgeHubRococo {
bp_bridge_hub_rococo::BEST_FINALIZED_BRIDGE_HUB_ROCOCO_HEADER_METHOD;
const WITH_CHAIN_COMPATIBLE_FINALITY_RELAYER_VERSION_METHOD: &'static str =
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_FINALITY_COMPATIBLE_RELAYER_VERSION;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_bridge_hub_rococo::FREE_HEADERS_INTERVAL_FOR_BRIDGE_HUB_ROCOCO_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = AVERAGE_BLOCK_INTERVAL;

type SignedBlock = bp_bridge_hub_rococo::SignedBlock;
@@ -129,5 +131,5 @@ impl ChainWithMessages for BridgeHubRococo {

impl ChainWithRuntimeVersion for BridgeHubRococo {
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion { spec_version: 1_009_000, transaction_version: 4 });
Some(SimpleRuntimeVersion { spec_version: 1_010_000, transaction_version: 4 });
}
43 changes: 35 additions & 8 deletions relay-clients/client-bridge-hub-westend/src/codegen_runtime.rs
Original file line number Diff line number Diff line change
@@ -390,6 +390,16 @@ pub mod api {
}
pub mod bridge_runtime_common {
use super::runtime_types;
pub mod extensions {
use super::runtime_types;
pub mod refund_relayer_extension {
use super::runtime_types;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundBridgedMessages;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundTransactionExtensionAdapter<_0>(pub _0);
}
}
pub mod messages_xcm_extension {
use super::runtime_types;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -402,13 +412,6 @@ pub mod api {
NotDispatched,
}
}
pub mod refund_relayer_extension {
use super::runtime_types;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundBridgedParachainMessages;
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub struct RefundTransactionExtensionAdapter<_0>(pub _0);
}
}
pub mod cumulus_pallet_parachain_system {
use super::runtime_types;
@@ -803,8 +806,10 @@ pub mod api {
#[codec(index = 5)]
CallFiltered,
#[codec(index = 6)]
NothingAuthorized,
MultiBlockMigrationsOngoing,
#[codec(index = 7)]
NothingAuthorized,
#[codec(index = 8)]
Unauthorized,
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -1136,6 +1141,7 @@ pub mod api {
>,
>,
current_set_id: ::core::primitive::u64,
is_free_execution_expected: ::core::primitive::bool,
},
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
@@ -1158,6 +1164,10 @@ pub mod api {
BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError),
#[codec(index = 8)]
InvalidAuthoritySetId,
#[codec(index = 9)]
FreeHeadersLimitExceded,
#[codec(index = 10)]
BelowFreeHeaderInterval,
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Event {
@@ -1239,6 +1249,16 @@ pub mod api {
set_operating_mode {
operating_mode: runtime_types::bp_runtime::BasicOperatingMode,
},
#[codec(index = 3)]
submit_parachain_heads_ex {
at_relay_block: (::core::primitive::u32, ::subxt::utils::H256),
parachains: ::std::vec::Vec<(
::bp_polkadot_core::parachains::ParaId,
::subxt::utils::H256,
)>,
parachain_heads_proof: ::bp_polkadot_core::parachains::ParaHeadsProof,
is_free_execution_expected: ::core::primitive::bool,
},
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Error {
@@ -1903,6 +1923,11 @@ pub mod api {
fee_asset_item: ::core::primitive::u32,
weight_limit: runtime_types::xcm::v3::WeightLimit,
},
#[codec(index = 12)]
claim_assets {
assets: ::std::boxed::Box<runtime_types::xcm::VersionedAssets>,
beneficiary: ::std::boxed::Box<runtime_types::xcm::VersionedLocation>,
},
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Error {
@@ -2091,6 +2116,8 @@ pub mod api {
origin: runtime_types::staging_xcm::v4::location::Location,
assets: runtime_types::xcm::VersionedAssets,
},
#[codec(index = 23)]
VersionMigrationFinished { version: ::core::primitive::u32 },
}
#[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)]
pub enum Origin {
4 changes: 3 additions & 1 deletion relay-clients/client-bridge-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -54,6 +54,8 @@ impl Chain for BridgeHubWestend {
bp_bridge_hub_westend::BEST_FINALIZED_BRIDGE_HUB_WESTEND_HEADER_METHOD;
const WITH_CHAIN_COMPATIBLE_FINALITY_RELAYER_VERSION_METHOD: &'static str =
bp_bridge_hub_westend::BRIDGE_HUB_WESTEND_FINALITY_COMPATIBLE_RELAYER_VERSION;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_bridge_hub_westend::FREE_HEADERS_INTERVAL_FOR_BRIDGE_HUB_WESTEND_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = AVERAGE_BLOCK_INTERVAL;

type SignedBlock = bp_bridge_hub_westend::SignedBlock;
@@ -127,5 +129,5 @@ impl ChainWithMessages for BridgeHubWestend {

impl ChainWithRuntimeVersion for BridgeHubWestend {
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion { spec_version: 1_009_000, transaction_version: 4 });
Some(SimpleRuntimeVersion { spec_version: 1_010_000, transaction_version: 4 });
}
4 changes: 4 additions & 0 deletions relay-clients/client-kusama/src/lib.rs
Original file line number Diff line number Diff line change
@@ -60,6 +60,8 @@ impl Chain for Kusama {
bp_kusama::BEST_FINALIZED_KUSAMA_HEADER_METHOD;
const WITH_CHAIN_COMPATIBLE_FINALITY_RELAYER_VERSION_METHOD: &'static str =
bp_kusama::KUSAMA_FINALITY_COMPATIBLE_RELAYER_VERSION;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_kusama::FREE_HEADERS_INTERVAL_FOR_KUSAMA_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6);

type SignedBlock = bp_kusama::SignedBlock;
@@ -81,6 +83,8 @@ impl ChainWithBalances for Kusama {

impl RelayChain for Kusama {
const PARAS_PALLET_NAME: &'static str = bp_kusama::PARAS_PALLET_NAME;
const WITH_CHAIN_BRIDGE_PARACHAINS_PALLET_NAME: &'static str =
bp_kusama::WITH_KUSAMA_BRIDGE_PARACHAINS_PALLET_NAME;
}

impl ChainWithTransactions for Kusama {
2 changes: 2 additions & 0 deletions relay-clients/client-polkadot-bulletin/src/lib.rs
Original file line number Diff line number Diff line change
@@ -69,6 +69,8 @@ impl Chain for PolkadotBulletin {
bp_polkadot_bulletin::BEST_FINALIZED_POLKADOT_BULLETIN_HEADER_METHOD;
const WITH_CHAIN_COMPATIBLE_FINALITY_RELAYER_VERSION_METHOD: &'static str =
bp_polkadot_bulletin::POLKADOT_BULLETIN_FINALITY_COMPATIBLE_RELAYER_VERSION;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_polkadot_bulletin::FREE_HEADERS_INTERVAL_FOR_POLKADOT_BULLETIN_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6);

type SignedBlock = bp_polkadot_bulletin::SignedBlock;
4 changes: 4 additions & 0 deletions relay-clients/client-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
@@ -60,6 +60,8 @@ impl Chain for Polkadot {
bp_polkadot::BEST_FINALIZED_POLKADOT_HEADER_METHOD;
const WITH_CHAIN_COMPATIBLE_FINALITY_RELAYER_VERSION_METHOD: &'static str =
bp_polkadot::POLKADOT_FINALITY_COMPATIBLE_RELAYER_VERSION;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_polkadot::FREE_HEADERS_INTERVAL_FOR_POLKADOT_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6);

type SignedBlock = bp_polkadot::SignedBlock;
@@ -81,6 +83,8 @@ impl ChainWithBalances for Polkadot {

impl RelayChain for Polkadot {
const PARAS_PALLET_NAME: &'static str = bp_polkadot::PARAS_PALLET_NAME;
const WITH_CHAIN_BRIDGE_PARACHAINS_PALLET_NAME: &'static str =
bp_polkadot::WITH_POLKADOT_BRIDGE_PARACHAINS_PALLET_NAME;
}

impl ChainWithTransactions for Polkadot {
Loading

0 comments on commit 9d2995b

Please sign in to comment.