From 453ebbf7af7ad471246bbba572d2c4653c8644d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 02:06:02 +0000 Subject: [PATCH 1/2] chore(deps): bump github.com/ethereum/go-ethereum from 1.13.9 to 1.13.10 Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.13.9 to 1.13.10. - [Release notes](https://github.com/ethereum/go-ethereum/releases) - [Commits](https://github.com/ethereum/go-ethereum/compare/v1.13.9...v1.13.10) --- updated-dependencies: - dependency-name: github.com/ethereum/go-ethereum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 12 +++++++++++- go.sum | 10 ++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index d249ec3f..93ee3600 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21.1 require ( github.com/celestiaorg/celestia-app v1.6.0 github.com/celestiaorg/nmt v0.20.0 // indirect - github.com/ethereum/go-ethereum v1.13.9 + github.com/ethereum/go-ethereum v1.13.10 github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/uuid v1.5.0 // indirect @@ -99,6 +99,7 @@ require ( github.com/cosmos/iavl v0.19.6 // indirect github.com/cosmos/ibc-go/v6 v6.2.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.3 // 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.3.2 // indirect @@ -117,6 +118,7 @@ require ( github.com/elastic/gosigar v0.14.2 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/flynn/noise v1.0.1 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -134,6 +136,7 @@ require ( github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/gateway v1.1.0 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/glog v1.1.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -154,6 +157,7 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect @@ -163,6 +167,7 @@ require ( github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect + github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/huin/goupnp v1.3.0 // indirect @@ -213,6 +218,7 @@ require ( github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect @@ -252,6 +258,7 @@ require ( github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.2 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect @@ -271,7 +278,9 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ulikunitz/xz v0.5.10 // indirect + github.com/urfave/cli/v2 v2.25.7 // indirect github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect + github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.6 // indirect @@ -299,6 +308,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index cb5e2316..79af87b8 100644 --- a/go.sum +++ b/go.sum @@ -215,6 +215,8 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= @@ -460,7 +462,6 @@ github.com/cosmos/ibc-go/v6 v6.2.0 h1:HKS5WNxQrlmjowHb73J9LqlNJfvTnvkbhXZ9QzNTU7 github.com/cosmos/ibc-go/v6 v6.2.0/go.mod h1:+S3sxcNwOhgraYDJAhIFDg5ipXHaUnJrg7tOQqGyWlc= github.com/cosmos/ledger-cosmos-go v0.13.2 h1:aY0KZSmUwNKbBm9OvbIjvf7Ozz2YzzpAbgvN2C8x2T0= github.com/cosmos/ledger-cosmos-go v0.13.2/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= 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.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -556,8 +557,8 @@ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHj 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/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= -github.com/ethereum/go-ethereum v1.13.9 h1:ed4e4c7NWPrO2VX2wsMhWs5+6Lf2D591DmdE8RgmtcU= -github.com/ethereum/go-ethereum v1.13.9/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= +github.com/ethereum/go-ethereum v1.13.10 h1:Ppdil79nN+Vc+mXfge0AuUgmKWuVv4eMqzoIVSdqZek= +github.com/ethereum/go-ethereum v1.13.10/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -688,7 +689,6 @@ github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q8 github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= 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= @@ -1413,7 +1413,6 @@ github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -1576,7 +1575,6 @@ github.com/ulikunitz/xz v0.5.10/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/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.10 h1:p8Fspmz3iTctJstry1PYS3HVdllxnEzTEsgIgtxTrCk= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= From 9a7be30fa0d16853dd61c4292514ed563fd1e52e Mon Sep 17 00:00:00 2001 From: sweexordious Date: Mon, 15 Jan 2024 11:46:03 +0100 Subject: [PATCH 2/2] chore: bump ethereum version changes --- evm/evm_client_test.go | 8 ++++---- relayer/historic_suite_test.go | 2 +- relayer/relayer_test.go | 6 +++--- relayer/suite_test.go | 2 +- testing/evm_chain.go | 8 +++++--- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/evm/evm_client_test.go b/evm/evm_client_test.go index d3bb5a0b..35b1ac18 100644 --- a/evm/evm_client_test.go +++ b/evm/evm_client_test.go @@ -15,7 +15,7 @@ import ( func (s *EVMTestSuite) TestSubmitDataCommitment() { // deploy a new bridge contract - _, _, _, err := s.Client.DeployBlobstreamContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) + _, _, _, err := s.Client.DeployBlobstreamContract(s.Chain.Auth, s.Chain.Backend.Client(), *s.InitVs, 1, true) s.NoError(err) // we just need something to sign over, it doesn't matter what @@ -61,7 +61,7 @@ func (s *EVMTestSuite) TestSubmitDataCommitment() { s.NoError(err) s.Chain.Backend.Commit() - recp, err := s.Chain.Backend.TransactionReceipt(context.TODO(), tx.Hash()) + recp, err := s.Chain.Backend.Client().TransactionReceipt(context.TODO(), tx.Hash()) s.NoError(err) s.Assert().Equal(uint64(1), recp.Status) @@ -72,7 +72,7 @@ func (s *EVMTestSuite) TestSubmitDataCommitment() { func (s *EVMTestSuite) TestUpdateValset() { // deploy a new bridge contract - _, _, _, err := s.Client.DeployBlobstreamContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) + _, _, _, err := s.Client.DeployBlobstreamContract(s.Chain.Auth, s.Chain.Backend.Client(), *s.InitVs, 1, true) s.NoError(err) updatedValset := celestiatypes.Valset{ @@ -134,7 +134,7 @@ func (s *EVMTestSuite) TestUpdateValset() { s.NoError(err) s.Chain.Backend.Commit() - recp, err := s.Chain.Backend.TransactionReceipt(context.TODO(), tx.Hash()) + recp, err := s.Chain.Backend.Client().TransactionReceipt(context.TODO(), tx.Hash()) s.NoError(err) s.Equal(uint64(1), recp.Status) diff --git a/relayer/historic_suite_test.go b/relayer/historic_suite_test.go index fa00c9e1..beb3bdaa 100644 --- a/relayer/historic_suite_test.go +++ b/relayer/historic_suite_test.go @@ -52,7 +52,7 @@ func (s *HistoricalRelayerTestSuite) SetupSuite() { go s.Node.EVMChain.PeriodicCommit(ctx, time.Millisecond) initVs, err := s.Relayer.AppQuerier.QueryLatestValset(s.Node.Context) require.NoError(t, err) - _, _, _, err = s.Relayer.EVMClient.DeployBlobstreamContract(s.Node.EVMChain.Auth, s.Node.EVMChain.Backend, *initVs, initVs.Nonce, true) + _, _, _, err = s.Relayer.EVMClient.DeployBlobstreamContract(s.Node.EVMChain.Auth, s.Node.EVMChain.Backend.Client(), *initVs, initVs.Nonce, true) require.NoError(t, err) rpc.BlocksIn20DaysPeriod = 50 } diff --git a/relayer/relayer_test.go b/relayer/relayer_test.go index f8863eef..3daf6de6 100644 --- a/relayer/relayer_test.go +++ b/relayer/relayer_test.go @@ -40,7 +40,7 @@ func (s *RelayerTestSuite) TestProcessAttestation() { tx, err := s.Relayer.ProcessAttestation(ctx, s.Node.EVMChain.Auth, att) require.NoError(t, err) - receipt, err := s.Relayer.EVMClient.WaitForTransaction(ctx, s.Node.EVMChain.Backend, tx, 20*time.Second) + receipt, err := s.Relayer.EVMClient.WaitForTransaction(ctx, s.Node.EVMChain.Backend.Client(), tx, 20*time.Second) assert.NoError(t, err) assert.Equal(t, uint64(1), receipt.Status) @@ -106,14 +106,14 @@ func TestUseValsetFromP2P(t *testing.T) { relayer := blobstreamtesting.NewRelayer(t, node) go node.EVMChain.PeriodicCommit(ctx, time.Millisecond) - _, _, _, err = relayer.EVMClient.DeployBlobstreamContract(node.EVMChain.Auth, node.EVMChain.Backend, *latestValset.ToValset(), latestValset.Nonce, true) + _, _, _, err = relayer.EVMClient.DeployBlobstreamContract(node.EVMChain.Auth, node.EVMChain.Backend.Client(), *latestValset.ToValset(), latestValset.Nonce, true) require.NoError(t, err) // make sure the relayer is able to relay the signature using the pruned valset tx, err := relayer.ProcessAttestation(ctx, node.EVMChain.Auth, att) require.NoError(t, err) - receipt, err := relayer.EVMClient.WaitForTransaction(ctx, node.EVMChain.Backend, tx, 20*time.Second) + receipt, err := relayer.EVMClient.WaitForTransaction(ctx, node.EVMChain.Backend.Client(), tx, 20*time.Second) assert.NoError(t, err) assert.Equal(t, uint64(1), receipt.Status) diff --git a/relayer/suite_test.go b/relayer/suite_test.go index 22d87716..3dd91edb 100644 --- a/relayer/suite_test.go +++ b/relayer/suite_test.go @@ -34,7 +34,7 @@ func (s *RelayerTestSuite) SetupSuite() { go s.Node.EVMChain.PeriodicCommit(ctx, time.Millisecond) initVs, err := s.Relayer.AppQuerier.QueryLatestValset(s.Node.Context) require.NoError(t, err) - _, _, _, err = s.Relayer.EVMClient.DeployBlobstreamContract(s.Node.EVMChain.Auth, s.Node.EVMChain.Backend, *initVs, initVs.Nonce, true) + _, _, _, err = s.Relayer.EVMClient.DeployBlobstreamContract(s.Node.EVMChain.Auth, s.Node.EVMChain.Backend.Client(), *initVs, initVs.Nonce, true) require.NoError(t, err) } diff --git a/testing/evm_chain.go b/testing/evm_chain.go index 7aae5fa3..9c01a3a2 100644 --- a/testing/evm_chain.go +++ b/testing/evm_chain.go @@ -6,8 +6,10 @@ import ( "math/big" "time" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/ethclient/simulated" + "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" ethcmn "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ) @@ -20,7 +22,7 @@ const EVMTestNetworkChainID = 1337 type EVMChain struct { Auth *bind.TransactOpts GenesisAlloc core.GenesisAlloc - Backend *backends.SimulatedBackend + Backend *simulated.Backend Key *ecdsa.PrivateKey // TODO provide the keystore directly here ChainID uint64 } @@ -39,7 +41,7 @@ func NewEVMChain(key *ecdsa.PrivateKey) *EVMChain { auth.From: {Balance: genBal}, } - backend := backends.NewSimulatedBackend(gAlloc, 100000000000000) + backend := simulated.New(gAlloc, math.MaxUint64-1) return &EVMChain{ Auth: auth,