From 9e1ec0401092cfd37765eaa67176388de633bee2 Mon Sep 17 00:00:00 2001 From: Solovyov1796 Date: Mon, 18 Nov 2024 12:11:18 +0800 Subject: [PATCH 1/2] add evm min gas prices decorator to eth ante handler chain --- app/ante/ante.go | 1 + go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/ante/ante.go b/app/ante/ante.go index abc1db32..e613d16f 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -168,6 +168,7 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { evmante.NewEthSetUpContextDecorator(options.EvmKeeper), // outermost AnteDecorator. SetUpContext must be called first evmante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against minimal-gas-prices evmante.NewEthValidateBasicDecorator(options.EvmKeeper), + evmante.NewEvmMinGasPriceDecorator(options.EvmKeeper), evmante.NewEthSigVerificationDecorator(options.EvmKeeper), evmante.NewEthAccountVerificationDecorator(options.AccountKeeper, options.EvmKeeper), evmante.NewCanTransferDecorator(options.EvmKeeper), diff --git a/go.mod b/go.mod index a04f177c..98c401c6 100644 --- a/go.mod +++ b/go.mod @@ -250,7 +250,7 @@ replace ( // TODO: Tag before release github.com/ethereum/go-ethereum => github.com/evmos/go-ethereum v1.10.26-evmos-rc2 // Use ethermint fork that respects min-gas-price with NoBaseFee true and london enabled, and includes eip712 support - github.com/evmos/ethermint => github.com/0glabs/ethermint v0.21.0-0g.v3.1.6 + github.com/evmos/ethermint => github.com/0glabs/ethermint v0.21.0-0g.v3.1.7 // See https://github.com/cosmos/cosmos-sdk/pull/10401, https://github.com/cosmos/cosmos-sdk/commit/0592ba6158cd0bf49d894be1cef4faeec59e8320 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 // Downgraded to avoid bugs in following commits which causes "version does not exist" errors diff --git a/go.sum b/go.sum index a0f296d2..796986e6 100644 --- a/go.sum +++ b/go.sum @@ -213,8 +213,8 @@ github.com/0glabs/cometbft v0.37.9-0glabs.1 h1:KQJG17Y21suKP3QNICLto4b5Ak73XbSmK github.com/0glabs/cometbft v0.37.9-0glabs.1/go.mod h1:j0Q3RqrCd+cztWCugs3obbzC4NyHGBPZZjtm/fWV00I= github.com/0glabs/cosmos-sdk v0.47.10-0glabs.7 h1:6+JquK9BaZZdIA3gx1AXhPBAdYCG+FQ94Y7FN35CvB4= github.com/0glabs/cosmos-sdk v0.47.10-0glabs.7/go.mod h1:KskIVnhXTFqrw7CDccMvx7To5KzUsOomIsQV7sPGOog= -github.com/0glabs/ethermint v0.21.0-0g.v3.1.6 h1:js58IERJXdR/arMz6RaGWswiuE6EWkl+2t99ijhr3yI= -github.com/0glabs/ethermint v0.21.0-0g.v3.1.6/go.mod h1:S1Ahmqpzo1XUsfmmpGT7ok0hu5Fekz/pD6EDtXaBg9Q= +github.com/0glabs/ethermint v0.21.0-0g.v3.1.7 h1:wzr6z/LTsbjoAaBf0JkMtIDl/+B5KLd0GrU5brSZCY0= +github.com/0glabs/ethermint v0.21.0-0g.v3.1.7/go.mod h1:S1Ahmqpzo1XUsfmmpGT7ok0hu5Fekz/pD6EDtXaBg9Q= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= From 3e427e5bddfa434efb643ec69d3f77f7b726e6f3 Mon Sep 17 00:00:00 2001 From: Solovyov1796 Date: Mon, 18 Nov 2024 13:26:33 +0800 Subject: [PATCH 2/2] set min gas prices --- localtestnet.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/localtestnet.sh b/localtestnet.sh index dc7ceae2..3b6234a9 100755 --- a/localtestnet.sh +++ b/localtestnet.sh @@ -42,6 +42,9 @@ sed -in-place='' 's/tracer = ""/tracer = ""/g' $DATA/config/app.toml sed -in-place='' '/iavl-cache-size/a\ trace = false' $DATA/config/app.toml +# Set min gas prices +sed -in-place='' 's/minimum-gas-prices = "0ua0gi"/minimum-gas-prices = "0.01ua0gi,100000neuron"/g' $DATA/config/app.toml + # Set client chain id sed -in-place='' 's/chain-id = ""/chain-id = "zgchain_8888-1"/g' $DATA/config/client.toml