FAZ 1 Complete: Workspace compile fixes, warning cleanup, version bumps
- Fixed is_using_frame_crate() macro to check for pezframe/pezkuwi_sdk - Removed disable_pezframe_system_supertrait_check temporary bypasses - Feature-gated storage-benchmark and teyrchain-benchmarks code - Fixed dead_code warnings with underscore prefix (_Header) - Removed unused imports and shadowing use statements - Version bumps: procedural-tools 10.0.1, benchmarking-cli 32.0.1, docs 0.0.2, minimal-runtime 0.0.1, yet-another-teyrchain 0.6.1, umbrella 0.1.2 - Updated MAINNET_ROADMAP.md with FAZ 1 completion status
This commit is contained in:
@@ -20,7 +20,7 @@ serde = { optional = true, workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-beefy = { workspace = true }
|
||||
pezbp-beefy = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
|
||||
# Bizinikiwi Dependencies
|
||||
@@ -31,7 +31,7 @@ pezsp-runtime = { workspace = true }
|
||||
pezsp-std = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-test-utils = { workspace = true, default-features = true }
|
||||
pezbp-test-utils = { workspace = true, default-features = true }
|
||||
mmr-lib = { workspace = true, default-features = true }
|
||||
pezpallet-beefy-mmr = { workspace = true, default-features = true }
|
||||
pezpallet-mmr = { workspace = true, default-features = true }
|
||||
@@ -42,7 +42,7 @@ rand = { workspace = true, default-features = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-beefy/std",
|
||||
"pezbp-beefy/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-support/std",
|
||||
@@ -62,8 +62,8 @@ try-runtime = [
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-beefy/runtime-benchmarks",
|
||||
"bp-test-utils/runtime-benchmarks",
|
||||
"pezbp-beefy/runtime-benchmarks",
|
||||
"pezbp-test-utils/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#![warn(missing_docs)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use bp_beefy::{ChainWithBeefy, InitializationData};
|
||||
use pezbp_beefy::{ChainWithBeefy, InitializationData};
|
||||
use pezsp_std::{boxed::Box, prelude::*};
|
||||
|
||||
// Re-export in crate namespace for `construct_runtime!`
|
||||
@@ -57,29 +57,29 @@ pub type BridgedBlockHash<T, I> = pezbp_runtime::HashOf<BridgedChain<T, I>>;
|
||||
|
||||
/// Pezpallet initialization data.
|
||||
pub type InitializationDataOf<T, I> =
|
||||
InitializationData<BridgedBlockNumber<T, I>, bp_beefy::MmrHashOf<BridgedChain<T, I>>>;
|
||||
InitializationData<BridgedBlockNumber<T, I>, pezbp_beefy::MmrHashOf<BridgedChain<T, I>>>;
|
||||
/// BEEFY commitment hasher, used by configured bridged chain.
|
||||
pub type BridgedBeefyCommitmentHasher<T, I> = bp_beefy::BeefyCommitmentHasher<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyCommitmentHasher<T, I> = pezbp_beefy::BeefyCommitmentHasher<BridgedChain<T, I>>;
|
||||
/// BEEFY validator id, used by configured bridged chain.
|
||||
pub type BridgedBeefyAuthorityId<T, I> = bp_beefy::BeefyAuthorityIdOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyAuthorityId<T, I> = pezbp_beefy::BeefyAuthorityIdOf<BridgedChain<T, I>>;
|
||||
/// BEEFY validator set, used by configured bridged chain.
|
||||
pub type BridgedBeefyAuthoritySet<T, I> = bp_beefy::BeefyAuthoritySetOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyAuthoritySet<T, I> = pezbp_beefy::BeefyAuthoritySetOf<BridgedChain<T, I>>;
|
||||
/// BEEFY authority set, used by configured bridged chain.
|
||||
pub type BridgedBeefyAuthoritySetInfo<T, I> = bp_beefy::BeefyAuthoritySetInfoOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyAuthoritySetInfo<T, I> = pezbp_beefy::BeefyAuthoritySetInfoOf<BridgedChain<T, I>>;
|
||||
/// BEEFY signed commitment, used by configured bridged chain.
|
||||
pub type BridgedBeefySignedCommitment<T, I> = bp_beefy::BeefySignedCommitmentOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefySignedCommitment<T, I> = pezbp_beefy::BeefySignedCommitmentOf<BridgedChain<T, I>>;
|
||||
/// MMR hashing algorithm, used by configured bridged chain.
|
||||
pub type BridgedMmrHashing<T, I> = bp_beefy::MmrHashingOf<BridgedChain<T, I>>;
|
||||
pub type BridgedMmrHashing<T, I> = pezbp_beefy::MmrHashingOf<BridgedChain<T, I>>;
|
||||
/// MMR hashing output type of `BridgedMmrHashing<T, I>`.
|
||||
pub type BridgedMmrHash<T, I> = bp_beefy::MmrHashOf<BridgedChain<T, I>>;
|
||||
pub type BridgedMmrHash<T, I> = pezbp_beefy::MmrHashOf<BridgedChain<T, I>>;
|
||||
/// The type of the MMR leaf extra data used by the configured bridged chain.
|
||||
pub type BridgedBeefyMmrLeafExtra<T, I> = bp_beefy::BeefyMmrLeafExtraOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyMmrLeafExtra<T, I> = pezbp_beefy::BeefyMmrLeafExtraOf<BridgedChain<T, I>>;
|
||||
/// BEEFY MMR proof type used by the pezpallet
|
||||
pub type BridgedMmrProof<T, I> = bp_beefy::MmrProofOf<BridgedChain<T, I>>;
|
||||
pub type BridgedMmrProof<T, I> = pezbp_beefy::MmrProofOf<BridgedChain<T, I>>;
|
||||
/// MMR leaf type, used by configured bridged chain.
|
||||
pub type BridgedBeefyMmrLeaf<T, I> = bp_beefy::BeefyMmrLeafOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyMmrLeaf<T, I> = pezbp_beefy::BeefyMmrLeafOf<BridgedChain<T, I>>;
|
||||
/// Imported commitment data, stored by the pezpallet.
|
||||
pub type ImportedCommitment<T, I> = bp_beefy::ImportedCommitment<
|
||||
pub type ImportedCommitment<T, I> = pezbp_beefy::ImportedCommitment<
|
||||
BridgedBlockNumber<T, I>,
|
||||
BridgedBlockHash<T, I>,
|
||||
BridgedMmrHash<T, I>,
|
||||
@@ -415,7 +415,7 @@ pub mod pezpallet {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use bp_test_utils::generate_owned_bridge_module_tests;
|
||||
use pezbp_test_utils::generate_owned_bridge_module_tests;
|
||||
use mock::*;
|
||||
use mock_chain::*;
|
||||
use pezbp_runtime::{BasicOperatingMode, OwnedBridgeModuleError};
|
||||
@@ -565,7 +565,7 @@ mod tests {
|
||||
let imported_commitment = ImportedCommitments::<TestRuntime>::get(58).unwrap();
|
||||
assert_eq!(
|
||||
imported_commitment,
|
||||
bp_beefy::ImportedCommitment {
|
||||
pezbp_beefy::ImportedCommitment {
|
||||
parent_number_and_hash: (57, chain.header(57).header.hash()),
|
||||
mmr_root: chain.header(58).mmr_root,
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
BridgedMmrHash, BridgedMmrHashing, BridgedMmrProof,
|
||||
};
|
||||
|
||||
use bp_beefy::{BeefyValidatorSignatureOf, ChainWithBeefy, Commitment, MmrDataOrHash};
|
||||
use pezbp_beefy::{BeefyValidatorSignatureOf, ChainWithBeefy, Commitment, MmrDataOrHash};
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{BasicOperatingMode, Chain, ChainId};
|
||||
use pezframe_support::{construct_runtime, derive_impl, weights::Weight};
|
||||
@@ -126,7 +126,7 @@ pub fn run_test_with_initialize<T>(initial_validators_count: u32, test: impl FnO
|
||||
|
||||
crate::Pezpallet::<TestRuntime>::initialize(
|
||||
RuntimeOrigin::root(),
|
||||
bp_beefy::InitializationData {
|
||||
pezbp_beefy::InitializationData {
|
||||
operating_mode: BasicOperatingMode::Normal,
|
||||
best_block_number: 0,
|
||||
authority_set,
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
utils::get_authorities_mmr_root,
|
||||
};
|
||||
|
||||
use bp_beefy::{BeefyPayload, Commitment, ValidatorSetId, MMR_ROOT_PAYLOAD_ID};
|
||||
use pezbp_beefy::{BeefyPayload, Commitment, ValidatorSetId, MMR_ROOT_PAYLOAD_ID};
|
||||
use codec::Encode;
|
||||
use pezpallet_mmr::NodeIndex;
|
||||
use pezsp_consensus_beefy::mmr::{BeefyNextAuthoritySet, MmrLeafVersion};
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::{
|
||||
BridgedBeefyMmrLeaf, BridgedBeefySignedCommitment, BridgedChain, BridgedMmrHash,
|
||||
BridgedMmrHashing, BridgedMmrProof, Config, Error, LOG_TARGET,
|
||||
};
|
||||
use bp_beefy::{merkle_root, verify_mmr_leaves_proof, BeefyAuthorityId, MmrDataOrHash};
|
||||
use pezbp_beefy::{merkle_root, verify_mmr_leaves_proof, BeefyAuthorityId, MmrDataOrHash};
|
||||
use codec::Encode;
|
||||
use pezframe_support::ensure;
|
||||
use pezsp_runtime::traits::{Convert, Hash};
|
||||
@@ -12,7 +12,7 @@ use pezsp_std::{vec, vec::Vec};
|
||||
type BridgedMmrDataOrHash<T, I> = MmrDataOrHash<BridgedMmrHashing<T, I>, BridgedBeefyMmrLeaf<T, I>>;
|
||||
/// A way to encode validator id to the BEEFY merkle tree leaf.
|
||||
type BridgedBeefyAuthorityIdToMerkleLeaf<T, I> =
|
||||
bp_beefy::BeefyAuthorityIdToMerkleLeafOf<BridgedChain<T, I>>;
|
||||
pezbp_beefy::BeefyAuthorityIdToMerkleLeafOf<BridgedChain<T, I>>;
|
||||
|
||||
/// Get the MMR root for a collection of validators.
|
||||
pub(crate) fn get_authorities_mmr_root<
|
||||
@@ -100,7 +100,7 @@ fn extract_mmr_root<T: Config<I>, I: 'static>(
|
||||
commitment
|
||||
.commitment
|
||||
.payload
|
||||
.get_decoded(&bp_beefy::MMR_ROOT_PAYLOAD_ID)
|
||||
.get_decoded(&pezbp_beefy::MMR_ROOT_PAYLOAD_ID)
|
||||
.ok_or(Error::MmrRootMissingFromCommitment)
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ pub(crate) fn verify_beefy_mmr_leaf<T: Config<I>, I: 'static>(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{mock::*, mock_chain::*, *};
|
||||
use bp_beefy::{BeefyPayload, MMR_ROOT_PAYLOAD_ID};
|
||||
use pezbp_beefy::{BeefyPayload, MMR_ROOT_PAYLOAD_ID};
|
||||
use pezframe_support::{assert_noop, assert_ok};
|
||||
use pezsp_consensus_beefy::ValidatorSet;
|
||||
|
||||
@@ -350,7 +350,7 @@ mod tests {
|
||||
assert_eq!(CurrentAuthoritySetInfo::<TestRuntime>::get().len, 30);
|
||||
assert_eq!(
|
||||
ImportedCommitments::<TestRuntime>::get(1).unwrap(),
|
||||
bp_beefy::ImportedCommitment {
|
||||
pezbp_beefy::ImportedCommitment {
|
||||
parent_number_and_hash: (0, [0; 32].into()),
|
||||
mmr_root: header.mmr_root,
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@ scale-info = { features = ["derive"], workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-header-pez-chain = { workspace = true }
|
||||
pezbp-header-pez-chain = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
|
||||
# Bizinikiwi Dependencies
|
||||
@@ -31,7 +31,7 @@ pezsp-runtime = { features = ["serde"], workspace = true }
|
||||
pezsp-std = { workspace = true }
|
||||
|
||||
# Optional Benchmarking Dependencies
|
||||
bp-test-utils = { optional = true, workspace = true }
|
||||
pezbp-test-utils = { optional = true, workspace = true }
|
||||
pezframe-benchmarking = { optional = true, workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -42,8 +42,8 @@ pezsp-io = { workspace = true, default-features = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-header-pez-chain/std",
|
||||
"bp-test-utils/std",
|
||||
"pezbp-header-pez-chain/std",
|
||||
"pezbp-test-utils/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-benchmarking/std",
|
||||
@@ -56,9 +56,9 @@ std = [
|
||||
"tracing/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-header-pez-chain/runtime-benchmarks",
|
||||
"bp-test-utils",
|
||||
"bp-test-utils?/runtime-benchmarks",
|
||||
"pezbp-header-pez-chain/runtime-benchmarks",
|
||||
"pezbp-test-utils",
|
||||
"pezbp-test-utils?/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
use crate::*;
|
||||
|
||||
use bp_header_pez_chain::justification::required_justification_precommits;
|
||||
use bp_test_utils::{
|
||||
use pezbp_header_pez_chain::justification::required_justification_precommits;
|
||||
use pezbp_test_utils::{
|
||||
accounts, make_justification_for_header, JustificationGeneratorParams, TEST_GRANDPA_ROUND,
|
||||
TEST_GRANDPA_SET_ID,
|
||||
};
|
||||
@@ -92,7 +92,7 @@ fn prepare_benchmark_data<T: Config<I>, I: 'static>(
|
||||
.map(|id| (AuthorityId::from(*id), 1))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let genesis_header: BridgedHeader<T, I> = bp_test_utils::test_header(Zero::zero());
|
||||
let genesis_header: BridgedHeader<T, I> = pezbp_test_utils::test_header(Zero::zero());
|
||||
let genesis_hash = genesis_header.hash();
|
||||
let init_data = InitializationData {
|
||||
header: Box::new(genesis_header),
|
||||
@@ -104,7 +104,7 @@ fn prepare_benchmark_data<T: Config<I>, I: 'static>(
|
||||
bootstrap_bridge::<T, I>(init_data);
|
||||
assert!(<ImportedHeaders<T, I>>::contains_key(genesis_hash));
|
||||
|
||||
let header: BridgedHeader<T, I> = bp_test_utils::test_header(One::one());
|
||||
let header: BridgedHeader<T, I> = pezbp_test_utils::test_header(One::one());
|
||||
let params = JustificationGeneratorParams {
|
||||
header: header.clone(),
|
||||
round: TEST_GRANDPA_ROUND,
|
||||
@@ -127,8 +127,8 @@ benchmarks_instance_pallet! {
|
||||
let (header, justification) = prepare_benchmark_data::<T, I>(p, v);
|
||||
}: submit_finality_proof(RawOrigin::Signed(caller), Box::new(header), justification)
|
||||
verify {
|
||||
let genesis_header: BridgedHeader<T, I> = bp_test_utils::test_header(Zero::zero());
|
||||
let header: BridgedHeader<T, I> = bp_test_utils::test_header(One::one());
|
||||
let genesis_header: BridgedHeader<T, I> = pezbp_test_utils::test_header(Zero::zero());
|
||||
let header: BridgedHeader<T, I> = pezbp_test_utils::test_header(One::one());
|
||||
let expected_hash = header.hash();
|
||||
|
||||
// check that the header#1 has been inserted
|
||||
|
||||
@@ -18,7 +18,7 @@ use crate::{
|
||||
weights::WeightInfo, BestFinalized, BridgedBlockNumber, BridgedHeader, Config,
|
||||
CurrentAuthoritySet, Error, FreeHeadersRemaining, Pezpallet,
|
||||
};
|
||||
use bp_header_pez_chain::{
|
||||
use pezbp_header_pez_chain::{
|
||||
justification::GrandpaJustification, submit_finality_proof_limits_extras,
|
||||
SubmitFinalityProofInfo,
|
||||
};
|
||||
@@ -308,8 +308,8 @@ mod tests {
|
||||
BestFinalized, Config, CurrentAuthoritySet, FreeHeadersRemaining, PalletOperatingMode,
|
||||
StoredAuthoritySet, WeightInfo,
|
||||
};
|
||||
use bp_header_pez_chain::{ChainWithGrandpa, SubmitFinalityProofInfo};
|
||||
use bp_test_utils::{
|
||||
use pezbp_header_pez_chain::{ChainWithGrandpa, SubmitFinalityProofInfo};
|
||||
use pezbp_test_utils::{
|
||||
make_default_justification, make_justification_for_header, JustificationGeneratorParams,
|
||||
TEST_GRANDPA_SET_ID,
|
||||
};
|
||||
@@ -522,7 +522,7 @@ mod tests {
|
||||
let consensus_log =
|
||||
pezsp_consensus_grandpa::ConsensusLog::<TestNumber>::ScheduledChange(
|
||||
pezsp_consensus_grandpa::ScheduledChange {
|
||||
next_authorities: bp_test_utils::authority_list(),
|
||||
next_authorities: pezbp_test_utils::authority_list(),
|
||||
delay: 0,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
pub use storage_types::StoredAuthoritySet;
|
||||
|
||||
use bp_header_pez_chain::{
|
||||
use pezbp_header_pez_chain::{
|
||||
justification::GrandpaJustification, AuthoritySet, ChainWithGrandpa, GrandpaConsensusLogReader,
|
||||
HeaderChain, InitializationData, StoredHeaderData, StoredHeaderDataBuilder,
|
||||
StoredHeaderGrandpaInfo,
|
||||
@@ -680,9 +680,9 @@ pub mod pezpallet {
|
||||
justification: &GrandpaJustification<BridgedHeader<T, I>>,
|
||||
hash: BridgedBlockHash<T, I>,
|
||||
number: BridgedBlockNumber<T, I>,
|
||||
authority_set: bp_header_pez_chain::AuthoritySet,
|
||||
authority_set: pezbp_header_pez_chain::AuthoritySet,
|
||||
) -> Result<(), pezsp_runtime::DispatchError> {
|
||||
use bp_header_pez_chain::justification::verify_justification;
|
||||
use pezbp_header_pez_chain::justification::verify_justification;
|
||||
|
||||
Ok(verify_justification::<BridgedHeader<T, I>>(
|
||||
(hash, number),
|
||||
@@ -838,8 +838,8 @@ mod tests {
|
||||
run_test, test_header, FreeHeadersInterval, RuntimeEvent as TestEvent, RuntimeOrigin,
|
||||
System, TestBridgedChain, TestHeader, TestNumber, TestRuntime, MAX_BRIDGED_AUTHORITIES,
|
||||
};
|
||||
use bp_header_pez_chain::BridgeGrandpaCall;
|
||||
use bp_test_utils::{
|
||||
use pezbp_header_pez_chain::BridgeGrandpaCall;
|
||||
use pezbp_test_utils::{
|
||||
authority_list, generate_owned_bridge_module_tests, make_default_justification,
|
||||
make_justification_for_header, JustificationGeneratorParams, ALICE, BOB,
|
||||
TEST_GRANDPA_SET_ID,
|
||||
@@ -1456,7 +1456,7 @@ mod tests {
|
||||
Default::default(),
|
||||
)
|
||||
.map(|_| ()),
|
||||
bp_header_pez_chain::HeaderChainError::UnknownHeader,
|
||||
pezbp_header_pez_chain::HeaderChainError::UnknownHeader,
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -1671,17 +1671,17 @@ mod tests {
|
||||
fn storage_keys_computed_properly() {
|
||||
assert_eq!(
|
||||
PalletOperatingMode::<TestRuntime>::storage_value_final_key().to_vec(),
|
||||
bp_header_pez_chain::storage_keys::pezpallet_operating_mode_key("Grandpa").0,
|
||||
pezbp_header_pez_chain::storage_keys::pezpallet_operating_mode_key("Grandpa").0,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
CurrentAuthoritySet::<TestRuntime>::storage_value_final_key().to_vec(),
|
||||
bp_header_pez_chain::storage_keys::current_authority_set_key("Grandpa").0,
|
||||
pezbp_header_pez_chain::storage_keys::current_authority_set_key("Grandpa").0,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
BestFinalized::<TestRuntime>::storage_value_final_key().to_vec(),
|
||||
bp_header_pez_chain::storage_keys::best_finalized_key("Grandpa").0,
|
||||
pezbp_header_pez_chain::storage_keys::best_finalized_key("Grandpa").0,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
use bp_header_pez_chain::ChainWithGrandpa;
|
||||
use pezbp_header_pez_chain::ChainWithGrandpa;
|
||||
use pezbp_runtime::{Chain, ChainId};
|
||||
use pezframe_support::{
|
||||
construct_runtime, derive_impl, parameter_types, pezsp_runtime::StateVersion, traits::Hooks,
|
||||
@@ -113,5 +113,5 @@ pub fn run_test<T>(test: impl FnOnce() -> T) -> T {
|
||||
/// Return test header with given number.
|
||||
pub fn test_header(num: TestNumber) -> TestHeader {
|
||||
// We wrap the call to avoid explicit type annotations in our tests
|
||||
bp_test_utils::test_header(num)
|
||||
pezbp_test_utils::test_header(num)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::{Config, Error};
|
||||
|
||||
use bp_header_pez_chain::{AuthoritySet, ChainWithGrandpa};
|
||||
use pezbp_header_pez_chain::{AuthoritySet, ChainWithGrandpa};
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use pezframe_support::{traits::Get, BoundedVec, CloneNoBound, RuntimeDebugNoBound};
|
||||
use pezsp_consensus_grandpa::{AuthorityId, AuthorityList, AuthorityWeight, SetId};
|
||||
@@ -100,7 +100,7 @@ impl<T: Config<I>, I: 'static> From<StoredAuthoritySet<T, I>> for AuthoritySet {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::mock::{TestRuntime, MAX_BRIDGED_AUTHORITIES};
|
||||
use bp_test_utils::authority_list;
|
||||
use pezbp_test_utils::authority_list;
|
||||
|
||||
type StoredAuthoritySet = super::StoredAuthoritySet<TestRuntime, ()>;
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ scale-info = { features = ["derive"], workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bridge dependencies
|
||||
bp-header-pez-chain = { workspace = true }
|
||||
bp-messages = { workspace = true }
|
||||
pezbp-header-pez-chain = { workspace = true }
|
||||
pezbp-messages = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
|
||||
# Bizinikiwi Dependencies
|
||||
@@ -31,7 +31,7 @@ pezsp-std = { workspace = true }
|
||||
pezsp-trie = { optional = true, workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-test-utils = { workspace = true }
|
||||
pezbp-test-utils = { workspace = true }
|
||||
pezbp-runtime = { features = ["test-helpers"], workspace = true }
|
||||
pezpallet-balances = { workspace = true }
|
||||
pezpallet-bridge-grandpa = { workspace = true }
|
||||
@@ -41,9 +41,9 @@ pezsp-io = { workspace = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-header-pez-chain/std",
|
||||
"bp-messages/std",
|
||||
"bp-test-utils/std",
|
||||
"pezbp-header-pez-chain/std",
|
||||
"pezbp-messages/std",
|
||||
"pezbp-test-utils/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-benchmarking/std",
|
||||
@@ -60,9 +60,9 @@ std = [
|
||||
"tracing/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-header-pez-chain/runtime-benchmarks",
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bp-test-utils/runtime-benchmarks",
|
||||
"pezbp-header-pez-chain/runtime-benchmarks",
|
||||
"pezbp-messages/runtime-benchmarks",
|
||||
"pezbp-test-utils/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezbp-runtime/test-helpers",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
InboundLanes, OutboundLanes,
|
||||
};
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
source_chain::FromBridgedChainMessagesDeliveryProof,
|
||||
target_chain::FromBridgedChainMessagesProof, ChainWithMessages, DeliveredMessages,
|
||||
InboundLaneData, LaneState, MessageNonce, OutboundLaneData, UnrewardedRelayer,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::{BridgedChainOf, Config, InboundLanes, OutboundLanes, Pezpallet, LOG_TARGET};
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
target_chain::MessageDispatch, BaseMessagesProofInfo, ChainWithMessages, InboundLaneData,
|
||||
MessageNonce, MessagesCallInfo, ReceiveMessagesDeliveryProofInfo, ReceiveMessagesProofInfo,
|
||||
UnrewardedRelayerOccupation,
|
||||
@@ -248,7 +248,7 @@ fn unrewarded_relayers_occupation<T: Config<I>, I: 'static>(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::tests::mock::*;
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
source_chain::FromBridgedChainMessagesDeliveryProof,
|
||||
target_chain::FromBridgedChainMessagesProof, DeliveredMessages, InboundLaneData, LaneState,
|
||||
OutboundLaneData, UnrewardedRelayer, UnrewardedRelayersState,
|
||||
@@ -281,7 +281,7 @@ mod tests {
|
||||
fn deliver_message_10() {
|
||||
InboundLanes::<TestRuntime>::insert(
|
||||
test_lane_id(),
|
||||
bp_messages::InboundLaneData {
|
||||
pezbp_messages::InboundLaneData {
|
||||
state: LaneState::Opened,
|
||||
relayers: Default::default(),
|
||||
last_confirmed_nonce: 10,
|
||||
@@ -290,8 +290,8 @@ mod tests {
|
||||
}
|
||||
|
||||
fn validate_message_delivery(
|
||||
nonces_start: bp_messages::MessageNonce,
|
||||
nonces_end: bp_messages::MessageNonce,
|
||||
nonces_start: pezbp_messages::MessageNonce,
|
||||
nonces_end: pezbp_messages::MessageNonce,
|
||||
) -> bool {
|
||||
RuntimeCall::Messages(crate::Call::<TestRuntime, ()>::receive_messages_proof {
|
||||
relayer_id_at_bridged_chain: 42,
|
||||
@@ -413,7 +413,7 @@ mod tests {
|
||||
fn confirm_message_10() {
|
||||
OutboundLanes::<TestRuntime>::insert(
|
||||
test_lane_id(),
|
||||
bp_messages::OutboundLaneData {
|
||||
pezbp_messages::OutboundLaneData {
|
||||
state: LaneState::Opened,
|
||||
oldest_unpruned_nonce: 0,
|
||||
latest_received_nonce: 10,
|
||||
@@ -422,7 +422,7 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
fn validate_message_confirmation(last_delivered_nonce: bp_messages::MessageNonce) -> bool {
|
||||
fn validate_message_confirmation(last_delivered_nonce: pezbp_messages::MessageNonce) -> bool {
|
||||
RuntimeCall::Messages(crate::Call::<TestRuntime>::receive_messages_delivery_proof {
|
||||
proof: FromBridgedChainMessagesDeliveryProof {
|
||||
bridged_header_hash: Default::default(),
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::{BridgedChainOf, Config};
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
|
||||
ChainWithMessages, DeliveredMessages, InboundLaneData, LaneState, MessageKey, MessageNonce,
|
||||
OutboundLaneData, ReceptionResult, UnrewardedRelayer,
|
||||
@@ -238,7 +238,7 @@ impl<S: InboundLaneStorage> InboundLane<S> {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{active_inbound_lane, lanes_manager::RuntimeInboundLaneStorage, tests::mock::*};
|
||||
use bp_messages::UnrewardedRelayersState;
|
||||
use pezbp_messages::UnrewardedRelayersState;
|
||||
|
||||
fn receive_regular_message(
|
||||
lane: &mut InboundLane<RuntimeInboundLaneStorage<TestRuntime, ()>>,
|
||||
|
||||
@@ -20,7 +20,7 @@ use crate::{
|
||||
StoredMessagePayload,
|
||||
};
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
target_chain::MessageDispatch, ChainWithMessages, InboundLaneData, LaneState, MessageKey,
|
||||
MessageNonce, OutboundLaneData,
|
||||
};
|
||||
|
||||
@@ -50,8 +50,8 @@ pub use weights_ext::{
|
||||
EXPECTED_DEFAULT_MESSAGE_LENGTH, EXTRA_STORAGE_PROOF_SIZE,
|
||||
};
|
||||
|
||||
use bp_header_pez_chain::HeaderChain;
|
||||
use bp_messages::{
|
||||
use pezbp_header_pez_chain::HeaderChain;
|
||||
use pezbp_messages::{
|
||||
source_chain::{
|
||||
DeliveryConfirmationPayments, FromBridgedChainMessagesDeliveryProof, OnMessagesDelivered,
|
||||
SendMessageArtifacts,
|
||||
@@ -97,7 +97,7 @@ pub const LOG_TARGET: &str = "runtime::bridge-messages";
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
use bp_messages::{LaneIdType, ReceivedMessages, ReceptionResult};
|
||||
use pezbp_messages::{LaneIdType, ReceivedMessages, ReceptionResult};
|
||||
use pezbp_runtime::RangeInclusiveExt;
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
@@ -677,7 +677,7 @@ pub struct SendMessageArgs<T: Config<I>, I: 'static> {
|
||||
payload: StoredMessagePayload<T, I>,
|
||||
}
|
||||
|
||||
impl<T, I> bp_messages::source_chain::MessagesBridge<T::OutboundPayload, T::LaneId>
|
||||
impl<T, I> pezbp_messages::source_chain::MessagesBridge<T::OutboundPayload, T::LaneId>
|
||||
for Pezpallet<T, I>
|
||||
where
|
||||
T: Config<I>,
|
||||
|
||||
@@ -30,7 +30,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
|
||||
pub mod v0 {
|
||||
use super::Config;
|
||||
use crate::BridgedChainOf;
|
||||
use bp_messages::{MessageNonce, UnrewardedRelayer};
|
||||
use pezbp_messages::{MessageNonce, UnrewardedRelayer};
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use pezsp_std::collections::vec_deque::VecDeque;
|
||||
@@ -59,7 +59,7 @@ pub mod v1 {
|
||||
use crate::{
|
||||
InboundLaneData, InboundLanes, OutboundLaneData, OutboundLanes, StoredInboundLaneData,
|
||||
};
|
||||
use bp_messages::LaneState;
|
||||
use pezbp_messages::LaneState;
|
||||
use pezframe_support::traits::UncheckedOnRuntimeUpgrade;
|
||||
use pezsp_std::marker::PhantomData;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::{Config, LOG_TARGET};
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
ChainWithMessages, DeliveredMessages, LaneState, MessageNonce, OutboundLaneData,
|
||||
UnrewardedRelayer,
|
||||
};
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
use crate::{BridgedChainOf, BridgedHeaderChainOf, Config};
|
||||
|
||||
use bp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use bp_messages::{
|
||||
use pezbp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use pezbp_messages::{
|
||||
source_chain::FromBridgedChainMessagesDeliveryProof,
|
||||
target_chain::{FromBridgedChainMessagesProof, ProvedLaneMessages, ProvedMessages},
|
||||
ChainWithMessages, InboundLaneData, Message, MessageKey, MessageNonce, MessagePayload,
|
||||
@@ -114,7 +114,7 @@ pub fn verify_messages_delivery_proof<T: Config<I>, I: 'static>(
|
||||
.map_err(VerificationError::HeaderChain)?;
|
||||
// Messages delivery proof is just proof of single storage key read => any error
|
||||
// is fatal.
|
||||
let storage_inbound_lane_data_key = bp_messages::storage_keys::inbound_lane_data_key(
|
||||
let storage_inbound_lane_data_key = pezbp_messages::storage_keys::inbound_lane_data_key(
|
||||
T::ThisChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
|
||||
&lane,
|
||||
);
|
||||
@@ -145,7 +145,7 @@ trait StorageProofAdapter<T: Config<I>, I: 'static> {
|
||||
&mut self,
|
||||
lane_id: &T::LaneId,
|
||||
) -> Result<Option<OutboundLaneData>, StorageProofError> {
|
||||
let storage_outbound_lane_data_key = bp_messages::storage_keys::outbound_lane_data_key(
|
||||
let storage_outbound_lane_data_key = pezbp_messages::storage_keys::outbound_lane_data_key(
|
||||
T::ThisChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
|
||||
lane_id,
|
||||
);
|
||||
@@ -156,7 +156,7 @@ trait StorageProofAdapter<T: Config<I>, I: 'static> {
|
||||
&mut self,
|
||||
message_key: &MessageKey<T::LaneId>,
|
||||
) -> Result<MessagePayload, StorageProofError> {
|
||||
let storage_message_key = bp_messages::storage_keys::message_key(
|
||||
let storage_message_key = pezbp_messages::storage_keys::message_key(
|
||||
T::ThisChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
|
||||
&message_key.lane_id,
|
||||
message_key.nonce,
|
||||
@@ -216,8 +216,8 @@ mod tests {
|
||||
mock::*,
|
||||
};
|
||||
|
||||
use bp_header_pez_chain::{HeaderChainError, StoredHeaderDataBuilder};
|
||||
use bp_messages::LaneState;
|
||||
use pezbp_header_pez_chain::{HeaderChainError, StoredHeaderDataBuilder};
|
||||
use pezbp_messages::LaneState;
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{HeaderId, StorageProofError};
|
||||
use pezsp_runtime::traits::Header;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Helpers for generating message storage proofs, that are used by tests and by benchmarks.
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
storage_keys, ChainWithMessages, InboundLaneData, MessageKey, MessageNonce, MessagePayload,
|
||||
OutboundLaneData,
|
||||
};
|
||||
|
||||
@@ -25,8 +25,8 @@ use crate::{
|
||||
Config, StoredMessagePayload,
|
||||
};
|
||||
|
||||
use bp_header_pez_chain::{ChainWithGrandpa, StoredHeaderData};
|
||||
use bp_messages::{
|
||||
use pezbp_header_pez_chain::{ChainWithGrandpa, StoredHeaderData};
|
||||
use pezbp_messages::{
|
||||
calc_relayers_rewards,
|
||||
source_chain::{
|
||||
DeliveryConfirmationPayments, FromBridgedChainMessagesDeliveryProof, OnMessagesDelivered,
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
PalletOperatingMode, PalletOwner, Pezpallet, StoredInboundLaneData,
|
||||
};
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
source_chain::{FromBridgedChainMessagesDeliveryProof, MessagesBridge},
|
||||
target_chain::{FromBridgedChainMessagesProof, MessageDispatch},
|
||||
BridgeMessagesCall, ChainWithMessages, DeliveredMessages, InboundLaneData,
|
||||
@@ -34,7 +34,7 @@ use bp_messages::{
|
||||
OutboundLaneData, OutboundMessageDetails, UnrewardedRelayer, UnrewardedRelayersState,
|
||||
VerificationError,
|
||||
};
|
||||
use bp_test_utils::generate_owned_bridge_module_tests;
|
||||
use pezbp_test_utils::generate_owned_bridge_module_tests;
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{BasicOperatingMode, PreComputedSize, RangeInclusiveExt, Size};
|
||||
use pezframe_support::{
|
||||
@@ -976,7 +976,7 @@ fn receive_messages_delivery_proof_rejects_proof_if_trying_to_confirm_more_messa
|
||||
fn storage_keys_computed_properly() {
|
||||
assert_eq!(
|
||||
PalletOperatingMode::<TestRuntime>::storage_value_final_key().to_vec(),
|
||||
bp_messages::storage_keys::operating_mode_key("Messages").0,
|
||||
pezbp_messages::storage_keys::operating_mode_key("Messages").0,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
@@ -984,17 +984,17 @@ fn storage_keys_computed_properly() {
|
||||
lane_id: test_lane_id(),
|
||||
nonce: 42
|
||||
}),
|
||||
bp_messages::storage_keys::message_key("Messages", &test_lane_id(), 42).0,
|
||||
pezbp_messages::storage_keys::message_key("Messages", &test_lane_id(), 42).0,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
OutboundLanes::<TestRuntime>::storage_map_final_key(test_lane_id()),
|
||||
bp_messages::storage_keys::outbound_lane_data_key("Messages", &test_lane_id()).0,
|
||||
pezbp_messages::storage_keys::outbound_lane_data_key("Messages", &test_lane_id()).0,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
InboundLanes::<TestRuntime>::storage_map_final_key(test_lane_id()),
|
||||
bp_messages::storage_keys::inbound_lane_data_key("Messages", &test_lane_id()).0,
|
||||
pezbp_messages::storage_keys::inbound_lane_data_key("Messages", &test_lane_id()).0,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::weights::WeightInfo;
|
||||
|
||||
use bp_messages::{MessageNonce, UnrewardedRelayersState};
|
||||
use pezbp_messages::{MessageNonce, UnrewardedRelayersState};
|
||||
use pezbp_runtime::{PreComputedSize, Size};
|
||||
use pezframe_support::weights::Weight;
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ scale-info = { features = ["derive"], workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bridge dependencies
|
||||
bp-header-pez-chain = { workspace = true }
|
||||
bp-messages = { workspace = true }
|
||||
bp-relayers = { workspace = true }
|
||||
pezbp-header-pez-chain = { workspace = true }
|
||||
pezbp-messages = { workspace = true }
|
||||
pezbp-relayers = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
pezpallet-bridge-grandpa = { workspace = true }
|
||||
pezpallet-bridge-messages = { workspace = true }
|
||||
@@ -35,9 +35,9 @@ pezsp-arithmetic = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-pezkuwi-core = { workspace = true }
|
||||
bp-test-utils = { workspace = true }
|
||||
bp-teyrchains = { workspace = true }
|
||||
pezbp-pezkuwi-core = { workspace = true }
|
||||
pezbp-test-utils = { workspace = true }
|
||||
pezbp-teyrchains = { workspace = true }
|
||||
pezpallet-balances = { workspace = true, default-features = true }
|
||||
pezpallet-utility = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
@@ -46,12 +46,12 @@ pezsp-io = { workspace = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-header-pez-chain/std",
|
||||
"bp-messages/std",
|
||||
"bp-pezkuwi-core/std",
|
||||
"bp-relayers/std",
|
||||
"bp-test-utils/std",
|
||||
"bp-teyrchains/std",
|
||||
"pezbp-header-pez-chain/std",
|
||||
"pezbp-messages/std",
|
||||
"pezbp-pezkuwi-core/std",
|
||||
"pezbp-relayers/std",
|
||||
"pezbp-test-utils/std",
|
||||
"pezbp-teyrchains/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-benchmarking/std",
|
||||
@@ -70,12 +70,12 @@ std = [
|
||||
"tracing/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-header-pez-chain/runtime-benchmarks",
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bp-pezkuwi-core/runtime-benchmarks",
|
||||
"bp-relayers/runtime-benchmarks",
|
||||
"bp-test-utils/runtime-benchmarks",
|
||||
"bp-teyrchains/runtime-benchmarks",
|
||||
"pezbp-header-pez-chain/runtime-benchmarks",
|
||||
"pezbp-messages/runtime-benchmarks",
|
||||
"pezbp-pezkuwi-core/runtime-benchmarks",
|
||||
"pezbp-relayers/runtime-benchmarks",
|
||||
"pezbp-test-utils/runtime-benchmarks",
|
||||
"pezbp-teyrchains/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
|
||||
@@ -171,7 +171,7 @@ mod benchmarks {
|
||||
{
|
||||
crate::Pezpallet::<T, I>::slash_and_deregister(
|
||||
&relayer,
|
||||
bp_relayers::ExplicitOrAccountParams::Explicit::<_, ()>(slash_destination),
|
||||
pezbp_relayers::ExplicitOrAccountParams::Explicit::<_, ()>(slash_destination),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
extension::verify_messages_call_succeeded, Config as BridgeRelayersConfig, LOG_TARGET,
|
||||
};
|
||||
|
||||
use bp_relayers::{BatchCallUnpacker, ExtensionCallData, ExtensionCallInfo, ExtensionConfig};
|
||||
use pezbp_relayers::{BatchCallUnpacker, ExtensionCallData, ExtensionCallInfo, ExtensionConfig};
|
||||
use core::marker::PhantomData;
|
||||
use pezbp_runtime::{Chain, StaticStrProvider};
|
||||
use pezframe_support::dispatch::{DispatchInfo, PostDispatchInfo};
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
use crate::{extension::verify_messages_call_succeeded, Config as BridgeRelayersConfig};
|
||||
|
||||
use bp_relayers::{ExtensionCallData, ExtensionCallInfo, ExtensionConfig};
|
||||
use pezbp_relayers::{ExtensionCallData, ExtensionCallInfo, ExtensionConfig};
|
||||
use core::marker::PhantomData;
|
||||
use pezbp_runtime::StaticStrProvider;
|
||||
use pezframe_support::dispatch::{DispatchInfo, PostDispatchInfo};
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
use crate::{Config as RelayersConfig, Pezpallet as RelayersPallet, WeightInfoExt, LOG_TARGET};
|
||||
|
||||
use bp_messages::{ChainWithMessages, MessageNonce};
|
||||
use bp_relayers::{
|
||||
use pezbp_messages::{ChainWithMessages, MessageNonce};
|
||||
use pezbp_relayers::{
|
||||
ExplicitOrAccountParams, ExtensionCallData, ExtensionCallInfo, ExtensionConfig,
|
||||
RewardsAccountOwner, RewardsAccountParams,
|
||||
};
|
||||
@@ -86,7 +86,7 @@ impl<AccountId, RemoteGrandpaChainBlockNumber: Debug, LaneId: Clone + Copy + Deb
|
||||
#[cfg(test)]
|
||||
pub fn submit_finality_proof_info_mut(
|
||||
&mut self,
|
||||
) -> Option<&mut bp_header_pez_chain::SubmitFinalityProofInfo<RemoteGrandpaChainBlockNumber>> {
|
||||
) -> Option<&mut pezbp_header_pez_chain::SubmitFinalityProofInfo<RemoteGrandpaChainBlockNumber>> {
|
||||
match self.call_info {
|
||||
ExtensionCallInfo::AllFinalityAndMsgs(ref mut info, _, _) => Some(info),
|
||||
ExtensionCallInfo::RelayFinalityAndMsgs(ref mut info, _) => Some(info),
|
||||
@@ -455,18 +455,18 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::mock::*;
|
||||
|
||||
use bp_header_pez_chain::{StoredHeaderDataBuilder, SubmitFinalityProofInfo};
|
||||
use bp_messages::{
|
||||
use pezbp_header_pez_chain::{StoredHeaderDataBuilder, SubmitFinalityProofInfo};
|
||||
use pezbp_messages::{
|
||||
source_chain::FromBridgedChainMessagesDeliveryProof,
|
||||
target_chain::FromBridgedChainMessagesProof, BaseMessagesProofInfo, DeliveredMessages,
|
||||
InboundLaneData, MessageNonce, MessagesCallInfo, MessagesOperatingMode, OutboundLaneData,
|
||||
ReceiveMessagesDeliveryProofInfo, ReceiveMessagesProofInfo, UnrewardedRelayer,
|
||||
UnrewardedRelayerOccupation, UnrewardedRelayersState,
|
||||
};
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHeadsProof, ParaId};
|
||||
use bp_relayers::RuntimeWithUtilityPallet;
|
||||
use bp_test_utils::{make_default_justification, test_keyring, TEST_GRANDPA_SET_ID};
|
||||
use bp_teyrchains::{BestParaHeadHash, ParaInfo, SubmitTeyrchainHeadsInfo};
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHeadsProof, ParaId};
|
||||
use pezbp_relayers::RuntimeWithUtilityPallet;
|
||||
use pezbp_test_utils::{make_default_justification, test_keyring, TEST_GRANDPA_SET_ID};
|
||||
use pezbp_teyrchains::{BestParaHeadHash, ParaInfo, SubmitTeyrchainHeadsInfo};
|
||||
use pezbp_runtime::{BasicOperatingMode, HeaderId, Teyrchain};
|
||||
use pezframe_support::{
|
||||
__private::pezsp_tracing,
|
||||
@@ -574,7 +574,7 @@ mod tests {
|
||||
pezpallet_bridge_grandpa::BestFinalized::<TestRuntime>::put(best_relay_header);
|
||||
pezpallet_bridge_grandpa::ImportedHeaders::<TestRuntime>::insert(
|
||||
best_relay_header.hash(),
|
||||
bp_test_utils::test_header::<BridgedChainHeader>(0).build(),
|
||||
pezbp_test_utils::test_header::<BridgedChainHeader>(0).build(),
|
||||
);
|
||||
|
||||
let para_id = ParaId(TestTeyrchain::get());
|
||||
|
||||
@@ -51,7 +51,7 @@ mod integrity_tests {}
|
||||
mod integrity_tests {
|
||||
use super::{compute_priority_boost, ItemCount};
|
||||
|
||||
use bp_messages::MessageNonce;
|
||||
use pezbp_messages::MessageNonce;
|
||||
use pezbp_runtime::PreComputedSize;
|
||||
use pezframe_support::{
|
||||
dispatch::{DispatchClass, DispatchInfo, Pays, PostDispatchInfo},
|
||||
@@ -142,7 +142,7 @@ mod integrity_tests {
|
||||
pub mod per_relay_header {
|
||||
use super::*;
|
||||
|
||||
use bp_header_pez_chain::{
|
||||
use pezbp_header_pez_chain::{
|
||||
max_expected_submit_finality_proof_arguments_size, ChainWithGrandpa,
|
||||
};
|
||||
use pezpallet_bridge_grandpa::WeightInfoExt;
|
||||
@@ -334,7 +334,7 @@ mod integrity_tests {
|
||||
pub mod per_message {
|
||||
use super::*;
|
||||
|
||||
use bp_messages::ChainWithMessages;
|
||||
use pezbp_messages::ChainWithMessages;
|
||||
use pezpallet_bridge_messages::WeightInfoExt;
|
||||
|
||||
/// Ensures that the value of `PriorityBoostPerMessage` matches the value of
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
Config as BridgeRelayersConfig, LOG_TARGET,
|
||||
};
|
||||
|
||||
use bp_relayers::{BatchCallUnpacker, ExtensionCallData, ExtensionCallInfo, ExtensionConfig};
|
||||
use pezbp_relayers::{BatchCallUnpacker, ExtensionCallData, ExtensionCallInfo, ExtensionConfig};
|
||||
use core::marker::PhantomData;
|
||||
use pezbp_runtime::{StaticStrProvider, Teyrchain};
|
||||
use pezframe_support::dispatch::{DispatchInfo, PostDispatchInfo};
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub use bp_relayers::RewardLedger;
|
||||
use bp_relayers::{PaymentProcedure, Registration, RelayerRewardsKeyProvider, StakeAndSlash};
|
||||
pub use pezbp_relayers::RewardLedger;
|
||||
use pezbp_relayers::{PaymentProcedure, Registration, RelayerRewardsKeyProvider, StakeAndSlash};
|
||||
use core::marker::PhantomData;
|
||||
use pezbp_runtime::StorageDoubleMapKeyProvider;
|
||||
use pezframe_support::{fail, traits::tokens::Balance};
|
||||
@@ -578,8 +578,8 @@ mod tests {
|
||||
use super::*;
|
||||
use mock::{RuntimeEvent as TestEvent, *};
|
||||
|
||||
use bp_messages::{HashedLaneId, LaneIdType};
|
||||
use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
|
||||
use pezbp_messages::{HashedLaneId, LaneIdType};
|
||||
use pezbp_relayers::{RewardsAccountOwner, RewardsAccountParams};
|
||||
use pezframe_support::{assert_noop, assert_ok, traits::fungible::Mutate};
|
||||
use pezframe_system::{EventRecord, Pezpallet as System, Phase};
|
||||
use pezsp_runtime::DispatchError;
|
||||
@@ -637,7 +637,7 @@ mod tests {
|
||||
*b"test",
|
||||
RewardsAccountOwner::ThisChain,
|
||||
);
|
||||
let slash_destination = bp_relayers::ExplicitOrAccountParams::Params(slash_destination);
|
||||
let slash_destination = pezbp_relayers::ExplicitOrAccountParams::Params(slash_destination);
|
||||
Pezpallet::<TestRuntime>::slash_and_deregister(®ISTER_RELAYER, slash_destination);
|
||||
// check if event emitted
|
||||
assert_eq!(
|
||||
|
||||
@@ -29,7 +29,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(2);
|
||||
/// (used with v1 migration).
|
||||
pub mod v0 {
|
||||
use crate::{Config, Pezpallet};
|
||||
use bp_relayers::RewardsAccountOwner;
|
||||
use pezbp_relayers::RewardsAccountOwner;
|
||||
use codec::{Codec, Decode, Encode, EncodeLike, MaxEncodedLen};
|
||||
use core::marker::PhantomData;
|
||||
use pezbp_runtime::{ChainId, StorageDoubleMapKeyProvider};
|
||||
@@ -120,8 +120,8 @@ pub mod v0 {
|
||||
pub mod v1 {
|
||||
use super::*;
|
||||
use crate::{Config, Pezpallet};
|
||||
use bp_messages::LaneIdType;
|
||||
use bp_relayers::RewardsAccountParams;
|
||||
use pezbp_messages::LaneIdType;
|
||||
use pezbp_relayers::RewardsAccountParams;
|
||||
use codec::{Codec, EncodeLike};
|
||||
use core::marker::PhantomData;
|
||||
use pezbp_runtime::StorageDoubleMapKeyProvider;
|
||||
@@ -329,8 +329,8 @@ pub mod v2 {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use crate::RelayerRewards;
|
||||
use crate::{Config, Pezpallet};
|
||||
use bp_messages::LaneIdType;
|
||||
use bp_relayers::RewardsAccountParams;
|
||||
use pezbp_messages::LaneIdType;
|
||||
use pezbp_relayers::RewardsAccountParams;
|
||||
use core::marker::PhantomData;
|
||||
use pezframe_support::traits::UncheckedOnRuntimeUpgrade;
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
|
||||
use crate as pezpallet_bridge_relayers;
|
||||
|
||||
use bp_header_pez_chain::ChainWithGrandpa;
|
||||
use bp_messages::{
|
||||
use pezbp_header_pez_chain::ChainWithGrandpa;
|
||||
use pezbp_messages::{
|
||||
target_chain::{DispatchMessage, MessageDispatch},
|
||||
ChainWithMessages, HashedLaneId, LaneIdType, MessageNonce,
|
||||
};
|
||||
use bp_relayers::{
|
||||
use pezbp_relayers::{
|
||||
PayRewardFromAccount, PaymentProcedure, RewardsAccountOwner, RewardsAccountParams,
|
||||
};
|
||||
use bp_teyrchains::SingleParaStoredHeaderDataBuilder;
|
||||
use pezbp_teyrchains::SingleParaStoredHeaderDataBuilder;
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{messages::MessageDispatchResult, Chain, ChainId, Teyrchain};
|
||||
use pezframe_support::{
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
use crate::{Config, Pezpallet};
|
||||
|
||||
use alloc::collections::vec_deque::VecDeque;
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
source_chain::{DeliveryConfirmationPayments, RelayersRewards},
|
||||
MessageNonce,
|
||||
};
|
||||
pub use bp_relayers::PayRewardFromAccount;
|
||||
use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
|
||||
pub use pezbp_relayers::PayRewardFromAccount;
|
||||
use pezbp_relayers::{RewardsAccountOwner, RewardsAccountParams};
|
||||
use core::{marker::PhantomData, ops::RangeInclusive};
|
||||
use pezbp_runtime::Chain;
|
||||
use pezframe_support::{pezsp_runtime::SaturatedConversion, traits::Get};
|
||||
@@ -51,11 +51,11 @@ where
|
||||
|
||||
fn pay_reward(
|
||||
lane_id: LaneIdOf<T, MI>,
|
||||
pez_messages_relayers: VecDeque<bp_messages::UnrewardedRelayer<T::AccountId>>,
|
||||
pez_messages_relayers: VecDeque<pezbp_messages::UnrewardedRelayer<T::AccountId>>,
|
||||
confirmation_relayer: &T::AccountId,
|
||||
received_range: &RangeInclusive<bp_messages::MessageNonce>,
|
||||
received_range: &RangeInclusive<pezbp_messages::MessageNonce>,
|
||||
) -> MessageNonce {
|
||||
let relayers_rewards = bp_messages::calc_relayers_rewards::<T::AccountId>(
|
||||
let relayers_rewards = pezbp_messages::calc_relayers_rewards::<T::AccountId>(
|
||||
pez_messages_relayers,
|
||||
received_range,
|
||||
);
|
||||
@@ -117,8 +117,8 @@ fn register_relayers_rewards<
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{mock::*, RelayerRewards};
|
||||
use bp_messages::LaneIdType;
|
||||
use bp_relayers::PaymentProcedure;
|
||||
use pezbp_messages::LaneIdType;
|
||||
use pezbp_relayers::PaymentProcedure;
|
||||
use pezframe_support::{
|
||||
assert_ok,
|
||||
traits::fungible::{Inspect, Mutate},
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Code that allows `NamedReservableCurrency` to be used as a `StakeAndSlash`
|
||||
//! mechanism of the relayers pezpallet.
|
||||
|
||||
use bp_relayers::StakeAndSlash;
|
||||
use pezbp_relayers::StakeAndSlash;
|
||||
use codec::Codec;
|
||||
use core::{fmt::Debug, marker::PhantomData};
|
||||
use pezframe_support::traits::{tokens::BalanceStatus, NamedReservableCurrency};
|
||||
@@ -27,7 +27,7 @@ use pezsp_runtime::{traits::Get, DispatchError, DispatchResult};
|
||||
/// reservations.
|
||||
///
|
||||
/// **WARNING**: this implementation assumes that the relayers pezpallet is configured to
|
||||
/// use the [`bp_relayers::PayRewardFromAccount`] as its relayers payment scheme.
|
||||
/// use the [`pezbp_relayers::PayRewardFromAccount`] as its relayers payment scheme.
|
||||
pub struct StakeAndSlashNamed<AccountId, BlockNumber, Currency, ReserveId, Stake, Lease>(
|
||||
PhantomData<(AccountId, BlockNumber, Currency, ReserveId, Stake, Lease)>,
|
||||
);
|
||||
@@ -72,7 +72,7 @@ where
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::mock::*;
|
||||
use bp_relayers::ExplicitOrAccountParams;
|
||||
use pezbp_relayers::ExplicitOrAccountParams;
|
||||
|
||||
use pezframe_support::traits::fungible::Mutate;
|
||||
use pezsp_runtime::traits::IdentifyAccount;
|
||||
|
||||
@@ -18,9 +18,9 @@ scale-info = { features = ["derive"], workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-header-pez-chain = { workspace = true }
|
||||
bp-pezkuwi-core = { workspace = true }
|
||||
bp-teyrchains = { workspace = true }
|
||||
pezbp-header-pez-chain = { workspace = true }
|
||||
pezbp-pezkuwi-core = { workspace = true }
|
||||
pezbp-teyrchains = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
pezpallet-bridge-grandpa = { workspace = true }
|
||||
|
||||
@@ -32,17 +32,17 @@ pezsp-runtime = { workspace = true }
|
||||
pezsp-std = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-header-pez-chain = { workspace = true, default-features = true }
|
||||
bp-test-utils = { workspace = true, default-features = true }
|
||||
pezbp-header-pez-chain = { workspace = true, default-features = true }
|
||||
pezbp-test-utils = { workspace = true, default-features = true }
|
||||
pezsp-core = { workspace = true, default-features = true }
|
||||
pezsp-io = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-header-pez-chain/std",
|
||||
"bp-pezkuwi-core/std",
|
||||
"bp-teyrchains/std",
|
||||
"pezbp-header-pez-chain/std",
|
||||
"pezbp-pezkuwi-core/std",
|
||||
"pezbp-teyrchains/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-benchmarking/std",
|
||||
@@ -55,10 +55,10 @@ std = [
|
||||
"tracing/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-header-pez-chain/runtime-benchmarks",
|
||||
"bp-pezkuwi-core/runtime-benchmarks",
|
||||
"bp-test-utils/runtime-benchmarks",
|
||||
"bp-teyrchains/runtime-benchmarks",
|
||||
"pezbp-header-pez-chain/runtime-benchmarks",
|
||||
"pezbp-pezkuwi-core/runtime-benchmarks",
|
||||
"pezbp-test-utils/runtime-benchmarks",
|
||||
"pezbp-teyrchains/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
RelayBlockNumber,
|
||||
};
|
||||
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
|
||||
use pezbp_runtime::UnverifiedStorageProofParams;
|
||||
use pezframe_benchmarking::{account, benchmarks_instance_pallet};
|
||||
use pezframe_system::RawOrigin;
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{Config, GrandpaPalletOf, Pezpallet, RelayBlockNumber};
|
||||
use bp_header_pez_chain::HeaderChain;
|
||||
use bp_teyrchains::{BestParaHeadHash, SubmitTeyrchainHeadsInfo};
|
||||
use pezbp_header_pez_chain::HeaderChain;
|
||||
use pezbp_teyrchains::{BestParaHeadHash, SubmitTeyrchainHeadsInfo};
|
||||
use pezbp_runtime::{HeaderId, OwnedBridgeModule};
|
||||
use pezframe_support::{
|
||||
dispatch::CallableCallFor,
|
||||
@@ -259,9 +259,9 @@ mod tests {
|
||||
mock::{run_test, FreeHeadersInterval, RuntimeCall, TestRuntime},
|
||||
CallSubType, PalletOperatingMode, ParaInfo, ParasInfo, RelayBlockHash, RelayBlockNumber,
|
||||
};
|
||||
use bp_header_pez_chain::StoredHeaderData;
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
|
||||
use bp_teyrchains::BestParaHeadHash;
|
||||
use pezbp_header_pez_chain::StoredHeaderData;
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
|
||||
use pezbp_teyrchains::BestParaHeadHash;
|
||||
use pezbp_runtime::BasicOperatingMode;
|
||||
|
||||
fn validate_submit_teyrchain_heads(
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
pub use weights::WeightInfo;
|
||||
pub use weights_ext::WeightInfoExt;
|
||||
|
||||
use bp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
|
||||
use bp_teyrchains::{
|
||||
use pezbp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
|
||||
use pezbp_teyrchains::{
|
||||
ParaInfo, ParaStoredHeaderData, RelayBlockHash, RelayBlockHasher, RelayBlockNumber,
|
||||
SubmitTeyrchainHeadsInfo,
|
||||
};
|
||||
@@ -40,7 +40,7 @@ use pezsp_std::{marker::PhantomData, vec::Vec};
|
||||
use proofs::{StorageProofAdapter, TeyrchainsStorageProofAdapter};
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use bp_teyrchains::ParaStoredHeaderDataBuilder;
|
||||
use pezbp_teyrchains::ParaStoredHeaderDataBuilder;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use codec::Encode;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
@@ -75,7 +75,7 @@ struct UpdateTeyrchainHeadArtifacts {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
use bp_teyrchains::{
|
||||
use pezbp_teyrchains::{
|
||||
BestParaHeadHash, ImportedParaHeadsKeyProvider, OnNewHead, ParaStoredHeaderDataBuilder,
|
||||
ParasInfoKeyProvider,
|
||||
};
|
||||
@@ -225,13 +225,13 @@ pub mod pezpallet {
|
||||
///
|
||||
/// We never store teyrchain heads here, since they may be too big (e.g. because of large
|
||||
/// digest items). Instead we're using the same approach as `pezpallet-bridge-grandpa`
|
||||
/// pezpallet - we are only storing `bp_messages::StoredHeaderData` (number and state root),
|
||||
/// pezpallet - we are only storing `pezbp_messages::StoredHeaderData` (number and state root),
|
||||
/// which is enough for our applications. However, we work with different teyrchains here
|
||||
/// and they can use different primitives (for block numbers and hash). So we can't store
|
||||
/// it directly. Instead, we're storing `bp_messages::StoredHeaderData` in SCALE-encoded
|
||||
/// form, wrapping it into `bp_teyrchains::ParaStoredHeaderData`.
|
||||
/// it directly. Instead, we're storing `pezbp_messages::StoredHeaderData` in SCALE-encoded
|
||||
/// form, wrapping it into `pezbp_teyrchains::ParaStoredHeaderData`.
|
||||
///
|
||||
/// This builder helps to convert from `HeadData` to `bp_teyrchains::ParaStoredHeaderData`.
|
||||
/// This builder helps to convert from `HeadData` to `pezbp_teyrchains::ParaStoredHeaderData`.
|
||||
type ParaStoredHeaderDataBuilder: ParaStoredHeaderDataBuilder;
|
||||
|
||||
/// Maximal number of single teyrchain heads to keep in the storage.
|
||||
@@ -245,7 +245,7 @@ pub mod pezpallet {
|
||||
type HeadsToKeep: Get<u32>;
|
||||
|
||||
/// Maximal size (in bytes) of the SCALE-encoded teyrchain head data
|
||||
/// (`bp_teyrchains::ParaStoredHeaderData`).
|
||||
/// (`pezbp_teyrchains::ParaStoredHeaderData`).
|
||||
///
|
||||
/// Keep in mind that the size of any tracked teyrchain header data must not exceed this
|
||||
/// value. So if you're going to track multiple teyrchains, one of which is using large
|
||||
@@ -804,7 +804,7 @@ impl<T: Config<I>, I: 'static, C: Teyrchain<Hash = ParaHash>> HeaderChain<C>
|
||||
pub fn initialize_for_benchmarks<T: Config<I>, I: 'static, PC: Teyrchain<Hash = ParaHash>>(
|
||||
header: HeaderOf<PC>,
|
||||
) {
|
||||
use bp_pezkuwi_core::teyrchains::ParaHead;
|
||||
use pezbp_pezkuwi_core::teyrchains::ParaHead;
|
||||
use pezbp_runtime::HeaderIdProvider;
|
||||
use pezsp_runtime::traits::Header;
|
||||
|
||||
@@ -842,16 +842,16 @@ pub(crate) mod tests {
|
||||
RegularTeyrchainHasher, RegularTeyrchainHeader, RelayBlockHeader,
|
||||
RuntimeEvent as TestEvent, RuntimeOrigin, TestRuntime, UNTRACKED_TEYRCHAIN_ID,
|
||||
};
|
||||
use bp_test_utils::prepare_teyrchain_heads_proof;
|
||||
use pezbp_test_utils::prepare_teyrchain_heads_proof;
|
||||
use codec::Encode;
|
||||
|
||||
use bp_header_pez_chain::{justification::GrandpaJustification, StoredHeaderGrandpaInfo};
|
||||
use bp_pezkuwi_core::teyrchains::ParaHead;
|
||||
use bp_test_utils::{
|
||||
use pezbp_header_pez_chain::{justification::GrandpaJustification, StoredHeaderGrandpaInfo};
|
||||
use pezbp_pezkuwi_core::teyrchains::ParaHead;
|
||||
use pezbp_test_utils::{
|
||||
authority_list, generate_owned_bridge_module_tests, make_default_justification,
|
||||
TEST_GRANDPA_SET_ID,
|
||||
};
|
||||
use bp_teyrchains::{
|
||||
use pezbp_teyrchains::{
|
||||
BestParaHeadHash, BridgeTeyrchainCall, ImportedParaHeadsKeyProvider, ParasInfoKeyProvider,
|
||||
};
|
||||
use pezbp_runtime::{
|
||||
@@ -878,7 +878,7 @@ pub(crate) mod tests {
|
||||
pezpallet_bridge_grandpa::FreeHeadersRemaining::<TestRuntime, BridgesGrandpaPalletInstance>::set(Some(100));
|
||||
pezpallet_bridge_grandpa::Pezpallet::<TestRuntime, BridgesGrandpaPalletInstance>::initialize(
|
||||
RuntimeOrigin::root(),
|
||||
bp_header_pez_chain::InitializationData {
|
||||
pezbp_header_pez_chain::InitializationData {
|
||||
header: Box::new(test_relay_header(0, state_root)),
|
||||
authority_list: authority_list(),
|
||||
set_id: 1,
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use bp_header_pez_chain::ChainWithGrandpa;
|
||||
use bp_pezkuwi_core::teyrchains::ParaId;
|
||||
use pezbp_header_pez_chain::ChainWithGrandpa;
|
||||
use pezbp_pezkuwi_core::teyrchains::ParaId;
|
||||
use pezbp_runtime::{Chain, ChainId, Teyrchain};
|
||||
use pezframe_support::{
|
||||
construct_runtime, derive_impl, parameter_types, traits::ConstU32, weights::Weight,
|
||||
@@ -235,13 +235,13 @@ impl pezpallet_bridge_teyrchains::benchmarking::Config<()> for TestRuntime {
|
||||
) -> (
|
||||
crate::RelayBlockNumber,
|
||||
crate::RelayBlockHash,
|
||||
bp_pezkuwi_core::teyrchains::ParaHeadsProof,
|
||||
Vec<(ParaId, bp_pezkuwi_core::teyrchains::ParaHash)>,
|
||||
pezbp_pezkuwi_core::teyrchains::ParaHeadsProof,
|
||||
Vec<(ParaId, pezbp_pezkuwi_core::teyrchains::ParaHash)>,
|
||||
) {
|
||||
// in mock run we only care about benchmarks correctness, not the benchmark results
|
||||
// => ignore size related arguments
|
||||
let (state_root, proof, teyrchains) =
|
||||
bp_test_utils::prepare_teyrchain_heads_proof::<RegularTeyrchainHeader>(
|
||||
pezbp_test_utils::prepare_teyrchain_heads_proof::<RegularTeyrchainHeader>(
|
||||
teyrchains.iter().map(|p| (p.0, crate::tests::head_data(p.0, 1))).collect(),
|
||||
);
|
||||
let relay_genesis_hash = crate::tests::initialize(state_root);
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
//! Tools for teyrchain head proof verification.
|
||||
|
||||
use crate::{Config, GrandpaPalletOf, RelayBlockHash, RelayBlockHasher};
|
||||
use bp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHead, ParaId};
|
||||
use bp_teyrchains::teyrchain_head_storage_key_at_source;
|
||||
use pezbp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHead, ParaId};
|
||||
use pezbp_teyrchains::teyrchain_head_storage_key_at_source;
|
||||
use codec::Decode;
|
||||
use pezbp_runtime::{RawStorageProof, StorageProofChecker, StorageProofError};
|
||||
use pezframe_support::traits::Get;
|
||||
|
||||
@@ -18,7 +18,7 @@ scale-info = { features = ["bit-vec", "derive", "serde"], workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bridge dependencies
|
||||
bp-xcm-bridge-hub-router = { workspace = true }
|
||||
pezbp-xcm-bridge-hub-router = { workspace = true }
|
||||
|
||||
# Bizinikiwi Dependencies
|
||||
pezframe-benchmarking = { optional = true, workspace = true }
|
||||
@@ -39,7 +39,7 @@ pezsp-io = { workspace = true, default-features = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-xcm-bridge-hub-router/std",
|
||||
"pezbp-xcm-bridge-hub-router/std",
|
||||
"codec/std",
|
||||
"pezframe-benchmarking/std",
|
||||
"pezframe-support/std",
|
||||
@@ -54,7 +54,7 @@ std = [
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pezbp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use bp_xcm_bridge_hub_router::MINIMAL_DELIVERY_FEE_FACTOR;
|
||||
pub use bp_xcm_bridge_hub_router::{BridgeState, XcmChannelStatusProvider};
|
||||
use pezbp_xcm_bridge_hub_router::MINIMAL_DELIVERY_FEE_FACTOR;
|
||||
pub use pezbp_xcm_bridge_hub_router::{BridgeState, XcmChannelStatusProvider};
|
||||
use codec::Encode;
|
||||
use pezframe_support::traits::Get;
|
||||
use pezkuwi_runtime_teyrchains::FeeTracker;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate as pezpallet_xcm_bridge_hub_router;
|
||||
|
||||
use bp_xcm_bridge_hub_router::XcmChannelStatusProvider;
|
||||
use pezbp_xcm_bridge_hub_router::XcmChannelStatusProvider;
|
||||
use codec::Encode;
|
||||
use pezframe_support::{
|
||||
construct_runtime, derive_impl, parameter_types,
|
||||
|
||||
@@ -18,8 +18,8 @@ scale-info = { features = ["derive"], workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-messages = { workspace = true }
|
||||
bp-xcm-bridge-hub = { workspace = true }
|
||||
pezbp-messages = { workspace = true }
|
||||
pezbp-xcm-bridge-hub = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
pezpallet-bridge-messages = { workspace = true }
|
||||
|
||||
@@ -36,8 +36,8 @@ xcm-builder = { workspace = true }
|
||||
xcm-executor = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-header-pez-chain = { workspace = true }
|
||||
bp-xcm-bridge-hub-router = { workspace = true }
|
||||
pezbp-header-pez-chain = { workspace = true }
|
||||
pezbp-xcm-bridge-hub-router = { workspace = true }
|
||||
pezkuwi-teyrchain-primitives = { workspace = true }
|
||||
pezpallet-balances = { workspace = true }
|
||||
pezpallet-xcm-bridge-hub-router = { workspace = true }
|
||||
@@ -46,10 +46,10 @@ pezsp-io = { workspace = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-header-pez-chain/std",
|
||||
"bp-messages/std",
|
||||
"bp-xcm-bridge-hub-router/std",
|
||||
"bp-xcm-bridge-hub/std",
|
||||
"pezbp-header-pez-chain/std",
|
||||
"pezbp-messages/std",
|
||||
"pezbp-xcm-bridge-hub-router/std",
|
||||
"pezbp-xcm-bridge-hub/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-support/std",
|
||||
@@ -69,10 +69,10 @@ std = [
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-header-pez-chain/runtime-benchmarks",
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"bp-xcm-bridge-hub/runtime-benchmarks",
|
||||
"pezbp-header-pez-chain/runtime-benchmarks",
|
||||
"pezbp-messages/runtime-benchmarks",
|
||||
"pezbp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pezbp-xcm-bridge-hub/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
use crate::{Config, Pezpallet, LOG_TARGET};
|
||||
|
||||
use bp_messages::target_chain::{DispatchMessage, MessageDispatch};
|
||||
use bp_xcm_bridge_hub::{LocalXcmChannelManager, XcmAsPlainPayload};
|
||||
use pezbp_messages::target_chain::{DispatchMessage, MessageDispatch};
|
||||
use pezbp_xcm_bridge_hub::{LocalXcmChannelManager, XcmAsPlainPayload};
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode};
|
||||
use pezbp_runtime::messages::MessageDispatchResult;
|
||||
use pezframe_support::{weights::Weight, CloneNoBound, EqNoBound, PartialEqNoBound};
|
||||
@@ -134,8 +134,8 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::{mock::*, Bridges, LaneToBridge, LanesManagerOf};
|
||||
|
||||
use bp_messages::{target_chain::DispatchMessageData, LaneIdType, MessageKey};
|
||||
use bp_xcm_bridge_hub::{Bridge, BridgeLocations, BridgeState};
|
||||
use pezbp_messages::{target_chain::DispatchMessageData, LaneIdType, MessageKey};
|
||||
use pezbp_xcm_bridge_hub::{Bridge, BridgeLocations, BridgeState};
|
||||
use pezframe_support::assert_ok;
|
||||
use pezpallet_bridge_messages::InboundLaneStorage;
|
||||
use xcm_executor::traits::ConvertLocation;
|
||||
|
||||
@@ -24,11 +24,11 @@ use crate::{Config, Pezpallet, LOG_TARGET};
|
||||
|
||||
use crate::{BridgeOf, Bridges};
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
source_chain::{MessagesBridge, OnMessagesDelivered},
|
||||
MessageNonce,
|
||||
};
|
||||
use bp_xcm_bridge_hub::{BridgeId, BridgeState, LocalXcmChannelManager, XcmAsPlainPayload};
|
||||
use pezbp_xcm_bridge_hub::{BridgeId, BridgeState, LocalXcmChannelManager, XcmAsPlainPayload};
|
||||
use pezframe_support::{ensure, traits::Get};
|
||||
use pezpallet_bridge_messages::{
|
||||
Config as BridgeMessagesConfig, Error, Pezpallet as BridgeMessagesPallet,
|
||||
@@ -371,7 +371,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::{mock::*, Bridges, LaneToBridge, LanesManagerOf};
|
||||
|
||||
use bp_xcm_bridge_hub::{Bridge, BridgeLocations, BridgeState};
|
||||
use pezbp_xcm_bridge_hub::{Bridge, BridgeLocations, BridgeState};
|
||||
use pezbp_runtime::RangeInclusiveExt;
|
||||
use pezframe_support::{assert_ok, traits::EnsureOrigin};
|
||||
use pezpallet_bridge_messages::InboundLaneStorage;
|
||||
|
||||
@@ -143,9 +143,9 @@
|
||||
#![warn(missing_docs)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use bp_messages::{LaneState, MessageNonce};
|
||||
use bp_xcm_bridge_hub::BridgeLocationsError;
|
||||
pub use bp_xcm_bridge_hub::{
|
||||
use pezbp_messages::{LaneState, MessageNonce};
|
||||
use pezbp_xcm_bridge_hub::BridgeLocationsError;
|
||||
pub use pezbp_xcm_bridge_hub::{
|
||||
Bridge, BridgeId, BridgeLocations, BridgeState, LocalXcmChannelManager,
|
||||
};
|
||||
use pezbp_runtime::{AccountIdOf, BalanceOf, RangeInclusiveExt};
|
||||
@@ -158,7 +158,7 @@ use xcm::prelude::*;
|
||||
use xcm_builder::DispatchBlob;
|
||||
use xcm_executor::traits::ConvertLocation;
|
||||
|
||||
pub use bp_xcm_bridge_hub::XcmAsPlainPayload;
|
||||
pub use pezbp_xcm_bridge_hub::XcmAsPlainPayload;
|
||||
pub use dispatcher::XcmBlobMessageDispatchResult;
|
||||
pub use exporter::PalletAsHaulBlobExporter;
|
||||
pub use pezpallet::*;
|
||||
@@ -846,7 +846,7 @@ pub mod pezpallet {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use bp_messages::LaneIdType;
|
||||
use pezbp_messages::LaneIdType;
|
||||
use mock::*;
|
||||
|
||||
use pezframe_support::{
|
||||
@@ -1715,7 +1715,7 @@ mod tests {
|
||||
let may_prune_messages = 13;
|
||||
|
||||
assert_eq!(
|
||||
bp_xcm_bridge_hub::XcmBridgeHubCall::open_bridge {
|
||||
pezbp_xcm_bridge_hub::XcmBridgeHubCall::open_bridge {
|
||||
bridge_destination_universal_location: Box::new(
|
||||
bridge_destination_universal_location.clone().into()
|
||||
)
|
||||
@@ -1729,7 +1729,7 @@ mod tests {
|
||||
.encode()
|
||||
);
|
||||
assert_eq!(
|
||||
bp_xcm_bridge_hub::XcmBridgeHubCall::close_bridge {
|
||||
pezbp_xcm_bridge_hub::XcmBridgeHubCall::close_bridge {
|
||||
bridge_destination_universal_location: Box::new(
|
||||
bridge_destination_universal_location.clone().into()
|
||||
),
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
use crate as pezpallet_xcm_bridge_hub;
|
||||
|
||||
use bp_messages::{
|
||||
use pezbp_messages::{
|
||||
target_chain::{DispatchMessage, MessageDispatch},
|
||||
ChainWithMessages, HashedLaneId, MessageNonce,
|
||||
};
|
||||
use bp_xcm_bridge_hub::{BridgeId, LocalXcmChannelManager};
|
||||
use pezbp_xcm_bridge_hub::{BridgeId, LocalXcmChannelManager};
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::{messages::MessageDispatchResult, Chain, ChainId, HashOf};
|
||||
use pezframe_support::{
|
||||
@@ -472,7 +472,7 @@ impl TestLocalXcmChannelManager {
|
||||
}
|
||||
|
||||
fn build_congestion_message(bridge: &BridgeId, is_congested: bool) -> Vec<Instruction<()>> {
|
||||
use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
use pezbp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, scale_info::TypeInfo)]
|
||||
enum Call {
|
||||
@@ -620,7 +620,7 @@ impl ChainWithMessages for BridgedUnderlyingChain {
|
||||
}
|
||||
|
||||
pub struct BridgedHeaderChain;
|
||||
impl bp_header_pez_chain::HeaderChain<BridgedUnderlyingChain> for BridgedHeaderChain {
|
||||
impl pezbp_header_pez_chain::HeaderChain<BridgedUnderlyingChain> for BridgedHeaderChain {
|
||||
fn finalized_header_state_root(
|
||||
_hash: HashOf<BridgedUnderlyingChain>,
|
||||
) -> Option<HashOf<BridgedUnderlyingChain>> {
|
||||
|
||||
Reference in New Issue
Block a user