diff --git a/CHANGELOG.md b/CHANGELOG.md index d79471d745..a9e82a4c87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,6 +98,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#526](https://github.com/crypto-org-chain/ethermint/pull/526), [#535](https://github.com/crypto-org-chain/ethermint/pull/535) Avoid unnecessary block result in header related api call. * [#533](https://github.com/crypto-org-chain/ethermint/pull/533) Bump cosmos-sdk to v0.50.10, cometbft to v0.38.13 and ibc-go to v8.5.1. * [#546](https://github.com/crypto-org-chain/ethermint/pull/546) Introduce `--async-check-tx` flag to run check-tx async with consensus. +* [#549](https://github.com/crypto-org-chain/ethermint/pull/549) Support build without cgo. ## v0.21.x-cronos diff --git a/app/ante/eip712.go b/app/ante/eip712.go index 2237a7910c..3ccef365f7 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -32,7 +32,6 @@ import ( ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" ethcrypto "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/secp256k1" "github.com/ethereum/go-ethereum/signer/core/apitypes" "github.com/evmos/ethermint/crypto/ethsecp256k1" "github.com/evmos/ethermint/ethereum/eip712" @@ -301,7 +300,7 @@ func VerifySignature( feePayerSig[ethcrypto.RecoveryIDOffset] -= 27 } - feePayerPubkey, err := secp256k1.RecoverPubkey(sigHash, feePayerSig) + feePayerPubkey, err := ethcrypto.Ecrecover(sigHash, feePayerSig) if err != nil { return errorsmod.Wrap(err, "failed to recover delegated fee payer from sig") } @@ -327,7 +326,7 @@ func VerifySignature( // VerifySignature of ethsecp256k1 accepts 64 byte signature [R||S] // WARNING! Under NO CIRCUMSTANCES try to use pubKey.VerifySignature there - if !secp256k1.VerifySignature(pubKey.Bytes(), sigHash, feePayerSig[:len(feePayerSig)-1]) { + if !ethcrypto.VerifySignature(pubKey.Bytes(), sigHash, feePayerSig[:len(feePayerSig)-1]) { return errorsmod.Wrap(errortypes.ErrorInvalidSigner, "unable to verify signer signature of EIP712 typed data") } diff --git a/go.mod b/go.mod index e5ba5c2de9..136ce83dc2 100644 --- a/go.mod +++ b/go.mod @@ -254,7 +254,7 @@ replace ( // use cosmos keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // release/v1.11.x - github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a + github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20241030073450-b9cc632bc183 // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 diff --git a/go.sum b/go.sum index 47d297cd9b..c2411241b5 100644 --- a/go.sum +++ b/go.sum @@ -420,8 +420,8 @@ github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241015015202-783e224f9517 h github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241015015202-783e224f9517/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716 h1:OvD5Rm0B6LHUJk6z858UgwdP72jU2DuUdXeclRyKpDI= github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE= -github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a h1:IUPD+dg1YQl8cLocxQ/Mbx/ObTgAgcrZlcBhFjsLO40= -github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a/go.mod h1:A249HEl6XyiV5zSnKM9j9RF3szMghMNONMyNvYuqQIw= +github.com/crypto-org-chain/go-ethereum v1.10.20-0.20241030073450-b9cc632bc183 h1:JDBTqDkd9X9oBF2C4FKOpn0GVDQDzVkHzeS8eDWNl6A= +github.com/crypto-org-chain/go-ethereum v1.10.20-0.20241030073450-b9cc632bc183/go.mod h1:5DnkptqPQr+Mo3sy/2V3OQu+K94x1PVzFGZJZbDF8mI= github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/gomod2nix.toml b/gomod2nix.toml index 4fb382514d..03fa4cc785 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -249,8 +249,8 @@ schema = 3 version = "v1.6.1" hash = "sha256-zOpoaepCfPLmU9iQji/Ait+SVEHI9eF3rwtW0h/8lho=" [mod."github.com/ethereum/go-ethereum"] - version = "v1.10.20-0.20240926023215-d2275b4afb9a" - hash = "sha256-ozwVS2BhAoz+OOisAyMhgg+lq8FdQjf90xoOq9cxtGw=" + version = "v1.10.20-0.20241030073450-b9cc632bc183" + hash = "sha256-5nh0HZOZwlZBMmHv08BELlNfDZyq5zwq65ByyMzOetA=" replaced = "github.com/crypto-org-chain/go-ethereum" [mod."github.com/fatih/color"] version = "v1.16.0"