From 3f1da235d366d5b60016b4b6c05538476fbb500a Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 26 Jun 2024 21:48:29 +0800 Subject: [PATCH] Problem: max_gas_wanted not working in sdk 0.50 mempool (#1487) * Problem: max_gas_wanted not working in sdk 0.50 mempool * set create time --- CHANGELOG.md | 2 +- go.mod | 2 +- go.sum | 4 ++-- gomod2nix.toml | 4 ++-- integration_tests/test_basic.py | 1 + nix/testground-image.nix | 1 + 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ffde5de99..08fe66722a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,7 @@ * [#1431](https://github.com/crypto-org-chain/cronos/pull/1431) Integrate testground to run benchmark on cluster. * [#1464](https://github.com/crypto-org-chain/cronos/pull/1464) Update cosmos-sdk to `v0.50.7`. * (rpc) [#1467](https://github.com/crypto-org-chain/cronos/pull/1467) Avoid unnecessary tx decode in tx listener. -* [#1484](https://github.com/crypto-org-chain/cronos/pull/1484) Respect gas wanted returned by ante handler. +* [#1484](https://github.com/crypto-org-chain/cronos/pull/1484), [#1487](https://github.com/crypto-org-chain/cronos/pull/1487) Respect gas that is wanted to be returned by the ante handler. * [#1488](https://github.com/crypto-org-chain/cronos/pull/1488) Enable optimistic execution. ### Bug Fixes diff --git a/go.mod b/go.mod index de004fd449..9a781b9f6b 100644 --- a/go.mod +++ b/go.mod @@ -276,7 +276,7 @@ replace ( github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7 // block-stm branch - github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240609125548-217e3af48fa5 + github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240626122608-773438f47b95 // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 diff --git a/go.sum b/go.sum index e84467c7e3..bac9556160 100644 --- a/go.sum +++ b/go.sum @@ -430,8 +430,8 @@ github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240626040048-36295f051595 github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240626040048-36295f051595/go.mod h1:gjE3DZe4t/+VeIk6CmrouyqiuDbZ7QOVDDq3nLqBTpg= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240626040048-36295f051595 h1:MPKv1EzM16dx+HzkJowgb9PrlbatRlgFYqk1IucsL2s= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240626040048-36295f051595/go.mod h1:RTiTs4hkXG6IvYGknvB8p79YgjYJdcbzLUOGJChsPnY= -github.com/crypto-org-chain/ethermint v0.6.1-0.20240609125548-217e3af48fa5 h1:VYXq47qGP86Zf3GEhTvUPOeEpzEWOok57rEZgXhUClA= -github.com/crypto-org-chain/ethermint v0.6.1-0.20240609125548-217e3af48fa5/go.mod h1:U+PuJj12h0eCjzPMAuhn7Zf5aS3P7/oMZQ9kw+gddvE= +github.com/crypto-org-chain/ethermint v0.6.1-0.20240626122608-773438f47b95 h1:3GAsuRgeQfumWPu7fxW9EbD2/vUVJomzYpE+jItOF24= +github.com/crypto-org-chain/ethermint v0.6.1-0.20240626122608-773438f47b95/go.mod h1:z5zfkmH6XonIpRzMzFoZU+QSBkXSe5GdRvRWiK9fiA8= github.com/crypto-org-chain/go-block-stm v0.0.0-20240408011717-9f11af197bde h1:sQIHTJfVt5VTrF7po9eZiFkZiPjlHbFvnXtGCOoBjNM= github.com/crypto-org-chain/go-block-stm v0.0.0-20240408011717-9f11af197bde/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7 h1:V43F3JFcqG4MUThf9W/DytnPblpR6CcaLBw2Wx6zTgE= diff --git a/gomod2nix.toml b/gomod2nix.toml index 555d9d2802..41455ffb40 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -262,8 +262,8 @@ schema = 3 hash = "sha256-lE4G5FaRb3MVi9FFVn+WlwsSTOB4SbjmVboKyQ5yB0A=" replaced = "github.com/crypto-org-chain/go-ethereum" [mod."github.com/evmos/ethermint"] - version = "v0.6.1-0.20240609125548-217e3af48fa5" - hash = "sha256-7qMs+FFcDtd8RMLS514vulIdlBc4tR+Tj72Y/JWAVtI=" + version = "v0.6.1-0.20240626122608-773438f47b95" + hash = "sha256-L/hj92fMu/+5XBb1pcA6mk6oNyN7HidC9lT+nPQcPu4=" replaced = "github.com/crypto-org-chain/ethermint" [mod."github.com/fatih/color"] version = "v1.16.0" diff --git a/integration_tests/test_basic.py b/integration_tests/test_basic.py index 2fb58922f5..52d4d5593c 100644 --- a/integration_tests/test_basic.py +++ b/integration_tests/test_basic.py @@ -825,6 +825,7 @@ def test_contract(cronos): origin_cmd = None +@pytest.mark.unmarked @pytest.mark.parametrize("max_gas_wanted", [80000000, 40000000, 25000000, 500000, None]) def test_tx_inclusion(cronos, max_gas_wanted): """ diff --git a/nix/testground-image.nix b/nix/testground-image.nix index e1c3d3a943..5959fc7388 100644 --- a/nix/testground-image.nix +++ b/nix/testground-image.nix @@ -1,6 +1,7 @@ { dockerTools, cronos-matrix, testground-testcase }: dockerTools.buildLayeredImage { name = "cronos-testground"; + created = "now"; contents = [ testground-testcase cronos-matrix.cronosd