From 26db822b7a8f807071c3498f2f319eefa76a2c79 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 10 Oct 2024 09:23:02 +0800 Subject: [PATCH] Problem: no way to disable nonce checking in benchmark --- .gitignore | 2 +- go.mod | 2 +- go.sum | 4 ++-- gomod2nix.toml | 4 ++-- nix/testground-cronosd.patch | 12 ++++++++++++ nix/testground-image.nix | 9 ++++++++- 6 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 nix/testground-cronosd.patch diff --git a/.gitignore b/.gitignore index 435961006b..5b98ed6a62 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ go.work go.work.sum # nix -/result +result # pystarport /data diff --git a/go.mod b/go.mod index 725f2c08a8..aa9348b098 100644 --- a/go.mod +++ b/go.mod @@ -249,7 +249,7 @@ replace ( // TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134 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.20231207063621-43cf32d91c3e - github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240924033445-e55b15cf1494 + github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20241010012107-36adc9cd07c8 // 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 df6c1c2061..f45e02cec1 100644 --- a/go.sum +++ b/go.sum @@ -491,8 +491,8 @@ github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63 h1:R1 github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63/go.mod h1:rocwIfnS+kA060x64gkSIRvWB9StSppIkJuo5MWzL24= github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20241008100047-e671aed24d19 h1:e45niobYERw7QF6viZe5KhIH8eLgDTtg+mT5HsVhqCs= github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20241008100047-e671aed24d19/go.mod h1:vdMQLvLSGh56GqAAQP/w2R389j+g+hHOIwKcUNt9yAc= -github.com/crypto-org-chain/ethermint v0.6.1-0.20240924033445-e55b15cf1494 h1:PsBCicxLYx9u8LXgqoL1DYYQXACank9z1FNkwBqz/tY= -github.com/crypto-org-chain/ethermint v0.6.1-0.20240924033445-e55b15cf1494/go.mod h1:zJYmx1D+tDggzvXmdJ0/I62TeIykdCMfJBjBxOcniAU= +github.com/crypto-org-chain/ethermint v0.6.1-0.20241010012107-36adc9cd07c8 h1:vXb4/Z7xD1A2K/ExRwEk2oRb623Bm87n0rxardJ7uBc= +github.com/crypto-org-chain/ethermint v0.6.1-0.20241010012107-36adc9cd07c8/go.mod h1:zJYmx1D+tDggzvXmdJ0/I62TeIykdCMfJBjBxOcniAU= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e h1:vnyepPQ/m25+19xcTuBUdRxmltZ/EjVWNqEjhg7Ummk= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y= github.com/crypto-org-chain/gravity-bridge/module/v2 v2.0.1-0.20230825054824-75403cd90c6e h1:rSTc35OBjjCBx47rHPWBCIHNGPbMnEj8f7fNcK2TjVI= diff --git a/gomod2nix.toml b/gomod2nix.toml index bbc7453374..7ecf7b630f 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -219,8 +219,8 @@ schema = 3 hash = "sha256-lDIqRLUrXYCb9mmFBY/+WW+ee69+IkxOgqjHVyo4ij0=" replaced = "github.com/crypto-org-chain/go-ethereum" [mod."github.com/evmos/ethermint"] - version = "v0.6.1-0.20240924033445-e55b15cf1494" - hash = "sha256-111y71iUS8atbQVTA8oJWG2mUKIzjS9nXZuLZ4zpZHg=" + version = "v0.6.1-0.20241010012107-36adc9cd07c8" + hash = "sha256-Yfxl3JUpiJvX8Al/CdzDKRV6KMKTfyFaUZ7BbiolmqM=" replaced = "github.com/crypto-org-chain/ethermint" [mod."github.com/felixge/httpsnoop"] version = "v1.0.4" diff --git a/nix/testground-cronosd.patch b/nix/testground-cronosd.patch new file mode 100644 index 0000000000..7a64ca6aed --- /dev/null +++ b/nix/testground-cronosd.patch @@ -0,0 +1,12 @@ +diff --git a/app/app.go b/app/app.go +index 716387d5..583f9660 100644 +--- a/app/app.go ++++ b/app/app.go +@@ -1041,6 +1041,7 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64, bl + }, + ExtraDecorators: []sdk.AnteDecorator{blockAddressDecorator}, + PendingTxListener: app.onPendingTx, ++ UnsafeUnorderedTx: true, + } + + anteHandler, err := evmante.NewAnteHandler(options) diff --git a/nix/testground-image.nix b/nix/testground-image.nix index ad7efdad17..629ae3ae8c 100644 --- a/nix/testground-image.nix +++ b/nix/testground-image.nix @@ -1,4 +1,11 @@ { dockerTools, runCommandLocal, cronos-matrix, benchmark-testcase }: +let + patched-cronosd = cronos-matrix.cronosd.overrideAttrs (oldAttrs: { + patches = oldAttrs.patches or [ ] ++ [ + ./testground-cronosd.patch + ]; + }); +in let tmpDir = runCommandLocal "tmp" { } '' mkdir -p $out/tmp/ @@ -9,7 +16,7 @@ dockerTools.buildLayeredImage { created = "now"; contents = [ benchmark-testcase - cronos-matrix.cronosd + patched-cronosd tmpDir ]; config = {