Skip to content

Commit

Permalink
improve: reduce MinGasPrice to 50Gwei (#2938)
Browse files Browse the repository at this point in the history
* reduce MinGasPrice to 50Gwei

* update Changelog

* Update CHANGELOG.md

* bump up irismod

---------

Co-authored-by: mitch1024 <156652908+mitch1024@users.noreply.github.com>
  • Loading branch information
dreamer-zq and mitch1024 committed May 14, 2024
1 parent ecb357d commit 830c561
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* (IRISHub) [\#2908](https://github.com/irisnet/irishub/pull/2908) Add ICA module.
* (IRISHub) [\#2909](https://github.com/irisnet/irishub/pull/2909) Add Cosmos LSM module.
* (IRISHub) [\#2925](https://github.com/irisnet/irishub/pull/2925) Enhance token module.
* (IRISHub) [\#2938](https://github.com/irisnet/irishub/pull/2938) Reduce `MinGasPrice` of EVM to 50Gwei.

### Improvements

Expand Down
3 changes: 3 additions & 0 deletions app/upgrades/v300/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ var (
// MinDepositRatio is the minimum deposit ratio
MinDepositRatio = sdk.MustNewDecFromStr("0.01")

// EvmMinGasPrice is the minimum gas price for the EVM
EvmMinGasPrice = sdk.NewDec(50000000000)

allowMessages = []string{"*"}
)
12 changes: 12 additions & 0 deletions app/upgrades/v300/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func upgradeHandlerConstructor(
return nil, err
}

if err := mergeFeeMarket(ctx, box); err != nil {
return nil, err
}

if err := mergeToken(ctx, box); err != nil {
return nil, err
}
Expand Down Expand Up @@ -80,6 +84,14 @@ func mergeEVM(ctx sdk.Context, box upgrades.Toolbox) error {
return box.EvmKeeper.SetParams(ctx, params)
}

func mergeFeeMarket(ctx sdk.Context, box upgrades.Toolbox) error {
ctx.Logger().Info("start to run feeMarket module migrations...")

params := box.FeeMarketKeeper.GetParams(ctx)
params.MinGasPrice = EvmMinGasPrice
return box.FeeMarketKeeper.SetParams(ctx, params)
}

func mergeToken(ctx sdk.Context, box upgrades.Toolbox) error {
ctx.Logger().Info("start to run token module migrations...")

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/cosmos/iavl v0.20.1 // indirect
github.com/cosmos/ibc-go/v7 v7.3.0
github.com/evmos/ethermint v0.22.0
github.com/irisnet/irismod v1.8.1-0.20240511065647-ae196cb4e4ac //release/v1.8.0-lsm
github.com/irisnet/irismod v1.9.0
)

require (
Expand Down Expand Up @@ -232,6 +232,6 @@ require (
replace github.com/zondax/hid => github.com/zondax/hid v0.9.0

// use bianjieai fork of ethermint
replace github.com/evmos/ethermint => github.com/bianjieai/ethermint v0.22.0-irishub-20231207.0.20240419023144-3cea3d782107 //release/v0.2…20231207-lsm
replace github.com/evmos/ethermint => github.com/bianjieai/ethermint v0.22.0-irishub-20240512

replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s=
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bianjieai/ethermint v0.22.0-irishub-20231207.0.20240419023144-3cea3d782107 h1:ssrDDPlhLILV0UaQD+D/mRqAvQ5FeQrWB3lltaP5YTc=
github.com/bianjieai/ethermint v0.22.0-irishub-20231207.0.20240419023144-3cea3d782107/go.mod h1:x9BFez6AUL9Yksv4zZd3QLmSazwOkyNd3h2zFV2B4RU=
github.com/bianjieai/ethermint v0.22.0-irishub-20240512 h1:s7xvTNh4GlUlTjYfeGNvMCpKbfkBw2d/C8lvJXygFiQ=
github.com/bianjieai/ethermint v0.22.0-irishub-20240512/go.mod h1:x9BFez6AUL9Yksv4zZd3QLmSazwOkyNd3h2zFV2B4RU=
github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0 h1:399lErsTpI+faTerw5Q4OuVlXAmAQSuibVvxHR3C6OY=
github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0/go.mod h1:u2PNH4v8CD4AWU4Rf7yt8/qqQtrrwwHiw03qQSKERhg=
github.com/bianjieai/tibc-go v0.5.0 h1:/J1OQe4gwUUkS3Q6+nm0EsTY7MNAOPNzfnpvgIWlvKM=
Expand Down Expand Up @@ -846,8 +846,8 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y
github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE=
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
github.com/irisnet/irismod v1.8.1-0.20240511065647-ae196cb4e4ac h1:B1zkOf+8gRJz0SFZlPgfjBb4jyRbG0/Lbezuq1wppkY=
github.com/irisnet/irismod v1.8.1-0.20240511065647-ae196cb4e4ac/go.mod h1:TQDhEmxqCIzo7OjyNy//UI0xKDuMtONjoy5LzUeRhVo=
github.com/irisnet/irismod v1.9.0 h1:ZZtcY7575gmSkp08TOm/bhJjH2P7qAX7AWspP5lsAGY=
github.com/irisnet/irismod v1.9.0/go.mod h1:TQDhEmxqCIzo7OjyNy//UI0xKDuMtONjoy5LzUeRhVo=
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=
Expand Down

0 comments on commit 830c561

Please sign in to comment.