Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.1.0 #222

Merged
merged 2 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pallets/processor/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use super::*;

use frame_benchmarking::v2::*;
use frame_support::{assert_ok, traits::fungible::Mutate};
use frame_support::assert_ok;
use frame_system::RawOrigin;
use pallet_broker::{CoreMask, RegionId, RegionRecord};
use sp_runtime::SaturatedConversion;
Expand Down Expand Up @@ -71,6 +71,9 @@ mod benchmarks {
let para_id: ParaId = 2000.into();

let region_id = RegionId { begin: 0, core: 0, mask: CoreMask::complete() };
let record: RegionRecordOf<T> = RegionRecord { end: 8, owner: caller.clone(), paid: None };
T::Regions::create_region(region_id, record, caller.clone())?;

crate::RegionAssignments::<T>::insert(&region_id, para_id);

#[extrinsic_call]
Expand Down
4 changes: 2 additions & 2 deletions runtime/cocos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("regionx-parachain"),
impl_name: create_runtime_str!("regionx-parachain"),
authoring_version: 1,
spec_version: 1_000_001,
spec_version: 1_001_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -801,7 +801,7 @@ impl pallet_processor::Config for Runtime {
type RegionAssigner = XcmRegionAssigner<Self, LocationToAccountId, OwnParaId, FeeBuffer>;
type CoretimeChain = CoretimeChainLocation;
type WeightToFee = parachains_common::rococo::fee::WeightToFee;
type WeightInfo = ();
type WeightInfo = weights::pallet_processor::WeightInfo<Runtime>;
}

// Create the runtime by composing the FRAME pallets that were previously configured.
Expand Down
1 change: 1 addition & 0 deletions runtime/cocos/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub mod pallet_conviction_voting_native_conviction_voting;
pub mod pallet_market;
pub mod pallet_multisig;
pub mod pallet_orders;
pub mod pallet_processor;
pub mod pallet_proxy;
pub mod pallet_regions;
pub mod pallet_session;
Expand Down
31 changes: 18 additions & 13 deletions runtime/cocos/src/weights/pallet_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! Autogenerated weights for `pallet_processor`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-26, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-08-04, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `cocos-instance-1`, CPU: `Intel(R) Xeon(R) CPU @ 2.80GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("cocos")`, DB CACHE: `1024`
Expand Down Expand Up @@ -60,29 +60,34 @@ impl<T: frame_system::Config> pallet_processor::WeightInfo for WeightInfo<T> {
/// Proof: `Orders::Orders` (`max_values`: None, `max_size`: Some(66), added: 2541, mode: `MaxEncodedLen`)
/// Storage: `Tokens::Accounts` (r:1 w:0)
/// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Processor::RegionAssignments` (r:0 w:1)
/// Proof: `Processor::RegionAssignments` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
fn fulfill_order() -> Weight {
// Proof Size summary in bytes:
// Measured: `572`
// Measured: `602`
// Estimated: `3584`
// Minimum execution time: 75_897_000 picoseconds.
Weight::from_parts(84_457_000, 3584)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
// Minimum execution time: 94_910_000 picoseconds.
Weight::from_parts(97_937_000, 3584)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Processor::RegionAssignments` (r:1 w:0)
/// Proof: `Processor::RegionAssignments` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Regions::Regions` (r:1 w:1)
/// Proof: `Regions::Regions` (`max_values`: None, `max_size`: Some(119), added: 2594, mode: `MaxEncodedLen`)
fn assign() -> Weight {
// Proof Size summary in bytes:
// Measured: `141`
// Estimated: `3501`
// Minimum execution time: 48_346_000 picoseconds.
Weight::from_parts(49_659_000, 3501)
.saturating_add(T::DbWeight::get().reads(2_u64))
// Measured: `417`
// Estimated: `3584`
// Minimum execution time: 68_127_000 picoseconds.
Weight::from_parts(70_199_000, 3584)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
1 change: 1 addition & 0 deletions scripts/benchmarker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ modules=(
"cumulus_pallet_xcmp_queue"
"pallet_regions"
"pallet_market"
"pallet_processor"
"pallet_orders"
"pallet_referenda"
"pallet_conviction_voting"
Expand Down
Loading