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

Increase Transaction Base Fee & Decrease Transaction Byte Fee #926

Merged
merged 2 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 2 additions & 4 deletions runtime/crab/src/pallets/transaction_payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ impl WeightToFeePolynomial for WeightToFee {
type Balance = Balance;

fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
// First try
let p = 200 * MILLI;
// in Crab, extrinsic base weight (smallest non-zero weight) is mapped to 500 MILLI:
// let p = 500 * MILLI;
let p = 500 * MILLI;
let q = Balance::from(ExtrinsicBaseWeight::get());
smallvec![WeightToFeeCoefficient {
degree: 1,
Expand All @@ -39,7 +37,7 @@ impl WeightToFeePolynomial for WeightToFee {
}

frame_support::parameter_types! {
pub const TransactionByteFee: Balance = 10 * MILLI;
pub const TransactionByteFee: Balance = 100 * MICRO;
/// This value increases the priority of `Operational` transactions by adding
/// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.
pub const OperationalFeeMultiplier: u8 = 5;
Expand Down
8 changes: 2 additions & 6 deletions runtime/darwinia/src/pallets/transaction_payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ impl WeightToFeePolynomial for WeightToFee {
type Balance = Balance;

fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
// First try
let p = 40 * MILLI;
// in Darwinia, extrinsic base weight (smallest non-zero weight) is mapped to 100 MILLI:
// let p = 100 * MILLI;
let p = 100 * MILLI;
let q = Balance::from(ExtrinsicBaseWeight::get());
smallvec![WeightToFeeCoefficient {
degree: 1,
Expand All @@ -39,9 +37,7 @@ impl WeightToFeePolynomial for WeightToFee {
}

frame_support::parameter_types! {
// First try
pub const TransactionByteFee: Balance = 200 * MICRO;
// pub const TransactionByteFee: Balance = 2 * MILLI;
pub const TransactionByteFee: Balance = 100 * MICRO;
/// This value increases the priority of `Operational` transactions by adding
/// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.
pub const OperationalFeeMultiplier: u8 = 5;
Expand Down