Skip to content
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
11 changes: 11 additions & 0 deletions prdoc/pr_9939.prdoc
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions substrate/frame/revive/dev-node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand All @@ -322,7 +323,7 @@ impl pallet_transaction_payment::Config for Runtime {
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, ()>;
type WeightToFee = BlockRatioFee<1, 1, Self>;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type FeeMultiplierUpdate = polkadot_sdk::polkadot_runtime_common::SlowAdjustingFeeUpdate<Self>;
type FeeMultiplierUpdate = ConstFeeMultiplier<FeeMultiplier>;
}

parameter_types! {
Expand Down
Loading