Skip to content
Draft
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
46 changes: 31 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag =
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false } #TODO check if was deleted from EPT
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
Expand All @@ -86,6 +86,7 @@ pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-tx-pause = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503", default-features = false }
Expand Down
4 changes: 4 additions & 0 deletions runtime/mainnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pallet-preimage = { workspace = true, default-features = false }
pallet-scheduler = { workspace = true, default-features = false }
pallet-treasury = { workspace = true, default-features = false }
pallet-democracy = { workspace = true, default-features = false }
pallet-tx-pause = { workspace = true, default-features = false }
pallet-vesting = { workspace = true, default-features = false }
sp-api = { workspace = true, default-features = false }
sp-block-builder = { workspace = true, default-features = false }
Expand Down Expand Up @@ -146,6 +147,7 @@ std = [
"pallet-preimage/std",
"pallet-scheduler/std",
"pallet-treasury/std",
"pallet-tx-pause/std",
"pallet-vesting/std",
"parachain-info/std",
"parachains-common/std",
Expand Down Expand Up @@ -200,6 +202,7 @@ runtime-benchmarks = [
"pallet-scheduler/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-transaction-payment/runtime-benchmarks",
"pallet-tx-pause/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
Expand Down Expand Up @@ -242,6 +245,7 @@ try-runtime = [
"pallet-proxy/try-runtime",
"pallet-myth-proxy/try-runtime",
"pallet-treasury/try-runtime",
"pallet-tx-pause/try-runtime",
"pallet-vesting/try-runtime",
"parachain-info/try-runtime",
"pallet-escrow/try-runtime",
Expand Down
13 changes: 13 additions & 0 deletions runtime/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ impl frame_system::Config for Runtime {
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
/// The maximum number of consumers allowed on a single account.
type MaxConsumers = frame_support::traits::ConstU32<16>;
type BaseCallFilter = TxPause;
type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>;
}

Expand Down Expand Up @@ -1065,6 +1066,16 @@ impl pallet_treasury::Config for Runtime {
type BenchmarkHelper = TreasuryBenchmarkHelper<Balances>;
}

impl pallet_tx_pause::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type PauseOrigin = RootOrCouncilTwoThirdsMajority;
type UnpauseOrigin = RootOrCouncilTwoThirdsMajority;
type WhitelistedCalls = ();
type MaxNameLen = ConstU32<256>;
type WeightInfo = weights::pallet_tx_pause::WeightInfo<Runtime>;
}

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub struct Runtime {
Expand Down Expand Up @@ -1112,6 +1123,7 @@ construct_runtime!(
// Other pallets.
Proxy: pallet_proxy = 40,
Vesting: pallet_vesting = 41,
TxPause: pallet_tx_pause = 42,

Escrow: pallet_escrow = 50,
MythProxy: pallet_myth_proxy = 51,
Expand Down Expand Up @@ -1142,6 +1154,7 @@ mod benches {
[pallet_myth_proxy, MythProxy]
[pallet_nfts, Nfts]
[pallet_preimage, Preimage]
[pallet_tx_pause, TxPause]
[pallet_proxy, Proxy]
[pallet_session, SessionBench::<Runtime>]
[pallet_scheduler, Scheduler]
Expand Down
2 changes: 1 addition & 1 deletion runtime/mainnet/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub mod rocksdb_weights;

pub use block_weights::constants::BlockExecutionWeight;
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
//pub use paritydb_weights::constants::ParityDbWeight;
pub use rocksdb_weights::constants::RocksDbWeight;

pub mod cumulus_pallet_parachain_system;
Expand All @@ -51,6 +50,7 @@ pub mod pallet_sudo;
pub mod pallet_timestamp;
pub mod pallet_transaction_payment;
pub mod pallet_treasury;
pub mod pallet_tx_pause;
pub mod pallet_utility;
pub mod pallet_vesting;
pub mod pallet_xcm;
64 changes: 64 additions & 0 deletions runtime/mainnet/src/weights/pallet_tx_pause.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

//! Autogenerated weights for `pallet_tx_pause`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.0.0
//! DATE: 2025-03-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `blockdeep-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("mainnet-local-v")`, DB CACHE: 1024

// Executed Command:
// ./target/release/mythos-node
// benchmark
// pallet
// --chain
// mainnet-local-v
// --pallet
// pallet_tx_pause
// --extrinsic
// *
// --wasm-execution
// compiled
// --steps
// 50
// --repeat
// 20
// --output
// ./runtime/mainnet/src/weights/pallet_tx_pause.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

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

/// Weight functions for `pallet_tx_pause`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_tx_pause::WeightInfo for WeightInfo<T> {
/// Storage: `TxPause::PausedCalls` (r:1 w:1)
/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
fn pause() -> Weight {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `3997`
// Minimum execution time: 21_540_000 picoseconds.
Weight::from_parts(22_110_000, 0)
.saturating_add(Weight::from_parts(0, 3997))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `TxPause::PausedCalls` (r:1 w:1)
/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
fn unpause() -> Weight {
// Proof Size summary in bytes:
// Measured: `566`
// Estimated: `3997`
// Minimum execution time: 29_360_000 picoseconds.
Weight::from_parts(30_750_000, 0)
.saturating_add(Weight::from_parts(0, 3997))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
5 changes: 5 additions & 0 deletions runtime/testnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pallet-multisig = { workspace = true, default-features = false }
pallet-nfts = { workspace = true, default-features = false }
pallet-proxy = { workspace = true, default-features = false }
pallet-preimage = { workspace = true, default-features = false }
pallet-tx-pause = { workspace = true, default-features = false }
pallet-vesting = { workspace = true, default-features = false }
sp-api = { workspace = true, default-features = false }
sp-block-builder = { workspace = true, default-features = false }
Expand Down Expand Up @@ -138,6 +139,7 @@ std = [
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
"pallet-treasury/std",
"pallet-tx-pause/std",
"pallet-utility/std",
"pallet-xcm/std",
"pallet-proxy/std",
Expand Down Expand Up @@ -195,6 +197,8 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-transaction-payment/runtime-benchmarks",
"pallet-tx-pause/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
Expand Down Expand Up @@ -234,6 +238,7 @@ try-runtime = [
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-treasury/try-runtime",
"pallet-tx-pause/try-runtime",
"pallet-utility/try-runtime",
"pallet-xcm/try-runtime",
"pallet-proxy/try-runtime",
Expand Down
13 changes: 13 additions & 0 deletions runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ impl frame_system::Config for Runtime {
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
/// The maximum number of consumers allowed on a single account.
type MaxConsumers = frame_support::traits::ConstU32<16>;
type BaseCallFilter = TxPause;
type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>;
}

Expand Down Expand Up @@ -1078,6 +1079,16 @@ impl pallet_treasury::Config for Runtime {
type BenchmarkHelper = TreasuryBenchmarkHelper<Balances>;
}

impl pallet_tx_pause::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type PauseOrigin = RootOrCouncilTwoThirdsMajority;
type UnpauseOrigin = RootOrCouncilTwoThirdsMajority;
type WhitelistedCalls = ();
type MaxNameLen = ConstU32<256>;
type WeightInfo = weights::pallet_tx_pause::WeightInfo<Runtime>;
}

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub struct Runtime {
Expand Down Expand Up @@ -1125,6 +1136,7 @@ construct_runtime!(
// Other pallets
Proxy: pallet_proxy = 40,
Vesting: pallet_vesting = 41,
TxPause: pallet_tx_pause = 42,

Escrow: pallet_escrow = 50,
MythProxy: pallet_myth_proxy = 51,
Expand Down Expand Up @@ -1165,6 +1177,7 @@ mod benches {
[pallet_utility, Utility]
[pallet_collator_staking, CollatorStaking]
[pallet_transaction_payment, TransactionPayment]
[pallet_tx_pause, TxPause]
);
}

Expand Down
Loading