From f0da02ffb57a644d7078db5e903500a1bf739c97 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Fri, 18 Oct 2024 15:02:37 -0700 Subject: [PATCH] upgrade to go-ethereum 1.13 fix CanTranfer args --- app/ante/eth.go | 11 ++- app/ante/eth_test.go | 17 ++-- app/ante/sigs_test.go | 3 +- go.mod | 42 +++++----- go.sum | 109 ++++++++++++------------- gomod2nix.toml | 90 ++++++++++---------- server/json_rpc.go | 55 ++++++++++--- tests/importer/importer_test.go | 21 ++--- x/evm/genesis_test.go | 5 +- x/evm/keeper/keeper.go | 5 +- x/evm/keeper/keeper_test.go | 3 +- x/evm/keeper/state_transition.go | 44 ++++------ x/evm/keeper/statedb.go | 5 +- x/evm/keeper/statedb_benchmark_test.go | 6 +- x/evm/keeper/statedb_test.go | 44 ++++------ x/evm/keeper/tracer.go | 2 +- x/evm/keeper/utils_test.go | 22 +++-- x/evm/statedb/journal.go | 6 +- x/evm/statedb/state_object.go | 24 +++--- x/evm/statedb/statedb.go | 14 ++-- x/evm/statedb/statedb_test.go | 41 +++++----- 21 files changed, 304 insertions(+), 265 deletions(-) diff --git a/app/ante/eth.go b/app/ante/eth.go index 9806ae32..77594254 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -16,6 +16,7 @@ package ante import ( + "fmt" "math" "math/big" @@ -24,6 +25,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/holiman/uint256" ethermint "github.com/zeta-chain/ethermint/types" "github.com/zeta-chain/ethermint/x/evm/keeper" @@ -93,7 +95,7 @@ func (avd EthAccountVerificationDecorator) AnteHandle( "the sender is not EOA: address %s, codeHash <%s>", fromAddr, acct.CodeHash) } - if err := keeper.CheckSenderBalance(sdkmath.NewIntFromBigInt(acct.Balance), txData); err != nil { + if err := keeper.CheckSenderBalance(sdkmath.NewIntFromBigInt(acct.Balance.ToBig()), txData); err != nil { return ctx, errorsmod.Wrap(err, "failed to check sender balance") } } @@ -302,9 +304,14 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate stateDB := statedb.New(ctx, ctd.evmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes()))) evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, evmtypes.NewNoOpTracer(), stateDB) + valueU256, isOverflow := uint256.FromBig(coreMsg.Value) + if isOverflow { + return ctx, fmt.Errorf("%v is not a valid uint256", coreMsg.Value) + } + // check that caller has enough balance to cover asset transfer for **topmost** call // NOTE: here the gas consumed is from the context with the infinite gas meter - if coreMsg.Value.Sign() > 0 && !evm.Context.CanTransfer(stateDB, coreMsg.From, coreMsg.Value) { + if coreMsg.Value.Sign() > 0 && !evm.Context.CanTransfer(stateDB, coreMsg.From, valueU256) { return ctx, errorsmod.Wrapf( errortypes.ErrInsufficientFunds, "failed to transfer %s from address %s using the EVM block context transfer function", diff --git a/app/ante/eth_test.go b/app/ante/eth_test.go index e077df9d..5c9d9d4a 100644 --- a/app/ante/eth_test.go +++ b/app/ante/eth_test.go @@ -5,6 +5,7 @@ import ( "math/big" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/holiman/uint256" "github.com/zeta-chain/ethermint/app/ante" "github.com/zeta-chain/ethermint/server/config" @@ -68,7 +69,7 @@ func (suite AnteTestSuite) TestNewEthAccountVerificationDecorator() { "success new account", tx, func() { - vmdb.AddBalance(addr, big.NewInt(1000000)) + vmdb.AddBalance(addr, uint256.NewInt(1000000)) }, true, true, @@ -80,7 +81,7 @@ func (suite AnteTestSuite) TestNewEthAccountVerificationDecorator() { acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr.Bytes()) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) - vmdb.AddBalance(addr, big.NewInt(1000000)) + vmdb.AddBalance(addr, uint256.NewInt(1000000)) }, true, true, @@ -241,7 +242,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() { tx2, 0, func() { - vmdb.AddBalance(addr, big.NewInt(1000000)) + vmdb.AddBalance(addr, uint256.NewInt(1000000)) }, false, true, 0, @@ -251,7 +252,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() { tx2, 0, func() { - vmdb.AddBalance(addr, big.NewInt(1000000)) + vmdb.AddBalance(addr, uint256.NewInt(1000000)) suite.ctx = suite.ctx.WithBlockGasMeter(sdk.NewGasMeter(1)) }, false, true, @@ -262,7 +263,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() { tx2, tx2GasLimit, // it's capped func() { - vmdb.AddBalance(addr, big.NewInt(1001000000000000)) + vmdb.AddBalance(addr, uint256.NewInt(1001000000000000)) suite.ctx = suite.ctx.WithBlockGasMeter(sdk.NewGasMeter(10000000000000000000)) }, true, false, @@ -273,7 +274,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() { dynamicFeeTx, tx2GasLimit, // it's capped func() { - vmdb.AddBalance(addr, big.NewInt(1001000000000000)) + vmdb.AddBalance(addr, uint256.NewInt(1001000000000000)) suite.ctx = suite.ctx.WithBlockGasMeter(sdk.NewGasMeter(10000000000000000000)) }, true, false, @@ -284,7 +285,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() { dynamicFeeTx, 0, // for reCheckTX mode, gas limit should be set to 0 func() { - vmdb.AddBalance(addr, big.NewInt(1001000000000000)) + vmdb.AddBalance(addr, uint256.NewInt(1001000000000000)) suite.ctx = suite.ctx.WithIsReCheckTx(true) }, true, false, @@ -378,7 +379,7 @@ func (suite AnteTestSuite) TestCanTransferDecorator() { acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr.Bytes()) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) - vmdb.AddBalance(addr, big.NewInt(1000000)) + vmdb.AddBalance(addr, uint256.NewInt(1000000)) }, true, }, diff --git a/app/ante/sigs_test.go b/app/ante/sigs_test.go index 7dee412e..924031d7 100644 --- a/app/ante/sigs_test.go +++ b/app/ante/sigs_test.go @@ -3,6 +3,7 @@ package ante_test import ( "math/big" + "github.com/holiman/uint256" "github.com/zeta-chain/ethermint/tests" "github.com/zeta-chain/ethermint/x/evm/statedb" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" @@ -17,7 +18,7 @@ func (suite AnteTestSuite) TestSignatures() { acc := statedb.NewEmptyAccount() acc.Nonce = 1 - acc.Balance = big.NewInt(10000000000) + acc.Balance = uint256.NewInt(10000000000) suite.app.EvmKeeper.SetAccount(suite.ctx, addr, *acc) msgEthereumTx := evmtypes.NewTx(suite.app.EvmKeeper.ChainID(), 1, &to, big.NewInt(10), 100000, big.NewInt(1), nil, nil, nil, nil) diff --git a/go.mod b/go.mod index e955d84a..eb537f31 100644 --- a/go.mod +++ b/go.mod @@ -18,11 +18,12 @@ require ( github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-go/v7 v7.2.0 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc - github.com/ethereum/go-ethereum v1.12.2 + github.com/ethereum/go-ethereum v1.13.15 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/holiman/uint256 v1.2.4 github.com/improbable-eng/grpc-web v0.15.0 github.com/onsi/ginkgo/v2 v2.7.0 github.com/onsi/gomega v1.26.0 @@ -38,6 +39,7 @@ require ( github.com/tidwall/gjson v1.14.4 github.com/tidwall/sjson v1.2.5 github.com/tyler-smith/go-bip39 v1.1.0 + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa golang.org/x/net v0.23.0 golang.org/x/text v0.14.0 google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 @@ -58,15 +60,15 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect - github.com/DataDog/zstd v1.5.2 // indirect - github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect - github.com/VictoriaMetrics/fastcache v1.6.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/StackExchange/wmi v1.2.1 // indirect + github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/allegro/bigcache v1.2.1 // indirect github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.7.0 // indirect + github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect @@ -76,19 +78,19 @@ require ( github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.10.0 // indirect + github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v0.20.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect + github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect @@ -98,22 +100,22 @@ require ( github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect - github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 // indirect + github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/ethereum/c-kzg-4844 v0.3.1 // indirect + github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect + github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect - github.com/go-stack/stack v1.8.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect @@ -144,9 +146,8 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.3 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/huin/goupnp v1.0.3 // indirect + github.com/huin/goupnp v1.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -161,7 +162,7 @@ require ( github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect @@ -179,6 +180,7 @@ require ( github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/zerolog v1.33.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect @@ -195,8 +197,8 @@ require ( github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tklauser/go-sysconf v0.3.10 // indirect - github.com/tklauser/numcpus v0.4.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect @@ -210,19 +212,19 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.22.0 // indirect golang.org/x/term v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.15.0 // indirect google.golang.org/api v0.155.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect @@ -239,4 +241,4 @@ replace ( ) // ZetaChain maintained replacements -replace github.com/ethereum/go-ethereum => github.com/zeta-chain/go-ethereum v1.12.3-0.20241015175757-891ef9f51367 +replace github.com/ethereum/go-ethereum => github.com/zeta-chain/go-ethereum v1.13.16-0.20241018211122-a3509360e99b diff --git a/go.sum b/go.sum index 94b13437..a93ce8bd 100644 --- a/go.sum +++ b/go.sum @@ -212,21 +212,19 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= +github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= +github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= +github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= @@ -266,8 +264,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/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= @@ -342,14 +340,10 @@ github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= -github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= @@ -363,8 +357,8 @@ github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4 github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.10.0 h1:zRh22SR7o4K35SoNqouS9J/TKHTyU2QWaj5ldehyXtA= -github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= +github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= +github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -402,8 +396,10 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-kzg-4844 v0.3.0 h1:UBlWE0CgyFqqzTI+IFyCzA7A3Zw4iip6uzRv5NIXG0A= -github.com/crate-crypto/go-kzg-4844 v0.3.0/go.mod h1:SBP7ikXEgDnUPONgm33HtuDZEDtWa3L4QtN1ocJSEQ4= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= +github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= +github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -442,8 +438,8 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 h1:+3HCtB74++ClLy8GgjUQYeC8R4ILzVcIe8+5edAJJnE= -github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= +github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= +github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -469,14 +465,14 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= -github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg= -github.com/ethereum/c-kzg-4844 v0.3.1/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= +github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -489,6 +485,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -518,8 +516,9 @@ github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= @@ -534,8 +533,6 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyL github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -557,8 +554,8 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= @@ -747,21 +744,20 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= -github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= -github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= @@ -855,8 +851,9 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -1007,6 +1004,8 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1112,10 +1111,10 @@ github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= -github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= -github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= -github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= @@ -1132,8 +1131,8 @@ github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.24.1 h1:/QYYr7g0EhwXEML8jO+8OYt5trPnLHS0p3mrgExJ5NU= -github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= +github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= +github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= @@ -1144,8 +1143,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zeta-chain/go-ethereum v1.12.3-0.20241015175757-891ef9f51367 h1:smcLz1TAQB/4lT/4knII3jae8vjYvByCqimzxaxI4bo= -github.com/zeta-chain/go-ethereum v1.12.3-0.20241015175757-891ef9f51367/go.mod h1:1cRAEV+rp/xX0zraSCBnu9Py3HQ+geRMj3HdR+k0wfI= +github.com/zeta-chain/go-ethereum v1.13.16-0.20241018211122-a3509360e99b h1:b8YPHSJ9sE86yZ085rN2kmjVTtWqfkV7fOISSFkuQAw= +github.com/zeta-chain/go-ethereum v1.13.16-0.20241018211122-a3509360e99b/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= @@ -1216,8 +1215,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1244,8 +1243,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1411,7 +1410,6 @@ golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1446,7 +1444,10 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -1535,8 +1536,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1796,8 +1797,6 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= diff --git a/gomod2nix.toml b/gomod2nix.toml index fc0a7e3f..38746288 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -50,15 +50,15 @@ schema = 3 version = "v0.0.0-20200405005733-88cbf1b4c40d" hash = "sha256-i8RXZemJGlSjBT35oPm0SawFiBoIU5Pkq5xp4n/rzCY=" replaced = "github.com/ChainSafe/go-schnorrkel" - [mod."github.com/DataDog/zstd"] - version = "v1.5.2" - hash = "sha256-LVkZHLG8O4CzmqyQVbGn+0r6AKIMABej8a4HKMFw/xo=" + [mod."github.com/Microsoft/go-winio"] + version = "v0.6.1" + hash = "sha256-BL0BVaHtmPKQts/711W59AbHXjGKqFS4ZTal0RYnR9I=" [mod."github.com/StackExchange/wmi"] - version = "v0.0.0-20180116203802-5d049714c4a6" - hash = "sha256-0yUxhZB3v3ZE3QY36zHs2cJ1S4GXptXIhyAi6sI2nOo=" + version = "v1.2.1" + hash = "sha256-1BoEeWAWyebH+1mMuyPhWZut8nWHb6r73MgcqlGuUEY=" [mod."github.com/VictoriaMetrics/fastcache"] - version = "v1.6.0" - hash = "sha256-u1dkRJ2Y5+hnYlkyMPm14HxKkAv999bjN622nZDjaBo=" + version = "v1.12.1" + hash = "sha256-1oFRz6us3BnHEzww9i4vODb/2lmbFHzZV6UCENEfrC4=" [mod."github.com/allegro/bigcache"] version = "v1.2.1" hash = "sha256-/DwqBxg75m1zzOB8BWbpjQ/jYnhoe/SMXc4310mOlMA=" @@ -78,8 +78,8 @@ schema = 3 version = "v0.1.1-0.20220910012023-760eaf8b6816" hash = "sha256-Tx3sPuhsoVwrCfJdIwf4ipn7pD92OQNYvpCxl1Z9Wt0=" [mod."github.com/bits-and-blooms/bitset"] - version = "v1.7.0" - hash = "sha256-URPyLi92d/Yjul8r5g7dtf0DZ4GHbBsh8Qz4O0fDpxA=" + version = "v1.10.0" + hash = "sha256-/Kkx33umYGS1keFnkmJ+DHgIAtkEDNI42nVpKYfUOTs=" [mod."github.com/btcsuite/btcd"] version = "v0.24.2" hash = "sha256-ahlpwEr4KfyrEA899X07QtuSDnC8U+SnwL+z72DiK5E=" @@ -113,9 +113,6 @@ schema = 3 [mod."github.com/cockroachdb/logtags"] version = "v0.0.0-20230118201751-21c54148d20b" hash = "sha256-7dQH6j1o99fuxHKkw0RhNC5wJKkvRLMDJpUiVnDx6h8=" - [mod."github.com/cockroachdb/pebble"] - version = "v0.0.0-20230209160836-829675f94811" - hash = "sha256-DpbEXN/YWWXap83lz99r6sAUUk76ixDe4fRn1GpBWpo=" [mod."github.com/cockroachdb/redact"] version = "v1.1.5" hash = "sha256-0rtT7LRO0wxf9XovOK8GXRrhmx8OcbdPK/mXOKbJdog=" @@ -136,8 +133,8 @@ schema = 3 version = "v0.1.13" hash = "sha256-DEx0JuvgqNCNv7IMHlbLJK6pb1ru29C/rTSKh6YksVg=" [mod."github.com/consensys/gnark-crypto"] - version = "v0.10.0" - hash = "sha256-qcKMoiAzhJtGECQyXC/Wntmdc1qmHp89ZKkLu1Mi08o=" + version = "v0.12.1" + hash = "sha256-M7S5XbXKsvx2Uw2qNtsQg0RmlhFtSCzXEL2T3vzeq7o=" [mod."github.com/cosmos/btcutil"] version = "v1.0.5" hash = "sha256-t572Sr5iiHcuMKLMWa2i+LBAt192oa+G1oA371tG/eI=" @@ -171,9 +168,12 @@ schema = 3 [mod."github.com/cosmos/rosetta-sdk-go"] version = "v0.10.0" hash = "sha256-WmLq9E9mYV+ms6Tdb43lCoAy6cowkDnK4bvX/ApDzLY=" + [mod."github.com/crate-crypto/go-ipa"] + version = "v0.0.0-20231025140028-3c0104f4b233" + hash = "sha256-FUTI6x4sWr5QuINpwXtEG202elrhwqbxsesDc7Mp/DU=" [mod."github.com/crate-crypto/go-kzg-4844"] - version = "v0.3.0" - hash = "sha256-caco5452YhMLNnzp/q/jagYookdAP03n2OQNpmdeiRg=" + version = "v0.7.0" + hash = "sha256-vQ2CLr+JFd6zotMhOFLr4Xv1xTJTHWubmO7d2bf+Lis=" [mod."github.com/creachadair/taskgroup"] version = "v0.4.2" hash = "sha256-AjtQRoLKLSAbyKd8YlaXcYn0pek6oo5U3R28dvtKv14=" @@ -205,8 +205,8 @@ schema = 3 version = "v1.7.0" hash = "sha256-Z/M62esiZ0fVwvueVQhwz18z0eS22LZ3DJ4O8FKp3AY=" [mod."github.com/dop251/goja"] - version = "v0.0.0-20230605162241-28ee0ee714f3" - hash = "sha256-dm3HFq1Y+eRt3SGQKTQd5h8BQnPqf4l4/3KD1s95HKY=" + version = "v0.0.0-20230806174421-c933cf95e127" + hash = "sha256-oIxFk8s7nvWerfma6kEfh1iqm+B+kBo+6H1mZLdHoeU=" [mod."github.com/dustin/go-humanize"] version = "v1.0.1" hash = "sha256-yuvxYYngpfVkUg9yAmG99IUVmADTQA0tMbBXe0Fq0Mc=" @@ -214,11 +214,11 @@ schema = 3 version = "v1.6.0" hash = "sha256-IXn2BuUp4fi/i2zf1tGGW1m9xoYh3VCksB6GJ5Sf06g=" [mod."github.com/ethereum/c-kzg-4844"] - version = "v0.3.1" - hash = "sha256-TBgi2xaeR9Aq9VkvrnNduBjqNZEZLu+4si6qg68Si/s=" + version = "v0.4.0" + hash = "sha256-Ol5bznli6Dh5uXi8GUGsjZo8DzCdF0hqsUMwDNUpxP0=" [mod."github.com/ethereum/go-ethereum"] - version = "v1.12.3-0.20241015175757-891ef9f51367" - hash = "sha256-ELRj7x4a5gf9AuP2Bj9u31imD5jnffg4gENRYyVxzdg=" + version = "v1.13.16-0.20241018211122-a3509360e99b" + hash = "sha256-ijnOmKYj308G5WOlFVkMFcQ7AqMdtxrWCadikdpTVkY=" replaced = "github.com/zeta-chain/go-ethereum" [mod."github.com/felixge/httpsnoop"] version = "v1.0.4" @@ -229,6 +229,9 @@ schema = 3 [mod."github.com/gballet/go-libpcsclite"] version = "v0.0.0-20190607065134-2772fd86a8ff" hash = "sha256-Nr5ocU9s1F2Lhx/Zq6/nIo+KkKEqMjDYOEs3yWRC48g=" + [mod."github.com/gballet/go-verkle"] + version = "v0.1.1-0.20231031103413-a67434b50f46" + hash = "sha256-ccLo8Dx6QMbsn8qBoRdz6Nj464O3PgcgsMF889gPjC8=" [mod."github.com/getsentry/sentry-go"] version = "v0.23.0" hash = "sha256-VR6IL+yIc+BV5xBGfPJ7ixsAVzJ/hzuvXmkkAn1cTk4=" @@ -248,14 +251,11 @@ schema = 3 version = "v1.2.2" hash = "sha256-rRweAP7XIb4egtT1f2gkz4sYOu7LDHmcJ5iNsJUd0sE=" [mod."github.com/go-ole/go-ole"] - version = "v1.2.6" - hash = "sha256-+oxitLeJxYF19Z6g+6CgmCHJ1Y5D8raMi2Cb3M6nXCs=" + version = "v1.3.0" + hash = "sha256-tF8t3VcV71jQ4jbPL91BwR59AKDpUAFV1waIKzkXJu8=" [mod."github.com/go-sourcemap/sourcemap"] version = "v2.1.3+incompatible" hash = "sha256-eXhXPPLnAy/rmt/zDgeqni2G3o58UtnHjR8vHLXvISI=" - [mod."github.com/go-stack/stack"] - version = "v1.8.1" - hash = "sha256-ixcJ2RrK1ZH3YWGQZF9QFBo02NOuLeSp9wJ7gniipgY=" [mod."github.com/godbus/dbus"] version = "v0.0.0-20190726142602-4481cbc300e2" hash = "sha256-R7Gb9+Zjy80FbQSDGketoVEqfdOQKuOVTfWRjQ5kxZY=" @@ -359,14 +359,14 @@ schema = 3 version = "v2.0.3" hash = "sha256-5VsJMQzJSNd4F7yAl3iF/q6JodWOlE4dUvTQ0UGPe+k=" [mod."github.com/holiman/uint256"] - version = "v1.2.3" - hash = "sha256-OGf+jb7sr0p8vwqiqIBZkzZDZ2zBWf9WpRi4iouS4uE=" + version = "v1.2.4" + hash = "sha256-a9sGs7uSpOLARDk+qxt3stiE8Dq+g8vqz84Qe4XlRT0=" [mod."github.com/huandu/skiplist"] version = "v1.2.0" hash = "sha256-/r4QP1SldMlhpkr1ZQFHImSYaeMZEtqBW7R53yN+JtQ=" [mod."github.com/huin/goupnp"] - version = "v1.0.3" - hash = "sha256-EMGmTdoQhP2bVbCPX37hes5krqXn6NFexfnKr9E5u8I=" + version = "v1.3.0" + hash = "sha256-/VTfjUhHLGuXymYBC1vQJv1N8O1AjYwC/xTGd6h3Uw0=" [mod."github.com/improbable-eng/grpc-web"] version = "v0.15.0" hash = "sha256-9oqKb5Y3hjleOFE2BczbEzLH6q2Jg7kUTP/M8Yk4Ne4=" @@ -413,8 +413,8 @@ schema = 3 version = "v0.0.20" hash = "sha256-qhw9hWtU5wnyFyuMbKx+7RB8ckQaFQ8D+8GKPkN3HHQ=" [mod."github.com/mattn/go-runewidth"] - version = "v0.0.9" - hash = "sha256-dK/kIPe1tcxEubwI4CWfov/HWRBgD/fqlPC3d5i30CY=" + version = "v0.0.13" + hash = "sha256-93AwJFA8B2pwNJAPe64yN0c/CwkJNGFDWFe/HpzDVuk=" [mod."github.com/matttproud/golang_protobuf_extensions"] version = "v1.0.4" hash = "sha256-uovu7OycdeZ2oYQ7FhVxLey5ZX3T0FzShaRldndyGvc=" @@ -478,6 +478,9 @@ schema = 3 [mod."github.com/rcrowley/go-metrics"] version = "v0.0.0-20201227073835-cf1acfcdf475" hash = "sha256-10ytHQ1SpMKYTiKuOPdEMuOVa8HVvv9ryYSIF9BHEBI=" + [mod."github.com/rivo/uniseg"] + version = "v0.2.0" + hash = "sha256-GLj0jiGrT03Ept4V6FXCN1yeZ/b6PpS3MEXK6rYQ8Eg=" [mod."github.com/rogpeppe/go-internal"] version = "v1.11.0" hash = "sha256-BucSndJVnqX9e6p5PfA6Z8N2bGfIeRfxAxYLUDXTbIo=" @@ -555,11 +558,11 @@ schema = 3 version = "v1.2.5" hash = "sha256-OYGNolkmL7E1Qs2qrQ3IVpQp5gkcHNU/AB/z2O+Myps=" [mod."github.com/tklauser/go-sysconf"] - version = "v0.3.10" - hash = "sha256-Zf2NsgM9+HeM949vCce4HQtSbfUiFpeiQ716yKcFyx4=" + version = "v0.3.12" + hash = "sha256-91VBZNb3L2TZkEETF1AE4wnraLoGxKeofUbC5ZiWVHk=" [mod."github.com/tklauser/numcpus"] - version = "v0.4.0" - hash = "sha256-ndE82nOb3agubhEV7aRzEqqTlN4DPbKFHEm2+XZLn8k=" + version = "v0.6.1" + hash = "sha256-8eFcw4YI0w6+GPhU5xMMQjiio94q/O5PpNO3QsvXve0=" [mod."github.com/tyler-smith/go-bip39"] version = "v1.1.0" hash = "sha256-3YhWBtSwRLGwm7vNwqumphZG3uLBW1vwT9QkQ8JuSjU=" @@ -603,8 +606,11 @@ schema = 3 version = "v0.21.0" hash = "sha256-Z4k1LvFh4Jai7HUe6TTuXSG3VnuiRpMwdARIdZZqSYk=" [mod."golang.org/x/exp"] - version = "v0.0.0-20230905200255-921286631fa9" - hash = "sha256-CyeVwjp12Wqh4ptqfi3KHCWPzOFhE8fSrP3sMjMXvec=" + version = "v0.0.0-20231110203233-9a3e6036ecaa" + hash = "sha256-m1T4KePBRCJpAjnuq4BnDYXebOHiVI6h2489XD5R9BA=" + [mod."golang.org/x/mod"] + version = "v0.14.0" + hash = "sha256-sx3hWp5l99DBfIrn821ohfoBwvaITSHMWbzPvX0btLM=" [mod."golang.org/x/net"] version = "v0.23.0" hash = "sha256-ZB4504rtgsHbcRfijjlqt4/2ddb8tyQB5IBn126uVTQ=" @@ -626,6 +632,9 @@ schema = 3 [mod."golang.org/x/time"] version = "v0.5.0" hash = "sha256-W6RgwgdYTO3byIPOFxrP2IpAZdgaGowAaVfYby7AULU=" + [mod."golang.org/x/tools"] + version = "v0.15.0" + hash = "sha256-C2YsNcJ2ZodVscy8fQOIz5R+rql407vLrvjwVm3nrkI=" [mod."google.golang.org/api"] version = "v0.155.0" hash = "sha256-lfQZ5XNJYLOSlu+lrwYYIA3qXrraLC/PIVRHha5mlqI=" @@ -650,9 +659,6 @@ schema = 3 [mod."gopkg.in/ini.v1"] version = "v1.67.0" hash = "sha256-V10ahGNGT+NLRdKUyRg1dos5RxLBXBk1xutcnquc/+4=" - [mod."gopkg.in/natefinch/npipe.v2"] - version = "v2.0.0-20160621034901-c1b8fa8bdcce" - hash = "sha256-ytqeVZqn4kd2uc65HvEjPlpPA2VnBmPfu5DsFlO0o+g=" [mod."gopkg.in/yaml.v3"] version = "v3.0.1" hash = "sha256-FqL9TKYJ0XkNwJFnq9j0VvJ5ZUU1RvH/52h/f5bkYAU=" diff --git a/server/json_rpc.go b/server/json_rpc.go index d5d804c8..88cb278d 100644 --- a/server/json_rpc.go +++ b/server/json_rpc.go @@ -16,9 +16,12 @@ package server import ( + "context" "net/http" "time" + "golang.org/x/exp/slog" + "github.com/gorilla/mux" "github.com/rs/cors" @@ -29,10 +32,50 @@ import ( ethrpc "github.com/ethereum/go-ethereum/rpc" "github.com/zeta-chain/ethermint/rpc" + tmlog "github.com/cometbft/cometbft/libs/log" "github.com/zeta-chain/ethermint/server/config" ethermint "github.com/zeta-chain/ethermint/types" ) +type gethLogsToTm struct { + logger tmlog.Logger + attrs []slog.Attr +} + +func (g *gethLogsToTm) Enabled(_ context.Context, _ slog.Level) bool { + return true +} + +func (g *gethLogsToTm) Handle(ctx context.Context, record slog.Record) error { + attrs := g.attrs + record.Attrs(func(attr slog.Attr) bool { + attrs = append(attrs, attr) + return true + }) + switch record.Level { + case slog.LevelDebug: + g.logger.Debug(record.Message, attrs) + case slog.LevelInfo: + g.logger.Info(record.Message, attrs) + case slog.LevelWarn: + g.logger.Info(record.Message, attrs) + case slog.LevelError: + g.logger.Error(record.Message, attrs) + } + return nil +} + +func (g *gethLogsToTm) WithAttrs(attrs []slog.Attr) slog.Handler { + return &gethLogsToTm{ + logger: g.logger, + attrs: append(g.attrs, attrs...), + } +} + +func (g *gethLogsToTm) WithGroup(name string) slog.Handler { + return g +} + // StartJSONRPC starts the JSON-RPC server func StartJSONRPC(ctx *server.Context, clientCtx client.Context, @@ -44,17 +87,7 @@ func StartJSONRPC(ctx *server.Context, tmWsClient := ConnectTmWS(tmRPCAddr, tmEndpoint, ctx.Logger) logger := ctx.Logger.With("module", "geth") - ethlog.Root().SetHandler(ethlog.FuncHandler(func(r *ethlog.Record) error { - switch r.Lvl { - case ethlog.LvlTrace, ethlog.LvlDebug: - logger.Debug(r.Msg, r.Ctx...) - case ethlog.LvlInfo, ethlog.LvlWarn: - logger.Info(r.Msg, r.Ctx...) - case ethlog.LvlError, ethlog.LvlCrit: - logger.Error(r.Msg, r.Ctx...) - } - return nil - })) + ethlog.SetDefault(ethlog.NewLogger(&gethLogsToTm{logger: logger})) rpcServer := ethrpc.NewServer() diff --git a/tests/importer/importer_test.go b/tests/importer/importer_test.go index 6a7960c1..3c3bd4de 100644 --- a/tests/importer/importer_test.go +++ b/tests/importer/importer_test.go @@ -4,11 +4,11 @@ import ( "flag" "fmt" "io" - "math/big" "os" "testing" "time" + "github.com/holiman/uint256" "github.com/zeta-chain/ethermint/app" "github.com/zeta-chain/ethermint/types" @@ -40,8 +40,8 @@ import ( var ( flagBlockchain string - rewardBig8 = big.NewInt(8) - rewardBig32 = big.NewInt(32) + reward8U256 = uint256.NewInt(8) + reward32U256 = uint256.NewInt(32) ) func init() { @@ -183,18 +183,19 @@ func accumulateRewards( if config.IsByzantium(header.Number) { blockReward = ethash.ByzantiumBlockReward } - // accumulate the rewards for the miner and any included uncles - reward := new(big.Int).Set(blockReward) - r := new(big.Int) + reward := new(uint256.Int).Set(blockReward) + r := new(uint256.Int) for _, uncle := range uncles { - r.Add(uncle.Number, rewardBig8) - r.Sub(r, header.Number) + uncleNumber, _ := uint256.FromBig(uncle.Number) + headerNumber, _ := uint256.FromBig(header.Number) + r.Add(uncleNumber, reward8U256) + r.Sub(r, headerNumber) r.Mul(r, blockReward) - r.Div(r, rewardBig8) + r.Div(r, reward8U256) vmdb.AddBalance(uncle.Coinbase, r) - r.Div(blockReward, rewardBig32) + r.Div(blockReward, reward32U256) reward.Add(reward, r) } diff --git a/x/evm/genesis_test.go b/x/evm/genesis_test.go index 763fbb03..2575d9f7 100644 --- a/x/evm/genesis_test.go +++ b/x/evm/genesis_test.go @@ -1,9 +1,8 @@ package evm_test import ( - "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/holiman/uint256" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/zeta-chain/ethermint/crypto/ethsecp256k1" @@ -36,7 +35,7 @@ func (suite *EvmTestSuite) TestInitGenesis() { { "valid account", func() { - vmdb.AddBalance(address, big.NewInt(1)) + vmdb.AddBalance(address, uint256.NewInt(1)) }, &types.GenesisState{ Params: types.DefaultParams(), diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 4a3364da..41dcad74 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -31,6 +31,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" ethermint "github.com/zeta-chain/ethermint/types" @@ -39,7 +40,7 @@ import ( ) // CustomContractFn defines a custom precompiled contract generator with ctx, rules and returns a precompiled contract. -type CustomContractFn func(sdk.Context, params.Rules) vm.PrecompiledContract +type CustomContractFn func(sdk.Context, params.Rules) vm.StatefulPrecompiledContract // EventConverter type represents a function that parses a list of EventAttributes to a list of Ethereum Log objects. type EventConverter = func([]abci.EventAttribute) []*ethtypes.Log @@ -319,7 +320,7 @@ func (k *Keeper) GetAccountOrEmpty(ctx sdk.Context, addr common.Address) statedb // empty account return statedb.Account{ - Balance: new(big.Int), + Balance: new(uint256.Int), CodeHash: types.EmptyCodeHash, } } diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index a98faba7..123dbce8 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + "github.com/holiman/uint256" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -498,7 +499,7 @@ func (suite *KeeperTestSuite) TestGetAccountStorage() { func (suite *KeeperTestSuite) TestGetAccountOrEmpty() { empty := statedb.Account{ - Balance: new(big.Int), + Balance: new(uint256.Int), CodeHash: types.EmptyCodeHash, } diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index 125b880a..0d61350c 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -16,11 +16,11 @@ package keeper import ( - "bytes" + "fmt" "math/big" - "sort" tmtypes "github.com/cometbft/cometbft/types" + "github.com/holiman/uint256" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -77,37 +77,19 @@ func (k *Keeper) NewEVM( // i.e rules.IsByzantium, rules.IsConstantinople, etc. rules := cfg.ChainConfig.Rules(big.NewInt(ctx.BlockHeight()), cfg.ChainConfig.MergeNetsplitBlock != nil, 1) - contracts := make(map[common.Address]vm.PrecompiledContract) - active := make([]common.Address, 0) - - // Creates the list of **default** precompiled contracts (not stateful) for this set of rules. - // contracts hold the list of all contracts, while active holds the list of all active addresses. - // i.e create the list of contracts for Berlin. - for addr, c := range vm.DefaultPrecompiles(rules) { - contracts[addr] = c - active = append(active, addr) - } + statefulPrecompiles := make([]vm.StatefulPrecompiledContract, 0) // Add the custom stateful precompiled contracts and their addresses to the list. // Then, mark them as active. for _, fn := range k.customContractFns { c := fn(ctx, rules) - addr := c.Address() - contracts[addr] = c - active = append(active, addr) + statefulPrecompiles = append(statefulPrecompiles, c) } - // Sort the active slice in address ascending order. - sort.SliceStable(active, func(i, j int) bool { - return bytes.Compare(active[i].Bytes(), active[j].Bytes()) < 0 - }) - evm := vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig) - // Set the precompiled contracts: - // - contracts contains all the precompiled contracts. - // - active contains *only* the addresses of the active precompiled contracts. - evm.WithPrecompiles(contracts, active) + // set precompiled contracts + evm.SetStatefulPrecompiles(statefulPrecompiles) return evm } @@ -400,17 +382,25 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context, leftoverGas -= intrinsicGas rules := cfg.ChainConfig.Rules(big.NewInt(ctx.BlockHeight()), cfg.ChainConfig.MergeNetsplitBlock != nil, uint64(ctx.BlockTime().Unix())) - stateDB.Prepare(rules, msg.From, cfg.CoinBase, msg.To, evm.ActivePrecompiles(rules), msg.AccessList) + stateDB.Prepare(rules, msg.From, cfg.CoinBase, msg.To, evm.AllPrecompiledAddresses(rules), msg.AccessList) + + if msg.Value == nil { + msg.Value = new(big.Int) + } + valueUint256, isOverflow := uint256.FromBig(msg.Value) + if isOverflow { + return nil, fmt.Errorf("%v is not a valid uint256", msg.Value) + } if contractCreation { // take over the nonce management from evm: // - reset sender's nonce to msg.Nonce() before calling evm. // - increase sender's nonce by one no matter the result. stateDB.SetNonce(sender.Address(), msg.Nonce) - ret, _, leftoverGas, vmErr = evm.Create(sender, msg.Data, leftoverGas, msg.Value) + ret, _, leftoverGas, vmErr = evm.Create(sender, msg.Data, leftoverGas, valueUint256) stateDB.SetNonce(sender.Address(), msg.Nonce+1) } else { - ret, leftoverGas, vmErr = evm.Call(sender, *msg.To, msg.Data, leftoverGas, msg.Value) + ret, leftoverGas, vmErr = evm.Call(sender, *msg.To, msg.Data, leftoverGas, valueUint256) } refundQuotient := params.RefundQuotient diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index af896ac8..a68c480b 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -25,6 +25,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" + "github.com/holiman/uint256" ethermint "github.com/zeta-chain/ethermint/types" "github.com/zeta-chain/ethermint/x/evm/statedb" "github.com/zeta-chain/ethermint/x/evm/types" @@ -43,7 +44,7 @@ func (k *Keeper) GetAccount(ctx sdk.Context, addr common.Address) *statedb.Accou return nil } - acct.Balance = k.GetBalance(ctx, addr) + acct.Balance, _ = uint256.FromBig(k.GetBalance(ctx, addr)) return acct } @@ -140,7 +141,7 @@ func (k *Keeper) SetAccount(ctx sdk.Context, addr common.Address, account stated k.accountKeeper.SetAccount(ctx, acct) - if err := k.SetBalance(ctx, addr, account.Balance); err != nil { + if err := k.SetBalance(ctx, addr, account.Balance.ToBig()); err != nil { return err } diff --git a/x/evm/keeper/statedb_benchmark_test.go b/x/evm/keeper/statedb_benchmark_test.go index 3f6d1003..8ef57334 100644 --- a/x/evm/keeper/statedb_benchmark_test.go +++ b/x/evm/keeper/statedb_benchmark_test.go @@ -1,9 +1,9 @@ package keeper_test import ( - "math/big" "testing" + "github.com/holiman/uint256" "github.com/stretchr/testify/require" "github.com/ethereum/go-ethereum/common" @@ -47,7 +47,7 @@ func BenchmarkAddBalance(b *testing.B) { suite.SetupTestWithT(b) vmdb := suite.StateDB() - amt := big.NewInt(10) + amt := uint256.NewInt(10) b.ResetTimer() b.ReportAllocs() @@ -139,7 +139,7 @@ func BenchmarkSubBalance(b *testing.B) { suite.SetupTestWithT(b) vmdb := suite.StateDB() - amt := big.NewInt(10) + amt := uint256.NewInt(10) b.ResetTimer() b.ReportAllocs() diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index c1ffd2f9..9f8fe1fb 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -11,6 +11,7 @@ import ( authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/holiman/uint256" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -33,11 +34,11 @@ func (suite *KeeperTestSuite) TestCreateAccount() { "reset account (keep balance)", suite.address, func(vmdb vm.StateDB, addr common.Address) { - vmdb.AddBalance(addr, big.NewInt(100)) - suite.Require().NotZero(vmdb.GetBalance(addr).Int64()) + vmdb.AddBalance(addr, uint256.NewInt(100)) + suite.Require().NotZero(vmdb.GetBalance(addr).ToBig().Int64()) }, func(vmdb vm.StateDB, addr common.Address) { - suite.Require().Equal(vmdb.GetBalance(addr).Int64(), int64(100)) + suite.Require().Equal(vmdb.GetBalance(addr).ToBig().Int64(), int64(100)) }, }, { @@ -65,24 +66,19 @@ func (suite *KeeperTestSuite) TestCreateAccount() { func (suite *KeeperTestSuite) TestAddBalance() { testCases := []struct { name string - amount *big.Int + amount *uint256.Int isNoOp bool }{ { "positive amount", - big.NewInt(100), + uint256.NewInt(100), false, }, { "zero amount", - big.NewInt(0), + uint256.NewInt(0), true, }, - { - "negative amount", - big.NewInt(-1), - false, // seems to be consistent with go-ethereum's implementation - }, } for _, tc := range testCases { @@ -93,9 +89,9 @@ func (suite *KeeperTestSuite) TestAddBalance() { post := vmdb.GetBalance(suite.address) if tc.isNoOp { - suite.Require().Equal(prev.Int64(), post.Int64()) + suite.Require().Equal(prev.String(), post.String()) } else { - suite.Require().Equal(new(big.Int).Add(prev, tc.amount).Int64(), post.Int64()) + suite.Require().Equal(new(uint256.Int).Add(prev, tc.amount).String(), post.String()) } }) } @@ -104,36 +100,30 @@ func (suite *KeeperTestSuite) TestAddBalance() { func (suite *KeeperTestSuite) TestSubBalance() { testCases := []struct { name string - amount *big.Int + amount *uint256.Int malleate func(vm.StateDB) isNoOp bool }{ { "positive amount, below zero", - big.NewInt(100), + uint256.NewInt(100), func(vm.StateDB) {}, false, }, { "positive amount, above zero", - big.NewInt(50), + uint256.NewInt(50), func(vmdb vm.StateDB) { - vmdb.AddBalance(suite.address, big.NewInt(100)) + vmdb.AddBalance(suite.address, uint256.NewInt(100)) }, false, }, { "zero amount", - big.NewInt(0), + uint256.NewInt(0), func(vm.StateDB) {}, true, }, - { - "negative amount", - big.NewInt(-1), - func(vm.StateDB) {}, - false, - }, } for _, tc := range testCases { @@ -146,9 +136,9 @@ func (suite *KeeperTestSuite) TestSubBalance() { post := vmdb.GetBalance(suite.address) if tc.isNoOp { - suite.Require().Equal(prev.Int64(), post.Int64()) + suite.Require().Equal(prev.String(), post.String()) } else { - suite.Require().Equal(new(big.Int).Sub(prev, tc.amount).Int64(), post.Int64()) + suite.Require().Equal(new(uint256.Int).Sub(prev, tc.amount).String(), post.String()) } }) } @@ -528,7 +518,7 @@ func (suite *KeeperTestSuite) TestEmpty() { { "not empty, positive balance", suite.address, - func(vmdb vm.StateDB) { vmdb.AddBalance(suite.address, big.NewInt(100)) }, + func(vmdb vm.StateDB) { vmdb.AddBalance(suite.address, uint256.NewInt(100)) }, false, }, {"empty, account doesn't exist", tests.GenerateAddress(), func(vm.StateDB) {}, true}, diff --git a/x/evm/keeper/tracer.go b/x/evm/keeper/tracer.go index 216fff02..63e88f91 100644 --- a/x/evm/keeper/tracer.go +++ b/x/evm/keeper/tracer.go @@ -36,7 +36,7 @@ func NewTracer(tracer string, msg *core.Message, cfg *params.ChainConfig, height switch tracer { case types.TracerAccessList: - preCompiles := vm.DefaultActivePrecompiles(cfg.Rules(big.NewInt(height), cfg.MergeNetsplitBlock != nil, 1)) + preCompiles := vm.ActivePrecompiles(cfg.Rules(big.NewInt(height), cfg.MergeNetsplitBlock != nil, 1)) return logger.NewAccessListTracer(msg.AccessList, msg.From, *msg.To, preCompiles) case types.TracerJSON: return logger.NewJSONLogger(logCfg, os.Stderr) diff --git a/x/evm/keeper/utils_test.go b/x/evm/keeper/utils_test.go index 0159d909..94785c2b 100644 --- a/x/evm/keeper/utils_test.go +++ b/x/evm/keeper/utils_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" ethparams "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" "github.com/zeta-chain/ethermint/x/evm/keeper" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" ) @@ -204,9 +205,11 @@ func (suite *KeeperTestSuite) TestCheckSenderBalance() { } vmdb := suite.StateDB() - vmdb.AddBalance(suite.address, hundredInt.BigInt()) + hundredU256, isOverflow := uint256.FromBig(hundredInt.BigInt()) + suite.Require().False(isOverflow) + vmdb.AddBalance(suite.address, hundredU256) balance := vmdb.GetBalance(suite.address) - suite.Require().Equal(balance, hundredInt.BigInt()) + suite.Require().Equal(balance.String(), hundredU256.String()) err := vmdb.Commit() suite.Require().NoError(err, "Unexpected error while committing to vmdb: %d", err) @@ -239,7 +242,7 @@ func (suite *KeeperTestSuite) TestCheckSenderBalance() { acct := suite.app.EvmKeeper.GetAccountOrEmpty(suite.ctx, suite.address) err := keeper.CheckSenderBalance( - sdkmath.NewIntFromBigInt(acct.Balance), + sdkmath.NewIntFromBigInt(acct.Balance.ToBig()), txData, ) @@ -455,17 +458,20 @@ func (suite *KeeperTestSuite) TestVerifyFeeAndDeductTxCostsFromUserBalance() { } else { gasTipCap = tc.gasTipCap } - vmdb.AddBalance(suite.address, initBalance.BigInt()) + initBalanceU256, isOverflow := uint256.FromBig(initBalance.BigInt()) + suite.Require().False(isOverflow) + vmdb.AddBalance(suite.address, initBalanceU256) balance := vmdb.GetBalance(suite.address) - suite.Require().Equal(balance, initBalance.BigInt()) + suite.Require().Equal(balance.String(), initBalanceU256.String()) } else { if tc.gasPrice != nil { gasPrice = tc.gasPrice.BigInt() } - - vmdb.AddBalance(suite.address, hundredInt.BigInt()) + hundredBalanceU256, isOverflow := uint256.FromBig(hundredInt.BigInt()) + suite.Require().False(isOverflow) + vmdb.AddBalance(suite.address, hundredBalanceU256) balance := vmdb.GetBalance(suite.address) - suite.Require().Equal(balance, hundredInt.BigInt()) + suite.Require().Equal(balance.String(), hundredInt.String()) } err := vmdb.Commit() suite.Require().NoError(err, "Unexpected error while committing to vmdb: %d", err) diff --git a/x/evm/statedb/journal.go b/x/evm/statedb/journal.go index 31383bf3..865a2862 100644 --- a/x/evm/statedb/journal.go +++ b/x/evm/statedb/journal.go @@ -18,10 +18,10 @@ package statedb import ( "bytes" - "math/big" "sort" "github.com/ethereum/go-ethereum/common" + "github.com/holiman/uint256" ) // JournalEntry is a modification entry in the state change journal that can be @@ -104,13 +104,13 @@ type ( suicideChange struct { account *common.Address prev bool // whether account had already suicided - prevbalance *big.Int + prevbalance *uint256.Int } // Changes to individual accounts. balanceChange struct { account *common.Address - prev *big.Int + prev *uint256.Int } nonceChange struct { account *common.Address diff --git a/x/evm/statedb/state_object.go b/x/evm/statedb/state_object.go index dba7aa02..a70e1b15 100644 --- a/x/evm/statedb/state_object.go +++ b/x/evm/statedb/state_object.go @@ -18,11 +18,11 @@ package statedb import ( "bytes" "maps" - "math/big" "sort" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/holiman/uint256" ) var emptyCodeHash = crypto.Keccak256(nil) @@ -31,14 +31,14 @@ var emptyCodeHash = crypto.Keccak256(nil) // These objects are stored in the storage of auth module. type Account struct { Nonce uint64 - Balance *big.Int + Balance *uint256.Int CodeHash []byte } // NewEmptyAccount returns an empty account. func NewEmptyAccount() *Account { return &Account{ - Balance: new(big.Int), + Balance: new(uint256.Int), CodeHash: emptyCodeHash, } } @@ -90,7 +90,7 @@ type stateObject struct { // newObject creates a state object. func newObject(db *StateDB, address common.Address, account Account) *stateObject { if account.Balance == nil { - account.Balance = new(big.Int) + account.Balance = new(uint256.Int) } if account.CodeHash == nil { account.CodeHash = emptyCodeHash @@ -115,32 +115,32 @@ func (s *stateObject) markSuicided() { // AddBalance adds amount to s's balance. // It is used to add funds to the destination account of a transfer. -func (s *stateObject) AddBalance(amount *big.Int) { +func (s *stateObject) AddBalance(amount *uint256.Int) { if amount.Sign() == 0 { return } - s.SetBalance(new(big.Int).Add(s.Balance(), amount)) + s.SetBalance(new(uint256.Int).Add(s.Balance(), amount)) } // SubBalance removes amount from s's balance. // It is used to remove funds from the origin account of a transfer. -func (s *stateObject) SubBalance(amount *big.Int) { +func (s *stateObject) SubBalance(amount *uint256.Int) { if amount.Sign() == 0 { return } - s.SetBalance(new(big.Int).Sub(s.Balance(), amount)) + s.SetBalance(new(uint256.Int).Sub(s.Balance(), amount)) } // SetBalance update account balance. -func (s *stateObject) SetBalance(amount *big.Int) { +func (s *stateObject) SetBalance(amount *uint256.Int) { s.db.journal.append(balanceChange{ account: &s.address, - prev: new(big.Int).Set(s.account.Balance), + prev: new(uint256.Int).Set(s.account.Balance), }) s.setBalance(amount) } -func (s *stateObject) setBalance(amount *big.Int) { +func (s *stateObject) setBalance(amount *uint256.Int) { s.account.Balance = amount } @@ -208,7 +208,7 @@ func (s *stateObject) CodeHash() []byte { } // Balance returns the balance of account -func (s *stateObject) Balance() *big.Int { +func (s *stateObject) Balance() *uint256.Int { return s.account.Balance } diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index 53ef7f4d..4ff5551f 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -17,7 +17,6 @@ package statedb import ( "fmt" - "math/big" "sort" errorsmod "cosmossdk.io/errors" @@ -26,6 +25,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" + "github.com/holiman/uint256" "github.com/ethereum/go-ethereum/params" "github.com/zeta-chain/ethermint/store/cachemulti" @@ -175,12 +175,12 @@ func (s *StateDB) Empty(addr common.Address) bool { } // GetBalance retrieves the balance from the given address or 0 if object not found -func (s *StateDB) GetBalance(addr common.Address) *big.Int { +func (s *StateDB) GetBalance(addr common.Address) *uint256.Int { stateObject := s.getStateObject(addr) if stateObject != nil { return stateObject.Balance() } - return common.Big0 + return common.U2560 } // GetNonce returns the nonce of account, 0 if not exists. @@ -380,7 +380,7 @@ func (s *StateDB) CacheContext() sdk.Context { */ // AddBalance adds amount to the account associated with addr. -func (s *StateDB) AddBalance(addr common.Address, amount *big.Int) { +func (s *StateDB) AddBalance(addr common.Address, amount *uint256.Int) { stateObject := s.getOrNewStateObject(addr) if stateObject != nil { stateObject.AddBalance(amount) @@ -388,7 +388,7 @@ func (s *StateDB) AddBalance(addr common.Address, amount *big.Int) { } // SubBalance subtracts amount from the account associated with addr. -func (s *StateDB) SubBalance(addr common.Address, amount *big.Int) { +func (s *StateDB) SubBalance(addr common.Address, amount *uint256.Int) { stateObject := s.getOrNewStateObject(addr) if stateObject != nil { stateObject.SubBalance(amount) @@ -459,10 +459,10 @@ func (s *StateDB) SelfDestruct(addr common.Address) { s.journal.append(suicideChange{ account: &addr, prev: stateObject.suicided, - prevbalance: new(big.Int).Set(stateObject.Balance()), + prevbalance: new(uint256.Int).Set(stateObject.Balance()), }) stateObject.markSuicided() - stateObject.account.Balance = new(big.Int) + stateObject.account.Balance = new(uint256.Int) } func (s *StateDB) Selfdestruct6780(addr common.Address) { diff --git a/x/evm/statedb/statedb_test.go b/x/evm/statedb/statedb_test.go index 9b585baf..2fd61237 100644 --- a/x/evm/statedb/statedb_test.go +++ b/x/evm/statedb/statedb_test.go @@ -7,6 +7,7 @@ import ( consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + "github.com/holiman/uint256" dbm "github.com/cometbft/cometbft-db" "github.com/cometbft/cometbft/libs/log" @@ -61,7 +62,7 @@ func (suite *StateDBTestSuite) TestAccount() { {"non-exist account", func(db *statedb.StateDB, cms sdk.MultiStore) { suite.Require().Equal(false, db.Exist(address)) suite.Require().Equal(true, db.Empty(address)) - suite.Require().Equal(big.NewInt(0), db.GetBalance(address)) + suite.Require().Equal(uint256.NewInt(0), db.GetBalance(address)) suite.Require().Equal([]byte(nil), db.GetCode(address)) suite.Require().Equal(common.Hash{}, db.GetCodeHash(address)) suite.Require().Equal(uint64(0), db.GetNonce(address)) @@ -78,7 +79,7 @@ func (suite *StateDBTestSuite) TestAccount() { db = statedb.New(ctx, keeper, txConfig) suite.Require().Equal(true, db.Exist(address)) suite.Require().Equal(true, db.Empty(address)) - suite.Require().Equal(big.NewInt(0), db.GetBalance(address)) + suite.Require().Equal(uint256.NewInt(0), db.GetBalance(address)) suite.Require().Equal([]byte(nil), db.GetCode(address)) suite.Require().Equal(common.BytesToHash(emptyCodeHash), db.GetCodeHash(address)) suite.Require().Equal(uint64(0), db.GetNonce(address)) @@ -91,7 +92,7 @@ func (suite *StateDBTestSuite) TestAccount() { // create a contract account db.CreateAccount(address) db.SetCode(address, []byte("hello world")) - db.AddBalance(address, big.NewInt(100)) + db.AddBalance(address, uint256.NewInt(100)) db.SetState(address, key1, value1) db.SetState(address, key2, value2) codeHash := db.GetCodeHash(address) @@ -110,7 +111,7 @@ func (suite *StateDBTestSuite) TestAccount() { // check dirty state suite.Require().True(db.HasSelfDestructed(address)) // balance is cleared - suite.Require().Equal(big.NewInt(0), db.GetBalance(address)) + suite.Require().Equal(uint256.NewInt(0), db.GetBalance(address)) // but code and state are still accessible in dirty state suite.Require().Equal(value1, db.GetState(address, key1)) suite.Require().Equal([]byte("hello world"), db.GetCode(address)) @@ -142,7 +143,7 @@ func (suite *StateDBTestSuite) TestAccountOverride() { _, ctx, keeper := setupTestEnv(suite.T()) db := statedb.New(ctx, keeper, emptyTxConfig) // test balance carry over when overwritten - amount := big.NewInt(1) + amount := uint256.NewInt(1) // init an EOA account, account overriden only happens on EOA account. db.AddBalance(address, amount) @@ -184,23 +185,23 @@ func (suite *StateDBTestSuite) TestBalance() { testCases := []struct { name string malleate func(*statedb.StateDB, sdk.MultiStore) - expBalance *big.Int + expBalance *uint256.Int }{ {"add balance", func(db *statedb.StateDB, cms sdk.MultiStore) { - db.AddBalance(address, big.NewInt(10)) - }, big.NewInt(10)}, + db.AddBalance(address, uint256.NewInt(10)) + }, uint256.NewInt(10)}, {"sub balance", func(db *statedb.StateDB, cms sdk.MultiStore) { - db.AddBalance(address, big.NewInt(10)) + db.AddBalance(address, uint256.NewInt(10)) // get dirty balance - suite.Require().Equal(big.NewInt(10), db.GetBalance(address)) - db.SubBalance(address, big.NewInt(2)) - }, big.NewInt(8)}, + suite.Require().Equal(uint256.NewInt(10), db.GetBalance(address)) + db.SubBalance(address, uint256.NewInt(2)) + }, uint256.NewInt(8)}, {"add zero balance", func(db *statedb.StateDB, cms sdk.MultiStore) { - db.AddBalance(address, big.NewInt(0)) - }, big.NewInt(0)}, + db.AddBalance(address, uint256.NewInt(0)) + }, uint256.NewInt(0)}, {"sub zero balance", func(db *statedb.StateDB, cms sdk.MultiStore) { - db.SubBalance(address, big.NewInt(0)) - }, big.NewInt(0)}, + db.SubBalance(address, uint256.NewInt(0)) + }, uint256.NewInt(0)}, } for _, tc := range testCases { @@ -213,7 +214,7 @@ func (suite *StateDBTestSuite) TestBalance() { suite.Require().Equal(tc.expBalance, db.GetBalance(address)) suite.Require().NoError(db.Commit()) // check committed balance too - suite.Require().Equal(tc.expBalance, keeper.GetBalance(ctx, address)) + suite.Require().Equal(tc.expBalance.String(), keeper.GetBalance(ctx, address).String()) }) } } @@ -341,8 +342,8 @@ func (suite *StateDBTestSuite) TestRevertSnapshot() { db.SetNonce(address, 10) }}, {"change balance", func(db vm.StateDB) { - db.AddBalance(address, big.NewInt(10)) - db.SubBalance(address, big.NewInt(5)) + db.AddBalance(address, uint256.NewInt(10)) + db.SubBalance(address, uint256.NewInt(5)) }}, {"override account", func(db vm.StateDB) { db.CreateAccount(address) @@ -379,7 +380,7 @@ func (suite *StateDBTestSuite) TestRevertSnapshot() { // do some arbitrary changes to the storage db := statedb.New(ctx, keeper, emptyTxConfig) db.SetNonce(address, 1) - db.AddBalance(address, big.NewInt(100)) + db.AddBalance(address, uint256.NewInt(100)) db.SetCode(address, []byte("hello world")) db.SetState(address, v1, v2) db.SetNonce(address2, 1)