Skip to content

Commit

Permalink
revert bad auto merge
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed May 30, 2023
1 parent 86dcdc1 commit 0ccb058
Show file tree
Hide file tree
Showing 25 changed files with 21 additions and 247 deletions.
5 changes: 2 additions & 3 deletions pallets/dmp-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ pub struct ConfigData {
impl Default for ConfigData {
fn default() -> Self {
Self {
// For beacon checkpoint to work require a bigger default
max_individual: Weight::from_parts(
20u64 * 10u64 * WEIGHT_REF_TIME_PER_MILLIS, // 200 ms of execution time maximum by default
10u64 * DEFAULT_POV_SIZE, // 640 KB of proof size by default
10u64 * WEIGHT_REF_TIME_PER_MILLIS, // 10 ms of execution time maximum by default
DEFAULT_POV_SIZE, // 64 KB of proof size by default
),
}
}
Expand Down
1 change: 0 additions & 1 deletion parachains/runtimes/assets/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

pub mod foreign_creators;
pub mod fungible_conversion;
pub mod location_conversion;
pub mod matching;
pub mod runtime_api;

Expand Down
152 changes: 0 additions & 152 deletions parachains/runtimes/assets/common/src/location_conversion.rs

This file was deleted.

22 changes: 0 additions & 22 deletions parachains/runtimes/assets/common/src/matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,3 @@ impl<SelfGlobalConsensus: Get<NetworkId>> ContainsPair<MultiAsset, MultiLocation
}
}
}

/// Accepts an asset if it is from different global consensus than self plus `parents > 1`
pub struct IsDifferentGlobalConsensusConcreteAsset<SelfGlobalConsensus>(
sp_std::marker::PhantomData<SelfGlobalConsensus>,
);
impl<SelfGlobalConsensus: Get<NetworkId>> ContainsPair<MultiAsset, MultiLocation>
for IsDifferentGlobalConsensusConcreteAsset<SelfGlobalConsensus>
{
fn contains(asset: &MultiAsset, origin: &MultiLocation) -> bool {
log::trace!(target: "xcm::contains", "IsDifferentGlobalConsensusConcreteAsset asset: {:?}, origin: {:?}", asset, origin);
match asset {
MultiAsset { id: Concrete(asset_location), .. } if asset_location.parents > 1 =>
match asset_location.first_interior() {
Some(GlobalConsensus(asset_consensus))
if asset_consensus != &SelfGlobalConsensus::get() =>
true,
_ => false,
},
_ => false,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into()))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// Storage: Proxy Proxies (r:1 w:1)
/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
/// The range of component `p` is `[1, 31]`.
fn create_pure(_p: u32, ) -> Weight {
fn create_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `139`
// Estimated: `4706`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(0, 2647).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2662).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2647).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2662).saturating_mul(m.into()))
}
/// Storage: Uniques Asset (r:1 w:1)
/// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
/// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn set_metadata(n: u32, s: u32, ) -> Weight {
fn set_metadata(_n: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3675`
Expand Down Expand Up @@ -334,7 +334,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
/// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn force_set_metadata(n: u32, s: u32, ) -> Weight {
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3675`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(c.into()))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
Weight::from_parts(11_977_075, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 1
.saturating_add(Weight::from_parts(608, 0).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(493, 0).saturating_mul(z.into()))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(0, 2647).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2662).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2662).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 2647).saturating_mul(a.into()))
}
/// Storage: Uniques Asset (r:1 w:1)
/// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen)
Expand Down
3 changes: 1 addition & 2 deletions parachains/runtimes/assets/statemint/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,7 @@ asset_test_utils::include_teleports_for_foreign_assets_works!(
Ok(RuntimeEvent::XcmpQueue(event)) => Some(event),
_ => None,
}
}),
1000
})
);

asset_test_utils::include_asset_transactor_transfer_with_local_consensus_currency_works!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(c.into()))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(0, 2647).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2662).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2662).saturating_mul(m.into()))
}
/// Storage: Uniques Asset (r:1 w:1)
/// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen)
Expand Down
36 changes: 0 additions & 36 deletions parachains/runtimes/assets/westmint/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,42 +610,6 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p
})
);

asset_test_utils::include_can_governance_change_bridge_transfer_in_configuration!(
Runtime,
XcmConfig,
asset_test_utils::CollatorSessionKeys::new(
AccountId::from(ALICE),
AccountId::from(ALICE),
SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }
),
Box::new(|call| RuntimeCall::BridgeTransfer(call).encode()),
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::BridgeTransfer(event)) => Some(event),
_ => None,
}
})
);

asset_test_utils::include_receive_reserve_asset_deposited_from_different_consensus_works!(
Runtime,
XcmConfig,
LocationToAccountId,
ForeignAssetsInstance,
asset_test_utils::CollatorSessionKeys::new(
AccountId::from(ALICE),
AccountId::from(ALICE),
SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }
),
ExistentialDeposit::get(),
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event),
_ => None,
}
})
);

#[test]
fn can_governance_change_bridge_transfer_out_configuration() {
asset_test_utils::test_cases::can_governance_change_bridge_transfer_out_configuration::<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(c.into()))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into()))
}
}
5 changes: 1 addition & 4 deletions parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ use parachains_common::{
};
use xcm_executor::XcmExecutor;

pub const LOG_TARGET: &str = "runtime::bridge-hub";

/// The address format for describing accounts.
pub type Address = MultiAddress<AccountId, ()>;

Expand Down Expand Up @@ -293,8 +291,7 @@ impl pallet_transaction_payment::Config for Runtime {

parameter_types! {
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
// For beacon checkpoint to work require a bigger default
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT;
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
}

impl cumulus_pallet_parachain_system::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2602).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(c.into()))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// Storage: Proxy Proxies (r:1 w:1)
/// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen)
/// The range of component `p` is `[1, 31]`.
fn create_pure(_p: u32, ) -> Weight {
fn create_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `139`
// Estimated: `4706`
Expand Down
Loading

0 comments on commit 0ccb058

Please sign in to comment.