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:
2026-01-02 11:41:09 +03:00
parent ed44adfb1e
commit 241bace6ad
516 changed files with 3723 additions and 3665 deletions
+18 -18
View File
@@ -20,11 +20,11 @@ tracing = { workspace = true }
tuplex = { workspace = true }
# Bridge dependencies
bp-header-pez-chain = { workspace = true }
bp-messages = { workspace = true }
bp-pezkuwi-core = { workspace = true }
bp-relayers = { workspace = true }
bp-teyrchains = { workspace = true }
pezbp-header-pez-chain = { workspace = true }
pezbp-messages = { workspace = true }
pezbp-pezkuwi-core = { workspace = true }
pezbp-relayers = { workspace = true }
pezbp-teyrchains = { workspace = true }
pezbp-runtime = { workspace = true }
pezpallet-bridge-grandpa = { workspace = true }
pezpallet-bridge-messages = { workspace = true }
@@ -46,7 +46,7 @@ pezsp-weights = { workspace = true }
xcm = { workspace = true }
[dev-dependencies]
bp-test-utils = { workspace = true }
pezbp-test-utils = { workspace = true }
pezpallet-balances = { workspace = true, default-features = true }
pezpallet-bridge-messages = { features = [
"std",
@@ -57,12 +57,12 @@ pezsp-core = { workspace = true, default-features = 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-support/std",
@@ -84,12 +84,12 @@ std = [
"xcm/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",
"pezbp-runtime/test-helpers",
"pezframe-support/runtime-benchmarks",
@@ -18,8 +18,8 @@
//! obsolete (duplicated) data or do not pass some additional pezpallet-specific
//! checks.
use bp_relayers::ExplicitOrAccountParams;
use bp_teyrchains::SubmitTeyrchainHeadsInfo;
use pezbp_relayers::ExplicitOrAccountParams;
use pezbp_teyrchains::SubmitTeyrchainHeadsInfo;
use pezbp_runtime::Teyrchain;
use pezpallet_bridge_grandpa::{
BridgedBlockNumber, CallSubType as GrandpaCallSubType, SubmitFinalityProofHelper,
@@ -377,12 +377,12 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
mod tests {
use super::*;
use crate::mock::*;
use bp_header_pez_chain::StoredHeaderDataBuilder;
use bp_messages::{InboundLaneData, MessageNonce, OutboundLaneData};
use bp_pezkuwi_core::teyrchains::{ParaHeadsProof, ParaId};
use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
use bp_test_utils::{make_default_justification, test_keyring, TEST_GRANDPA_SET_ID};
use bp_teyrchains::{BestParaHeadHash, ParaInfo};
use pezbp_header_pez_chain::StoredHeaderDataBuilder;
use pezbp_messages::{InboundLaneData, MessageNonce, OutboundLaneData};
use pezbp_pezkuwi_core::teyrchains::{ParaHeadsProof, ParaId};
use pezbp_relayers::{RewardsAccountOwner, RewardsAccountParams};
use pezbp_test_utils::{make_default_justification, test_keyring, TEST_GRANDPA_SET_ID};
use pezbp_teyrchains::{BestParaHeadHash, ParaInfo};
use codec::{Decode, Encode, MaxEncodedLen};
use pezbp_runtime::HeaderId;
use pezframe_support::{assert_err, assert_ok, traits::fungible::Mutate};
@@ -541,7 +541,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(BridgedUnderlyingTeyrchain::TEYRCHAIN_ID);
@@ -19,8 +19,8 @@
//! Most of the tests in this module assume that the bridge is using standard (see `crate::messages`
//! module for details) configuration.
use bp_header_pez_chain::ChainWithGrandpa;
use bp_messages::{ChainWithMessages, InboundLaneData, MessageNonce};
use pezbp_header_pez_chain::ChainWithGrandpa;
use pezbp_messages::{ChainWithMessages, InboundLaneData, MessageNonce};
use codec::Encode;
use pezbp_runtime::{AccountIdOf, Chain};
use pezframe_support::{storage::generator::StorageValue, traits::Get, weights::Weight};
@@ -69,7 +69,7 @@ macro_rules! assert_bridge_messages_pallet_types(
) => {
{
use $crate::integrity::__private::static_assertions::assert_type_eq_all;
use bp_messages::ChainWithMessages;
use pezbp_messages::ChainWithMessages;
use pezbp_runtime::Chain;
use pezpallet_bridge_messages::Config as BridgeMessagesConfig;
@@ -16,7 +16,7 @@
//! Helpers for implementing various message-related runtime API methods.
use bp_messages::{InboundMessageDetails, MessageNonce, MessagePayload, OutboundMessageDetails};
use pezbp_messages::{InboundMessageDetails, MessageNonce, MessagePayload, OutboundMessageDetails};
use pezsp_std::vec::Vec;
/// Implementation of the `To*OutboundLaneApi::message_details`.
@@ -19,11 +19,11 @@
#![cfg(feature = "runtime-benchmarks")]
use bp_messages::{
use pezbp_messages::{
source_chain::FromBridgedChainMessagesDeliveryProof,
target_chain::FromBridgedChainMessagesProof, MessagePayload,
};
use bp_pezkuwi_core::teyrchains::ParaHash;
use pezbp_pezkuwi_core::teyrchains::ParaHash;
use codec::Encode;
use pezbp_runtime::{AccountIdOf, Chain, HashOf, Teyrchain};
use pezframe_support::weights::Weight;
+4 -4
View File
@@ -20,13 +20,13 @@
#![cfg(test)]
#![allow(dead_code)]
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::{PayRewardFromAccount, RewardsAccountParams};
use bp_teyrchains::SingleParaStoredHeaderDataBuilder;
use pezbp_relayers::{PayRewardFromAccount, RewardsAccountParams};
use pezbp_teyrchains::SingleParaStoredHeaderDataBuilder;
use codec::Encode;
use pezbp_runtime::{messages::MessageDispatchResult, Chain, ChainId, Teyrchain};
use pezframe_support::{
@@ -20,8 +20,8 @@
use crate::messages_benchmarking::insert_header_to_grandpa_pallet;
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
use bp_teyrchains::{
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
use pezbp_teyrchains::{
teyrchain_head_storage_key_at_source, RelayBlockHash, RelayBlockHasher, RelayBlockNumber,
};
use codec::Encode;
@@ -1,5 +1,5 @@
[package]
name = "bp-bridge-hub-pezcumulus"
name = "pezbp-bridge-hub-pezcumulus"
description = "Primitives for BridgeHub teyrchain runtimes."
version = "0.7.0"
authors.workspace = true
@@ -17,8 +17,8 @@ workspace = true
[dependencies]
# Bridge Dependencies
bp-messages = { workspace = true }
bp-pezkuwi-core = { workspace = true }
pezbp-messages = { workspace = true }
pezbp-pezkuwi-core = { workspace = true }
pezbp-runtime = { workspace = true }
# Bizinikiwi Based Dependencies
@@ -34,8 +34,8 @@ pezkuwi-primitives = { workspace = true }
[features]
default = ["std"]
std = [
"bp-messages/std",
"bp-pezkuwi-core/std",
"pezbp-messages/std",
"pezbp-pezkuwi-core/std",
"pezbp-runtime/std",
"pezframe-support/std",
"pezframe-system/std",
@@ -45,8 +45,8 @@ std = [
"teyrchains-common/std",
]
runtime-benchmarks = [
"bp-messages/runtime-benchmarks",
"bp-pezkuwi-core/runtime-benchmarks",
"pezbp-messages/runtime-benchmarks",
"pezbp-pezkuwi-core/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
@@ -19,7 +19,7 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
pub use bp_pezkuwi_core::{
pub use pezbp_pezkuwi_core::{
AccountId, AccountInfoStorageMapKeyProvider, AccountPublic, Balance, BlockNumber, Hash, Hasher,
Hashing, Header, Nonce, Perbill, Signature, SignedBlock, UncheckedExtrinsic,
EXTRA_STORAGE_PROOF_SIZE, TX_EXTRA_BYTES,
@@ -30,8 +30,8 @@ pub use teyrchains_common::{
NORMAL_DISPATCH_RATIO, SLOT_DURATION,
};
use bp_messages::*;
use bp_pezkuwi_core::SuffixedCommonTransactionExtension;
use pezbp_messages::*;
use pezbp_pezkuwi_core::SuffixedCommonTransactionExtension;
use pezbp_runtime::extensions::{
BridgeRejectObsoleteHeadersAndMessages, RefundBridgedTeyrchainMessagesSchema,
};
@@ -1,5 +1,5 @@
[package]
name = "bp-pezkuwi-bulletin"
name = "pezbp-pezkuwi-bulletin"
description = "Primitives of Pezkuwi Bulletin chain runtime."
version = "0.4.0"
authors.workspace = true
@@ -20,9 +20,9 @@ codec = { features = ["derive"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
# Bridge Dependencies
bp-header-pez-chain = { workspace = true }
bp-messages = { workspace = true }
bp-pezkuwi-core = { workspace = true }
pezbp-header-pez-chain = { workspace = true }
pezbp-messages = { workspace = true }
pezbp-pezkuwi-core = { workspace = true }
pezbp-runtime = { workspace = true }
# Bizinikiwi Based Dependencies
@@ -35,9 +35,9 @@ pezsp-std = { workspace = true }
[features]
default = ["std"]
std = [
"bp-header-pez-chain/std",
"bp-messages/std",
"bp-pezkuwi-core/std",
"pezbp-header-pez-chain/std",
"pezbp-messages/std",
"pezbp-pezkuwi-core/std",
"codec/std",
"pezbp-runtime/std",
"pezframe-support/std",
@@ -48,9 +48,9 @@ std = [
"scale-info/std",
]
runtime-benchmarks = [
"bp-header-pez-chain/runtime-benchmarks",
"bp-messages/runtime-benchmarks",
"bp-pezkuwi-core/runtime-benchmarks",
"pezbp-header-pez-chain/runtime-benchmarks",
"pezbp-messages/runtime-benchmarks",
"pezbp-pezkuwi-core/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
@@ -19,8 +19,8 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
use bp_header_pez_chain::ChainWithGrandpa;
use bp_messages::{ChainWithMessages, MessageNonce};
use pezbp_header_pez_chain::ChainWithGrandpa;
use pezbp_messages::{ChainWithMessages, MessageNonce};
use codec::{Decode, DecodeWithMemTracking, Encode};
use pezbp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis,
@@ -43,7 +43,7 @@ use pezsp_runtime::{
use scale_info::TypeInfo;
// This chain reuses most of Pezkuwi primitives.
pub use bp_pezkuwi_core::{
pub use pezbp_pezkuwi_core::{
AccountAddress, AccountId, Balance, Block, BlockNumber, Hash, Hasher, Header, Nonce, Signature,
SignedBlock, UncheckedExtrinsic, AVERAGE_HEADER_SIZE, EXTRA_STORAGE_PROOF_SIZE,
MAX_MANDATORY_HEADER_SIZE, REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY,
@@ -225,4 +225,4 @@ impl ChainWithMessages for PezkuwiBulletin {
}
decl_bridge_finality_runtime_apis!(pezkuwi_bulletin, grandpa);
decl_bridge_messages_runtime_apis!(pezkuwi_bulletin, bp_messages::LegacyLaneId);
decl_bridge_messages_runtime_apis!(pezkuwi_bulletin, pezbp_messages::LegacyLaneId);
+5 -5
View File
@@ -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",
+15 -15
View File
@@ -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,
},
+2 -2
View File
@@ -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,
+1 -1
View File
@@ -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};
+5 -5
View File
@@ -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,
},
+7 -7
View File
@@ -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
+4 -4
View File
@@ -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,
},
);
+9 -9
View File
@@ -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,
);
}
+2 -2
View File
@@ -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, ()>;
+9 -9
View File
@@ -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,
+7 -7
View File
@@ -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,
};
+4 -4
View File
@@ -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>,
+2 -2
View File
@@ -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,
};
+7 -7
View File
@@ -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 -18
View File
@@ -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};
+5 -5
View File
@@ -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(&REGISTER_RELAYER, slash_destination);
// check if event emitted
assert_eq!(
+5 -5
View File
@@ -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;
+4 -4
View File
@@ -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;
+12 -12
View File
@@ -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(
+17 -17
View File
@@ -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,
+5 -5
View File
@@ -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);
+3 -3
View File
@@ -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,
+12 -12
View File
@@ -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;
+7 -7
View File
@@ -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>> {
@@ -9,7 +9,7 @@ license = "Apache-2.0"
categories = ["cryptography::cryptocurrencies"]
documentation.workspace = true
homepage = { workspace = true }
publish = false
publish = true
[lints]
workspace = true
@@ -44,7 +44,7 @@ pezsnowbridge-core = { workspace = true }
pezsnowbridge-inbound-queue-primitives = { workspace = true }
pezsnowbridge-pezpallet-inbound-queue-v2-fixtures = { optional = true, workspace = true }
bp-relayers = { workspace = true }
pezbp-relayers = { workspace = true }
[dev-dependencies]
hex-literal = { workspace = true, default-features = true }
@@ -56,7 +56,7 @@ pezsp-keyring = { workspace = true, default-features = true }
default = ["std"]
std = [
"alloy-core/std",
"bp-relayers/std",
"pezbp-relayers/std",
"codec/std",
"pezframe-benchmarking/std",
"pezframe-support/std",
@@ -78,7 +78,7 @@ std = [
"xcm/std",
]
runtime-benchmarks = [
"bp-relayers/runtime-benchmarks",
"pezbp-relayers/runtime-benchmarks",
"pezframe-benchmarking",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
@@ -9,7 +9,7 @@ license = "Apache-2.0"
categories = ["cryptography::cryptocurrencies"]
documentation.workspace = true
homepage = { workspace = true }
publish = false
publish = true
[lints]
workspace = true
@@ -36,7 +36,7 @@ mod mock;
mod test;
pub use crate::weights::WeightInfo;
use bp_relayers::RewardLedger;
use pezbp_relayers::RewardLedger;
use pezframe_system::ensure_signed;
use pezsnowbridge_core::{
reward::{AddTip, AddTipError},
@@ -9,7 +9,7 @@ license = "Apache-2.0"
categories = ["cryptography::cryptocurrencies"]
documentation.workspace = true
homepage = { workspace = true }
publish = false
publish = true
[lints]
workspace = true
@@ -36,7 +36,7 @@ pezsp-io = { workspace = true }
pezsp-runtime = { workspace = true }
pezsp-std = { workspace = true }
bp-relayers = { workspace = true }
pezbp-relayers = { workspace = true }
pezsnowbridge-beacon-primitives = { workspace = true }
pezsnowbridge-core = { workspace = true }
@@ -56,7 +56,7 @@ pezsnowbridge-test-utils = { workspace = true }
default = ["std"]
std = [
"alloy-core/std",
"bp-relayers/std",
"pezbp-relayers/std",
"codec/std",
"ethabi/std",
"pezframe-benchmarking/std",
@@ -80,7 +80,7 @@ std = [
"xcm/std",
]
runtime-benchmarks = [
"bp-relayers/runtime-benchmarks",
"pezbp-relayers/runtime-benchmarks",
"pezframe-benchmarking",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
@@ -71,7 +71,7 @@ use alloy_core::{
primitives::{Bytes, FixedBytes},
sol_types::SolValue,
};
use bp_relayers::RewardLedger;
use pezbp_relayers::RewardLedger;
use codec::{Decode, FullCodec};
use pezframe_support::{
storage::StorageStreamIter,
@@ -33,7 +33,7 @@ pezsp-io = { workspace = true }
pezsp-runtime = { workspace = true }
pezsp-std = { workspace = true }
bridge-hub-common = { workspace = true }
pezbridge-hub-common = { workspace = true }
ethabi = { workspace = true }
pezsnowbridge-core = { workspace = true }
@@ -46,7 +46,7 @@ pezpallet-message-queue = { workspace = true }
[features]
default = ["std"]
std = [
"bridge-hub-common/std",
"pezbridge-hub-common/std",
"codec/std",
"ethabi/std",
"pezframe-benchmarking/std",
@@ -65,7 +65,7 @@ std = [
"serde/std",
]
runtime-benchmarks = [
"bridge-hub-common/runtime-benchmarks",
"pezbridge-hub-common/runtime-benchmarks",
"pezframe-benchmarking",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
@@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
use super::*;
use bridge_hub_common::AggregateMessageOrigin;
use pezbridge_hub_common::AggregateMessageOrigin;
use codec::Encode;
use pezframe_benchmarking::v2::*;
use pezsnowbridge_core::ChannelId;
@@ -103,7 +103,7 @@ mod mock;
#[cfg(test)]
mod test;
use bridge_hub_common::AggregateMessageOrigin;
use pezbridge_hub_common::AggregateMessageOrigin;
use codec::Decode;
use pezframe_support::{
storage::StorageStreamIter,
@@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
//! Implementation for [`pezsnowbridge_outbound_queue_primitives::v1::SendMessage`]
use super::*;
use bridge_hub_common::AggregateMessageOrigin;
use pezbridge_hub_common::AggregateMessageOrigin;
use codec::Encode;
use pezframe_support::{
ensure,
@@ -36,12 +36,12 @@ pezsp-runtime = { workspace = true }
pezsp-std = { workspace = true }
xcm-executor = { workspace = true }
bp-relayers = { workspace = true }
pezbp-relayers = { workspace = true }
[features]
default = ["std"]
std = [
"bp-relayers/std",
"pezbp-relayers/std",
"codec/std",
"pezframe-support/std",
"pezframe-system/std",
@@ -60,7 +60,7 @@ std = [
]
serde = ["dep:serde", "scale-info/serde"]
runtime-benchmarks = [
"bp-relayers/runtime-benchmarks",
"pezbp-relayers/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
@@ -4,7 +4,7 @@
extern crate alloc;
use crate::reward::RewardPaymentError::{ChargeFeesFailure, XcmSendFailure};
use bp_relayers::PaymentProcedure;
use pezbp_relayers::PaymentProcedure;
use codec::DecodeWithMemTracking;
use pezframe_support::{dispatch::GetDispatchInfo, PalletError};
use pezsp_runtime::{
@@ -37,7 +37,7 @@ pezsnowbridge-beacon-primitives = { workspace = true }
pezsnowbridge-core = { workspace = true }
pezsnowbridge-verification-primitives = { workspace = true }
assets-common = { workspace = true }
pez-assets-common = { workspace = true }
hex-literal = { workspace = true, default-features = true }
@@ -48,7 +48,7 @@ pezsnowbridge-test-utils = { workspace = true }
default = ["std"]
std = [
"alloy-core/std",
"assets-common/std",
"pez-assets-common/std",
"codec/std",
"pezframe-support/std",
"pezframe-system/std",
@@ -66,7 +66,7 @@ std = [
"xcm/std",
]
runtime-benchmarks = [
"assets-common/runtime-benchmarks",
"pez-assets-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezsnowbridge-beacon-primitives/runtime-benchmarks",
@@ -80,7 +80,6 @@ runtime-benchmarks = [
"xcm/runtime-benchmarks",
]
try-runtime = [
"assets-common/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
"pezsp-runtime/try-runtime",
@@ -275,7 +275,7 @@ where
claimer: Location,
) -> Xcm<()> {
let bridge_owner_bytes: [u8; 32] = bridge_owner.into();
let reserve_data = assets_common::local_and_foreign_assets::ForeignAssetReserveData {
let reserve_data = pez_assets_common::local_and_foreign_assets::ForeignAssetReserveData {
reserve: Location::new(2, [GlobalConsensus(EthereumNetwork::get())]),
teleportable: false,
};
@@ -17,7 +17,7 @@ workspace = true
exclude-from-umbrella = true
[dependencies]
bp-relayers = { workspace = true, default-features = true }
pezbp-relayers = { workspace = true, default-features = true }
codec = { workspace = true, default-features = true }
pezframe-benchmarking = { optional = true, workspace = true, default-features = true }
pezframe-support = { workspace = true, default-features = true }
@@ -35,7 +35,7 @@ xcm-executor = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"bp-relayers/runtime-benchmarks",
"pezbp-relayers/runtime-benchmarks",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
use bp_relayers::{PaymentProcedure, RewardLedger, RewardsAccountOwner, RewardsAccountParams};
use pezbp_relayers::{PaymentProcedure, RewardLedger, RewardsAccountOwner, RewardsAccountParams};
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use pezframe_support::{parameter_types, pezpallet_prelude::DispatchResult, pezsp_runtime};
use scale_info::TypeInfo;
@@ -34,7 +34,7 @@ impl PaymentProcedure<pezsp_runtime::AccountId32, RewardsAccountParams<u64>, u12
type Beneficiary = Location;
fn pay_reward(
_who: &pezsp_runtime::AccountId32,
_reward_params: bp_relayers::RewardsAccountParams<u64>,
_reward_params: pezbp_relayers::RewardsAccountParams<u64>,
_reward_balance: u128,
_beneficiary: Self::Beneficiary,
) -> Result<(), Self::Error> {
+1 -1
View File
@@ -1,5 +1,5 @@
[package]
name = "bp-beefy"
name = "pezbp-beefy"
description = "Primitives of pezpallet-bridge-beefy module."
version = "0.1.0"
authors.workspace = true
@@ -1,5 +1,5 @@
[package]
name = "bp-header-pez-chain"
name = "pezbp-header-pez-chain"
description = "A common interface for describing what a bridge pezpallet should be able to do."
version = "0.7.0"
authors.workspace = true
@@ -29,7 +29,7 @@ pezsp-runtime = { features = ["serde"], workspace = true }
pezsp-std = { workspace = true }
[dev-dependencies]
bp-test-utils = { workspace = true, default-features = true }
# bp-test-utils = { workspace = true, default-features = true }
hex = { workspace = true, default-features = true }
hex-literal = { workspace = true, default-features = true }
@@ -48,7 +48,7 @@ std = [
"serde/std",
]
runtime-benchmarks = [
"bp-test-utils/runtime-benchmarks",
# "pezbp-test-utils/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-consensus-grandpa/runtime-benchmarks",
@@ -21,11 +21,11 @@
//! Some of tests in this module may partially duplicate tests from `justification.rs`,
//! but their purpose is different.
use bp_header_pez_chain::justification::{
use pezbp_header_pez_chain::justification::{
verify_justification, GrandpaJustification, JustificationVerificationContext,
JustificationVerificationError, PrecommitError,
};
use bp_test_utils::{
use pezbp_test_utils::{
header_id, make_justification_for_header, signed_precommit, test_header, Account,
JustificationGeneratorParams, ALICE, BOB, CHARLIE, DAVE, EVE, FERDIE, TEST_GRANDPA_SET_ID,
};
@@ -38,11 +38,11 @@ type TestHash = <TestHeader as HeaderT>::Hash;
type TestNumber = <TestHeader as HeaderT>::Number;
/// Implementation of `finality_grandpa::Chain` that is used in tests.
struct AncestryChain(bp_header_pez_chain::justification::AncestryChain<TestHeader>);
struct AncestryChain(pezbp_header_pez_chain::justification::AncestryChain<TestHeader>);
impl AncestryChain {
fn new(justification: &GrandpaJustification<TestHeader>) -> Self {
Self(bp_header_pez_chain::justification::AncestryChain::new(justification).0)
Self(pezbp_header_pez_chain::justification::AncestryChain::new(justification).0)
}
}
@@ -16,8 +16,8 @@
//! Tests for Grandpa equivocations collector code.
use bp_header_pez_chain::justification::EquivocationsCollector;
use bp_test_utils::*;
use pezbp_header_pez_chain::justification::EquivocationsCollector;
use pezbp_test_utils::*;
use finality_grandpa::Precommit;
use pezsp_consensus_grandpa::EquivocationProof;
@@ -16,8 +16,8 @@
//! Tests for Grandpa Justification optimizer code.
use bp_header_pez_chain::justification::verify_and_optimize_justification;
use bp_test_utils::*;
use pezbp_header_pez_chain::justification::verify_and_optimize_justification;
use pezbp_test_utils::*;
use finality_grandpa::SignedPrecommit;
use pezsp_consensus_grandpa::AuthoritySignature;
@@ -43,7 +43,7 @@ fn optimizer_does_noting_with_minimal_justification() {
fn unknown_authority_votes_are_removed_by_optimizer() {
let mut justification = make_default_justification::<TestHeader>(&test_header(1));
justification.commit.precommits.push(signed_precommit::<TestHeader>(
&bp_test_utils::Account(42),
&pezbp_test_utils::Account(42),
header_id::<TestHeader>(1),
justification.round,
TEST_GRANDPA_SET_ID,
@@ -16,11 +16,11 @@
//! Tests for Grandpa strict justification verifier code.
use bp_header_pez_chain::justification::{
use pezbp_header_pez_chain::justification::{
required_justification_precommits, verify_justification, JustificationVerificationContext,
JustificationVerificationError, PrecommitError,
};
use bp_test_utils::*;
use pezbp_test_utils::*;
type TestHeader = pezsp_runtime::testing::Header;
+4 -4
View File
@@ -1,5 +1,5 @@
[package]
name = "bp-messages"
name = "pezbp-messages"
description = "Primitives of messages module."
version = "0.7.0"
authors.workspace = true
@@ -18,7 +18,7 @@ scale-info = { features = ["bit-vec", "derive"], workspace = true }
serde = { features = ["alloc", "derive"], workspace = true }
# Bridge dependencies
bp-header-pez-chain = { workspace = true }
pezbp-header-pez-chain = { workspace = true }
pezbp-runtime = { workspace = true }
# Bizinikiwi Dependencies
@@ -34,7 +34,7 @@ hex-literal = { workspace = true, default-features = true }
[features]
default = ["std"]
std = [
"bp-header-pez-chain/std",
"pezbp-header-pez-chain/std",
"codec/std",
"pezbp-runtime/std",
"pezframe-support/std",
@@ -45,7 +45,7 @@ std = [
"serde/std",
]
runtime-benchmarks = [
"bp-header-pez-chain/runtime-benchmarks",
"pezbp-header-pez-chain/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",
+1 -1
View File
@@ -19,7 +19,7 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
use bp_header_pez_chain::HeaderChainError;
use pezbp_header_pez_chain::HeaderChainError;
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use pezbp_runtime::{
messages::MessageDispatchResult, BasicOperatingMode, Chain, OperatingMode, RangeInclusiveExt,
@@ -1,5 +1,5 @@
[package]
name = "bp-pezkuwi-core"
name = "pezbp-pezkuwi-core"
description = "Primitives of Pezkuwi-like runtime."
version = "0.7.0"
authors.workspace = true
@@ -20,7 +20,7 @@ serde = { optional = true, features = [
], workspace = true, default-features = true }
# Bridge Dependencies
bp-messages = { workspace = true }
pezbp-messages = { workspace = true }
pezbp-runtime = { workspace = true }
# Bizinikiwi Based Dependencies
@@ -36,7 +36,7 @@ hex = { workspace = true, default-features = true }
[features]
default = ["std"]
std = [
"bp-messages/std",
"pezbp-messages/std",
"codec/std",
"pezbp-runtime/std",
"pezframe-support/std",
@@ -48,7 +48,7 @@ std = [
"serde",
]
runtime-benchmarks = [
"bp-messages/runtime-benchmarks",
"pezbp-messages/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
@@ -19,7 +19,7 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
use bp_messages::MessageNonce;
use pezbp_messages::MessageNonce;
use pezbp_runtime::{
self,
extensions::{
+10 -10
View File
@@ -1,5 +1,5 @@
[package]
name = "bp-relayers"
name = "pezbp-relayers"
description = "Primitives of relayers module."
version = "0.7.0"
authors.workspace = true
@@ -17,9 +17,9 @@ codec = { features = ["bit-vec", "derive"], workspace = true }
scale-info = { features = ["bit-vec", "derive"], workspace = true }
# Bridge Dependencies
bp-header-pez-chain = { workspace = true }
bp-messages = { workspace = true }
bp-teyrchains = { workspace = true }
pezbp-header-pez-chain = { workspace = true }
pezbp-messages = { workspace = true }
pezbp-teyrchains = { workspace = true }
pezbp-runtime = { workspace = true }
# Bizinikiwi Dependencies
@@ -35,9 +35,9 @@ hex-literal = { workspace = true, default-features = true }
[features]
default = ["std"]
std = [
"bp-header-pez-chain/std",
"bp-messages/std",
"bp-teyrchains/std",
"pezbp-header-pez-chain/std",
"pezbp-messages/std",
"pezbp-teyrchains/std",
"codec/std",
"pezbp-runtime/std",
"pezframe-support/std",
@@ -48,9 +48,9 @@ std = [
"scale-info/std",
]
runtime-benchmarks = [
"bp-header-pez-chain/runtime-benchmarks",
"bp-messages/runtime-benchmarks",
"bp-teyrchains/runtime-benchmarks",
"pezbp-header-pez-chain/runtime-benchmarks",
"pezbp-messages/runtime-benchmarks",
"pezbp-teyrchains/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
@@ -17,9 +17,9 @@
//! All runtime calls, supported by `pezpallet-bridge-relayers` when it acts as a signed
//! extension.
use bp_header_pez_chain::SubmitFinalityProofInfo;
use bp_messages::MessagesCallInfo;
use bp_teyrchains::SubmitTeyrchainHeadsInfo;
use pezbp_header_pez_chain::SubmitFinalityProofInfo;
use pezbp_messages::MessagesCallInfo;
use pezbp_teyrchains::SubmitTeyrchainHeadsInfo;
use codec::{Decode, Encode};
use pezbp_runtime::StaticStrProvider;
use pezframe_support::{
+1 -1
View File
@@ -222,7 +222,7 @@ pub trait RewardLedger<Relayer, Reward, RewardBalance> {
#[cfg(test)]
mod tests {
use super::*;
use bp_messages::{HashedLaneId, LaneIdType, LegacyLaneId};
use pezbp_messages::{HashedLaneId, LaneIdType, LegacyLaneId};
use pezsp_runtime::{app_crypto::Ss58Codec, testing::H256};
#[test]
+6 -6
View File
@@ -363,7 +363,7 @@ macro_rules! decl_bridge_finality_runtime_apis {
}
};
($chain: ident, grandpa) => {
decl_bridge_finality_runtime_apis!($chain, grandpa => bp_header_pez_chain::StoredHeaderGrandpaInfo<Header>);
decl_bridge_finality_runtime_apis!($chain, grandpa => pezbp_header_pez_chain::StoredHeaderGrandpaInfo<Header>);
};
}
@@ -409,9 +409,9 @@ macro_rules! decl_bridge_messages_runtime_apis {
/// be missing from the resulting vector. The vector is ordered by the nonce.
fn message_details(
lane: $lane_id_type,
begin: bp_messages::MessageNonce,
end: bp_messages::MessageNonce,
) -> $crate::private::Vec<bp_messages::OutboundMessageDetails>;
begin: pezbp_messages::MessageNonce,
end: pezbp_messages::MessageNonce,
) -> $crate::private::Vec<pezbp_messages::OutboundMessageDetails>;
}
/// Inbound message lane API for messages sent by this chain.
@@ -425,8 +425,8 @@ macro_rules! decl_bridge_messages_runtime_apis {
/// Return details of given inbound messages.
fn message_details(
lane: $lane_id_type,
messages: $crate::private::Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>,
) -> $crate::private::Vec<bp_messages::InboundMessageDetails>;
messages: $crate::private::Vec<(pezbp_messages::MessagePayload, pezbp_messages::OutboundMessageDetails)>,
) -> $crate::private::Vec<pezbp_messages::InboundMessageDetails>;
}
}
}
+10 -10
View File
@@ -1,5 +1,5 @@
[package]
name = "bp-test-utils"
name = "pezbp-test-utils"
version = "0.7.0"
description = "Utilities for testing bizinikiwi-based runtime bridge code"
authors.workspace = true
@@ -13,9 +13,9 @@ homepage = { workspace = true }
workspace = true
[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 }
codec = { workspace = true }
ed25519-dalek = { workspace = true }
finality-grandpa = { workspace = true }
@@ -30,9 +30,9 @@ pezsp-trie = { workspace = 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",
"ed25519-dalek/std",
"finality-grandpa/std",
@@ -45,9 +45,9 @@ std = [
"pezsp-trie/std",
]
runtime-benchmarks = [
"bp-header-pez-chain/runtime-benchmarks",
"bp-pezkuwi-core/runtime-benchmarks",
"bp-teyrchains/runtime-benchmarks",
"pezbp-header-pez-chain/runtime-benchmarks",
"pezbp-pezkuwi-core/runtime-benchmarks",
"pezbp-teyrchains/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezsp-consensus-grandpa/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
@@ -16,7 +16,7 @@
//! Utilities for working with test accounts.
use bp_header_pez_chain::{justification::JustificationVerificationContext, AuthoritySet};
use pezbp_header_pez_chain::{justification::JustificationVerificationContext, AuthoritySet};
use codec::Encode;
use ed25519_dalek::{Signature, SigningKey, VerifyingKey};
use finality_grandpa::voter_set::VoterSet;
+3 -3
View File
@@ -19,9 +19,9 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
use bp_header_pez_chain::justification::{required_justification_precommits, GrandpaJustification};
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
use bp_teyrchains::teyrchain_head_storage_key_at_source;
use pezbp_header_pez_chain::justification::{required_justification_precommits, GrandpaJustification};
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
use pezbp_teyrchains::teyrchain_head_storage_key_at_source;
use codec::Encode;
use pezbp_runtime::record_all_trie_keys;
use pezsp_consensus_grandpa::{AuthorityId, AuthoritySignature, AuthorityWeight, SetId};
+7 -7
View File
@@ -1,5 +1,5 @@
[package]
name = "bp-teyrchains"
name = "pezbp-teyrchains"
description = "Primitives of teyrchains module."
version = "0.7.0"
authors.workspace = true
@@ -18,8 +18,8 @@ impl-trait-for-tuples = { workspace = true }
scale-info = { features = ["derive"], workspace = true }
# Bridge dependencies
bp-header-pez-chain = { workspace = true }
bp-pezkuwi-core = { workspace = true }
pezbp-header-pez-chain = { workspace = true }
pezbp-pezkuwi-core = { workspace = true }
pezbp-runtime = { workspace = true }
# Bizinikiwi dependencies
@@ -31,8 +31,8 @@ pezsp-std = { workspace = true }
[features]
default = ["std"]
std = [
"bp-header-pez-chain/std",
"bp-pezkuwi-core/std",
"pezbp-header-pez-chain/std",
"pezbp-pezkuwi-core/std",
"codec/std",
"pezbp-runtime/std",
"pezframe-support/std",
@@ -42,8 +42,8 @@ std = [
"scale-info/std",
]
runtime-benchmarks = [
"bp-header-pez-chain/runtime-benchmarks",
"bp-pezkuwi-core/runtime-benchmarks",
"pezbp-header-pez-chain/runtime-benchmarks",
"pezbp-pezkuwi-core/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
@@ -18,7 +18,7 @@
use crate::{ParaHash, ParaId, RelayBlockHash, RelayBlockNumber};
use bp_pezkuwi_core::teyrchains::ParaHeadsProof;
use pezbp_pezkuwi_core::teyrchains::ParaHeadsProof;
use codec::{Decode, Encode};
use pezbp_runtime::HeaderId;
use pezsp_runtime::RuntimeDebug;
+5 -5
View File
@@ -19,10 +19,10 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
pub use bp_header_pez_chain::StoredHeaderData;
pub use pezbp_header_pez_chain::StoredHeaderData;
pub use call_info::{BridgeTeyrchainCall, SubmitTeyrchainHeadsInfo};
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaId};
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaId};
use codec::{Decode, Encode, MaxEncodedLen};
use pezbp_runtime::{
BlockNumberOf, Chain, HashOf, HeaderOf, StorageDoubleMapKeyProvider, StorageMapKeyProvider,
@@ -35,11 +35,11 @@ use pezsp_std::{marker::PhantomData, prelude::*};
use scale_info::TypeInfo;
/// Block hash of the bridged relay chain.
pub type RelayBlockHash = bp_pezkuwi_core::Hash;
pub type RelayBlockHash = pezbp_pezkuwi_core::Hash;
/// Block number of the bridged relay chain.
pub type RelayBlockNumber = bp_pezkuwi_core::BlockNumber;
pub type RelayBlockNumber = pezbp_pezkuwi_core::BlockNumber;
/// Hasher of the bridged relay chain.
pub type RelayBlockHasher = bp_pezkuwi_core::Hasher;
pub type RelayBlockHasher = pezbp_pezkuwi_core::Hasher;
mod call_info;
@@ -1,7 +1,7 @@
[package]
name = "bp-xcm-bridge-hub-router"
name = "pezbp-xcm-bridge-hub-router"
description = "Primitives of the xcm-bridge-hub fee pezpallet."
version = "0.6.0"
version = "0.7.0"
authors.workspace = true
edition.workspace = true
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
@@ -1,5 +1,5 @@
[package]
name = "bp-xcm-bridge-hub"
name = "pezbp-xcm-bridge-hub"
description = "Primitives of the xcm-bridge-hub pezpallet."
version = "0.2.0"
authors.workspace = true
@@ -18,7 +18,7 @@ scale-info = { features = ["derive"], workspace = true }
serde = { features = ["alloc", "derive"], workspace = true }
# Bridge Dependencies
bp-messages = { workspace = true }
pezbp-messages = { workspace = true }
pezbp-runtime = { workspace = true }
# Bizinikiwi Dependencies
@@ -33,7 +33,7 @@ xcm = { workspace = true }
[features]
default = ["std"]
std = [
"bp-messages/std",
"pezbp-messages/std",
"codec/std",
"pezbp-runtime/std",
"pezframe-support/std",
@@ -45,7 +45,7 @@ std = [
"xcm/std",
]
runtime-benchmarks = [
"bp-messages/runtime-benchmarks",
"pezbp-messages/runtime-benchmarks",
"pezbp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",

Some files were not shown because too many files have changed in this diff Show More