Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump github.com/ethereum/go-ethereum from 1.13.11 to 1.14.6 #399

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/loadtest/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ func generateBlobCommitment(data []byte) (*BlobCommitment, error) {
var err error

// Generate blob commitment
blobCommitment.Commitment, err = kzg4844.BlobToCommitment(blobCommitment.Blob)
blobCommitment.Commitment, err = kzg4844.BlobToCommitment(&blobCommitment.Blob)
if err != nil {
return nil, fmt.Errorf("Failed generating blob commitment: %w", err)
}

// Generate blob proof
blobCommitment.Proof, err = kzg4844.ComputeBlobProof(blobCommitment.Blob, blobCommitment.Commitment)
blobCommitment.Proof, err = kzg4844.ComputeBlobProof(&blobCommitment.Blob, blobCommitment.Commitment)
if err != nil {
return nil, fmt.Errorf("Failed generating blob proof: %w", err)
}
Expand Down
24 changes: 14 additions & 10 deletions cmd/loadtest/loadtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
ethcommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
ethtypes "github.com/ethereum/go-ethereum/core/types"
leovct marked this conversation as resolved.
Show resolved Hide resolved
ethcrypto "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient"
Expand Down Expand Up @@ -324,7 +323,7 @@ func initializeLoadTestParams(ctx context.Context, c *ethclient.Client) error {
return nil
}

func initNonce(ctx context.Context, c *ethclient.Client, rpc *ethrpc.Client) error {
func initNonce(ctx context.Context, c *ethclient.Client) error {
currentNonceMutex.Lock()
defer currentNonceMutex.Unlock()

Expand Down Expand Up @@ -650,7 +649,7 @@ func mainLoop(ctx context.Context, c *ethclient.Client, rpc *ethrpc.Client) erro
}

var i int64
err = initNonce(ctx, c, rpc)
err = initNonce(ctx, c)
if err != nil {
return err
}
Expand Down Expand Up @@ -1298,13 +1297,18 @@ func loadTestRPC(ctx context.Context, c *ethclient.Client, nonce uint64, ia *Ind
log.Error().Err(err).Str("txHash", pt.Hash().String()).Msg("issue converting poly transaction to json")
return
}
var tx apitypes.SendTxArgs
err = json.Unmarshal(rawTxData, &tx)
var txArgs apitypes.SendTxArgs
if err = json.Unmarshal(rawTxData, &txArgs); err != nil {
log.Error().Err(err).Str("txHash", pt.Hash().String()).Msg("unable to unmarshal poly transaction to json")
return
}
var tx *ethtypes.Transaction
tx, err = txArgs.ToTransaction()
if err != nil {
log.Error().Err(err).Str("txHash", pt.Hash().String()).Msg("unable to unmarshal poly transaction to json.")
log.Error().Err(err).Str("txArgs", txArgs.String()).Msg("unable to convert the arguments to a transaction")
return
}
cm := txToCallMsg(tx.ToTransaction())
cm := txToCallMsg(tx)
cm.From = pt.From()
_, err = c.EstimateGas(ctx, cm)
} else if funcNum < 33 {
Expand Down Expand Up @@ -1601,7 +1605,7 @@ func loadTestBlob(ctx context.Context, c *ethclient.Client, nonce uint64) (t1 ti
Data: nil,
AccessList: nil,
BlobHashes: make([]common.Hash, 0),
Sidecar: &types.BlobTxSidecar{
Sidecar: &ethtypes.BlobTxSidecar{
Blobs: make([]kzg4844.Blob, 0),
Commitments: make([]kzg4844.Commitment, 0),
Proofs: make([]kzg4844.Proof, 0),
Expand All @@ -1618,9 +1622,9 @@ func loadTestBlob(ctx context.Context, c *ethclient.Client, nonce uint64) (t1 ti
log.Error().Err(err).Msg("Unable to parse blob")
return
}
tx := types.NewTx(&blobTx)
tx := ethtypes.NewTx(&blobTx)

stx, err := types.SignTx(tx, types.LatestSignerForChainID(chainID), privateKey)
stx, err := ethtypes.SignTx(tx, ethtypes.LatestSignerForChainID(chainID), privateKey)
if err != nil {
log.Error().Err(err).Msg("Unable to sign transaction")
return
Expand Down
4 changes: 2 additions & 2 deletions cmd/p2p/sensor/sensor.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ func getPeerMessages(url string, counter *prometheus.CounterVec) p2p.MessageCoun
BlockBodiesRequests: getCounterValue(new(eth.GetBlockBodiesPacket), url, counter),
Transactions: getCounterValue(new(eth.TransactionsPacket), url, counter) +
getCounterValue(new(eth.PooledTransactionsPacket), url, counter),
TransactionHashes: getCounterValue(new(eth.NewPooledTransactionHashesPacket67), url, counter) +
getCounterValue(new(eth.NewPooledTransactionHashesPacket68), url, counter),
TransactionHashes: getCounterValue(new(eth.NewPooledTransactionHashesPacket), url, counter) +
getCounterValue(new(eth.NewPooledTransactionHashesPacket), url, counter),
TransactionRequests: getCounterValue(new(eth.GetPooledTransactionsRequest), url, counter),
}
}
Expand Down
33 changes: 19 additions & 14 deletions cmd/signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
accounts2 "github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/signer/core/apitypes"
"github.com/google/tink/go/kwp/subtle"
Expand Down Expand Up @@ -263,7 +263,7 @@ var ImportCmd = &cobra.Command{
},
}

func getTxDataToSign() (*types.Transaction, error) {
func getTxDataToSign() (*ethtypes.Transaction, error) {
if *inputSignerOpts.dataFile == "" {
return nil, fmt.Errorf("no datafile was specified to sign")
}
Expand All @@ -273,12 +273,17 @@ func getTxDataToSign() (*types.Transaction, error) {
}

// TODO at some point we should support signing other data types besides transactions
var tx apitypes.SendTxArgs
err = json.Unmarshal(dataToSign, &tx)
var txArgs apitypes.SendTxArgs
if err = json.Unmarshal(dataToSign, &txArgs); err != nil {
return nil, err
}
var tx *ethtypes.Transaction
tx, err = txArgs.ToTransaction()
if err != nil {
log.Error().Err(err).Str("txArgs", txArgs.String()).Msg("unable to convert the arguments to a transaction")
return nil, err
}
return tx.ToTransaction(), nil
return tx, nil

}
func sign(pk *ecdsa.PrivateKey) error {
Expand All @@ -290,14 +295,14 @@ func sign(pk *ecdsa.PrivateKey) error {
if err != nil {
return err
}
signedTx, err := types.SignTx(tx, signer, pk)
signedTx, err := ethtypes.SignTx(tx, signer, pk)
if err != nil {
return err
}
return outputSignedTx(signedTx)
}

func outputSignedTx(signedTx *types.Transaction) error {
func outputSignedTx(signedTx *ethtypes.Transaction) error {
rawTx, err := signedTx.MarshalBinary()
if err != nil {
return err
Expand Down Expand Up @@ -623,7 +628,7 @@ type pkcs8 struct {
// optional attributes omitted.
}

func (g *GCPKMS) Sign(ctx context.Context, tx *types.Transaction) error {
func (g *GCPKMS) Sign(ctx context.Context, tx *ethtypes.Transaction) error {
name := fmt.Sprintf("projects/%s/locations/%s/keyRings/%s/cryptoKeys/%s/cryptoKeyVersions/%d", *inputSignerOpts.gcpProjectID, *inputSignerOpts.gcpRegion, *inputSignerOpts.gcpKeyRingID, *inputSignerOpts.keyID, *inputSignerOpts.gcpKeyVersion)

client, err := kms.NewKeyManagementClient(ctx)
Expand Down Expand Up @@ -812,19 +817,19 @@ var passwordPrompt = promptui.Prompt{
Mask: '*',
}

func getSigner() (types.Signer, error) {
func getSigner() (ethtypes.Signer, error) {
chainID := new(big.Int).SetUint64(*inputSignerOpts.chainID)
switch *inputSignerOpts.signerType {
case "latest":
return types.LatestSignerForChainID(chainID), nil
return ethtypes.LatestSignerForChainID(chainID), nil
case "cancun":
return types.NewCancunSigner(chainID), nil
return ethtypes.NewCancunSigner(chainID), nil
case "london":
return types.NewLondonSigner(chainID), nil
return ethtypes.NewLondonSigner(chainID), nil
case "eip2930":
return types.NewEIP2930Signer(chainID), nil
return ethtypes.NewEIP2930Signer(chainID), nil
case "eip155":
return types.NewEIP155Signer(chainID), nil
return ethtypes.NewEIP155Signer(chainID), nil
}
return nil, fmt.Errorf("signer %s is not recognized", *inputSignerOpts.signerType)
}
Expand Down
101 changes: 51 additions & 50 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
module github.com/0xPolygon/polygon-cli

go 1.21
go 1.22.0

toolchain go1.23.2

require (
cloud.google.com/go/datastore v1.19.0
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/cenkalti/backoff/v4 v4.3.0
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593
github.com/ethereum/go-ethereum v1.13.11
github.com/chzyer/readline v1.5.1 // indirect
github.com/cockroachdb/pebble v1.1.2
github.com/ethereum/go-ethereum v1.14.11
github.com/gizak/termui/v3 v3.1.1-0.20231111080052-b3569a6cd52d
github.com/google/gofuzz v1.2.0
github.com/hashicorp/golang-lru v1.0.2
github.com/jedib0t/go-pretty/v6 v6.5.9
github.com/libp2p/go-libp2p v0.31.0
github.com/jedib0t/go-pretty/v6 v6.6.0
github.com/libp2p/go-libp2p v0.36.5
github.com/manifoldco/promptui v0.9.0
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.60.0
github.com/rs/zerolog v1.33.0
github.com/schollz/progressbar/v3 v3.15.0
github.com/schollz/progressbar/v3 v3.16.1
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
Expand All @@ -29,7 +31,7 @@ require (
github.com/tyler-smith/go-bip39 v1.1.0
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/crypto v0.28.0
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/text v0.19.0
golang.org/x/time v0.7.0
google.golang.org/api v0.200.0
Expand All @@ -41,57 +43,56 @@ require github.com/alecthomas/participle/v2 v2.1.1
require github.com/go-errors/errors v1.5.1 // indirect

require (
cloud.google.com/go v0.115.1 // indirect
cloud.google.com/go v0.116.0 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/DataDog/zstd v1.5.6 // indirect
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/bits-and-blooms/bitset v1.14.3 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/consensys/bavard v0.1.22 // indirect
github.com/consensys/gnark-crypto v0.14.0 // indirect
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/ethereum/c-kzg-4844 v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/getsentry/sentry-go v0.29.1 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gofrs/flock v0.12.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/hcl v1.0.1-vault // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.3.1
github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/magiconair/properties v1.8.7 // 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.15 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
Expand All @@ -100,49 +101,47 @@ require (
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/multiformats/go-multiaddr v0.12.1 // indirect
github.com/multiformats/go-multiaddr v0.13.0 // indirect
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multicodec v0.9.0 // indirect
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/nsf/termbox-go v1.1.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.4
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/supranational/blst v0.3.13 // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.9.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/grpc v1.67.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

Expand All @@ -159,17 +158,19 @@ require (
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
cloud.google.com/go/iam v1.2.1 // indirect
cloud.google.com/go/longrunning v0.6.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
)
Loading
Loading