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

Add option to only relay free headers to substrate-relay #2884

Merged
merged 68 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
e358816
added FreeHeadersInterval to pallet-bridge-grandpa configuration
svyatonik Mar 12, 2024
824b8b9
added is_free_execution_expected parameter to the submit_finality_pro…
svyatonik Mar 12, 2024
e901f46
move transaction extensions to a separate folder
svyatonik Mar 12, 2024
2f13251
move grandpa call result check from RefundTransactionExtensionAdapter…
svyatonik Mar 13, 2024
efcb990
added RefundBridgedMessages to refund and bump priority of standalone…
svyatonik Mar 13, 2024
186a73b
check_obsolete_submit_finality_proof may now boost transaction priori…
svyatonik Mar 13, 2024
0298318
added CheckAndBoostBridgeGrandpaTransactions that checks whether brid…
svyatonik Mar 13, 2024
1541ba5
relayer may be slashed to explicit account
svyatonik Mar 13, 2024
64418ac
slash registered relayer if it has submitted failed GRANDPA transaction
svyatonik Mar 13, 2024
48bce25
allow accepting some parachain headers for free
svyatonik Mar 13, 2024
8003f8e
added FreeParachainUpdateForFreeRelayHeader
svyatonik Mar 13, 2024
b4fc169
fix benchmarks compilation
svyatonik Mar 15, 2024
358c7f2
added WeightInfoExt for pallet-bridge-grandpa to include extra wight …
svyatonik Mar 15, 2024
dbcc04a
added free_headers_interval to the (runtime) FinalityApi of the chain
svyatonik Mar 15, 2024
18ec1ec
added --only-free-headers CLI parameter (not used yet) to finality an…
svyatonik Mar 15, 2024
db288ff
actually use HeadersToRelay::Free in finality-relay
svyatonik Mar 15, 2024
a2c42ed
actually support only-free-headers mode in parachains relay
svyatonik Mar 18, 2024
83461ec
removed inactual comment (free_source_headers_interval is cached at r…
svyatonik Mar 18, 2024
97d23f6
added comment re free-headers-only support in on-demand parachains relay
svyatonik Mar 18, 2024
d958729
added --only-free-headers support to standalone parachains relay
svyatonik Mar 18, 2024
66a4826
fixed dependency in runtime-codegen
svyatonik Mar 19, 2024
0b00bb8
update RBH and WBH runtimes + ask for free execution if we are runnin…
svyatonik Mar 19, 2024
3aa8e56
add missing standalone RBH<>WBH finality relay
svyatonik Mar 19, 2024
3a6d946
also refund for submitting initial parachain head
svyatonik Mar 20, 2024
85dfd1b
make FreeHeadersRemaining an Option => we know that when we are outsi…
svyatonik Mar 20, 2024
d296c4d
add some traces to relay
svyatonik Mar 20, 2024
a3e900b
add more traces to pallets
svyatonik Mar 20, 2024
d1045df
check for reorgs in signed ext for parachains module
svyatonik Mar 20, 2024
ff8f874
fix benchmarks compilation
svyatonik Mar 20, 2024
13ec138
free interval instead of fixed free headers
svyatonik Mar 22, 2024
7c6eb3d
Merge branch 'sv-refund-non-mandatory-headers' into sv-relay-free-hea…
svyatonik Mar 22, 2024
cbc5767
updated relays for new free headers criteria
svyatonik Mar 22, 2024
84ff978
fixed trace
svyatonik Mar 22, 2024
e2ad181
CannotAcceptMoreFreeHeaders -> FreeHeadersLimitExceded
svyatonik Mar 22, 2024
981c9a1
additional_call_result_check -> check_call_result_ex
svyatonik Mar 22, 2024
a0da3dc
is_granda_call_succeeded -> is_grandpa_call_successful
svyatonik Mar 22, 2024
8a74991
move tx priority boost from check_obsolete_submit_finality_proof to e…
svyatonik Mar 22, 2024
e62ba6e
lost changes
svyatonik Mar 22, 2024
36d7162
dec counter when importing new para header
svyatonik Mar 22, 2024
bb4ad4b
limit maximal "free" parachain head size
svyatonik Mar 25, 2024
22b5499
added grandpa_and_parachain_pallets_share_free_headers_counter test
svyatonik Mar 25, 2024
2e3bc96
with free intervals (instead of fixed free headers) we need to check …
svyatonik Mar 25, 2024
600c293
fix test name
svyatonik Mar 25, 2024
39a5504
added CheckAndBoostBridgeParachainsTransactions to boost parachain tr…
svyatonik Mar 25, 2024
a5e34a9
check parachain id in CheckAndBoostBridgeParachainsTransactions
svyatonik Mar 25, 2024
392e682
use submit_parachain_head_call_ex in tests
svyatonik Mar 25, 2024
1040616
removed commented code
svyatonik Mar 25, 2024
f138b55
changed condition for consistency
svyatonik Mar 25, 2024
ab497ce
include overweight from runtime signed extensions into submit_paracha…
svyatonik Mar 25, 2024
bcaeffe
fixed comment
svyatonik Mar 25, 2024
43c1cd5
removed obsolete code comment
svyatonik Mar 25, 2024
91d1b13
added important comment + test
svyatonik Mar 25, 2024
a22923c
Merge branch 'sv-refund-non-mandatory-headers' into sv-relay-free-hea…
svyatonik Mar 25, 2024
f393740
some fixes
svyatonik Mar 25, 2024
bb4b9fb
fix no-std compile
svyatonik Mar 25, 2024
c3429c1
Merge branch 'sv-refund-non-mandatory-headers' into sv-relay-free-hea…
svyatonik Mar 25, 2024
ab2af9f
again fix lost change
svyatonik Mar 25, 2024
2e2c1e9
Merge branch 'sv-refund-non-mandatory-headers' into sv-relay-free-hea…
svyatonik Mar 25, 2024
e2dacf2
use submit_parachain_heads_ex for Rococo<>Westend bridge
svyatonik Mar 25, 2024
23bff92
fix for mandatory + interval check in ext
svyatonik Mar 25, 2024
ee2090c
Merge branch 'sv-refund-non-mandatory-headers' into sv-relay-free-hea…
svyatonik Mar 25, 2024
69616d6
Merge branch 'master' into sv-relay-free-headers
svyatonik Apr 25, 2024
ee09b00
deleted moved files (merge conflict)
svyatonik Apr 25, 2024
a1cbcc7
update polkadot-sdk refs + fix compilation
svyatonik Apr 25, 2024
d910516
removed another moved file
svyatonik Apr 25, 2024
2165870
bump chain versions
svyatonik Apr 25, 2024
2528e68
bump relayer version
svyatonik Apr 25, 2024
3ce33e6
lock up
svyatonik Apr 25, 2024
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
251 changes: 129 additions & 122 deletions Cargo.lock

Large diffs are not rendered by default.

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
Expand Up @@ -52,6 +52,8 @@ impl Chain for BridgeHubKusama {
const NAME: &'static str = "BridgeHubKusama";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_bridge_hub_kusama::BEST_FINALIZED_BRIDGE_HUB_KUSAMA_HEADER_METHOD;
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;
Expand Down
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
Expand Up @@ -56,6 +56,8 @@ impl Chain for BridgeHubPolkadot {
const NAME: &'static str = "BridgeHubPolkadot";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_bridge_hub_polkadot::BEST_FINALIZED_BRIDGE_HUB_POLKADOT_HEADER_METHOD;
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;
Expand Down
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
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand All @@ -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)]
Expand All @@ -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;
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
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
Expand Up @@ -54,6 +54,8 @@ impl Chain for BridgeHubRococo {
const NAME: &'static str = "BridgeHubRococo";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_bridge_hub_rococo::BEST_FINALIZED_BRIDGE_HUB_ROCOCO_HEADER_METHOD;
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;
Expand Down Expand Up @@ -125,5 +127,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
Expand Up @@ -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)]
Expand All @@ -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;
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
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
Expand Up @@ -52,6 +52,8 @@ impl Chain for BridgeHubWestend {
const NAME: &'static str = "BridgeHubWestend";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_bridge_hub_westend::BEST_FINALIZED_BRIDGE_HUB_WESTEND_HEADER_METHOD;
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;
Expand Down Expand Up @@ -123,5 +125,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
Expand Up @@ -58,6 +58,8 @@ impl Chain for Kusama {
const NAME: &'static str = "Kusama";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_kusama::BEST_FINALIZED_KUSAMA_HEADER_METHOD;
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;
Expand All @@ -79,6 +81,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 {
Expand Down
2 changes: 2 additions & 0 deletions relay-clients/client-polkadot-bulletin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ impl Chain for PolkadotBulletin {
const NAME: &'static str = "PolkadotBulletin";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_polkadot_bulletin::BEST_FINALIZED_POLKADOT_BULLETIN_HEADER_METHOD;
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;
Expand Down
4 changes: 4 additions & 0 deletions relay-clients/client-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ impl Chain for Polkadot {
const NAME: &'static str = "Polkadot";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_polkadot::BEST_FINALIZED_POLKADOT_HEADER_METHOD;
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;
Expand All @@ -79,6 +81,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 {
Expand Down
6 changes: 5 additions & 1 deletion relay-clients/client-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ impl Chain for Rococo {
const NAME: &'static str = "Rococo";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_rococo::BEST_FINALIZED_ROCOCO_HEADER_METHOD;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_rococo::FREE_HEADERS_INTERVAL_FOR_ROCOCO_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6);

type SignedBlock = bp_rococo::SignedBlock;
Expand All @@ -79,6 +81,8 @@ impl ChainWithBalances for Rococo {

impl RelayChain for Rococo {
const PARAS_PALLET_NAME: &'static str = bp_rococo::PARAS_PALLET_NAME;
const WITH_CHAIN_BRIDGE_PARACHAINS_PALLET_NAME: &'static str =
bp_rococo::WITH_ROCOCO_BRIDGE_PARACHAINS_PALLET_NAME;
}

impl ChainWithTransactions for Rococo {
Expand Down Expand Up @@ -118,5 +122,5 @@ impl ChainWithTransactions for Rococo {

impl ChainWithRuntimeVersion for Rococo {
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion { spec_version: 1_009_000, transaction_version: 24 });
Some(SimpleRuntimeVersion { spec_version: 1_010_000, transaction_version: 24 });
}
6 changes: 5 additions & 1 deletion relay-clients/client-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ impl Chain for Westend {
const NAME: &'static str = "Westend";
const BEST_FINALIZED_HEADER_ID_METHOD: &'static str =
bp_westend::BEST_FINALIZED_WESTEND_HEADER_METHOD;
const FREE_HEADERS_INTERVAL_METHOD: &'static str =
bp_westend::FREE_HEADERS_INTERVAL_FOR_WESTEND_METHOD;
const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6);

type SignedBlock = bp_westend::SignedBlock;
Expand All @@ -73,6 +75,8 @@ impl ChainWithGrandpa for Westend {

impl RelayChain for Westend {
const PARAS_PALLET_NAME: &'static str = bp_westend::PARAS_PALLET_NAME;
const WITH_CHAIN_BRIDGE_PARACHAINS_PALLET_NAME: &'static str =
bp_westend::WITH_WESTEND_BRIDGE_PARACHAINS_PALLET_NAME;
}

impl ChainWithBalances for Westend {
Expand Down Expand Up @@ -118,5 +122,5 @@ impl ChainWithTransactions for Westend {

impl ChainWithRuntimeVersion for Westend {
const RUNTIME_VERSION: Option<SimpleRuntimeVersion> =
Some(SimpleRuntimeVersion { spec_version: 1_009_000, transaction_version: 24 });
Some(SimpleRuntimeVersion { spec_version: 1_010_000, transaction_version: 24 });
}
Loading