chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
+3 -3
View File
@@ -35,16 +35,16 @@ pub use pezsp_consensus_beefy::{
ValidatorSetId, BEEFY_ENGINE_ID,
};
use pezbp_runtime::{BasicOperatingMode, BlockNumberOf, Chain, HashOf};
use codec::{Decode, Encode};
use pezbp_runtime::{BasicOperatingMode, BlockNumberOf, Chain, HashOf};
use pezframe_support::Parameter;
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use pezsp_runtime::{
traits::{Convert, MaybeSerializeDeserialize},
RuntimeAppPublic, RuntimeDebug,
};
use pezsp_std::prelude::*;
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
/// Bizinikiwi-based chain with BEEFY && MMR pallets deployed.
///
@@ -18,13 +18,13 @@
use crate::{justification, InitializationData};
use pezbp_runtime::HeaderOf;
use codec::{Decode, Encode};
use pezbp_runtime::HeaderOf;
use pezframe_support::{weights::Weight, RuntimeDebugNoBound};
use scale_info::TypeInfo;
use pezsp_consensus_grandpa::SetId;
use pezsp_runtime::traits::{Header as HeaderT, Zero};
use pezsp_std::{boxed::Box, fmt::Debug};
use scale_info::TypeInfo;
/// A minimized version of `pezpallet-bridge-grandpa::Call` that can be used without a runtime.
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
@@ -30,12 +30,12 @@ pub use verification::{
PrecommitError,
};
use pezbp_runtime::{BlockNumberOf, Chain, HashOf, HeaderId};
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use pezbp_runtime::{BlockNumberOf, Chain, HashOf, HeaderId};
use pezsp_consensus_grandpa::{AuthorityId, AuthoritySignature};
use pezsp_runtime::{traits::Header as HeaderT, RuntimeDebug, SaturatedConversion};
use pezsp_std::prelude::*;
use scale_info::TypeInfo;
/// A GRANDPA Justification is a proof that a given header was finalized
/// at a certain height and with a certain set of authorities.
@@ -22,8 +22,8 @@ pub mod strict;
use crate::{justification::GrandpaJustification, AuthoritySet};
use pezbp_runtime::HeaderId;
use finality_grandpa::voter_set::VoterSet;
use pezbp_runtime::HeaderId;
use pezsp_consensus_grandpa::{AuthorityId, AuthoritySignature, SetId};
use pezsp_runtime::{traits::Header as HeaderT, RuntimeDebug};
use pezsp_std::{
@@ -23,20 +23,20 @@
use crate::justification::{
GrandpaJustification, JustificationVerificationContext, JustificationVerificationError,
};
use codec::{Codec, Decode, DecodeWithMemTracking, Encode, EncodeLike, MaxEncodedLen};
use core::{clone::Clone, cmp::Eq, default::Default, fmt::Debug};
use pezbp_runtime::{
BasicOperatingMode, BlockNumberOf, Chain, HashOf, HasherOf, HeaderOf, RawStorageProof,
StorageProofChecker, StorageProofError, UnderlyingChainProvider,
};
use codec::{Codec, Decode, DecodeWithMemTracking, Encode, EncodeLike, MaxEncodedLen};
use core::{clone::Clone, cmp::Eq, default::Default, fmt::Debug};
use pezframe_support::PalletError;
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use pezsp_consensus_grandpa::{
AuthorityList, ConsensusLog, ScheduledChange, SetId, GRANDPA_ENGINE_ID,
};
use pezsp_runtime::{traits::Header as HeaderT, Digest, RuntimeDebug, SaturatedConversion};
use pezsp_std::{boxed::Box, vec::Vec};
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
pub use call_info::{BridgeGrandpaCall, BridgeGrandpaCallOf, SubmitFinalityProofInfo};
@@ -251,8 +251,8 @@ pub trait FindEquivocations<FinalityProof, FinalityVerificationContext, Equivoca
/// Keep in mind that teyrchains are relying on relay chain GRANDPA, so they should not implement
/// this trait.
pub trait ChainWithGrandpa: Chain {
/// Name of the bridge GRANDPA pezpallet (used in `construct_runtime` macro call) that is deployed
/// at some other chain to bridge with this `ChainWithGrandpa`.
/// Name of the bridge GRANDPA pezpallet (used in `construct_runtime` macro call) that is
/// deployed at some other chain to bridge with this `ChainWithGrandpa`.
///
/// We assume that all chains that are bridging with this `ChainWithGrandpa` are using
/// the same name.
@@ -20,9 +20,9 @@ use crate::{MessageNonce, UnrewardedRelayersState};
use codec::{Decode, Encode};
use pezframe_support::weights::Weight;
use scale_info::TypeInfo;
use pezsp_core::RuntimeDebug;
use pezsp_std::ops::RangeInclusive;
use scale_info::TypeInfo;
/// A minimized version of `pezpallet-bridge-messages::Call` that can be used without a runtime.
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
+2 -2
View File
@@ -17,11 +17,11 @@
//! Primitives of messages module, that represents lane id.
use codec::{Codec, Decode, DecodeWithMemTracking, Encode, EncodeLike, MaxEncodedLen};
use scale_info::TypeInfo;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use pezsp_core::{RuntimeDebug, TypeId, H256};
use pezsp_io::hashing::blake2_256;
use pezsp_std::fmt::Debug;
use scale_info::TypeInfo;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
/// Trait representing a generic `LaneId` type.
pub trait LaneIdType:
+3 -3
View File
@@ -20,19 +20,19 @@
#![cfg_attr(not(feature = "std"), no_std)]
use bp_header_pez_chain::HeaderChainError;
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use pezbp_runtime::{
messages::MessageDispatchResult, BasicOperatingMode, Chain, OperatingMode, RangeInclusiveExt,
StorageProofError, UnderlyingChainOf, UnderlyingChainProvider,
};
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use pezframe_support::PalletError;
// Weight is reexported to avoid additional pezframe-support dependencies in related crates.
pub use pezframe_support::weights::Weight;
use pezsp_core::RuntimeDebug;
use pezsp_std::{collections::vec_deque::VecDeque, ops::RangeInclusive, prelude::*};
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use source_chain::RelayersRewards;
use pezsp_core::RuntimeDebug;
use pezsp_std::{collections::vec_deque::VecDeque, ops::RangeInclusive, prelude::*};
pub use call_info::{
BaseMessagesProofInfo, BridgeMessagesCall, MessagesCallInfo, ReceiveMessagesDeliveryProofInfo,
@@ -18,15 +18,15 @@
use crate::{MessageNonce, UnrewardedRelayer};
use pezbp_runtime::{raw_storage_proof_size, RawStorageProof, Size};
use codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use pezbp_runtime::{raw_storage_proof_size, RawStorageProof, Size};
use pezsp_core::RuntimeDebug;
use pezsp_std::{
collections::{btree_map::BTreeMap, vec_deque::VecDeque},
fmt::Debug,
ops::RangeInclusive,
};
use scale_info::TypeInfo;
/// Messages delivery proof from the bridged chain.
///
@@ -18,12 +18,14 @@
use crate::{Message, MessageKey, MessageNonce, MessagePayload, OutboundLaneData};
use pezbp_runtime::{messages::MessageDispatchResult, raw_storage_proof_size, RawStorageProof, Size};
use codec::{Decode, DecodeWithMemTracking, Encode, Error as CodecError};
use pezbp_runtime::{
messages::MessageDispatchResult, raw_storage_proof_size, RawStorageProof, Size,
};
use pezframe_support::weights::Weight;
use scale_info::TypeInfo;
use pezsp_core::RuntimeDebug;
use pezsp_std::{fmt::Debug, marker::PhantomData, prelude::*};
use scale_info::TypeInfo;
/// Messages proof from bridged chain.
///
@@ -22,12 +22,12 @@
//! teyrchains. Having pallets that are referencing pezkuwi, would mean that there may
//! be two versions of pezkuwi crates included in the runtime. Which is bad.
use pezbp_runtime::{raw_storage_proof_size, RawStorageProof, Size};
use codec::{CompactAs, Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use pezbp_runtime::{raw_storage_proof_size, RawStorageProof, Size};
use pezsp_core::Hasher;
use pezsp_runtime::RuntimeDebug;
use pezsp_std::vec::Vec;
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
@@ -19,9 +19,9 @@
use bp_header_pez_chain::SubmitFinalityProofInfo;
use bp_messages::MessagesCallInfo;
use pezbp_runtime::StaticStrProvider;
use bp_teyrchains::SubmitTeyrchainHeadsInfo;
use codec::{Decode, Encode};
use pezbp_runtime::StaticStrProvider;
use pezframe_support::{
dispatch::CallableCallFor, traits::IsSubType, weights::Weight, RuntimeDebugNoBound,
};
+1 -1
View File
@@ -27,13 +27,13 @@ pub use registration::{ExplicitOrAccountParams, Registration, StakeAndSlash};
use pezbp_runtime::{ChainId, StorageDoubleMapKeyProvider};
use pezframe_support::{traits::tokens::Preservation, Blake2_128Concat, Identity};
use scale_info::TypeInfo;
use pezsp_runtime::{
codec::{Codec, Decode, DecodeWithMemTracking, Encode, EncodeLike, MaxEncodedLen},
traits::AccountIdConversion,
TypeId,
};
use pezsp_std::{fmt::Debug, marker::PhantomData};
use scale_info::TypeInfo;
mod extension;
mod registration;
@@ -40,11 +40,11 @@
use crate::{PayRewardFromAccount, RewardsAccountParams};
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use pezsp_runtime::{
traits::{Get, IdentifyAccount, Zero},
DispatchError, DispatchResult,
};
use scale_info::TypeInfo;
/// Either explicit account reference or `RewardsAccountParams`.
#[derive(Clone, Debug)]
+1 -1
View File
@@ -17,8 +17,8 @@
use crate::{ChainId, HeaderIdProvider};
use codec::{Codec, Decode, Encode, MaxEncodedLen};
use pezframe_support::{weights::Weight, Parameter};
use num_traits::{AsPrimitive, Bounded, CheckedSub, Saturating, SaturatingAdd, Zero};
use pezframe_support::{weights::Weight, Parameter};
use pezsp_runtime::{
traits::{
AtLeast32Bit, AtLeast32BitUnsigned, Hash as HashT, Header as HeaderT, MaybeDisplay,
@@ -18,13 +18,13 @@
use codec::{Compact, Decode, DecodeWithMemTracking, Encode};
use impl_trait_for_tuples::impl_for_tuples;
use scale_info::{StaticTypeInfo, TypeInfo};
use pezsp_runtime::{
impl_tx_ext_default,
traits::{Dispatchable, TransactionExtension},
transaction_validity::TransactionValidityError,
};
use pezsp_std::{fmt::Debug, marker::PhantomData};
use scale_info::{StaticTypeInfo, TypeInfo};
/// Trait that describes some properties of a `TransactionExtension` that are needed in order to
/// send a transaction to the chain.
+11 -9
View File
@@ -24,22 +24,22 @@ use pezframe_support::{
pezpallet_prelude::DispatchResult, weights::Weight, PalletError, StorageHasher, StorageValue,
};
use pezframe_system::RawOrigin;
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use pezsp_core::storage::StorageKey;
use pezsp_runtime::{
traits::{BadOrigin, Header as HeaderT, UniqueSaturatedInto},
RuntimeDebug,
};
use pezsp_std::{fmt::Debug, ops::RangeInclusive, vec, vec::Vec};
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
pub use chain::{
AccountIdOf, AccountPublicOf, BalanceOf, BlockNumberOf, Chain, EncodedOrDecodedCall, HashOf,
HasherOf, HeaderOf, NonceOf, SignatureOf, Teyrchain, TeyrchainIdOf, TransactionEraOf,
UnderlyingChainOf, UnderlyingChainProvider, __private,
};
pub use pezframe_support::storage::storage_prefix as storage_value_final_key;
use num_traits::{CheckedAdd, CheckedSub, One, SaturatingAdd, Zero};
pub use pezframe_support::storage::storage_prefix as storage_value_final_key;
#[cfg(feature = "std")]
pub use storage_proof::craft_valid_storage_proof;
#[cfg(feature = "test-helpers")]
@@ -205,8 +205,10 @@ impl<BlockNumber: Copy + UniqueSaturatedInto<u64>, BlockHash: Copy>
TransactionEra::Immortal => pezsp_runtime::generic::Era::immortal(),
// `unique_saturated_into` is fine here - mortality `u64::MAX` is not something we
// expect to see on any chain
TransactionEra::Mortal(header_id, period) =>
pezsp_runtime::generic::Era::mortal(period as _, header_id.0.unique_saturated_into()),
TransactionEra::Mortal(header_id, period) => pezsp_runtime::generic::Era::mortal(
period as _,
header_id.0.unique_saturated_into(),
),
}
}
@@ -437,10 +439,10 @@ pub trait OwnedBridgeModule<T: pezframe_system::Config> {
Ok(())
}
/// Pezpallet owner has a right to halt all module operations and then resume it. If it is `None`,
/// then there are no direct ways to halt/resume module operations, but other runtime methods
/// may still be used to do that (i.e. democracy::referendum to update halt flag directly
/// or call the `set_operating_mode`).
/// Pezpallet owner has a right to halt all module operations and then resume it. If it is
/// `None`, then there are no direct ways to halt/resume module operations, but other runtime
/// methods may still be used to do that (i.e. democracy::referendum to update halt flag
/// directly or call the `set_operating_mode`).
fn module_owner() -> Option<T::AccountId> {
Self::OwnerStorage::get()
}
@@ -18,8 +18,8 @@
use codec::{Decode, DecodeWithMemTracking, Encode};
use pezframe_support::weights::Weight;
use scale_info::TypeInfo;
use pezsp_runtime::RuntimeDebug;
use scale_info::TypeInfo;
/// Message dispatch result.
#[derive(Encode, Decode, DecodeWithMemTracking, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)]
@@ -25,9 +25,9 @@ use pezsp_trie::{
use codec::{Decode, DecodeWithMemTracking, Encode};
use hash_db::{HashDB, Hasher, EMPTY_PREFIX};
use scale_info::TypeInfo;
#[cfg(feature = "test-helpers")]
use pezsp_trie::{recorder_ext::RecorderExt, Recorder, TrieDBBuilder, TrieError, TrieHash};
use scale_info::TypeInfo;
#[cfg(feature = "test-helpers")]
use trie_db::{Trie, TrieConfiguration, TrieDBMut};
@@ -336,7 +336,8 @@ pub mod tests_for_storage_proof_checker {
// checking proof against invalid commitment fails
assert_eq!(
<StorageProofChecker<pezsp_core::Blake2Hasher>>::new(pezsp_core::H256::random(), proof).err(),
<StorageProofChecker<pezsp_core::Blake2Hasher>>::new(pezsp_core::H256::random(), proof)
.err(),
Some(StorageProofError::StorageRootMismatch)
);
}
@@ -19,9 +19,9 @@
use codec::{Decode, Encode, MaxEncodedLen};
use pezframe_support::traits::Get;
use scale_info::{Type, TypeInfo};
use pezsp_runtime::RuntimeDebug;
use pezsp_std::{marker::PhantomData, ops::Deref};
use scale_info::{Type, TypeInfo};
/// Error that is returned when the value size exceeds maximal configured size.
#[derive(RuntimeDebug)]
+5 -2
View File
@@ -21,9 +21,9 @@
use bp_header_pez_chain::justification::{required_justification_precommits, GrandpaJustification};
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
use pezbp_runtime::record_all_trie_keys;
use bp_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};
use pezsp_runtime::traits::{Header as HeaderT, One, Zero};
use pezsp_std::prelude::*;
@@ -162,7 +162,10 @@ fn generate_chain<H: HeaderT>(fork_id: u32, depth: u32, ancestor: &H) -> Vec<H>
// Modifying the digest so headers at the same height but in different forks have different
// hashes
header.digest_mut().logs.push(pezsp_runtime::DigestItem::Other(fork_id.encode()));
header
.digest_mut()
.logs
.push(pezsp_runtime::DigestItem::Other(fork_id.encode()));
headers.push(header);
}
@@ -19,11 +19,11 @@
use crate::{ParaHash, ParaId, RelayBlockHash, RelayBlockNumber};
use bp_pezkuwi_core::teyrchains::ParaHeadsProof;
use pezbp_runtime::HeaderId;
use codec::{Decode, Encode};
use scale_info::TypeInfo;
use pezbp_runtime::HeaderId;
use pezsp_runtime::RuntimeDebug;
use pezsp_std::vec::Vec;
use scale_info::TypeInfo;
/// A minimized version of `pezpallet-bridge-teyrchains::Call` that can be used without a runtime.
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
+11 -5
View File
@@ -23,16 +23,16 @@ pub use bp_header_pez_chain::StoredHeaderData;
pub use call_info::{BridgeTeyrchainCall, SubmitTeyrchainHeadsInfo};
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaId};
use codec::{Decode, Encode, MaxEncodedLen};
use pezbp_runtime::{
BlockNumberOf, Chain, HashOf, HeaderOf, StorageDoubleMapKeyProvider, StorageMapKeyProvider,
Teyrchain,
};
use codec::{Decode, Encode, MaxEncodedLen};
use pezframe_support::{weights::Weight, Blake2_128Concat, Twox64Concat};
use scale_info::TypeInfo;
use pezsp_core::storage::StorageKey;
use pezsp_runtime::{traits::Header as HeaderT, RuntimeDebug};
use pezsp_std::{marker::PhantomData, prelude::*};
use scale_info::TypeInfo;
/// Block hash of the bridged relay chain.
pub type RelayBlockHash = bp_pezkuwi_core::Hash;
@@ -75,7 +75,11 @@ pub fn teyrchain_head_storage_key_at_source(
paras_pallet_name: &str,
para_id: ParaId,
) -> StorageKey {
pezbp_runtime::storage_map_final_key::<Twox64Concat>(paras_pallet_name, "Heads", &para_id.encode())
pezbp_runtime::storage_map_final_key::<Twox64Concat>(
paras_pallet_name,
"Heads",
&para_id.encode(),
)
}
/// Can be use to access the runtime storage key of the teyrchains info at the target chain.
@@ -92,7 +96,8 @@ impl StorageMapKeyProvider for ParasInfoKeyProvider {
/// Can be use to access the runtime storage key of the teyrchain head at the target chain.
///
/// The head is stored by the `pezpallet-bridge-teyrchains` pezpallet in the `ImportedParaHeads` map.
/// The head is stored by the `pezpallet-bridge-teyrchains` pezpallet in the `ImportedParaHeads`
/// map.
pub struct ImportedParaHeadsKeyProvider;
impl StorageDoubleMapKeyProvider for ImportedParaHeadsKeyProvider {
const MAP_NAME: &'static str = "ImportedParaHeads";
@@ -108,7 +113,8 @@ impl StorageDoubleMapKeyProvider for ImportedParaHeadsKeyProvider {
/// `pezbp_runtime::StoredHeaderData` structure.
///
/// We do not know exact structure of the teyrchain head, so we always store encoded version
/// of the `pezbp_runtime::StoredHeaderData`. It is only decoded when we talk about specific teyrchain.
/// of the `pezbp_runtime::StoredHeaderData`. It is only decoded when we talk about specific
/// teyrchain.
#[derive(Clone, Decode, Encode, PartialEq, RuntimeDebug, TypeInfo)]
pub struct ParaStoredHeaderData(pub Vec<u8>);
@@ -19,9 +19,9 @@
#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use pezsp_core::H256;
use pezsp_runtime::{FixedU128, RuntimeDebug};
use scale_info::TypeInfo;
use xcm::latest::prelude::Location;
/// Minimal delivery fee factor.
@@ -57,7 +57,8 @@ impl Default for BridgeState {
}
}
/// A minimized version of `pezpallet-xcm-bridge-hub-router::Call` that can be used without a runtime.
/// A minimized version of `pezpallet-xcm-bridge-hub-router::Call` that can be used without a
/// runtime.
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum XcmBridgeHubRouterCall {
@@ -18,8 +18,8 @@
use bp_messages::MessageNonce;
use codec::{Decode, Encode};
use scale_info::TypeInfo;
use pezsp_std::boxed::Box;
use scale_info::TypeInfo;
use xcm::prelude::VersionedInteriorLocation;
/// A minimized version of `pezpallet_xcm_bridge_hub::Call` that can be used without a runtime.
@@ -20,18 +20,18 @@
#![cfg_attr(not(feature = "std"), no_std)]
use bp_messages::LaneIdType;
use pezbp_runtime::{AccountIdOf, BalanceOf, Chain};
pub use call_info::XcmBridgeHubCall;
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use pezbp_runtime::{AccountIdOf, BalanceOf, Chain};
use pezframe_support::{
ensure, pezsp_runtime::RuntimeDebug, CloneNoBound, PalletError, PartialEqNoBound,
RuntimeDebugNoBound,
};
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use pezsp_core::H256;
use pezsp_io::hashing::blake2_256;
use pezsp_std::boxed::Box;
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use xcm::{
latest::prelude::*, prelude::XcmVersion, IntoVersion, VersionedInteriorLocation,
VersionedLocation,