mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Box large arguments of GRANDPA pallet (#1154)
* box large arguments * benchmarks * fix
This commit is contained in:
committed by
Bastian Köcher
parent
782d37522f
commit
084da4343d
@@ -750,4 +750,12 @@ mod tests {
|
|||||||
DbWeight::get(),
|
DbWeight::get(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn call_size() {
|
||||||
|
// pallets that are (to be) used by polkadot runtime
|
||||||
|
const MAX_CALL_SIZE: usize = 230; // value from polkadot-runtime tests
|
||||||
|
assert!(core::mem::size_of::<pallet_bridge_grandpa::Call<Runtime>>() <= MAX_CALL_SIZE);
|
||||||
|
assert!(core::mem::size_of::<pallet_bridge_messages::Call<Runtime>>() <= MAX_CALL_SIZE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1377,4 +1377,12 @@ mod tests {
|
|||||||
additional_amount
|
additional_amount
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn call_size() {
|
||||||
|
// pallets that are (to be) used by polkadot runtime
|
||||||
|
const MAX_CALL_SIZE: usize = 230; // value from polkadot-runtime tests
|
||||||
|
assert!(core::mem::size_of::<pallet_bridge_grandpa::Call<Runtime>>() <= MAX_CALL_SIZE);
|
||||||
|
assert!(core::mem::size_of::<pallet_bridge_messages::Call<Runtime>>() <= MAX_CALL_SIZE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ fn prepare_benchmark_data<T: Config<I>, I: 'static>(
|
|||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let init_data = InitializationData {
|
let init_data = InitializationData {
|
||||||
header: bp_test_utils::test_header(Zero::zero()),
|
header: Box::new(bp_test_utils::test_header(Zero::zero())),
|
||||||
authority_list,
|
authority_list,
|
||||||
set_id: TEST_GRANDPA_SET_ID,
|
set_id: TEST_GRANDPA_SET_ID,
|
||||||
is_halted: false,
|
is_halted: false,
|
||||||
@@ -109,7 +109,7 @@ benchmarks_instance_pallet! {
|
|||||||
let v in 1..MAX_VOTE_ANCESTRIES;
|
let v in 1..MAX_VOTE_ANCESTRIES;
|
||||||
let caller: T::AccountId = whitelisted_caller();
|
let caller: T::AccountId = whitelisted_caller();
|
||||||
let (header, justification) = prepare_benchmark_data::<T, I>(p, v);
|
let (header, justification) = prepare_benchmark_data::<T, I>(p, v);
|
||||||
}: submit_finality_proof(RawOrigin::Signed(caller), header, justification)
|
}: submit_finality_proof(RawOrigin::Signed(caller), Box::new(header), justification)
|
||||||
verify {
|
verify {
|
||||||
let header: BridgedHeader<T, I> = bp_test_utils::test_header(header_number::<T, I, _>());
|
let header: BridgedHeader<T, I> = bp_test_utils::test_header(header_number::<T, I, _>());
|
||||||
let expected_hash = header.hash();
|
let expected_hash = header.hash();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ use frame_support::{ensure, fail};
|
|||||||
use frame_system::{ensure_signed, RawOrigin};
|
use frame_system::{ensure_signed, RawOrigin};
|
||||||
use sp_finality_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID};
|
use sp_finality_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID};
|
||||||
use sp_runtime::traits::{BadOrigin, Header as HeaderT, Zero};
|
use sp_runtime::traits::{BadOrigin, Header as HeaderT, Zero};
|
||||||
use sp_std::convert::TryInto;
|
use sp_std::{boxed::Box, convert::TryInto};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod mock;
|
mod mock;
|
||||||
@@ -130,7 +130,7 @@ pub mod pallet {
|
|||||||
))]
|
))]
|
||||||
pub fn submit_finality_proof(
|
pub fn submit_finality_proof(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
finality_target: BridgedHeader<T, I>,
|
finality_target: Box<BridgedHeader<T, I>>,
|
||||||
justification: GrandpaJustification<BridgedHeader<T, I>>,
|
justification: GrandpaJustification<BridgedHeader<T, I>>,
|
||||||
) -> DispatchResultWithPostInfo {
|
) -> DispatchResultWithPostInfo {
|
||||||
ensure_operational::<T, I>()?;
|
ensure_operational::<T, I>()?;
|
||||||
@@ -166,7 +166,7 @@ pub mod pallet {
|
|||||||
|
|
||||||
let is_authorities_change_enacted = try_enact_authority_change::<T, I>(&finality_target, set_id)?;
|
let is_authorities_change_enacted = try_enact_authority_change::<T, I>(&finality_target, set_id)?;
|
||||||
<RequestCount<T, I>>::mutate(|count| *count += 1);
|
<RequestCount<T, I>>::mutate(|count| *count += 1);
|
||||||
insert_header::<T, I>(finality_target, hash);
|
insert_header::<T, I>(*finality_target, hash);
|
||||||
log::info!(target: "runtime::bridge-grandpa", "Succesfully imported finalized header with hash {:?}!", hash);
|
log::info!(target: "runtime::bridge-grandpa", "Succesfully imported finalized header with hash {:?}!", hash);
|
||||||
|
|
||||||
// mandatory header is a header that changes authorities set. The pallet can't go further
|
// mandatory header is a header that changes authorities set. The pallet can't go further
|
||||||
@@ -471,7 +471,7 @@ pub mod pallet {
|
|||||||
let initial_hash = header.hash();
|
let initial_hash = header.hash();
|
||||||
<InitialHash<T, I>>::put(initial_hash);
|
<InitialHash<T, I>>::put(initial_hash);
|
||||||
<ImportedHashesPointer<T, I>>::put(0);
|
<ImportedHashesPointer<T, I>>::put(0);
|
||||||
insert_header::<T, I>(header, initial_hash);
|
insert_header::<T, I>(*header, initial_hash);
|
||||||
|
|
||||||
let authority_set = bp_header_chain::AuthoritySet::new(authority_list, set_id);
|
let authority_set = bp_header_chain::AuthoritySet::new(authority_list, set_id);
|
||||||
<CurrentAuthoritySet<T, I>>::put(authority_set);
|
<CurrentAuthoritySet<T, I>>::put(authority_set);
|
||||||
@@ -598,7 +598,7 @@ pub(crate) fn find_forced_change<H: HeaderT>(
|
|||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
pub fn initialize_for_benchmarks<T: Config<I>, I: 'static>(header: BridgedHeader<T, I>) {
|
pub fn initialize_for_benchmarks<T: Config<I>, I: 'static>(header: BridgedHeader<T, I>) {
|
||||||
initialize_bridge::<T, I>(InitializationData {
|
initialize_bridge::<T, I>(InitializationData {
|
||||||
header,
|
header: Box::new(header),
|
||||||
authority_list: sp_std::vec::Vec::new(), // we don't verify any proofs in external benchmarks
|
authority_list: sp_std::vec::Vec::new(), // we don't verify any proofs in external benchmarks
|
||||||
set_id: 0,
|
set_id: 0,
|
||||||
is_halted: false,
|
is_halted: false,
|
||||||
@@ -628,7 +628,7 @@ mod tests {
|
|||||||
let genesis = test_header(0);
|
let genesis = test_header(0);
|
||||||
|
|
||||||
let init_data = InitializationData {
|
let init_data = InitializationData {
|
||||||
header: genesis,
|
header: Box::new(genesis),
|
||||||
authority_list: authority_list(),
|
authority_list: authority_list(),
|
||||||
set_id: 1,
|
set_id: 1,
|
||||||
is_halted: false,
|
is_halted: false,
|
||||||
@@ -641,7 +641,7 @@ mod tests {
|
|||||||
let header = test_header(header.into());
|
let header = test_header(header.into());
|
||||||
let justification = make_default_justification(&header);
|
let justification = make_default_justification(&header);
|
||||||
|
|
||||||
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), header, justification)
|
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), Box::new(header), justification)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn next_block() {
|
fn next_block() {
|
||||||
@@ -828,7 +828,7 @@ mod tests {
|
|||||||
let justification = make_justification_for_header(params);
|
let justification = make_justification_for_header(params);
|
||||||
|
|
||||||
assert_err!(
|
assert_err!(
|
||||||
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), header, justification,),
|
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), Box::new(header), justification,),
|
||||||
<Error<TestRuntime>>::InvalidJustification
|
<Error<TestRuntime>>::InvalidJustification
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
@@ -844,7 +844,7 @@ mod tests {
|
|||||||
justification.round = 42;
|
justification.round = 42;
|
||||||
|
|
||||||
assert_err!(
|
assert_err!(
|
||||||
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), header, justification,),
|
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), Box::new(header), justification,),
|
||||||
<Error<TestRuntime>>::InvalidJustification
|
<Error<TestRuntime>>::InvalidJustification
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
@@ -857,7 +857,7 @@ mod tests {
|
|||||||
|
|
||||||
let invalid_authority_list = vec![(ALICE.into(), u64::MAX), (BOB.into(), u64::MAX)];
|
let invalid_authority_list = vec![(ALICE.into(), u64::MAX), (BOB.into(), u64::MAX)];
|
||||||
let init_data = InitializationData {
|
let init_data = InitializationData {
|
||||||
header: genesis,
|
header: Box::new(genesis),
|
||||||
authority_list: invalid_authority_list,
|
authority_list: invalid_authority_list,
|
||||||
set_id: 1,
|
set_id: 1,
|
||||||
is_halted: false,
|
is_halted: false,
|
||||||
@@ -869,7 +869,7 @@ mod tests {
|
|||||||
let justification = make_default_justification(&header);
|
let justification = make_default_justification(&header);
|
||||||
|
|
||||||
assert_err!(
|
assert_err!(
|
||||||
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), header, justification,),
|
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), Box::new(header), justification,),
|
||||||
<Error<TestRuntime>>::InvalidAuthoritySet
|
<Error<TestRuntime>>::InvalidAuthoritySet
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
@@ -904,7 +904,11 @@ mod tests {
|
|||||||
|
|
||||||
// Let's import our test header
|
// Let's import our test header
|
||||||
assert_ok!(
|
assert_ok!(
|
||||||
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), header.clone(), justification),
|
Pallet::<TestRuntime>::submit_finality_proof(
|
||||||
|
Origin::signed(1),
|
||||||
|
Box::new(header.clone()),
|
||||||
|
justification
|
||||||
|
),
|
||||||
PostDispatchInfo {
|
PostDispatchInfo {
|
||||||
actual_weight: None,
|
actual_weight: None,
|
||||||
pays_fee: frame_support::weights::Pays::No,
|
pays_fee: frame_support::weights::Pays::No,
|
||||||
@@ -938,7 +942,7 @@ mod tests {
|
|||||||
|
|
||||||
// Should not be allowed to import this header
|
// Should not be allowed to import this header
|
||||||
assert_err!(
|
assert_err!(
|
||||||
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), header, justification),
|
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), Box::new(header), justification),
|
||||||
<Error<TestRuntime>>::UnsupportedScheduledChange
|
<Error<TestRuntime>>::UnsupportedScheduledChange
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
@@ -959,7 +963,7 @@ mod tests {
|
|||||||
|
|
||||||
// Should not be allowed to import this header
|
// Should not be allowed to import this header
|
||||||
assert_err!(
|
assert_err!(
|
||||||
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), header, justification),
|
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), Box::new(header), justification),
|
||||||
<Error<TestRuntime>>::UnsupportedScheduledChange
|
<Error<TestRuntime>>::UnsupportedScheduledChange
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
@@ -1017,7 +1021,7 @@ mod tests {
|
|||||||
let mut invalid_justification = make_default_justification(&header);
|
let mut invalid_justification = make_default_justification(&header);
|
||||||
invalid_justification.round = 42;
|
invalid_justification.round = 42;
|
||||||
|
|
||||||
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), header, invalid_justification)
|
Pallet::<TestRuntime>::submit_finality_proof(Origin::signed(1), Box::new(header), invalid_justification)
|
||||||
};
|
};
|
||||||
|
|
||||||
initialize_substrate_bridge();
|
initialize_substrate_bridge();
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ use serde::{Deserialize, Serialize};
|
|||||||
use sp_finality_grandpa::{AuthorityList, ConsensusLog, SetId, GRANDPA_ENGINE_ID};
|
use sp_finality_grandpa::{AuthorityList, ConsensusLog, SetId, GRANDPA_ENGINE_ID};
|
||||||
use sp_runtime::RuntimeDebug;
|
use sp_runtime::RuntimeDebug;
|
||||||
use sp_runtime::{generic::OpaqueDigestItemId, traits::Header as HeaderT};
|
use sp_runtime::{generic::OpaqueDigestItemId, traits::Header as HeaderT};
|
||||||
|
use sp_std::boxed::Box;
|
||||||
|
|
||||||
pub mod justification;
|
pub mod justification;
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ impl AuthoritySet {
|
|||||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||||
pub struct InitializationData<H: HeaderT> {
|
pub struct InitializationData<H: HeaderT> {
|
||||||
/// The header from which we should start syncing.
|
/// The header from which we should start syncing.
|
||||||
pub header: H,
|
pub header: Box<H>,
|
||||||
/// The initial authorities of the pallet.
|
/// The initial authorities of the pallet.
|
||||||
pub authority_list: AuthorityList,
|
pub authority_list: AuthorityList,
|
||||||
/// The ID of the initial authority set.
|
/// The ID of the initial authority set.
|
||||||
|
|||||||
@@ -88,7 +88,10 @@ impl SubstrateFinalitySyncPipeline for KusamaFinalityToPolkadot {
|
|||||||
proof: GrandpaJustification<bp_kusama::Header>,
|
proof: GrandpaJustification<bp_kusama::Header>,
|
||||||
) -> Bytes {
|
) -> Bytes {
|
||||||
let call = relay_polkadot_client::runtime::Call::BridgeKusamaGrandpa(
|
let call = relay_polkadot_client::runtime::Call::BridgeKusamaGrandpa(
|
||||||
relay_polkadot_client::runtime::BridgeKusamaGrandpaCall::submit_finality_proof(header.into_inner(), proof),
|
relay_polkadot_client::runtime::BridgeKusamaGrandpaCall::submit_finality_proof(
|
||||||
|
Box::new(header.into_inner()),
|
||||||
|
proof,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
||||||
let transaction = Polkadot::sign_transaction(
|
let transaction = Polkadot::sign_transaction(
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ impl SubstrateFinalitySyncPipeline for MillauFinalityToRialto {
|
|||||||
header: MillauSyncHeader,
|
header: MillauSyncHeader,
|
||||||
proof: GrandpaJustification<bp_millau::Header>,
|
proof: GrandpaJustification<bp_millau::Header>,
|
||||||
) -> Bytes {
|
) -> Bytes {
|
||||||
let call = rialto_runtime::BridgeGrandpaMillauCall::submit_finality_proof(header.into_inner(), proof).into();
|
let call =
|
||||||
|
rialto_runtime::BridgeGrandpaMillauCall::submit_finality_proof(Box::new(header.into_inner()), proof).into();
|
||||||
|
|
||||||
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
||||||
let transaction = Rialto::sign_transaction(
|
let transaction = Rialto::sign_transaction(
|
||||||
|
|||||||
@@ -278,11 +278,11 @@ mod rococo_tests {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let actual = relay_rococo_client::runtime::BridgeGrandpaWococoCall::submit_finality_proof(
|
let actual = relay_rococo_client::runtime::BridgeGrandpaWococoCall::submit_finality_proof(
|
||||||
header.clone(),
|
Box::new(header.clone()),
|
||||||
justification.clone(),
|
justification.clone(),
|
||||||
);
|
);
|
||||||
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
||||||
header,
|
Box::new(header),
|
||||||
justification,
|
justification,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -327,7 +327,7 @@ mod westend_tests {
|
|||||||
|
|
||||||
let actual = bp_westend::BridgeGrandpaRococoCall::submit_finality_proof(header.clone(), justification.clone());
|
let actual = bp_westend::BridgeGrandpaRococoCall::submit_finality_proof(header.clone(), justification.clone());
|
||||||
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
||||||
header,
|
Box::new(header),
|
||||||
justification,
|
justification,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,10 @@ impl SubstrateFinalitySyncPipeline for PolkadotFinalityToKusama {
|
|||||||
proof: GrandpaJustification<bp_polkadot::Header>,
|
proof: GrandpaJustification<bp_polkadot::Header>,
|
||||||
) -> Bytes {
|
) -> Bytes {
|
||||||
let call = relay_kusama_client::runtime::Call::BridgePolkadotGrandpa(
|
let call = relay_kusama_client::runtime::Call::BridgePolkadotGrandpa(
|
||||||
relay_kusama_client::runtime::BridgePolkadotGrandpaCall::submit_finality_proof(header.into_inner(), proof),
|
relay_kusama_client::runtime::BridgePolkadotGrandpaCall::submit_finality_proof(
|
||||||
|
Box::new(header.into_inner()),
|
||||||
|
proof,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
||||||
let transaction = Kusama::sign_transaction(
|
let transaction = Kusama::sign_transaction(
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ impl SubstrateFinalitySyncPipeline for RialtoFinalityToMillau {
|
|||||||
let call = millau_runtime::BridgeGrandpaRialtoCall::<
|
let call = millau_runtime::BridgeGrandpaRialtoCall::<
|
||||||
millau_runtime::Runtime,
|
millau_runtime::Runtime,
|
||||||
millau_runtime::RialtoGrandpaInstance,
|
millau_runtime::RialtoGrandpaInstance,
|
||||||
>::submit_finality_proof(header.into_inner(), proof)
|
>::submit_finality_proof(Box::new(header.into_inner()), proof)
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
||||||
|
|||||||
@@ -83,7 +83,10 @@ impl SubstrateFinalitySyncPipeline for RococoFinalityToWococo {
|
|||||||
proof: GrandpaJustification<bp_rococo::Header>,
|
proof: GrandpaJustification<bp_rococo::Header>,
|
||||||
) -> Bytes {
|
) -> Bytes {
|
||||||
let call = relay_wococo_client::runtime::Call::BridgeGrandpaRococo(
|
let call = relay_wococo_client::runtime::Call::BridgeGrandpaRococo(
|
||||||
relay_wococo_client::runtime::BridgeGrandpaRococoCall::submit_finality_proof(header.into_inner(), proof),
|
relay_wococo_client::runtime::BridgeGrandpaRococoCall::submit_finality_proof(
|
||||||
|
Box::new(header.into_inner()),
|
||||||
|
proof,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
||||||
let transaction = Wococo::sign_transaction(
|
let transaction = Wococo::sign_transaction(
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ impl SubstrateFinalitySyncPipeline for WestendFinalityToMillau {
|
|||||||
let call = millau_runtime::BridgeGrandpaWestendCall::<
|
let call = millau_runtime::BridgeGrandpaWestendCall::<
|
||||||
millau_runtime::Runtime,
|
millau_runtime::Runtime,
|
||||||
millau_runtime::WestendGrandpaInstance,
|
millau_runtime::WestendGrandpaInstance,
|
||||||
>::submit_finality_proof(header.into_inner(), proof)
|
>::submit_finality_proof(Box::new(header.into_inner()), proof)
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
||||||
|
|||||||
@@ -88,7 +88,10 @@ impl SubstrateFinalitySyncPipeline for WococoFinalityToRococo {
|
|||||||
proof: GrandpaJustification<bp_wococo::Header>,
|
proof: GrandpaJustification<bp_wococo::Header>,
|
||||||
) -> Bytes {
|
) -> Bytes {
|
||||||
let call = relay_rococo_client::runtime::Call::BridgeGrandpaWococo(
|
let call = relay_rococo_client::runtime::Call::BridgeGrandpaWococo(
|
||||||
relay_rococo_client::runtime::BridgeGrandpaWococoCall::submit_finality_proof(header.into_inner(), proof),
|
relay_rococo_client::runtime::BridgeGrandpaWococoCall::submit_finality_proof(
|
||||||
|
Box::new(header.into_inner()),
|
||||||
|
proof,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
|
||||||
let transaction = Rococo::sign_transaction(
|
let transaction = Rococo::sign_transaction(
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ pub enum BalancesCall {
|
|||||||
pub enum BridgePolkadotGrandpaCall {
|
pub enum BridgePolkadotGrandpaCall {
|
||||||
#[codec(index = 0)]
|
#[codec(index = 0)]
|
||||||
submit_finality_proof(
|
submit_finality_proof(
|
||||||
<PolkadotLike as Chain>::Header,
|
Box<<PolkadotLike as Chain>::Header>,
|
||||||
bp_header_chain::justification::GrandpaJustification<<PolkadotLike as Chain>::Header>,
|
bp_header_chain::justification::GrandpaJustification<<PolkadotLike as Chain>::Header>,
|
||||||
),
|
),
|
||||||
#[codec(index = 1)]
|
#[codec(index = 1)]
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ pub enum BalancesCall {
|
|||||||
pub enum BridgeKusamaGrandpaCall {
|
pub enum BridgeKusamaGrandpaCall {
|
||||||
#[codec(index = 0)]
|
#[codec(index = 0)]
|
||||||
submit_finality_proof(
|
submit_finality_proof(
|
||||||
<PolkadotLike as Chain>::Header,
|
Box<<PolkadotLike as Chain>::Header>,
|
||||||
bp_header_chain::justification::GrandpaJustification<<PolkadotLike as Chain>::Header>,
|
bp_header_chain::justification::GrandpaJustification<<PolkadotLike as Chain>::Header>,
|
||||||
),
|
),
|
||||||
#[codec(index = 1)]
|
#[codec(index = 1)]
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ pub enum SystemCall {
|
|||||||
pub enum BridgeGrandpaWococoCall {
|
pub enum BridgeGrandpaWococoCall {
|
||||||
#[codec(index = 0)]
|
#[codec(index = 0)]
|
||||||
submit_finality_proof(
|
submit_finality_proof(
|
||||||
<PolkadotLike as Chain>::Header,
|
Box<<PolkadotLike as Chain>::Header>,
|
||||||
bp_header_chain::justification::GrandpaJustification<<PolkadotLike as Chain>::Header>,
|
bp_header_chain::justification::GrandpaJustification<<PolkadotLike as Chain>::Header>,
|
||||||
),
|
),
|
||||||
#[codec(index = 1)]
|
#[codec(index = 1)]
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ pub enum SystemCall {
|
|||||||
pub enum BridgeGrandpaRococoCall {
|
pub enum BridgeGrandpaRococoCall {
|
||||||
#[codec(index = 0)]
|
#[codec(index = 0)]
|
||||||
submit_finality_proof(
|
submit_finality_proof(
|
||||||
<PolkadotLike as Chain>::Header,
|
Box<<PolkadotLike as Chain>::Header>,
|
||||||
bp_header_chain::justification::GrandpaJustification<<PolkadotLike as Chain>::Header>,
|
bp_header_chain::justification::GrandpaJustification<<PolkadotLike as Chain>::Header>,
|
||||||
),
|
),
|
||||||
#[codec(index = 1)]
|
#[codec(index = 1)]
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ async fn prepare_initialization_data<SourceChain: Chain>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Ok(InitializationData {
|
Ok(InitializationData {
|
||||||
header: initial_header,
|
header: Box::new(initial_header),
|
||||||
authority_list: initial_authorities_set,
|
authority_list: initial_authorities_set,
|
||||||
set_id: if schedules_change {
|
set_id: if schedules_change {
|
||||||
initial_authorities_set_id + 1
|
initial_authorities_set_id + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user