FAZ 1 Complete: Workspace compile fixes, warning cleanup, version bumps
- Fixed is_using_frame_crate() macro to check for pezframe/pezkuwi_sdk - Removed disable_pezframe_system_supertrait_check temporary bypasses - Feature-gated storage-benchmark and teyrchain-benchmarks code - Fixed dead_code warnings with underscore prefix (_Header) - Removed unused imports and shadowing use statements - Version bumps: procedural-tools 10.0.1, benchmarking-cli 32.0.1, docs 0.0.2, minimal-runtime 0.0.1, yet-another-teyrchain 0.6.1, umbrella 0.1.2 - Updated MAINNET_ROADMAP.md with FAZ 1 completion status
This commit is contained in:
@@ -20,7 +20,7 @@ serde = { optional = true, workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-beefy = { workspace = true }
|
||||
pezbp-beefy = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
|
||||
# Bizinikiwi Dependencies
|
||||
@@ -31,7 +31,7 @@ pezsp-runtime = { workspace = true }
|
||||
pezsp-std = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-test-utils = { workspace = true, default-features = true }
|
||||
pezbp-test-utils = { workspace = true, default-features = true }
|
||||
mmr-lib = { workspace = true, default-features = true }
|
||||
pezpallet-beefy-mmr = { workspace = true, default-features = true }
|
||||
pezpallet-mmr = { workspace = true, default-features = true }
|
||||
@@ -42,7 +42,7 @@ rand = { workspace = true, default-features = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-beefy/std",
|
||||
"pezbp-beefy/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-support/std",
|
||||
@@ -62,8 +62,8 @@ try-runtime = [
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-beefy/runtime-benchmarks",
|
||||
"bp-test-utils/runtime-benchmarks",
|
||||
"pezbp-beefy/runtime-benchmarks",
|
||||
"pezbp-test-utils/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#![warn(missing_docs)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use bp_beefy::{ChainWithBeefy, InitializationData};
|
||||
use pezbp_beefy::{ChainWithBeefy, InitializationData};
|
||||
use pezsp_std::{boxed::Box, prelude::*};
|
||||
|
||||
// Re-export in crate namespace for `construct_runtime!`
|
||||
@@ -57,29 +57,29 @@ pub type BridgedBlockHash<T, I> = pezbp_runtime::HashOf<BridgedChain<T, I>>;
|
||||
|
||||
/// Pezpallet initialization data.
|
||||
pub type InitializationDataOf<T, I> =
|
||||
InitializationData<BridgedBlockNumber<T, I>, bp_beefy::MmrHashOf<BridgedChain<T, I>>>;
|
||||
InitializationData<BridgedBlockNumber<T, I>, pezbp_beefy::MmrHashOf<BridgedChain<T, I>>>;
|
||||
/// BEEFY commitment hasher, used by configured bridged chain.
|
||||
pub type BridgedBeefyCommitmentHasher<T, I> = bp_beefy::BeefyCommitmentHasher<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyCommitmentHasher<T, I> = pezbp_beefy::BeefyCommitmentHasher<BridgedChain<T, I>>;
|
||||
/// BEEFY validator id, used by configured bridged chain.
|
||||
pub type BridgedBeefyAuthorityId<T, I> = bp_beefy::BeefyAuthorityIdOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyAuthorityId<T, I> = pezbp_beefy::BeefyAuthorityIdOf<BridgedChain<T, I>>;
|
||||
/// BEEFY validator set, used by configured bridged chain.
|
||||
pub type BridgedBeefyAuthoritySet<T, I> = bp_beefy::BeefyAuthoritySetOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyAuthoritySet<T, I> = pezbp_beefy::BeefyAuthoritySetOf<BridgedChain<T, I>>;
|
||||
/// BEEFY authority set, used by configured bridged chain.
|
||||
pub type BridgedBeefyAuthoritySetInfo<T, I> = bp_beefy::BeefyAuthoritySetInfoOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyAuthoritySetInfo<T, I> = pezbp_beefy::BeefyAuthoritySetInfoOf<BridgedChain<T, I>>;
|
||||
/// BEEFY signed commitment, used by configured bridged chain.
|
||||
pub type BridgedBeefySignedCommitment<T, I> = bp_beefy::BeefySignedCommitmentOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefySignedCommitment<T, I> = pezbp_beefy::BeefySignedCommitmentOf<BridgedChain<T, I>>;
|
||||
/// MMR hashing algorithm, used by configured bridged chain.
|
||||
pub type BridgedMmrHashing<T, I> = bp_beefy::MmrHashingOf<BridgedChain<T, I>>;
|
||||
pub type BridgedMmrHashing<T, I> = pezbp_beefy::MmrHashingOf<BridgedChain<T, I>>;
|
||||
/// MMR hashing output type of `BridgedMmrHashing<T, I>`.
|
||||
pub type BridgedMmrHash<T, I> = bp_beefy::MmrHashOf<BridgedChain<T, I>>;
|
||||
pub type BridgedMmrHash<T, I> = pezbp_beefy::MmrHashOf<BridgedChain<T, I>>;
|
||||
/// The type of the MMR leaf extra data used by the configured bridged chain.
|
||||
pub type BridgedBeefyMmrLeafExtra<T, I> = bp_beefy::BeefyMmrLeafExtraOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyMmrLeafExtra<T, I> = pezbp_beefy::BeefyMmrLeafExtraOf<BridgedChain<T, I>>;
|
||||
/// BEEFY MMR proof type used by the pezpallet
|
||||
pub type BridgedMmrProof<T, I> = bp_beefy::MmrProofOf<BridgedChain<T, I>>;
|
||||
pub type BridgedMmrProof<T, I> = pezbp_beefy::MmrProofOf<BridgedChain<T, I>>;
|
||||
/// MMR leaf type, used by configured bridged chain.
|
||||
pub type BridgedBeefyMmrLeaf<T, I> = bp_beefy::BeefyMmrLeafOf<BridgedChain<T, I>>;
|
||||
pub type BridgedBeefyMmrLeaf<T, I> = pezbp_beefy::BeefyMmrLeafOf<BridgedChain<T, I>>;
|
||||
/// Imported commitment data, stored by the pezpallet.
|
||||
pub type ImportedCommitment<T, I> = bp_beefy::ImportedCommitment<
|
||||
pub type ImportedCommitment<T, I> = pezbp_beefy::ImportedCommitment<
|
||||
BridgedBlockNumber<T, I>,
|
||||
BridgedBlockHash<T, I>,
|
||||
BridgedMmrHash<T, I>,
|
||||
@@ -415,7 +415,7 @@ pub mod pezpallet {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use bp_test_utils::generate_owned_bridge_module_tests;
|
||||
use pezbp_test_utils::generate_owned_bridge_module_tests;
|
||||
use mock::*;
|
||||
use mock_chain::*;
|
||||
use pezbp_runtime::{BasicOperatingMode, OwnedBridgeModuleError};
|
||||
@@ -565,7 +565,7 @@ mod tests {
|
||||
let imported_commitment = ImportedCommitments::<TestRuntime>::get(58).unwrap();
|
||||
assert_eq!(
|
||||
imported_commitment,
|
||||
bp_beefy::ImportedCommitment {
|
||||
pezbp_beefy::ImportedCommitment {
|
||||
parent_number_and_hash: (57, chain.header(57).header.hash()),
|
||||
mmr_root: chain.header(58).mmr_root,
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
BridgedMmrHash, BridgedMmrHashing, BridgedMmrProof,
|
||||
};
|
||||
|
||||
use bp_beefy::{BeefyValidatorSignatureOf, ChainWithBeefy, Commitment, MmrDataOrHash};
|
||||
use pezbp_beefy::{BeefyValidatorSignatureOf, ChainWithBeefy, Commitment, MmrDataOrHash};
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{BasicOperatingMode, Chain, ChainId};
|
||||
use pezframe_support::{construct_runtime, derive_impl, weights::Weight};
|
||||
@@ -126,7 +126,7 @@ pub fn run_test_with_initialize<T>(initial_validators_count: u32, test: impl FnO
|
||||
|
||||
crate::Pezpallet::<TestRuntime>::initialize(
|
||||
RuntimeOrigin::root(),
|
||||
bp_beefy::InitializationData {
|
||||
pezbp_beefy::InitializationData {
|
||||
operating_mode: BasicOperatingMode::Normal,
|
||||
best_block_number: 0,
|
||||
authority_set,
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
utils::get_authorities_mmr_root,
|
||||
};
|
||||
|
||||
use bp_beefy::{BeefyPayload, Commitment, ValidatorSetId, MMR_ROOT_PAYLOAD_ID};
|
||||
use pezbp_beefy::{BeefyPayload, Commitment, ValidatorSetId, MMR_ROOT_PAYLOAD_ID};
|
||||
use codec::Encode;
|
||||
use pezpallet_mmr::NodeIndex;
|
||||
use pezsp_consensus_beefy::mmr::{BeefyNextAuthoritySet, MmrLeafVersion};
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::{
|
||||
BridgedBeefyMmrLeaf, BridgedBeefySignedCommitment, BridgedChain, BridgedMmrHash,
|
||||
BridgedMmrHashing, BridgedMmrProof, Config, Error, LOG_TARGET,
|
||||
};
|
||||
use bp_beefy::{merkle_root, verify_mmr_leaves_proof, BeefyAuthorityId, MmrDataOrHash};
|
||||
use pezbp_beefy::{merkle_root, verify_mmr_leaves_proof, BeefyAuthorityId, MmrDataOrHash};
|
||||
use codec::Encode;
|
||||
use pezframe_support::ensure;
|
||||
use pezsp_runtime::traits::{Convert, Hash};
|
||||
@@ -12,7 +12,7 @@ use pezsp_std::{vec, vec::Vec};
|
||||
type BridgedMmrDataOrHash<T, I> = MmrDataOrHash<BridgedMmrHashing<T, I>, BridgedBeefyMmrLeaf<T, I>>;
|
||||
/// A way to encode validator id to the BEEFY merkle tree leaf.
|
||||
type BridgedBeefyAuthorityIdToMerkleLeaf<T, I> =
|
||||
bp_beefy::BeefyAuthorityIdToMerkleLeafOf<BridgedChain<T, I>>;
|
||||
pezbp_beefy::BeefyAuthorityIdToMerkleLeafOf<BridgedChain<T, I>>;
|
||||
|
||||
/// Get the MMR root for a collection of validators.
|
||||
pub(crate) fn get_authorities_mmr_root<
|
||||
@@ -100,7 +100,7 @@ fn extract_mmr_root<T: Config<I>, I: 'static>(
|
||||
commitment
|
||||
.commitment
|
||||
.payload
|
||||
.get_decoded(&bp_beefy::MMR_ROOT_PAYLOAD_ID)
|
||||
.get_decoded(&pezbp_beefy::MMR_ROOT_PAYLOAD_ID)
|
||||
.ok_or(Error::MmrRootMissingFromCommitment)
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ pub(crate) fn verify_beefy_mmr_leaf<T: Config<I>, I: 'static>(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{mock::*, mock_chain::*, *};
|
||||
use bp_beefy::{BeefyPayload, MMR_ROOT_PAYLOAD_ID};
|
||||
use pezbp_beefy::{BeefyPayload, MMR_ROOT_PAYLOAD_ID};
|
||||
use pezframe_support::{assert_noop, assert_ok};
|
||||
use pezsp_consensus_beefy::ValidatorSet;
|
||||
|
||||
@@ -350,7 +350,7 @@ mod tests {
|
||||
assert_eq!(CurrentAuthoritySetInfo::<TestRuntime>::get().len, 30);
|
||||
assert_eq!(
|
||||
ImportedCommitments::<TestRuntime>::get(1).unwrap(),
|
||||
bp_beefy::ImportedCommitment {
|
||||
pezbp_beefy::ImportedCommitment {
|
||||
parent_number_and_hash: (0, [0; 32].into()),
|
||||
mmr_root: header.mmr_root,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user