From e03e01ffd4f8874c583553ab78b9ad1a3eb53e78 Mon Sep 17 00:00:00 2001 From: Michael Kaplan Date: Fri, 31 Jan 2025 14:02:54 -0500 Subject: [PATCH 1/4] Begin libevm cutover --- accounts/abi/abi.go | 4 +- accounts/abi/abi_extra_test.go | 2 +- accounts/abi/abi_test.go | 6 +- accounts/abi/bind/auth.go | 6 +- accounts/abi/bind/backend.go | 2 +- accounts/abi/bind/backends/simulated.go | 2 +- accounts/abi/bind/base.go | 6 +- accounts/abi/bind/base_test.go | 8 +- accounts/abi/bind/bind.go | 2 +- accounts/abi/bind/bind_test.go | 74 +++++++++---------- accounts/abi/bind/template.go | 4 +- accounts/abi/bind/util.go | 4 +- accounts/abi/bind/util_test.go | 4 +- accounts/abi/error.go | 4 +- accounts/abi/event.go | 4 +- accounts/abi/event_test.go | 4 +- accounts/abi/method.go | 2 +- accounts/abi/pack.go | 4 +- accounts/abi/pack_test.go | 2 +- accounts/abi/packing_test.go | 2 +- accounts/abi/topics.go | 6 +- accounts/abi/topics_test.go | 4 +- accounts/abi/type.go | 2 +- accounts/abi/type_test.go | 2 +- accounts/abi/unpack.go | 2 +- accounts/abi/unpack_test.go | 2 +- accounts/accounts.go | 4 +- accounts/accounts_test.go | 2 +- accounts/external/backend.go | 8 +- accounts/keystore/account_cache.go | 4 +- accounts/keystore/account_cache_test.go | 2 +- accounts/keystore/file_cache.go | 2 +- accounts/keystore/key.go | 4 +- accounts/keystore/keystore.go | 6 +- accounts/keystore/keystore_test.go | 6 +- accounts/keystore/passphrase.go | 6 +- accounts/keystore/passphrase_test.go | 2 +- accounts/keystore/plain.go | 2 +- accounts/keystore/plain_test.go | 2 +- accounts/keystore/presale.go | 2 +- accounts/keystore/wallet.go | 2 +- accounts/keystore/watch.go | 2 +- accounts/manager.go | 4 +- accounts/scwallet/hub.go | 6 +- accounts/scwallet/securechannel.go | 2 +- accounts/scwallet/wallet.go | 6 +- cmd/abigen/main.go | 6 +- consensus/consensus.go | 2 +- consensus/dummy/consensus.go | 2 +- consensus/dummy/consensus_test.go | 2 +- consensus/dummy/dynamic_fees.go | 4 +- consensus/dummy/dynamic_fees_test.go | 6 +- constants/constants.go | 2 +- core/bench_test.go | 8 +- core/blockchain.go | 10 +-- core/blockchain_log_test.go | 4 +- core/blockchain_reader.go | 4 +- core/blockchain_repair_test.go | 4 +- core/blockchain_snapshot_test.go | 4 +- core/blockchain_test.go | 6 +- core/bloom_indexer.go | 6 +- core/bloombits/matcher.go | 4 +- core/bloombits/matcher_test.go | 2 +- core/chain_indexer.go | 8 +- core/chain_indexer_test.go | 2 +- core/chain_makers.go | 4 +- core/chain_makers_test.go | 4 +- core/events.go | 2 +- core/evm.go | 4 +- core/gen_genesis.go | 6 +- core/genesis.go | 10 +-- core/genesis_extra_test.go | 2 +- core/genesis_test.go | 4 +- core/headerchain.go | 6 +- core/headerchain_test.go | 2 +- core/mkalloc.go | 4 +- core/predicate_check.go | 4 +- core/predicate_check_test.go | 2 +- core/rawdb/accessors_chain.go | 8 +- core/rawdb/accessors_chain_test.go | 4 +- core/rawdb/accessors_indexes.go | 8 +- core/rawdb/accessors_indexes_test.go | 6 +- core/rawdb/accessors_metadata.go | 8 +- core/rawdb/accessors_snapshot.go | 6 +- core/rawdb/accessors_state.go | 6 +- core/rawdb/accessors_state_sync.go | 6 +- core/rawdb/accessors_state_sync_test.go | 2 +- core/rawdb/accessors_trie.go | 8 +- core/rawdb/chain_iterator.go | 10 +-- core/rawdb/chain_iterator_test.go | 2 +- core/rawdb/database.go | 12 +-- core/rawdb/key_length_iterator.go | 2 +- core/rawdb/schema.go | 4 +- core/rawdb/table.go | 2 +- core/rawdb/table_test.go | 2 +- core/rlp_test.go | 6 +- core/state/access_list.go | 2 +- core/state/database.go | 8 +- core/state/dump.go | 8 +- core/state/iterator.go | 4 +- core/state/iterator_test.go | 4 +- core/state/journal.go | 2 +- core/state/pruner/bloom.go | 4 +- core/state/pruner/pruner.go | 8 +- core/state/snapshot/context.go | 4 +- core/state/snapshot/conversion.go | 8 +- core/state/snapshot/difflayer.go | 4 +- core/state/snapshot/difflayer_test.go | 6 +- core/state/snapshot/disklayer.go | 6 +- core/state/snapshot/disklayer_test.go | 6 +- core/state/snapshot/generate.go | 8 +- core/state/snapshot/generate_test.go | 8 +- core/state/snapshot/iterator.go | 4 +- core/state/snapshot/iterator_binary.go | 2 +- core/state/snapshot/iterator_fast.go | 2 +- core/state/snapshot/iterator_test.go | 2 +- core/state/snapshot/journal.go | 8 +- core/state/snapshot/snapshot.go | 6 +- core/state/snapshot/snapshot_ext.go | 4 +- core/state/snapshot/snapshot_test.go | 4 +- core/state/snapshot/utils.go | 6 +- core/state/snapshot/wipe.go | 6 +- core/state/snapshot/wipe_test.go | 4 +- core/state/state_object.go | 6 +- core/state/state_object_test.go | 2 +- core/state/state_test.go | 6 +- core/state/statedb.go | 6 +- core/state/statedb_fuzz_test.go | 6 +- core/state/statedb_test.go | 6 +- core/state/sync_test.go | 6 +- core/state/test_statedb.go | 2 +- core/state/transient_storage.go | 2 +- core/state/trie_prefetcher.go | 4 +- core/state/trie_prefetcher.libevm.go | 4 +- core/state/trie_prefetcher_extra_test.go | 4 +- core/state/trie_prefetcher_test.go | 2 +- core/state_manager.go | 4 +- core/state_manager_test.go | 2 +- core/state_processor.go | 6 +- core/state_processor_test.go | 4 +- core/state_transition.go | 6 +- core/state_transition_test.go | 6 +- core/test_blockchain.go | 6 +- core/txindexer.go | 4 +- core/txindexer_test.go | 6 +- core/txpool/blobpool/blobpool.go | 8 +- core/txpool/blobpool/blobpool_test.go | 12 +-- core/txpool/blobpool/config.go | 2 +- core/txpool/blobpool/evictheap.go | 2 +- core/txpool/blobpool/evictheap_test.go | 2 +- core/txpool/blobpool/interface.go | 2 +- core/txpool/blobpool/limbo.go | 6 +- core/txpool/legacypool/journal.go | 6 +- core/txpool/legacypool/legacypool.go | 8 +- core/txpool/legacypool/legacypool2_test.go | 6 +- core/txpool/legacypool/legacypool_test.go | 6 +- core/txpool/legacypool/list.go | 2 +- core/txpool/legacypool/list_test.go | 4 +- core/txpool/legacypool/noncer.go | 2 +- core/txpool/subpool.go | 4 +- core/txpool/txpool.go | 6 +- core/txpool/validation.go | 6 +- core/types/account.go | 6 +- core/types/block.go | 8 +- core/types/block_ext.go | 2 +- core/types/block_test.go | 8 +- core/types/bloom9.go | 4 +- core/types/bloom9_test.go | 4 +- core/types/gen_access_tuple.go | 2 +- core/types/gen_account.go | 6 +- core/types/gen_account_rlp.go | 2 +- core/types/gen_genesis_account.go | 6 +- core/types/gen_header_json.go | 4 +- core/types/gen_header_rlp.go | 2 +- core/types/gen_log_json.go | 4 +- core/types/gen_log_rlp.go | 2 +- core/types/gen_receipt_json.go | 4 +- core/types/hashes.go | 6 +- core/types/hashing.go | 6 +- core/types/hashing_test.go | 8 +- core/types/log.go | 6 +- core/types/receipt.go | 8 +- core/types/receipt_test.go | 4 +- core/types/rlp_fuzzer_test.go | 2 +- core/types/state_account.go | 6 +- core/types/transaction.go | 8 +- core/types/transaction_marshalling.go | 6 +- core/types/transaction_signing.go | 4 +- core/types/transaction_signing_test.go | 6 +- core/types/transaction_test.go | 6 +- core/types/tx_access_list.go | 4 +- core/types/tx_blob.go | 6 +- core/types/tx_blob_test.go | 6 +- core/types/tx_dynamic_fee.go | 4 +- core/types/tx_legacy.go | 2 +- core/types/types_test.go | 6 +- core/vm/analysis_test.go | 2 +- core/vm/common.go | 4 +- core/vm/contract.go | 2 +- core/vm/contracts.go | 14 ++-- core/vm/contracts_fuzz_test.go | 2 +- core/vm/contracts_stateful.go | 2 +- core/vm/contracts_stateful_native_asset.go | 2 +- core/vm/contracts_stateful_test.go | 4 +- core/vm/contracts_test.go | 2 +- core/vm/eips.go | 2 +- core/vm/evm.go | 4 +- core/vm/evm_test.go | 2 +- core/vm/gas_table.go | 4 +- core/vm/gas_table_test.go | 4 +- core/vm/instructions.go | 4 +- core/vm/instructions_test.go | 6 +- core/vm/interface.go | 2 +- core/vm/interpreter.go | 8 +- core/vm/interpreter_test.go | 4 +- core/vm/logger.go | 2 +- core/vm/memory_test.go | 2 +- core/vm/operations_acl.go | 4 +- core/vm/runtime/runtime.go | 4 +- core/vm/runtime/runtime_example_test.go | 2 +- core/vm/runtime/runtime_test.go | 4 +- eth/api.go | 2 +- eth/api_admin.go | 2 +- eth/api_backend.go | 6 +- eth/api_backend_test.go | 4 +- eth/api_debug.go | 10 +-- eth/api_debug_test.go | 4 +- eth/backend.go | 8 +- eth/bloombits.go | 2 +- eth/ethconfig/config.go | 2 +- eth/filters/api.go | 6 +- eth/filters/api_test.go | 2 +- eth/filters/bench_test.go | 6 +- eth/filters/filter.go | 2 +- eth/filters/filter_system.go | 8 +- eth/filters/filter_system_test.go | 6 +- eth/filters/filter_test.go | 4 +- eth/gasestimator/gasestimator.go | 4 +- eth/gasprice/fee_info_provider_test.go | 2 +- eth/gasprice/feehistory.go | 4 +- eth/gasprice/feehistory_test.go | 2 +- eth/gasprice/gasprice.go | 10 +-- eth/gasprice/gasprice_test.go | 6 +- eth/state_accessor.go | 4 +- eth/tracers/api.go | 10 +-- eth/tracers/api_test.go | 8 +- .../internal/tracetest/calltrace_test.go | 8 +- .../internal/tracetest/flat_calltrace_test.go | 6 +- .../internal/tracetest/prestate_test.go | 2 +- eth/tracers/js/goja.go | 6 +- eth/tracers/js/tracer_test.go | 2 +- eth/tracers/logger/access_list_tracer.go | 2 +- eth/tracers/logger/gen_structlog.go | 6 +- eth/tracers/logger/logger.go | 6 +- eth/tracers/logger/logger_json.go | 4 +- eth/tracers/logger/logger_test.go | 2 +- eth/tracers/native/4byte.go | 2 +- eth/tracers/native/call.go | 6 +- eth/tracers/native/call_flat.go | 4 +- eth/tracers/native/gen_account_json.go | 4 +- eth/tracers/native/gen_callframe_json.go | 4 +- eth/tracers/native/gen_flatcallaction_json.go | 4 +- eth/tracers/native/gen_flatcallresult_json.go | 4 +- eth/tracers/native/mux.go | 2 +- eth/tracers/native/noop.go | 2 +- eth/tracers/native/prestate.go | 8 +- eth/tracers/tracers.go | 2 +- eth/tracers/tracers_test.go | 4 +- ethclient/corethclient/corethclient.go | 4 +- ethclient/ethclient.go | 4 +- ethclient/signer.go | 2 +- ethclient/simulated/backend.go | 2 +- ethclient/simulated/backend_test.go | 4 +- go.mod | 3 +- go.sum | 8 ++ interfaces/interfaces.go | 2 +- internal/blocktest/test_hash.go | 2 +- internal/debug/api.go | 2 +- internal/debug/flags.go | 2 +- internal/debug/trace.go | 2 +- internal/ethapi/addrlock.go | 2 +- internal/ethapi/api.go | 12 +-- internal/ethapi/api_extra.go | 6 +- internal/ethapi/api_extra_test.go | 2 +- internal/ethapi/api_test.go | 12 +-- internal/ethapi/backend.go | 6 +- internal/ethapi/errors.go | 2 +- internal/ethapi/mocks_test.go | 6 +- internal/ethapi/transaction_args.go | 10 +-- internal/ethapi/transaction_args_test.go | 4 +- internal/shutdowncheck/shutdown_tracker.go | 6 +- metrics/cpu_enabled.go | 2 +- metrics/cputime_unix.go | 2 +- miner/miner.go | 4 +- miner/ordering.go | 2 +- miner/ordering_ext.go | 2 +- miner/ordering_test.go | 4 +- miner/worker.go | 6 +- node/api.go | 4 +- node/config.go | 2 +- params/config.go | 2 +- params/config_extra.go | 2 +- params/precompile_upgrade.go | 2 +- params/protocol_params.go | 2 +- peer/network.go | 2 +- peer/peer_tracker.go | 2 +- plugin/evm/admin.go | 2 +- plugin/evm/api.go | 4 +- plugin/evm/atomic/export_tx.go | 4 +- plugin/evm/atomic/import_tx.go | 4 +- plugin/evm/atomic/mempool.go | 2 +- plugin/evm/atomic/tx.go | 2 +- plugin/evm/atomic_backend.go | 4 +- plugin/evm/atomic_state.go | 4 +- plugin/evm/atomic_syncer.go | 2 +- plugin/evm/atomic_syncer_test.go | 2 +- plugin/evm/atomic_trie.go | 6 +- plugin/evm/atomic_trie_iterator.go | 2 +- plugin/evm/atomic_trie_iterator_test.go | 2 +- plugin/evm/atomic_trie_test.go | 2 +- plugin/evm/atomic_tx_repository.go | 4 +- plugin/evm/atomic_tx_repository_test.go | 2 +- plugin/evm/block.go | 6 +- plugin/evm/block_builder.go | 2 +- plugin/evm/block_verification.go | 2 +- plugin/evm/client/utils.go | 2 +- plugin/evm/config/config.go | 4 +- plugin/evm/config/config_test.go | 2 +- plugin/evm/database/wrapped_database.go | 2 +- plugin/evm/export_tx_test.go | 2 +- plugin/evm/ext_data_hashes.go | 2 +- plugin/evm/gossip.go | 4 +- plugin/evm/gossip_test.go | 4 +- plugin/evm/gossiper_eth_gossiping_test.go | 4 +- plugin/evm/import_tx_test.go | 2 +- plugin/evm/log.go | 2 +- plugin/evm/log_test.go | 2 +- plugin/evm/message/block_request.go | 2 +- plugin/evm/message/block_request_test.go | 2 +- plugin/evm/message/code_request.go | 2 +- plugin/evm/message/code_request_test.go | 2 +- plugin/evm/message/leafs_request.go | 4 +- plugin/evm/message/leafs_request_test.go | 2 +- plugin/evm/message/syncable.go | 4 +- plugin/evm/network_handler.go | 2 +- plugin/evm/prestate_tracer_test.go | 4 +- plugin/evm/syncervm_client.go | 6 +- plugin/evm/syncervm_server.go | 4 +- plugin/evm/syncervm_test.go | 8 +- plugin/evm/tx_test.go | 2 +- plugin/evm/vm.go | 8 +- plugin/evm/vm_database.go | 4 +- plugin/evm/vm_test.go | 6 +- plugin/evm/vm_warp_test.go | 4 +- precompile/contract/contract.go | 2 +- precompile/contract/interfaces.go | 2 +- precompile/contract/mocks.go | 2 +- precompile/contract/utils.go | 2 +- precompile/contracts/warp/config.go | 6 +- precompile/contracts/warp/contract.go | 4 +- precompile/contracts/warp/contract_test.go | 2 +- .../contracts/warp/contract_warp_handler.go | 4 +- precompile/contracts/warp/module.go | 2 +- precompile/modules/module.go | 2 +- precompile/modules/registerer.go | 2 +- precompile/modules/registerer_test.go | 2 +- precompile/precompileconfig/config.go | 2 +- precompile/precompileconfig/mocks.go | 2 +- precompile/testutils/test_precompile.go | 2 +- predicate/predicate_bytes.go | 2 +- predicate/predicate_results.go | 2 +- predicate/predicate_results_test.go | 2 +- predicate/predicate_slots.go | 2 +- predicate/predicate_tx.go | 2 +- rpc/client.go | 2 +- rpc/client_test.go | 2 +- rpc/handler.go | 2 +- rpc/server.go | 2 +- rpc/service.go | 2 +- rpc/subscription_test.go | 2 +- rpc/types.go | 4 +- rpc/types_test.go | 4 +- rpc/websocket.go | 2 +- scripts/geth-allowed-packages.txt | 40 +++++----- scripts/lint_allowed_geth_imports.sh | 2 +- signer/core/apitypes/types.go | 4 +- sync/client/client.go | 8 +- sync/client/client_test.go | 4 +- sync/client/leaf_syncer.go | 4 +- sync/client/mock_client.go | 4 +- sync/handlers/block_request.go | 4 +- sync/handlers/block_request_test.go | 6 +- sync/handlers/code_request.go | 6 +- sync/handlers/code_request_test.go | 6 +- sync/handlers/handler.go | 2 +- sync/handlers/leafs_request.go | 8 +- sync/handlers/leafs_request_test.go | 6 +- sync/handlers/test_providers.go | 2 +- sync/statesync/code_syncer.go | 4 +- sync/statesync/code_syncer_test.go | 6 +- sync/statesync/state_syncer.go | 4 +- sync/statesync/sync_helpers.go | 4 +- sync/statesync/sync_test.go | 8 +- sync/statesync/test_sync.go | 8 +- sync/statesync/trie_queue.go | 4 +- sync/statesync/trie_segments.go | 6 +- sync/statesync/trie_sync_stats.go | 4 +- sync/statesync/trie_sync_tasks.go | 8 +- sync/syncutils/iterators.go | 2 +- sync/syncutils/test_trie.go | 6 +- tests/rlp_test_util.go | 2 +- tests/state_test_util.go | 4 +- trie/committer.go | 2 +- trie/database_test.go | 4 +- trie/errors.go | 2 +- trie/hasher.go | 4 +- trie/iterator.go | 2 +- trie/iterator_test.go | 4 +- trie/node.go | 4 +- trie/node_enc.go | 2 +- trie/node_test.go | 4 +- trie/proof.go | 6 +- trie/proof_test.go | 6 +- trie/secure_trie.go | 4 +- trie/secure_trie_test.go | 4 +- trie/stacktrie.go | 4 +- trie/stacktrie_fuzzer_test.go | 4 +- trie/stacktrie_test.go | 4 +- trie/sync_test.go | 4 +- trie/testutil/utils.go | 4 +- trie/tracer.go | 2 +- trie/tracer_test.go | 2 +- trie/trie.go | 4 +- trie/trie_id.go | 2 +- trie/trie_reader.go | 4 +- trie/trie_test.go | 8 +- trie/trienode/node.go | 2 +- trie/triestate/state.go | 6 +- trie/utils/verkle.go | 2 +- trie/verkle.go | 4 +- trie/verkle_test.go | 2 +- triedb/database.go | 6 +- triedb/database/database.go | 2 +- triedb/hashdb/database.go | 8 +- triedb/pathdb/database.go | 6 +- triedb/pathdb/database_test.go | 6 +- triedb/pathdb/difflayer.go | 4 +- triedb/pathdb/difflayer_test.go | 2 +- triedb/pathdb/disklayer.go | 6 +- triedb/pathdb/errors.go | 4 +- triedb/pathdb/history.go | 2 +- triedb/pathdb/history_test.go | 4 +- triedb/pathdb/journal.go | 8 +- triedb/pathdb/layertree.go | 2 +- triedb/pathdb/nodebuffer.go | 8 +- triedb/pathdb/testutils.go | 4 +- triedb/preimages.go | 4 +- utils/address_range.go | 2 +- utils/bytes.go | 2 +- utils/bytes_test.go | 2 +- warp/aggregator/aggregator.go | 2 +- warp/backend.go | 2 +- warp/client.go | 2 +- warp/handlers/signature_request.go | 2 +- warp/service.go | 4 +- 465 files changed, 1016 insertions(+), 1007 deletions(-) diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go index 1a6e224090..cb924a0189 100644 --- a/accounts/abi/abi.go +++ b/accounts/abi/abi.go @@ -34,8 +34,8 @@ import ( "io" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) // The ABI holds information about a contract's context and available diff --git a/accounts/abi/abi_extra_test.go b/accounts/abi/abi_extra_test.go index 52bce1b0a4..32d3c2d0b5 100644 --- a/accounts/abi/abi_extra_test.go +++ b/accounts/abi/abi_extra_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/accounts/abi/abi_test.go b/accounts/abi/abi_test.go index 68052e639a..1e30d27f19 100644 --- a/accounts/abi/abi_test.go +++ b/accounts/abi/abi_test.go @@ -36,9 +36,9 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/assert" ) diff --git a/accounts/abi/bind/auth.go b/accounts/abi/bind/auth.go index cdce77d0d8..2808466932 100644 --- a/accounts/abi/bind/auth.go +++ b/accounts/abi/bind/auth.go @@ -37,9 +37,9 @@ import ( "github.com/ava-labs/coreth/accounts/external" "github.com/ava-labs/coreth/accounts/keystore" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" ) // ErrNoChainID is returned whenever the user failed to specify a chain id. diff --git a/accounts/abi/bind/backend.go b/accounts/abi/bind/backend.go index 4cd21c399b..1aaf78161b 100644 --- a/accounts/abi/bind/backend.go +++ b/accounts/abi/bind/backend.go @@ -33,7 +33,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/interfaces" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var ( diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index f1594e525b..9dadf11482 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -33,7 +33,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/ethclient/simulated" "github.com/ava-labs/coreth/interfaces" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // Verify that SimulatedBackend implements required interfaces diff --git a/accounts/abi/bind/base.go b/accounts/abi/bind/base.go index 34f60300e4..6a0d9f4de6 100644 --- a/accounts/abi/bind/base.go +++ b/accounts/abi/bind/base.go @@ -39,9 +39,9 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/interfaces" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/event" ) const basefeeWiggleMultiplier = 2 diff --git a/accounts/abi/bind/base_test.go b/accounts/abi/bind/base_test.go index aa750dc208..916ee6fa5f 100644 --- a/accounts/abi/bind/base_test.go +++ b/accounts/abi/bind/base_test.go @@ -40,10 +40,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/interfaces" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "github.com/stretchr/testify/assert" ) diff --git a/accounts/abi/bind/bind.go b/accounts/abi/bind/bind.go index 0a4223c5e5..e6a22121d4 100644 --- a/accounts/abi/bind/bind.go +++ b/accounts/abi/bind/bind.go @@ -40,7 +40,7 @@ import ( "unicode" "github.com/ava-labs/coreth/accounts/abi" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) // Lang is a target programming language selector to generate bindings for. diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go index a54919722c..c1035f6b8a 100644 --- a/accounts/abi/bind/bind_test.go +++ b/accounts/abi/bind/bind_test.go @@ -35,7 +35,7 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var bindTests = []struct { @@ -56,7 +56,7 @@ var bindTests = []struct { `contract NilContract {}`, []string{`606060405260068060106000396000f3606060405200`}, []string{`[]`}, - `"github.com/ethereum/go-ethereum/common"`, + `"github.com/ava-labs/libevm/common"`, ` if b, err := NewEmpty(common.Address{}, nil); b == nil || err != nil { t.Fatalf("combined binding (%v) nil or error (%v) not nil", b, nil) @@ -79,7 +79,7 @@ var bindTests = []struct { `https://ethereum.org/token`, []string{`60606040526040516107fd3803806107fd83398101604052805160805160a05160c051929391820192909101600160a060020a0333166000908152600360209081526040822086905581548551838052601f6002600019610100600186161502019093169290920482018390047f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390810193919290918801908390106100e857805160ff19168380011785555b506101189291505b8082111561017157600081556001016100b4565b50506002805460ff19168317905550505050610658806101a56000396000f35b828001600101855582156100ac579182015b828111156100ac5782518260005055916020019190600101906100fa565b50508060016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061017557805160ff19168380011785555b506100c89291506100b4565b5090565b82800160010185558215610165579182015b8281111561016557825182600050559160200191906001019061018756606060405236156100775760e060020a600035046306fdde03811461007f57806323b872dd146100dc578063313ce5671461010e57806370a082311461011a57806395d89b4114610132578063a9059cbb1461018e578063cae9ca51146101bd578063dc3080f21461031c578063dd62ed3e14610341575b610365610002565b61036760008054602060026001831615610100026000190190921691909104601f810182900490910260809081016040526060828152929190828280156104eb5780601f106104c0576101008083540402835291602001916104eb565b6103d5600435602435604435600160a060020a038316600090815260036020526040812054829010156104f357610002565b6103e760025460ff1681565b6103d560043560036020526000908152604090205481565b610367600180546020600282841615610100026000190190921691909104601f810182900490910260809081016040526060828152929190828280156104eb5780601f106104c0576101008083540402835291602001916104eb565b610365600435602435600160a060020a033316600090815260036020526040902054819010156103f157610002565b60806020604435600481810135601f8101849004909302840160405260608381526103d5948235946024803595606494939101919081908382808284375094965050505050505060006000836004600050600033600160a060020a03168152602001908152602001600020600050600087600160a060020a031681526020019081526020016000206000508190555084905080600160a060020a0316638f4ffcb1338630876040518560e060020a0281526004018085600160a060020a0316815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156102f25780820380516001836020036101000a031916815260200191505b50955050505050506000604051808303816000876161da5a03f11561000257505050509392505050565b6005602090815260043560009081526040808220909252602435815220546103d59081565b60046020818152903560009081526040808220909252602435815220546103d59081565b005b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156103c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051918252519081900360200190f35b6060908152602090f35b600160a060020a03821660009081526040902054808201101561041357610002565b806003600050600033600160a060020a03168152602001908152602001600020600082828250540392505081905550806003600050600084600160a060020a0316815260200190815260200160002060008282825054019250508190555081600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b820191906000526020600020905b8154815290600101906020018083116104ce57829003601f168201915b505050505081565b600160a060020a03831681526040812054808301101561051257610002565b600160a060020a0380851680835260046020908152604080852033949094168086529382528085205492855260058252808520938552929052908220548301111561055c57610002565b816003600050600086600160a060020a03168152602001908152602001600020600082828250540392505081905550816003600050600085600160a060020a03168152602001908152602001600020600082828250540192505081905550816005600050600086600160a060020a03168152602001908152602001600020600050600033600160a060020a0316815260200190815260200160002060008282825054019250508190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3939250505056`}, []string{`[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"spentAllowance","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"inputs":[{"name":"initialSupply","type":"uint256"},{"name":"tokenName","type":"string"},{"name":"decimalUnits","type":"uint8"},{"name":"tokenSymbol","type":"string"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]`}, - `"github.com/ethereum/go-ethereum/common"`, + `"github.com/ava-labs/libevm/common"`, ` if b, err := NewToken(common.Address{}, nil); b == nil || err != nil { t.Fatalf("binding (%v) nil or error (%v) not nil", b, nil) @@ -95,7 +95,7 @@ var bindTests = []struct { `https://ethereum.org/crowdsale`, []string{`606060408190526007805460ff1916905560a0806105a883396101006040529051608051915160c05160e05160008054600160a060020a03199081169095178155670de0b6b3a7640000958602600155603c9093024201600355930260045560058054909216909217905561052f90819061007990396000f36060604052361561006c5760e060020a600035046301cb3b20811461008257806329dcb0cf1461014457806338af3eed1461014d5780636e66f6e91461015f5780637a3a0e84146101715780637b3e5e7b1461017a578063a035b1fe14610183578063dc0d3dff1461018c575b61020060075460009060ff161561032357610002565b61020060035460009042106103205760025460015490106103cb576002548154600160a060020a0316908290606082818181858883f150915460025460408051600160a060020a039390931683526020830191909152818101869052517fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf6945090819003909201919050a15b60405160008054600160a060020a039081169230909116319082818181858883f150506007805460ff1916600117905550505050565b6103a160035481565b6103ab600054600160a060020a031681565b6103ab600554600160a060020a031681565b6103a160015481565b6103a160025481565b6103a160045481565b6103be60043560068054829081101561000257506000526002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f8101547ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d409190910154600160a060020a03919091169082565b005b505050815481101561000257906000526020600020906002020160005060008201518160000160006101000a815481600160a060020a030219169083021790555060208201518160010160005055905050806002600082828250540192505081905550600560009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb3360046000505484046040518360e060020a0281526004018083600160a060020a03168152602001828152602001925050506000604051808303816000876161da5a03f11561000257505060408051600160a060020a03331681526020810184905260018183015290517fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf692509081900360600190a15b50565b5060a0604052336060908152346080819052600680546001810180835592939282908280158290116102025760020281600202836000526020600020918201910161020291905b8082111561039d57805473ffffffffffffffffffffffffffffffffffffffff19168155600060019190910190815561036a565b5090565b6060908152602090f35b600160a060020a03166060908152602090f35b6060918252608052604090f35b5b60065481101561010e576006805482908110156100025760009182526002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0190600680549254600160a060020a0316928490811015610002576002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40015460405190915082818181858883f19350505050507fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf660066000508281548110156100025760008290526002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01548154600160a060020a039190911691908490811015610002576002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40015460408051600160a060020a0394909416845260208401919091526000838201525191829003606001919050a16001016103cc56`}, []string{`[{"constant":false,"inputs":[],"name":"checkGoalReached","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"deadline","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"tokenReward","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"fundingGoal","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"amountRaised","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"price","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"funders","outputs":[{"name":"addr","type":"address"},{"name":"amount","type":"uint256"}],"type":"function"},{"inputs":[{"name":"ifSuccessfulSendTo","type":"address"},{"name":"fundingGoalInEthers","type":"uint256"},{"name":"durationInMinutes","type":"uint256"},{"name":"etherCostOfEachToken","type":"uint256"},{"name":"addressOfTokenUsedAsReward","type":"address"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"backer","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"isContribution","type":"bool"}],"name":"FundTransfer","type":"event"}]`}, - `"github.com/ethereum/go-ethereum/common"`, + `"github.com/ava-labs/libevm/common"`, ` if b, err := NewCrowdsale(common.Address{}, nil); b == nil || err != nil { t.Fatalf("binding (%v) nil or error (%v) not nil", b, nil) @@ -111,7 +111,7 @@ var bindTests = []struct { `https://ethereum.org/dao`, []string{`606060405260405160808061145f833960e06040529051905160a05160c05160008054600160a060020a03191633179055600184815560028490556003839055600780549182018082558280158290116100b8576003028160030283600052602060002091820191016100b891906101c8565b50506060919091015160029190910155600160a060020a0381166000146100a65760008054600160a060020a031916821790555b505050506111f18061026e6000396000f35b505060408051608081018252600080825260208281018290528351908101845281815292820192909252426060820152600780549194509250811015610002579081527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6889050815181546020848101517401000000000000000000000000000000000000000002600160a060020a03199290921690921760a060020a60ff021916178255604083015180516001848101805460008281528690209195600293821615610100026000190190911692909204601f9081018390048201949192919091019083901061023e57805160ff19168380011785555b50610072929150610226565b5050600060028201556001015b8082111561023a578054600160a860020a031916815560018181018054600080835592600290821615610100026000190190911604601f81901061020c57506101bb565b601f0160209004906000526020600020908101906101bb91905b8082111561023a5760008155600101610226565b5090565b828001600101855582156101af579182015b828111156101af57825182600050559160200191906001019061025056606060405236156100b95760e060020a6000350463013cf08b81146100bb578063237e9492146101285780633910682114610281578063400e3949146102995780635daf08ca146102a257806369bd34361461032f5780638160f0b5146103385780638da5cb5b146103415780639644fcbd14610353578063aa02a90f146103be578063b1050da5146103c7578063bcca1fd3146104b5578063d3c0715b146104dc578063eceb29451461058d578063f2fde38b1461067b575b005b61069c6004356004805482908110156100025790600052602060002090600a02016000506005810154815460018301546003840154600485015460068601546007870154600160a060020a03959095169750929560020194919360ff828116946101009093041692919089565b60408051602060248035600481810135601f81018590048502860185019096528585526107759581359591946044949293909201918190840183828082843750949650505050505050600060006004600050848154811015610002575090527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e600a8402908101547f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b909101904210806101e65750600481015460ff165b8061026757508060000160009054906101000a9004600160a060020a03168160010160005054846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020816007016000505414155b8061027757506001546005820154105b1561109257610002565b61077560043560066020526000908152604090205481565b61077560055481565b61078760043560078054829081101561000257506000526003026000805160206111d18339815191528101547fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a820154600160a060020a0382169260a060020a90920460ff16917fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689019084565b61077560025481565b61077560015481565b610830600054600160a060020a031681565b604080516020604435600481810135601f81018490048402850184019095528484526100b9948135946024803595939460649492939101918190840183828082843750949650505050505050600080548190600160a060020a03908116339091161461084d57610002565b61077560035481565b604080516020604435600481810135601f8101849004840285018401909552848452610775948135946024803595939460649492939101918190840183828082843750506040805160209735808a0135601f81018a90048a0283018a019093528282529698976084979196506024909101945090925082915084018382808284375094965050505050505033600160a060020a031660009081526006602052604081205481908114806104ab5750604081205460078054909190811015610002579082526003026000805160206111d1833981519152015460a060020a900460ff16155b15610ce557610002565b6100b960043560243560443560005433600160a060020a03908116911614610b1857610002565b604080516020604435600481810135601f810184900484028501840190955284845261077594813594602480359593946064949293910191819084018382808284375094965050505050505033600160a060020a031660009081526006602052604081205481908114806105835750604081205460078054909190811015610002579082526003026000805160206111d18339815191520181505460a060020a900460ff16155b15610f1d57610002565b604080516020606435600481810135601f81018490048402850184019095528484526107759481359460248035956044359560849492019190819084018382808284375094965050505050505060006000600460005086815481101561000257908252600a027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01815090508484846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160070160005054149150610cdc565b6100b960043560005433600160a060020a03908116911614610f0857610002565b604051808a600160a060020a031681526020018981526020018060200188815260200187815260200186815260200185815260200184815260200183815260200182810382528981815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561075e5780601f106107335761010080835404028352916020019161075e565b820191906000526020600020905b81548152906001019060200180831161074157829003601f168201915b50509a505050505050505050505060405180910390f35b60408051918252519081900360200190f35b60408051600160a060020a038616815260208101859052606081018390526080918101828152845460026001821615610100026000190190911604928201839052909160a08301908590801561081e5780601f106107f35761010080835404028352916020019161081e565b820191906000526020600020905b81548152906001019060200180831161080157829003601f168201915b50509550505050505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b600160a060020a03851660009081526006602052604081205414156108a957604060002060078054918290556001820180825582801582901161095c5760030281600302836000526020600020918201910161095c9190610a4f565b600160a060020a03851660009081526006602052604090205460078054919350908390811015610002575060005250600381026000805160206111d183398151915201805474ff0000000000000000000000000000000000000000191660a060020a85021781555b60408051600160a060020a03871681526020810186905281517f27b022af4a8347100c7a041ce5ccf8e14d644ff05de696315196faae8cd50c9b929181900390910190a15050505050565b505050915081506080604051908101604052808681526020018581526020018481526020014281526020015060076000508381548110156100025790600052602060002090600302016000508151815460208481015160a060020a02600160a060020a03199290921690921774ff00000000000000000000000000000000000000001916178255604083015180516001848101805460008281528690209195600293821615610100026000190190911692909204601f90810183900482019491929190910190839010610ad357805160ff19168380011785555b50610b03929150610abb565b5050600060028201556001015b80821115610acf57805474ffffffffffffffffffffffffffffffffffffffffff1916815560018181018054600080835592600290821615610100026000190190911604601f819010610aa15750610a42565b601f016020900490600052602060002090810190610a4291905b80821115610acf5760008155600101610abb565b5090565b82800160010185558215610a36579182015b82811115610a36578251826000505591602001919060010190610ae5565b50506060919091015160029190910155610911565b600183905560028290556003819055604080518481526020810184905280820183905290517fa439d3fa452be5e0e1e24a8145e715f4fd8b9c08c96a42fd82a855a85e5d57de9181900360600190a1505050565b50508585846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160070160005081905550600260005054603c024201816003016000508190555060008160040160006101000a81548160ff0219169083021790555060008160040160016101000a81548160ff02191690830217905550600081600501600050819055507f646fec02522b41e7125cfc859a64fd4f4cefd5dc3b6237ca0abe251ded1fa881828787876040518085815260200184600160a060020a03168152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f168015610cc45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1600182016005555b50949350505050565b6004805460018101808355909190828015829011610d1c57600a0281600a028360005260206000209182019101610d1c9190610db8565b505060048054929450918491508110156100025790600052602060002090600a02016000508054600160a060020a031916871781556001818101879055855160028381018054600082815260209081902096975091959481161561010002600019011691909104601f90810182900484019391890190839010610ed857805160ff19168380011785555b50610b6c929150610abb565b50506001015b80821115610acf578054600160a060020a03191681556000600182810182905560028381018054848255909281161561010002600019011604601f819010610e9c57505b5060006003830181905560048301805461ffff191690556005830181905560068301819055600783018190556008830180548282559082526020909120610db2916002028101905b80821115610acf57805474ffffffffffffffffffffffffffffffffffffffffff1916815560018181018054600080835592600290821615610100026000190190911604601f819010610eba57505b5050600101610e44565b601f016020900490600052602060002090810190610dfc9190610abb565b601f016020900490600052602060002090810190610e929190610abb565b82800160010185558215610da6579182015b82811115610da6578251826000505591602001919060010190610eea565b60008054600160a060020a0319168217905550565b600480548690811015610002576000918252600a027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01905033600160a060020a0316600090815260098201602052604090205490915060ff1660011415610f8457610002565b33600160a060020a031660009081526009820160205260409020805460ff1916600190811790915560058201805490910190558315610fcd576006810180546001019055610fda565b6006810180546000190190555b7fc34f869b7ff431b034b7b9aea9822dac189a685e0b015c7d1be3add3f89128e8858533866040518085815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f16801561107a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1509392505050565b6006810154600354901315611158578060000160009054906101000a9004600160a060020a0316600160a060020a03168160010160005054670de0b6b3a76400000284604051808280519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156111225780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876185025a03f15050505060048101805460ff191660011761ff00191661010017905561116d565b60048101805460ff191660011761ff00191690555b60068101546005820154600483015460408051888152602081019490945283810192909252610100900460ff166060830152517fd220b7272a8b6d0d7d6bcdace67b936a8f175e6d5c1b3ee438b72256b32ab3af9181900360800190a1509291505056a66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688`}, []string{`[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposals","outputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"},{"name":"description","type":"string"},{"name":"votingDeadline","type":"uint256"},{"name":"executed","type":"bool"},{"name":"proposalPassed","type":"bool"},{"name":"numberOfVotes","type":"uint256"},{"name":"currentResult","type":"int256"},{"name":"proposalHash","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"proposalNumber","type":"uint256"},{"name":"transactionBytecode","type":"bytes"}],"name":"executeProposal","outputs":[{"name":"result","type":"int256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"memberId","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"numProposals","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"members","outputs":[{"name":"member","type":"address"},{"name":"canVote","type":"bool"},{"name":"name","type":"string"},{"name":"memberSince","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"debatingPeriodInMinutes","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"minimumQuorum","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"targetMember","type":"address"},{"name":"canVote","type":"bool"},{"name":"memberName","type":"string"}],"name":"changeMembership","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"majorityMargin","outputs":[{"name":"","type":"int256"}],"type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"etherAmount","type":"uint256"},{"name":"JobDescription","type":"string"},{"name":"transactionBytecode","type":"bytes"}],"name":"newProposal","outputs":[{"name":"proposalID","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"minimumQuorumForProposals","type":"uint256"},{"name":"minutesForDebate","type":"uint256"},{"name":"marginOfVotesForMajority","type":"int256"}],"name":"changeVotingRules","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"proposalNumber","type":"uint256"},{"name":"supportsProposal","type":"bool"},{"name":"justificationText","type":"string"}],"name":"vote","outputs":[{"name":"voteID","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"proposalNumber","type":"uint256"},{"name":"beneficiary","type":"address"},{"name":"etherAmount","type":"uint256"},{"name":"transactionBytecode","type":"bytes"}],"name":"checkProposalCode","outputs":[{"name":"codeChecksOut","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"type":"function"},{"inputs":[{"name":"minimumQuorumForProposals","type":"uint256"},{"name":"minutesForDebate","type":"uint256"},{"name":"marginOfVotesForMajority","type":"int256"},{"name":"congressLeader","type":"address"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"recipient","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"description","type":"string"}],"name":"ProposalAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"position","type":"bool"},{"indexed":false,"name":"voter","type":"address"},{"indexed":false,"name":"justification","type":"string"}],"name":"Voted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"result","type":"int256"},{"indexed":false,"name":"quorum","type":"uint256"},{"indexed":false,"name":"active","type":"bool"}],"name":"ProposalTallied","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"member","type":"address"},{"indexed":false,"name":"isMember","type":"bool"}],"name":"MembershipChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"minimumQuorum","type":"uint256"},{"indexed":false,"name":"debatingPeriodInMinutes","type":"uint256"},{"indexed":false,"name":"majorityMargin","type":"int256"}],"name":"ChangeOfRules","type":"event"}]`}, - `"github.com/ethereum/go-ethereum/common"`, + `"github.com/ava-labs/libevm/common"`, ` if b, err := NewDAO(common.Address{}, nil); b == nil || err != nil { t.Fatalf("binding (%v) nil or error (%v) not nil", b, nil) @@ -138,7 +138,7 @@ var bindTests = []struct { ` "fmt" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" `, `if b, err := NewInputChecker(common.Address{}, nil); b == nil || err != nil { t.Fatalf("binding (%v) nil or error (%v) not nil", b, nil) @@ -176,7 +176,7 @@ var bindTests = []struct { ` "fmt" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" `, `if b, err := NewOutputChecker(common.Address{}, nil); b == nil || err != nil { t.Fatalf("binding (%v) nil or error (%v) not nil", b, nil) @@ -217,7 +217,7 @@ var bindTests = []struct { "math/big" "reflect" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" `, `if e, err := NewEventChecker(common.Address{}, nil); e == nil || err != nil { t.Fatalf("binding (%v) nil or error (%v) not nil", e, nil) @@ -300,7 +300,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -356,7 +356,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -402,7 +402,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -458,9 +458,9 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -508,7 +508,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -575,7 +575,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -619,7 +619,7 @@ var bindTests = []struct { ` "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/ava-labs/coreth/core/types" `, ` @@ -658,7 +658,7 @@ var bindTests = []struct { ` "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/ava-labs/coreth/core/types" `, ` @@ -707,7 +707,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -755,9 +755,9 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -832,7 +832,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -924,9 +924,9 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -1116,7 +1116,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -1251,7 +1251,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` @@ -1393,7 +1393,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -1459,7 +1459,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Initialize test accounts @@ -1567,7 +1567,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" "github.com/ava-labs/coreth/core/types" `, ` @@ -1630,7 +1630,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" "github.com/ava-labs/coreth/core/types" `, ` @@ -1693,7 +1693,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` // Generate a new random account and a funded simulator @@ -1754,7 +1754,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` key, _ := crypto.GenerateKey() @@ -1842,7 +1842,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` var ( @@ -1912,7 +1912,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, ` var ( @@ -1964,7 +1964,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, tester: ` var ( @@ -2012,7 +2012,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, tester: ` var ( @@ -2053,7 +2053,7 @@ var bindTests = []struct { "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/accounts/abi/bind/backends" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" `, tester: ` var ( @@ -2088,7 +2088,7 @@ var bindTests = []struct { bytecode: []string{"0x6080604052348015600f57600080fd5b5060958061001e6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80639d993132146041578063d02767c7146049578063ffa02795146051575b600080fd5b60476059565b005b604f605b565b005b6057605d565b005b565b565b56fea26469706673582212200382ca602dff96a7e2ba54657985e2b4ac423a56abe4a1f0667bc635c4d4371f64736f6c63430008110033"}, abi: []string{`[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_param","type":"address"}],"name":"_1TestEvent","type":"event"},{"inputs":[],"name":"_1test","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"__1test","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"__2test","outputs":[],"stateMutability":"pure","type":"function"}]`}, imports: ` - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" `, tester: ` if b, err := NewNumericMethodName(common.Address{}, nil); b == nil || err != nil { diff --git a/accounts/abi/bind/template.go b/accounts/abi/bind/template.go index 22dca1e71d..aa1de7f913 100644 --- a/accounts/abi/bind/template.go +++ b/accounts/abi/bind/template.go @@ -105,8 +105,8 @@ import ( "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/interfaces" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/accounts/abi/bind/util.go b/accounts/abi/bind/util.go index 378f7ef877..508caf7cf2 100644 --- a/accounts/abi/bind/util.go +++ b/accounts/abi/bind/util.go @@ -33,8 +33,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/interfaces" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // WaitMined waits for tx to be mined on the blockchain. diff --git a/accounts/abi/bind/util_test.go b/accounts/abi/bind/util_test.go index 3eddeec0b1..46f5b2acbc 100644 --- a/accounts/abi/bind/util_test.go +++ b/accounts/abi/bind/util_test.go @@ -37,8 +37,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/ethclient/simulated" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) var testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") diff --git a/accounts/abi/error.go b/accounts/abi/error.go index a968fd20c0..46b056c052 100644 --- a/accounts/abi/error.go +++ b/accounts/abi/error.go @@ -31,8 +31,8 @@ import ( "fmt" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) type Error struct { diff --git a/accounts/abi/event.go b/accounts/abi/event.go index f4f0f5d92d..39b55bb62c 100644 --- a/accounts/abi/event.go +++ b/accounts/abi/event.go @@ -30,8 +30,8 @@ import ( "fmt" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) // Event is an event potentially triggered by the EVM's LOG mechanism. The Event diff --git a/accounts/abi/event_test.go b/accounts/abi/event_test.go index a967decd52..1da8c9dae1 100644 --- a/accounts/abi/event_test.go +++ b/accounts/abi/event_test.go @@ -35,8 +35,8 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/accounts/abi/method.go b/accounts/abi/method.go index 1da260da2c..e437d8d2a9 100644 --- a/accounts/abi/method.go +++ b/accounts/abi/method.go @@ -30,7 +30,7 @@ import ( "fmt" "strings" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" ) // FunctionType represents different types of functions a contract might have. diff --git a/accounts/abi/pack.go b/accounts/abi/pack.go index 9f9f2b23d5..830df0b390 100644 --- a/accounts/abi/pack.go +++ b/accounts/abi/pack.go @@ -32,8 +32,8 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) // packBytesSlice packs the given bytes as [L, V] as the canonical representation diff --git a/accounts/abi/pack_test.go b/accounts/abi/pack_test.go index 47d4931698..99bf47200e 100644 --- a/accounts/abi/pack_test.go +++ b/accounts/abi/pack_test.go @@ -37,7 +37,7 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // TestPack tests the general pack/unpack tests in packing_test.go diff --git a/accounts/abi/packing_test.go b/accounts/abi/packing_test.go index 8e876dcaef..0c2ee00745 100644 --- a/accounts/abi/packing_test.go +++ b/accounts/abi/packing_test.go @@ -29,7 +29,7 @@ package abi import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) type packUnpackTest struct { diff --git a/accounts/abi/topics.go b/accounts/abi/topics.go index 03082f221e..0e3cb383ee 100644 --- a/accounts/abi/topics.go +++ b/accounts/abi/topics.go @@ -33,9 +33,9 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" ) // packTopic packs rule into the corresponding hash value for a log's topic diff --git a/accounts/abi/topics_test.go b/accounts/abi/topics_test.go index 70522b6ce6..691c2c09dc 100644 --- a/accounts/abi/topics_test.go +++ b/accounts/abi/topics_test.go @@ -32,8 +32,8 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) func TestMakeTopics(t *testing.T) { diff --git a/accounts/abi/type.go b/accounts/abi/type.go index 75a6c15fd7..93678f5578 100644 --- a/accounts/abi/type.go +++ b/accounts/abi/type.go @@ -36,7 +36,7 @@ import ( "unicode" "unicode/utf8" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // Type enumerator diff --git a/accounts/abi/type_test.go b/accounts/abi/type_test.go index ad0daffe06..c55559167f 100644 --- a/accounts/abi/type_test.go +++ b/accounts/abi/type_test.go @@ -31,8 +31,8 @@ import ( "reflect" "testing" + "github.com/ava-labs/libevm/common" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/common" ) // typeWithoutStringer is a alias for the Type type which simply doesn't implement diff --git a/accounts/abi/unpack.go b/accounts/abi/unpack.go index b975cb8802..c161c81767 100644 --- a/accounts/abi/unpack.go +++ b/accounts/abi/unpack.go @@ -34,7 +34,7 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var ( diff --git a/accounts/abi/unpack_test.go b/accounts/abi/unpack_test.go index 0b4224efa5..2454bde1fb 100644 --- a/accounts/abi/unpack_test.go +++ b/accounts/abi/unpack_test.go @@ -37,7 +37,7 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/accounts/accounts.go b/accounts/accounts.go index acde6b436a..b8cee1bd23 100644 --- a/accounts/accounts.go +++ b/accounts/accounts.go @@ -33,8 +33,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/interfaces" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" "golang.org/x/crypto/sha3" ) diff --git a/accounts/accounts_test.go b/accounts/accounts_test.go index adf7c1b10f..b6931e33f3 100644 --- a/accounts/accounts_test.go +++ b/accounts/accounts_test.go @@ -30,7 +30,7 @@ import ( "bytes" "testing" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common/hexutil" ) func TestTextHash(t *testing.T) { diff --git a/accounts/external/backend.go b/accounts/external/backend.go index 31f8d6804e..8e959a4464 100644 --- a/accounts/external/backend.go +++ b/accounts/external/backend.go @@ -37,10 +37,10 @@ import ( "github.com/ava-labs/coreth/interfaces" "github.com/ava-labs/coreth/rpc" "github.com/ava-labs/coreth/signer/core/apitypes" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" ) type ExternalBackend struct { diff --git a/accounts/keystore/account_cache.go b/accounts/keystore/account_cache.go index 4284d29f47..b923bf47a4 100644 --- a/accounts/keystore/account_cache.go +++ b/accounts/keystore/account_cache.go @@ -38,9 +38,9 @@ import ( "time" "github.com/ava-labs/coreth/accounts" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" mapset "github.com/deckarep/golang-set/v2" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" "golang.org/x/exp/slices" ) diff --git a/accounts/keystore/account_cache_test.go b/accounts/keystore/account_cache_test.go index 32c2ae3330..5639de71d5 100644 --- a/accounts/keystore/account_cache_test.go +++ b/accounts/keystore/account_cache_test.go @@ -37,9 +37,9 @@ import ( "time" "github.com/ava-labs/coreth/accounts" + "github.com/ava-labs/libevm/common" "github.com/cespare/cp" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/common" "golang.org/x/exp/slices" ) diff --git a/accounts/keystore/file_cache.go b/accounts/keystore/file_cache.go index ab24b5c59d..809a2fffca 100644 --- a/accounts/keystore/file_cache.go +++ b/accounts/keystore/file_cache.go @@ -33,8 +33,8 @@ import ( "sync" "time" + "github.com/ava-labs/libevm/log" mapset "github.com/deckarep/golang-set/v2" - "github.com/ethereum/go-ethereum/log" ) // fileCache is a cache of files seen during scan of keystore. diff --git a/accounts/keystore/key.go b/accounts/keystore/key.go index 23b39fa584..d610cca04e 100644 --- a/accounts/keystore/key.go +++ b/accounts/keystore/key.go @@ -39,8 +39,8 @@ import ( "time" "github.com/ava-labs/coreth/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/google/uuid" ) diff --git a/accounts/keystore/keystore.go b/accounts/keystore/keystore.go index fb72f0eb14..b2861853ad 100644 --- a/accounts/keystore/keystore.go +++ b/accounts/keystore/keystore.go @@ -44,9 +44,9 @@ import ( "github.com/ava-labs/coreth/accounts" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/event" ) var ( diff --git a/accounts/keystore/keystore_test.go b/accounts/keystore/keystore_test.go index 25dc517c6b..98bb616efd 100644 --- a/accounts/keystore/keystore_test.go +++ b/accounts/keystore/keystore_test.go @@ -37,9 +37,9 @@ import ( "time" "github.com/ava-labs/coreth/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/event" "golang.org/x/exp/slices" ) diff --git a/accounts/keystore/passphrase.go b/accounts/keystore/passphrase.go index 73318da4ff..f146f97e66 100644 --- a/accounts/keystore/passphrase.go +++ b/accounts/keystore/passphrase.go @@ -48,9 +48,9 @@ import ( "path/filepath" "github.com/ava-labs/coreth/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" "github.com/google/uuid" "golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/scrypt" diff --git a/accounts/keystore/passphrase_test.go b/accounts/keystore/passphrase_test.go index 179e7d0883..2b4fea1923 100644 --- a/accounts/keystore/passphrase_test.go +++ b/accounts/keystore/passphrase_test.go @@ -30,7 +30,7 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const ( diff --git a/accounts/keystore/plain.go b/accounts/keystore/plain.go index 181eeb2ec0..a740695210 100644 --- a/accounts/keystore/plain.go +++ b/accounts/keystore/plain.go @@ -32,7 +32,7 @@ import ( "os" "path/filepath" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) type keyStorePlain struct { diff --git a/accounts/keystore/plain_test.go b/accounts/keystore/plain_test.go index 7d19909fec..ef3c10c75b 100644 --- a/accounts/keystore/plain_test.go +++ b/accounts/keystore/plain_test.go @@ -35,7 +35,7 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func tmpKeyStoreIface(t *testing.T, encrypted bool) (dir string, ks keyStore) { diff --git a/accounts/keystore/presale.go b/accounts/keystore/presale.go index 1dfbd9c2a9..23c40b0e6c 100644 --- a/accounts/keystore/presale.go +++ b/accounts/keystore/presale.go @@ -36,7 +36,7 @@ import ( "fmt" "github.com/ava-labs/coreth/accounts" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" "github.com/google/uuid" "golang.org/x/crypto/pbkdf2" ) diff --git a/accounts/keystore/wallet.go b/accounts/keystore/wallet.go index 7193526399..75c0690db3 100644 --- a/accounts/keystore/wallet.go +++ b/accounts/keystore/wallet.go @@ -32,7 +32,7 @@ import ( "github.com/ava-labs/coreth/accounts" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/interfaces" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" ) // keystoreWallet implements the accounts.Wallet interface for the original diff --git a/accounts/keystore/watch.go b/accounts/keystore/watch.go index 156424c97b..d7d2611e59 100644 --- a/accounts/keystore/watch.go +++ b/accounts/keystore/watch.go @@ -33,7 +33,7 @@ import ( "os" "time" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "github.com/fsnotify/fsnotify" ) diff --git a/accounts/manager.go b/accounts/manager.go index c2220ce71e..50bf912ab4 100644 --- a/accounts/manager.go +++ b/accounts/manager.go @@ -31,8 +31,8 @@ import ( "sort" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" ) // managerSubBufferSize determines how many incoming wallet events diff --git a/accounts/scwallet/hub.go b/accounts/scwallet/hub.go index 89fb564140..8c83a6742f 100644 --- a/accounts/scwallet/hub.go +++ b/accounts/scwallet/hub.go @@ -52,9 +52,9 @@ import ( "time" "github.com/ava-labs/coreth/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" pcsc "github.com/gballet/go-libpcsclite" ) diff --git a/accounts/scwallet/securechannel.go b/accounts/scwallet/securechannel.go index 062bfcb198..e40bc8cfac 100644 --- a/accounts/scwallet/securechannel.go +++ b/accounts/scwallet/securechannel.go @@ -37,7 +37,7 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" pcsc "github.com/gballet/go-libpcsclite" "golang.org/x/crypto/pbkdf2" "golang.org/x/text/unicode/norm" diff --git a/accounts/scwallet/wallet.go b/accounts/scwallet/wallet.go index 327339c222..9d22f584f9 100644 --- a/accounts/scwallet/wallet.go +++ b/accounts/scwallet/wallet.go @@ -46,9 +46,9 @@ import ( "github.com/ava-labs/coreth/accounts" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/interfaces" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" pcsc "github.com/gballet/go-libpcsclite" "github.com/status-im/keycard-go/derivationpath" ) diff --git a/cmd/abigen/main.go b/cmd/abigen/main.go index a6f670ea4d..2dd4a35682 100644 --- a/cmd/abigen/main.go +++ b/cmd/abigen/main.go @@ -37,9 +37,9 @@ import ( "github.com/ava-labs/coreth/accounts/abi/bind" "github.com/ava-labs/coreth/cmd/utils" "github.com/ava-labs/coreth/internal/flags" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common/compiler" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" "github.com/urfave/cli/v2" ) diff --git a/consensus/consensus.go b/consensus/consensus.go index d4e247ceaf..19252097c7 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -33,7 +33,7 @@ import ( "github.com/ava-labs/coreth/core/state" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // ChainHeaderReader defines a small collection of methods needed to access the local diff --git a/consensus/dummy/consensus.go b/consensus/dummy/consensus.go index 1452335a95..a541a68986 100644 --- a/consensus/dummy/consensus.go +++ b/consensus/dummy/consensus.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var ( diff --git a/consensus/dummy/consensus_test.go b/consensus/dummy/consensus_test.go index 64a8439817..5c7c69cc3a 100644 --- a/consensus/dummy/consensus_test.go +++ b/consensus/dummy/consensus_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func TestVerifyBlockFee(t *testing.T) { diff --git a/consensus/dummy/dynamic_fees.go b/consensus/dummy/dynamic_fees.go index 185c074074..1d5e6d0a06 100644 --- a/consensus/dummy/dynamic_fees.go +++ b/consensus/dummy/dynamic_fees.go @@ -11,8 +11,8 @@ import ( "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) var ( diff --git a/consensus/dummy/dynamic_fees_test.go b/consensus/dummy/dynamic_fees_test.go index c86daf0ffb..69f148eea4 100644 --- a/consensus/dummy/dynamic_fees_test.go +++ b/consensus/dummy/dynamic_fees_test.go @@ -10,9 +10,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/constants/constants.go b/constants/constants.go index 2514f58119..d1523eaa5b 100644 --- a/constants/constants.go +++ b/constants/constants.go @@ -3,7 +3,7 @@ package constants -import "github.com/ethereum/go-ethereum/common" +import "github.com/ava-labs/libevm/common" var ( BlackholeAddr = common.Address{ diff --git a/core/bench_test.go b/core/bench_test.go index ceb8c83f48..35cc5766b5 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -36,10 +36,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" ) func BenchmarkInsertChain_empty_memdb(b *testing.B) { diff --git a/core/blockchain.go b/core/blockchain.go index 0199ceaf8a..b10d6aab17 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -53,11 +53,11 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/lru" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/lru" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/core/blockchain_log_test.go b/core/blockchain_log_test.go index f76a2a291d..d9276d4a97 100644 --- a/core/blockchain_log_test.go +++ b/core/blockchain_log_test.go @@ -14,8 +14,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" ) diff --git a/core/blockchain_reader.go b/core/blockchain_reader.go index 8f73445f43..82287d35f4 100644 --- a/core/blockchain_reader.go +++ b/core/blockchain_reader.go @@ -35,8 +35,8 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" ) // CurrentHeader retrieves the current head header of the canonical chain. The diff --git a/core/blockchain_repair_test.go b/core/blockchain_repair_test.go index 6fdd572d79..5e937d25d2 100644 --- a/core/blockchain_repair_test.go +++ b/core/blockchain_repair_test.go @@ -40,8 +40,8 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" ) diff --git a/core/blockchain_snapshot_test.go b/core/blockchain_snapshot_test.go index 4c2fa821a5..0b9f8ff7dd 100644 --- a/core/blockchain_snapshot_test.go +++ b/core/blockchain_snapshot_test.go @@ -44,8 +44,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) // snapshotTestBasic wraps the common testing fields in the snapshot tests. diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 601cb12f02..623133759a 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -18,9 +18,9 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers/logger" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" "github.com/holiman/uint256" ) diff --git a/core/bloom_indexer.go b/core/bloom_indexer.go index ab8bc706f1..01152ec8f9 100644 --- a/core/bloom_indexer.go +++ b/core/bloom_indexer.go @@ -23,9 +23,9 @@ import ( "github.com/ava-labs/coreth/core/bloombits" "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/bitutil" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/bitutil" + "github.com/ava-labs/libevm/ethdb" ) const ( diff --git a/core/bloombits/matcher.go b/core/bloombits/matcher.go index 532bc7af93..94bbb59c6b 100644 --- a/core/bloombits/matcher.go +++ b/core/bloombits/matcher.go @@ -36,8 +36,8 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common/bitutil" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common/bitutil" + "github.com/ava-labs/libevm/crypto" ) // bloomIndexes represents the bit indexes inside the bloom filter that belong diff --git a/core/bloombits/matcher_test.go b/core/bloombits/matcher_test.go index c095ec31e4..04318f3489 100644 --- a/core/bloombits/matcher_test.go +++ b/core/bloombits/matcher_test.go @@ -33,7 +33,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const testSectionSize = 4096 diff --git a/core/chain_indexer.go b/core/chain_indexer.go index 05cbc54c76..e5b098fae0 100644 --- a/core/chain_indexer.go +++ b/core/chain_indexer.go @@ -37,10 +37,10 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" ) // ChainIndexerBackend defines the methods needed to process chain segments in diff --git a/core/chain_indexer_test.go b/core/chain_indexer_test.go index 3edf175d3d..f284c33f45 100644 --- a/core/chain_indexer_test.go +++ b/core/chain_indexer_test.go @@ -37,7 +37,7 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // Runs multiple tests with randomized parameters. diff --git a/core/chain_makers.go b/core/chain_makers.go index d5ffd53074..6c0c836ad6 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -39,8 +39,8 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" "github.com/holiman/uint256" ) diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index 34c53bd7f1..6348ee7344 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -36,8 +36,8 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) func ExampleGenerateChain() { diff --git a/core/events.go b/core/events.go index 462d26d9ee..5a04f9b0ad 100644 --- a/core/events.go +++ b/core/events.go @@ -28,7 +28,7 @@ package core import ( "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // NewTxsEvent is posted when a batch of transactions enter the transaction pool. diff --git a/core/evm.go b/core/evm.go index bc33411714..695e903319 100644 --- a/core/evm.go +++ b/core/evm.go @@ -34,8 +34,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/predicate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" "github.com/holiman/uint256" ) diff --git a/core/gen_genesis.go b/core/gen_genesis.go index 1112a6bab6..4f9e40cc57 100644 --- a/core/gen_genesis.go +++ b/core/gen_genesis.go @@ -9,9 +9,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" ) var _ = (*genesisSpecMarshaling)(nil) diff --git a/core/genesis.go b/core/genesis.go index 07d3ba072d..1090ec81fa 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -40,11 +40,11 @@ import ( "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" "github.com/holiman/uint256" ) diff --git a/core/genesis_extra_test.go b/core/genesis_extra_test.go index 25008653e0..104f0e8d49 100644 --- a/core/genesis_extra_test.go +++ b/core/genesis_extra_test.go @@ -36,7 +36,7 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/core/genesis_test.go b/core/genesis_test.go index 6050a06f84..bc670c76fb 100644 --- a/core/genesis_test.go +++ b/core/genesis_test.go @@ -43,9 +43,9 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/pathdb" "github.com/ava-labs/coreth/utils" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" "github.com/stretchr/testify/require" ) diff --git a/core/headerchain.go b/core/headerchain.go index fe8f752d41..e7cf80ac4b 100644 --- a/core/headerchain.go +++ b/core/headerchain.go @@ -37,9 +37,9 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/lru" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/lru" + "github.com/ava-labs/libevm/ethdb" ) const ( diff --git a/core/headerchain_test.go b/core/headerchain_test.go index b70a9802f0..ca70560731 100644 --- a/core/headerchain_test.go +++ b/core/headerchain_test.go @@ -38,7 +38,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func verifyUnbrokenCanonchain(bc *BlockChain) error { diff --git a/core/mkalloc.go b/core/mkalloc.go index f481249c60..4fd247323e 100644 --- a/core/mkalloc.go +++ b/core/mkalloc.go @@ -43,8 +43,8 @@ import ( "strconv" "github.com/ava-labs/coreth/core" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" "golang.org/x/exp/slices" ) diff --git a/core/predicate_check.go b/core/predicate_check.go index b4694a251f..d2e2ebec2b 100644 --- a/core/predicate_check.go +++ b/core/predicate_check.go @@ -12,8 +12,8 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/precompile/precompileconfig" "github.com/ava-labs/coreth/predicate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) var ErrMissingPredicateContext = errors.New("missing predicate context") diff --git a/core/predicate_check_test.go b/core/predicate_check_test.go index 3d98416fc3..a4a394154a 100644 --- a/core/predicate_check_test.go +++ b/core/predicate_check_test.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/precompile/precompileconfig" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index d63da4782a..dba05750a7 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -35,10 +35,10 @@ import ( "github.com/ava-labs/coreth/consensus/misc/eip4844" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) // ReadCanonicalHash retrieves the hash assigned to a canonical block number. diff --git a/core/rawdb/accessors_chain_test.go b/core/rawdb/accessors_chain_test.go index 27c7cf4a95..0a99d5dfda 100644 --- a/core/rawdb/accessors_chain_test.go +++ b/core/rawdb/accessors_chain_test.go @@ -27,8 +27,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" "golang.org/x/crypto/sha3" ) diff --git a/core/rawdb/accessors_indexes.go b/core/rawdb/accessors_indexes.go index 511fa39d8f..afb50354c9 100644 --- a/core/rawdb/accessors_indexes.go +++ b/core/rawdb/accessors_indexes.go @@ -32,10 +32,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) // ReadTxLookupEntry retrieves the positional metadata associated with a transaction diff --git a/core/rawdb/accessors_indexes_test.go b/core/rawdb/accessors_indexes_test.go index 1930d81e91..e4fac23e75 100644 --- a/core/rawdb/accessors_indexes_test.go +++ b/core/rawdb/accessors_indexes_test.go @@ -23,9 +23,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/internal/blocktest" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/rlp" ) var newTestHasher = blocktest.NewHasher diff --git a/core/rawdb/accessors_metadata.go b/core/rawdb/accessors_metadata.go index c6ad7645a3..3bfe634a12 100644 --- a/core/rawdb/accessors_metadata.go +++ b/core/rawdb/accessors_metadata.go @@ -31,10 +31,10 @@ import ( "time" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) // ReadDatabaseVersion retrieves the version number of the database. diff --git a/core/rawdb/accessors_snapshot.go b/core/rawdb/accessors_snapshot.go index 06a136ba89..f091b63831 100644 --- a/core/rawdb/accessors_snapshot.go +++ b/core/rawdb/accessors_snapshot.go @@ -27,9 +27,9 @@ package rawdb import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // ReadSnapshotRoot retrieves the root of the block whose state is contained in diff --git a/core/rawdb/accessors_state.go b/core/rawdb/accessors_state.go index 03cbf44b6c..509dfba818 100644 --- a/core/rawdb/accessors_state.go +++ b/core/rawdb/accessors_state.go @@ -29,9 +29,9 @@ package rawdb import ( "encoding/binary" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // ReadPreimage retrieves a single preimage of the provided hash. diff --git a/core/rawdb/accessors_state_sync.go b/core/rawdb/accessors_state_sync.go index 36ba9ef1bd..0781a8c142 100644 --- a/core/rawdb/accessors_state_sync.go +++ b/core/rawdb/accessors_state_sync.go @@ -7,9 +7,9 @@ import ( "encoding/binary" "github.com/ava-labs/avalanchego/utils/wrappers" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // ReadSyncRoot reads the root corresponding to the main trie of an in-progress diff --git a/core/rawdb/accessors_state_sync_test.go b/core/rawdb/accessors_state_sync_test.go index 5c51eb7bf3..506e843c8b 100644 --- a/core/rawdb/accessors_state_sync_test.go +++ b/core/rawdb/accessors_state_sync_test.go @@ -6,7 +6,7 @@ package rawdb import ( "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/core/rawdb/accessors_trie.go b/core/rawdb/accessors_trie.go index e148a4280b..742a462c7c 100644 --- a/core/rawdb/accessors_trie.go +++ b/core/rawdb/accessors_trie.go @@ -30,10 +30,10 @@ import ( "fmt" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" "golang.org/x/crypto/sha3" ) diff --git a/core/rawdb/chain_iterator.go b/core/rawdb/chain_iterator.go index 5f449e4b6c..f4c79fd0b4 100644 --- a/core/rawdb/chain_iterator.go +++ b/core/rawdb/chain_iterator.go @@ -32,11 +32,11 @@ import ( "time" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/prque" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/prque" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) type blockTxHashes struct { diff --git a/core/rawdb/chain_iterator_test.go b/core/rawdb/chain_iterator_test.go index 0e4e762789..2086fa72b5 100644 --- a/core/rawdb/chain_iterator_test.go +++ b/core/rawdb/chain_iterator_test.go @@ -34,7 +34,7 @@ import ( "testing" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func TestChainIterator(t *testing.T) { diff --git a/core/rawdb/database.go b/core/rawdb/database.go index 75922eba5d..1bf30508c5 100644 --- a/core/rawdb/database.go +++ b/core/rawdb/database.go @@ -33,12 +33,12 @@ import ( "path/filepath" "time" - "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/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/ethdb/leveldb" + "github.com/ava-labs/libevm/ethdb/memorydb" + "github.com/ava-labs/libevm/ethdb/pebble" + "github.com/ava-labs/libevm/log" "github.com/olekukonko/tablewriter" ) diff --git a/core/rawdb/key_length_iterator.go b/core/rawdb/key_length_iterator.go index fe95d719f0..8d1a7d2f54 100644 --- a/core/rawdb/key_length_iterator.go +++ b/core/rawdb/key_length_iterator.go @@ -26,7 +26,7 @@ package rawdb -import "github.com/ethereum/go-ethereum/ethdb" +import "github.com/ava-labs/libevm/ethdb" // KeyLengthIterator is a wrapper for a database iterator that ensures only key-value pairs // with a specific key length will be returned. diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index 71dff23127..290a565b19 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -33,8 +33,8 @@ import ( "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/coreth/metrics" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) // The fields below define the low level database schema prefixing. diff --git a/core/rawdb/table.go b/core/rawdb/table.go index 5dc709080c..cb9156173a 100644 --- a/core/rawdb/table.go +++ b/core/rawdb/table.go @@ -27,7 +27,7 @@ package rawdb import ( - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/ethdb" ) // table is a wrapper around a database that prefixes each key access with a pre- diff --git a/core/rawdb/table_test.go b/core/rawdb/table_test.go index 9cb913c2a1..a6f4b454f6 100644 --- a/core/rawdb/table_test.go +++ b/core/rawdb/table_test.go @@ -30,7 +30,7 @@ import ( "bytes" "testing" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/ethdb" ) func TestTableDatabase(t *testing.T) { testTableDatabase(t, "prefix") } diff --git a/core/rlp_test.go b/core/rlp_test.go index d6a36ef6b1..f43f487aab 100644 --- a/core/rlp_test.go +++ b/core/rlp_test.go @@ -34,9 +34,9 @@ import ( "github.com/ava-labs/coreth/consensus/dummy" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "golang.org/x/crypto/sha3" ) diff --git a/core/state/access_list.go b/core/state/access_list.go index d5044ccc5b..88bddc1ff3 100644 --- a/core/state/access_list.go +++ b/core/state/access_list.go @@ -27,7 +27,7 @@ package state import ( - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) type accessList struct { diff --git a/core/state/database.go b/core/state/database.go index e29e9b8d78..1f9fd40f13 100644 --- a/core/state/database.go +++ b/core/state/database.go @@ -36,11 +36,11 @@ import ( "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/utils" "github.com/ava-labs/coreth/triedb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/lru" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" "github.com/crate-crypto/go-ipa/banderwagon" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/lru" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" ) const ( diff --git a/core/state/dump.go b/core/state/dump.go index a18184ca8c..a8239b616d 100644 --- a/core/state/dump.go +++ b/core/state/dump.go @@ -33,10 +33,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) // DumpConfig is a set of options to control what portions of the state will be diff --git a/core/state/iterator.go b/core/state/iterator.go index 6db22d9634..409a08f148 100644 --- a/core/state/iterator.go +++ b/core/state/iterator.go @@ -33,8 +33,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" ) // nodeIterator is an iterator to traverse the entire state trie post-order, diff --git a/core/state/iterator_test.go b/core/state/iterator_test.go index 53590d040e..1f79618f9f 100644 --- a/core/state/iterator_test.go +++ b/core/state/iterator_test.go @@ -30,8 +30,8 @@ import ( "testing" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) // Tests that the node iterator indeed walks over the entire database contents. diff --git a/core/state/journal.go b/core/state/journal.go index d412716874..4a3dedf8e4 100644 --- a/core/state/journal.go +++ b/core/state/journal.go @@ -27,7 +27,7 @@ package state import ( - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/core/state/pruner/bloom.go b/core/state/pruner/bloom.go index b7f673b80d..a228b84f8f 100644 --- a/core/state/pruner/bloom.go +++ b/core/state/pruner/bloom.go @@ -32,8 +32,8 @@ import ( "os" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" bloomfilter "github.com/holiman/bloomfilter/v2" ) diff --git a/core/state/pruner/pruner.go b/core/state/pruner/pruner.go index 090b7ac6af..f460e10a00 100644 --- a/core/state/pruner/pruner.go +++ b/core/state/pruner/pruner.go @@ -42,10 +42,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) const ( diff --git a/core/state/snapshot/context.go b/core/state/snapshot/context.go index 35b22c6ea3..45acfbba29 100644 --- a/core/state/snapshot/context.go +++ b/core/state/snapshot/context.go @@ -34,8 +34,8 @@ import ( "golang.org/x/exp/slog" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // generatorStats is a collection of statistics gathered by the snapshot generator diff --git a/core/state/snapshot/conversion.go b/core/state/snapshot/conversion.go index 64a2cd3421..efe115a952 100644 --- a/core/state/snapshot/conversion.go +++ b/core/state/snapshot/conversion.go @@ -38,10 +38,10 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) // trieKV represents a trie key-value pair diff --git a/core/state/snapshot/difflayer.go b/core/state/snapshot/difflayer.go index d8d3b750e2..0e3b38d509 100644 --- a/core/state/snapshot/difflayer.go +++ b/core/state/snapshot/difflayer.go @@ -36,8 +36,8 @@ import ( "time" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" bloomfilter "github.com/holiman/bloomfilter/v2" "golang.org/x/exp/slices" ) diff --git a/core/state/snapshot/difflayer_test.go b/core/state/snapshot/difflayer_test.go index 24fc3fdc69..85e774fdec 100644 --- a/core/state/snapshot/difflayer_test.go +++ b/core/state/snapshot/difflayer_test.go @@ -33,9 +33,9 @@ import ( "testing" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb/memorydb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb/memorydb" ) func copyDestructs(destructs map[common.Hash]struct{}) map[common.Hash]struct{} { diff --git a/core/state/snapshot/disklayer.go b/core/state/snapshot/disklayer.go index 4f38072637..684b740d85 100644 --- a/core/state/snapshot/disklayer.go +++ b/core/state/snapshot/disklayer.go @@ -35,9 +35,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/rlp" ) // diskLayer is a low level persistent snapshot built on top of a key-value store. diff --git a/core/state/snapshot/disklayer_test.go b/core/state/snapshot/disklayer_test.go index 32c04c0a83..dadd54ef07 100644 --- a/core/state/snapshot/disklayer_test.go +++ b/core/state/snapshot/disklayer_test.go @@ -31,9 +31,9 @@ import ( "testing" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb/memorydb" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb/memorydb" + "github.com/ava-labs/libevm/rlp" ) // reverse reverses the contents of a byte slice. It's used to update random accs diff --git a/core/state/snapshot/generate.go b/core/state/snapshot/generate.go index 9d10afd3f9..7305750025 100644 --- a/core/state/snapshot/generate.go +++ b/core/state/snapshot/generate.go @@ -36,10 +36,10 @@ import ( "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) const ( diff --git a/core/state/snapshot/generate_test.go b/core/state/snapshot/generate_test.go index a31756d06b..31a1f5271f 100644 --- a/core/state/snapshot/generate_test.go +++ b/core/state/snapshot/generate_test.go @@ -39,10 +39,10 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" "golang.org/x/crypto/sha3" ) diff --git a/core/state/snapshot/iterator.go b/core/state/snapshot/iterator.go index b7cf84ec91..7cc5dee33f 100644 --- a/core/state/snapshot/iterator.go +++ b/core/state/snapshot/iterator.go @@ -32,8 +32,8 @@ import ( "sort" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) // Iterator is an iterator to step over all the accounts or the specific diff --git a/core/state/snapshot/iterator_binary.go b/core/state/snapshot/iterator_binary.go index cff012402c..68f95901f7 100644 --- a/core/state/snapshot/iterator_binary.go +++ b/core/state/snapshot/iterator_binary.go @@ -29,7 +29,7 @@ package snapshot import ( "bytes" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // binaryIterator is a simplistic iterator to step over the accounts or storage diff --git a/core/state/snapshot/iterator_fast.go b/core/state/snapshot/iterator_fast.go index 4e324ee28b..d8dda5f71c 100644 --- a/core/state/snapshot/iterator_fast.go +++ b/core/state/snapshot/iterator_fast.go @@ -31,7 +31,7 @@ import ( "fmt" "sort" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "golang.org/x/exp/slices" ) diff --git a/core/state/snapshot/iterator_test.go b/core/state/snapshot/iterator_test.go index 7fc374a15a..f668e4df8b 100644 --- a/core/state/snapshot/iterator_test.go +++ b/core/state/snapshot/iterator_test.go @@ -35,7 +35,7 @@ import ( "testing" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // TestAccountIteratorBasics tests some simple single-layer(diff and disk) iteration diff --git a/core/state/snapshot/journal.go b/core/state/snapshot/journal.go index 7e5c4c0aa0..374de3b71d 100644 --- a/core/state/snapshot/journal.go +++ b/core/state/snapshot/journal.go @@ -34,10 +34,10 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) // journalGenerator is a disk layer entry containing the generator progress marker. diff --git a/core/state/snapshot/snapshot.go b/core/state/snapshot/snapshot.go index bda0e97988..2ccd8c5ee1 100644 --- a/core/state/snapshot/snapshot.go +++ b/core/state/snapshot/snapshot.go @@ -38,9 +38,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/metrics" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/core/state/snapshot/snapshot_ext.go b/core/state/snapshot/snapshot_ext.go index 1274e4805d..829e242d39 100644 --- a/core/state/snapshot/snapshot_ext.go +++ b/core/state/snapshot/snapshot_ext.go @@ -4,8 +4,8 @@ import ( "time" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) func (t *Tree) DiskAccountIterator(seek common.Hash) AccountIterator { diff --git a/core/state/snapshot/snapshot_test.go b/core/state/snapshot/snapshot_test.go index 67f6ba40f5..45c502f96b 100644 --- a/core/state/snapshot/snapshot_test.go +++ b/core/state/snapshot/snapshot_test.go @@ -35,8 +35,8 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" ) diff --git a/core/state/snapshot/utils.go b/core/state/snapshot/utils.go index f9e2db5ad6..4a31a25a76 100644 --- a/core/state/snapshot/utils.go +++ b/core/state/snapshot/utils.go @@ -32,9 +32,9 @@ import ( "time" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // CheckDanglingStorage iterates the snap storage data, and verifies that all diff --git a/core/state/snapshot/wipe.go b/core/state/snapshot/wipe.go index 37963032e6..c5dffd648e 100644 --- a/core/state/snapshot/wipe.go +++ b/core/state/snapshot/wipe.go @@ -31,9 +31,9 @@ import ( "time" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // WipeSnapshot starts a goroutine to iterate over the entire key-value database diff --git a/core/state/snapshot/wipe_test.go b/core/state/snapshot/wipe_test.go index 74afec5fce..5fc6110bd0 100644 --- a/core/state/snapshot/wipe_test.go +++ b/core/state/snapshot/wipe_test.go @@ -31,8 +31,8 @@ import ( "testing" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb/memorydb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb/memorydb" ) // Tests that given a database with random data content, all parts of a snapshot diff --git a/core/state/state_object.go b/core/state/state_object.go index 8f0493ed3d..dd3d966157 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -36,9 +36,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/metrics" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" ) diff --git a/core/state/state_object_test.go b/core/state/state_object_test.go index 96132277fe..f5f59acb2f 100644 --- a/core/state/state_object_test.go +++ b/core/state/state_object_test.go @@ -7,7 +7,7 @@ import ( "bytes" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func TestStateObjectPartition(t *testing.T) { diff --git a/core/state/state_test.go b/core/state/state_test.go index 3d6dadf209..c0c8b5b144 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -34,9 +34,9 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" "github.com/holiman/uint256" ) diff --git a/core/state/statedb.go b/core/state/statedb.go index e84e2d13d0..fe6399f44d 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -44,9 +44,9 @@ import ( "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" "github.com/holiman/uint256" ) diff --git a/core/state/statedb_fuzz_test.go b/core/state/statedb_fuzz_test.go index 9cbbffa870..4af9ac461c 100644 --- a/core/state/statedb_fuzz_test.go +++ b/core/state/statedb_fuzz_test.go @@ -45,9 +45,9 @@ import ( "github.com/ava-labs/coreth/trie/triestate" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" ) diff --git a/core/state/statedb_test.go b/core/state/statedb_test.go index 88799e3c3e..1f59f56f3a 100644 --- a/core/state/statedb_test.go +++ b/core/state/statedb_test.go @@ -48,9 +48,9 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" ) diff --git a/core/state/sync_test.go b/core/state/sync_test.go index 17444dfe89..587b54e6ff 100644 --- a/core/state/sync_test.go +++ b/core/state/sync_test.go @@ -24,9 +24,9 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" "github.com/holiman/uint256" ) diff --git a/core/state/test_statedb.go b/core/state/test_statedb.go index dc4d0e582d..1a164f6f6e 100644 --- a/core/state/test_statedb.go +++ b/core/state/test_statedb.go @@ -7,7 +7,7 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/precompile/contract" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/core/state/transient_storage.go b/core/state/transient_storage.go index b5ee4f461e..285ebbc727 100644 --- a/core/state/transient_storage.go +++ b/core/state/transient_storage.go @@ -27,7 +27,7 @@ package state import ( - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // transientStorage is a representation of EIP-1153 "Transient Storage". diff --git a/core/state/trie_prefetcher.go b/core/state/trie_prefetcher.go index fc7be65b4a..8de3edc406 100644 --- a/core/state/trie_prefetcher.go +++ b/core/state/trie_prefetcher.go @@ -21,8 +21,8 @@ import ( "github.com/ava-labs/coreth/libevm/options" "github.com/ava-labs/coreth/metrics" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/core/state/trie_prefetcher.libevm.go b/core/state/trie_prefetcher.libevm.go index 7a2a35ddc8..a003bd82ba 100644 --- a/core/state/trie_prefetcher.libevm.go +++ b/core/state/trie_prefetcher.libevm.go @@ -19,8 +19,8 @@ package state import ( "github.com/ava-labs/coreth/libevm/options" "github.com/ava-labs/coreth/libevm/sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // A PrefetcherOption configures behaviour of trie prefetching. diff --git a/core/state/trie_prefetcher_extra_test.go b/core/state/trie_prefetcher_extra_test.go index d768d46a9d..346a064bfc 100644 --- a/core/state/trie_prefetcher_extra_test.go +++ b/core/state/trie_prefetcher_extra_test.go @@ -19,8 +19,8 @@ import ( "github.com/ava-labs/coreth/metrics" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" "github.com/stretchr/testify/require" ) diff --git a/core/state/trie_prefetcher_test.go b/core/state/trie_prefetcher_test.go index 4c1ff686e3..54b8f01db8 100644 --- a/core/state/trie_prefetcher_test.go +++ b/core/state/trie_prefetcher_test.go @@ -33,7 +33,7 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/core/state_manager.go b/core/state_manager.go index 59447055b7..30b20be86a 100644 --- a/core/state_manager.go +++ b/core/state_manager.go @@ -32,8 +32,8 @@ import ( "time" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) func init() { diff --git a/core/state_manager_test.go b/core/state_manager_test.go index cddb0a6dd8..ea91e0d113 100644 --- a/core/state_manager_test.go +++ b/core/state_manager_test.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" ) diff --git a/core/state_processor.go b/core/state_processor.go index af5b888686..c4d018ccc8 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -38,9 +38,9 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/precompile/contract" "github.com/ava-labs/coreth/precompile/modules" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" ) // StateProcessor is a basic Processor, which takes care of transitioning diff --git a/core/state_processor_test.go b/core/state_processor_test.go index 5392ad4427..ada87f9ffc 100644 --- a/core/state_processor_test.go +++ b/core/state_processor_test.go @@ -41,8 +41,8 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/holiman/uint256" "golang.org/x/crypto/sha3" ) diff --git a/core/state_transition.go b/core/state_transition.go index df8c679a7a..27f6652275 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -36,9 +36,9 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/utils" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - cmath "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ava-labs/libevm/common" + cmath "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto/kzg4844" "github.com/holiman/uint256" ) diff --git a/core/state_transition_test.go b/core/state_transition_test.go index 929072b0d8..79e5514515 100644 --- a/core/state_transition_test.go +++ b/core/state_transition_test.go @@ -37,9 +37,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - ethCrypto "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + ethCrypto "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" ) diff --git a/core/test_blockchain.go b/core/test_blockchain.go index 1aa82ccb7b..05d75556de 100644 --- a/core/test_blockchain.go +++ b/core/test_blockchain.go @@ -15,9 +15,9 @@ import ( "github.com/ava-labs/coreth/core/state" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" "github.com/holiman/uint256" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/txindexer.go b/core/txindexer.go index 39c5fe51b0..4dc963b94c 100644 --- a/core/txindexer.go +++ b/core/txindexer.go @@ -21,8 +21,8 @@ import ( "time" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // TxIndexProgress is the struct describing the progress for transaction indexing. diff --git a/core/txindexer_test.go b/core/txindexer_test.go index 5c212bc953..b1bbdc83db 100644 --- a/core/txindexer_test.go +++ b/core/txindexer_test.go @@ -25,9 +25,9 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" "github.com/stretchr/testify/require" ) diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 63d79e4372..63b363ca1c 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -47,10 +47,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/metrics" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/billy" "github.com/holiman/uint256" ) diff --git a/core/txpool/blobpool/blobpool_test.go b/core/txpool/blobpool/blobpool_test.go index 0e993ca9dc..3b08175a48 100644 --- a/core/txpool/blobpool/blobpool_test.go +++ b/core/txpool/blobpool/blobpool_test.go @@ -47,12 +47,12 @@ import ( "github.com/ava-labs/coreth/core/txpool" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/kzg4844" - "github.com/ethereum/go-ethereum/ethdb/memorydb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/crypto/kzg4844" + "github.com/ava-labs/libevm/ethdb/memorydb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/billy" "github.com/holiman/uint256" ) diff --git a/core/txpool/blobpool/config.go b/core/txpool/blobpool/config.go index 5df7885fb3..d7b94535a7 100644 --- a/core/txpool/blobpool/config.go +++ b/core/txpool/blobpool/config.go @@ -27,7 +27,7 @@ package blobpool import ( - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) // Config are the configuration parameters of the blob transaction pool. diff --git a/core/txpool/blobpool/evictheap.go b/core/txpool/blobpool/evictheap.go index 0824ddf735..7c7525371c 100644 --- a/core/txpool/blobpool/evictheap.go +++ b/core/txpool/blobpool/evictheap.go @@ -32,7 +32,7 @@ import ( "math" "sort" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/core/txpool/blobpool/evictheap_test.go b/core/txpool/blobpool/evictheap_test.go index 69b02447bf..70bd772b5d 100644 --- a/core/txpool/blobpool/evictheap_test.go +++ b/core/txpool/blobpool/evictheap_test.go @@ -32,7 +32,7 @@ import ( "testing" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/core/txpool/blobpool/interface.go b/core/txpool/blobpool/interface.go index c544efa872..d25250e887 100644 --- a/core/txpool/blobpool/interface.go +++ b/core/txpool/blobpool/interface.go @@ -30,7 +30,7 @@ import ( "github.com/ava-labs/coreth/core/state" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // BlockChain defines the minimal set of methods needed to back a blob pool with diff --git a/core/txpool/blobpool/limbo.go b/core/txpool/blobpool/limbo.go index 63f31031ab..541b1309e8 100644 --- a/core/txpool/blobpool/limbo.go +++ b/core/txpool/blobpool/limbo.go @@ -30,9 +30,9 @@ import ( "errors" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/billy" ) diff --git a/core/txpool/legacypool/journal.go b/core/txpool/legacypool/journal.go index c586cab543..f29d4f2855 100644 --- a/core/txpool/legacypool/journal.go +++ b/core/txpool/legacypool/journal.go @@ -33,9 +33,9 @@ import ( "os" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) // errNoActiveJournal is returned if a transaction is attempted to be inserted diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 51825da9e9..26969aeb04 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -44,10 +44,10 @@ import ( "github.com/ava-labs/coreth/metrics" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/prque" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/prque" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" "github.com/holiman/uint256" ) diff --git a/core/txpool/legacypool/legacypool2_test.go b/core/txpool/legacypool/legacypool2_test.go index 566cfc820e..dd10a4ab46 100644 --- a/core/txpool/legacypool/legacypool2_test.go +++ b/core/txpool/legacypool/legacypool2_test.go @@ -33,9 +33,9 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/state" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/event" "github.com/holiman/uint256" ) diff --git a/core/txpool/legacypool/legacypool_test.go b/core/txpool/legacypool/legacypool_test.go index a9b8ebb345..d86a4e3428 100644 --- a/core/txpool/legacypool/legacypool_test.go +++ b/core/txpool/legacypool/legacypool_test.go @@ -47,9 +47,9 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/event" "github.com/holiman/uint256" ) diff --git a/core/txpool/legacypool/list.go b/core/txpool/legacypool/list.go index 0b523c3795..be458113b2 100644 --- a/core/txpool/legacypool/list.go +++ b/core/txpool/legacypool/list.go @@ -36,7 +36,7 @@ import ( "time" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" "golang.org/x/exp/slices" ) diff --git a/core/txpool/legacypool/list_test.go b/core/txpool/legacypool/list_test.go index 116e80a707..d94dc5c683 100644 --- a/core/txpool/legacypool/list_test.go +++ b/core/txpool/legacypool/list_test.go @@ -32,8 +32,8 @@ import ( "testing" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/holiman/uint256" ) diff --git a/core/txpool/legacypool/noncer.go b/core/txpool/legacypool/noncer.go index dd880a6ba3..425748d6f1 100644 --- a/core/txpool/legacypool/noncer.go +++ b/core/txpool/legacypool/noncer.go @@ -30,7 +30,7 @@ import ( "sync" "github.com/ava-labs/coreth/core/state" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // noncer is a tiny virtual state database to manage the executable nonces of diff --git a/core/txpool/subpool.go b/core/txpool/subpool.go index 4ebbf97c4f..9059556094 100644 --- a/core/txpool/subpool.go +++ b/core/txpool/subpool.go @@ -32,8 +32,8 @@ import ( "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" "github.com/holiman/uint256" ) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index adfc616a82..fc4ecf8bf5 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -36,9 +36,9 @@ import ( "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/metrics" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/core/txpool/validation.go b/core/txpool/validation.go index 374471e978..e543dcd9cc 100644 --- a/core/txpool/validation.go +++ b/core/txpool/validation.go @@ -36,9 +36,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/kzg4844" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto/kzg4844" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/core/types/account.go b/core/types/account.go index 28a663009e..cf587e16eb 100644 --- a/core/types/account.go +++ b/core/types/account.go @@ -23,9 +23,9 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" ) //go:generate go run github.com/fjl/gencodec -type Account -field-override accountMarshaling -out gen_account.go diff --git a/core/types/block.go b/core/types/block.go index 6038046e31..f7cf4da018 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -34,9 +34,9 @@ import ( "reflect" "sync/atomic" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/rlp" ) // A BlockNonce is a 64-bit hash which proves (combined with the @@ -67,7 +67,7 @@ func (n *BlockNonce) UnmarshalText(input []byte) error { } //go:generate go run github.com/fjl/gencodec -type Header -field-override headerMarshaling -out gen_header_json.go -//go:generate go run github.com/ethereum/go-ethereum/rlp/rlpgen -type Header -out gen_header_rlp.go +//go:generate go run github.com/ava-labs/libevm/rlp/rlpgen -type Header -out gen_header_rlp.go // Header represents a block header in the Ethereum blockchain. type Header struct { diff --git a/core/types/block_ext.go b/core/types/block_ext.go index 5ebb7aeb31..c186e5d241 100644 --- a/core/types/block_ext.go +++ b/core/types/block_ext.go @@ -6,7 +6,7 @@ package types import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func (b *Block) WithExtData(version uint32, extdata *[]byte) *Block { diff --git a/core/types/block_test.go b/core/types/block_test.go index 6da8f441f9..7857716e6c 100644 --- a/core/types/block_test.go +++ b/core/types/block_test.go @@ -34,10 +34,10 @@ import ( "github.com/ava-labs/coreth/internal/blocktest" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" ) // This test has been modified from https://github.com/ethereum/go-ethereum/blob/v1.9.21/core/types/block_test.go#L35 to fit diff --git a/core/types/bloom9.go b/core/types/bloom9.go index aa172a0b1b..cd14333b70 100644 --- a/core/types/bloom9.go +++ b/core/types/bloom9.go @@ -31,8 +31,8 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" ) type bytesBacked interface { diff --git a/core/types/bloom9_test.go b/core/types/bloom9_test.go index e758b9cd45..a323abccb3 100644 --- a/core/types/bloom9_test.go +++ b/core/types/bloom9_test.go @@ -31,8 +31,8 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) func TestBloom(t *testing.T) { diff --git a/core/types/gen_access_tuple.go b/core/types/gen_access_tuple.go index d740b70981..ce941cf352 100644 --- a/core/types/gen_access_tuple.go +++ b/core/types/gen_access_tuple.go @@ -6,7 +6,7 @@ import ( "encoding/json" "errors" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // MarshalJSON marshals as JSON. diff --git a/core/types/gen_account.go b/core/types/gen_account.go index 4e475896a7..c3c7fb3fdf 100644 --- a/core/types/gen_account.go +++ b/core/types/gen_account.go @@ -7,9 +7,9 @@ import ( "errors" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" ) var _ = (*accountMarshaling)(nil) diff --git a/core/types/gen_account_rlp.go b/core/types/gen_account_rlp.go index 382bedcd38..b9a41e8e58 100644 --- a/core/types/gen_account_rlp.go +++ b/core/types/gen_account_rlp.go @@ -5,7 +5,7 @@ package types import ( "io" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/rlp" ) func (obj *StateAccount) EncodeRLP(_w io.Writer) error { diff --git a/core/types/gen_genesis_account.go b/core/types/gen_genesis_account.go index f4c352ec7e..c94927f566 100644 --- a/core/types/gen_genesis_account.go +++ b/core/types/gen_genesis_account.go @@ -7,9 +7,9 @@ import ( "errors" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" ) var _ = (*genesisAccountMarshaling)(nil) diff --git a/core/types/gen_header_json.go b/core/types/gen_header_json.go index 632a6ed48e..0c1f588944 100644 --- a/core/types/gen_header_json.go +++ b/core/types/gen_header_json.go @@ -7,8 +7,8 @@ import ( "errors" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var _ = (*headerMarshaling)(nil) diff --git a/core/types/gen_header_rlp.go b/core/types/gen_header_rlp.go index 711a33b8ca..e7c98e851f 100644 --- a/core/types/gen_header_rlp.go +++ b/core/types/gen_header_rlp.go @@ -2,7 +2,7 @@ package types -import "github.com/ethereum/go-ethereum/rlp" +import "github.com/ava-labs/libevm/rlp" import "io" func (obj *Header) EncodeRLP(_w io.Writer) error { diff --git a/core/types/gen_log_json.go b/core/types/gen_log_json.go index 3ffa9c2feb..db6ddbc3e4 100644 --- a/core/types/gen_log_json.go +++ b/core/types/gen_log_json.go @@ -6,8 +6,8 @@ import ( "encoding/json" "errors" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var _ = (*logMarshaling)(nil) diff --git a/core/types/gen_log_rlp.go b/core/types/gen_log_rlp.go index 89f2083d4b..5751705d1c 100644 --- a/core/types/gen_log_rlp.go +++ b/core/types/gen_log_rlp.go @@ -5,7 +5,7 @@ package types import ( "io" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/rlp" ) func (obj *Log) EncodeRLP(_w io.Writer) error { diff --git a/core/types/gen_receipt_json.go b/core/types/gen_receipt_json.go index 4c641a9727..0ab21785aa 100644 --- a/core/types/gen_receipt_json.go +++ b/core/types/gen_receipt_json.go @@ -7,8 +7,8 @@ import ( "errors" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var _ = (*receiptMarshaling)(nil) diff --git a/core/types/hashes.go b/core/types/hashes.go index 3d8a8a013b..2a5ed05aa5 100644 --- a/core/types/hashes.go +++ b/core/types/hashes.go @@ -27,9 +27,9 @@ package types import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/core/types/hashing.go b/core/types/hashing.go index 40291f5406..0f766ae867 100644 --- a/core/types/hashing.go +++ b/core/types/hashing.go @@ -32,9 +32,9 @@ import ( "math" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "golang.org/x/crypto/sha3" ) diff --git a/core/types/hashing_test.go b/core/types/hashing_test.go index 82e17b817f..5fea29dd91 100644 --- a/core/types/hashing_test.go +++ b/core/types/hashing_test.go @@ -38,10 +38,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" ) func TestDeriveSha(t *testing.T) { diff --git a/core/types/log.go b/core/types/log.go index fc7e42f295..6482fd2769 100644 --- a/core/types/log.go +++ b/core/types/log.go @@ -27,11 +27,11 @@ package types import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) -//go:generate go run github.com/ethereum/go-ethereum/rlp/rlpgen -type Log -out gen_log_rlp.go +//go:generate go run github.com/ava-labs/libevm/rlp/rlpgen -type Log -out gen_log_rlp.go //go:generate go run github.com/fjl/gencodec -type Log -field-override logMarshaling -out gen_log_json.go // Log represents a contract log event. These events are generated by the LOG opcode and diff --git a/core/types/receipt.go b/core/types/receipt.go index 1686b8d217..70ead15e5a 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -35,10 +35,10 @@ import ( "unsafe" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" ) //go:generate go run github.com/fjl/gencodec -type Receipt -field-override receiptMarshaling -out gen_receipt_json.go diff --git a/core/types/receipt_test.go b/core/types/receipt_test.go index 32da193c60..f40ef2c487 100644 --- a/core/types/receipt_test.go +++ b/core/types/receipt_test.go @@ -35,8 +35,8 @@ import ( "testing" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" "github.com/kylelemons/godebug/diff" ) diff --git a/core/types/rlp_fuzzer_test.go b/core/types/rlp_fuzzer_test.go index a3b9f72436..4e3645874a 100644 --- a/core/types/rlp_fuzzer_test.go +++ b/core/types/rlp_fuzzer_test.go @@ -22,7 +22,7 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" ) diff --git a/core/types/state_account.go b/core/types/state_account.go index 9f8a6108a3..d2727e3b92 100644 --- a/core/types/state_account.go +++ b/core/types/state_account.go @@ -29,12 +29,12 @@ package types import ( "bytes" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" ) -//go:generate go run github.com/ethereum/go-ethereum/rlp/rlpgen -type StateAccount -out gen_account_rlp.go +//go:generate go run github.com/ava-labs/libevm/rlp/rlpgen -type StateAccount -out gen_account_rlp.go // StateAccount is the Ethereum consensus representation of accounts. // These objects are stored in the main account trie. diff --git a/core/types/transaction.go b/core/types/transaction.go index 35602becae..e663dca3f9 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -35,10 +35,10 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" ) var ( diff --git a/core/types/transaction_marshalling.go b/core/types/transaction_marshalling.go index 3839efdc63..07cf5e9700 100644 --- a/core/types/transaction_marshalling.go +++ b/core/types/transaction_marshalling.go @@ -31,9 +31,9 @@ import ( "errors" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto/kzg4844" "github.com/holiman/uint256" ) diff --git a/core/types/transaction_signing.go b/core/types/transaction_signing.go index ac6e432893..89b0022a16 100644 --- a/core/types/transaction_signing.go +++ b/core/types/transaction_signing.go @@ -33,8 +33,8 @@ import ( "math/big" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) var ErrInvalidChainId = errors.New("invalid chain id for signer") diff --git a/core/types/transaction_signing_test.go b/core/types/transaction_signing_test.go index 5735c1539d..209183b2e8 100644 --- a/core/types/transaction_signing_test.go +++ b/core/types/transaction_signing_test.go @@ -33,9 +33,9 @@ import ( "testing" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" ) func TestEIP155Signing(t *testing.T) { diff --git a/core/types/transaction_test.go b/core/types/transaction_test.go index 4471a6ba45..a9a6f483da 100644 --- a/core/types/transaction_test.go +++ b/core/types/transaction_test.go @@ -36,9 +36,9 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" ) // The values in those tests are from the Transaction Tests diff --git a/core/types/tx_access_list.go b/core/types/tx_access_list.go index c12232d4eb..c17801096e 100644 --- a/core/types/tx_access_list.go +++ b/core/types/tx_access_list.go @@ -30,8 +30,8 @@ import ( "bytes" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" ) //go:generate go run github.com/fjl/gencodec -type AccessTuple -out gen_access_tuple.go diff --git a/core/types/tx_blob.go b/core/types/tx_blob.go index 6769f6ebc8..46929721b9 100644 --- a/core/types/tx_blob.go +++ b/core/types/tx_blob.go @@ -22,9 +22,9 @@ import ( "math/big" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/kzg4844" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto/kzg4844" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" ) diff --git a/core/types/tx_blob_test.go b/core/types/tx_blob_test.go index 25d09e31ce..967c48ed89 100644 --- a/core/types/tx_blob_test.go +++ b/core/types/tx_blob_test.go @@ -4,9 +4,9 @@ import ( "crypto/ecdsa" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/crypto/kzg4844" "github.com/holiman/uint256" ) diff --git a/core/types/tx_dynamic_fee.go b/core/types/tx_dynamic_fee.go index d40f1fbd03..9236f0c50c 100644 --- a/core/types/tx_dynamic_fee.go +++ b/core/types/tx_dynamic_fee.go @@ -30,8 +30,8 @@ import ( "bytes" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" ) // DynamicFeeTx represents an EIP-1559 transaction. diff --git a/core/types/tx_legacy.go b/core/types/tx_legacy.go index b1f12567db..ac5b05f453 100644 --- a/core/types/tx_legacy.go +++ b/core/types/tx_legacy.go @@ -30,7 +30,7 @@ import ( "bytes" "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // LegacyTx is the transaction data of the original Ethereum transactions. diff --git a/core/types/types_test.go b/core/types/types_test.go index 7b68db9b4b..7620aafb7f 100644 --- a/core/types/types_test.go +++ b/core/types/types_test.go @@ -30,9 +30,9 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" ) type devnull struct{ len int } diff --git a/core/vm/analysis_test.go b/core/vm/analysis_test.go index ae6bef9b46..df5fd46e9b 100644 --- a/core/vm/analysis_test.go +++ b/core/vm/analysis_test.go @@ -30,7 +30,7 @@ import ( "math/bits" "testing" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" ) func TestJumpDestAnalysis(t *testing.T) { diff --git a/core/vm/common.go b/core/vm/common.go index 0e3ed04376..bd445ea66e 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -27,8 +27,8 @@ package vm import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" "github.com/holiman/uint256" ) diff --git a/core/vm/contract.go b/core/vm/contract.go index 129b208eb7..457ab47113 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -27,7 +27,7 @@ package vm import ( - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index b14dea6b2a..cd6087f007 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -37,13 +37,13 @@ import ( "github.com/ava-labs/coreth/precompile/contract" "github.com/ava-labs/coreth/precompile/modules" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/blake2b" - "github.com/ethereum/go-ethereum/crypto/bls12381" - "github.com/ethereum/go-ethereum/crypto/bn256" - "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/crypto/blake2b" + "github.com/ava-labs/libevm/crypto/bls12381" + "github.com/ava-labs/libevm/crypto/bn256" + "github.com/ava-labs/libevm/crypto/kzg4844" "golang.org/x/crypto/ripemd160" ) diff --git a/core/vm/contracts_fuzz_test.go b/core/vm/contracts_fuzz_test.go index e955287ba3..af8a787d99 100644 --- a/core/vm/contracts_fuzz_test.go +++ b/core/vm/contracts_fuzz_test.go @@ -29,7 +29,7 @@ package vm import ( "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func FuzzPrecompiledContracts(f *testing.F) { diff --git a/core/vm/contracts_stateful.go b/core/vm/contracts_stateful.go index 64a34ffcf5..04fd3991db 100644 --- a/core/vm/contracts_stateful.go +++ b/core/vm/contracts_stateful.go @@ -5,7 +5,7 @@ package vm import ( "github.com/ava-labs/coreth/precompile/contract" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // wrappedPrecompiledContract implements StatefulPrecompiledContract by wrapping stateless native precompiled contracts diff --git a/core/vm/contracts_stateful_native_asset.go b/core/vm/contracts_stateful_native_asset.go index 6791efe2e7..f49e1cdb17 100644 --- a/core/vm/contracts_stateful_native_asset.go +++ b/core/vm/contracts_stateful_native_asset.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/coreth/precompile/contract" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/core/vm/contracts_stateful_test.go b/core/vm/contracts_stateful_test.go index 9ac7652108..f92509ba3e 100644 --- a/core/vm/contracts_stateful_test.go +++ b/core/vm/contracts_stateful_test.go @@ -11,8 +11,8 @@ import ( "github.com/ava-labs/coreth/core/state" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" "github.com/holiman/uint256" "github.com/stretchr/testify/assert" ) diff --git a/core/vm/contracts_test.go b/core/vm/contracts_test.go index 80a2c33d18..0b9a81f06b 100644 --- a/core/vm/contracts_test.go +++ b/core/vm/contracts_test.go @@ -34,7 +34,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // precompiledTest defines the input/output pairs for precompiled contract tests. diff --git a/core/vm/eips.go b/core/vm/eips.go index b573705dc2..21bc8aa048 100644 --- a/core/vm/eips.go +++ b/core/vm/eips.go @@ -32,7 +32,7 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/core/vm/evm.go b/core/vm/evm.go index 0eb7ec12df..8db9bf689d 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -39,8 +39,8 @@ import ( "github.com/ava-labs/coreth/precompile/precompileconfig" "github.com/ava-labs/coreth/predicate" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/holiman/uint256" ) diff --git a/core/vm/evm_test.go b/core/vm/evm_test.go index 5a7e72f3f4..30d9fb36e6 100644 --- a/core/vm/evm_test.go +++ b/core/vm/evm_test.go @@ -6,7 +6,7 @@ package vm import ( "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" ) diff --git a/core/vm/gas_table.go b/core/vm/gas_table.go index 68a2ae2d58..2c26ca469f 100644 --- a/core/vm/gas_table.go +++ b/core/vm/gas_table.go @@ -31,8 +31,8 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) // memoryGasCost calculates the quadratic gas for memory expansion. It does so diff --git a/core/vm/gas_table_test.go b/core/vm/gas_table_test.go index c6da37c789..7038915eb1 100644 --- a/core/vm/gas_table_test.go +++ b/core/vm/gas_table_test.go @@ -38,8 +38,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" "github.com/holiman/uint256" ) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 72047c260d..8fb5d69273 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -31,8 +31,8 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/holiman/uint256" ) diff --git a/core/vm/instructions_test.go b/core/vm/instructions_test.go index cf28289974..540ee51e4f 100644 --- a/core/vm/instructions_test.go +++ b/core/vm/instructions_test.go @@ -40,9 +40,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" "github.com/holiman/uint256" ) diff --git a/core/vm/interface.go b/core/vm/interface.go index f9bc01ca86..c47e8e5b2e 100644 --- a/core/vm/interface.go +++ b/core/vm/interface.go @@ -31,7 +31,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index 5d495f0af6..0d3a8819b5 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -28,10 +28,10 @@ package vm import ( "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" ) // Config are the configuration options for the Interpreter diff --git a/core/vm/interpreter_test.go b/core/vm/interpreter_test.go index 32453ddb79..7a407bc013 100644 --- a/core/vm/interpreter_test.go +++ b/core/vm/interpreter_test.go @@ -34,8 +34,8 @@ import ( "github.com/ava-labs/coreth/core/state" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" "github.com/holiman/uint256" ) diff --git a/core/vm/logger.go b/core/vm/logger.go index 397aff7077..8ffbde41ca 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -29,7 +29,7 @@ package vm import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // EVMLogger is used to collect execution traces from an EVM transaction diff --git a/core/vm/memory_test.go b/core/vm/memory_test.go index ba36f8023c..009db6f7d3 100644 --- a/core/vm/memory_test.go +++ b/core/vm/memory_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func TestMemoryCopy(t *testing.T) { diff --git a/core/vm/operations_acl.go b/core/vm/operations_acl.go index 3cc56ef8be..f86ad9ac11 100644 --- a/core/vm/operations_acl.go +++ b/core/vm/operations_acl.go @@ -31,8 +31,8 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) func makeGasSStoreFunc() gasFunc { diff --git a/core/vm/runtime/runtime.go b/core/vm/runtime/runtime.go index eb76962ef3..92b856811d 100644 --- a/core/vm/runtime/runtime.go +++ b/core/vm/runtime/runtime.go @@ -35,8 +35,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/holiman/uint256" ) diff --git a/core/vm/runtime/runtime_example_test.go b/core/vm/runtime/runtime_example_test.go index 9850e283be..82651d3f1d 100644 --- a/core/vm/runtime/runtime_example_test.go +++ b/core/vm/runtime/runtime_example_test.go @@ -30,7 +30,7 @@ import ( "fmt" "github.com/ava-labs/coreth/core/vm/runtime" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func ExampleExecute() { diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 2ccf6c160f..ef23da31c4 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -43,8 +43,8 @@ import ( "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/eth/tracers/logger" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/asm" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/core/asm" // force-load js tracers to trigger registration _ "github.com/ava-labs/coreth/eth/tracers/js" diff --git a/eth/api.go b/eth/api.go index 5842cb5625..dbea129203 100644 --- a/eth/api.go +++ b/eth/api.go @@ -27,7 +27,7 @@ package eth import ( - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // EthereumAPI provides an API to access Ethereum full node-related information. diff --git a/eth/api_admin.go b/eth/api_admin.go index f8945c1d2d..1531af6427 100644 --- a/eth/api_admin.go +++ b/eth/api_admin.go @@ -36,7 +36,7 @@ import ( "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/rlp" ) // AdminAPI is the collection of Ethereum full node related APIs for node diff --git a/eth/api_backend.go b/eth/api_backend.go index bf6b578780..d9ede19780 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -45,9 +45,9 @@ import ( "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/event" ) var ErrUnfinalizedData = errors.New("cannot query unfinalized data") diff --git a/eth/api_backend_test.go b/eth/api_backend_test.go index e58fab0954..e8fc92b569 100644 --- a/eth/api_backend_test.go +++ b/eth/api_backend_test.go @@ -31,8 +31,8 @@ import ( "testing" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/eth/api_debug.go b/eth/api_debug.go index 7269fab769..e1c67dc436 100644 --- a/eth/api_debug.go +++ b/eth/api_debug.go @@ -38,11 +38,11 @@ import ( "github.com/ava-labs/coreth/internal/ethapi" "github.com/ava-labs/coreth/rpc" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) // DebugAPI is the collection of Ethereum full node APIs for debugging the diff --git a/eth/api_debug_test.go b/eth/api_debug_test.go index a0fa2eaa5a..7e0ff5215e 100644 --- a/eth/api_debug_test.go +++ b/eth/api_debug_test.go @@ -41,8 +41,8 @@ import ( "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "golang.org/x/exp/slices" ) diff --git a/eth/backend.go b/eth/backend.go index 79dce86db3..015fbb48ce 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -55,10 +55,10 @@ import ( "github.com/ava-labs/coreth/node" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" ) // Config contains the configuration options of the ETH protocol. diff --git a/eth/bloombits.go b/eth/bloombits.go index ecc0aaf157..2fddfc0707 100644 --- a/eth/bloombits.go +++ b/eth/bloombits.go @@ -30,7 +30,7 @@ import ( "time" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common/bitutil" + "github.com/ava-labs/libevm/common/bitutil" ) const ( diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index f7697112ef..b358e9aef0 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -35,7 +35,7 @@ import ( "github.com/ava-labs/coreth/eth/gasprice" "github.com/ava-labs/coreth/miner" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // DefaultFullGPOConfig contains default gasprice oracle settings for full node. diff --git a/eth/filters/api.go b/eth/filters/api.go index 2416e91061..6e79f0ddca 100644 --- a/eth/filters/api.go +++ b/eth/filters/api.go @@ -39,9 +39,9 @@ import ( "github.com/ava-labs/coreth/interfaces" "github.com/ava-labs/coreth/internal/ethapi" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/event" ) var ( diff --git a/eth/filters/api_test.go b/eth/filters/api_test.go index 72838b4d8c..5bb2d0a6cb 100644 --- a/eth/filters/api_test.go +++ b/eth/filters/api_test.go @@ -22,7 +22,7 @@ import ( "testing" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func TestUnmarshalJSONNewFilterArgs(t *testing.T) { diff --git a/eth/filters/bench_test.go b/eth/filters/bench_test.go index 77f0567870..26a478235a 100644 --- a/eth/filters/bench_test.go +++ b/eth/filters/bench_test.go @@ -35,9 +35,9 @@ import ( "github.com/ava-labs/coreth/core/bloombits" "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/bitutil" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/bitutil" + "github.com/ava-labs/libevm/ethdb" ) func BenchmarkBloomBits512(b *testing.B) { diff --git a/eth/filters/filter.go b/eth/filters/filter.go index 6b77ee68e1..f58db13a5c 100644 --- a/eth/filters/filter.go +++ b/eth/filters/filter.go @@ -35,7 +35,7 @@ import ( "github.com/ava-labs/coreth/core/bloombits" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // Filter can be used to retrieve and filter logs. diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go index 6a312df2ee..425617b899 100644 --- a/eth/filters/filter_system.go +++ b/eth/filters/filter_system.go @@ -40,10 +40,10 @@ import ( "github.com/ava-labs/coreth/interfaces" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" ) // Config represents the configuration of the filter system. diff --git a/eth/filters/filter_system_test.go b/eth/filters/filter_system_test.go index 073049a256..ea180d0eed 100644 --- a/eth/filters/filter_system_test.go +++ b/eth/filters/filter_system_test.go @@ -46,9 +46,9 @@ import ( "github.com/ava-labs/coreth/internal/ethapi" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/event" "github.com/stretchr/testify/require" ) diff --git a/eth/filters/filter_test.go b/eth/filters/filter_test.go index 4acb7c45c0..1883f523a7 100644 --- a/eth/filters/filter_test.go +++ b/eth/filters/filter_test.go @@ -43,8 +43,8 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" ) diff --git a/eth/gasestimator/gasestimator.go b/eth/gasestimator/gasestimator.go index 291e806b84..2fbb0ffccc 100644 --- a/eth/gasestimator/gasestimator.go +++ b/eth/gasestimator/gasestimator.go @@ -39,8 +39,8 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // Options are the contextual parameters to execute the requested call. diff --git a/eth/gasprice/fee_info_provider_test.go b/eth/gasprice/fee_info_provider_test.go index 182c3378ea..c157b3fc97 100644 --- a/eth/gasprice/fee_info_provider_test.go +++ b/eth/gasprice/fee_info_provider_test.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/eth/gasprice/feehistory.go b/eth/gasprice/feehistory.go index d86121c003..1a922797e9 100644 --- a/eth/gasprice/feehistory.go +++ b/eth/gasprice/feehistory.go @@ -35,8 +35,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/eth/gasprice/feehistory_test.go b/eth/gasprice/feehistory_test.go index f8234d1d18..f4ef530415 100644 --- a/eth/gasprice/feehistory_test.go +++ b/eth/gasprice/feehistory_test.go @@ -38,7 +38,7 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func TestFeeHistory(t *testing.T) { diff --git a/eth/gasprice/gasprice.go b/eth/gasprice/gasprice.go index 31a2c7b554..ca8fff8bf1 100644 --- a/eth/gasprice/gasprice.go +++ b/eth/gasprice/gasprice.go @@ -37,11 +37,11 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/lru" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/lru" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" "golang.org/x/exp/slices" ) diff --git a/eth/gasprice/gasprice_test.go b/eth/gasprice/gasprice_test.go index 19ea33878d..2e35c08604 100644 --- a/eth/gasprice/gasprice_test.go +++ b/eth/gasprice/gasprice_test.go @@ -40,9 +40,9 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/event" "github.com/stretchr/testify/require" ) diff --git a/eth/state_accessor.go b/eth/state_accessor.go index d5f87ce2ef..819ec9a961 100644 --- a/eth/state_accessor.go +++ b/eth/state_accessor.go @@ -40,8 +40,8 @@ import ( "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // noopReleaser is returned in case there is no operation expected diff --git a/eth/tracers/api.go b/eth/tracers/api.go index f54727953f..b02bdaa75e 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -46,11 +46,11 @@ import ( "github.com/ava-labs/coreth/internal/ethapi" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) const ( diff --git a/eth/tracers/api_test.go b/eth/tracers/api_test.go index fcaf16a85a..95054cb559 100644 --- a/eth/tracers/api_test.go +++ b/eth/tracers/api_test.go @@ -48,10 +48,10 @@ import ( "github.com/ava-labs/coreth/internal/ethapi" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" "golang.org/x/exp/slices" ) diff --git a/eth/tracers/internal/tracetest/calltrace_test.go b/eth/tracers/internal/tracetest/calltrace_test.go index 87c6ff5979..50482bb993 100644 --- a/eth/tracers/internal/tracetest/calltrace_test.go +++ b/eth/tracers/internal/tracetest/calltrace_test.go @@ -43,10 +43,10 @@ import ( "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/tests" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/rlp" ) type callContext struct { diff --git a/eth/tracers/internal/tracetest/flat_calltrace_test.go b/eth/tracers/internal/tracetest/flat_calltrace_test.go index 9305bf7150..00a05477b7 100644 --- a/eth/tracers/internal/tracetest/flat_calltrace_test.go +++ b/eth/tracers/internal/tracetest/flat_calltrace_test.go @@ -24,9 +24,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/tests" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/rlp" // Force-load the native, to trigger registration "github.com/ava-labs/coreth/eth/tracers" diff --git a/eth/tracers/internal/tracetest/prestate_test.go b/eth/tracers/internal/tracetest/prestate_test.go index 7f659d6f71..2a2dc4f258 100644 --- a/eth/tracers/internal/tracetest/prestate_test.go +++ b/eth/tracers/internal/tracetest/prestate_test.go @@ -40,7 +40,7 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/tests" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // prestateTrace is the result of a prestateTrace run. diff --git a/eth/tracers/js/goja.go b/eth/tracers/js/goja.go index 92b9beeed4..457d59ae37 100644 --- a/eth/tracers/js/goja.go +++ b/eth/tracers/js/goja.go @@ -37,9 +37,9 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" jsassets "github.com/ava-labs/coreth/eth/tracers/js/internal/tracers" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" ) var assetTracers = make(map[string]string) diff --git a/eth/tracers/js/tracer_test.go b/eth/tracers/js/tracer_test.go index 746fc0eb0e..9e0da574f8 100644 --- a/eth/tracers/js/tracer_test.go +++ b/eth/tracers/js/tracer_test.go @@ -38,7 +38,7 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/eth/tracers/logger/access_list_tracer.go b/eth/tracers/logger/access_list_tracer.go index d43198a2ff..4db2d1da12 100644 --- a/eth/tracers/logger/access_list_tracer.go +++ b/eth/tracers/logger/access_list_tracer.go @@ -21,7 +21,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // accessList is an accumulator for the set of accounts and storage slots an EVM diff --git a/eth/tracers/logger/gen_structlog.go b/eth/tracers/logger/gen_structlog.go index c41d569a96..97d6c9bdef 100644 --- a/eth/tracers/logger/gen_structlog.go +++ b/eth/tracers/logger/gen_structlog.go @@ -6,9 +6,9 @@ import ( "encoding/json" "github.com/ava-labs/coreth/core/vm" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" "github.com/holiman/uint256" ) diff --git a/eth/tracers/logger/logger.go b/eth/tracers/logger/logger.go index d94ffd3cf7..791ec767cd 100644 --- a/eth/tracers/logger/logger.go +++ b/eth/tracers/logger/logger.go @@ -29,9 +29,9 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" "github.com/holiman/uint256" ) diff --git a/eth/tracers/logger/logger_json.go b/eth/tracers/logger/logger_json.go index 3b2b783252..5cf82d025a 100644 --- a/eth/tracers/logger/logger_json.go +++ b/eth/tracers/logger/logger_json.go @@ -22,8 +22,8 @@ import ( "math/big" "github.com/ava-labs/coreth/core/vm" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) type JSONLogger struct { diff --git a/eth/tracers/logger/logger_test.go b/eth/tracers/logger/logger_test.go index 0a2becf947..11d4e5a3bb 100644 --- a/eth/tracers/logger/logger_test.go +++ b/eth/tracers/logger/logger_test.go @@ -26,7 +26,7 @@ import ( "github.com/ava-labs/coreth/core/state" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/eth/tracers/native/4byte.go b/eth/tracers/native/4byte.go index 113dfa3a4a..2bd7952234 100644 --- a/eth/tracers/native/4byte.go +++ b/eth/tracers/native/4byte.go @@ -34,7 +34,7 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func init() { diff --git a/eth/tracers/native/call.go b/eth/tracers/native/call.go index ea2f0f8980..30b621f79e 100644 --- a/eth/tracers/native/call.go +++ b/eth/tracers/native/call.go @@ -36,9 +36,9 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/log" ) //go:generate go run github.com/fjl/gencodec -type callFrame -field-override callFrameMarshaling -out gen_callframe_json.go diff --git a/eth/tracers/native/call_flat.go b/eth/tracers/native/call_flat.go index 7f5f2ca287..546ccf7e0f 100644 --- a/eth/tracers/native/call_flat.go +++ b/eth/tracers/native/call_flat.go @@ -36,8 +36,8 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) //go:generate go run github.com/fjl/gencodec -type flatCallAction -field-override flatCallActionMarshaling -out gen_flatcallaction_json.go diff --git a/eth/tracers/native/gen_account_json.go b/eth/tracers/native/gen_account_json.go index 4c39cbc38c..bd62f0db35 100644 --- a/eth/tracers/native/gen_account_json.go +++ b/eth/tracers/native/gen_account_json.go @@ -6,8 +6,8 @@ import ( "encoding/json" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var _ = (*accountMarshaling)(nil) diff --git a/eth/tracers/native/gen_callframe_json.go b/eth/tracers/native/gen_callframe_json.go index 15e9f09654..8487e3111b 100644 --- a/eth/tracers/native/gen_callframe_json.go +++ b/eth/tracers/native/gen_callframe_json.go @@ -7,8 +7,8 @@ import ( "math/big" "github.com/ava-labs/coreth/core/vm" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var _ = (*callFrameMarshaling)(nil) diff --git a/eth/tracers/native/gen_flatcallaction_json.go b/eth/tracers/native/gen_flatcallaction_json.go index c075606983..9609d50b63 100644 --- a/eth/tracers/native/gen_flatcallaction_json.go +++ b/eth/tracers/native/gen_flatcallaction_json.go @@ -6,8 +6,8 @@ import ( "encoding/json" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var _ = (*flatCallActionMarshaling)(nil) diff --git a/eth/tracers/native/gen_flatcallresult_json.go b/eth/tracers/native/gen_flatcallresult_json.go index e9fa5e44da..c8e65589ff 100644 --- a/eth/tracers/native/gen_flatcallresult_json.go +++ b/eth/tracers/native/gen_flatcallresult_json.go @@ -5,8 +5,8 @@ package native import ( "encoding/json" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var _ = (*flatCallResultMarshaling)(nil) diff --git a/eth/tracers/native/mux.go b/eth/tracers/native/mux.go index 02a606e21d..e58f02d032 100644 --- a/eth/tracers/native/mux.go +++ b/eth/tracers/native/mux.go @@ -32,7 +32,7 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func init() { diff --git a/eth/tracers/native/noop.go b/eth/tracers/native/noop.go index 11daa94aa4..20825db75e 100644 --- a/eth/tracers/native/noop.go +++ b/eth/tracers/native/noop.go @@ -32,7 +32,7 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func init() { diff --git a/eth/tracers/native/prestate.go b/eth/tracers/native/prestate.go index 76ed4be967..d7be61523b 100644 --- a/eth/tracers/native/prestate.go +++ b/eth/tracers/native/prestate.go @@ -34,10 +34,10 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" ) //go:generate go run github.com/fjl/gencodec -type account -field-override accountMarshaling -out gen_account_json.go diff --git a/eth/tracers/tracers.go b/eth/tracers/tracers.go index 7a754fa824..1f298365dd 100644 --- a/eth/tracers/tracers.go +++ b/eth/tracers/tracers.go @@ -24,7 +24,7 @@ import ( "math/big" "github.com/ava-labs/coreth/core/vm" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // Context contains some contextual infos for a transaction execution that is not diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index e5a2c92047..e30550a6f4 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -37,8 +37,8 @@ import ( "github.com/ava-labs/coreth/eth/tracers/logger" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/tests" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) func BenchmarkTransactionTrace(b *testing.B) { diff --git a/ethclient/corethclient/corethclient.go b/ethclient/corethclient/corethclient.go index 448b10b6af..47f8dcb987 100644 --- a/ethclient/corethclient/corethclient.go +++ b/ethclient/corethclient/corethclient.go @@ -37,8 +37,8 @@ import ( "github.com/ava-labs/coreth/ethclient" "github.com/ava-labs/coreth/interfaces" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) // Client is a wrapper around rpc.Client that implements geth-specific functionality. diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 422cf37fcb..fda588e45b 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -38,8 +38,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/interfaces" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" // Force-load precompiles to trigger registration _ "github.com/ava-labs/coreth/precompile/registry" diff --git a/ethclient/signer.go b/ethclient/signer.go index ba647de1a6..82b8ee48ca 100644 --- a/ethclient/signer.go +++ b/ethclient/signer.go @@ -31,7 +31,7 @@ import ( "math/big" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // senderFromServer is a types.Signer that remembers the sender address returned by the RPC diff --git a/ethclient/simulated/backend.go b/ethclient/simulated/backend.go index c4a3cb8971..f58e3dff8b 100644 --- a/ethclient/simulated/backend.go +++ b/ethclient/simulated/backend.go @@ -34,7 +34,7 @@ import ( "github.com/ava-labs/coreth/node" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var _ eth.PushGossiper = (*fakePushGossiper)(nil) diff --git a/ethclient/simulated/backend_test.go b/ethclient/simulated/backend_test.go index 34a4855cfb..99b37b8996 100644 --- a/ethclient/simulated/backend_test.go +++ b/ethclient/simulated/backend_test.go @@ -28,8 +28,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" ) diff --git a/go.mod b/go.mod index 92e69d503f..b9a215fbc3 100644 --- a/go.mod +++ b/go.mod @@ -5,12 +5,12 @@ go 1.22.8 require ( github.com/VictoriaMetrics/fastcache v1.12.1 github.com/ava-labs/avalanchego v1.12.3-warp-verify4 + github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2 github.com/cespare/cp v0.1.0 github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 github.com/davecgh/go-spew v1.1.1 github.com/deckarep/golang-set/v2 v2.1.0 github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 - github.com/ethereum/go-ethereum v1.13.14 github.com/fsnotify/fsnotify v1.6.0 github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 @@ -69,6 +69,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/ethereum/go-ethereum v1.13.14 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/go.sum b/go.sum index 168caf4a40..58165b3a49 100644 --- a/go.sum +++ b/go.sum @@ -46,6 +46,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= @@ -56,6 +58,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/ava-labs/avalanchego v1.12.3-warp-verify4 h1:8YsFAZUC7PyvgZVpZe+kwpHBa7p1e3pDedS8/NeXQhU= github.com/ava-labs/avalanchego v1.12.3-warp-verify4/go.mod h1:Er2qCyxI4qQKDlNjwwWdOa+/cxCbuEy/z8WgxtXy0N0= +github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2 h1:CVbn0hSsPCl6gCkTCnqwuN4vtJgdVbkCqLXzYAE7qF8= +github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2/go.mod h1:yBctIV/wnxXTF38h95943jvpuk4aj07TrjbpoGor6LQ= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -322,6 +326,8 @@ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iU github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -333,6 +339,8 @@ github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/ github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= diff --git a/interfaces/interfaces.go b/interfaces/interfaces.go index 6e715808c1..ac642a513b 100644 --- a/interfaces/interfaces.go +++ b/interfaces/interfaces.go @@ -33,7 +33,7 @@ import ( "math/big" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // NotFound is returned by API methods if the requested item does not exist. diff --git a/internal/blocktest/test_hash.go b/internal/blocktest/test_hash.go index 014e9ff4b0..4dae6f75f7 100644 --- a/internal/blocktest/test_hash.go +++ b/internal/blocktest/test_hash.go @@ -35,7 +35,7 @@ package blocktest import ( "hash" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "golang.org/x/crypto/sha3" ) diff --git a/internal/debug/api.go b/internal/debug/api.go index 6ac4f5110b..044a601f3c 100644 --- a/internal/debug/api.go +++ b/internal/debug/api.go @@ -45,7 +45,7 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "github.com/hashicorp/go-bexpr" "golang.org/x/exp/slog" ) diff --git a/internal/debug/flags.go b/internal/debug/flags.go index 94cffe5a0e..bb148bf40e 100644 --- a/internal/debug/flags.go +++ b/internal/debug/flags.go @@ -37,7 +37,7 @@ import ( "runtime" "github.com/ava-labs/coreth/internal/flags" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" "github.com/urfave/cli/v2" diff --git a/internal/debug/trace.go b/internal/debug/trace.go index 12f7bfdb05..dd9a873595 100644 --- a/internal/debug/trace.go +++ b/internal/debug/trace.go @@ -31,7 +31,7 @@ import ( "os" "runtime/trace" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) // StartGoTrace turns on tracing, writing to the given file. diff --git a/internal/ethapi/addrlock.go b/internal/ethapi/addrlock.go index 2d00fdd2e7..2cd32605c1 100644 --- a/internal/ethapi/addrlock.go +++ b/internal/ethapi/addrlock.go @@ -29,7 +29,7 @@ package ethapi import ( "sync" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) type AddrLocker struct { diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 9e7ad54dde..7bc7619c47 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -48,13 +48,13 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" "github.com/ava-labs/coreth/trie" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" "github.com/holiman/uint256" "github.com/tyler-smith/go-bip39" ) diff --git a/internal/ethapi/api_extra.go b/internal/ethapi/api_extra.go index 63cf84f48e..fac3133988 100644 --- a/internal/ethapi/api_extra.go +++ b/internal/ethapi/api_extra.go @@ -10,9 +10,9 @@ import ( "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/rlp" ) // GetChainConfig returns the chain config. diff --git a/internal/ethapi/api_extra_test.go b/internal/ethapi/api_extra_test.go index 28843b4cb6..adfdd2fb3f 100644 --- a/internal/ethapi/api_extra_test.go +++ b/internal/ethapi/api_extra_test.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" ) diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index f76c5dff49..928b056877 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -55,12 +55,12 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/kzg4844" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/crypto/kzg4844" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/event" "github.com/holiman/uint256" "github.com/stretchr/testify/require" "golang.org/x/exp/slices" diff --git a/internal/ethapi/backend.go b/internal/ethapi/backend.go index 473a5eda11..84a84baf41 100644 --- a/internal/ethapi/backend.go +++ b/internal/ethapi/backend.go @@ -41,9 +41,9 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/event" ) // Backend interface provides the common API services (that are provided by diff --git a/internal/ethapi/errors.go b/internal/ethapi/errors.go index 928dded8b7..84a186ecd0 100644 --- a/internal/ethapi/errors.go +++ b/internal/ethapi/errors.go @@ -31,7 +31,7 @@ import ( "github.com/ava-labs/coreth/accounts/abi" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common/hexutil" ) // revertError is an API error that encompasses an EVM revert with JSON error diff --git a/internal/ethapi/mocks_test.go b/internal/ethapi/mocks_test.go index 95b2ca4985..72a452cd1c 100644 --- a/internal/ethapi/mocks_test.go +++ b/internal/ethapi/mocks_test.go @@ -24,9 +24,9 @@ import ( vm "github.com/ava-labs/coreth/core/vm" params "github.com/ava-labs/coreth/params" rpc "github.com/ava-labs/coreth/rpc" - common "github.com/ethereum/go-ethereum/common" - ethdb "github.com/ethereum/go-ethereum/ethdb" - event "github.com/ethereum/go-ethereum/event" + common "github.com/ava-labs/libevm/common" + ethdb "github.com/ava-labs/libevm/ethdb" + event "github.com/ava-labs/libevm/event" gomock "go.uber.org/mock/gomock" ) diff --git a/internal/ethapi/transaction_args.go b/internal/ethapi/transaction_args.go index f253a41bdf..17ba2efa0f 100644 --- a/internal/ethapi/transaction_args.go +++ b/internal/ethapi/transaction_args.go @@ -39,11 +39,11 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto/kzg4844" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/crypto/kzg4844" + "github.com/ava-labs/libevm/log" "github.com/holiman/uint256" ) diff --git a/internal/ethapi/transaction_args_test.go b/internal/ethapi/transaction_args_test.go index 7f2b0661fd..ccc01307bb 100644 --- a/internal/ethapi/transaction_args_test.go +++ b/internal/ethapi/transaction_args_test.go @@ -36,8 +36,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var _ feeBackend = &backendMock{} diff --git a/internal/shutdowncheck/shutdown_tracker.go b/internal/shutdowncheck/shutdown_tracker.go index 35382305c4..9499a91032 100644 --- a/internal/shutdowncheck/shutdown_tracker.go +++ b/internal/shutdowncheck/shutdown_tracker.go @@ -30,9 +30,9 @@ import ( "time" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // ShutdownTracker is a service that reports previous unclean shutdowns diff --git a/metrics/cpu_enabled.go b/metrics/cpu_enabled.go index 7b5fe4d207..34f450e1ab 100644 --- a/metrics/cpu_enabled.go +++ b/metrics/cpu_enabled.go @@ -30,7 +30,7 @@ package metrics import ( - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "github.com/shirou/gopsutil/cpu" ) diff --git a/metrics/cputime_unix.go b/metrics/cputime_unix.go index 5a479d8aa8..c02303bdce 100644 --- a/metrics/cputime_unix.go +++ b/metrics/cputime_unix.go @@ -32,7 +32,7 @@ package metrics import ( syscall "golang.org/x/sys/unix" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) // getProcessCPUTime retrieves the process' CPU time since program startup. diff --git a/miner/miner.go b/miner/miner.go index 512b99c1bb..a20bb85b14 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -35,8 +35,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/precompile/precompileconfig" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" ) // Backend wraps all methods required for mining. diff --git a/miner/ordering.go b/miner/ordering.go index 07fa390e4b..2131e2e658 100644 --- a/miner/ordering.go +++ b/miner/ordering.go @@ -32,7 +32,7 @@ import ( "github.com/ava-labs/coreth/core/txpool" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/miner/ordering_ext.go b/miner/ordering_ext.go index f9ce97ce90..31ec24024d 100644 --- a/miner/ordering_ext.go +++ b/miner/ordering_ext.go @@ -5,7 +5,7 @@ import ( "github.com/ava-labs/coreth/core/txpool" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) type TransactionsByPriceAndNonce = transactionsByPriceAndNonce diff --git a/miner/ordering_test.go b/miner/ordering_test.go index 27d6b96761..6fa4797700 100644 --- a/miner/ordering_test.go +++ b/miner/ordering_test.go @@ -35,8 +35,8 @@ import ( "github.com/ava-labs/coreth/core/txpool" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/holiman/uint256" ) diff --git a/miner/worker.go b/miner/worker.go index 96ab02c23d..aeb148f52a 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -49,9 +49,9 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/precompile/precompileconfig" "github.com/ava-labs/coreth/predicate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/event" + "github.com/ava-labs/libevm/log" "github.com/holiman/uint256" ) diff --git a/node/api.go b/node/api.go index f0be57313f..1a404b0d10 100644 --- a/node/api.go +++ b/node/api.go @@ -29,8 +29,8 @@ package node import ( "github.com/ava-labs/coreth/internal/debug" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/crypto" ) // apis returns the collection of built-in RPC APIs. diff --git a/node/config.go b/node/config.go index 58290afea7..30429ab1c5 100644 --- a/node/config.go +++ b/node/config.go @@ -34,7 +34,7 @@ import ( "github.com/ava-labs/coreth/accounts" "github.com/ava-labs/coreth/accounts/external" "github.com/ava-labs/coreth/accounts/keystore" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) // Config represents a small collection of configuration values to fine tune the diff --git a/params/config.go b/params/config.go index f95a815ef4..68a3866bb7 100644 --- a/params/config.go +++ b/params/config.go @@ -34,7 +34,7 @@ import ( "github.com/ava-labs/coreth/precompile/modules" "github.com/ava-labs/coreth/precompile/precompileconfig" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // Avalanche ChainIDs diff --git a/params/config_extra.go b/params/config_extra.go index abe6ed7bb0..9d73a185f4 100644 --- a/params/config_extra.go +++ b/params/config_extra.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const ( diff --git a/params/precompile_upgrade.go b/params/precompile_upgrade.go index 4ae5377145..962275454e 100644 --- a/params/precompile_upgrade.go +++ b/params/precompile_upgrade.go @@ -11,7 +11,7 @@ import ( "github.com/ava-labs/coreth/precompile/modules" "github.com/ava-labs/coreth/precompile/precompileconfig" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var errNoKey = errors.New("PrecompileUpgrade cannot be empty") diff --git a/params/protocol_params.go b/params/protocol_params.go index a09de7025c..6bdb5893c1 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -29,7 +29,7 @@ package params import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const ( diff --git a/peer/network.go b/peer/network.go index a4dfd015f6..7ce1203b45 100644 --- a/peer/network.go +++ b/peer/network.go @@ -12,7 +12,7 @@ import ( "golang.org/x/sync/semaphore" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/ids" diff --git a/peer/peer_tracker.go b/peer/peer_tracker.go index 8070005ca6..bc06e9b267 100644 --- a/peer/peer_tracker.go +++ b/peer/peer_tracker.go @@ -13,7 +13,7 @@ import ( "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/version" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "github.com/ava-labs/coreth/metrics" ) diff --git a/plugin/evm/admin.go b/plugin/evm/admin.go index 34595a0b0e..bd3308e7ee 100644 --- a/plugin/evm/admin.go +++ b/plugin/evm/admin.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/avalanchego/api" "github.com/ava-labs/avalanchego/utils/profiler" "github.com/ava-labs/coreth/plugin/evm/client" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) // Admin is the API service for admin API calls diff --git a/plugin/evm/api.go b/plugin/evm/api.go index 12791d4e08..3ed9ed52ee 100644 --- a/plugin/evm/api.go +++ b/plugin/evm/api.go @@ -18,8 +18,8 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/plugin/evm/atomic" "github.com/ava-labs/coreth/plugin/evm/client" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // test constants diff --git a/plugin/evm/atomic/export_tx.go b/plugin/evm/atomic/export_tx.go index 4938ddc53e..005c9521cf 100644 --- a/plugin/evm/atomic/export_tx.go +++ b/plugin/evm/atomic/export_tx.go @@ -24,8 +24,8 @@ import ( "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/avalanchego/vms/components/verify" "github.com/ava-labs/avalanchego/vms/secp256k1fx" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/plugin/evm/atomic/import_tx.go b/plugin/evm/atomic/import_tx.go index 9213299d8c..1c8dadf59c 100644 --- a/plugin/evm/atomic/import_tx.go +++ b/plugin/evm/atomic/import_tx.go @@ -23,8 +23,8 @@ import ( "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/avalanchego/vms/components/verify" "github.com/ava-labs/avalanchego/vms/secp256k1fx" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/plugin/evm/atomic/mempool.go b/plugin/evm/atomic/mempool.go index f74eacda7e..30b5f511c6 100644 --- a/plugin/evm/atomic/mempool.go +++ b/plugin/evm/atomic/mempool.go @@ -16,7 +16,7 @@ import ( "github.com/ava-labs/coreth/metrics" "github.com/ava-labs/coreth/plugin/evm/config" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/plugin/evm/atomic/tx.go b/plugin/evm/atomic/tx.go index a911402dea..98423ec00d 100644 --- a/plugin/evm/atomic/tx.go +++ b/plugin/evm/atomic/tx.go @@ -11,7 +11,7 @@ import ( "math/big" "sort" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" "github.com/ava-labs/coreth/params" diff --git a/plugin/evm/atomic_backend.go b/plugin/evm/atomic_backend.go index 45afa707f2..35388b0689 100644 --- a/plugin/evm/atomic_backend.go +++ b/plugin/evm/atomic_backend.go @@ -17,8 +17,8 @@ import ( "github.com/ava-labs/avalanchego/utils" "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/coreth/plugin/evm/atomic" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) var _ AtomicBackend = &atomicBackend{} diff --git a/plugin/evm/atomic_state.go b/plugin/evm/atomic_state.go index 911f1afb3a..7647a4cbab 100644 --- a/plugin/evm/atomic_state.go +++ b/plugin/evm/atomic_state.go @@ -10,8 +10,8 @@ import ( "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/coreth/plugin/evm/atomic" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) var _ AtomicState = &atomicState{} diff --git a/plugin/evm/atomic_syncer.go b/plugin/evm/atomic_syncer.go index 8c435690c0..e47fefbcca 100644 --- a/plugin/evm/atomic_syncer.go +++ b/plugin/evm/atomic_syncer.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/database/versiondb" "github.com/ava-labs/avalanchego/utils/wrappers" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/ava-labs/coreth/plugin/evm/message" syncclient "github.com/ava-labs/coreth/sync/client" diff --git a/plugin/evm/atomic_syncer_test.go b/plugin/evm/atomic_syncer_test.go index 3feffe444c..bf939a2ba7 100644 --- a/plugin/evm/atomic_syncer_test.go +++ b/plugin/evm/atomic_syncer_test.go @@ -25,7 +25,7 @@ import ( "github.com/ava-labs/coreth/sync/syncutils" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const commitInterval = 1024 diff --git a/plugin/evm/atomic_trie.go b/plugin/evm/atomic_trie.go index f6add46623..e58b211a47 100644 --- a/plugin/evm/atomic_trie.go +++ b/plugin/evm/atomic_trie.go @@ -23,9 +23,9 @@ import ( "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/plugin/evm/atomic_trie_iterator.go b/plugin/evm/atomic_trie_iterator.go index 2bdf90b581..edc3a9d47b 100644 --- a/plugin/evm/atomic_trie_iterator.go +++ b/plugin/evm/atomic_trie_iterator.go @@ -13,7 +13,7 @@ import ( "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const atomicTrieKeyLen = wrappers.LongLen + common.HashLength diff --git a/plugin/evm/atomic_trie_iterator_test.go b/plugin/evm/atomic_trie_iterator_test.go index 21ec9913f9..8da2e03127 100644 --- a/plugin/evm/atomic_trie_iterator_test.go +++ b/plugin/evm/atomic_trie_iterator_test.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils" "github.com/ava-labs/coreth/plugin/evm/atomic" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugin/evm/atomic_trie_test.go b/plugin/evm/atomic_trie_test.go index 2a82964e94..071cbfd5c8 100644 --- a/plugin/evm/atomic_trie_test.go +++ b/plugin/evm/atomic_trie_test.go @@ -21,7 +21,7 @@ import ( "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/coreth/plugin/evm/atomic" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const testCommitInterval = 100 diff --git a/plugin/evm/atomic_tx_repository.go b/plugin/evm/atomic_tx_repository.go index d1074f60f2..08c4c4d5c4 100644 --- a/plugin/evm/atomic_tx_repository.go +++ b/plugin/evm/atomic_tx_repository.go @@ -8,8 +8,8 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/database" diff --git a/plugin/evm/atomic_tx_repository_test.go b/plugin/evm/atomic_tx_repository_test.go index 224f8fa726..9c5616004b 100644 --- a/plugin/evm/atomic_tx_repository_test.go +++ b/plugin/evm/atomic_tx_repository_test.go @@ -13,7 +13,7 @@ import ( "github.com/ava-labs/avalanchego/database/versiondb" "github.com/ava-labs/avalanchego/utils" "github.com/ava-labs/coreth/plugin/evm/atomic" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/utils/set" diff --git a/plugin/evm/block.go b/plugin/evm/block.go index f94f3ebd81..b3bd725563 100644 --- a/plugin/evm/block.go +++ b/plugin/evm/block.go @@ -10,9 +10,9 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/core/rawdb" diff --git a/plugin/evm/block_builder.go b/plugin/evm/block_builder.go index 721561ff40..c621c7ff1b 100644 --- a/plugin/evm/block_builder.go +++ b/plugin/evm/block_builder.go @@ -16,7 +16,7 @@ import ( "github.com/ava-labs/avalanchego/snow" commonEng "github.com/ava-labs/avalanchego/snow/engine/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/plugin/evm/block_verification.go b/plugin/evm/block_verification.go index f0f8db1658..93af762626 100644 --- a/plugin/evm/block_verification.go +++ b/plugin/evm/block_verification.go @@ -8,7 +8,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" safemath "github.com/ava-labs/avalanchego/utils/math" diff --git a/plugin/evm/client/utils.go b/plugin/evm/client/utils.go index 5ea43f4a20..7d1e35e4ae 100644 --- a/plugin/evm/client/utils.go +++ b/plugin/evm/client/utils.go @@ -3,7 +3,7 @@ package client -import "github.com/ethereum/go-ethereum/common" +import "github.com/ava-labs/libevm/common" func ParseEthAddress(addrStr string) (common.Address, error) { if !common.IsHexAddress(addrStr) { diff --git a/plugin/evm/config/config.go b/plugin/evm/config/config.go index 3104b0faa9..b373b4f292 100644 --- a/plugin/evm/config/config.go +++ b/plugin/evm/config/config.go @@ -9,8 +9,8 @@ import ( "time" "github.com/ava-labs/avalanchego/utils/constants" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" "github.com/spf13/cast" ) diff --git a/plugin/evm/config/config_test.go b/plugin/evm/config/config_test.go index ad13ebdfed..7b96a11742 100644 --- a/plugin/evm/config/config_test.go +++ b/plugin/evm/config/config_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" ) diff --git a/plugin/evm/database/wrapped_database.go b/plugin/evm/database/wrapped_database.go index f8a36913bb..86e3bbd239 100644 --- a/plugin/evm/database/wrapped_database.go +++ b/plugin/evm/database/wrapped_database.go @@ -7,7 +7,7 @@ import ( "errors" "github.com/ava-labs/avalanchego/database" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/ethdb" ) var ( diff --git a/plugin/evm/export_tx_test.go b/plugin/evm/export_tx_test.go index 8e6c5d689b..b786151427 100644 --- a/plugin/evm/export_tx_test.go +++ b/plugin/evm/export_tx_test.go @@ -19,7 +19,7 @@ import ( "github.com/ava-labs/avalanchego/vms/secp256k1fx" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/plugin/evm/atomic" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/plugin/evm/ext_data_hashes.go b/plugin/evm/ext_data_hashes.go index 7648c3bcdb..ae2b4612cc 100644 --- a/plugin/evm/ext_data_hashes.go +++ b/plugin/evm/ext_data_hashes.go @@ -4,7 +4,7 @@ import ( _ "embed" "encoding/json" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var ( diff --git a/plugin/evm/gossip.go b/plugin/evm/gossip.go index e1bf58b0fc..2f0bfb1821 100644 --- a/plugin/evm/gossip.go +++ b/plugin/evm/gossip.go @@ -12,8 +12,8 @@ import ( "sync/atomic" "time" - ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + ethcommon "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" "github.com/prometheus/client_golang/prometheus" "github.com/ava-labs/avalanchego/ids" diff --git a/plugin/evm/gossip_test.go b/plugin/evm/gossip_test.go index 84380001dc..09881fe97f 100644 --- a/plugin/evm/gossip_test.go +++ b/plugin/evm/gossip_test.go @@ -18,8 +18,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/plugin/evm/gossiper_eth_gossiping_test.go b/plugin/evm/gossiper_eth_gossiping_test.go index 47416f0bf1..6fe0f5e955 100644 --- a/plugin/evm/gossiper_eth_gossiping_test.go +++ b/plugin/evm/gossiper_eth_gossiping_test.go @@ -18,8 +18,8 @@ import ( commonEng "github.com/ava-labs/avalanchego/snow/engine/common" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/assert" diff --git a/plugin/evm/import_tx_test.go b/plugin/evm/import_tx_test.go index 3195fd7dae..89b44bf7e9 100644 --- a/plugin/evm/import_tx_test.go +++ b/plugin/evm/import_tx_test.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/plugin/evm/atomic" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" avalancheatomic "github.com/ava-labs/avalanchego/chains/atomic" diff --git a/plugin/evm/log.go b/plugin/evm/log.go index 9eb00fc7be..129409e139 100644 --- a/plugin/evm/log.go +++ b/plugin/evm/log.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/ava-labs/coreth/log" - gethlog "github.com/ethereum/go-ethereum/log" + gethlog "github.com/ava-labs/libevm/log" "golang.org/x/exp/slog" ) diff --git a/plugin/evm/log_test.go b/plugin/evm/log_test.go index b39fa8cc3c..eb61a4e5e5 100644 --- a/plugin/evm/log_test.go +++ b/plugin/evm/log_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "github.com/stretchr/testify/require" ) diff --git a/plugin/evm/message/block_request.go b/plugin/evm/message/block_request.go index f1f353f2f7..009e6b0155 100644 --- a/plugin/evm/message/block_request.go +++ b/plugin/evm/message/block_request.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/avalanchego/ids" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var ( diff --git a/plugin/evm/message/block_request_test.go b/plugin/evm/message/block_request_test.go index cd9070117d..7d5b286551 100644 --- a/plugin/evm/message/block_request_test.go +++ b/plugin/evm/message/block_request_test.go @@ -8,7 +8,7 @@ import ( "math/rand" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" ) diff --git a/plugin/evm/message/code_request.go b/plugin/evm/message/code_request.go index cd1ffef844..d1aeb7f2f6 100644 --- a/plugin/evm/message/code_request.go +++ b/plugin/evm/message/code_request.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/ava-labs/avalanchego/ids" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var _ Request = CodeRequest{} diff --git a/plugin/evm/message/code_request_test.go b/plugin/evm/message/code_request_test.go index 88cedb54d4..3faf12949d 100644 --- a/plugin/evm/message/code_request_test.go +++ b/plugin/evm/message/code_request_test.go @@ -8,7 +8,7 @@ import ( "math/rand" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" ) diff --git a/plugin/evm/message/leafs_request.go b/plugin/evm/message/leafs_request.go index 22629e62ef..32ae4dc45d 100644 --- a/plugin/evm/message/leafs_request.go +++ b/plugin/evm/message/leafs_request.go @@ -8,8 +8,8 @@ import ( "fmt" "github.com/ava-labs/avalanchego/ids" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) const MaxCodeHashesPerRequest = 5 diff --git a/plugin/evm/message/leafs_request_test.go b/plugin/evm/message/leafs_request_test.go index ab6cab5124..68784fe04c 100644 --- a/plugin/evm/message/leafs_request_test.go +++ b/plugin/evm/message/leafs_request_test.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/ids" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" ) diff --git a/plugin/evm/message/syncable.go b/plugin/evm/message/syncable.go index c8631bbb5e..680a18b421 100644 --- a/plugin/evm/message/syncable.go +++ b/plugin/evm/message/syncable.go @@ -8,8 +8,8 @@ import ( "fmt" "github.com/ava-labs/avalanchego/ids" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/ava-labs/avalanchego/snow/engine/snowman/block" ) diff --git a/plugin/evm/network_handler.go b/plugin/evm/network_handler.go index aa4b728ed5..d11d12c4a4 100644 --- a/plugin/evm/network_handler.go +++ b/plugin/evm/network_handler.go @@ -15,7 +15,7 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/warp" warpHandlers "github.com/ava-labs/coreth/warp/handlers" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/ethdb" ) var _ message.RequestHandler = &networkHandler{} diff --git a/plugin/evm/prestate_tracer_test.go b/plugin/evm/prestate_tracer_test.go index 097155a8ae..9766ea30be 100644 --- a/plugin/evm/prestate_tracer_test.go +++ b/plugin/evm/prestate_tracer_test.go @@ -18,8 +18,8 @@ import ( "github.com/ava-labs/coreth/core/vm" "github.com/ava-labs/coreth/eth/tracers" "github.com/ava-labs/coreth/tests" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) func TestPrestateWithDiffModeANTTracer(t *testing.T) { diff --git a/plugin/evm/syncervm_client.go b/plugin/evm/syncervm_client.go index c25f68c46b..e6efd34a49 100644 --- a/plugin/evm/syncervm_client.go +++ b/plugin/evm/syncervm_client.go @@ -21,9 +21,9 @@ import ( "github.com/ava-labs/coreth/plugin/evm/message" syncclient "github.com/ava-labs/coreth/sync/client" "github.com/ava-labs/coreth/sync/statesync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/plugin/evm/syncervm_server.go b/plugin/evm/syncervm_server.go index 3bf051bf87..f249169193 100644 --- a/plugin/evm/syncervm_server.go +++ b/plugin/evm/syncervm_server.go @@ -12,8 +12,8 @@ import ( "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/plugin/evm/message" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) type stateSyncServerConfig struct { diff --git a/plugin/evm/syncervm_test.go b/plugin/evm/syncervm_test.go index 7c8e76fa0a..bad4a434ab 100644 --- a/plugin/evm/syncervm_test.go +++ b/plugin/evm/syncervm_test.go @@ -42,10 +42,10 @@ import ( "github.com/ava-labs/coreth/sync/statesync" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) func TestSkipStateSync(t *testing.T) { diff --git a/plugin/evm/tx_test.go b/plugin/evm/tx_test.go index a710a3c9e1..b8d542f2b6 100644 --- a/plugin/evm/tx_test.go +++ b/plugin/evm/tx_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/plugin/evm/atomic" diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index e955358909..50ca03f3fb 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -65,10 +65,10 @@ import ( // Force-load precompiles to trigger registration _ "github.com/ava-labs/coreth/precompile/registry" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" avalancheRPC "github.com/gorilla/rpc/v2" diff --git a/plugin/evm/vm_database.go b/plugin/evm/vm_database.go index f2a5b4c344..958f22db57 100644 --- a/plugin/evm/vm_database.go +++ b/plugin/evm/vm_database.go @@ -11,8 +11,8 @@ import ( "github.com/ava-labs/avalanchego/database/versiondb" "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/plugin/evm/database" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // initializeDBs initializes the databases used by the VM. diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go index 9acc363533..da83b84f30 100644 --- a/plugin/evm/vm_test.go +++ b/plugin/evm/vm_test.go @@ -16,9 +16,9 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" "github.com/ava-labs/coreth/constants" diff --git a/plugin/evm/vm_warp_test.go b/plugin/evm/vm_warp_test.go index 79e82865a8..b6fb465a61 100644 --- a/plugin/evm/vm_warp_test.go +++ b/plugin/evm/vm_warp_test.go @@ -37,8 +37,8 @@ import ( "github.com/ava-labs/coreth/predicate" "github.com/ava-labs/coreth/utils" "github.com/ava-labs/coreth/warp" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" ) diff --git a/precompile/contract/contract.go b/precompile/contract/contract.go index 0be76a8955..b64c8058dc 100644 --- a/precompile/contract/contract.go +++ b/precompile/contract/contract.go @@ -6,7 +6,7 @@ package contract import ( "fmt" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const ( diff --git a/precompile/contract/interfaces.go b/precompile/contract/interfaces.go index 44c3cfa633..a204418785 100644 --- a/precompile/contract/interfaces.go +++ b/precompile/contract/interfaces.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/coreth/precompile/precompileconfig" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/precompile/contract/mocks.go b/precompile/contract/mocks.go index 546090339f..f93b0727bd 100644 --- a/precompile/contract/mocks.go +++ b/precompile/contract/mocks.go @@ -15,7 +15,7 @@ import ( snow "github.com/ava-labs/avalanchego/snow" precompileconfig "github.com/ava-labs/coreth/precompile/precompileconfig" - common "github.com/ethereum/go-ethereum/common" + common "github.com/ava-labs/libevm/common" uint256 "github.com/holiman/uint256" gomock "go.uber.org/mock/gomock" ) diff --git a/precompile/contract/utils.go b/precompile/contract/utils.go index 6b8ed7c832..8484415397 100644 --- a/precompile/contract/utils.go +++ b/precompile/contract/utils.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/coreth/accounts/abi" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/crypto" ) // Gas costs for stateful precompiles diff --git a/precompile/contracts/warp/config.go b/precompile/contracts/warp/config.go index 23b3bbdbe3..07d86c763f 100644 --- a/precompile/contracts/warp/config.go +++ b/precompile/contracts/warp/config.go @@ -13,9 +13,9 @@ import ( "github.com/ava-labs/coreth/precompile/precompileconfig" "github.com/ava-labs/coreth/predicate" warpValidators "github.com/ava-labs/coreth/warp/validators" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/precompile/contracts/warp/contract.go b/precompile/contracts/warp/contract.go index 7e30f9f9eb..9a7c556233 100644 --- a/precompile/contracts/warp/contract.go +++ b/precompile/contracts/warp/contract.go @@ -15,8 +15,8 @@ import ( _ "embed" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) const ( diff --git a/precompile/contracts/warp/contract_test.go b/precompile/contracts/warp/contract_test.go index a3bb563b3b..39e07e6ce3 100644 --- a/precompile/contracts/warp/contract_test.go +++ b/precompile/contracts/warp/contract_test.go @@ -19,7 +19,7 @@ import ( "github.com/ava-labs/coreth/predicate" "github.com/ava-labs/coreth/utils" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/precompile/contracts/warp/contract_warp_handler.go b/precompile/contracts/warp/contract_warp_handler.go index 71142ed084..8498b340b4 100644 --- a/precompile/contracts/warp/contract_warp_handler.go +++ b/precompile/contracts/warp/contract_warp_handler.go @@ -12,8 +12,8 @@ import ( "github.com/ava-labs/coreth/precompile/contract" "github.com/ava-labs/coreth/predicate" "github.com/ava-labs/coreth/vmerrs" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) var ( diff --git a/precompile/contracts/warp/module.go b/precompile/contracts/warp/module.go index 336100da34..b333d8f7ec 100644 --- a/precompile/contracts/warp/module.go +++ b/precompile/contracts/warp/module.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/coreth/precompile/modules" "github.com/ava-labs/coreth/precompile/precompileconfig" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var _ contract.Configurator = &configurator{} diff --git a/precompile/modules/module.go b/precompile/modules/module.go index fefa9fd2da..a5fca0cc38 100644 --- a/precompile/modules/module.go +++ b/precompile/modules/module.go @@ -7,7 +7,7 @@ import ( "bytes" "github.com/ava-labs/coreth/precompile/contract" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) type Module struct { diff --git a/precompile/modules/registerer.go b/precompile/modules/registerer.go index a7f3b92c60..068170bd2c 100644 --- a/precompile/modules/registerer.go +++ b/precompile/modules/registerer.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/coreth/constants" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var ( diff --git a/precompile/modules/registerer_test.go b/precompile/modules/registerer_test.go index f2519046df..665f1aa860 100644 --- a/precompile/modules/registerer_test.go +++ b/precompile/modules/registerer_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/ava-labs/coreth/constants" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/precompile/precompileconfig/config.go b/precompile/precompileconfig/config.go index eb741cbc55..7dd027aadc 100644 --- a/precompile/precompileconfig/config.go +++ b/precompile/precompileconfig/config.go @@ -8,7 +8,7 @@ import ( "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/engine/snowman/block" "github.com/ava-labs/avalanchego/vms/platformvm/warp" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // StatefulPrecompileConfig defines the interface for a stateful precompile to diff --git a/precompile/precompileconfig/mocks.go b/precompile/precompileconfig/mocks.go index cba1ca13a3..6843eaa6b4 100644 --- a/precompile/precompileconfig/mocks.go +++ b/precompile/precompileconfig/mocks.go @@ -12,7 +12,7 @@ package precompileconfig import ( reflect "reflect" - common "github.com/ethereum/go-ethereum/common" + common "github.com/ava-labs/libevm/common" gomock "go.uber.org/mock/gomock" ) diff --git a/precompile/testutils/test_precompile.go b/precompile/testutils/test_precompile.go index a0bc279ff9..86c29c6323 100644 --- a/precompile/testutils/test_precompile.go +++ b/precompile/testutils/test_precompile.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/coreth/precompile/modules" "github.com/ava-labs/coreth/precompile/precompileconfig" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/predicate/predicate_bytes.go b/predicate/predicate_bytes.go index 71a266e3aa..e7b23f8eb8 100644 --- a/predicate/predicate_bytes.go +++ b/predicate/predicate_bytes.go @@ -7,7 +7,7 @@ import ( "fmt" "github.com/ava-labs/coreth/params" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // EndByte is used as a delimiter for the bytes packed into a precompile predicate. diff --git a/predicate/predicate_results.go b/predicate/predicate_results.go index f87b181f44..87c7d33467 100644 --- a/predicate/predicate_results.go +++ b/predicate/predicate_results.go @@ -11,7 +11,7 @@ import ( "github.com/ava-labs/avalanchego/codec/linearcodec" "github.com/ava-labs/avalanchego/utils/units" "github.com/ava-labs/avalanchego/utils/wrappers" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) const ( diff --git a/predicate/predicate_results_test.go b/predicate/predicate_results_test.go index e3daefa706..45b8efc0d6 100644 --- a/predicate/predicate_results_test.go +++ b/predicate/predicate_results_test.go @@ -6,7 +6,7 @@ package predicate import ( "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" ) diff --git a/predicate/predicate_slots.go b/predicate/predicate_slots.go index 6eccc5bcae..3cc8722e8b 100644 --- a/predicate/predicate_slots.go +++ b/predicate/predicate_slots.go @@ -7,7 +7,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // PreparePredicateStorageSlots populates the the predicate storage slots of a transaction's access list diff --git a/predicate/predicate_tx.go b/predicate/predicate_tx.go index 76bb3ce6bd..f2b101bb67 100644 --- a/predicate/predicate_tx.go +++ b/predicate/predicate_tx.go @@ -8,7 +8,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // NewPredicateTx returns a transaction with the predicateAddress/predicateBytes tuple diff --git a/rpc/client.go b/rpc/client.go index 6c11365560..ff351485f0 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -37,7 +37,7 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/rpc/client_test.go b/rpc/client_test.go index eec18afb8f..6a13e487da 100644 --- a/rpc/client_test.go +++ b/rpc/client_test.go @@ -42,8 +42,8 @@ import ( "testing" "time" + "github.com/ava-labs/libevm/log" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/log" ) func TestClientRequest(t *testing.T) { diff --git a/rpc/handler.go b/rpc/handler.go index ef35a61ca8..427af29cd7 100644 --- a/rpc/handler.go +++ b/rpc/handler.go @@ -39,7 +39,7 @@ import ( "time" "github.com/ava-labs/coreth/metrics" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "golang.org/x/time/rate" ) diff --git a/rpc/server.go b/rpc/server.go index 054bd2de92..d41ce1cc32 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -33,7 +33,7 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) const MetadataApi = "rpc" diff --git a/rpc/service.go b/rpc/service.go index eecd70e90e..d8fe238844 100644 --- a/rpc/service.go +++ b/rpc/service.go @@ -35,7 +35,7 @@ import ( "sync" "unicode" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/rpc/subscription_test.go b/rpc/subscription_test.go index 5e3143c9fe..06a2bb0660 100644 --- a/rpc/subscription_test.go +++ b/rpc/subscription_test.go @@ -39,7 +39,7 @@ import ( "time" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func TestNewID(t *testing.T) { diff --git a/rpc/types.go b/rpc/types.go index c96e7bc74f..38123bb430 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -34,8 +34,8 @@ import ( "math" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) // API describes the set of methods offered over the RPC interface diff --git a/rpc/types_test.go b/rpc/types_test.go index a255c1e9f7..824c1c8155 100644 --- a/rpc/types_test.go +++ b/rpc/types_test.go @@ -31,8 +31,8 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" ) func TestBlockNumberJSONUnmarshal(t *testing.T) { diff --git a/rpc/websocket.go b/rpc/websocket.go index 1be8364955..6f545477ad 100644 --- a/rpc/websocket.go +++ b/rpc/websocket.go @@ -37,8 +37,8 @@ import ( "sync" "time" + "github.com/ava-labs/libevm/log" mapset "github.com/deckarep/golang-set/v2" - "github.com/ethereum/go-ethereum/log" "github.com/gorilla/websocket" ) diff --git a/scripts/geth-allowed-packages.txt b/scripts/geth-allowed-packages.txt index c295d5d044..c3dd112e98 100644 --- a/scripts/geth-allowed-packages.txt +++ b/scripts/geth-allowed-packages.txt @@ -1,20 +1,20 @@ -"github.com/ethereum/go-ethereum/common" -"github.com/ethereum/go-ethereum/common/bitutil" -"github.com/ethereum/go-ethereum/common/compiler" -"github.com/ethereum/go-ethereum/common/hexutil" -"github.com/ethereum/go-ethereum/common/lru" -"github.com/ethereum/go-ethereum/common/math" -"github.com/ethereum/go-ethereum/common/prque" -"github.com/ethereum/go-ethereum/core/asm" -"github.com/ethereum/go-ethereum/crypto" -"github.com/ethereum/go-ethereum/crypto/blake2b" -"github.com/ethereum/go-ethereum/crypto/bls12381" -"github.com/ethereum/go-ethereum/crypto/bn256" -"github.com/ethereum/go-ethereum/crypto/kzg4844" -"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/event" -"github.com/ethereum/go-ethereum/log" -"github.com/ethereum/go-ethereum/rlp" +"github.com/ava-labs/libevm/common" +"github.com/ava-labs/libevm/common/bitutil" +"github.com/ava-labs/libevm/common/compiler" +"github.com/ava-labs/libevm/common/hexutil" +"github.com/ava-labs/libevm/common/lru" +"github.com/ava-labs/libevm/common/math" +"github.com/ava-labs/libevm/common/prque" +"github.com/ava-labs/libevm/core/asm" +"github.com/ava-labs/libevm/crypto" +"github.com/ava-labs/libevm/crypto/blake2b" +"github.com/ava-labs/libevm/crypto/bls12381" +"github.com/ava-labs/libevm/crypto/bn256" +"github.com/ava-labs/libevm/crypto/kzg4844" +"github.com/ava-labs/libevm/ethdb" +"github.com/ava-labs/libevm/ethdb/leveldb" +"github.com/ava-labs/libevm/ethdb/memorydb" +"github.com/ava-labs/libevm/ethdb/pebble" +"github.com/ava-labs/libevm/event" +"github.com/ava-labs/libevm/log" +"github.com/ava-labs/libevm/rlp" diff --git a/scripts/lint_allowed_geth_imports.sh b/scripts/lint_allowed_geth_imports.sh index e428113613..87544206fb 100755 --- a/scripts/lint_allowed_geth_imports.sh +++ b/scripts/lint_allowed_geth_imports.sh @@ -8,7 +8,7 @@ set -o pipefail # 1. Recursively search through all go files for any lines that include a direct import from go-ethereum # 2. Sort the unique results # #. Print out the difference between the search results and the list of specified allowed package imports from geth. -extra_imports=$(grep -r --include='*.go' '"github.com/ethereum/go-ethereum/.*"' -o -h | sort -u | comm -23 - ./scripts/geth-allowed-packages.txt) +extra_imports=$(grep -r --include='*.go' '"github.com/ava-labs/libevm/.*"' -o -h | sort -u | comm -23 - ./scripts/geth-allowed-packages.txt) if [ -n "${extra_imports}" ]; then echo "new go-ethereum imports should be added to ./scripts/geth-allowed-packages.txt to prevent accidental imports:" echo "${extra_imports}" diff --git a/signer/core/apitypes/types.go b/signer/core/apitypes/types.go index 9f85e9ce7e..8ea190cbb5 100644 --- a/signer/core/apitypes/types.go +++ b/signer/core/apitypes/types.go @@ -33,8 +33,8 @@ import ( "strings" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) type ValidationInfo struct { diff --git a/sync/client/client.go b/sync/client/client.go index 0aaa5c00f9..72b656d217 100644 --- a/sync/client/client.go +++ b/sync/client/client.go @@ -19,16 +19,16 @@ import ( "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/version" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/peer" "github.com/ava-labs/coreth/plugin/evm/message" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/ethdb" ) const ( diff --git a/sync/client/client_test.go b/sync/client/client_test.go index 9902c4e694..03566ed5f5 100644 --- a/sync/client/client_test.go +++ b/sync/client/client_test.go @@ -26,8 +26,8 @@ import ( handlerstats "github.com/ava-labs/coreth/sync/handlers/stats" "github.com/ava-labs/coreth/sync/syncutils" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) func TestGetCode(t *testing.T) { diff --git a/sync/client/leaf_syncer.go b/sync/client/leaf_syncer.go index 2ca82b7560..db59bb305e 100644 --- a/sync/client/leaf_syncer.go +++ b/sync/client/leaf_syncer.go @@ -11,8 +11,8 @@ import ( "github.com/ava-labs/coreth/plugin/evm/message" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" "golang.org/x/sync/errgroup" ) diff --git a/sync/client/mock_client.go b/sync/client/mock_client.go index 038bdf73bf..2d2b5180f7 100644 --- a/sync/client/mock_client.go +++ b/sync/client/mock_client.go @@ -13,8 +13,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/plugin/evm/message" "github.com/ava-labs/coreth/sync/handlers" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" ) var ( diff --git a/sync/handlers/block_request.go b/sync/handlers/block_request.go index 2bbb21b012..1bbad650ad 100644 --- a/sync/handlers/block_request.go +++ b/sync/handlers/block_request.go @@ -14,8 +14,8 @@ import ( "github.com/ava-labs/coreth/plugin/evm/message" "github.com/ava-labs/coreth/sync/handlers/stats" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/sync/handlers/block_request_test.go b/sync/handlers/block_request_test.go index 7b0124d8f9..a3557cdcf9 100644 --- a/sync/handlers/block_request_test.go +++ b/sync/handlers/block_request_test.go @@ -18,9 +18,9 @@ import ( "github.com/ava-labs/coreth/plugin/evm/message" "github.com/ava-labs/coreth/sync/handlers/stats" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "github.com/stretchr/testify/assert" ) diff --git a/sync/handlers/code_request.go b/sync/handlers/code_request.go index b756507f75..5f0b3ee59d 100644 --- a/sync/handlers/code_request.go +++ b/sync/handlers/code_request.go @@ -13,9 +13,9 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/plugin/evm/message" "github.com/ava-labs/coreth/sync/handlers/stats" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // CodeRequestHandler is a peer.RequestHandler for message.CodeRequest diff --git a/sync/handlers/code_request_test.go b/sync/handlers/code_request_test.go index 1bf5bd5223..13c9306ac9 100644 --- a/sync/handlers/code_request_test.go +++ b/sync/handlers/code_request_test.go @@ -14,9 +14,9 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/plugin/evm/message" "github.com/ava-labs/coreth/sync/handlers/stats" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb/memorydb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb/memorydb" "github.com/stretchr/testify/assert" ) diff --git a/sync/handlers/handler.go b/sync/handlers/handler.go index 71bff519de..eece20e4d0 100644 --- a/sync/handlers/handler.go +++ b/sync/handlers/handler.go @@ -6,7 +6,7 @@ package handlers import ( "github.com/ava-labs/coreth/core/state/snapshot" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) type BlockProvider interface { diff --git a/sync/handlers/leafs_request.go b/sync/handlers/leafs_request.go index 4bb0fcfb61..76b726136b 100644 --- a/sync/handlers/leafs_request.go +++ b/sync/handlers/leafs_request.go @@ -21,10 +21,10 @@ import ( "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/ethdb/memorydb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/ethdb/memorydb" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/sync/handlers/leafs_request_test.go b/sync/handlers/leafs_request_test.go index 1c8201fdad..2cfda9abc1 100644 --- a/sync/handlers/leafs_request_test.go +++ b/sync/handlers/leafs_request_test.go @@ -18,9 +18,9 @@ import ( "github.com/ava-labs/coreth/sync/syncutils" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" "github.com/stretchr/testify/assert" ) diff --git a/sync/handlers/test_providers.go b/sync/handlers/test_providers.go index 81dafbfd00..a16410d71a 100644 --- a/sync/handlers/test_providers.go +++ b/sync/handlers/test_providers.go @@ -6,7 +6,7 @@ package handlers import ( "github.com/ava-labs/coreth/core/state/snapshot" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var ( diff --git a/sync/statesync/code_syncer.go b/sync/statesync/code_syncer.go index 97164b2658..196fefea58 100644 --- a/sync/statesync/code_syncer.go +++ b/sync/statesync/code_syncer.go @@ -14,8 +14,8 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/plugin/evm/message" statesyncclient "github.com/ava-labs/coreth/sync/client" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) const ( diff --git a/sync/statesync/code_syncer_test.go b/sync/statesync/code_syncer_test.go index 574290e286..c1741760d4 100644 --- a/sync/statesync/code_syncer_test.go +++ b/sync/statesync/code_syncer_test.go @@ -14,9 +14,9 @@ import ( statesyncclient "github.com/ava-labs/coreth/sync/client" "github.com/ava-labs/coreth/sync/handlers" handlerstats "github.com/ava-labs/coreth/sync/handlers/stats" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb/memorydb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb/memorydb" "github.com/stretchr/testify/assert" ) diff --git a/sync/statesync/state_syncer.go b/sync/statesync/state_syncer.go index ec8b138863..be22b6f59c 100644 --- a/sync/statesync/state_syncer.go +++ b/sync/statesync/state_syncer.go @@ -11,8 +11,8 @@ import ( "github.com/ava-labs/coreth/core/state/snapshot" syncclient "github.com/ava-labs/coreth/sync/client" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" "golang.org/x/sync/errgroup" ) diff --git a/sync/statesync/sync_helpers.go b/sync/statesync/sync_helpers.go index a6ff02c90d..f73e963495 100644 --- a/sync/statesync/sync_helpers.go +++ b/sync/statesync/sync_helpers.go @@ -7,8 +7,8 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) // writeAccountSnapshot stores the account represented by [acc] to the snapshot at [accHash], using diff --git a/sync/statesync/sync_test.go b/sync/statesync/sync_test.go index 31b2518187..456a1b06c1 100644 --- a/sync/statesync/sync_test.go +++ b/sync/statesync/sync_test.go @@ -23,10 +23,10 @@ import ( "github.com/ava-labs/coreth/sync/syncutils" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/rlp" "github.com/stretchr/testify/assert" ) diff --git a/sync/statesync/test_sync.go b/sync/statesync/test_sync.go index 0a5ec45164..75277c5d05 100644 --- a/sync/statesync/test_sync.go +++ b/sync/statesync/test_sync.go @@ -13,10 +13,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/sync/syncutils" "github.com/ava-labs/coreth/triedb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/rlp" "github.com/stretchr/testify/assert" ) diff --git a/sync/statesync/trie_queue.go b/sync/statesync/trie_queue.go index 3ec7c87a49..3c8f3abf23 100644 --- a/sync/statesync/trie_queue.go +++ b/sync/statesync/trie_queue.go @@ -5,8 +5,8 @@ package statesync import ( "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) // trieQueue persists storage trie roots with their associated diff --git a/sync/statesync/trie_segments.go b/sync/statesync/trie_segments.go index b992cd868b..7a685b71ca 100644 --- a/sync/statesync/trie_segments.go +++ b/sync/statesync/trie_segments.go @@ -16,9 +16,9 @@ import ( syncclient "github.com/ava-labs/coreth/sync/client" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/sync/statesync/trie_sync_stats.go b/sync/statesync/trie_sync_stats.go index c55fc8da35..3bf124d55d 100644 --- a/sync/statesync/trie_sync_stats.go +++ b/sync/statesync/trie_sync_stats.go @@ -11,8 +11,8 @@ import ( utils_math "github.com/ava-labs/avalanchego/utils/math" "github.com/ava-labs/avalanchego/utils/timer" "github.com/ava-labs/coreth/metrics" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/sync/statesync/trie_sync_tasks.go b/sync/statesync/trie_sync_tasks.go index 0c7cad4239..5cb78ee982 100644 --- a/sync/statesync/trie_sync_tasks.go +++ b/sync/statesync/trie_sync_tasks.go @@ -10,10 +10,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/sync/syncutils" "github.com/ava-labs/coreth/trie" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) var ( diff --git a/sync/syncutils/iterators.go b/sync/syncutils/iterators.go index 2ae6bfcc80..c15409d96e 100644 --- a/sync/syncutils/iterators.go +++ b/sync/syncutils/iterators.go @@ -6,7 +6,7 @@ package syncutils import ( "github.com/ava-labs/coreth/core/state/snapshot" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/ethdb" ) var ( diff --git a/sync/syncutils/test_trie.go b/sync/syncutils/test_trie.go index b66e53e905..6de3504100 100644 --- a/sync/syncutils/test_trie.go +++ b/sync/syncutils/test_trie.go @@ -17,9 +17,9 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/holiman/uint256" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/rlp" "github.com/stretchr/testify/assert" ) diff --git a/tests/rlp_test_util.go b/tests/rlp_test_util.go index 5af235bc5a..b5df73438e 100644 --- a/tests/rlp_test_util.go +++ b/tests/rlp_test_util.go @@ -34,7 +34,7 @@ import ( "math/big" "strings" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/rlp" ) // RLPTest is the JSON structure of a single RLP test. diff --git a/tests/state_test_util.go b/tests/state_test_util.go index dc3dcb1ea4..af5edf5886 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -34,8 +34,8 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" "github.com/holiman/uint256" ) diff --git a/trie/committer.go b/trie/committer.go index 0480a8e115..5abf11b506 100644 --- a/trie/committer.go +++ b/trie/committer.go @@ -30,7 +30,7 @@ import ( "fmt" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // committer is the tool used for the trie Commit operation. The committer will diff --git a/trie/database_test.go b/trie/database_test.go index 9eb9bf6f29..231c7f9677 100644 --- a/trie/database_test.go +++ b/trie/database_test.go @@ -31,8 +31,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/triedb/database" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) // testReader implements database.Reader interface, providing function to diff --git a/trie/errors.go b/trie/errors.go index 307a5f8747..a39fb9baf9 100644 --- a/trie/errors.go +++ b/trie/errors.go @@ -30,7 +30,7 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // ErrCommitted is returned when a already committed trie is requested for usage. diff --git a/trie/hasher.go b/trie/hasher.go index d281547e11..72e4fe8384 100644 --- a/trie/hasher.go +++ b/trie/hasher.go @@ -29,8 +29,8 @@ package trie import ( "sync" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "golang.org/x/crypto/sha3" ) diff --git a/trie/iterator.go b/trie/iterator.go index d590b66b24..d174dae0b3 100644 --- a/trie/iterator.go +++ b/trie/iterator.go @@ -32,7 +32,7 @@ import ( "errors" "github.com/ava-labs/coreth/core/types" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // NodeResolver is used for looking up trie nodes before reaching into the real diff --git a/trie/iterator_test.go b/trie/iterator_test.go index 966f689c2a..3219d93502 100644 --- a/trie/iterator_test.go +++ b/trie/iterator_test.go @@ -35,8 +35,8 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) func TestEmptyIterator(t *testing.T) { diff --git a/trie/node.go b/trie/node.go index 8a8bc3ad1a..523a7b3497 100644 --- a/trie/node.go +++ b/trie/node.go @@ -31,8 +31,8 @@ import ( "io" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" ) var indices = []string{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "[17]"} diff --git a/trie/node_enc.go b/trie/node_enc.go index dc053e1070..6cd6aba3c9 100644 --- a/trie/node_enc.go +++ b/trie/node_enc.go @@ -27,7 +27,7 @@ package trie import ( - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/rlp" ) func nodeToBytes(n node) []byte { diff --git a/trie/node_test.go b/trie/node_test.go index 4671b798de..51dd126bde 100644 --- a/trie/node_test.go +++ b/trie/node_test.go @@ -30,8 +30,8 @@ import ( "bytes" "testing" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" ) func newTestFullNode(v []byte) []interface{} { diff --git a/trie/proof.go b/trie/proof.go index 4bedbf0bc6..0b2ee57796 100644 --- a/trie/proof.go +++ b/trie/proof.go @@ -31,9 +31,9 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // Prove constructs a merkle proof for key. The result contains all encoded nodes diff --git a/trie/proof_test.go b/trie/proof_test.go index 3fb0ba363d..c266dc2595 100644 --- a/trie/proof_test.go +++ b/trie/proof_test.go @@ -35,9 +35,9 @@ import ( "testing" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb/memorydb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb/memorydb" "golang.org/x/exp/slices" ) diff --git a/trie/secure_trie.go b/trie/secure_trie.go index f47c49bf8b..887ddd4090 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -30,8 +30,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/triedb/database" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" ) // SecureTrie is the old name of StateTrie. diff --git a/trie/secure_trie_test.go b/trie/secure_trie_test.go index 440910b89b..222552cbdd 100644 --- a/trie/secure_trie_test.go +++ b/trie/secure_trie_test.go @@ -36,8 +36,8 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) func newEmptySecure() *StateTrie { diff --git a/trie/stacktrie.go b/trie/stacktrie.go index a191252dbb..a972dcccaf 100644 --- a/trie/stacktrie.go +++ b/trie/stacktrie.go @@ -33,8 +33,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/metrics" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/trie/stacktrie_fuzzer_test.go b/trie/stacktrie_fuzzer_test.go index ec5006df8f..391c0a6c83 100644 --- a/trie/stacktrie_fuzzer_test.go +++ b/trie/stacktrie_fuzzer_test.go @@ -25,8 +25,8 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "golang.org/x/crypto/sha3" "golang.org/x/exp/slices" ) diff --git a/trie/stacktrie_test.go b/trie/stacktrie_test.go index b68f6e1b2c..9131b2fea2 100644 --- a/trie/stacktrie_test.go +++ b/trie/stacktrie_test.go @@ -34,8 +34,8 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/trie/testutil" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/assert" "golang.org/x/exp/slices" ) diff --git a/trie/sync_test.go b/trie/sync_test.go index b11c69f754..ca4fcc9c26 100644 --- a/trie/sync_test.go +++ b/trie/sync_test.go @@ -32,8 +32,8 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) // makeTestTrie create a sample test trie to test node-wise reconstruction. diff --git a/trie/testutil/utils.go b/trie/testutil/utils.go index 9f6e6fac87..f3166c1ca9 100644 --- a/trie/testutil/utils.go +++ b/trie/testutil/utils.go @@ -32,8 +32,8 @@ import ( mrand "math/rand" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" ) // Prng is a pseudo random number generator seeded by strong randomness. diff --git a/trie/tracer.go b/trie/tracer.go index 5786af4d3e..c2b88699a7 100644 --- a/trie/tracer.go +++ b/trie/tracer.go @@ -17,7 +17,7 @@ package trie import ( - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // tracer tracks the changes of trie nodes. During the trie operations, diff --git a/trie/tracer_test.go b/trie/tracer_test.go index 89460a5f03..f0c1cfc88d 100644 --- a/trie/tracer_test.go +++ b/trie/tracer_test.go @@ -23,7 +23,7 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) var ( diff --git a/trie/trie.go b/trie/trie.go index f12a4d0f6e..c3927cc517 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -35,8 +35,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/triedb/database" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // Trie is a Merkle Patricia Trie. Use New to create a trie that sits on diff --git a/trie/trie_id.go b/trie/trie_id.go index b3ba417dcc..2cab016e4d 100644 --- a/trie/trie_id.go +++ b/trie/trie_id.go @@ -26,7 +26,7 @@ package trie -import "github.com/ethereum/go-ethereum/common" +import "github.com/ava-labs/libevm/common" // ID is the identifier for uniquely identifying a trie. type ID struct { diff --git a/trie/trie_reader.go b/trie/trie_reader.go index 0b5e8a6cf9..1341b9fe33 100644 --- a/trie/trie_reader.go +++ b/trie/trie_reader.go @@ -30,8 +30,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/triestate" "github.com/ava-labs/coreth/triedb/database" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // trieReader is a wrapper of the underlying node reader. It's not safe diff --git a/trie/trie_test.go b/trie/trie_test.go index 61014feb70..ba62047709 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -42,11 +42,11 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/rlp" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rlp" "github.com/holiman/uint256" "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" diff --git a/trie/trienode/node.go b/trie/trienode/node.go index 95315c2e9a..8bd0a18ba3 100644 --- a/trie/trienode/node.go +++ b/trie/trienode/node.go @@ -21,7 +21,7 @@ import ( "sort" "strings" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // Node is a wrapper which contains the encoded blob of the trie node and its diff --git a/trie/triestate/state.go b/trie/triestate/state.go index 75c4e0bd69..9bdc7bb9e8 100644 --- a/trie/triestate/state.go +++ b/trie/triestate/state.go @@ -33,9 +33,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "golang.org/x/crypto/sha3" ) diff --git a/trie/utils/verkle.go b/trie/utils/verkle.go index 7f46409852..0287a7d879 100644 --- a/trie/utils/verkle.go +++ b/trie/utils/verkle.go @@ -21,8 +21,8 @@ import ( "sync" "github.com/ava-labs/coreth/metrics" + "github.com/ava-labs/libevm/common/lru" "github.com/crate-crypto/go-ipa/bandersnatch/fr" - "github.com/ethereum/go-ethereum/common/lru" "github.com/gballet/go-verkle" "github.com/holiman/uint256" ) diff --git a/trie/verkle.go b/trie/verkle.go index 82cef89c0e..7c6eed0f43 100644 --- a/trie/verkle.go +++ b/trie/verkle.go @@ -25,8 +25,8 @@ import ( "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/utils" "github.com/ava-labs/coreth/triedb/database" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" "github.com/gballet/go-verkle" "github.com/holiman/uint256" ) diff --git a/trie/verkle_test.go b/trie/verkle_test.go index 2f45a8ef9a..cd21b57d15 100644 --- a/trie/verkle_test.go +++ b/trie/verkle_test.go @@ -24,7 +24,7 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/holiman/uint256" ) diff --git a/triedb/database.go b/triedb/database.go index 7421b74cf0..a27ba9988f 100644 --- a/triedb/database.go +++ b/triedb/database.go @@ -25,9 +25,9 @@ import ( "github.com/ava-labs/coreth/triedb/database" "github.com/ava-labs/coreth/triedb/hashdb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // Config defines all necessary options for database. diff --git a/triedb/database/database.go b/triedb/database/database.go index 18a8f454e2..44d841016b 100644 --- a/triedb/database/database.go +++ b/triedb/database/database.go @@ -17,7 +17,7 @@ package database import ( - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // Reader wraps the Node method of a backing trie reader. diff --git a/triedb/hashdb/database.go b/triedb/hashdb/database.go index 11efee0fb8..5ff72aef5c 100644 --- a/triedb/hashdb/database.go +++ b/triedb/hashdb/database.go @@ -39,10 +39,10 @@ import ( "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" "github.com/ava-labs/coreth/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) const ( diff --git a/triedb/pathdb/database.go b/triedb/pathdb/database.go index c4dd69cfcb..88d63c8ec2 100644 --- a/triedb/pathdb/database.go +++ b/triedb/pathdb/database.go @@ -37,9 +37,9 @@ import ( "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) const ( diff --git a/triedb/pathdb/database_test.go b/triedb/pathdb/database_test.go index 477cc86625..d7700fdea1 100644 --- a/triedb/pathdb/database_test.go +++ b/triedb/pathdb/database_test.go @@ -38,9 +38,9 @@ import ( "github.com/ava-labs/coreth/trie/testutil" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" "github.com/stretchr/testify/require" ) diff --git a/triedb/pathdb/difflayer.go b/triedb/pathdb/difflayer.go index 5294ef3fb9..dbe8dd63fc 100644 --- a/triedb/pathdb/difflayer.go +++ b/triedb/pathdb/difflayer.go @@ -32,8 +32,8 @@ import ( "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/log" ) // diffLayer represents a collection of modifications made to the in-memory tries diff --git a/triedb/pathdb/difflayer_test.go b/triedb/pathdb/difflayer_test.go index 9d4022aa95..05ffca3314 100644 --- a/triedb/pathdb/difflayer_test.go +++ b/triedb/pathdb/difflayer_test.go @@ -33,7 +33,7 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/trie/testutil" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) func emptyLayer() *diskLayer { diff --git a/triedb/pathdb/disklayer.go b/triedb/pathdb/disklayer.go index b20e2118f1..2d645c3e40 100644 --- a/triedb/pathdb/disklayer.go +++ b/triedb/pathdb/disklayer.go @@ -35,9 +35,9 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" "golang.org/x/crypto/sha3" ) diff --git a/triedb/pathdb/errors.go b/triedb/pathdb/errors.go index af6e3464d2..6186091e30 100644 --- a/triedb/pathdb/errors.go +++ b/triedb/pathdb/errors.go @@ -30,8 +30,8 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/hexutil" ) var ( diff --git a/triedb/pathdb/history.go b/triedb/pathdb/history.go index 368bfeb869..ab72fcf958 100644 --- a/triedb/pathdb/history.go +++ b/triedb/pathdb/history.go @@ -33,7 +33,7 @@ import ( "fmt" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "golang.org/x/exp/slices" ) diff --git a/triedb/pathdb/history_test.go b/triedb/pathdb/history_test.go index a2fe352187..3bf5f7cf0e 100644 --- a/triedb/pathdb/history_test.go +++ b/triedb/pathdb/history_test.go @@ -34,8 +34,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/testutil" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/rlp" ) // randomStateSet generates a random state change set. diff --git a/triedb/pathdb/journal.go b/triedb/pathdb/journal.go index 13f368cac4..e7156157fa 100644 --- a/triedb/pathdb/journal.go +++ b/triedb/pathdb/journal.go @@ -37,10 +37,10 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" ) var ( diff --git a/triedb/pathdb/layertree.go b/triedb/pathdb/layertree.go index 4ba9a8d0c1..ec78876da1 100644 --- a/triedb/pathdb/layertree.go +++ b/triedb/pathdb/layertree.go @@ -34,7 +34,7 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // layerTree is a group of state layers identified by the state root. diff --git a/triedb/pathdb/nodebuffer.go b/triedb/pathdb/nodebuffer.go index 178e40821e..71dc809021 100644 --- a/triedb/pathdb/nodebuffer.go +++ b/triedb/pathdb/nodebuffer.go @@ -33,10 +33,10 @@ import ( "github.com/VictoriaMetrics/fastcache" "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" + "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/libevm/log" ) // nodebuffer is a collection of modified trie nodes to aggregate the disk diff --git a/triedb/pathdb/testutils.go b/triedb/pathdb/testutils.go index 395e250f7d..27abed8aad 100644 --- a/triedb/pathdb/testutils.go +++ b/triedb/pathdb/testutils.go @@ -33,8 +33,8 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/crypto" "golang.org/x/exp/slices" ) diff --git a/triedb/preimages.go b/triedb/preimages.go index adb3857ab3..538c05163e 100644 --- a/triedb/preimages.go +++ b/triedb/preimages.go @@ -30,8 +30,8 @@ import ( "sync" "github.com/ava-labs/coreth/core/rawdb" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/ethdb" ) const defaultPreimagesLimit = 4 * 1024 * 1024 // 4 MB diff --git a/utils/address_range.go b/utils/address_range.go index 940c39e8a1..a10794f03d 100644 --- a/utils/address_range.go +++ b/utils/address_range.go @@ -6,7 +6,7 @@ package utils import ( "bytes" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" ) // AddressRange represents a continuous range of addresses diff --git a/utils/bytes.go b/utils/bytes.go index 54258b20f4..86382cf156 100644 --- a/utils/bytes.go +++ b/utils/bytes.go @@ -3,7 +3,7 @@ package utils -import "github.com/ethereum/go-ethereum/common" +import "github.com/ava-labs/libevm/common" // IncrOne increments bytes value by one func IncrOne(bytes []byte) { diff --git a/utils/bytes_test.go b/utils/bytes_test.go index b1bbc8fa6b..7b4fc9d05c 100644 --- a/utils/bytes_test.go +++ b/utils/bytes_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/ava-labs/avalanchego/utils" - "github.com/ethereum/go-ethereum/common" + "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/warp/aggregator/aggregator.go b/warp/aggregator/aggregator.go index 9c6c3aa322..9cc66fae38 100644 --- a/warp/aggregator/aggregator.go +++ b/warp/aggregator/aggregator.go @@ -7,7 +7,7 @@ import ( "context" "fmt" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" "github.com/ava-labs/avalanchego/utils/crypto/bls" "github.com/ava-labs/avalanchego/utils/set" diff --git a/warp/backend.go b/warp/backend.go index d35c96b8fb..77167f3fd8 100644 --- a/warp/backend.go +++ b/warp/backend.go @@ -15,7 +15,7 @@ import ( "github.com/ava-labs/avalanchego/snow/consensus/snowman" avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp" "github.com/ava-labs/avalanchego/vms/platformvm/warp/payload" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) var ( diff --git a/warp/client.go b/warp/client.go index 90633d6b47..55d99621a4 100644 --- a/warp/client.go +++ b/warp/client.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/coreth/rpc" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ava-labs/libevm/common/hexutil" ) var _ Client = (*client)(nil) diff --git a/warp/handlers/signature_request.go b/warp/handlers/signature_request.go index bb9c2c7855..9a5dbfd77f 100644 --- a/warp/handlers/signature_request.go +++ b/warp/handlers/signature_request.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/utils/crypto/bls" "github.com/ava-labs/coreth/plugin/evm/message" "github.com/ava-labs/coreth/warp" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/log" ) // SignatureRequestHandler serves warp signature requests. It is a peer.RequestHandler for message.MessageSignatureRequest. diff --git a/warp/service.go b/warp/service.go index 01123950ff..6b16354a70 100644 --- a/warp/service.go +++ b/warp/service.go @@ -15,8 +15,8 @@ import ( "github.com/ava-labs/coreth/peer" "github.com/ava-labs/coreth/warp/aggregator" warpValidators "github.com/ava-labs/coreth/warp/validators" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/log" + "github.com/ava-labs/libevm/common/hexutil" + "github.com/ava-labs/libevm/log" ) var errNoValidators = errors.New("cannot aggregate signatures from subnet with no validators") From 325b599e4744edeb2312a0167fdb05eac08f2c55 Mon Sep 17 00:00:00 2001 From: Michael Kaplan Date: Fri, 31 Jan 2025 14:16:12 -0500 Subject: [PATCH 2/4] Update avalanchego dependency commit --- go.mod | 3 +-- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b9a215fbc3..1f1758ea1d 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22.8 require ( github.com/VictoriaMetrics/fastcache v1.12.1 - github.com/ava-labs/avalanchego v1.12.3-warp-verify4 + github.com/ava-labs/avalanchego v1.12.3-0.20250131191339-c06a47b7c476 github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2 github.com/cespare/cp v0.1.0 github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 @@ -69,7 +69,6 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/ethereum/go-ethereum v1.13.14 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/go.sum b/go.sum index 58165b3a49..0a288d47a2 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,8 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.12.3-warp-verify4 h1:8YsFAZUC7PyvgZVpZe+kwpHBa7p1e3pDedS8/NeXQhU= -github.com/ava-labs/avalanchego v1.12.3-warp-verify4/go.mod h1:Er2qCyxI4qQKDlNjwwWdOa+/cxCbuEy/z8WgxtXy0N0= +github.com/ava-labs/avalanchego v1.12.3-0.20250131191339-c06a47b7c476 h1:HM8PRmYwUzoLsGmZy+muzOSXXL0kI+h2gFzt5CLT57E= +github.com/ava-labs/avalanchego v1.12.3-0.20250131191339-c06a47b7c476/go.mod h1:owaDVdBN5G/eBQ1oM6OCAUbfSOy6Nyt0mHHpVui8kPo= github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2 h1:CVbn0hSsPCl6gCkTCnqwuN4vtJgdVbkCqLXzYAE7qF8= github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2/go.mod h1:yBctIV/wnxXTF38h95943jvpuk4aj07TrjbpoGor6LQ= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= @@ -171,8 +171,6 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= -github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= From 7d058fd301ff046c38a572e3d2a30c7f1f7011df Mon Sep 17 00:00:00 2001 From: Michael Kaplan Date: Fri, 31 Jan 2025 16:11:26 -0500 Subject: [PATCH 3/4] Set AvalancheGo commit to d371bb13 --- scripts/versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/versions.sh b/scripts/versions.sh index 12aed7d162..7ec45e51d8 100644 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -6,4 +6,4 @@ set -euo pipefail # Don't export them as they're used in the context of other calls -AVALANCHE_VERSION=${AVALANCHE_VERSION:-'2eea9338'} +AVALANCHE_VERSION=${AVALANCHE_VERSION:-'d371bb13'} From 913a85e87be66e15cc440045d097e74f61886c98 Mon Sep 17 00:00:00 2001 From: Michael Kaplan Date: Fri, 31 Jan 2025 16:39:28 -0500 Subject: [PATCH 4/4] Set AvalancheGo commit to d371bb13 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1f1758ea1d..6ada1be5f2 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22.8 require ( github.com/VictoriaMetrics/fastcache v1.12.1 - github.com/ava-labs/avalanchego v1.12.3-0.20250131191339-c06a47b7c476 + github.com/ava-labs/avalanchego v1.12.3-0.20250131211040-d371bb1395f4 github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2 github.com/cespare/cp v0.1.0 github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 diff --git a/go.sum b/go.sum index 0a288d47a2..37cc307784 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,8 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.12.3-0.20250131191339-c06a47b7c476 h1:HM8PRmYwUzoLsGmZy+muzOSXXL0kI+h2gFzt5CLT57E= -github.com/ava-labs/avalanchego v1.12.3-0.20250131191339-c06a47b7c476/go.mod h1:owaDVdBN5G/eBQ1oM6OCAUbfSOy6Nyt0mHHpVui8kPo= +github.com/ava-labs/avalanchego v1.12.3-0.20250131211040-d371bb1395f4 h1:Azvy8c0fjWVQXvDGLmFnTR9fQ4Ro5vUnxL6DEaXeshk= +github.com/ava-labs/avalanchego v1.12.3-0.20250131211040-d371bb1395f4/go.mod h1:owaDVdBN5G/eBQ1oM6OCAUbfSOy6Nyt0mHHpVui8kPo= github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2 h1:CVbn0hSsPCl6gCkTCnqwuN4vtJgdVbkCqLXzYAE7qF8= github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2/go.mod h1:yBctIV/wnxXTF38h95943jvpuk4aj07TrjbpoGor6LQ= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=