diff --git a/core/blockchain.go b/core/blockchain.go index bd2eb66727..77b15fad49 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -52,12 +52,12 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" "github.com/ava-labs/coreth/triedb/pathdb" - "github.com/ava-labs/libevm/metrics" "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/ethereum/go-ethereum/metrics" ) var ( diff --git a/core/main_test.go b/core/main_test.go index 6ea70c4b6c..db4ccc8652 100644 --- a/core/main_test.go +++ b/core/main_test.go @@ -15,7 +15,7 @@ func TestMain(m *testing.M) { opts := []goleak.Option{ // No good way to shut down these goroutines: goleak.IgnoreTopFunction("github.com/ava-labs/coreth/core/state/snapshot.(*diskLayer).generate"), - goleak.IgnoreTopFunction("github.com/ava-labs/libevm/metrics.(*meterArbiter).tick"), + goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/metrics.(*meterArbiter).tick"), goleak.IgnoreTopFunction("github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain"), } goleak.VerifyTestMain(m, opts...) diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index 8d79dbc1c4..53fe9ac15f 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -32,9 +32,9 @@ import ( "encoding/binary" "github.com/ava-labs/avalanchego/utils/wrappers" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/metrics" ) // The fields below define the low level database schema prefixing. diff --git a/core/state/metrics.go b/core/state/metrics.go index 4fbc86c2f5..096bfe504f 100644 --- a/core/state/metrics.go +++ b/core/state/metrics.go @@ -26,7 +26,7 @@ package state -import "github.com/ava-labs/libevm/metrics" +import "github.com/ethereum/go-ethereum/metrics" var ( accountUpdatedMeter = metrics.NewRegisteredMeter("state/update/account", nil) diff --git a/core/state/snapshot/snapshot.go b/core/state/snapshot/snapshot.go index d7ed3e22c0..7177f2c918 100644 --- a/core/state/snapshot/snapshot.go +++ b/core/state/snapshot/snapshot.go @@ -37,10 +37,10 @@ import ( "github.com/ava-labs/coreth/core/rawdb" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/triedb" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" ) const ( diff --git a/core/state/state_object.go b/core/state/state_object.go index ed3f16ff9e..36aff41ba6 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -35,9 +35,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/trie/trienode" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rlp" "github.com/holiman/uint256" ) diff --git a/core/state/statedb.go b/core/state/statedb.go index e38417f848..4031c7ebd8 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -42,10 +42,10 @@ import ( "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" "github.com/ava-labs/coreth/utils" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" "github.com/holiman/uint256" ) diff --git a/core/state/trie_prefetcher.go b/core/state/trie_prefetcher.go index b82edf5be7..f700010d46 100644 --- a/core/state/trie_prefetcher.go +++ b/core/state/trie_prefetcher.go @@ -20,9 +20,9 @@ import ( "sync" "github.com/ava-labs/coreth/libevm/options" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" ) var ( diff --git a/core/state/trie_prefetcher_extra_test.go b/core/state/trie_prefetcher_extra_test.go index 968f9916fc..0087678a79 100644 --- a/core/state/trie_prefetcher_extra_test.go +++ b/core/state/trie_prefetcher_extra_test.go @@ -18,9 +18,9 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/metrics" "github.com/stretchr/testify/require" ) diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 573ffa92ac..27f81faed5 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -46,10 +46,10 @@ import ( "github.com/ava-labs/coreth/core/txpool" "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rlp" "github.com/holiman/billy" "github.com/holiman/uint256" diff --git a/core/txpool/blobpool/metrics.go b/core/txpool/blobpool/metrics.go index ccd4dbb574..0192e897aa 100644 --- a/core/txpool/blobpool/metrics.go +++ b/core/txpool/blobpool/metrics.go @@ -26,7 +26,7 @@ package blobpool -import "github.com/ava-labs/libevm/metrics" +import "github.com/ethereum/go-ethereum/metrics" var ( // datacapGauge tracks the user's configured capacity for the blob pool. It diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index e4b135b48b..8f4a31427e 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -43,11 +43,11 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/coreth/params" "github.com/ava-labs/coreth/utils" - "github.com/ava-labs/libevm/metrics" "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/ethereum/go-ethereum/metrics" "github.com/holiman/uint256" ) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 7cfa58d3ef..71b6ad3c96 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -35,10 +35,10 @@ import ( "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/core/types" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" ) var ( diff --git a/go.mod b/go.mod index aaa594ba66..31f1468aeb 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.22.8 require ( github.com/VictoriaMetrics/fastcache v1.12.1 github.com/ava-labs/avalanchego v1.12.2-0.20250106102004-902377d447ba - github.com/ava-labs/libevm v1.13.14-0.1.0-rc.1 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 diff --git a/go.sum b/go.sum index 8fcf8b06e8..9c19c061be 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,6 @@ 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.2-0.20250106102004-902377d447ba h1:7t2ORGM53sqdsczNZGFQIK99of9yeetCld90keJ47Os= github.com/ava-labs/avalanchego v1.12.2-0.20250106102004-902377d447ba/go.mod h1:oK/C7ZGo5cAEayBKBoawh2EpOo3E9gD1rpd9NAM0RkQ= -github.com/ava-labs/libevm v1.13.14-0.1.0-rc.1 h1:ughW0E2DUNRnvwJYNU8zUSCUzIWdcOwyXSBpy7oauZE= -github.com/ava-labs/libevm v1.13.14-0.1.0-rc.1/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= diff --git a/metrics/prometheus/prometheus.go b/metrics/prometheus/prometheus.go index d1edcf95ea..772260a095 100644 --- a/metrics/prometheus/prometheus.go +++ b/metrics/prometheus/prometheus.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" dto "github.com/prometheus/client_model/go" ) diff --git a/metrics/prometheus/prometheus_test.go b/metrics/prometheus/prometheus_test.go index 2feba6f079..f87975da36 100644 --- a/metrics/prometheus/prometheus_test.go +++ b/metrics/prometheus/prometheus_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) func TestGatherer_Gather(t *testing.T) { diff --git a/peer/peer_tracker.go b/peer/peer_tracker.go index 30f73d854d..ca11a4faf6 100644 --- a/peer/peer_tracker.go +++ b/peer/peer_tracker.go @@ -15,7 +15,7 @@ import ( "github.com/ethereum/go-ethereum/log" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) const ( diff --git a/peer/stats/stats.go b/peer/stats/stats.go index 5a3c2918f4..a23772540c 100644 --- a/peer/stats/stats.go +++ b/peer/stats/stats.go @@ -6,7 +6,7 @@ package stats import ( "time" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) // RequestHandlerStats provides the interface for metrics for app requests. diff --git a/plugin/evm/atomic/mempool.go b/plugin/evm/atomic/mempool.go index 83e668077b..f84dcf1840 100644 --- a/plugin/evm/atomic/mempool.go +++ b/plugin/evm/atomic/mempool.go @@ -15,8 +15,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/ava-labs/coreth/plugin/evm/config" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" ) const ( diff --git a/plugin/evm/network_handler.go b/plugin/evm/network_handler.go index a461122cf6..6d9a282b7f 100644 --- a/plugin/evm/network_handler.go +++ b/plugin/evm/network_handler.go @@ -14,8 +14,8 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/warp" warpHandlers "github.com/ava-labs/coreth/warp/handlers" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/metrics" ) var _ message.RequestHandler = &networkHandler{} diff --git a/plugin/evm/syncervm_test.go b/plugin/evm/syncervm_test.go index 2daac81701..ba0d05ac38 100644 --- a/plugin/evm/syncervm_test.go +++ b/plugin/evm/syncervm_test.go @@ -41,10 +41,10 @@ import ( "github.com/ava-labs/coreth/sync/statesync" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/triedb" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rlp" ) diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index f367989838..e7770c1e5a 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -45,7 +45,7 @@ import ( "github.com/ava-labs/coreth/triedb" "github.com/ava-labs/coreth/triedb/hashdb" "github.com/ava-labs/coreth/utils" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" warpcontract "github.com/ava-labs/coreth/precompile/contracts/warp" "github.com/ava-labs/coreth/rpc" diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go index a1af9a6b65..28796ab8cc 100644 --- a/plugin/evm/vm_test.go +++ b/plugin/evm/vm_test.go @@ -27,7 +27,7 @@ import ( "github.com/ava-labs/coreth/plugin/evm/config" "github.com/ava-labs/coreth/trie" "github.com/ava-labs/coreth/utils" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/rpc/handler.go b/rpc/handler.go index cabbd10cde..82d1235ab1 100644 --- a/rpc/handler.go +++ b/rpc/handler.go @@ -38,8 +38,8 @@ import ( "sync" "time" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" "golang.org/x/time/rate" ) diff --git a/rpc/metrics.go b/rpc/metrics.go index a4469545d7..bafdcf591c 100644 --- a/rpc/metrics.go +++ b/rpc/metrics.go @@ -30,7 +30,7 @@ import ( "fmt" "time" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) var ( diff --git a/scripts/geth-allowed-packages.txt b/scripts/geth-allowed-packages.txt index c295d5d044..4b84961061 100644 --- a/scripts/geth-allowed-packages.txt +++ b/scripts/geth-allowed-packages.txt @@ -17,4 +17,6 @@ "github.com/ethereum/go-ethereum/ethdb/pebble" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" +"github.com/ethereum/go-ethereum/metrics" +"github.com/ethereum/go-ethereum/metrics.(*meterArbiter).tick" "github.com/ethereum/go-ethereum/rlp" diff --git a/sync/client/stats/stats.go b/sync/client/stats/stats.go index 2be86a1d16..0bd47ce96d 100644 --- a/sync/client/stats/stats.go +++ b/sync/client/stats/stats.go @@ -8,7 +8,7 @@ import ( "time" "github.com/ava-labs/coreth/plugin/evm/message" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) var ( diff --git a/sync/handlers/stats/stats.go b/sync/handlers/stats/stats.go index 0d1171b82b..d6e3271911 100644 --- a/sync/handlers/stats/stats.go +++ b/sync/handlers/stats/stats.go @@ -6,7 +6,7 @@ package stats import ( "time" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) // HandlerStats reports prometheus metrics for the state sync handlers diff --git a/sync/statesync/trie_sync_stats.go b/sync/statesync/trie_sync_stats.go index 5083b590f9..4cc6a0c5b2 100644 --- a/sync/statesync/trie_sync_stats.go +++ b/sync/statesync/trie_sync_stats.go @@ -10,9 +10,9 @@ import ( utils_math "github.com/ava-labs/avalanchego/utils/math" "github.com/ava-labs/avalanchego/utils/timer" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" ) const ( diff --git a/sync/statesync/trie_sync_stats_test.go b/sync/statesync/trie_sync_stats_test.go index e2c1b0c340..1d01cd29ec 100644 --- a/sync/statesync/trie_sync_stats_test.go +++ b/sync/statesync/trie_sync_stats_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" "github.com/stretchr/testify/require" ) diff --git a/trie/stacktrie.go b/trie/stacktrie.go index 7321c4bff9..cf71416ce4 100644 --- a/trie/stacktrie.go +++ b/trie/stacktrie.go @@ -32,9 +32,9 @@ import ( "sync" "github.com/ava-labs/coreth/core/types" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" ) var ( diff --git a/trie/utils/verkle.go b/trie/utils/verkle.go index ca733d1d7e..ce059edc64 100644 --- a/trie/utils/verkle.go +++ b/trie/utils/verkle.go @@ -20,9 +20,9 @@ import ( "encoding/binary" "sync" - "github.com/ava-labs/libevm/metrics" "github.com/crate-crypto/go-ipa/bandersnatch/fr" "github.com/ethereum/go-ethereum/common/lru" + "github.com/ethereum/go-ethereum/metrics" "github.com/gballet/go-verkle" "github.com/holiman/uint256" ) diff --git a/triedb/hashdb/database.go b/triedb/hashdb/database.go index 92053ad583..d0d7bafb92 100644 --- a/triedb/hashdb/database.go +++ b/triedb/hashdb/database.go @@ -38,10 +38,10 @@ import ( "github.com/ava-labs/coreth/trie/trienode" "github.com/ava-labs/coreth/trie/triestate" "github.com/ava-labs/coreth/utils" - "github.com/ava-labs/libevm/metrics" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rlp" ) diff --git a/triedb/pathdb/metrics.go b/triedb/pathdb/metrics.go index 21038ecfc6..e2df1ca156 100644 --- a/triedb/pathdb/metrics.go +++ b/triedb/pathdb/metrics.go @@ -26,7 +26,7 @@ package pathdb -import "github.com/ava-labs/libevm/metrics" +import "github.com/ethereum/go-ethereum/metrics" // nolint: unused var ( diff --git a/utils/metered_cache.go b/utils/metered_cache.go index ee1807e36f..dfaeac7cca 100644 --- a/utils/metered_cache.go +++ b/utils/metered_cache.go @@ -9,7 +9,7 @@ import ( "time" "github.com/VictoriaMetrics/fastcache" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) // MeteredCache wraps *fastcache.Cache and periodically pulls stats from it. diff --git a/warp/handlers/signature_request_test.go b/warp/handlers/signature_request_test.go index 5b75c8627f..f4bdb7a763 100644 --- a/warp/handlers/signature_request_test.go +++ b/warp/handlers/signature_request_test.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/coreth/utils" "github.com/ava-labs/coreth/warp" "github.com/ava-labs/coreth/warp/warptest" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" "github.com/stretchr/testify/require" ) diff --git a/warp/handlers/stats.go b/warp/handlers/stats.go index 6a56d54076..d81bce0e02 100644 --- a/warp/handlers/stats.go +++ b/warp/handlers/stats.go @@ -6,7 +6,7 @@ package handlers import ( "time" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) type handlerStats struct { diff --git a/warp/verifier_backend_test.go b/warp/verifier_backend_test.go index 7ca98687a0..be4288100b 100644 --- a/warp/verifier_backend_test.go +++ b/warp/verifier_backend_test.go @@ -19,7 +19,7 @@ import ( "github.com/ava-labs/avalanchego/vms/platformvm/warp/payload" "github.com/ava-labs/coreth/utils" "github.com/ava-labs/coreth/warp/warptest" - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" ) diff --git a/warp/verifier_stats.go b/warp/verifier_stats.go index 6a47c31397..a092751e8b 100644 --- a/warp/verifier_stats.go +++ b/warp/verifier_stats.go @@ -4,7 +4,7 @@ package warp import ( - "github.com/ava-labs/libevm/metrics" + "github.com/ethereum/go-ethereum/metrics" ) type verifierStats struct {