From 682cba9f3f03900378d51401a90d22ebf62c6ef6 Mon Sep 17 00:00:00 2001 From: danidomi Date: Fri, 16 Aug 2024 20:05:24 +0100 Subject: [PATCH] feat: sort imports --- accounts/abi/event_test.go | 5 +++-- accounts/abi/type_test.go | 1 + accounts/abi/unpack_test.go | 3 ++- accounts/keystore/file_cache.go | 1 + accounts/keystore/key.go | 3 ++- accounts/keystore/passphrase.go | 7 ++++--- accounts/keystore/presale.go | 5 +++-- accounts/keystore/watch.go | 3 ++- accounts/scwallet/hub.go | 3 ++- accounts/scwallet/securechannel.go | 3 ++- accounts/scwallet/wallet.go | 5 +++-- accounts/usbwallet/hub.go | 3 ++- accounts/usbwallet/trezor.go | 3 ++- accounts/usbwallet/wallet.go | 3 ++- beacon/blsync/client.go | 3 ++- beacon/blsync/config.go | 3 ++- beacon/light/api/light_api.go | 1 + beacon/types/committee.go | 3 ++- beacon/types/exec_header.go | 5 +++-- beacon/types/exec_payload.go | 7 ++++--- beacon/types/header.go | 3 ++- cmd/abigen/main.go | 3 ++- cmd/blsync/main.go | 3 ++- cmd/clef/main.go | 7 ++++--- cmd/devp2p/discv4cmd.go | 3 ++- cmd/devp2p/discv5cmd.go | 3 ++- cmd/devp2p/dns_cloudflare.go | 3 ++- cmd/devp2p/dns_route53.go | 3 ++- cmd/devp2p/dnscmd.go | 3 ++- cmd/devp2p/enrcmd.go | 3 ++- cmd/devp2p/internal/ethtest/chain_test.go | 3 ++- cmd/devp2p/internal/ethtest/conn.go | 1 + cmd/devp2p/internal/ethtest/engine.go | 3 ++- cmd/devp2p/internal/ethtest/suite.go | 3 ++- cmd/devp2p/keycmd.go | 3 ++- cmd/devp2p/main.go | 3 ++- cmd/devp2p/nodesetcmd.go | 3 ++- cmd/devp2p/rlpxcmd.go | 3 ++- cmd/devp2p/runtest.go | 3 ++- cmd/era/main.go | 3 ++- cmd/ethkey/changepassword.go | 3 ++- cmd/ethkey/generate.go | 5 +++-- cmd/ethkey/inspect.go | 3 ++- cmd/ethkey/main.go | 3 ++- cmd/ethkey/message.go | 3 ++- cmd/ethkey/utils.go | 3 ++- cmd/evm/disasm.go | 3 ++- cmd/evm/internal/t8ntool/execution.go | 5 +++-- cmd/evm/internal/t8ntool/flags.go | 3 ++- cmd/evm/internal/t8ntool/transaction.go | 3 ++- cmd/evm/internal/t8ntool/transition.go | 3 ++- cmd/evm/main.go | 3 ++- cmd/evm/runner.go | 3 ++- cmd/evm/staterunner.go | 3 ++- cmd/geth/chaincmd.go | 3 ++- cmd/geth/consolecmd.go | 3 ++- cmd/geth/dbcmd.go | 5 +++-- cmd/geth/logtestcmd_active.go | 5 +++-- cmd/geth/main.go | 3 ++- cmd/geth/misccmd.go | 3 ++- cmd/geth/snapshot.go | 3 ++- cmd/geth/verkle.go | 5 +++-- cmd/geth/version_check.go | 3 ++- cmd/utils/cmd.go | 3 ++- cmd/utils/flags.go | 7 ++++--- cmd/utils/flags_legacy.go | 3 ++- common/mclock/mclock.go | 1 - common/types.go | 3 ++- consensus/beacon/consensus.go | 3 ++- consensus/clique/clique.go | 3 ++- consensus/ethash/consensus.go | 5 +++-- consensus/ethash/difficulty.go | 3 ++- consensus/misc/dao.go | 3 ++- console/bridge.go | 1 + console/bridge_test.go | 1 + console/console.go | 5 +++-- core/rawdb/database.go | 3 ++- core/rawdb/freezer.go | 3 ++- core/rawdb/freezer_batch.go | 3 ++- core/rawdb/freezer_table.go | 3 ++- core/rawdb/freezer_table_test.go | 3 ++- core/rawdb/freezer_test.go | 3 ++- core/state/pruner/bloom.go | 3 ++- core/state/snapshot/journal.go | 1 + core/vm/common.go | 3 ++- core/vm/contract.go | 3 ++- core/vm/contracts.go | 3 ++- core/vm/eips.go | 3 ++- core/vm/evm.go | 3 ++- core/vm/gas_table_test.go | 3 ++- core/vm/instructions.go | 3 ++- core/vm/instructions_test.go | 3 ++- core/vm/interface.go | 3 ++- core/vm/interpreter.go | 3 ++- core/vm/interpreter_test.go | 3 ++- core/vm/runtime/runtime.go | 3 ++- crypto/bn256/cloudflare/lattice_test.go | 1 - crypto/bn256/cloudflare/main_test.go | 3 +-- crypto/bn256/google/main_test.go | 3 +-- crypto/crypto.go | 3 ++- crypto/kzg4844/kzg4844_ckzg_cgo.go | 1 + eth/gasprice/gasprice_test.go | 3 ++- eth/handler_test.go | 3 ++- eth/protocols/eth/peer.go | 1 + eth/protocols/snap/handler_fuzzing_test.go | 3 ++- eth/protocols/snap/range.go | 3 ++- eth/protocols/snap/sync_test.go | 5 +++-- eth/tracers/js/goja.go | 3 ++- eth/tracers/js/tracer_test.go | 3 ++- eth/tracers/live/supply.go | 3 ++- eth/tracers/logger/logger.go | 3 ++- eth/tracers/logger/logger_test.go | 3 ++- eth/tracers/native/call_flat_test.go | 3 ++- ethstats/ethstats.go | 3 ++- graphql/service.go | 5 +++-- internal/blocktest/test_hash.go | 3 ++- internal/debug/api.go | 3 ++- internal/debug/flags.go | 9 +++++---- internal/era/builder.go | 3 ++- internal/era/era.go | 3 ++- internal/ethapi/transaction_args.go | 3 ++- internal/flags/flags.go | 3 ++- internal/flags/helpers.go | 5 +++-- internal/jsre/jsre.go | 1 + metrics/cpu_enabled.go | 3 ++- metrics/influxdb/influxdb_test.go | 3 ++- metrics/influxdb/influxdbv1.go | 3 ++- metrics/influxdb/influxdbv2.go | 5 +++-- p2p/discover/v4wire/v4wire_test.go | 1 + p2p/discover/v5_udp_test.go | 3 ++- p2p/discover/v5wire/crypto.go | 3 ++- p2p/dnsdisc/client.go | 5 +++-- p2p/dnsdisc/client_test.go | 1 + p2p/dnsdisc/tree.go | 3 ++- p2p/dnsdisc/tree_test.go | 1 + p2p/enode/idscheme.go | 3 ++- p2p/enode/idscheme_test.go | 5 +++-- p2p/enode/localnode_test.go | 3 ++- p2p/enode/node_test.go | 3 ++- p2p/enode/nodedb.go | 5 +++-- p2p/enr/enr_test.go | 3 ++- p2p/nat/nat.go | 3 ++- p2p/rlpx/buffer_test.go | 3 ++- p2p/rlpx/rlpx.go | 5 +++-- p2p/rlpx/rlpx_test.go | 3 ++- p2p/transport_test.go | 1 + rlp/decode.go | 3 ++- rlp/decode_test.go | 3 ++- rlp/encode.go | 3 ++- rlp/encode_test.go | 3 ++- rpc/client_test.go | 1 + rpc/websocket.go | 3 ++- signer/core/apitypes/types.go | 3 ++- signer/core/apitypes/types_test.go | 3 ++- signer/rules/rules.go | 1 + tests/state_test.go | 3 ++- tests/state_test_util.go | 5 +++-- triedb/hashdb/database.go | 1 + triedb/pathdb/database_test.go | 3 ++- triedb/pathdb/disklayer.go | 1 + triedb/pathdb/history.go | 3 ++- triedb/pathdb/nodebuffer.go | 1 + 162 files changed, 330 insertions(+), 176 deletions(-) diff --git a/accounts/abi/event_test.go b/accounts/abi/event_test.go index fffe28ea63..316a66cf66 100644 --- a/accounts/abi/event_test.go +++ b/accounts/abi/event_test.go @@ -25,10 +25,11 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" ) var jsonEventTransfer = []byte(`{ diff --git a/accounts/abi/type_test.go b/accounts/abi/type_test.go index 95922548c4..2425271ca4 100644 --- a/accounts/abi/type_test.go +++ b/accounts/abi/type_test.go @@ -22,6 +22,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/common" ) diff --git a/accounts/abi/unpack_test.go b/accounts/abi/unpack_test.go index 29891ec0a4..4ee2f662b8 100644 --- a/accounts/abi/unpack_test.go +++ b/accounts/abi/unpack_test.go @@ -27,8 +27,9 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/common" ) // TestUnpack tests the general pack/unpack tests in packing_test.go diff --git a/accounts/keystore/file_cache.go b/accounts/keystore/file_cache.go index 63eb850374..87cc73a921 100644 --- a/accounts/keystore/file_cache.go +++ b/accounts/keystore/file_cache.go @@ -24,6 +24,7 @@ import ( "time" mapset "github.com/deckarep/golang-set/v2" + "github.com/ethereum/go-ethereum/log" ) diff --git a/accounts/keystore/key.go b/accounts/keystore/key.go index 9b2ac14712..6b71e3639c 100644 --- a/accounts/keystore/key.go +++ b/accounts/keystore/key.go @@ -28,10 +28,11 @@ import ( "strings" "time" + "github.com/google/uuid" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/google/uuid" ) const ( diff --git a/accounts/keystore/passphrase.go b/accounts/keystore/passphrase.go index e7a7f8d0cb..55ff9685bc 100644 --- a/accounts/keystore/passphrase.go +++ b/accounts/keystore/passphrase.go @@ -37,13 +37,14 @@ import ( "os" "path/filepath" + "github.com/google/uuid" + "golang.org/x/crypto/pbkdf2" + "golang.org/x/crypto/scrypt" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto" - "github.com/google/uuid" - "golang.org/x/crypto/pbkdf2" - "golang.org/x/crypto/scrypt" ) const ( diff --git a/accounts/keystore/presale.go b/accounts/keystore/presale.go index 0664dc2cdd..9d1ba5db59 100644 --- a/accounts/keystore/presale.go +++ b/accounts/keystore/presale.go @@ -25,10 +25,11 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/crypto" "github.com/google/uuid" "golang.org/x/crypto/pbkdf2" + + "github.com/ethereum/go-ethereum/accounts" + "github.com/ethereum/go-ethereum/crypto" ) // creates a Key and stores that in the given KeyStore by decrypting a presale key JSON diff --git a/accounts/keystore/watch.go b/accounts/keystore/watch.go index 1bef321cd1..45a20a26e3 100644 --- a/accounts/keystore/watch.go +++ b/accounts/keystore/watch.go @@ -23,8 +23,9 @@ import ( "os" "time" - "github.com/ethereum/go-ethereum/log" "github.com/fsnotify/fsnotify" + + "github.com/ethereum/go-ethereum/log" ) type watcher struct { diff --git a/accounts/scwallet/hub.go b/accounts/scwallet/hub.go index 1b1899dc8e..52a4473435 100644 --- a/accounts/scwallet/hub.go +++ b/accounts/scwallet/hub.go @@ -41,11 +41,12 @@ import ( "sync" "time" + pcsc "github.com/gballet/go-libpcsclite" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" - pcsc "github.com/gballet/go-libpcsclite" ) // Scheme is the URI prefix for smartcard wallets. diff --git a/accounts/scwallet/securechannel.go b/accounts/scwallet/securechannel.go index b3a7be8df0..9cfa174c74 100644 --- a/accounts/scwallet/securechannel.go +++ b/accounts/scwallet/securechannel.go @@ -26,10 +26,11 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/crypto" pcsc "github.com/gballet/go-libpcsclite" "golang.org/x/crypto/pbkdf2" "golang.org/x/text/unicode/norm" + + "github.com/ethereum/go-ethereum/crypto" ) const ( diff --git a/accounts/scwallet/wallet.go b/accounts/scwallet/wallet.go index 58cfc88301..063e0a6fec 100644 --- a/accounts/scwallet/wallet.go +++ b/accounts/scwallet/wallet.go @@ -33,14 +33,15 @@ import ( "sync" "time" + pcsc "github.com/gballet/go-libpcsclite" + "github.com/status-im/keycard-go/derivationpath" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" - pcsc "github.com/gballet/go-libpcsclite" - "github.com/status-im/keycard-go/derivationpath" ) // ErrPairingPasswordNeeded is returned if opening the smart card requires pairing with a pairing diff --git a/accounts/usbwallet/hub.go b/accounts/usbwallet/hub.go index e22dffe971..991b0a2321 100644 --- a/accounts/usbwallet/hub.go +++ b/accounts/usbwallet/hub.go @@ -23,10 +23,11 @@ import ( "sync/atomic" "time" + "github.com/karalabe/hid" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" - "github.com/karalabe/hid" ) // LedgerScheme is the protocol scheme prefixing account and wallet URLs. diff --git a/accounts/usbwallet/trezor.go b/accounts/usbwallet/trezor.go index 1c4270d255..b9e9325fe1 100644 --- a/accounts/usbwallet/trezor.go +++ b/accounts/usbwallet/trezor.go @@ -27,13 +27,14 @@ import ( "io" "math/big" + "google.golang.org/protobuf/proto" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" - "google.golang.org/protobuf/proto" ) // ErrTrezorPINNeeded is returned if opening the trezor requires a PIN code. In diff --git a/accounts/usbwallet/wallet.go b/accounts/usbwallet/wallet.go index 0fd0415a9e..652192b9ce 100644 --- a/accounts/usbwallet/wallet.go +++ b/accounts/usbwallet/wallet.go @@ -25,13 +25,14 @@ import ( "sync" "time" + "github.com/karalabe/hid" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" - "github.com/karalabe/hid" ) // Maximum time between wallet health checks to detect USB unplugs. diff --git a/beacon/blsync/client.go b/beacon/blsync/client.go index 39a1c6ea76..d2e56ea440 100644 --- a/beacon/blsync/client.go +++ b/beacon/blsync/client.go @@ -19,6 +19,8 @@ package blsync import ( "strings" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/beacon/light" "github.com/ethereum/go-ethereum/beacon/light/api" "github.com/ethereum/go-ethereum/beacon/light/request" @@ -29,7 +31,6 @@ import ( "github.com/ethereum/go-ethereum/ethdb/memorydb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/rpc" - "github.com/urfave/cli/v2" ) type Client struct { diff --git a/beacon/blsync/config.go b/beacon/blsync/config.go index 93ed81306c..9f007df02f 100644 --- a/beacon/blsync/config.go +++ b/beacon/blsync/config.go @@ -17,11 +17,12 @@ package blsync import ( + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/beacon/types" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/urfave/cli/v2" ) // lightClientConfig contains beacon light client configuration diff --git a/beacon/light/api/light_api.go b/beacon/light/api/light_api.go index 6f60fc0cc6..7716c60e6d 100755 --- a/beacon/light/api/light_api.go +++ b/beacon/light/api/light_api.go @@ -27,6 +27,7 @@ import ( "time" "github.com/donovanhide/eventsource" + "github.com/ethereum/go-ethereum/beacon/merkle" "github.com/ethereum/go-ethereum/beacon/params" "github.com/ethereum/go-ethereum/beacon/types" diff --git a/beacon/types/committee.go b/beacon/types/committee.go index 5f89c27554..799f302dfc 100644 --- a/beacon/types/committee.go +++ b/beacon/types/committee.go @@ -22,10 +22,11 @@ import ( "fmt" "math/bits" + bls "github.com/protolambda/bls12-381-util" + "github.com/ethereum/go-ethereum/beacon/params" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - bls "github.com/protolambda/bls12-381-util" ) // SerializedSyncCommitteeSize is the size of the sync committee plus the diff --git a/beacon/types/exec_header.go b/beacon/types/exec_header.go index b5f90bae25..f1b5a4f53d 100644 --- a/beacon/types/exec_header.go +++ b/beacon/types/exec_header.go @@ -20,12 +20,13 @@ import ( "encoding/json" "fmt" - "github.com/ethereum/go-ethereum/beacon/merkle" - "github.com/ethereum/go-ethereum/common" "github.com/protolambda/zrnt/eth2/beacon/capella" zrntcommon "github.com/protolambda/zrnt/eth2/beacon/common" "github.com/protolambda/zrnt/eth2/beacon/deneb" "github.com/protolambda/ztyp/tree" + + "github.com/ethereum/go-ethereum/beacon/merkle" + "github.com/ethereum/go-ethereum/common" ) type headerObject interface { diff --git a/beacon/types/exec_payload.go b/beacon/types/exec_payload.go index b159687dfc..1bd916889b 100644 --- a/beacon/types/exec_payload.go +++ b/beacon/types/exec_payload.go @@ -20,13 +20,14 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/trie" "github.com/holiman/uint256" "github.com/protolambda/zrnt/eth2/beacon/capella" zrntcommon "github.com/protolambda/zrnt/eth2/beacon/common" "github.com/protolambda/zrnt/eth2/beacon/deneb" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/trie" ) type payloadType interface { diff --git a/beacon/types/header.go b/beacon/types/header.go index c8388df1e7..e196c21f7b 100644 --- a/beacon/types/header.go +++ b/beacon/types/header.go @@ -21,10 +21,11 @@ import ( "crypto/sha256" "encoding/binary" + zrntcommon "github.com/protolambda/zrnt/eth2/beacon/common" + "github.com/ethereum/go-ethereum/beacon/merkle" "github.com/ethereum/go-ethereum/beacon/params" "github.com/ethereum/go-ethereum/common" - zrntcommon "github.com/protolambda/zrnt/eth2/beacon/common" ) //go:generate go run github.com/fjl/gencodec -type Header -field-override headerMarshaling -out gen_header_json.go diff --git a/cmd/abigen/main.go b/cmd/abigen/main.go index 0149dec527..ec769f4673 100644 --- a/cmd/abigen/main.go +++ b/cmd/abigen/main.go @@ -24,13 +24,14 @@ import ( "regexp" "strings" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common/compiler" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/internal/flags" "github.com/ethereum/go-ethereum/log" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/blsync/main.go b/cmd/blsync/main.go index 854c99703c..6cd78c7f70 100644 --- a/cmd/blsync/main.go +++ b/cmd/blsync/main.go @@ -21,6 +21,8 @@ import ( "fmt" "os" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/beacon/blsync" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/internal/debug" @@ -28,7 +30,6 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" - "github.com/urfave/cli/v2" ) func main() { diff --git a/cmd/clef/main.go b/cmd/clef/main.go index 88d4c99e78..13b6d06b9e 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -35,6 +35,10 @@ import ( "strings" "time" + "github.com/mattn/go-colorable" + "github.com/mattn/go-isatty" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" @@ -54,9 +58,6 @@ import ( "github.com/ethereum/go-ethereum/signer/fourbyte" "github.com/ethereum/go-ethereum/signer/rules" "github.com/ethereum/go-ethereum/signer/storage" - "github.com/mattn/go-colorable" - "github.com/mattn/go-isatty" - "github.com/urfave/cli/v2" ) const legalWarning = ` diff --git a/cmd/devp2p/discv4cmd.go b/cmd/devp2p/discv4cmd.go index 3b5400ca3a..91b1107122 100644 --- a/cmd/devp2p/discv4cmd.go +++ b/cmd/devp2p/discv4cmd.go @@ -25,6 +25,8 @@ import ( "strings" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/devp2p/internal/v4test" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" @@ -34,7 +36,6 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/devp2p/discv5cmd.go b/cmd/devp2p/discv5cmd.go index 0dac945269..f8cecb5a1b 100644 --- a/cmd/devp2p/discv5cmd.go +++ b/cmd/devp2p/discv5cmd.go @@ -21,11 +21,12 @@ import ( "fmt" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/devp2p/internal/v5test" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/internal/flags" "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/devp2p/dns_cloudflare.go b/cmd/devp2p/dns_cloudflare.go index a3cc69cf19..65cdd2227f 100644 --- a/cmd/devp2p/dns_cloudflare.go +++ b/cmd/devp2p/dns_cloudflare.go @@ -23,9 +23,10 @@ import ( "strings" "github.com/cloudflare/cloudflare-go" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/dnsdisc" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/devp2p/dns_route53.go b/cmd/devp2p/dns_route53.go index a6125b8263..a9f0d22f02 100644 --- a/cmd/devp2p/dns_route53.go +++ b/cmd/devp2p/dns_route53.go @@ -30,9 +30,10 @@ import ( "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/service/route53" "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/dnsdisc" - "github.com/urfave/cli/v2" ) const ( diff --git a/cmd/devp2p/dnscmd.go b/cmd/devp2p/dnscmd.go index 0fce7b1030..5b6cfc7d25 100644 --- a/cmd/devp2p/dnscmd.go +++ b/cmd/devp2p/dnscmd.go @@ -25,12 +25,13 @@ import ( "path/filepath" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/console/prompt" "github.com/ethereum/go-ethereum/p2p/dnsdisc" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/devp2p/enrcmd.go b/cmd/devp2p/enrcmd.go index c9b692612f..2273c48d37 100644 --- a/cmd/devp2p/enrcmd.go +++ b/cmd/devp2p/enrcmd.go @@ -28,10 +28,11 @@ import ( "strconv" "strings" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/rlp" - "github.com/urfave/cli/v2" ) var fileFlag = &cli.StringFlag{Name: "file"} diff --git a/cmd/devp2p/internal/ethtest/chain_test.go b/cmd/devp2p/internal/ethtest/chain_test.go index 62bd6d26ea..20ee557a74 100644 --- a/cmd/devp2p/internal/ethtest/chain_test.go +++ b/cmd/devp2p/internal/ethtest/chain_test.go @@ -21,10 +21,11 @@ import ( "strconv" "testing" + "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth/protocols/eth" "github.com/ethereum/go-ethereum/p2p" - "github.com/stretchr/testify/assert" ) // TestEthProtocolNegotiation tests whether the test suite diff --git a/cmd/devp2p/internal/ethtest/conn.go b/cmd/devp2p/internal/ethtest/conn.go index 757b137aa1..e4f9f97eec 100644 --- a/cmd/devp2p/internal/ethtest/conn.go +++ b/cmd/devp2p/internal/ethtest/conn.go @@ -25,6 +25,7 @@ import ( "time" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth/protocols/eth" "github.com/ethereum/go-ethereum/eth/protocols/snap" diff --git a/cmd/devp2p/internal/ethtest/engine.go b/cmd/devp2p/internal/ethtest/engine.go index 0e94efa5bd..369c727b70 100644 --- a/cmd/devp2p/internal/ethtest/engine.go +++ b/cmd/devp2p/internal/ethtest/engine.go @@ -25,8 +25,9 @@ import ( "path/filepath" "time" - "github.com/ethereum/go-ethereum/common" "github.com/golang-jwt/jwt/v4" + + "github.com/ethereum/go-ethereum/common" ) // EngineClient is a wrapper around engine-related data. diff --git a/cmd/devp2p/internal/ethtest/suite.go b/cmd/devp2p/internal/ethtest/suite.go index b5cc27a2b5..a2a0003ff1 100644 --- a/cmd/devp2p/internal/ethtest/suite.go +++ b/cmd/devp2p/internal/ethtest/suite.go @@ -21,6 +21,8 @@ import ( "math/big" "reflect" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus/misc/eip4844" "github.com/ethereum/go-ethereum/core/types" @@ -30,7 +32,6 @@ import ( "github.com/ethereum/go-ethereum/internal/utesting" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/holiman/uint256" ) // Suite represents a structure used to test a node's conformance diff --git a/cmd/devp2p/keycmd.go b/cmd/devp2p/keycmd.go index 98d7bd76ae..46b917d93f 100644 --- a/cmd/devp2p/keycmd.go +++ b/cmd/devp2p/keycmd.go @@ -21,10 +21,11 @@ import ( "fmt" "net" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/devp2p/main.go b/cmd/devp2p/main.go index 66974bba58..918de04fba 100644 --- a/cmd/devp2p/main.go +++ b/cmd/devp2p/main.go @@ -20,10 +20,11 @@ import ( "fmt" "os" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/internal/debug" "github.com/ethereum/go-ethereum/internal/flags" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/urfave/cli/v2" ) var app = flags.NewApp("go-ethereum devp2p tool") diff --git a/cmd/devp2p/nodesetcmd.go b/cmd/devp2p/nodesetcmd.go index f0773edfb8..0282a6acde 100644 --- a/cmd/devp2p/nodesetcmd.go +++ b/cmd/devp2p/nodesetcmd.go @@ -25,12 +25,13 @@ import ( "strings" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/forkid" "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/devp2p/rlpxcmd.go b/cmd/devp2p/rlpxcmd.go index 118731fd6c..5f670af919 100644 --- a/cmd/devp2p/rlpxcmd.go +++ b/cmd/devp2p/rlpxcmd.go @@ -21,13 +21,14 @@ import ( "fmt" "net" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/devp2p/internal/ethtest" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/rlpx" "github.com/ethereum/go-ethereum/rlp" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/devp2p/runtest.go b/cmd/devp2p/runtest.go index 7e3723c641..915dc2979c 100644 --- a/cmd/devp2p/runtest.go +++ b/cmd/devp2p/runtest.go @@ -19,11 +19,12 @@ package main import ( "os" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/devp2p/internal/v4test" "github.com/ethereum/go-ethereum/internal/flags" "github.com/ethereum/go-ethereum/internal/utesting" "github.com/ethereum/go-ethereum/log" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/era/main.go b/cmd/era/main.go index 8b57fd695c..da0d91fd54 100644 --- a/cmd/era/main.go +++ b/cmd/era/main.go @@ -27,6 +27,8 @@ import ( "strings" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/internal/era" @@ -34,7 +36,6 @@ import ( "github.com/ethereum/go-ethereum/internal/flags" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/trie" - "github.com/urfave/cli/v2" ) var app = flags.NewApp("go-ethereum era tool") diff --git a/cmd/ethkey/changepassword.go b/cmd/ethkey/changepassword.go index 4298e2b834..8928560d42 100644 --- a/cmd/ethkey/changepassword.go +++ b/cmd/ethkey/changepassword.go @@ -21,9 +21,10 @@ import ( "os" "strings" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/urfave/cli/v2" ) var newPassphraseFlag = &cli.StringFlag{ diff --git a/cmd/ethkey/generate.go b/cmd/ethkey/generate.go index 60d8b3c779..50715b9534 100644 --- a/cmd/ethkey/generate.go +++ b/cmd/ethkey/generate.go @@ -22,11 +22,12 @@ import ( "os" "path/filepath" + "github.com/google/uuid" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/crypto" - "github.com/google/uuid" - "github.com/urfave/cli/v2" ) type outputGenerate struct { diff --git a/cmd/ethkey/inspect.go b/cmd/ethkey/inspect.go index 29b1c13e85..7aacdf9298 100644 --- a/cmd/ethkey/inspect.go +++ b/cmd/ethkey/inspect.go @@ -21,10 +21,11 @@ import ( "fmt" "os" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/crypto" - "github.com/urfave/cli/v2" ) type outputInspect struct { diff --git a/cmd/ethkey/main.go b/cmd/ethkey/main.go index 25c0d104f6..50d611b44c 100644 --- a/cmd/ethkey/main.go +++ b/cmd/ethkey/main.go @@ -20,8 +20,9 @@ import ( "fmt" "os" - "github.com/ethereum/go-ethereum/internal/flags" "github.com/urfave/cli/v2" + + "github.com/ethereum/go-ethereum/internal/flags" ) const ( diff --git a/cmd/ethkey/message.go b/cmd/ethkey/message.go index 6b8dec03cd..4d5b6f50df 100644 --- a/cmd/ethkey/message.go +++ b/cmd/ethkey/message.go @@ -21,12 +21,13 @@ import ( "fmt" "os" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/urfave/cli/v2" ) type outputSign struct { diff --git a/cmd/ethkey/utils.go b/cmd/ethkey/utils.go index 2821145089..aef0403e9a 100644 --- a/cmd/ethkey/utils.go +++ b/cmd/ethkey/utils.go @@ -22,8 +22,9 @@ import ( "os" "strings" - "github.com/ethereum/go-ethereum/cmd/utils" "github.com/urfave/cli/v2" + + "github.com/ethereum/go-ethereum/cmd/utils" ) // getPassphrase obtains a passphrase given by the user. It first checks the diff --git a/cmd/evm/disasm.go b/cmd/evm/disasm.go index b1f35cbaf5..2f2898db50 100644 --- a/cmd/evm/disasm.go +++ b/cmd/evm/disasm.go @@ -22,8 +22,9 @@ import ( "os" "strings" - "github.com/ethereum/go-ethereum/core/asm" "github.com/urfave/cli/v2" + + "github.com/ethereum/go-ethereum/core/asm" ) var disasmCommand = &cli.Command{ diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index a4c5f6efcb..19dca0d281 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -22,6 +22,9 @@ import ( "io" "math/big" + "github.com/holiman/uint256" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/consensus/ethash" @@ -41,8 +44,6 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/triedb" - "github.com/holiman/uint256" - "golang.org/x/crypto/sha3" ) type Prestate struct { diff --git a/cmd/evm/internal/t8ntool/flags.go b/cmd/evm/internal/t8ntool/flags.go index f2606c86d1..cd136815f1 100644 --- a/cmd/evm/internal/t8ntool/flags.go +++ b/cmd/evm/internal/t8ntool/flags.go @@ -20,9 +20,10 @@ import ( "fmt" "strings" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/tests" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/evm/internal/t8ntool/transaction.go b/cmd/evm/internal/t8ntool/transaction.go index 7f66ba4d85..18c176e02f 100644 --- a/cmd/evm/internal/t8ntool/transaction.go +++ b/cmd/evm/internal/t8ntool/transaction.go @@ -24,6 +24,8 @@ import ( "os" "strings" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" @@ -31,7 +33,6 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/tests" - "github.com/urfave/cli/v2" ) type result struct { diff --git a/cmd/evm/internal/t8ntool/transition.go b/cmd/evm/internal/t8ntool/transition.go index fa052f5954..ccc8741944 100644 --- a/cmd/evm/internal/t8ntool/transition.go +++ b/cmd/evm/internal/t8ntool/transition.go @@ -25,6 +25,8 @@ import ( "os" "path/filepath" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/consensus/misc/eip1559" @@ -37,7 +39,6 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/tests" - "github.com/urfave/cli/v2" ) const ( diff --git a/cmd/evm/main.go b/cmd/evm/main.go index f9a2a075d0..38c650c272 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -22,10 +22,11 @@ import ( "math/big" "os" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/evm/internal/t8ntool" "github.com/ethereum/go-ethereum/internal/debug" "github.com/ethereum/go-ethereum/internal/flags" - "github.com/urfave/cli/v2" // Force-load the tracer engines to trigger registration _ "github.com/ethereum/go-ethereum/eth/tracers/js" diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index c02f9f0590..f46a3e40d3 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -27,6 +27,8 @@ import ( "testing" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/evm/internal/compiler" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" @@ -41,7 +43,6 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/triedb" "github.com/ethereum/go-ethereum/triedb/hashdb" - "github.com/urfave/cli/v2" ) var runCommand = &cli.Command{ diff --git a/cmd/evm/staterunner.go b/cmd/evm/staterunner.go index fc2bf8223f..843b3dc4e8 100644 --- a/cmd/evm/staterunner.go +++ b/cmd/evm/staterunner.go @@ -22,13 +22,14 @@ import ( "fmt" "os" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum/go-ethereum/tests" - "github.com/urfave/cli/v2" ) var stateTestCommand = &cli.Command{ diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index 9450c09e7e..db6d170bae 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -26,6 +26,8 @@ import ( "sync/atomic" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -40,7 +42,6 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/params" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go index e2d3125559..a2d6ed4db8 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/geth/consolecmd.go @@ -20,10 +20,11 @@ import ( "fmt" "strings" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/console" "github.com/ethereum/go-ethereum/internal/flags" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/geth/dbcmd.go b/cmd/geth/dbcmd.go index 052ae0eab2..4f650672e4 100644 --- a/cmd/geth/dbcmd.go +++ b/cmd/geth/dbcmd.go @@ -27,6 +27,9 @@ import ( "syscall" "time" + "github.com/olekukonko/tablewriter" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -41,8 +44,6 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/triedb" - "github.com/olekukonko/tablewriter" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/geth/logtestcmd_active.go b/cmd/geth/logtestcmd_active.go index f2a2c5ded5..dc499a5ea9 100644 --- a/cmd/geth/logtestcmd_active.go +++ b/cmd/geth/logtestcmd_active.go @@ -25,10 +25,11 @@ import ( "math/big" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" "github.com/holiman/uint256" "github.com/urfave/cli/v2" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/log" ) var logTestCommand = &cli.Command{ diff --git a/cmd/geth/main.go b/cmd/geth/main.go index a37bb5f987..830515aba4 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -25,6 +25,8 @@ import ( "strings" "time" + "go.uber.org/automaxprocs/maxprocs" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" @@ -37,7 +39,6 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/node" - "go.uber.org/automaxprocs/maxprocs" // Force-load the tracer engines to trigger registration _ "github.com/ethereum/go-ethereum/eth/tracers/js" diff --git a/cmd/geth/misccmd.go b/cmd/geth/misccmd.go index f3530c30fb..8c14d0a824 100644 --- a/cmd/geth/misccmd.go +++ b/cmd/geth/misccmd.go @@ -22,9 +22,10 @@ import ( "runtime" "strings" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/internal/version" "github.com/ethereum/go-ethereum/params" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/geth/snapshot.go b/cmd/geth/snapshot.go index 7d713ad110..df1e9e4818 100644 --- a/cmd/geth/snapshot.go +++ b/cmd/geth/snapshot.go @@ -24,6 +24,8 @@ import ( "os" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" @@ -36,7 +38,6 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/geth/verkle.go b/cmd/geth/verkle.go index 9eb37fb5a8..0eacb0d0b5 100644 --- a/cmd/geth/verkle.go +++ b/cmd/geth/verkle.go @@ -23,13 +23,14 @@ import ( "fmt" "os" + "github.com/ethereum/go-verkle" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/internal/flags" "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-verkle" - "github.com/urfave/cli/v2" ) var ( diff --git a/cmd/geth/version_check.go b/cmd/geth/version_check.go index 237556788e..96ccb0eebc 100644 --- a/cmd/geth/version_check.go +++ b/cmd/geth/version_check.go @@ -26,9 +26,10 @@ import ( "regexp" "strings" - "github.com/ethereum/go-ethereum/log" "github.com/jedisct1/go-minisign" "github.com/urfave/cli/v2" + + "github.com/ethereum/go-ethereum/log" ) var gethPubKeys []string = []string{ diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index fc66e11dca..8672e0be66 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -33,6 +33,8 @@ import ( "syscall" "time" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" @@ -47,7 +49,6 @@ import ( "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" - "github.com/urfave/cli/v2" ) const ( diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index b9fa3b8b4e..d6736dcf2d 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -35,6 +35,10 @@ import ( "strings" "time" + pcsclite "github.com/gballet/go-libpcsclite" + gopsutil "github.com/shirou/gopsutil/mem" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" bparams "github.com/ethereum/go-ethereum/beacon/params" @@ -75,9 +79,6 @@ import ( "github.com/ethereum/go-ethereum/triedb" "github.com/ethereum/go-ethereum/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb/pathdb" - pcsclite "github.com/gballet/go-libpcsclite" - gopsutil "github.com/shirou/gopsutil/mem" - "github.com/urfave/cli/v2" ) // These are all the command line flags we support. diff --git a/cmd/utils/flags_legacy.go b/cmd/utils/flags_legacy.go index 1dfd1a5f89..8ccbe246af 100644 --- a/cmd/utils/flags_legacy.go +++ b/cmd/utils/flags_legacy.go @@ -19,9 +19,10 @@ package utils import ( "fmt" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/internal/flags" - "github.com/urfave/cli/v2" ) var ShowDeprecated = &cli.Command{ diff --git a/common/mclock/mclock.go b/common/mclock/mclock.go index c05738cf2b..915081ff28 100644 --- a/common/mclock/mclock.go +++ b/common/mclock/mclock.go @@ -19,7 +19,6 @@ package mclock import ( "time" - _ "unsafe" // for go:linkname ) diff --git a/common/types.go b/common/types.go index fdb25f1b34..d9d87b2d99 100644 --- a/common/types.go +++ b/common/types.go @@ -29,8 +29,9 @@ import ( "strconv" "strings" - "github.com/ethereum/go-ethereum/common/hexutil" "golang.org/x/crypto/sha3" + + "github.com/ethereum/go-ethereum/common/hexutil" ) // Lengths of hashes and addresses in bytes. diff --git a/consensus/beacon/consensus.go b/consensus/beacon/consensus.go index 19763ed303..e396343c10 100644 --- a/consensus/beacon/consensus.go +++ b/consensus/beacon/consensus.go @@ -21,6 +21,8 @@ import ( "fmt" "math/big" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/consensus/misc/eip1559" @@ -31,7 +33,6 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" - "github.com/holiman/uint256" ) // Proof-of-stake protocol constants. diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index c9e9484002..176c2f6c11 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -27,6 +27,8 @@ import ( "sync" "time" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -43,7 +45,6 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" - "golang.org/x/crypto/sha3" ) const ( diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index 0bd1a56bce..c11a77ecb9 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -23,6 +23,9 @@ import ( "time" mapset "github.com/deckarep/golang-set/v2" + "github.com/holiman/uint256" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/consensus" @@ -34,8 +37,6 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" - "github.com/holiman/uint256" - "golang.org/x/crypto/sha3" ) // Ethash proof-of-work protocol constants. diff --git a/consensus/ethash/difficulty.go b/consensus/ethash/difficulty.go index 66a18059c6..14d60389b8 100644 --- a/consensus/ethash/difficulty.go +++ b/consensus/ethash/difficulty.go @@ -19,8 +19,9 @@ package ethash import ( "math/big" - "github.com/ethereum/go-ethereum/core/types" "github.com/holiman/uint256" + + "github.com/ethereum/go-ethereum/core/types" ) const ( diff --git a/consensus/misc/dao.go b/consensus/misc/dao.go index 45669d0bce..01b69c5e2a 100644 --- a/consensus/misc/dao.go +++ b/consensus/misc/dao.go @@ -21,11 +21,12 @@ import ( "errors" "math/big" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) var ( diff --git a/console/bridge.go b/console/bridge.go index 37578041ca..871e8c1626 100644 --- a/console/bridge.go +++ b/console/bridge.go @@ -26,6 +26,7 @@ import ( "time" "github.com/dop251/goja" + "github.com/ethereum/go-ethereum/accounts/scwallet" "github.com/ethereum/go-ethereum/accounts/usbwallet" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/console/bridge_test.go b/console/bridge_test.go index e57e294fc5..28f8bdb744 100644 --- a/console/bridge_test.go +++ b/console/bridge_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/dop251/goja" + "github.com/ethereum/go-ethereum/internal/jsre" ) diff --git a/console/console.go b/console/console.go index 5acb4cdccb..d72125455d 100644 --- a/console/console.go +++ b/console/console.go @@ -30,14 +30,15 @@ import ( "syscall" "github.com/dop251/goja" + "github.com/mattn/go-colorable" + "github.com/peterh/liner" + "github.com/ethereum/go-ethereum/console/prompt" "github.com/ethereum/go-ethereum/internal/jsre" "github.com/ethereum/go-ethereum/internal/jsre/deps" "github.com/ethereum/go-ethereum/internal/web3ext" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" - "github.com/mattn/go-colorable" - "github.com/peterh/liner" ) var ( diff --git a/core/rawdb/database.go b/core/rawdb/database.go index 831016da15..2e4eb761cf 100644 --- a/core/rawdb/database.go +++ b/core/rawdb/database.go @@ -25,13 +25,14 @@ import ( "strings" "time" + "github.com/olekukonko/tablewriter" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb/leveldb" "github.com/ethereum/go-ethereum/ethdb/memorydb" "github.com/ethereum/go-ethereum/ethdb/pebble" "github.com/ethereum/go-ethereum/log" - "github.com/olekukonko/tablewriter" ) // freezerdb is a database wrapper that enables ancient chain segment freezing. diff --git a/core/rawdb/freezer.go b/core/rawdb/freezer.go index 0f28782db9..d394a9d616 100644 --- a/core/rawdb/freezer.go +++ b/core/rawdb/freezer.go @@ -26,11 +26,12 @@ import ( "sync/atomic" "time" + "github.com/gofrs/flock" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" - "github.com/gofrs/flock" ) var ( diff --git a/core/rawdb/freezer_batch.go b/core/rawdb/freezer_batch.go index 84a63a4518..ded0ea0d62 100644 --- a/core/rawdb/freezer_batch.go +++ b/core/rawdb/freezer_batch.go @@ -19,9 +19,10 @@ package rawdb import ( "fmt" + "github.com/golang/snappy" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/rlp" - "github.com/golang/snappy" ) // This is the maximum amount of data that will be buffered in memory diff --git a/core/rawdb/freezer_table.go b/core/rawdb/freezer_table.go index 4b9d510e82..e7d165a03b 100644 --- a/core/rawdb/freezer_table.go +++ b/core/rawdb/freezer_table.go @@ -27,10 +27,11 @@ import ( "sync" "sync/atomic" + "github.com/golang/snappy" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" - "github.com/golang/snappy" ) var ( diff --git a/core/rawdb/freezer_table_test.go b/core/rawdb/freezer_table_test.go index 91b4943e59..869af1d449 100644 --- a/core/rawdb/freezer_table_test.go +++ b/core/rawdb/freezer_table_test.go @@ -28,8 +28,9 @@ import ( "testing/quick" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/metrics" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/metrics" ) // TestFreezerBasics test initializing a freezertable from scratch, writing to the table, diff --git a/core/rawdb/freezer_test.go b/core/rawdb/freezer_test.go index 72d1417200..0f0fb780ce 100644 --- a/core/rawdb/freezer_test.go +++ b/core/rawdb/freezer_test.go @@ -27,10 +27,11 @@ import ( "sync" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/core/rawdb/ancienttest" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/rlp" - "github.com/stretchr/testify/require" ) var freezerTestTableDef = map[string]bool{"test": true} diff --git a/core/state/pruner/bloom.go b/core/state/pruner/bloom.go index dad2b5b2a8..1820d0b018 100644 --- a/core/state/pruner/bloom.go +++ b/core/state/pruner/bloom.go @@ -21,10 +21,11 @@ import ( "errors" "os" + bloomfilter "github.com/holiman/bloomfilter/v2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/log" - bloomfilter "github.com/holiman/bloomfilter/v2" ) // stateBloomHash is used to convert a trie hash or contract code hash into a 64 bit mini hash. diff --git a/core/state/snapshot/journal.go b/core/state/snapshot/journal.go index 8513e73dd0..0ab0218415 100644 --- a/core/state/snapshot/journal.go +++ b/core/state/snapshot/journal.go @@ -25,6 +25,7 @@ import ( "time" "github.com/VictoriaMetrics/fastcache" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" diff --git a/core/vm/common.go b/core/vm/common.go index ba75950e37..63ea91a68b 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -17,9 +17,10 @@ package vm import ( + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" - "github.com/holiman/uint256" ) // calcMemSize64 calculates the required memory size, and returns diff --git a/core/vm/contract.go b/core/vm/contract.go index cfda75b27e..56e254908d 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -17,9 +17,10 @@ package vm import ( + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/tracing" - "github.com/holiman/uint256" ) // ContractRef is a reference to the contract's backing object diff --git a/core/vm/contracts.go b/core/vm/contracts.go index dd71a9729f..a9489a6461 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -27,6 +27,8 @@ import ( bls12381 "github.com/consensys/gnark-crypto/ecc/bls12-381" "github.com/consensys/gnark-crypto/ecc/bls12-381/fp" "github.com/consensys/gnark-crypto/ecc/bls12-381/fr" + "golang.org/x/crypto/ripemd160" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/tracing" @@ -35,7 +37,6 @@ import ( "github.com/ethereum/go-ethereum/crypto/bn256" "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ethereum/go-ethereum/params" - "golang.org/x/crypto/ripemd160" ) // PrecompiledContract is the basic interface for native Go contracts. The implementation diff --git a/core/vm/eips.go b/core/vm/eips.go index edd6ec8d0a..b856d15452 100644 --- a/core/vm/eips.go +++ b/core/vm/eips.go @@ -21,10 +21,11 @@ import ( "math" "sort" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) var activators = map[int]func(*JumpTable){ diff --git a/core/vm/evm.go b/core/vm/evm.go index 1944189b5d..063f2d03e1 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -21,13 +21,14 @@ import ( "math/big" "sync/atomic" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) type ( diff --git a/core/vm/gas_table_test.go b/core/vm/gas_table_test.go index 02fc94840d..929ff40251 100644 --- a/core/vm/gas_table_test.go +++ b/core/vm/gas_table_test.go @@ -24,13 +24,14 @@ import ( "sort" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) func TestMemoryGasCost(t *testing.T) { diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 2e0f4c40ab..fb91d7bb4c 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -19,12 +19,13 @@ package vm import ( "math" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) func opAdd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { diff --git a/core/vm/instructions_test.go b/core/vm/instructions_test.go index e17e913aa3..e31cbe4955 100644 --- a/core/vm/instructions_test.go +++ b/core/vm/instructions_test.go @@ -25,6 +25,8 @@ import ( "strings" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/rawdb" @@ -32,7 +34,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) type TwoOperandTestcase struct { diff --git a/core/vm/interface.go b/core/vm/interface.go index 5f42643565..7aaaa98d0f 100644 --- a/core/vm/interface.go +++ b/core/vm/interface.go @@ -19,13 +19,14 @@ package vm import ( "math/big" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/stateless" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/trie/utils" - "github.com/holiman/uint256" ) // StateDB is an EVM database for full state querying. diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index 2b1ea38483..7b565e53f7 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -19,12 +19,13 @@ package vm import ( "fmt" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" - "github.com/holiman/uint256" ) // Config are the configuration options for the Interpreter diff --git a/core/vm/interpreter_test.go b/core/vm/interpreter_test.go index ff4977d728..689c260322 100644 --- a/core/vm/interpreter_test.go +++ b/core/vm/interpreter_test.go @@ -20,13 +20,14 @@ import ( "testing" "time" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) var loopInterruptTests = []string{ diff --git a/core/vm/runtime/runtime.go b/core/vm/runtime/runtime.go index 1181e5fccd..d96fcab790 100644 --- a/core/vm/runtime/runtime.go +++ b/core/vm/runtime/runtime.go @@ -20,6 +20,8 @@ import ( "math" "math/big" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" @@ -27,7 +29,6 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) // Config is a basic type specifying certain configuration flags for running diff --git a/crypto/bn256/cloudflare/lattice_test.go b/crypto/bn256/cloudflare/lattice_test.go index 4d52ad9b27..50e602cd01 100644 --- a/crypto/bn256/cloudflare/lattice_test.go +++ b/crypto/bn256/cloudflare/lattice_test.go @@ -2,7 +2,6 @@ package bn256 import ( "crypto/rand" - "testing" ) diff --git a/crypto/bn256/cloudflare/main_test.go b/crypto/bn256/cloudflare/main_test.go index c0c85457be..710f82a2a6 100644 --- a/crypto/bn256/cloudflare/main_test.go +++ b/crypto/bn256/cloudflare/main_test.go @@ -1,9 +1,8 @@ package bn256 import ( - "testing" - "crypto/rand" + "testing" ) func TestRandomG2Marshal(t *testing.T) { diff --git a/crypto/bn256/google/main_test.go b/crypto/bn256/google/main_test.go index c0c85457be..710f82a2a6 100644 --- a/crypto/bn256/google/main_test.go +++ b/crypto/bn256/google/main_test.go @@ -1,9 +1,8 @@ package bn256 import ( - "testing" - "crypto/rand" + "testing" ) func TestRandomG2Marshal(t *testing.T) { diff --git a/crypto/crypto.go b/crypto/crypto.go index aaa5cc43a2..17dcbd9e03 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -29,10 +29,11 @@ import ( "math/big" "os" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/rlp" - "golang.org/x/crypto/sha3" ) // SignatureLength indicates the byte length required to carry a signature with recovery id. diff --git a/crypto/kzg4844/kzg4844_ckzg_cgo.go b/crypto/kzg4844/kzg4844_ckzg_cgo.go index 11bc451b58..4047724c2e 100644 --- a/crypto/kzg4844/kzg4844_ckzg_cgo.go +++ b/crypto/kzg4844/kzg4844_ckzg_cgo.go @@ -25,6 +25,7 @@ import ( gokzg4844 "github.com/crate-crypto/go-kzg-4844" ckzg4844 "github.com/ethereum/c-kzg-4844/bindings/go" + "github.com/ethereum/go-ethereum/common/hexutil" ) diff --git a/eth/gasprice/gasprice_test.go b/eth/gasprice/gasprice_test.go index 39f3c79b98..45c4e4000d 100644 --- a/eth/gasprice/gasprice_test.go +++ b/eth/gasprice/gasprice_test.go @@ -24,6 +24,8 @@ import ( "math/big" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/consensus/beacon" @@ -37,7 +39,6 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" - "github.com/holiman/uint256" ) const testHead = 32 diff --git a/eth/handler_test.go b/eth/handler_test.go index bcc8ea30e4..faf78e0b83 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -21,6 +21,8 @@ import ( "sort" "sync" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core" @@ -33,7 +35,6 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) var ( diff --git a/eth/protocols/eth/peer.go b/eth/protocols/eth/peer.go index f53782a053..b9d84d223c 100644 --- a/eth/protocols/eth/peer.go +++ b/eth/protocols/eth/peer.go @@ -22,6 +22,7 @@ import ( "sync" mapset "github.com/deckarep/golang-set/v2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/p2p" diff --git a/eth/protocols/snap/handler_fuzzing_test.go b/eth/protocols/snap/handler_fuzzing_test.go index 4e234ad21b..ed17b7de9f 100644 --- a/eth/protocols/snap/handler_fuzzing_test.go +++ b/eth/protocols/snap/handler_fuzzing_test.go @@ -24,6 +24,8 @@ import ( "testing" "time" + fuzz "github.com/google/gofuzz" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core" @@ -34,7 +36,6 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" - fuzz "github.com/google/gofuzz" ) func FuzzARange(f *testing.F) { diff --git a/eth/protocols/snap/range.go b/eth/protocols/snap/range.go index 8c98c71d50..2afa32e429 100644 --- a/eth/protocols/snap/range.go +++ b/eth/protocols/snap/range.go @@ -19,8 +19,9 @@ package snap import ( "math/big" - "github.com/ethereum/go-ethereum/common" "github.com/holiman/uint256" + + "github.com/ethereum/go-ethereum/common" ) // hashRange is a utility to handle ranges of hashes, Split up the diff --git a/eth/protocols/snap/sync_test.go b/eth/protocols/snap/sync_test.go index c97c3b99b3..7d6d825cef 100644 --- a/eth/protocols/snap/sync_test.go +++ b/eth/protocols/snap/sync_test.go @@ -28,6 +28,9 @@ import ( "testing" "time" + "github.com/holiman/uint256" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" @@ -40,8 +43,6 @@ import ( "github.com/ethereum/go-ethereum/trie/trienode" "github.com/ethereum/go-ethereum/triedb" "github.com/ethereum/go-ethereum/triedb/pathdb" - "github.com/holiman/uint256" - "golang.org/x/crypto/sha3" ) func TestHashing(t *testing.T) { diff --git a/eth/tracers/js/goja.go b/eth/tracers/js/goja.go index 5290d4f709..1a1e5ea2be 100644 --- a/eth/tracers/js/goja.go +++ b/eth/tracers/js/goja.go @@ -24,11 +24,12 @@ import ( "slices" "github.com/dop251/goja" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/eth/tracers/internal" - "github.com/holiman/uint256" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/eth/tracers/js/tracer_test.go b/eth/tracers/js/tracer_test.go index 05adedf265..50bff7ce29 100644 --- a/eth/tracers/js/tracer_test.go +++ b/eth/tracers/js/tracer_test.go @@ -24,13 +24,14 @@ import ( "testing" "time" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) type account struct{} diff --git a/eth/tracers/live/supply.go b/eth/tracers/live/supply.go index 96f7059454..ca28e8294a 100644 --- a/eth/tracers/live/supply.go +++ b/eth/tracers/live/supply.go @@ -7,6 +7,8 @@ import ( "math/big" "path/filepath" + "gopkg.in/natefinch/lumberjack.v2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/consensus/misc/eip4844" @@ -15,7 +17,6 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/log" - "gopkg.in/natefinch/lumberjack.v2" ) func init() { diff --git a/eth/tracers/logger/logger.go b/eth/tracers/logger/logger.go index ef1d471466..93955b2bb9 100644 --- a/eth/tracers/logger/logger.go +++ b/eth/tracers/logger/logger.go @@ -25,6 +25,8 @@ import ( "strings" "sync/atomic" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" @@ -32,7 +34,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) // Storage represents a contract's storage. diff --git a/eth/tracers/logger/logger_test.go b/eth/tracers/logger/logger_test.go index 137608f884..0dd8533b84 100644 --- a/eth/tracers/logger/logger_test.go +++ b/eth/tracers/logger/logger_test.go @@ -22,11 +22,12 @@ import ( "math/big" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" ) type dummyContractRef struct { diff --git a/eth/tracers/native/call_flat_test.go b/eth/tracers/native/call_flat_test.go index d5481b868b..33289a1fde 100644 --- a/eth/tracers/native/call_flat_test.go +++ b/eth/tracers/native/call_flat_test.go @@ -21,13 +21,14 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/params" - "github.com/stretchr/testify/require" ) func TestCallFlatStop(t *testing.T) { diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go index c845db1164..c9b6cba1f9 100644 --- a/ethstats/ethstats.go +++ b/ethstats/ethstats.go @@ -30,6 +30,8 @@ import ( "sync" "time" + "github.com/gorilla/websocket" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/mclock" @@ -42,7 +44,6 @@ import ( "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" - "github.com/gorilla/websocket" ) const ( diff --git a/graphql/service.go b/graphql/service.go index 584165bdb8..017bbda464 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -24,12 +24,13 @@ import ( "sync" "time" + "github.com/graph-gophers/graphql-go" + gqlErrors "github.com/graph-gophers/graphql-go/errors" + "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/internal/ethapi" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" - "github.com/graph-gophers/graphql-go" - gqlErrors "github.com/graph-gophers/graphql-go/errors" ) type handler struct { diff --git a/internal/blocktest/test_hash.go b/internal/blocktest/test_hash.go index 4d2b077e89..13c970cef0 100644 --- a/internal/blocktest/test_hash.go +++ b/internal/blocktest/test_hash.go @@ -25,8 +25,9 @@ package blocktest import ( "hash" - "github.com/ethereum/go-ethereum/common" "golang.org/x/crypto/sha3" + + "github.com/ethereum/go-ethereum/common" ) // testHasher is the helper tool for transaction/receipt list hashing. diff --git a/internal/debug/api.go b/internal/debug/api.go index 5e93585bf8..8e72c5aedf 100644 --- a/internal/debug/api.go +++ b/internal/debug/api.go @@ -35,8 +35,9 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/log" "github.com/hashicorp/go-bexpr" + + "github.com/ethereum/go-ethereum/log" ) // Handler is the global debugging handler. diff --git a/internal/debug/flags.go b/internal/debug/flags.go index 0e05975c7e..21ec0e0c04 100644 --- a/internal/debug/flags.go +++ b/internal/debug/flags.go @@ -27,14 +27,15 @@ import ( "path/filepath" "runtime" - "github.com/ethereum/go-ethereum/internal/flags" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/metrics/exp" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" "github.com/urfave/cli/v2" "gopkg.in/natefinch/lumberjack.v2" + + "github.com/ethereum/go-ethereum/internal/flags" + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" + "github.com/ethereum/go-ethereum/metrics/exp" ) var ( diff --git a/internal/era/builder.go b/internal/era/builder.go index 75782a08c2..7dd5390f21 100644 --- a/internal/era/builder.go +++ b/internal/era/builder.go @@ -23,11 +23,12 @@ import ( "io" "math/big" + "github.com/golang/snappy" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/internal/era/e2store" "github.com/ethereum/go-ethereum/rlp" - "github.com/golang/snappy" ) // Builder is used to create Era1 archives of block data. diff --git a/internal/era/era.go b/internal/era/era.go index 6ad7339b36..cabdf6fff5 100644 --- a/internal/era/era.go +++ b/internal/era/era.go @@ -28,11 +28,12 @@ import ( "strings" "sync" + "github.com/golang/snappy" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/internal/era/e2store" "github.com/ethereum/go-ethereum/rlp" - "github.com/golang/snappy" ) var ( diff --git a/internal/ethapi/transaction_args.go b/internal/ethapi/transaction_args.go index f199f9d912..002e882301 100644 --- a/internal/ethapi/transaction_args.go +++ b/internal/ethapi/transaction_args.go @@ -24,6 +24,8 @@ import ( "fmt" "math/big" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" @@ -34,7 +36,6 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" - "github.com/holiman/uint256" ) var ( diff --git a/internal/flags/flags.go b/internal/flags/flags.go index bf62c53adf..e9987a81f6 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -28,8 +28,9 @@ import ( "strings" "syscall" - "github.com/ethereum/go-ethereum/common/math" "github.com/urfave/cli/v2" + + "github.com/ethereum/go-ethereum/common/math" ) // DirectoryString is custom type which is registered in the flags library which cli uses for diff --git a/internal/flags/helpers.go b/internal/flags/helpers.go index 0112724fa1..dd878dbd43 100644 --- a/internal/flags/helpers.go +++ b/internal/flags/helpers.go @@ -23,11 +23,12 @@ import ( "sort" "strings" + "github.com/mattn/go-isatty" + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/internal/version" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" - "github.com/mattn/go-isatty" - "github.com/urfave/cli/v2" ) // usecolor defines whether the CLI help should use colored output or normal dumb diff --git a/internal/jsre/jsre.go b/internal/jsre/jsre.go index f6e21d2ef7..2c56c0639f 100644 --- a/internal/jsre/jsre.go +++ b/internal/jsre/jsre.go @@ -28,6 +28,7 @@ import ( "time" "github.com/dop251/goja" + "github.com/ethereum/go-ethereum/common" ) diff --git a/metrics/cpu_enabled.go b/metrics/cpu_enabled.go index 2359028a21..91eb6eb70c 100644 --- a/metrics/cpu_enabled.go +++ b/metrics/cpu_enabled.go @@ -20,8 +20,9 @@ package metrics import ( - "github.com/ethereum/go-ethereum/log" "github.com/shirou/gopsutil/cpu" + + "github.com/ethereum/go-ethereum/log" ) // ReadCPUStats retrieves the current CPU stats. diff --git a/metrics/influxdb/influxdb_test.go b/metrics/influxdb/influxdb_test.go index 5879af7cf6..cff340a8e7 100644 --- a/metrics/influxdb/influxdb_test.go +++ b/metrics/influxdb/influxdb_test.go @@ -27,9 +27,10 @@ import ( "strings" "testing" + influxdb2 "github.com/influxdata/influxdb-client-go/v2" + "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/metrics/internal" - influxdb2 "github.com/influxdata/influxdb-client-go/v2" ) func TestMain(m *testing.M) { diff --git a/metrics/influxdb/influxdbv1.go b/metrics/influxdb/influxdbv1.go index ac58280803..b02c8bcc12 100644 --- a/metrics/influxdb/influxdbv1.go +++ b/metrics/influxdb/influxdbv1.go @@ -5,9 +5,10 @@ import ( uurl "net/url" "time" + client "github.com/influxdata/influxdb1-client/v2" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" - client "github.com/influxdata/influxdb1-client/v2" ) type reporter struct { diff --git a/metrics/influxdb/influxdbv2.go b/metrics/influxdb/influxdbv2.go index 114d57ae07..139975abcf 100644 --- a/metrics/influxdb/influxdbv2.go +++ b/metrics/influxdb/influxdbv2.go @@ -4,10 +4,11 @@ import ( "context" "time" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/metrics" influxdb2 "github.com/influxdata/influxdb-client-go/v2" "github.com/influxdata/influxdb-client-go/v2/api" + + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" ) type v2Reporter struct { diff --git a/p2p/discover/v4wire/v4wire_test.go b/p2p/discover/v4wire/v4wire_test.go index 38820f3b48..5459d8f6cd 100644 --- a/p2p/discover/v4wire/v4wire_test.go +++ b/p2p/discover/v4wire/v4wire_test.go @@ -23,6 +23,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rlp" ) diff --git a/p2p/discover/v5_udp_test.go b/p2p/discover/v5_udp_test.go index 8631b918ff..dfd459fbc0 100644 --- a/p2p/discover/v5_udp_test.go +++ b/p2p/discover/v5_udp_test.go @@ -29,6 +29,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/internal/testlog" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discover/v4wire" @@ -36,7 +38,6 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/rlp" - "github.com/stretchr/testify/require" ) // Real sockets, real crypto: this test checks end-to-end connectivity for UDPv5. diff --git a/p2p/discover/v5wire/crypto.go b/p2p/discover/v5wire/crypto.go index 00fc3b4564..3410bf4065 100644 --- a/p2p/discover/v5wire/crypto.go +++ b/p2p/discover/v5wire/crypto.go @@ -25,10 +25,11 @@ import ( "fmt" "hash" + "golang.org/x/crypto/hkdf" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/enode" - "golang.org/x/crypto/hkdf" ) const ( diff --git a/p2p/dnsdisc/client.go b/p2p/dnsdisc/client.go index 4f14d860e1..40dd724b77 100644 --- a/p2p/dnsdisc/client.go +++ b/p2p/dnsdisc/client.go @@ -27,14 +27,15 @@ import ( "sync" "time" + "golang.org/x/sync/singleflight" + "golang.org/x/time/rate" + "github.com/ethereum/go-ethereum/common/lru" "github.com/ethereum/go-ethereum/common/mclock" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" - "golang.org/x/sync/singleflight" - "golang.org/x/time/rate" ) // Client discovers nodes by querying DNS servers. diff --git a/p2p/dnsdisc/client_test.go b/p2p/dnsdisc/client_test.go index 01912e1eab..c7b3514c38 100644 --- a/p2p/dnsdisc/client_test.go +++ b/p2p/dnsdisc/client_test.go @@ -26,6 +26,7 @@ import ( "time" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/mclock" "github.com/ethereum/go-ethereum/crypto" diff --git a/p2p/dnsdisc/tree.go b/p2p/dnsdisc/tree.go index a8295ac9eb..021fee280d 100644 --- a/p2p/dnsdisc/tree.go +++ b/p2p/dnsdisc/tree.go @@ -27,11 +27,12 @@ import ( "slices" "strings" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/rlp" - "golang.org/x/crypto/sha3" ) // Tree is a merkle tree of node records. diff --git a/p2p/dnsdisc/tree_test.go b/p2p/dnsdisc/tree_test.go index 9ed17aa4b3..9ddf0950c3 100644 --- a/p2p/dnsdisc/tree_test.go +++ b/p2p/dnsdisc/tree_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/p2p/enode" ) diff --git a/p2p/enode/idscheme.go b/p2p/enode/idscheme.go index db7841c047..3b84dff483 100644 --- a/p2p/enode/idscheme.go +++ b/p2p/enode/idscheme.go @@ -21,11 +21,12 @@ import ( "errors" "io" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/rlp" - "golang.org/x/crypto/sha3" ) // ValidSchemes is a List of known secure identity schemes. diff --git a/p2p/enode/idscheme_test.go b/p2p/enode/idscheme_test.go index 0910e6e83f..af4cf875f7 100644 --- a/p2p/enode/idscheme_test.go +++ b/p2p/enode/idscheme_test.go @@ -23,11 +23,12 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/rlp" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) var ( diff --git a/p2p/enode/localnode_test.go b/p2p/enode/localnode_test.go index 86b962a74e..536f86bc6b 100644 --- a/p2p/enode/localnode_test.go +++ b/p2p/enode/localnode_test.go @@ -22,10 +22,11 @@ import ( "net/netip" "testing" + "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/p2p/netutil" - "github.com/stretchr/testify/assert" ) func newLocalNodeForTesting() (*LocalNode, *DB) { diff --git a/p2p/enode/node_test.go b/p2p/enode/node_test.go index 56e196e82e..bc72c48c09 100644 --- a/p2p/enode/node_test.go +++ b/p2p/enode/node_test.go @@ -25,9 +25,10 @@ import ( "testing" "testing/quick" + "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/rlp" - "github.com/stretchr/testify/assert" ) var pyRecord, _ = hex.DecodeString("f884b8407098ad865b00a582051940cb9cf36836572411a47278783077011599ed5cd16b76f2635f4e234738f30813a89eb9137e3e3df5266e3a1f11df72ecf1145ccb9c01826964827634826970847f00000189736563703235366b31a103ca634cae0d49acb401d8a4c6b6fe8c55b70d115bf400769cc1400f3258cd31388375647082765f") diff --git a/p2p/enode/nodedb.go b/p2p/enode/nodedb.go index 1f31c98d22..d125d6b684 100644 --- a/p2p/enode/nodedb.go +++ b/p2p/enode/nodedb.go @@ -26,14 +26,15 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/p2p/enr" - "github.com/ethereum/go-ethereum/rlp" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/opt" "github.com/syndtr/goleveldb/leveldb/storage" "github.com/syndtr/goleveldb/leveldb/util" + + "github.com/ethereum/go-ethereum/p2p/enr" + "github.com/ethereum/go-ethereum/rlp" ) // Keys in the node database. diff --git a/p2p/enr/enr_test.go b/p2p/enr/enr_test.go index 4fccb0cce9..5dfa9289bf 100644 --- a/p2p/enr/enr_test.go +++ b/p2p/enr/enr_test.go @@ -24,9 +24,10 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/rlp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/rlp" ) var rnd = rand.New(rand.NewSource(time.Now().UnixNano())) diff --git a/p2p/nat/nat.go b/p2p/nat/nat.go index c656044268..7a74554677 100644 --- a/p2p/nat/nat.go +++ b/p2p/nat/nat.go @@ -25,8 +25,9 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/log" natpmp "github.com/jackpal/go-nat-pmp" + + "github.com/ethereum/go-ethereum/log" ) // Interface An implementation of nat.Interface can map local ports to ports diff --git a/p2p/rlpx/buffer_test.go b/p2p/rlpx/buffer_test.go index 9fee4172bd..0d9ccc1df3 100644 --- a/p2p/rlpx/buffer_test.go +++ b/p2p/rlpx/buffer_test.go @@ -20,8 +20,9 @@ import ( "bytes" "testing" - "github.com/ethereum/go-ethereum/common/hexutil" "github.com/stretchr/testify/assert" + + "github.com/ethereum/go-ethereum/common/hexutil" ) func TestReadBufferReset(t *testing.T) { diff --git a/p2p/rlpx/rlpx.go b/p2p/rlpx/rlpx.go index dd14822dee..3060c846e9 100644 --- a/p2p/rlpx/rlpx.go +++ b/p2p/rlpx/rlpx.go @@ -33,11 +33,12 @@ import ( "net" "time" + "github.com/golang/snappy" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/ecies" "github.com/ethereum/go-ethereum/rlp" - "github.com/golang/snappy" - "golang.org/x/crypto/sha3" ) // Conn is an RLPx network connection. It wraps a low-level network connection. The diff --git a/p2p/rlpx/rlpx_test.go b/p2p/rlpx/rlpx_test.go index 27d51546e7..118535f32a 100644 --- a/p2p/rlpx/rlpx_test.go +++ b/p2p/rlpx/rlpx_test.go @@ -29,11 +29,12 @@ import ( "testing" "github.com/davecgh/go-spew/spew" + "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/ecies" "github.com/ethereum/go-ethereum/p2p/pipes" "github.com/ethereum/go-ethereum/rlp" - "github.com/stretchr/testify/assert" ) type message struct { diff --git a/p2p/transport_test.go b/p2p/transport_test.go index 01695cd3af..4141397a3f 100644 --- a/p2p/transport_test.go +++ b/p2p/transport_test.go @@ -23,6 +23,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/pipes" ) diff --git a/rlp/decode.go b/rlp/decode.go index 0fbca243ee..c7d9cb282b 100644 --- a/rlp/decode.go +++ b/rlp/decode.go @@ -28,8 +28,9 @@ import ( "strings" "sync" - "github.com/ethereum/go-ethereum/rlp/internal/rlpstruct" "github.com/holiman/uint256" + + "github.com/ethereum/go-ethereum/rlp/internal/rlpstruct" ) //lint:ignore ST1012 EOL is not an error. diff --git a/rlp/decode_test.go b/rlp/decode_test.go index 07d9c579a6..00721bdf79 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -27,8 +27,9 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common/math" "github.com/holiman/uint256" + + "github.com/ethereum/go-ethereum/common/math" ) func TestStreamKind(t *testing.T) { diff --git a/rlp/encode.go b/rlp/encode.go index 3645bbfda0..ead074af44 100644 --- a/rlp/encode.go +++ b/rlp/encode.go @@ -23,8 +23,9 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/rlp/internal/rlpstruct" "github.com/holiman/uint256" + + "github.com/ethereum/go-ethereum/rlp/internal/rlpstruct" ) var ( diff --git a/rlp/encode_test.go b/rlp/encode_test.go index 314958eb56..12827308be 100644 --- a/rlp/encode_test.go +++ b/rlp/encode_test.go @@ -26,8 +26,9 @@ import ( "sync" "testing" - "github.com/ethereum/go-ethereum/common/math" "github.com/holiman/uint256" + + "github.com/ethereum/go-ethereum/common/math" ) type testEncoder struct { diff --git a/rpc/client_test.go b/rpc/client_test.go index 01c326afb0..33c082b536 100644 --- a/rpc/client_test.go +++ b/rpc/client_test.go @@ -34,6 +34,7 @@ import ( "time" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/log" ) diff --git a/rpc/websocket.go b/rpc/websocket.go index 9f67caf859..1de41582e7 100644 --- a/rpc/websocket.go +++ b/rpc/websocket.go @@ -28,8 +28,9 @@ import ( "time" mapset "github.com/deckarep/golang-set/v2" - "github.com/ethereum/go-ethereum/log" "github.com/gorilla/websocket" + + "github.com/ethereum/go-ethereum/log" ) const ( diff --git a/signer/core/apitypes/types.go b/signer/core/apitypes/types.go index e886d7fc44..7422840040 100644 --- a/signer/core/apitypes/types.go +++ b/signer/core/apitypes/types.go @@ -30,6 +30,8 @@ import ( "strconv" "strings" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -37,7 +39,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/kzg4844" - "github.com/holiman/uint256" ) var typedDataReferenceTypeRegexp = regexp.MustCompile(`^[A-Za-z](\w*)(\[\])?$`) diff --git a/signer/core/apitypes/types_test.go b/signer/core/apitypes/types_test.go index 7ea32f298c..54c47f31a8 100644 --- a/signer/core/apitypes/types_test.go +++ b/signer/core/apitypes/types_test.go @@ -21,10 +21,11 @@ import ( "encoding/json" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto/kzg4844" - "github.com/holiman/uint256" ) func TestIsPrimitive(t *testing.T) { diff --git a/signer/rules/rules.go b/signer/rules/rules.go index c9921e57a9..67aebf2587 100644 --- a/signer/rules/rules.go +++ b/signer/rules/rules.go @@ -24,6 +24,7 @@ import ( "strings" "github.com/dop251/goja" + "github.com/ethereum/go-ethereum/internal/ethapi" "github.com/ethereum/go-ethereum/internal/jsre/deps" "github.com/ethereum/go-ethereum/log" diff --git a/tests/state_test.go b/tests/state_test.go index 76fec97de0..ebedc0ac56 100644 --- a/tests/state_test.go +++ b/tests/state_test.go @@ -29,13 +29,14 @@ import ( "testing" "time" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/eth/tracers/logger" - "github.com/holiman/uint256" ) func initMatcher(st *testMatcher) { diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 416bab9472..c0e45b3a4d 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -25,6 +25,9 @@ import ( "strconv" "strings" + "github.com/holiman/uint256" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" @@ -43,8 +46,6 @@ import ( "github.com/ethereum/go-ethereum/triedb" "github.com/ethereum/go-ethereum/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb/pathdb" - "github.com/holiman/uint256" - "golang.org/x/crypto/sha3" ) // StateTest checks transaction processing without block context. diff --git a/triedb/hashdb/database.go b/triedb/hashdb/database.go index 4def10e338..039454b922 100644 --- a/triedb/hashdb/database.go +++ b/triedb/hashdb/database.go @@ -24,6 +24,7 @@ import ( "time" "github.com/VictoriaMetrics/fastcache" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" diff --git a/triedb/pathdb/database_test.go b/triedb/pathdb/database_test.go index f667944784..9cbf7612c4 100644 --- a/triedb/pathdb/database_test.go +++ b/triedb/pathdb/database_test.go @@ -23,6 +23,8 @@ import ( "math/rand" "testing" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" @@ -32,7 +34,6 @@ import ( "github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/trie/trienode" "github.com/ethereum/go-ethereum/trie/triestate" - "github.com/holiman/uint256" ) func updateTrie(db *Database, stateRoot common.Hash, addrHash common.Hash, root common.Hash, dirties map[common.Hash][]byte) (common.Hash, *trienode.NodeSet) { diff --git a/triedb/pathdb/disklayer.go b/triedb/pathdb/disklayer.go index e538a79280..9351cf0bcc 100644 --- a/triedb/pathdb/disklayer.go +++ b/triedb/pathdb/disklayer.go @@ -21,6 +21,7 @@ import ( "sync" "github.com/VictoriaMetrics/fastcache" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/crypto" diff --git a/triedb/pathdb/history.go b/triedb/pathdb/history.go index d77f7aa04d..12c7b5f1a8 100644 --- a/triedb/pathdb/history.go +++ b/triedb/pathdb/history.go @@ -24,12 +24,13 @@ import ( "slices" "time" + "golang.org/x/exp/maps" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/trie/triestate" - "golang.org/x/exp/maps" ) // State history records the state changes involved in executing a block. The diff --git a/triedb/pathdb/nodebuffer.go b/triedb/pathdb/nodebuffer.go index d3492602c8..3774a99e7a 100644 --- a/triedb/pathdb/nodebuffer.go +++ b/triedb/pathdb/nodebuffer.go @@ -23,6 +23,7 @@ import ( "time" "github.com/VictoriaMetrics/fastcache" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/crypto"