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

Tune 1559 params #6844

Merged
merged 1 commit into from
Nov 9, 2023
Merged
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
21 changes: 13 additions & 8 deletions x/txfees/keeper/mempool-1559/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,22 @@ import (
*/

var (
DefaultBaseFee = sdk.MustNewDecFromStr("0.0025")
MinBaseFee = sdk.MustNewDecFromStr("0.0025")
MaxBaseFee = sdk.MustNewDecFromStr("10")
MaxBlockChangeRate = sdk.NewDec(1).Quo(sdk.NewDec(16))
DefaultBaseFee = sdk.MustNewDecFromStr("0.0025")
MinBaseFee = sdk.MustNewDecFromStr("0.0025")
MaxBaseFee = sdk.MustNewDecFromStr("10")

// Max increase per block is a factor of 15/14, max decrease is 9/10
MaxBlockChangeRate = sdk.NewDec(1).Quo(sdk.NewDec(10))
TargetGas = int64(70_000_000)
// In face of continuous spam, will take ~21 blocks from base fee > spam cost, to mempool eviction
// ceil(log_{15/14}(RecheckFeeConstant))
// So potentially 2 minutes of impaired UX from 1559 nodes on top of time to get to base fee > spam.
RecheckFeeConstant = int64(4)
ResetInterval = int64(1000)
)

const (
TargetGas = int64(60_000_000)
ResetInterval = int64(1000)
BackupFile = "eip1559state.json"
RecheckFeeConstant = int64(4)
BackupFile = "eip1559state.json"
)

// EipState tracks the current base fee and totalGasWantedThisBlock
Expand Down