chore: regenerate umbrella crate, fix feature propagation
This commit is contained in:
@@ -29,8 +29,8 @@ use bp_messages::{
|
||||
InboundLaneData, LaneState, MessageNonce, OutboundLaneData, UnrewardedRelayer,
|
||||
UnrewardedRelayersState,
|
||||
};
|
||||
use pezbp_runtime::{AccountIdOf, HashOf, UnverifiedStorageProofParams};
|
||||
use codec::Decode;
|
||||
use pezbp_runtime::{AccountIdOf, HashOf, UnverifiedStorageProofParams};
|
||||
use pezframe_benchmarking::{account, v2::*};
|
||||
use pezframe_support::weights::Weight;
|
||||
use pezframe_system::RawOrigin;
|
||||
|
||||
@@ -23,11 +23,11 @@ use bp_messages::{
|
||||
ChainWithMessages, DeliveredMessages, InboundLaneData, LaneState, MessageKey, MessageNonce,
|
||||
OutboundLaneData, ReceptionResult, UnrewardedRelayer,
|
||||
};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use codec::{Decode, Encode, EncodeLike, MaxEncodedLen};
|
||||
use scale_info::{Type, TypeInfo};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use pezsp_runtime::RuntimeDebug;
|
||||
use pezsp_std::prelude::PartialEq;
|
||||
use scale_info::{Type, TypeInfo};
|
||||
|
||||
/// Inbound lane storage.
|
||||
pub trait InboundLaneStorage {
|
||||
|
||||
@@ -24,11 +24,11 @@ use bp_messages::{
|
||||
target_chain::MessageDispatch, ChainWithMessages, InboundLaneData, LaneState, MessageKey,
|
||||
MessageNonce, OutboundLaneData,
|
||||
};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use pezframe_support::{ensure, pezsp_runtime::RuntimeDebug, PalletError};
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_std::marker::PhantomData;
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
/// Lanes manager errors.
|
||||
#[derive(
|
||||
@@ -183,9 +183,9 @@ impl<T: Config<I>, I: 'static> RuntimeInboundLaneStorage<T, I> {
|
||||
/// maximal configured.
|
||||
///
|
||||
/// Maximal inbound lane state set size is configured by the
|
||||
/// `MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX` constant from the pezpallet configuration. The PoV
|
||||
/// of the call includes the maximal size of inbound lane state. If the actual size is smaller,
|
||||
/// we may subtract extra bytes from this component.
|
||||
/// `MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX` constant from the pezpallet configuration. The
|
||||
/// PoV of the call includes the maximal size of inbound lane state. If the actual size is
|
||||
/// smaller, we may subtract extra bytes from this component.
|
||||
pub fn extra_proof_size_bytes(&self) -> u64 {
|
||||
let max_encoded_len = StoredInboundLaneData::<T, I>::max_encoded_len();
|
||||
let relayers_count = self.data().relayers.len();
|
||||
|
||||
@@ -64,11 +64,11 @@ use bp_messages::{
|
||||
MessageNonce, MessagePayload, MessagesOperatingMode, OutboundLaneData, OutboundMessageDetails,
|
||||
UnrewardedRelayersState, VerificationError,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::{
|
||||
AccountIdOf, BasicOperatingMode, HashOf, OwnedBridgeModule, PreComputedSize, RangeInclusiveExt,
|
||||
Size,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezframe_support::{dispatch::PostDispatchInfo, ensure, fail, traits::Get, DefaultNoBound};
|
||||
use pezsp_std::{marker::PhantomData, prelude::*};
|
||||
|
||||
@@ -677,7 +677,8 @@ pub struct SendMessageArgs<T: Config<I>, I: 'static> {
|
||||
payload: StoredMessagePayload<T, I>,
|
||||
}
|
||||
|
||||
impl<T, I> bp_messages::source_chain::MessagesBridge<T::OutboundPayload, T::LaneId> for Pezpallet<T, I>
|
||||
impl<T, I> bp_messages::source_chain::MessagesBridge<T::OutboundPayload, T::LaneId>
|
||||
for Pezpallet<T, I>
|
||||
where
|
||||
T: Config<I>,
|
||||
I: 'static,
|
||||
|
||||
@@ -31,8 +31,8 @@ pub mod v0 {
|
||||
use super::Config;
|
||||
use crate::BridgedChainOf;
|
||||
use bp_messages::{MessageNonce, UnrewardedRelayer};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::AccountIdOf;
|
||||
use pezsp_std::collections::vec_deque::VecDeque;
|
||||
|
||||
#[derive(Encode, Decode, Clone, PartialEq, Eq)]
|
||||
@@ -107,7 +107,9 @@ pub mod v1 {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::DispatchError> {
|
||||
fn post_upgrade(
|
||||
state: pezsp_std::vec::Vec<u8>,
|
||||
) -> Result<(), pezsp_runtime::DispatchError> {
|
||||
use codec::Decode;
|
||||
const LOG_TARGET: &str = "runtime::bridge-messages-migration";
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ use bp_messages::{
|
||||
};
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode};
|
||||
use pezframe_support::{traits::Get, BoundedVec, PalletError};
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_runtime::RuntimeDebug;
|
||||
use pezsp_std::{collections::vec_deque::VecDeque, marker::PhantomData, ops::RangeInclusive};
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
/// Outbound lane storage.
|
||||
pub trait OutboundLaneStorage {
|
||||
|
||||
@@ -25,10 +25,10 @@ use bp_messages::{
|
||||
ChainWithMessages, InboundLaneData, Message, MessageKey, MessageNonce, MessagePayload,
|
||||
OutboundLaneData, VerificationError,
|
||||
};
|
||||
use codec::Decode;
|
||||
use pezbp_runtime::{
|
||||
HashOf, HasherOf, RangeInclusiveExt, RawStorageProof, StorageProofChecker, StorageProofError,
|
||||
};
|
||||
use codec::Decode;
|
||||
use pezsp_std::vec::Vec;
|
||||
|
||||
/// 'Parsed' message delivery proof - inbound lane id and its state.
|
||||
@@ -218,8 +218,8 @@ mod tests {
|
||||
|
||||
use bp_header_pez_chain::{HeaderChainError, StoredHeaderDataBuilder};
|
||||
use bp_messages::LaneState;
|
||||
use pezbp_runtime::{HeaderId, StorageProofError};
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{HeaderId, StorageProofError};
|
||||
use pezsp_runtime::traits::Header;
|
||||
|
||||
fn using_messages_proof<R>(
|
||||
|
||||
@@ -20,11 +20,11 @@ use bp_messages::{
|
||||
storage_keys, ChainWithMessages, InboundLaneData, MessageKey, MessageNonce, MessagePayload,
|
||||
OutboundLaneData,
|
||||
};
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{
|
||||
grow_storage_value, record_all_trie_keys, AccountIdOf, Chain, HashOf, HasherOf,
|
||||
RawStorageProof, UnverifiedStorageProofParams,
|
||||
};
|
||||
use codec::Encode;
|
||||
use pezsp_std::{ops::RangeInclusive, prelude::*};
|
||||
use pezsp_trie::{trie_types::TrieDBMutBuilderV1, LayoutV1, MemoryDB, TrieMut};
|
||||
|
||||
|
||||
@@ -39,21 +39,21 @@ use bp_messages::{
|
||||
Message, MessageKey, MessageNonce, OutboundLaneData, UnrewardedRelayer,
|
||||
UnrewardedRelayersState,
|
||||
};
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode};
|
||||
use pezbp_runtime::{
|
||||
messages::MessageDispatchResult, Chain, ChainId, Size, UnverifiedStorageProofParams,
|
||||
};
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode};
|
||||
use pezframe_support::{
|
||||
derive_impl,
|
||||
weights::{constants::RocksDbWeight, Weight},
|
||||
};
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_core::H256;
|
||||
use pezsp_runtime::{
|
||||
testing::Header as BizinikiwiHeader,
|
||||
traits::{BlakeTwo256, ConstU32},
|
||||
BuildStorage, StateVersion,
|
||||
};
|
||||
use scale_info::TypeInfo;
|
||||
use std::{collections::VecDeque, ops::RangeInclusive};
|
||||
|
||||
pub type AccountId = u64;
|
||||
@@ -354,7 +354,8 @@ impl TestMessageDispatch {
|
||||
|
||||
pub fn emulate_enqueued_message(lane: TestLaneIdType) {
|
||||
let key = (b"dispatched", lane).encode();
|
||||
let dispatched = pezframe_support::storage::unhashed::get_or_default::<MessageNonce>(&key[..]);
|
||||
let dispatched =
|
||||
pezframe_support::storage::unhashed::get_or_default::<MessageNonce>(&key[..]);
|
||||
pezframe_support::storage::unhashed::put(&key[..], &(dispatched + 1));
|
||||
}
|
||||
}
|
||||
@@ -460,7 +461,9 @@ pub fn inbound_unrewarded_relayers_state(lane: TestLaneIdType) -> UnrewardedRela
|
||||
|
||||
/// Return test externalities to use in tests.
|
||||
pub fn new_test_ext() -> pezsp_io::TestExternalities {
|
||||
let mut t = pezframe_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();
|
||||
let mut t = pezframe_system::GenesisConfig::<TestRuntime>::default()
|
||||
.build_storage()
|
||||
.unwrap();
|
||||
pezpallet_balances::GenesisConfig::<TestRuntime> {
|
||||
balances: vec![(ENDOWED_ACCOUNT, 1_000_000)],
|
||||
..Default::default()
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
tests::mock::{RuntimeEvent as TestEvent, *},
|
||||
weights_ext::WeightInfoExt,
|
||||
Call, Config, Error, Event, InboundLanes, LanesManagerError, OutboundLanes, OutboundMessages,
|
||||
Pezpallet, PalletOperatingMode, PalletOwner, StoredInboundLaneData,
|
||||
PalletOperatingMode, PalletOwner, Pezpallet, StoredInboundLaneData,
|
||||
};
|
||||
|
||||
use bp_messages::{
|
||||
@@ -34,9 +34,9 @@ use bp_messages::{
|
||||
OutboundLaneData, OutboundMessageDetails, UnrewardedRelayer, UnrewardedRelayersState,
|
||||
VerificationError,
|
||||
};
|
||||
use pezbp_runtime::{BasicOperatingMode, PreComputedSize, RangeInclusiveExt, Size};
|
||||
use bp_test_utils::generate_owned_bridge_module_tests;
|
||||
use codec::Encode;
|
||||
use pezbp_runtime::{BasicOperatingMode, PreComputedSize, RangeInclusiveExt, Size};
|
||||
use pezframe_support::{
|
||||
assert_err, assert_noop, assert_ok,
|
||||
dispatch::Pays,
|
||||
@@ -248,7 +248,10 @@ fn send_message_rejects_too_large_message() {
|
||||
.extra
|
||||
.extend_from_slice(&vec![0u8; max_outbound_payload_size as usize]);
|
||||
assert_noop!(
|
||||
Pezpallet::<TestRuntime, ()>::validate_message(test_lane_id(), &message_payload.clone(),),
|
||||
Pezpallet::<TestRuntime, ()>::validate_message(
|
||||
test_lane_id(),
|
||||
&message_payload.clone(),
|
||||
),
|
||||
Error::<TestRuntime, ()>::MessageRejectedByPallet(VerificationError::MessageTooLarge),
|
||||
);
|
||||
|
||||
|
||||
@@ -284,8 +284,8 @@ pub trait WeightInfoExt: WeightInfo {
|
||||
// storage values that are read during the call. So we may ignore the weight of this check.
|
||||
//
|
||||
// However, during (2) we read and update storage values of other pallets
|
||||
// (`pezpallet-bridge-relayers` and balances/assets pezpallet). So we need to add this weight to the
|
||||
// weight of our call. Hence two following methods.
|
||||
// (`pezpallet-bridge-relayers` and balances/assets pezpallet). So we need to add this weight to
|
||||
// the weight of our call. Hence two following methods.
|
||||
|
||||
/// Extra weight that is added to the `receive_messages_proof` call weight by signed extensions
|
||||
/// that are declared at runtime level.
|
||||
|
||||
Reference in New Issue
Block a user