Skip to content

Commit

Permalink
update runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Jun 12, 2021
1 parent 254ca23 commit c9323f0
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 6 deletions.
13 changes: 7 additions & 6 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ parameter_types! {
/// Same as Polkadot Relay Chain.
pub const ExistentialDeposit: Balance = 500;
pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
}

impl pallet_balances::Config for Runtime {
Expand All @@ -288,8 +287,6 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
}

parameter_types! {
Expand Down Expand Up @@ -562,7 +559,7 @@ impl pallet_chainlink_feed::Config for Runtime {
type OracleCountLimit = OracleLimit;
type FeedLimit = FeedLimit;
type OnAnswerHandler = ();
type WeightInfo = ();
type WeightInfo = weights::pallet_chainlink_feed::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -721,11 +718,15 @@ construct_runtime!(
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Call, Storage},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Event<T>},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
ParachainInfo: parachain_info::{Pallet, Storage, Config},
Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>},

// Parachain
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Config, Event<T>},
ParachainInfo: parachain_info::{Pallet, Storage, Config},

// Collator. The order of the 4 below are important and shall not change.
// TODO authorship, collatorselection
Aura: pallet_aura::{Pallet, Config<T>},
AuraExt: cumulus_pallet_aura_ext::{Pallet, Config},

Expand Down
1 change: 1 addition & 0 deletions runtime/src/weights/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright 2021 ChainSafe Systems
// SPDX-License-Identifier: LGPL-3.0-only
pub mod pallet_asset_index;
pub mod pallet_chainlink_feed;
pub mod pallet_committee;
pub mod pallet_local_treasury;
pub mod pallet_price_feed;
Expand Down
151 changes: 151 additions & 0 deletions runtime/src/weights/pallet_chainlink_feed.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
//! Autogenerated weights for pallet_chainlink_feed
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
//! DATE: 2021-05-20, STEPS: `[20, ]`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 128
// Executed Command:
// ./target/release/pint
// benchmark
// --execution
// wasm
// --wasm-execution
// compiled
// --pallet
// pallet_chainlink_feed
// -e
// *
// -s
// 20
// -r
// 10
// --raw
// --output
// ./runtime/src/weights

#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for pallet_chainlink_feed.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_chainlink_feed::WeightInfo for WeightInfo<T> {
fn create_feed(o: u32) -> Weight {
(38_850_000 as Weight)
// Standard Error: 66_000
.saturating_add((15_164_000 as Weight).saturating_mul(o as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(o as Weight)))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(o as Weight)))
}
fn transfer_ownership() -> Weight {
(21_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn accept_ownership() -> Weight {
(20_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_pruning_window(o: u32) -> Weight {
(1_727_000 as Weight)
// Standard Error: 14_000
.saturating_add((3_253_000 as Weight).saturating_mul(o as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(o as Weight)))
}
fn submit_opening_round_answers() -> Weight {
(90_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
fn submit_closing_answer(o: u32) -> Weight {
(72_296_000 as Weight)
// Standard Error: 18_000
.saturating_add((211_000 as Weight).saturating_mul(o as Weight))
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
fn change_oracles(d: u32, n: u32) -> Weight {
(0 as Weight)
// Standard Error: 81_000
.saturating_add((14_745_000 as Weight).saturating_mul(d as Weight))
// Standard Error: 81_000
.saturating_add((17_320_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(d as Weight)))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(d as Weight)))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight)))
}
fn update_future_rounds() -> Weight {
(22_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_requester() -> Weight {
(25_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_requester() -> Weight {
(23_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn request_new_round() -> Weight {
(48_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn withdraw_payment() -> Weight {
(53_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn transfer_admin() -> Weight {
(19_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn accept_admin() -> Weight {
(19_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn withdraw_funds() -> Weight {
(50_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn reduce_debt() -> Weight {
(31_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn transfer_pallet_admin() -> Weight {
(17_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn accept_pallet_admin() -> Weight {
(18_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn set_feed_creator() -> Weight {
(17_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_feed_creator() -> Weight {
(17_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
}

0 comments on commit c9323f0

Please sign in to comment.