diff --git a/prdoc/pr_9939.prdoc b/prdoc/pr_9939.prdoc new file mode 100644 index 0000000000000..2e44993105ef6 --- /dev/null +++ b/prdoc/pr_9939.prdoc @@ -0,0 +1,11 @@ +title: '[pallet-revive] dev-node constant fee multiplier' +doc: +- audience: Runtime Dev + description: |- + This will let us have stable gas cost (as long as the state of the dev net does not change) + + In mainnet you can't rely on stable gas anyway since the state of the blockchain can change between two dry runs, + but we are probably better off if we have stable gas cost in testing environments. +crates: +- name: revive-dev-runtime + bump: patch diff --git a/substrate/frame/revive/dev-node/runtime/src/lib.rs b/substrate/frame/revive/dev-node/runtime/src/lib.rs index 34a18790a987c..682404befce90 100644 --- a/substrate/frame/revive/dev-node/runtime/src/lib.rs +++ b/substrate/frame/revive/dev-node/runtime/src/lib.rs @@ -37,7 +37,7 @@ use pallet_revive::{ }, AccountId32Mapper, }; -use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; +use pallet_transaction_payment::{ConstFeeMultiplier, FeeDetails, Multiplier, RuntimeDispatchInfo}; use polkadot_sdk::{ polkadot_sdk_frame::{ deps::sp_genesis_builder, @@ -314,6 +314,7 @@ impl pallet_timestamp::Config for Runtime {} parameter_types! { pub const TransactionByteFee: Balance = 10 * MILLICENTS; + pub FeeMultiplier: Multiplier = Multiplier::one(); } // Implements the types required for the transaction payment pallet. @@ -322,7 +323,7 @@ impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter; type WeightToFee = BlockRatioFee<1, 1, Self>; type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = polkadot_sdk::polkadot_runtime_common::SlowAdjustingFeeUpdate; + type FeeMultiplierUpdate = ConstFeeMultiplier; } parameter_types! {