From 0825b7815cf5ec06a87a67fccdbd6e2f3f265ecc Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Mon, 6 Oct 2025 14:32:35 +0300 Subject: [PATCH 01/19] chore(customrawdb): delete customrawdb package and switch to avalanchego imports resolves #17791 Signed-off-by: Tsvetan Dimitrov (tsvetan.dimitrov@avalabs.org) --- .github/workflows/tests.yml | 4 +- core/bench_test.go | 2 +- core/blockchain.go | 2 +- core/blockchain_repair_test.go | 2 +- core/blockchain_test.go | 2 +- core/genesis.go | 2 +- core/genesis_test.go | 2 +- core/state/pruner/pruner.go | 2 +- core/state/snapshot/disklayer_test.go | 2 +- core/state/snapshot/generate.go | 2 +- core/state/snapshot/journal.go | 2 +- core/state/snapshot/snapshot.go | 2 +- core/state/snapshot/wipe.go | 2 +- core/state/snapshot/wipe_test.go | 2 +- core/state_manager.go | 2 +- eth/api_debug.go | 2 +- eth/backend.go | 2 +- eth/filters/filter_system_test.go | 2 +- eth/filters/filter_test.go | 2 +- eth/state_accessor.go | 2 +- eth/tracers/api_extra_test.go | 2 +- eth/tracers/api_test.go | 2 +- eth/tracers/tracers_test.go | 2 +- go.mod | 104 ++++---- go.sum | 214 +++++++++-------- .../evm/customrawdb/accessors_metadata_ext.go | 155 ------------ .../evm/customrawdb/accessors_snapshot_ext.go | 47 ---- .../evm/customrawdb/accessors_state_sync.go | 223 ------------------ .../customrawdb/accessors_state_sync_test.go | 35 --- plugin/evm/customrawdb/database_ext.go | 81 ------- plugin/evm/customrawdb/database_ext_test.go | 136 ----------- plugin/evm/customrawdb/schema_ext.go | 62 ----- plugin/evm/syncervm_test.go | 2 +- plugin/evm/vm.go | 2 +- plugin/evm/vm_test.go | 2 +- sync/statesync/code_syncer.go | 2 +- sync/statesync/code_syncer_test.go | 2 +- sync/statesync/statesynctest/test_sync.go | 2 +- sync/statesync/trie_queue.go | 2 +- sync/statesync/trie_segments.go | 2 +- tests/state_test_util.go | 2 +- 41 files changed, 199 insertions(+), 924 deletions(-) delete mode 100644 plugin/evm/customrawdb/accessors_metadata_ext.go delete mode 100644 plugin/evm/customrawdb/accessors_snapshot_ext.go delete mode 100644 plugin/evm/customrawdb/accessors_state_sync.go delete mode 100644 plugin/evm/customrawdb/accessors_state_sync_test.go delete mode 100644 plugin/evm/customrawdb/database_ext.go delete mode 100644 plugin/evm/customrawdb/database_ext_test.go delete mode 100644 plugin/evm/customrawdb/schema_ext.go diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d81b18707..b164bec838 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -97,7 +97,7 @@ jobs: - name: Setup Contracts run: ./scripts/run_task.sh setup-contracts - name: Run Warp E2E Tests - uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@36baa0509d61679085d35bffa590d63732b0a7bd + uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@e6f54612a1c788bd39edebdee870721244e2055e with: run: ./scripts/run_task.sh test-e2e-warp-ci artifact_prefix: warp @@ -122,7 +122,7 @@ jobs: with: go-version-file: "go.mod" - name: Run E2E Load Tests - uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@36baa0509d61679085d35bffa590d63732b0a7bd + uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@e6f54612a1c788bd39edebdee870721244e2055e with: run: ./scripts/run_task.sh test-e2e-load-ci artifact_prefix: load diff --git a/core/bench_test.go b/core/bench_test.go index f4e8b0e5a6..97cdd55a33 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -32,6 +32,7 @@ import ( "math/big" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/math" "github.com/ava-labs/libevm/core/rawdb" @@ -42,7 +43,6 @@ import ( ethparams "github.com/ava-labs/libevm/params" "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) func BenchmarkInsertChain_empty_memdb(b *testing.B) { diff --git a/core/blockchain.go b/core/blockchain.go index 6793640e60..057614e3e3 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -41,6 +41,7 @@ import ( "sync/atomic" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/lru" "github.com/ava-labs/libevm/consensus/misc/eip4844" @@ -61,7 +62,6 @@ import ( "github.com/ava-labs/subnet-evm/internal/version" "github.com/ava-labs/subnet-evm/params" "github.com/ava-labs/subnet-evm/plugin/evm/customlogs" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/customtypes" "github.com/ava-labs/subnet-evm/triedb/firewood" "github.com/ava-labs/subnet-evm/triedb/hashdb" diff --git a/core/blockchain_repair_test.go b/core/blockchain_repair_test.go index 244dc9d4e6..5a1496325a 100644 --- a/core/blockchain_repair_test.go +++ b/core/blockchain_repair_test.go @@ -35,6 +35,7 @@ import ( "math/big" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -44,7 +45,6 @@ import ( "github.com/ava-labs/libevm/triedb" "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/stretchr/testify/require" ) diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 12d55c8c81..c37329a950 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -18,11 +18,11 @@ import ( "github.com/ava-labs/libevm/eth/tracers/logger" "github.com/ava-labs/libevm/ethdb" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/core/state/pruner" "github.com/ava-labs/subnet-evm/params" "github.com/ava-labs/subnet-evm/params/extras" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/upgrade/legacy" ethparams "github.com/ava-labs/libevm/params" diff --git a/core/genesis.go b/core/genesis.go index 00d9763ba6..bb60d574ea 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -34,6 +34,7 @@ import ( "math/big" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/hexutil" "github.com/ava-labs/libevm/common/math" @@ -49,7 +50,6 @@ import ( "github.com/ava-labs/libevm/triedb" "github.com/ava-labs/subnet-evm/core/extstate" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/customtypes" "github.com/ava-labs/subnet-evm/plugin/evm/upgrade/legacy" "github.com/ava-labs/subnet-evm/triedb/pathdb" diff --git a/core/genesis_test.go b/core/genesis_test.go index dc9d5d8cfc..a8bba522a8 100644 --- a/core/genesis_test.go +++ b/core/genesis_test.go @@ -36,6 +36,7 @@ import ( "reflect" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/state" @@ -48,7 +49,6 @@ import ( "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/params" "github.com/ava-labs/subnet-evm/params/extras" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/upgrade/legacy" "github.com/ava-labs/subnet-evm/precompile/allowlist" "github.com/ava-labs/subnet-evm/precompile/contracts/deployerallowlist" diff --git a/core/state/pruner/pruner.go b/core/state/pruner/pruner.go index 7853eb0618..7b72e38b0c 100644 --- a/core/state/pruner/pruner.go +++ b/core/state/pruner/pruner.go @@ -38,6 +38,7 @@ import ( "strings" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -47,7 +48,6 @@ import ( "github.com/ava-labs/libevm/trie" "github.com/ava-labs/libevm/triedb" "github.com/ava-labs/subnet-evm/core/state/snapshot" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) const ( diff --git a/core/state/snapshot/disklayer_test.go b/core/state/snapshot/disklayer_test.go index 7ce7d06d8c..73545d9c1b 100644 --- a/core/state/snapshot/disklayer_test.go +++ b/core/state/snapshot/disklayer_test.go @@ -31,11 +31,11 @@ import ( "bytes" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/ethdb/memorydb" "github.com/ava-labs/libevm/rlp" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) // 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 c28caca00b..3520649067 100644 --- a/core/state/snapshot/generate.go +++ b/core/state/snapshot/generate.go @@ -32,6 +32,7 @@ import ( "fmt" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -40,7 +41,6 @@ import ( "github.com/ava-labs/libevm/rlp" "github.com/ava-labs/libevm/trie" "github.com/ava-labs/libevm/triedb" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/utils" ) diff --git a/core/state/snapshot/journal.go b/core/state/snapshot/journal.go index bfc987a17d..f2c3e57a3b 100644 --- a/core/state/snapshot/journal.go +++ b/core/state/snapshot/journal.go @@ -33,13 +33,13 @@ import ( "fmt" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/ethdb" "github.com/ava-labs/libevm/log" "github.com/ava-labs/libevm/rlp" "github.com/ava-labs/libevm/triedb" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) // 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 148c641e16..dc66972d5a 100644 --- a/core/state/snapshot/snapshot.go +++ b/core/state/snapshot/snapshot.go @@ -35,6 +35,7 @@ import ( "sync" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" ethsnapshot "github.com/ava-labs/libevm/core/state/snapshot" @@ -43,7 +44,6 @@ import ( "github.com/ava-labs/libevm/log" "github.com/ava-labs/libevm/metrics" "github.com/ava-labs/libevm/triedb" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) const ( diff --git a/core/state/snapshot/wipe.go b/core/state/snapshot/wipe.go index 9f1949363b..d427231079 100644 --- a/core/state/snapshot/wipe.go +++ b/core/state/snapshot/wipe.go @@ -31,11 +31,11 @@ import ( "bytes" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/ethdb" "github.com/ava-labs/libevm/log" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) // 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 41bab9468f..b925303d91 100644 --- a/core/state/snapshot/wipe_test.go +++ b/core/state/snapshot/wipe_test.go @@ -31,10 +31,10 @@ import ( "math/rand" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/ethdb/memorydb" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) // Tests that given a database with random data content, all parts of a snapshot diff --git a/core/state_manager.go b/core/state_manager.go index 0503a39c48..d83302ffbc 100644 --- a/core/state_manager.go +++ b/core/state_manager.go @@ -30,10 +30,10 @@ package core import ( "fmt" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/types" "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) // flushWindow is the distance to the [commitInterval] when we start diff --git a/eth/api_debug.go b/eth/api_debug.go index 65fdb6fd2a..e564094d0c 100644 --- a/eth/api_debug.go +++ b/eth/api_debug.go @@ -43,8 +43,8 @@ import ( "github.com/ava-labs/libevm/rlp" "github.com/ava-labs/libevm/trie" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/internal/ethapi" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/rpc" ) diff --git a/eth/backend.go b/eth/backend.go index 51ca8eef68..82b29bbbba 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -36,6 +36,7 @@ import ( "time" "github.com/ava-labs/avalanchego/utils/timer/mockable" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/accounts" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" @@ -59,7 +60,6 @@ import ( "github.com/ava-labs/subnet-evm/miner" "github.com/ava-labs/subnet-evm/node" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/rpc" ) diff --git a/eth/filters/filter_system_test.go b/eth/filters/filter_system_test.go index 13941e266a..0f0eb69cec 100644 --- a/eth/filters/filter_system_test.go +++ b/eth/filters/filter_system_test.go @@ -38,6 +38,7 @@ import ( "testing" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" ethereum "github.com/ava-labs/libevm" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" @@ -49,7 +50,6 @@ import ( "github.com/ava-labs/subnet-evm/core/bloombits" "github.com/ava-labs/subnet-evm/internal/ethapi" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/rpc" "github.com/stretchr/testify/require" ) diff --git a/eth/filters/filter_test.go b/eth/filters/filter_test.go index f317776498..9caed97171 100644 --- a/eth/filters/filter_test.go +++ b/eth/filters/filter_test.go @@ -35,6 +35,7 @@ import ( "testing" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -45,7 +46,6 @@ import ( "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/core" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/rpc" "github.com/stretchr/testify/require" ) diff --git a/eth/state_accessor.go b/eth/state_accessor.go index f4c290cf32..d5c3605086 100644 --- a/eth/state_accessor.go +++ b/eth/state_accessor.go @@ -33,6 +33,7 @@ import ( "fmt" "time" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/state" @@ -44,7 +45,6 @@ import ( "github.com/ava-labs/subnet-evm/core" "github.com/ava-labs/subnet-evm/core/extstate" "github.com/ava-labs/subnet-evm/eth/tracers" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" ) // noopReleaser is returned in case there is no operation expected diff --git a/eth/tracers/api_extra_test.go b/eth/tracers/api_extra_test.go index 4f311b271f..868102fad9 100644 --- a/eth/tracers/api_extra_test.go +++ b/eth/tracers/api_extra_test.go @@ -20,11 +20,11 @@ import ( "github.com/ava-labs/libevm/eth/tracers/logger" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/core" "github.com/ava-labs/subnet-evm/internal/ethapi" "github.com/ava-labs/subnet-evm/params" "github.com/ava-labs/subnet-evm/params/extras" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/precompile/contracts/txallowlist" "github.com/ava-labs/subnet-evm/rpc" diff --git a/eth/tracers/api_test.go b/eth/tracers/api_test.go index 8ba2333f54..b26f4e620d 100644 --- a/eth/tracers/api_test.go +++ b/eth/tracers/api_test.go @@ -38,6 +38,7 @@ import ( "sync/atomic" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/hexutil" "github.com/ava-labs/libevm/core/rawdb" @@ -53,7 +54,6 @@ import ( "github.com/ava-labs/subnet-evm/core" "github.com/ava-labs/subnet-evm/internal/ethapi" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/rpc" "golang.org/x/exp/slices" ) diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index f28b0c0070..5268fe1554 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -31,6 +31,7 @@ import ( "math/big" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -39,7 +40,6 @@ import ( "github.com/ava-labs/libevm/eth/tracers/logger" "github.com/ava-labs/subnet-evm/core" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/tests" ) diff --git a/go.mod b/go.mod index 26410b97e9..b032eabdc3 100644 --- a/go.mod +++ b/go.mod @@ -5,10 +5,10 @@ go 1.24.7 require ( github.com/VictoriaMetrics/fastcache v1.12.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/avalanchego v1.13.6-0.20250925183853-36baa0509d61 + github.com/ava-labs/avalanchego v1.13.6-0.20251006112303-e6f54612a1c7 github.com/ava-labs/firewood-go-ethhash/ffi v0.0.12 - github.com/ava-labs/libevm v1.13.14-0.3.0.rc.7 - github.com/davecgh/go-spew v1.1.1 + github.com/ava-labs/libevm v1.13.15-0.20251002164226-35926db4d661 + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/deckarep/golang-set/v2 v2.1.0 github.com/fjl/gencodec v0.1.1 github.com/go-cmd/cmd v1.4.3 @@ -22,36 +22,39 @@ require ( github.com/mattn/go-colorable v0.1.13 github.com/mattn/go-isatty v0.0.17 github.com/onsi/ginkgo/v2 v2.13.1 - github.com/prometheus/client_golang v1.22.0 - github.com/spf13/cast v1.7.1 + github.com/prometheus/client_golang v1.23.0 + github.com/spf13/cast v1.9.2 github.com/spf13/pflag v1.0.6 github.com/spf13/viper v1.20.1 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.1 github.com/tyler-smith/go-bip39 v1.1.0 github.com/urfave/cli/v2 v2.25.7 go.uber.org/goleak v1.3.0 go.uber.org/mock v0.5.0 - go.uber.org/zap v1.26.0 - golang.org/x/crypto v0.41.0 + go.uber.org/zap v1.27.0 + golang.org/x/crypto v0.42.0 golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e golang.org/x/mod v0.28.0 - golang.org/x/sync v0.16.0 - golang.org/x/time v0.8.0 - golang.org/x/tools v0.36.0 - google.golang.org/protobuf v1.36.5 + golang.org/x/sync v0.17.0 + golang.org/x/time v0.12.0 + golang.org/x/tools v0.37.0 + google.golang.org/protobuf v1.36.8 gopkg.in/natefinch/lumberjack.v2 v2.0.0 ) require ( + connectrpc.com/connect v1.18.1 // indirect + connectrpc.com/grpcreflect v1.3.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StephenButtolph/canoto v0.17.2 // indirect - github.com/ava-labs/coreth v0.15.4-rc.3 // indirect + github.com/ava-labs/coreth v0.15.4-rc.3.0.20251002221438-a857a64c28ea // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.5 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.2 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -61,10 +64,10 @@ require ( github.com/compose-spec/compose-go v1.20.2 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/docker/go-connections v0.4.0 // indirect @@ -72,12 +75,12 @@ require ( github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/ethereum/c-kzg-4844 v1.0.0 // indirect - github.com/fsnotify/fsnotify v1.8.0 // indirect - github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/garslo/gogen v0.0.0-20230926014519-f497ca02dd4c // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/getsentry/sentry-go v0.35.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect @@ -93,12 +96,12 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect + github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect github.com/google/renameio/v2 v2.0.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect @@ -121,48 +124,49 @@ require ( github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pires/go-proxyproto v0.6.2 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.65.0 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/cors v1.7.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/sagikazarmark/locafero v0.7.0 // indirect + github.com/sagikazarmark/locafero v0.9.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect - github.com/spf13/afero v1.12.0 // indirect + github.com/spf13/afero v1.14.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.14 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/otel v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/otel v1.37.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.29.0 // indirect - go.opentelemetry.io/otel/trace v1.29.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/otel/metric v1.37.0 // indirect + go.opentelemetry.io/otel/sdk v1.37.0 // indirect + go.opentelemetry.io/otel/trace v1.37.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.43.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/term v0.34.0 // indirect - golang.org/x/text v0.28.0 // indirect - gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 // indirect - google.golang.org/grpc v1.67.3 // indirect + golang.org/x/net v0.44.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/sys v0.36.0 // indirect + golang.org/x/term v0.35.0 // indirect + golang.org/x/text v0.29.0 // indirect + gonum.org/v1/gonum v0.16.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect + google.golang.org/grpc v1.75.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 041b886d86..f5614934e7 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw= +connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= +connectrpc.com/grpcreflect v1.3.0 h1:Y4V+ACf8/vOb1XOc251Qun7jMB75gCUNw6llvB9csXc= +connectrpc.com/grpcreflect v1.3.0/go.mod h1:nfloOtCS8VUQOQ1+GTdFzVg2CJo4ZGaat8JIovCtDYs= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= @@ -24,14 +28,14 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/ava-labs/avalanchego v1.13.6-0.20250925183853-36baa0509d61 h1:jO+73dnER4I04a16ZjEM2M8L40bCXsac1vwKppRkIB8= -github.com/ava-labs/avalanchego v1.13.6-0.20250925183853-36baa0509d61/go.mod h1:xgSvWMEJjXRKXmpeH3yNs2uM4brSYiFqgPaw3c26PwY= -github.com/ava-labs/coreth v0.15.4-rc.3 h1:v33OOerxpGIKa1MpljXMBB3Yljy23xzsez3E/dn7TzY= -github.com/ava-labs/coreth v0.15.4-rc.3/go.mod h1:Esb0FK+KJr6co7rrhtBWsmSMXEL5JWelEsijlqAHdq0= +github.com/ava-labs/avalanchego v1.13.6-0.20251006112303-e6f54612a1c7 h1:XBkD1vjNPVKImSu6HUoTRd8Hqz4hpkbnfYSjc8h98CQ= +github.com/ava-labs/avalanchego v1.13.6-0.20251006112303-e6f54612a1c7/go.mod h1:yplWYV/FzAZeYAhy0yOj8wjJA1PCdTPxQf8Wzpwg6DY= +github.com/ava-labs/coreth v0.15.4-rc.3.0.20251002221438-a857a64c28ea h1:vrHUSx6hlQgdVufhtT9LT9i7eHZcWmBEjH9cBozDLuc= +github.com/ava-labs/coreth v0.15.4-rc.3.0.20251002221438-a857a64c28ea/go.mod h1:y/14LplmA0lLwIDlKiGAZ8OlxQ7OxhaU2dfkYcviLPM= github.com/ava-labs/firewood-go-ethhash/ffi v0.0.12 h1:aMcrLbpJ/dyu2kZDf/Di/4JIWsUcYPyTDKymiHpejt0= github.com/ava-labs/firewood-go-ethhash/ffi v0.0.12/go.mod h1:cq89ua3iiZ5wPBALTEQS5eG8DIZcs7ov6OiL4YR1BVY= -github.com/ava-labs/libevm v1.13.14-0.3.0.rc.7 h1:z4rEAa/WTULwZOPiBj05Ba0iveMGek1x6MVhAhSu4aE= -github.com/ava-labs/libevm v1.13.14-0.3.0.rc.7/go.mod h1:zP/DOcABRWargBmUWv1jXplyWNcfmBy9cxr0lw3LW3g= +github.com/ava-labs/libevm v1.13.15-0.20251002164226-35926db4d661 h1:lt4yQE1HMvxWrdD5RFj+h9kWUsZK2rmNohvkeQsbG9M= +github.com/ava-labs/libevm v1.13.15-0.20251002164226-35926db4d661/go.mod h1:ivRC/KojP8sai7j8WnpXIReQpcRklL2bIzoysnjpARQ= 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= @@ -43,8 +47,8 @@ github.com/btcsuite/btcd v0.23.0 h1:V2/ZgjfDFIygAX3ZapeigkVBoVUtOJKSwrhZdlpSvaA= github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcec/v2 v2.3.5 h1:dpAlnAwmT1yIBm3exhT1/8iUSD98RDJM5vqJVQDQLiU= +github.com/btcsuite/btcd/btcec/v2 v2.3.5/go.mod h1:m22FrOAiuxl/tht9wIqAoGHcbnCCaPWyauO8y2LGGtQ= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= @@ -62,8 +66,10 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8= +github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -103,8 +109,8 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= @@ -112,15 +118,17 @@ github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXk github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= +github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -158,18 +166,18 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= -github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 h1:IZqZOB2fydHte3kUgxrzK5E1fW7RQGeDwE8F/ZZnUYc= -github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/garslo/gogen v0.0.0-20230926014519-f497ca02dd4c h1:40KPNY+PW1YryU4J3aX9kNAgjXIXXyfloGA732AnOQc= +github.com/garslo/gogen v0.0.0-20230926014519-f497ca02dd4c/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.35.0 h1:+FJNlnjJsZMG3g0/rmmP7GiKjQoUF5EXfEtBwtPtkzY= +github.com/getsentry/sentry-go v0.35.0/go.mod h1:C55omcY9ChRQIUcVcGcs+Zdy4ZpQGvNJ7JYHIoSWOtE= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= @@ -180,8 +188,8 @@ github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxI github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= @@ -216,8 +224,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= -github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -255,8 +261,9 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= @@ -274,8 +281,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -429,8 +436,8 @@ github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8P github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= -github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pires/go-proxyproto v0.6.2 h1:KAZ7UteSOt6urjme6ZldyFm4wDe/z0ZUP0Yv0Dos0d8= @@ -439,32 +446,33 @@ github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsK github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= +github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= +github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo= -github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k= +github.com/sagikazarmark/locafero v0.9.0 h1:GbgQGNtTrEmddYDSAH9QLRyfAHY12md+8YFTqyMTC9k= +github.com/sagikazarmark/locafero v0.9.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk= github.com/sanity-io/litter v1.5.1 h1:dwnrSypP6q56o3lFxTU+t2fwQ9A+U5qrXVO4Qg9KwVU= github.com/sanity-io/litter v1.5.1/go.mod h1:5Z71SvaYy5kcGtyglXOC9rrUi3c1E8CamFWjQsazTh0= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= @@ -479,11 +487,11 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= -github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= +github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA= +github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= -github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE= +github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -507,8 +515,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= @@ -518,10 +526,10 @@ github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5f github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/thepudds/fzgen v0.4.3 h1:srUP/34BulQaEwPP/uHZkdjUcUjIzL7Jkf4CBVryiP8= github.com/thepudds/fzgen v0.4.3/go.mod h1:BhhwtRhzgvLWAjjcHDJ9pEiLD2Z9hrVIFjBCHJ//zJ4= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= +github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= +github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= +github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -550,32 +558,36 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 h1:H2JFgRcGiyHg7H7bwcwaQJYrNFqCqrbTQ8K4p1OvDu8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0/go.mod h1:WfCWp1bGoYK8MeULtI15MmQVczfR+bFkk0DF3h06QmQ= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 h1:Ahq7pZmv87yiyn3jeFz/LekZmPLLdKejuO3NcK9MssM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 h1:EtFWSnwW9hGObjkIdmlnWSydO+Qs8OwzfzXLUPg4xOc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0/go.mod h1:QjUEoiGCPkvFZ/MjK6ZZfNOS6mfVEVKYE99dFhuN2LI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= -go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os= +go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -585,8 +597,8 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= -golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= +golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e h1:4qufH0hlUYs6AO6XmZC3GqfDPGSXHVXUFR6OND+iJX4= golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= @@ -625,11 +637,11 @@ golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= +golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -638,8 +650,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -679,14 +691,12 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= -golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= +golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ= +golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -694,11 +704,11 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= -golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -714,15 +724,15 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gonum.org/v1/gonum v0.11.0 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E= -gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -730,18 +740,18 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 h1:TqExAhdPaB60Ux47Cn0oLV07rGnxZzIsaRhQaqS666A= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:FiusG7LWj+4byqhbvmB+Q93B/mOxJLN2DTozDuZm4EU= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c h1:qXWI/sQtv5UKboZ/zUk7h+mrf/lXORyI+n9DKDAusdg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.67.3 h1:OgPcDAFKHnH8X3O4WcO4XUc8GRDeKsKReqbQtiCj7N8= -google.golang.org/grpc v1.67.3/go.mod h1:YGaHCc6Oap+FzBJTZLBzkGSYt/cvGPFTPxkn7QfSU8s= +google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= +google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -753,8 +763,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/plugin/evm/customrawdb/accessors_metadata_ext.go b/plugin/evm/customrawdb/accessors_metadata_ext.go deleted file mode 100644 index eb79f86bd4..0000000000 --- a/plugin/evm/customrawdb/accessors_metadata_ext.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package customrawdb - -import ( - "encoding/json" - "fmt" - "time" - - "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/ava-labs/subnet-evm/params" - - ethrawdb "github.com/ava-labs/libevm/core/rawdb" -) - -// writeCurrentTimeMarker writes a marker of the current time in the db at `key`. -func writeCurrentTimeMarker(db ethdb.KeyValueStore, key []byte) error { - data, err := rlp.EncodeToBytes(uint64(time.Now().Unix())) - if err != nil { - return err - } - return db.Put(key, data) -} - -// readTimeMarker reads the timestamp stored at `key` -func readTimeMarker(db ethdb.KeyValueStore, key []byte) (time.Time, error) { - data, err := db.Get(key) - if err != nil { - return time.Time{}, err - } - - var unix uint64 - if err := rlp.DecodeBytes(data, &unix); err != nil { - return time.Time{}, err - } - - return time.Unix(int64(unix), 0), nil -} - -// WriteOfflinePruning writes a time marker of the last attempt to run offline pruning. -// The marker is written when offline pruning completes and is deleted when the node -// is started successfully with offline pruning disabled. This ensures users must -// disable offline pruning and start their node successfully between runs of offline -// pruning. -func WriteOfflinePruning(db ethdb.KeyValueStore) error { - return writeCurrentTimeMarker(db, offlinePruningKey) -} - -// ReadOfflinePruning reads the most recent timestamp of an attempt to run offline -// pruning if present. -func ReadOfflinePruning(db ethdb.KeyValueStore) (time.Time, error) { - return readTimeMarker(db, offlinePruningKey) -} - -// DeleteOfflinePruning deletes any marker of the last attempt to run offline pruning. -func DeleteOfflinePruning(db ethdb.KeyValueStore) error { - return db.Delete(offlinePruningKey) -} - -// WritePopulateMissingTries writes a marker for the current attempt to populate -// missing tries. -func WritePopulateMissingTries(db ethdb.KeyValueStore) error { - return writeCurrentTimeMarker(db, populateMissingTriesKey) -} - -// ReadPopulateMissingTries reads the most recent timestamp of an attempt to -// re-populate missing trie nodes. -func ReadPopulateMissingTries(db ethdb.KeyValueStore) (time.Time, error) { - return readTimeMarker(db, populateMissingTriesKey) -} - -// DeletePopulateMissingTries deletes any marker of the last attempt to -// re-populate missing trie nodes. -func DeletePopulateMissingTries(db ethdb.KeyValueStore) error { - return db.Delete(populateMissingTriesKey) -} - -// WritePruningDisabled writes a marker to track whether the node has ever run -// with pruning disabled. -func WritePruningDisabled(db ethdb.KeyValueStore) error { - return db.Put(pruningDisabledKey, nil) -} - -// HasPruningDisabled returns true if there is a marker present indicating that -// the node has run with pruning disabled at some point. -func HasPruningDisabled(db ethdb.KeyValueStore) (bool, error) { - return db.Has(pruningDisabledKey) -} - -// WriteAcceptorTip writes `hash` as the last accepted block that has been fully processed. -func WriteAcceptorTip(db ethdb.KeyValueWriter, hash common.Hash) error { - return db.Put(acceptorTipKey, hash[:]) -} - -// ReadAcceptorTip reads the hash of the last accepted block that was fully processed. -// If there is no value present (the index is being initialized for the first time), then the -// empty hash is returned. -func ReadAcceptorTip(db ethdb.KeyValueReader) (common.Hash, error) { - has, err := db.Has(acceptorTipKey) - if err != nil { - return common.Hash{}, err - } - if !has { - // If the index is not present on disk, the [acceptorTipKey] index has not been initialized yet. - return common.Hash{}, nil - } - h, err := db.Get(acceptorTipKey) - if err != nil { - return common.Hash{}, err - } - if len(h) != common.HashLength { - return common.Hash{}, fmt.Errorf("value has incorrect length %d", len(h)) - } - return common.BytesToHash(h), nil -} - -// ReadChainConfig retrieves the consensus settings based on the given genesis hash. -func ReadChainConfig(db ethdb.KeyValueReader, hash common.Hash) *params.ChainConfig { - config := ethrawdb.ReadChainConfig(db, hash) - - upgrade, _ := db.Get(upgradeConfigKey(hash)) - if len(upgrade) == 0 { - return config - } - - extra := params.GetExtra(config) - if err := json.Unmarshal(upgrade, &extra.UpgradeConfig); err != nil { - log.Error("Invalid upgrade config JSON", "err", err) - return nil - } - - return config -} - -// WriteChainConfig writes the chain config settings to the database. -func WriteChainConfig(db ethdb.KeyValueWriter, hash common.Hash, config *params.ChainConfig) { - ethrawdb.WriteChainConfig(db, hash, config) - if config == nil { - return - } - - extra := params.GetExtra(config) - data, err := json.Marshal(extra.UpgradeConfig) - if err != nil { - log.Crit("Failed to JSON encode upgrade config", "err", err) - } - if err := db.Put(upgradeConfigKey(hash), data); err != nil { - log.Crit("Failed to store upgrade config", "err", err) - } -} diff --git a/plugin/evm/customrawdb/accessors_snapshot_ext.go b/plugin/evm/customrawdb/accessors_snapshot_ext.go deleted file mode 100644 index 6a4e2c83cf..0000000000 --- a/plugin/evm/customrawdb/accessors_snapshot_ext.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package customrawdb - -import ( - "github.com/ava-labs/libevm/common" - "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/libevm/log" - - ethrawdb "github.com/ava-labs/libevm/core/rawdb" -) - -// ReadSnapshotBlockHash retrieves the hash of the block whose state is contained in -// the persisted snapshot. -func ReadSnapshotBlockHash(db ethdb.KeyValueReader) common.Hash { - data, _ := db.Get(snapshotBlockHashKey) - if len(data) != common.HashLength { - return common.Hash{} - } - return common.BytesToHash(data) -} - -// WriteSnapshotBlockHash stores the root of the block whose state is contained in -// the persisted snapshot. -func WriteSnapshotBlockHash(db ethdb.KeyValueWriter, blockHash common.Hash) { - if err := db.Put(snapshotBlockHashKey, blockHash[:]); err != nil { - log.Crit("Failed to store snapshot block hash", "err", err) - } -} - -// DeleteSnapshotBlockHash deletes the hash of the block whose state is contained in -// the persisted snapshot. Since snapshots are not immutable, this method can -// be used during updates, so a crash or failure will mark the entire snapshot -// invalid. -func DeleteSnapshotBlockHash(db ethdb.KeyValueWriter) { - if err := db.Delete(snapshotBlockHashKey); err != nil { - log.Crit("Failed to remove snapshot block hash", "err", err) - } -} - -// IterateAccountSnapshots returns an iterator for walking all of the accounts in the snapshot -func IterateAccountSnapshots(db ethdb.Iteratee) ethdb.Iterator { - it := db.NewIterator(ethrawdb.SnapshotAccountPrefix, nil) - keyLen := len(ethrawdb.SnapshotAccountPrefix) + common.HashLength - return ethrawdb.NewKeyLengthIterator(it, keyLen) -} diff --git a/plugin/evm/customrawdb/accessors_state_sync.go b/plugin/evm/customrawdb/accessors_state_sync.go deleted file mode 100644 index 8abe4a6f75..0000000000 --- a/plugin/evm/customrawdb/accessors_state_sync.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package customrawdb - -import ( - "encoding/binary" - - "github.com/ava-labs/avalanchego/utils/wrappers" - "github.com/ava-labs/libevm/common" - "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/libevm/log" - - ethrawdb "github.com/ava-labs/libevm/core/rawdb" -) - -// ReadSyncRoot reads the root corresponding to the main trie of an in-progress -// sync and returns common.Hash{} if no in-progress sync was found. -func ReadSyncRoot(db ethdb.KeyValueReader) (common.Hash, error) { - has, err := db.Has(syncRootKey) - if err != nil || !has { - return common.Hash{}, err - } - root, err := db.Get(syncRootKey) - if err != nil { - return common.Hash{}, err - } - return common.BytesToHash(root), nil -} - -// WriteSyncRoot writes root as the root of the main trie of the in-progress sync. -func WriteSyncRoot(db ethdb.KeyValueWriter, root common.Hash) error { - return db.Put(syncRootKey, root[:]) -} - -// AddCodeToFetch adds a marker that we need to fetch the code for `hash`. -func AddCodeToFetch(db ethdb.KeyValueWriter, hash common.Hash) { - if err := db.Put(codeToFetchKey(hash), nil); err != nil { - log.Crit("Failed to put code to fetch", "codeHash", hash, "err", err) - } -} - -// DeleteCodeToFetch removes the marker that the code corresponding to `hash` needs to be fetched. -func DeleteCodeToFetch(db ethdb.KeyValueWriter, hash common.Hash) { - if err := db.Delete(codeToFetchKey(hash)); err != nil { - log.Crit("Failed to delete code to fetch", "codeHash", hash, "err", err) - } -} - -// NewCodeToFetchIterator returns a KeyLength iterator over all code -// hashes that are pending syncing. It is the caller's responsibility to -// unpack the key and call Release on the returned iterator. -func NewCodeToFetchIterator(db ethdb.Iteratee) ethdb.Iterator { - return ethrawdb.NewKeyLengthIterator( - db.NewIterator(CodeToFetchPrefix, nil), - codeToFetchKeyLength, - ) -} - -func codeToFetchKey(hash common.Hash) []byte { - codeToFetchKey := make([]byte, codeToFetchKeyLength) - copy(codeToFetchKey, CodeToFetchPrefix) - copy(codeToFetchKey[len(CodeToFetchPrefix):], hash[:]) - return codeToFetchKey -} - -// NewSyncSegmentsIterator returns a KeyLength iterator over all trie segments -// added for root. It is the caller's responsibility to unpack the key and call -// Release on the returned iterator. -func NewSyncSegmentsIterator(db ethdb.Iteratee, root common.Hash) ethdb.Iterator { - segmentsPrefix := make([]byte, len(syncSegmentsPrefix)+common.HashLength) - copy(segmentsPrefix, syncSegmentsPrefix) - copy(segmentsPrefix[len(syncSegmentsPrefix):], root[:]) - - return ethrawdb.NewKeyLengthIterator( - db.NewIterator(segmentsPrefix, nil), - syncSegmentsKeyLength, - ) -} - -// WriteSyncSegment adds a trie segment for root at the given start position. -func WriteSyncSegment(db ethdb.KeyValueWriter, root common.Hash, start common.Hash) error { - return db.Put(packSyncSegmentKey(root, start), []byte{0x01}) -} - -// ClearSyncSegments removes segment markers for root from db -func ClearSyncSegments(db ethdb.KeyValueStore, root common.Hash) error { - segmentsPrefix := make([]byte, len(syncSegmentsPrefix)+common.HashLength) - copy(segmentsPrefix, syncSegmentsPrefix) - copy(segmentsPrefix[len(syncSegmentsPrefix):], root[:]) - return clearPrefix(db, segmentsPrefix, syncSegmentsKeyLength) -} - -// ClearAllSyncSegments removes all segment markers from db -func ClearAllSyncSegments(db ethdb.KeyValueStore) error { - return clearPrefix(db, syncSegmentsPrefix, syncSegmentsKeyLength) -} - -// UnpackSyncSegmentKey returns the root and start position for a trie segment -// key returned from NewSyncSegmentsIterator. -func UnpackSyncSegmentKey(keyBytes []byte) (common.Hash, []byte) { - keyBytes = keyBytes[len(syncSegmentsPrefix):] // skip prefix - root := common.BytesToHash(keyBytes[:common.HashLength]) - start := keyBytes[common.HashLength:] - return root, start -} - -// packSyncSegmentKey packs root and account into a key for storage in db. -func packSyncSegmentKey(root common.Hash, start common.Hash) []byte { - bytes := make([]byte, syncSegmentsKeyLength) - copy(bytes, syncSegmentsPrefix) - copy(bytes[len(syncSegmentsPrefix):], root[:]) - copy(bytes[len(syncSegmentsPrefix)+common.HashLength:], start.Bytes()) - return bytes -} - -// NewSyncStorageTriesIterator returns a KeyLength iterator over all storage tries -// added for syncing (beginning at seek). It is the caller's responsibility to unpack -// the key and call Release on the returned iterator. -func NewSyncStorageTriesIterator(db ethdb.Iteratee, seek []byte) ethdb.Iterator { - return ethrawdb.NewKeyLengthIterator(db.NewIterator(syncStorageTriesPrefix, seek), syncStorageTriesKeyLength) -} - -// WriteSyncStorageTrie adds a storage trie for account (with the given root) to be synced. -func WriteSyncStorageTrie(db ethdb.KeyValueWriter, root common.Hash, account common.Hash) error { - return db.Put(packSyncStorageTrieKey(root, account), []byte{0x01}) -} - -// ClearSyncStorageTrie removes all storage trie accounts (with the given root) from db. -// Intended for use when the trie with root has completed syncing. -func ClearSyncStorageTrie(db ethdb.KeyValueStore, root common.Hash) error { - accountsPrefix := make([]byte, len(syncStorageTriesPrefix)+common.HashLength) - copy(accountsPrefix, syncStorageTriesPrefix) - copy(accountsPrefix[len(syncStorageTriesPrefix):], root[:]) - return clearPrefix(db, accountsPrefix, syncStorageTriesKeyLength) -} - -// ClearAllSyncStorageTries removes all storage tries added for syncing from db -func ClearAllSyncStorageTries(db ethdb.KeyValueStore) error { - return clearPrefix(db, syncStorageTriesPrefix, syncStorageTriesKeyLength) -} - -// UnpackSyncStorageTrieKey returns the root and account for a storage trie -// key returned from NewSyncStorageTriesIterator. -func UnpackSyncStorageTrieKey(keyBytes []byte) (common.Hash, common.Hash) { - keyBytes = keyBytes[len(syncStorageTriesPrefix):] // skip prefix - root := common.BytesToHash(keyBytes[:common.HashLength]) - account := common.BytesToHash(keyBytes[common.HashLength:]) - return root, account -} - -// packSyncStorageTrieKey packs root and account into a key for storage in db. -func packSyncStorageTrieKey(root common.Hash, account common.Hash) []byte { - bytes := make([]byte, 0, syncStorageTriesKeyLength) - bytes = append(bytes, syncStorageTriesPrefix...) - bytes = append(bytes, root[:]...) - bytes = append(bytes, account[:]...) - return bytes -} - -// WriteSyncPerformed logs an entry in `db` indicating the VM state synced to `blockNumber`. -func WriteSyncPerformed(db ethdb.KeyValueWriter, blockNumber uint64) error { - syncPerformedPrefixLen := len(syncPerformedPrefix) - bytes := make([]byte, syncPerformedPrefixLen+wrappers.LongLen) - copy(bytes[:syncPerformedPrefixLen], syncPerformedPrefix) - binary.BigEndian.PutUint64(bytes[syncPerformedPrefixLen:], blockNumber) - return db.Put(bytes, []byte{0x01}) -} - -// NewSyncPerformedIterator returns an iterator over all block numbers the VM -// has state synced to. -func NewSyncPerformedIterator(db ethdb.Iteratee) ethdb.Iterator { - return ethrawdb.NewKeyLengthIterator(db.NewIterator(syncPerformedPrefix, nil), syncPerformedKeyLength) -} - -// UnpackSyncPerformedKey returns the block number from keys the iterator returned -// from NewSyncPerformedIterator. -func UnpackSyncPerformedKey(key []byte) uint64 { - return binary.BigEndian.Uint64(key[len(syncPerformedPrefix):]) -} - -// GetLatestSyncPerformed returns the latest block number state synced performed to. -func GetLatestSyncPerformed(db ethdb.Iteratee) uint64 { - it := NewSyncPerformedIterator(db) - defer it.Release() - - var latestSyncPerformed uint64 - for it.Next() { - syncPerformed := UnpackSyncPerformedKey(it.Key()) - if syncPerformed > latestSyncPerformed { - latestSyncPerformed = syncPerformed - } - } - return latestSyncPerformed -} - -// clearPrefix removes all keys in db that begin with prefix and match an -// expected key length. `keyLen` must include the length of the prefix. -func clearPrefix(db ethdb.KeyValueStore, prefix []byte, keyLen int) error { - it := db.NewIterator(prefix, nil) - defer it.Release() - - batch := db.NewBatch() - for it.Next() { - key := common.CopyBytes(it.Key()) - if len(key) != keyLen { - continue - } - if err := batch.Delete(key); err != nil { - return err - } - if batch.ValueSize() > ethdb.IdealBatchSize { - if err := batch.Write(); err != nil { - return err - } - batch.Reset() - } - } - if err := it.Error(); err != nil { - return err - } - return batch.Write() -} diff --git a/plugin/evm/customrawdb/accessors_state_sync_test.go b/plugin/evm/customrawdb/accessors_state_sync_test.go deleted file mode 100644 index c9b6f66223..0000000000 --- a/plugin/evm/customrawdb/accessors_state_sync_test.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package customrawdb - -import ( - "testing" - - "github.com/ava-labs/libevm/common" - "github.com/stretchr/testify/require" - - ethrawdb "github.com/ava-labs/libevm/core/rawdb" -) - -func TestClearPrefix(t *testing.T) { - require := require.New(t) - db := ethrawdb.NewMemoryDatabase() - // add a key that should be cleared - require.NoError(WriteSyncSegment(db, common.Hash{1}, common.Hash{})) - - // add a key that should not be cleared - key := append(syncSegmentsPrefix, []byte("foo")...) - require.NoError(db.Put(key, []byte("bar"))) - - require.NoError(ClearAllSyncSegments(db)) - - count := 0 - it := db.NewIterator(syncSegmentsPrefix, nil) - defer it.Release() - for it.Next() { - count++ - } - require.NoError(it.Error()) - require.Equal(1, count) -} diff --git a/plugin/evm/customrawdb/database_ext.go b/plugin/evm/customrawdb/database_ext.go deleted file mode 100644 index 961b1000d6..0000000000 --- a/plugin/evm/customrawdb/database_ext.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package customrawdb - -import ( - "bytes" - "fmt" - - "github.com/ava-labs/libevm/common" - "github.com/ava-labs/libevm/core/rawdb" - "github.com/ava-labs/libevm/ethdb" -) - -// InspectDatabase traverses the entire database and checks the size -// of all different categories of data. -func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error { - type stat = rawdb.DatabaseStat - stats := []struct { - name string - keyLen int - keyPrefix []byte - stat *stat - }{ - {"Trie segments", syncSegmentsKeyLength, syncSegmentsPrefix, &stat{}}, - {"Storage tries to fetch", syncStorageTriesKeyLength, syncStorageTriesPrefix, &stat{}}, - {"Code to fetch", codeToFetchKeyLength, CodeToFetchPrefix, &stat{}}, - {"Block numbers synced to", syncPerformedKeyLength, syncPerformedPrefix, &stat{}}, - } - - options := []rawdb.InspectDatabaseOption{ - rawdb.WithDatabaseMetadataKeys(func(key []byte) bool { - return bytes.Equal(key, snapshotBlockHashKey) || - bytes.Equal(key, syncRootKey) || - (bytes.HasPrefix(key, upgradeConfigPrefix) && len(key) == len(upgradeConfigPrefix)+common.HashLength) - }), - rawdb.WithDatabaseStatRecorder(func(key []byte, size common.StorageSize) bool { - for _, s := range stats { - if len(key) == s.keyLen && bytes.HasPrefix(key, s.keyPrefix) { - s.stat.Add(size) - return true - } - } - return false - }), - rawdb.WithDatabaseStatsTransformer(func(rows [][]string) [][]string { - newRows := make([][]string, 0, len(rows)) - for _, row := range rows { - switch db, cat := row[0], row[1]; { - // Discard rows specific to libevm (geth) but irrelevant to subnet-evm. - case db == "Key-Value store" && (cat == "Difficulties" || cat == "Beacon sync headers"): - case db == "Ancient store (Chain)": - default: - newRows = append(newRows, row) - } - } - for _, s := range stats { - newRows = append(newRows, []string{"State sync", s.name, s.stat.Size(), s.stat.Count()}) - } - return newRows - }), - } - - return rawdb.InspectDatabase(db, keyPrefix, keyStart, options...) -} - -// ParseStateSchemeExt parses the state scheme from the provided string. -func ParseStateSchemeExt(provided string, disk ethdb.Database) (string, error) { - // Check for custom scheme - if provided == FirewoodScheme { - if diskScheme := rawdb.ReadStateScheme(disk); diskScheme != "" { - // Valid scheme on disk mismatched - return "", fmt.Errorf("State scheme %s already set on disk, can't use Firewood", diskScheme) - } - // If no conflicting scheme is found, is valid. - return FirewoodScheme, nil - } - - // Check for valid eth scheme - return rawdb.ParseStateScheme(provided, disk) -} diff --git a/plugin/evm/customrawdb/database_ext_test.go b/plugin/evm/customrawdb/database_ext_test.go deleted file mode 100644 index 9fa920b784..0000000000 --- a/plugin/evm/customrawdb/database_ext_test.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package customrawdb - -import ( - "fmt" - - "github.com/ava-labs/libevm/common" - "github.com/ava-labs/libevm/ethdb" - - ethrawdb "github.com/ava-labs/libevm/core/rawdb" -) - -func ExampleInspectDatabase() { - db := &stubDatabase{ - iterator: &stubIterator{}, - } - - // Extra metadata keys: (17 + 32) + (12 + 32) = 93 bytes - WriteSnapshotBlockHash(db, common.Hash{}) - ethrawdb.WriteSnapshotRoot(db, common.Hash{}) - // Trie segments: (77 + 2) + 1 = 80 bytes - _ = WriteSyncSegment(db, common.Hash{}, common.Hash{}) - // Storage tries to fetch: 76 + 1 = 77 bytes - _ = WriteSyncStorageTrie(db, common.Hash{}, common.Hash{}) - // Code to fetch: 34 + 0 = 34 bytes - AddCodeToFetch(db, common.Hash{}) - // Block numbers synced to: 22 + 1 = 23 bytes - _ = WriteSyncPerformed(db, 0) - - keyPrefix := []byte(nil) - keyStart := []byte(nil) - - err := InspectDatabase(db, keyPrefix, keyStart) - if err != nil { - fmt.Println(err) - } - // Output: - // +-----------------+-------------------------+----------+-------+ - // | DATABASE | CATEGORY | SIZE | ITEMS | - // +-----------------+-------------------------+----------+-------+ - // | Key-Value store | Headers | 0.00 B | 0 | - // | Key-Value store | Bodies | 0.00 B | 0 | - // | Key-Value store | Receipt lists | 0.00 B | 0 | - // | Key-Value store | Block number->hash | 0.00 B | 0 | - // | Key-Value store | Block hash->number | 0.00 B | 0 | - // | Key-Value store | Transaction index | 0.00 B | 0 | - // | Key-Value store | Bloombit index | 0.00 B | 0 | - // | Key-Value store | Contract codes | 0.00 B | 0 | - // | Key-Value store | Hash trie nodes | 0.00 B | 0 | - // | Key-Value store | Path trie state lookups | 0.00 B | 0 | - // | Key-Value store | Path trie account nodes | 0.00 B | 0 | - // | Key-Value store | Path trie storage nodes | 0.00 B | 0 | - // | Key-Value store | Trie preimages | 0.00 B | 0 | - // | Key-Value store | Account snapshot | 0.00 B | 0 | - // | Key-Value store | Storage snapshot | 0.00 B | 0 | - // | Key-Value store | Clique snapshots | 0.00 B | 0 | - // | Key-Value store | Singleton metadata | 93.00 B | 2 | - // | Light client | CHT trie nodes | 0.00 B | 0 | - // | Light client | Bloom trie nodes | 0.00 B | 0 | - // | State sync | Trie segments | 78.00 B | 1 | - // | State sync | Storage tries to fetch | 77.00 B | 1 | - // | State sync | Code to fetch | 34.00 B | 1 | - // | State sync | Block numbers synced to | 23.00 B | 1 | - // +-----------------+-------------------------+----------+-------+ - // | TOTAL | 305.00 B | | - // +-----------------+-------------------------+----------+-------+ -} - -type stubDatabase struct { - ethdb.Database - iterator *stubIterator -} - -func (s *stubDatabase) NewIterator(_, _ []byte) ethdb.Iterator { - return s.iterator -} - -// AncientSize is used in [InspectDatabase] to determine the ancient sizes. -func (*stubDatabase) AncientSize(string) (uint64, error) { - return 0, nil -} - -func (*stubDatabase) Ancients() (uint64, error) { - return 0, nil -} - -func (*stubDatabase) Tail() (uint64, error) { - return 0, nil -} - -func (s *stubDatabase) Put(key, value []byte) error { - s.iterator.kvs = append(s.iterator.kvs, keyValue{key: key, value: value}) - return nil -} - -func (*stubDatabase) Get([]byte) ([]byte, error) { - return nil, nil -} - -func (*stubDatabase) ReadAncients(_ func(ethdb.AncientReaderOp) error) error { - return nil -} - -type stubIterator struct { - ethdb.Iterator - i int // see [stubIterator.pos] - kvs []keyValue -} - -type keyValue struct { - key []byte - value []byte -} - -// pos returns the true iterator position, which is otherwise off by one because -// Next() is called _before_ usage. -func (s *stubIterator) pos() int { - return s.i - 1 -} - -func (s *stubIterator) Next() bool { - s.i++ - return s.pos() < len(s.kvs) -} - -func (*stubIterator) Release() {} - -func (s *stubIterator) Key() []byte { - return s.kvs[s.pos()].key -} - -func (s *stubIterator) Value() []byte { - return s.kvs[s.pos()].value -} diff --git a/plugin/evm/customrawdb/schema_ext.go b/plugin/evm/customrawdb/schema_ext.go deleted file mode 100644 index 7ec9a75813..0000000000 --- a/plugin/evm/customrawdb/schema_ext.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package customrawdb - -import ( - "github.com/ava-labs/avalanchego/utils/wrappers" - "github.com/ava-labs/libevm/common" -) - -var ( - // snapshotBlockHashKey tracks the block hash of the last snapshot. - snapshotBlockHashKey = []byte("SnapshotBlockHash") - // offlinePruningKey tracks runs of offline pruning - offlinePruningKey = []byte("OfflinePruning") - // populateMissingTriesKey tracks runs of trie backfills - populateMissingTriesKey = []byte("PopulateMissingTries") - // pruningDisabledKey tracks whether the node has ever run in archival mode - // to ensure that a user does not accidentally corrupt an archival node. - pruningDisabledKey = []byte("PruningDisabled") - // acceptorTipKey tracks the tip of the last accepted block that has been fully processed. - acceptorTipKey = []byte("AcceptorTipKey") - // upgradeConfigPrefix prefixes upgrade bytes passed to the chain - upgradeConfigPrefix = []byte("upgrade-config-") -) - -// State sync progress keys and prefixes -var ( - // syncRootKey indicates the root of the main account trie currently being synced - syncRootKey = []byte("sync_root") - // syncStorageTriesPrefix is the prefix for storage tries that need to be fetched. - // syncStorageTriesPrefix + trie root + account hash: indicates a storage trie must be fetched for the account - syncStorageTriesPrefix = []byte("sync_storage") - // syncSegmentsPrefix is the prefix for segments. - // syncSegmentsPrefix + trie root + 32-byte start key: indicates the trie at root has a segment starting at the specified key - syncSegmentsPrefix = []byte("sync_segments") - // CodeToFetchPrefix is the prefix for code hashes that need to be fetched. - // CodeToFetchPrefix + code hash -> empty value tracks the outstanding code hashes we need to fetch. - CodeToFetchPrefix = []byte("CP") -) - -// State sync progress key lengths -var ( - syncStorageTriesKeyLength = len(syncStorageTriesPrefix) + 2*common.HashLength - syncSegmentsKeyLength = len(syncSegmentsPrefix) + 2*common.HashLength - codeToFetchKeyLength = len(CodeToFetchPrefix) + common.HashLength -) - -// State sync metadata -var ( - syncPerformedPrefix = []byte("sync_performed") - // syncPerformedKeyLength is the length of the key for the sync performed metadata key, - // and is equal to [syncPerformedPrefix] + block number as uint64. - syncPerformedKeyLength = len(syncPerformedPrefix) + wrappers.LongLen -) - -var FirewoodScheme = "firewood" - -// upgradeConfigKey = upgradeConfigPrefix + hash -func upgradeConfigKey(hash common.Hash) []byte { - return append(upgradeConfigPrefix, hash.Bytes()...) -} diff --git a/plugin/evm/syncervm_test.go b/plugin/evm/syncervm_test.go index 0ed52a30dd..75663e241b 100644 --- a/plugin/evm/syncervm_test.go +++ b/plugin/evm/syncervm_test.go @@ -32,12 +32,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/constants" "github.com/ava-labs/subnet-evm/core" "github.com/ava-labs/subnet-evm/core/coretest" "github.com/ava-labs/subnet-evm/params/paramstest" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/database" "github.com/ava-labs/subnet-evm/sync/statesync/statesynctest" "github.com/ava-labs/subnet-evm/utils/utilstest" diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index 436c7c4d92..a035521587 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -53,6 +53,7 @@ import ( _ "github.com/ava-labs/libevm/eth/tracers/native" _ "github.com/ava-labs/subnet-evm/precompile/registry" // Force-load precompiles to trigger registration + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/commontype" "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/constants" @@ -66,7 +67,6 @@ import ( "github.com/ava-labs/subnet-evm/params" "github.com/ava-labs/subnet-evm/params/extras" "github.com/ava-labs/subnet-evm/plugin/evm/config" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/gossip" "github.com/ava-labs/subnet-evm/plugin/evm/message" "github.com/ava-labs/subnet-evm/plugin/evm/validators" diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go index 110ad1e8c1..31ad616343 100644 --- a/plugin/evm/vm_test.go +++ b/plugin/evm/vm_test.go @@ -38,6 +38,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/commontype" "github.com/ava-labs/subnet-evm/constants" "github.com/ava-labs/subnet-evm/core" @@ -49,7 +50,6 @@ import ( "github.com/ava-labs/subnet-evm/params/paramstest" "github.com/ava-labs/subnet-evm/plugin/evm/config" "github.com/ava-labs/subnet-evm/plugin/evm/customheader" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/customtypes" "github.com/ava-labs/subnet-evm/plugin/evm/vmerrors" "github.com/ava-labs/subnet-evm/precompile/allowlist" diff --git a/sync/statesync/code_syncer.go b/sync/statesync/code_syncer.go index aab4b529aa..e0dc15f76e 100644 --- a/sync/statesync/code_syncer.go +++ b/sync/statesync/code_syncer.go @@ -15,7 +15,7 @@ import ( "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/message" statesyncclient "github.com/ava-labs/subnet-evm/sync/client" diff --git a/sync/statesync/code_syncer_test.go b/sync/statesync/code_syncer_test.go index 972c056095..0ac8438e08 100644 --- a/sync/statesync/code_syncer_test.go +++ b/sync/statesync/code_syncer_test.go @@ -15,7 +15,7 @@ import ( "github.com/ava-labs/libevm/ethdb/memorydb" "github.com/stretchr/testify/assert" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/message" "github.com/ava-labs/subnet-evm/sync/handlers" diff --git a/sync/statesync/statesynctest/test_sync.go b/sync/statesync/statesynctest/test_sync.go index e380ca9d60..90036646ac 100644 --- a/sync/statesync/statesynctest/test_sync.go +++ b/sync/statesync/statesynctest/test_sync.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/libevm/triedb" "github.com/stretchr/testify/assert" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/utils/utilstest" ) diff --git a/sync/statesync/trie_queue.go b/sync/statesync/trie_queue.go index 92d2c76be1..2c946c38a3 100644 --- a/sync/statesync/trie_queue.go +++ b/sync/statesync/trie_queue.go @@ -7,7 +7,7 @@ import ( "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" ) // trieQueue persists storage trie roots with their associated diff --git a/sync/statesync/trie_segments.go b/sync/statesync/trie_segments.go index 1a4f6dd231..ef0a47a6fa 100644 --- a/sync/statesync/trie_segments.go +++ b/sync/statesync/trie_segments.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/libevm/log" "github.com/ava-labs/libevm/trie" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/utils" syncclient "github.com/ava-labs/subnet-evm/sync/client" diff --git a/tests/state_test_util.go b/tests/state_test_util.go index ad030bd3d6..4fb080d598 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -38,6 +38,7 @@ import ( "strconv" "strings" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/hexutil" "github.com/ava-labs/libevm/common/math" @@ -55,7 +56,6 @@ import ( "github.com/ava-labs/subnet-evm/core/extstate" "github.com/ava-labs/subnet-evm/core/state/snapshot" "github.com/ava-labs/subnet-evm/params" - "github.com/ava-labs/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/subnet-evm/triedb/firewood" "github.com/ava-labs/subnet-evm/triedb/hashdb" "github.com/ava-labs/subnet-evm/triedb/pathdb" From 8e3eed4931afe723412d48878604e95d85d645e2 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Mon, 6 Oct 2025 15:42:00 +0300 Subject: [PATCH 02/19] style: fix linter errors --- core/blockchain_test.go | 2 +- eth/tracers/api_extra_test.go | 2 +- plugin/evm/syncervm_test.go | 2 +- plugin/evm/vm.go | 2 +- plugin/evm/vm_test.go | 2 +- sync/statesync/code_syncer.go | 2 +- sync/statesync/code_syncer_test.go | 2 +- sync/statesync/statesynctest/test_sync.go | 2 +- sync/statesync/trie_queue.go | 3 +-- sync/statesync/trie_segments.go | 2 +- 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/core/blockchain_test.go b/core/blockchain_test.go index c37329a950..0c44c0abfc 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -10,6 +10,7 @@ import ( "testing" "github.com/ava-labs/avalanchego/upgrade" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -18,7 +19,6 @@ import ( "github.com/ava-labs/libevm/eth/tracers/logger" "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/core/state/pruner" "github.com/ava-labs/subnet-evm/params" diff --git a/eth/tracers/api_extra_test.go b/eth/tracers/api_extra_test.go index 868102fad9..43de95aae8 100644 --- a/eth/tracers/api_extra_test.go +++ b/eth/tracers/api_extra_test.go @@ -12,6 +12,7 @@ import ( "sync/atomic" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/hexutil" "github.com/ava-labs/libevm/common/math" @@ -20,7 +21,6 @@ import ( "github.com/ava-labs/libevm/eth/tracers/logger" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/core" "github.com/ava-labs/subnet-evm/internal/ethapi" "github.com/ava-labs/subnet-evm/params" diff --git a/plugin/evm/syncervm_test.go b/plugin/evm/syncervm_test.go index 75663e241b..29be49290e 100644 --- a/plugin/evm/syncervm_test.go +++ b/plugin/evm/syncervm_test.go @@ -21,6 +21,7 @@ import ( "github.com/ava-labs/avalanchego/upgrade/upgradetest" "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/vms/evm/predicate" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -32,7 +33,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/constants" "github.com/ava-labs/subnet-evm/core" diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index a035521587..a7bc1ffcf3 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -33,6 +33,7 @@ import ( "github.com/ava-labs/avalanchego/utils/units" "github.com/ava-labs/avalanchego/version" "github.com/ava-labs/avalanchego/vms/components/chain" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/firewood-go-ethhash/ffi" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" @@ -53,7 +54,6 @@ import ( _ "github.com/ava-labs/libevm/eth/tracers/native" _ "github.com/ava-labs/subnet-evm/precompile/registry" // Force-load precompiles to trigger registration - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/commontype" "github.com/ava-labs/subnet-evm/consensus/dummy" "github.com/ava-labs/subnet-evm/constants" diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go index 31ad616343..b9687f8a39 100644 --- a/plugin/evm/vm_test.go +++ b/plugin/evm/vm_test.go @@ -30,6 +30,7 @@ import ( "github.com/ava-labs/avalanchego/upgrade/upgradetest" "github.com/ava-labs/avalanchego/utils/crypto/secp256k1" "github.com/ava-labs/avalanchego/vms/components/chain" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -38,7 +39,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/commontype" "github.com/ava-labs/subnet-evm/constants" "github.com/ava-labs/subnet-evm/core" diff --git a/sync/statesync/code_syncer.go b/sync/statesync/code_syncer.go index e0dc15f76e..f68c0c3895 100644 --- a/sync/statesync/code_syncer.go +++ b/sync/statesync/code_syncer.go @@ -11,11 +11,11 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/set" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/message" statesyncclient "github.com/ava-labs/subnet-evm/sync/client" diff --git a/sync/statesync/code_syncer_test.go b/sync/statesync/code_syncer_test.go index 0ac8438e08..ecb85dbe5e 100644 --- a/sync/statesync/code_syncer_test.go +++ b/sync/statesync/code_syncer_test.go @@ -9,13 +9,13 @@ import ( "testing" "github.com/ava-labs/avalanchego/utils" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/crypto" "github.com/ava-labs/libevm/ethdb/memorydb" "github.com/stretchr/testify/assert" - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/plugin/evm/message" "github.com/ava-labs/subnet-evm/sync/handlers" diff --git a/sync/statesync/statesynctest/test_sync.go b/sync/statesync/statesynctest/test_sync.go index 90036646ac..8d5c5205fc 100644 --- a/sync/statesync/statesynctest/test_sync.go +++ b/sync/statesync/statesynctest/test_sync.go @@ -8,6 +8,7 @@ import ( "math/rand" "testing" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" @@ -17,7 +18,6 @@ import ( "github.com/ava-labs/libevm/triedb" "github.com/stretchr/testify/assert" - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/utils/utilstest" ) diff --git a/sync/statesync/trie_queue.go b/sync/statesync/trie_queue.go index 2c946c38a3..95e7a6b1e0 100644 --- a/sync/statesync/trie_queue.go +++ b/sync/statesync/trie_queue.go @@ -4,10 +4,9 @@ package statesync import ( + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/ethdb" - - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" ) // trieQueue persists storage trie roots with their associated diff --git a/sync/statesync/trie_segments.go b/sync/statesync/trie_segments.go index ef0a47a6fa..02ede349df 100644 --- a/sync/statesync/trie_segments.go +++ b/sync/statesync/trie_segments.go @@ -11,13 +11,13 @@ import ( "sync" "github.com/ava-labs/avalanchego/utils/wrappers" + "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/ethdb" "github.com/ava-labs/libevm/log" "github.com/ava-labs/libevm/trie" - "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/subnet-evm/utils" syncclient "github.com/ava-labs/subnet-evm/sync/client" From 1828a89371613c8f7f96aa1857ecde0c8c7e656b Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Mon, 6 Oct 2025 17:01:43 +0300 Subject: [PATCH 03/19] fix: update avalanchego version --- .github/workflows/tests.yml | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b164bec838..1ddb892b3e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -97,7 +97,7 @@ jobs: - name: Setup Contracts run: ./scripts/run_task.sh setup-contracts - name: Run Warp E2E Tests - uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@e6f54612a1c788bd39edebdee870721244e2055e + uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@bf62dfb8084fe23e847c68d0636a2bf3525cb80a with: run: ./scripts/run_task.sh test-e2e-warp-ci artifact_prefix: warp @@ -122,7 +122,7 @@ jobs: with: go-version-file: "go.mod" - name: Run E2E Load Tests - uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@e6f54612a1c788bd39edebdee870721244e2055e + uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@bf62dfb8084fe23e847c68d0636a2bf3525cb80a with: run: ./scripts/run_task.sh test-e2e-load-ci artifact_prefix: load diff --git a/go.mod b/go.mod index b032eabdc3..2079c7e455 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.24.7 require ( github.com/VictoriaMetrics/fastcache v1.12.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/avalanchego v1.13.6-0.20251006112303-e6f54612a1c7 + github.com/ava-labs/avalanchego v1.13.6-0.20251006134645-bf62dfb8084f github.com/ava-labs/firewood-go-ethhash/ffi v0.0.12 github.com/ava-labs/libevm v1.13.15-0.20251002164226-35926db4d661 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc diff --git a/go.sum b/go.sum index f5614934e7..2566b922ad 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/ava-labs/avalanchego v1.13.6-0.20251006112303-e6f54612a1c7 h1:XBkD1vjNPVKImSu6HUoTRd8Hqz4hpkbnfYSjc8h98CQ= -github.com/ava-labs/avalanchego v1.13.6-0.20251006112303-e6f54612a1c7/go.mod h1:yplWYV/FzAZeYAhy0yOj8wjJA1PCdTPxQf8Wzpwg6DY= +github.com/ava-labs/avalanchego v1.13.6-0.20251006134645-bf62dfb8084f h1:Nibzh1oBd3YNSJdmrBclcEq9FQ5H6HoJAbx7aejVpNk= +github.com/ava-labs/avalanchego v1.13.6-0.20251006134645-bf62dfb8084f/go.mod h1:yplWYV/FzAZeYAhy0yOj8wjJA1PCdTPxQf8Wzpwg6DY= github.com/ava-labs/coreth v0.15.4-rc.3.0.20251002221438-a857a64c28ea h1:vrHUSx6hlQgdVufhtT9LT9i7eHZcWmBEjH9cBozDLuc= github.com/ava-labs/coreth v0.15.4-rc.3.0.20251002221438-a857a64c28ea/go.mod h1:y/14LplmA0lLwIDlKiGAZ8OlxQ7OxhaU2dfkYcviLPM= github.com/ava-labs/firewood-go-ethhash/ffi v0.0.12 h1:aMcrLbpJ/dyu2kZDf/Di/4JIWsUcYPyTDKymiHpejt0= From 0d5eb519b9e5f5e69b340061c3d893fe28fe3843 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Mon, 6 Oct 2025 18:09:14 +0300 Subject: [PATCH 04/19] fix: patch calls to ReadChainConfig and WriteChainConfig --- core/bench_test.go | 3 ++- core/genesis.go | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/core/bench_test.go b/core/bench_test.go index 97cdd55a33..4d2a858072 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -253,7 +253,8 @@ func makeChainForBench(db ethdb.Database, genesis *Genesis, full bool, count uin rawdb.WriteCanonicalHash(db, hash, n) if n == 0 { - customrawdb.WriteChainConfig(db, hash, genesis.Config) + extra := params.GetExtra(genesis.Config) + customrawdb.WriteChainConfig(db, hash, genesis.Config, *extra) } rawdb.WriteHeadHeaderHash(db, hash) diff --git a/core/genesis.go b/core/genesis.go index bb60d574ea..569ecdb720 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -181,12 +181,15 @@ func SetupGenesisBlock( if err := newcfg.CheckConfigForkOrder(); err != nil { return newcfg, common.Hash{}, err } - storedcfg := customrawdb.ReadChainConfig(db, stored) + + extra := params.GetExtra(newcfg) + + storedcfg := customrawdb.ReadChainConfig(db, stored, extra) // If there is no previously stored chain config, write the chain config to disk. if storedcfg == nil { // Note: this can happen since we did not previously write the genesis block and chain config in the same batch. log.Warn("Found genesis block without chain config") - customrawdb.WriteChainConfig(db, stored, newcfg) + customrawdb.WriteChainConfig(db, stored, newcfg, *extra) return newcfg, stored, nil } @@ -225,7 +228,7 @@ func SetupGenesisBlock( } // Required to write the chain config to disk to ensure both the chain config and upgrade bytes are persisted to disk. // Note: this intentionally removes an extra check from upstream. - customrawdb.WriteChainConfig(db, stored, newcfg) + customrawdb.WriteChainConfig(db, stored, newcfg, *extra) return newcfg, stored, nil } @@ -401,7 +404,9 @@ func (g *Genesis) Commit(db ethdb.Database, triedb *triedb.Database) (*types.Blo rawdb.WriteCanonicalHash(batch, block.Hash(), block.NumberU64()) rawdb.WriteHeadBlockHash(batch, block.Hash()) rawdb.WriteHeadHeaderHash(batch, block.Hash()) - customrawdb.WriteChainConfig(batch, block.Hash(), config) + + extra := params.GetExtra(config) + customrawdb.WriteChainConfig(batch, block.Hash(), config, *extra) if err := batch.Write(); err != nil { return nil, fmt.Errorf("failed to write genesis block: %w", err) } From 527c0decf79fceb6cdc20f470038924462f38f31 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Mon, 6 Oct 2025 18:44:48 +0300 Subject: [PATCH 05/19] fix(network,core): adapt to avalanchego APIs, fix metrics clash, stabilize chain config I/O - Alias libevm metrics import to evmmetrics and update usages to avoid symbol collision with local metrics in the network and network/stats packages. - Pass a copied extras object into customrawdb ReadChainConfig/WriteChainConfig to avoid data races and shared-mutation bugs under new avalanchego versions. --- core/genesis.go | 14 ++++++++------ network/peer_tracker.go | 14 +++++++------- network/stats/stats.go | 10 +++++----- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index 569ecdb720..291927f39d 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -182,14 +182,15 @@ func SetupGenesisBlock( return newcfg, common.Hash{}, err } - extra := params.GetExtra(newcfg) + // Avoid mutating shared extras attached to newcfg (tests may reuse global configs). + extra := *params.GetExtra(newcfg) - storedcfg := customrawdb.ReadChainConfig(db, stored, extra) + storedcfg := customrawdb.ReadChainConfig(db, stored, &extra) // If there is no previously stored chain config, write the chain config to disk. if storedcfg == nil { // Note: this can happen since we did not previously write the genesis block and chain config in the same batch. log.Warn("Found genesis block without chain config") - customrawdb.WriteChainConfig(db, stored, newcfg, *extra) + customrawdb.WriteChainConfig(db, stored, newcfg, extra) return newcfg, stored, nil } @@ -228,7 +229,7 @@ func SetupGenesisBlock( } // Required to write the chain config to disk to ensure both the chain config and upgrade bytes are persisted to disk. // Note: this intentionally removes an extra check from upstream. - customrawdb.WriteChainConfig(db, stored, newcfg, *extra) + customrawdb.WriteChainConfig(db, stored, newcfg, extra) return newcfg, stored, nil } @@ -405,8 +406,9 @@ func (g *Genesis) Commit(db ethdb.Database, triedb *triedb.Database) (*types.Blo rawdb.WriteHeadBlockHash(batch, block.Hash()) rawdb.WriteHeadHeaderHash(batch, block.Hash()) - extra := params.GetExtra(config) - customrawdb.WriteChainConfig(batch, block.Hash(), config, *extra) + // Avoid mutating shared extras attached to config + extraCommit := *params.GetExtra(config) + customrawdb.WriteChainConfig(batch, block.Hash(), config, extraCommit) if err := batch.Write(); err != nil { return nil, fmt.Errorf("failed to write genesis block: %w", err) } diff --git a/network/peer_tracker.go b/network/peer_tracker.go index 789d22ef52..6b2869bde8 100644 --- a/network/peer_tracker.go +++ b/network/peer_tracker.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/version" "github.com/ava-labs/libevm/log" - "github.com/ava-labs/libevm/metrics" + evmmetrics "github.com/ava-labs/libevm/metrics" // alias to avoid name collision with local 'metrics' in this package safemath "github.com/ava-labs/avalanchego/utils/math" ) @@ -42,24 +42,24 @@ type peerInfo struct { // Note: is not thread safe, caller must handle synchronization. type peerTracker struct { peers map[ids.NodeID]*peerInfo // all peers we are connected to - numTrackedPeers metrics.Gauge + numTrackedPeers evmmetrics.Gauge trackedPeers set.Set[ids.NodeID] // peers that we have sent a request to - numResponsivePeers metrics.Gauge + numResponsivePeers evmmetrics.Gauge responsivePeers set.Set[ids.NodeID] // peers that responded to the last request they were sent bandwidthHeap safemath.AveragerHeap // tracks bandwidth peers are responding with - averageBandwidthMetric metrics.GaugeFloat64 + averageBandwidthMetric evmmetrics.GaugeFloat64 averageBandwidth safemath.Averager } func NewPeerTracker() *peerTracker { return &peerTracker{ peers: make(map[ids.NodeID]*peerInfo), - numTrackedPeers: metrics.GetOrRegisterGauge("net_tracked_peers", nil), + numTrackedPeers: evmmetrics.GetOrRegisterGauge("net_tracked_peers", nil), trackedPeers: make(set.Set[ids.NodeID]), - numResponsivePeers: metrics.GetOrRegisterGauge("net_responsive_peers", nil), + numResponsivePeers: evmmetrics.GetOrRegisterGauge("net_responsive_peers", nil), responsivePeers: make(set.Set[ids.NodeID]), bandwidthHeap: safemath.NewMaxAveragerHeap(), - averageBandwidthMetric: metrics.GetOrRegisterGaugeFloat64("net_average_bandwidth", nil), + averageBandwidthMetric: evmmetrics.GetOrRegisterGaugeFloat64("net_average_bandwidth", nil), averageBandwidth: safemath.NewAverager(0, bandwidthHalflife, time.Now()), } } diff --git a/network/stats/stats.go b/network/stats/stats.go index 3cde2c35db..24d9923230 100644 --- a/network/stats/stats.go +++ b/network/stats/stats.go @@ -6,7 +6,7 @@ package stats import ( "time" - "github.com/ava-labs/libevm/metrics" + evmmetrics "github.com/ava-labs/libevm/metrics" // alias to avoid name collision with local 'metrics' in this package ) // RequestHandlerStats provides the interface for metrics for app requests. @@ -16,8 +16,8 @@ type RequestHandlerStats interface { } type requestHandlerStats struct { - timeUntilDeadline metrics.Timer - droppedRequests metrics.Counter + timeUntilDeadline evmmetrics.Timer + droppedRequests evmmetrics.Counter } func (h *requestHandlerStats) IncDeadlineDroppedRequest() { @@ -30,7 +30,7 @@ func (h *requestHandlerStats) UpdateTimeUntilDeadline(duration time.Duration) { func NewRequestHandlerStats() RequestHandlerStats { return &requestHandlerStats{ - timeUntilDeadline: metrics.GetOrRegisterTimer("net_req_time_until_deadline", nil), - droppedRequests: metrics.GetOrRegisterCounter("net_req_deadline_dropped", nil), + timeUntilDeadline: evmmetrics.GetOrRegisterTimer("net_req_time_until_deadline", nil), + droppedRequests: evmmetrics.GetOrRegisterCounter("net_req_deadline_dropped", nil), } } From b6d83caeac7013446bf8e219abaf345fa76d5fe4 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Mon, 6 Oct 2025 19:11:13 +0300 Subject: [PATCH 06/19] fix: gci lint issue and image build issue --- .dockerignore | 4 ++++ network/peer_tracker.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 6c85e6f6aa..f1b5b745ba 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,3 +7,7 @@ LICENSE *.md +# Exclude Go test files from Docker build context to prevent test-only code being compiled into images +**/*_test.go +# Safeguard for any stray non-_test helper that could be cached/pulled in CI +network/test_network.go diff --git a/network/peer_tracker.go b/network/peer_tracker.go index 6b2869bde8..b61e425688 100644 --- a/network/peer_tracker.go +++ b/network/peer_tracker.go @@ -12,9 +12,9 @@ import ( "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/version" "github.com/ava-labs/libevm/log" - evmmetrics "github.com/ava-labs/libevm/metrics" // alias to avoid name collision with local 'metrics' in this package safemath "github.com/ava-labs/avalanchego/utils/math" + evmmetrics "github.com/ava-labs/libevm/metrics" // alias to avoid name collision with local 'metrics' in this package ) const ( From 6f0e847585400e8712c78e8da2b2e8bb3bc0bc3e Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Mon, 6 Oct 2025 23:45:27 +0300 Subject: [PATCH 07/19] fix(core): use attached extras with avalanchego customrawdb in genesis --- core/genesis.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index 291927f39d..fc9690ec6b 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -182,15 +182,14 @@ func SetupGenesisBlock( return newcfg, common.Hash{}, err } - // Avoid mutating shared extras attached to newcfg (tests may reuse global configs). - extra := *params.GetExtra(newcfg) - - storedcfg := customrawdb.ReadChainConfig(db, stored, &extra) + // Use the attached extras pointer to ensure upgrade bytes round-trip correctly. + extra := params.GetExtra(newcfg) + storedcfg := customrawdb.ReadChainConfig(db, stored, extra) // If there is no previously stored chain config, write the chain config to disk. if storedcfg == nil { // Note: this can happen since we did not previously write the genesis block and chain config in the same batch. log.Warn("Found genesis block without chain config") - customrawdb.WriteChainConfig(db, stored, newcfg, extra) + customrawdb.WriteChainConfig(db, stored, newcfg, *extra) return newcfg, stored, nil } @@ -229,7 +228,7 @@ func SetupGenesisBlock( } // Required to write the chain config to disk to ensure both the chain config and upgrade bytes are persisted to disk. // Note: this intentionally removes an extra check from upstream. - customrawdb.WriteChainConfig(db, stored, newcfg, extra) + customrawdb.WriteChainConfig(db, stored, newcfg, *extra) return newcfg, stored, nil } @@ -406,9 +405,8 @@ func (g *Genesis) Commit(db ethdb.Database, triedb *triedb.Database) (*types.Blo rawdb.WriteHeadBlockHash(batch, block.Hash()) rawdb.WriteHeadHeaderHash(batch, block.Hash()) - // Avoid mutating shared extras attached to config - extraCommit := *params.GetExtra(config) - customrawdb.WriteChainConfig(batch, block.Hash(), config, extraCommit) + extra := params.GetExtra(config) + customrawdb.WriteChainConfig(batch, block.Hash(), config, *extra) if err := batch.Write(); err != nil { return nil, fmt.Errorf("failed to write genesis block: %w", err) } From a313b3eca6c73442d19b1dcadfe425a050d80036 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Tue, 7 Oct 2025 00:01:31 +0300 Subject: [PATCH 08/19] fix: clean build context and support no-cache builds to avoid stale files --- core/genesis.go | 10 +++++----- scripts/build_docker_image.sh | 15 ++++++++++++++- scripts/tests.build_docker_image.sh | 2 ++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index fc9690ec6b..b53475f6cb 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -182,14 +182,14 @@ func SetupGenesisBlock( return newcfg, common.Hash{}, err } - // Use the attached extras pointer to ensure upgrade bytes round-trip correctly. - extra := params.GetExtra(newcfg) - storedcfg := customrawdb.ReadChainConfig(db, stored, extra) + // Read stored config into a local extras copy to avoid mutating shared extras concurrently. + extraCopy := *params.GetExtra(newcfg) + storedcfg := customrawdb.ReadChainConfig(db, stored, &extraCopy) // If there is no previously stored chain config, write the chain config to disk. if storedcfg == nil { // Note: this can happen since we did not previously write the genesis block and chain config in the same batch. log.Warn("Found genesis block without chain config") - customrawdb.WriteChainConfig(db, stored, newcfg, *extra) + customrawdb.WriteChainConfig(db, stored, newcfg, *params.GetExtra(newcfg)) return newcfg, stored, nil } @@ -228,7 +228,7 @@ func SetupGenesisBlock( } // Required to write the chain config to disk to ensure both the chain config and upgrade bytes are persisted to disk. // Note: this intentionally removes an extra check from upstream. - customrawdb.WriteChainConfig(db, stored, newcfg, *extra) + customrawdb.WriteChainConfig(db, stored, newcfg, *params.GetExtra(newcfg)) return newcfg, stored, nil } diff --git a/scripts/build_docker_image.sh b/scripts/build_docker_image.sh index 6d8779575b..c28dccc4c1 100755 --- a/scripts/build_docker_image.sh +++ b/scripts/build_docker_image.sh @@ -2,6 +2,19 @@ set -euo pipefail +# If set, ensure a clean git workspace before building to avoid stray files in context +if [[ -n "${CLEAN_CONTEXT:-}" ]]; then + echo "Cleaning build context (git clean -fdx)" + git -C "$(dirname "$0")/.." clean -fdx +fi + +# If set, disable build cache for docker buildx +if [[ -n "${NO_CACHE:-}" ]]; then + DOCKER_NO_CACHE="--no-cache" +else + DOCKER_NO_CACHE="" +fi + # If set to non-empty, prompts the building of a multi-arch image when the image # name indicates use of a registry. # @@ -34,7 +47,7 @@ ALLOW_TAG_LATEST="${ALLOW_TAG_LATEST:-}" # simplifies creation of multi-arch images. # # Reference: https://docs.docker.com/build/buildkit/ -DOCKER_CMD="docker buildx build" +DOCKER_CMD="docker buildx build ${DOCKER_NO_CACHE}" ispush=0 if [[ -n "${PUBLISH}" ]]; then echo "Pushing $IMAGE_NAME:$BUILD_IMAGE_ID" diff --git a/scripts/tests.build_docker_image.sh b/scripts/tests.build_docker_image.sh index fb91304fae..1de8449cb5 100755 --- a/scripts/tests.build_docker_image.sh +++ b/scripts/tests.build_docker_image.sh @@ -36,6 +36,8 @@ build_and_test() { VM_ID=$"${vm_id}" \ IMAGE_NAME="${imagename}" \ AVALANCHEGO_LOCAL_IMAGE_NAME="${avalanchego_local_image_name}" \ + CLEAN_CONTEXT=1 \ + NO_CACHE=1 \ ./scripts/build_docker_image.sh echo "listing images" From 517b563fa9f6a118033f8b7705b91870ec19c049 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Tue, 7 Oct 2025 00:48:00 +0300 Subject: [PATCH 09/19] fix(core/genesis): persist upgrade bytes before compat checks - Also modify Dockerfile to isolate the avalanchego source to not become part of the build context of the main project. - Revert the previous docker related changes. --- .dockerignore | 4 ---- Dockerfile | 20 ++++++++++++++------ compatibility.json | 20 ++++++++++---------- core/genesis.go | 22 +++++++++++++++------- network/peer_tracker.go | 14 +++++++------- network/stats/stats.go | 10 +++++----- scripts/build_docker_image.sh | 15 +-------------- scripts/tests.build_docker_image.sh | 2 -- 8 files changed, 52 insertions(+), 55 deletions(-) diff --git a/.dockerignore b/.dockerignore index f1b5b745ba..6c85e6f6aa 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,7 +7,3 @@ LICENSE *.md -# Exclude Go test files from Docker build context to prevent test-only code being compiled into images -**/*_test.go -# Safeguard for any stray non-_test helper that could be cached/pulled in CI -network/test_network.go diff --git a/Dockerfile b/Dockerfile index 81e752a248..a40d3509f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,19 +8,27 @@ FROM --platform=$BUILDPLATFORM golang:1.24.7-bookworm AS builder WORKDIR /build -# Copy avalanche dependencies first (intermediate docker image caching) -# Copy avalanchego directory if present (for manual CI case, which uses local dependency) -COPY go.mod go.sum avalanchego* ./ -# Download avalanche dependencies using go mod -RUN go mod download && go mod tidy +# Copy module files first (improves Docker layer caching) +COPY go.mod go.sum ./ +# Download module dependencies +RUN go mod download # Copy the code into the container COPY . . +# If a local avalanchego source directory is present in the repository (manual CI case), +# move it outside the module root and update the replace directive to point to it so +# avalanchego sources are not flattened into this module's package tree. +RUN if [ -d ./avalanchego ]; then \ + mkdir -p /third_party && \ + mv ./avalanchego /third_party/avalanchego && \ + go mod edit -replace github.com/ava-labs/avalanchego=./third_party/avalanchego && \ + go mod tidy; \ +fi + # Ensure pre-existing builds are not available for inclusion in the final image RUN [ -d ./build ] && rm -rf ./build/* || true - ARG TARGETPLATFORM ARG BUILDPLATFORM diff --git a/compatibility.json b/compatibility.json index d62309fe03..43077e7bd3 100644 --- a/compatibility.json +++ b/compatibility.json @@ -1,15 +1,15 @@ { "rpcChainVMProtocolVersion": { + "v0.7.0": 38, + "v0.7.1": 39, "v0.7.10": 43, - "v0.7.9": 43, - "v0.7.8": 43, - "v0.7.7": 42, - "v0.7.6": 42, - "v0.7.5": 41, - "v0.7.4": 40, - "v0.7.3": 39, "v0.7.2": 39, - "v0.7.1": 39, - "v0.7.0": 38 + "v0.7.3": 39, + "v0.7.4": 40, + "v0.7.5": 41, + "v0.7.6": 42, + "v0.7.7": 42, + "v0.7.8": 43, + "v0.7.9": 43 } -} \ No newline at end of file +} diff --git a/core/genesis.go b/core/genesis.go index b53475f6cb..6a17495f4c 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -182,17 +182,26 @@ func SetupGenesisBlock( return newcfg, common.Hash{}, err } - // Read stored config into a local extras copy to avoid mutating shared extras concurrently. - extraCopy := *params.GetExtra(newcfg) - storedcfg := customrawdb.ReadChainConfig(db, stored, &extraCopy) + // Read stored config. We'll persist the new config (including upgrade bytes) + // prior to compatibility checks to ensure on-disk state is up to date. + extra := params.GetExtra(newcfg) + storedcfg := customrawdb.ReadChainConfig(db, stored, extra) // If there is no previously stored chain config, write the chain config to disk. if storedcfg == nil { // Note: this can happen since we did not previously write the genesis block and chain config in the same batch. log.Warn("Found genesis block without chain config") - customrawdb.WriteChainConfig(db, stored, newcfg, *params.GetExtra(newcfg)) + customrawdb.WriteChainConfig(db, stored, newcfg, *extra) return newcfg, stored, nil } + // Persist the new chain config (and upgrade bytes) to disk now to avoid + // spurious compatibility failures due to missing upgrade bytes on older databases. + customrawdb.WriteChainConfig(db, stored, newcfg, *extra) + + // Re-read stored config into a fresh extras copy for a clean comparison. + storedExtra := *params.GetExtra(newcfg) + storedcfg = customrawdb.ReadChainConfig(db, stored, &storedExtra) + // Notes on the following line: // - this is needed in coreth to handle the case where existing nodes do not // have the Berlin or London forks initialized by block number on disk. @@ -226,9 +235,8 @@ func SetupGenesisBlock( return newcfg, stored, compatErr } } - // Required to write the chain config to disk to ensure both the chain config and upgrade bytes are persisted to disk. - // Note: this intentionally removes an extra check from upstream. - customrawdb.WriteChainConfig(db, stored, newcfg, *params.GetExtra(newcfg)) + // Chain config has already been written above. + // Write is idempotent but not required here. return newcfg, stored, nil } diff --git a/network/peer_tracker.go b/network/peer_tracker.go index b61e425688..789d22ef52 100644 --- a/network/peer_tracker.go +++ b/network/peer_tracker.go @@ -12,9 +12,9 @@ import ( "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/version" "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/metrics" safemath "github.com/ava-labs/avalanchego/utils/math" - evmmetrics "github.com/ava-labs/libevm/metrics" // alias to avoid name collision with local 'metrics' in this package ) const ( @@ -42,24 +42,24 @@ type peerInfo struct { // Note: is not thread safe, caller must handle synchronization. type peerTracker struct { peers map[ids.NodeID]*peerInfo // all peers we are connected to - numTrackedPeers evmmetrics.Gauge + numTrackedPeers metrics.Gauge trackedPeers set.Set[ids.NodeID] // peers that we have sent a request to - numResponsivePeers evmmetrics.Gauge + numResponsivePeers metrics.Gauge responsivePeers set.Set[ids.NodeID] // peers that responded to the last request they were sent bandwidthHeap safemath.AveragerHeap // tracks bandwidth peers are responding with - averageBandwidthMetric evmmetrics.GaugeFloat64 + averageBandwidthMetric metrics.GaugeFloat64 averageBandwidth safemath.Averager } func NewPeerTracker() *peerTracker { return &peerTracker{ peers: make(map[ids.NodeID]*peerInfo), - numTrackedPeers: evmmetrics.GetOrRegisterGauge("net_tracked_peers", nil), + numTrackedPeers: metrics.GetOrRegisterGauge("net_tracked_peers", nil), trackedPeers: make(set.Set[ids.NodeID]), - numResponsivePeers: evmmetrics.GetOrRegisterGauge("net_responsive_peers", nil), + numResponsivePeers: metrics.GetOrRegisterGauge("net_responsive_peers", nil), responsivePeers: make(set.Set[ids.NodeID]), bandwidthHeap: safemath.NewMaxAveragerHeap(), - averageBandwidthMetric: evmmetrics.GetOrRegisterGaugeFloat64("net_average_bandwidth", nil), + averageBandwidthMetric: metrics.GetOrRegisterGaugeFloat64("net_average_bandwidth", nil), averageBandwidth: safemath.NewAverager(0, bandwidthHalflife, time.Now()), } } diff --git a/network/stats/stats.go b/network/stats/stats.go index 24d9923230..3cde2c35db 100644 --- a/network/stats/stats.go +++ b/network/stats/stats.go @@ -6,7 +6,7 @@ package stats import ( "time" - evmmetrics "github.com/ava-labs/libevm/metrics" // alias to avoid name collision with local 'metrics' in this package + "github.com/ava-labs/libevm/metrics" ) // RequestHandlerStats provides the interface for metrics for app requests. @@ -16,8 +16,8 @@ type RequestHandlerStats interface { } type requestHandlerStats struct { - timeUntilDeadline evmmetrics.Timer - droppedRequests evmmetrics.Counter + timeUntilDeadline metrics.Timer + droppedRequests metrics.Counter } func (h *requestHandlerStats) IncDeadlineDroppedRequest() { @@ -30,7 +30,7 @@ func (h *requestHandlerStats) UpdateTimeUntilDeadline(duration time.Duration) { func NewRequestHandlerStats() RequestHandlerStats { return &requestHandlerStats{ - timeUntilDeadline: evmmetrics.GetOrRegisterTimer("net_req_time_until_deadline", nil), - droppedRequests: evmmetrics.GetOrRegisterCounter("net_req_deadline_dropped", nil), + timeUntilDeadline: metrics.GetOrRegisterTimer("net_req_time_until_deadline", nil), + droppedRequests: metrics.GetOrRegisterCounter("net_req_deadline_dropped", nil), } } diff --git a/scripts/build_docker_image.sh b/scripts/build_docker_image.sh index c28dccc4c1..6d8779575b 100755 --- a/scripts/build_docker_image.sh +++ b/scripts/build_docker_image.sh @@ -2,19 +2,6 @@ set -euo pipefail -# If set, ensure a clean git workspace before building to avoid stray files in context -if [[ -n "${CLEAN_CONTEXT:-}" ]]; then - echo "Cleaning build context (git clean -fdx)" - git -C "$(dirname "$0")/.." clean -fdx -fi - -# If set, disable build cache for docker buildx -if [[ -n "${NO_CACHE:-}" ]]; then - DOCKER_NO_CACHE="--no-cache" -else - DOCKER_NO_CACHE="" -fi - # If set to non-empty, prompts the building of a multi-arch image when the image # name indicates use of a registry. # @@ -47,7 +34,7 @@ ALLOW_TAG_LATEST="${ALLOW_TAG_LATEST:-}" # simplifies creation of multi-arch images. # # Reference: https://docs.docker.com/build/buildkit/ -DOCKER_CMD="docker buildx build ${DOCKER_NO_CACHE}" +DOCKER_CMD="docker buildx build" ispush=0 if [[ -n "${PUBLISH}" ]]; then echo "Pushing $IMAGE_NAME:$BUILD_IMAGE_ID" diff --git a/scripts/tests.build_docker_image.sh b/scripts/tests.build_docker_image.sh index 1de8449cb5..fb91304fae 100755 --- a/scripts/tests.build_docker_image.sh +++ b/scripts/tests.build_docker_image.sh @@ -36,8 +36,6 @@ build_and_test() { VM_ID=$"${vm_id}" \ IMAGE_NAME="${imagename}" \ AVALANCHEGO_LOCAL_IMAGE_NAME="${avalanchego_local_image_name}" \ - CLEAN_CONTEXT=1 \ - NO_CACHE=1 \ ./scripts/build_docker_image.sh echo "listing images" From 4304438ac9c3abf643d36aade9de8ee63bafc422 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Tue, 7 Oct 2025 01:23:11 +0300 Subject: [PATCH 10/19] fix(core/genesis): more fixes - Read stored config using a local copy of extras to avoid data races. - Still write using the attached extras to persist upgrade bytes. - Re-read with a fresh copy for compatibility comparison. --- core/genesis.go | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index 6a17495f4c..61929b1f09 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -182,32 +182,34 @@ func SetupGenesisBlock( return newcfg, common.Hash{}, err } - // Read stored config. We'll persist the new config (including upgrade bytes) - // prior to compatibility checks to ensure on-disk state is up to date. - extra := params.GetExtra(newcfg) - storedcfg := customrawdb.ReadChainConfig(db, stored, extra) + // Read stored config into a local extras copy to avoid mutating the + // caller's attached extras (which may be concurrently accessed in tests). + // We'll persist the new config (including upgrade bytes) using the attached + // extras below to ensure on-disk state is up to date. + readExtra := *params.GetExtra(newcfg) + storedCfg := customrawdb.ReadChainConfig(db, stored, &readExtra) // If there is no previously stored chain config, write the chain config to disk. - if storedcfg == nil { + if storedCfg == nil { // Note: this can happen since we did not previously write the genesis block and chain config in the same batch. log.Warn("Found genesis block without chain config") - customrawdb.WriteChainConfig(db, stored, newcfg, *extra) + customrawdb.WriteChainConfig(db, stored, newcfg, *params.GetExtra(newcfg)) return newcfg, stored, nil } // Persist the new chain config (and upgrade bytes) to disk now to avoid // spurious compatibility failures due to missing upgrade bytes on older databases. - customrawdb.WriteChainConfig(db, stored, newcfg, *extra) + customrawdb.WriteChainConfig(db, stored, newcfg, *params.GetExtra(newcfg)) // Re-read stored config into a fresh extras copy for a clean comparison. - storedExtra := *params.GetExtra(newcfg) - storedcfg = customrawdb.ReadChainConfig(db, stored, &storedExtra) + compareExtra := *params.GetExtra(newcfg) + storedCfg = customrawdb.ReadChainConfig(db, stored, &compareExtra) // Notes on the following line: // - this is needed in coreth to handle the case where existing nodes do not // have the Berlin or London forks initialized by block number on disk. // See https://github.com/ava-labs/coreth/pull/667/files // - this is not needed in subnet-evm but it does not impact it either - if err := params.SetEthUpgrades(storedcfg); err != nil { + if err := params.SetEthUpgrades(storedCfg); err != nil { return genesis.Config, common.Hash{}, err } // Check config compatibility and write the config. Compatibility errors @@ -227,9 +229,9 @@ func SetupGenesisBlock( if skipChainConfigCheckCompatible { log.Info("skipping verifying activated network upgrades on chain config") } else { - compatErr := storedcfg.CheckCompatible(newcfg, height, timestamp) + compatErr := storedCfg.CheckCompatible(newcfg, height, timestamp) if compatErr != nil && ((height != 0 && compatErr.RewindToBlock != 0) || (timestamp != 0 && compatErr.RewindToTime != 0)) { - storedData, _ := params.ToWithUpgradesJSON(storedcfg).MarshalJSON() + storedData, _ := params.ToWithUpgradesJSON(storedCfg).MarshalJSON() newData, _ := params.ToWithUpgradesJSON(newcfg).MarshalJSON() log.Error("found mismatch between config on database vs. new config", "storedConfig", string(storedData), "newConfig", string(newData), "err", compatErr) return newcfg, stored, compatErr From 5a5b126501e0a73f2ae3d84a12c4417900f7cc47 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Tue, 7 Oct 2025 02:24:17 +0300 Subject: [PATCH 11/19] fix(core, docker, scripts): robust genesis compat handling, isolate local avalanchego, sort comm inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - core/genesis: - Persist upgrade bytes only when height == 0, otherwise write after compatibility check passes. - Reconcile precompile-only incompatibilities by persisting upgrade metadata and proceeding. - docker: - Only move and replace local avalanchego when it’s a standalone module (./avalanchego/go.mod), avoiding accidental source flattening. - scripts: - Sort right-hand inputs to comm in build_test.sh and lint_allowed_eth_imports.sh to eliminate “comm: input is not in sorted order”. --- Dockerfile | 7 +- core/genesis.go | 105 +++++++++++++++++++++------- scripts/build_test.sh | 6 +- scripts/lint_allowed_eth_imports.sh | 2 +- 4 files changed, 85 insertions(+), 35 deletions(-) diff --git a/Dockerfile b/Dockerfile index a40d3509f5..f9828a292a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,9 @@ RUN go mod download # Copy the code into the container COPY . . -# If a local avalanchego source directory is present in the repository (manual CI case), -# move it outside the module root and update the replace directive to point to it so -# avalanchego sources are not flattened into this module's package tree. -RUN if [ -d ./avalanchego ]; then \ +# If a local avalanchego module is present, move it out of the module tree and +# point the replace directive at it to avoid flattening into this module's packages. +RUN if [ -f ./avalanchego/go.mod ]; then \ mkdir -p /third_party && \ mv ./avalanchego /third_party/avalanchego && \ go mod edit -replace github.com/ava-labs/avalanchego=./third_party/avalanchego && \ diff --git a/core/genesis.go b/core/genesis.go index 61929b1f09..93f4a43563 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -32,6 +32,7 @@ import ( "errors" "fmt" "math/big" + "strings" "time" "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" @@ -177,33 +178,25 @@ func SetupGenesisBlock( return genesis.Config, common.Hash{}, &GenesisMismatchError{stored, hash} } // Get the existing chain configuration. - newcfg := genesis.Config - if err := newcfg.CheckConfigForkOrder(); err != nil { - return newcfg, common.Hash{}, err + newCfg := genesis.Config + if err := newCfg.CheckConfigForkOrder(); err != nil { + return newCfg, common.Hash{}, err } // Read stored config into a local extras copy to avoid mutating the // caller's attached extras (which may be concurrently accessed in tests). // We'll persist the new config (including upgrade bytes) using the attached // extras below to ensure on-disk state is up to date. - readExtra := *params.GetExtra(newcfg) + readExtra := *params.GetExtra(newCfg) storedCfg := customrawdb.ReadChainConfig(db, stored, &readExtra) // If there is no previously stored chain config, write the chain config to disk. if storedCfg == nil { // Note: this can happen since we did not previously write the genesis block and chain config in the same batch. log.Warn("Found genesis block without chain config") - customrawdb.WriteChainConfig(db, stored, newcfg, *params.GetExtra(newcfg)) - return newcfg, stored, nil + customrawdb.WriteChainConfig(db, stored, newCfg, *params.GetExtra(newCfg)) + return newCfg, stored, nil } - // Persist the new chain config (and upgrade bytes) to disk now to avoid - // spurious compatibility failures due to missing upgrade bytes on older databases. - customrawdb.WriteChainConfig(db, stored, newcfg, *params.GetExtra(newcfg)) - - // Re-read stored config into a fresh extras copy for a clean comparison. - compareExtra := *params.GetExtra(newcfg) - storedCfg = customrawdb.ReadChainConfig(db, stored, &compareExtra) - // Notes on the following line: // - this is needed in coreth to handle the case where existing nodes do not // have the Berlin or London forks initialized by block number on disk. @@ -222,24 +215,31 @@ func SetupGenesisBlock( // when we start syncing from scratch, the last accepted block // will be genesis block if lastBlock == nil { - return newcfg, common.Hash{}, errors.New("missing last accepted block") + return newCfg, common.Hash{}, errors.New("missing last accepted block") } height := lastBlock.NumberU64() timestamp := lastBlock.Time() - if skipChainConfigCheckCompatible { - log.Info("skipping verifying activated network upgrades on chain config") - } else { - compatErr := storedCfg.CheckCompatible(newcfg, height, timestamp) - if compatErr != nil && ((height != 0 && compatErr.RewindToBlock != 0) || (timestamp != 0 && compatErr.RewindToTime != 0)) { - storedData, _ := params.ToWithUpgradesJSON(storedCfg).MarshalJSON() - newData, _ := params.ToWithUpgradesJSON(newcfg).MarshalJSON() - log.Error("found mismatch between config on database vs. new config", "storedConfig", string(storedData), "newConfig", string(newData), "err", compatErr) - return newcfg, stored, compatErr + + // If the chain hasn't advanced past genesis (height 0), persist the new + // chain config (including upgrade bytes) before compatibility checks so + // subsequent restarts see the updated upgrades and do not flag them as + // retroactive enables. + if height == 0 { + storedCfg = persistChainConfigAndReload(db, stored, newCfg) + } + + if !skipChainConfigCheckCompatible { + if _, err := reconcileCompatibility(db, stored, storedCfg, newCfg, height, timestamp); err != nil { + logCompatibilityMismatch(storedCfg, newCfg, err) + return newCfg, stored, err } + } else { + log.Info("skipping verifying activated network upgrades on chain config") } - // Chain config has already been written above. - // Write is idempotent but not required here. - return newcfg, stored, nil + + // Persist the new chain config (including upgrade bytes) now that compatibility is verified. + customrawdb.WriteChainConfig(db, stored, newCfg, *params.GetExtra(newCfg)) + return newCfg, stored, nil } // IsVerkle indicates whether the state is already stored in a verkle @@ -468,3 +468,54 @@ func ReadBlockByHash(db ethdb.Reader, hash common.Hash) *types.Block { } return rawdb.ReadBlock(db, hash, *blockNumber) } + +// reconcileCompatibility checks compatibility between the stored and new chain configs. +// If the only incompatibility is missing precompile upgrade metadata, it persists the +// new config (including upgrade bytes) and returns a refreshed stored config view. +// Otherwise, it returns the compatibility error. +func reconcileCompatibility( + db ethdb.Database, + genesisHash common.Hash, + storedCfg *params.ChainConfig, + newCfg *params.ChainConfig, + height uint64, + timestamp uint64, +) (*params.ChainConfig, error) { + compatErr := storedCfg.CheckCompatible(newCfg, height, timestamp) + needsRewind := compatErr != nil && ((height != 0 && compatErr.RewindToBlock != 0) || (timestamp != 0 && compatErr.RewindToTime != 0)) + if !needsRewind { + return storedCfg, nil + } + if !isPrecompileUpgradeOnlyIncompatibility(compatErr) { + return nil, compatErr + } + // Only precompile upgrade metadata differs: write upgrades and proceed. + refreshed := persistChainConfigAndReload(db, genesisHash, newCfg) + return refreshed, nil +} + +// persistChainConfigAndReload writes the provided chain config (including upgrade bytes) +// and returns a fresh view of the stored config using a separate extras copy. +func persistChainConfigAndReload(db ethdb.Database, genesisHash common.Hash, cfg *params.ChainConfig) *params.ChainConfig { + customrawdb.WriteChainConfig(db, genesisHash, cfg, *params.GetExtra(cfg)) + refreshedExtra := *params.GetExtra(cfg) + return customrawdb.ReadChainConfig(db, genesisHash, &refreshedExtra) +} + +// isPrecompileUpgradeOnlyIncompatibility returns true if the compatibility error +// pertains exclusively to precompile upgrade activation metadata being absent on disk. +// In such cases, persisting the new chain config (including upgrade bytes) resolves +// the mismatch without requiring a rewind. +func isPrecompileUpgradeOnlyIncompatibility(err *ethparams.ConfigCompatError) bool { + if err == nil { + return false + } + return strings.Contains(err.What, "PrecompileUpgrade[") +} + +// logCompatibilityMismatch emits a structured error comparing stored and new configs. +func logCompatibilityMismatch(storedCfg, newCfg *params.ChainConfig, err error) { + storedData, _ := params.ToWithUpgradesJSON(storedCfg).MarshalJSON() + newData, _ := params.ToWithUpgradesJSON(newCfg).MarshalJSON() + log.Error("found mismatch between config on database vs. new config", "storedConfig", string(storedData), "newConfig", string(newData), "err", err) +} diff --git a/scripts/build_test.sh b/scripts/build_test.sh index aad40d42e4..e0e4fdd101 100755 --- a/scripts/build_test.sh +++ b/scripts/build_test.sh @@ -34,7 +34,7 @@ do if [[ ${command_status:-0} == 0 ]]; then rm test.out exit 0 - else + else unset command_status # Clear the error code for the next run fi @@ -42,7 +42,7 @@ do unexpected_failures=$( # First grep pattern corresponds to test failures, second pattern corresponds to test panics due to timeouts (grep "^--- FAIL" test.out | awk '{print $3}' || grep -E '^\s+Test.+ \(' test.out | awk '{print $1}') | - sort -u | comm -23 - <(sed 's/\r$//' ./scripts/known_flakes.txt) + sort -u | comm -23 - <(sed 's/\r$//' ./scripts/known_flakes.txt | sort -u) ) if [ -n "${unexpected_failures}" ]; then echo "Unexpected test failures: ${unexpected_failures}" @@ -56,4 +56,4 @@ do done # If we reach here, we have failed all retries -exit 1 \ No newline at end of file +exit 1 diff --git a/scripts/lint_allowed_eth_imports.sh b/scripts/lint_allowed_eth_imports.sh index 50e005e7ed..4069721d70 100755 --- a/scripts/lint_allowed_eth_imports.sh +++ b/scripts/lint_allowed_eth_imports.sh @@ -15,7 +15,7 @@ extra_imports=$(find . -type f \( -name "*.go" \) ! -name "mocks.go" ! -path "si grep -v 'eth\w\+ "' | grep -v '_ "' | grep -o "${libevm_regexp}" | - sort -u | comm -23 - ./scripts/eth-allowed-packages.txt) + sort -u | comm -23 - <(sort -u ./scripts/eth-allowed-packages.txt)) if [ -n "${extra_imports}" ]; then echo "new ethereum imports should be added to ./scripts/eth-allowed-packages.txt to prevent accidental imports:" echo "${extra_imports}" From e9ecb8c11cc4615b19bc37e5804c1e0937cc9922 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Tue, 7 Oct 2025 13:59:08 +0300 Subject: [PATCH 12/19] build(docker): simplify local avalanchego handling in Dockerfile - Move ./avalanchego to /third_party if present. - Always dropreplace first; conditionally add replace if go.mod exists. - Run go mod tidy after edits. --- Dockerfile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index f9828a292a..42579193d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,13 +16,18 @@ RUN go mod download # Copy the code into the container COPY . . -# If a local avalanchego module is present, move it out of the module tree and -# point the replace directive at it to avoid flattening into this module's packages. -RUN if [ -f ./avalanchego/go.mod ]; then \ - mkdir -p /third_party && \ - mv ./avalanchego /third_party/avalanchego && \ - go mod edit -replace github.com/ava-labs/avalanchego=./third_party/avalanchego && \ - go mod tidy; \ +# Ensure we never keep a stale local replace when no local module is present +RUN go mod edit -dropreplace github.com/ava-labs/avalanchego || true + +# If a local avalanchego source dir is present, move it outside the module tree. +# Only add a replace if the moved directory is a standalone module with go.mod, +# otherwise drop any existing replace so upstream is used. +RUN if [ -d ./avalanchego ]; then \ + mkdir -p /third_party && mv ./avalanchego /third_party/avalanchego; \ + if [ -f /third_party/avalanchego/go.mod ]; then \ + go mod edit -replace github.com/ava-labs/avalanchego=/third_party/avalanchego; \ + go mod tidy; \ + fi; \ fi # Ensure pre-existing builds are not available for inclusion in the final image From 68faeea9bb447285740145553789f311639fc308 Mon Sep 17 00:00:00 2001 From: Jonathan Oppenheimer Date: Tue, 7 Oct 2025 10:39:20 -0400 Subject: [PATCH 13/19] sync: coreth PR #1214: ci: update taskfile for rlpgen (#1760) Co-authored-by: Austin Larson <78000745+alarso16@users.noreply.github.com> Co-authored-by: Michael Kaplan <55204436+michaelkaplan13@users.noreply.github.com> --- Taskfile.yml | 14 ++++++++++++++ .../evm/customtypes/gen_header_serializable_rlp.go | 7 ++----- plugin/evm/customtypes/header_ext.go | 5 ++++- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index b5b730a15e..80ce894b59 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -62,6 +62,12 @@ tasks: - task: generate-mocks - task: check-clean-branch + check-generate-rlp: + desc: Checks that generated rlp files are up-to-date (requires a clean git working tree) + cmds: + - task: generate-rlp + - task: check-clean-branch + check-go-mod-tidy: desc: Checks that go.mod and go.sum are up-to-date (requires a clean git working tree) cmds: @@ -83,6 +89,12 @@ tasks: cmds: - cmd: grep -lr -E '^// Code generated by MockGen\. DO NOT EDIT\.$' . | xargs -r rm - cmd: go generate -run "go.uber.org/mock/mockgen" ./... + + generate-rlp: + desc: Generates rlp files + cmds: + - cmd: grep -lr -E '^// Code generated by rlpgen\. DO NOT EDIT.\.$' . | xargs -r rm + - cmd: go generate -run "github.com/ava-labs/libevm/rlp/rlpgen" ./... install-avalanchego-release: desc: Download and install AvalancheGo release binary for testing, with fallback to building from source @@ -100,6 +112,7 @@ tasks: - shellcheck - check-generate-codec - check-generate-mocks + - check-generate-rlp lint-all-ci: desc: Runs all lint checks one-by-one @@ -109,6 +122,7 @@ tasks: - task: shellcheck - task: check-generate-codec - task: check-generate-mocks + - task: check-generate-rlp setup-contracts: desc: Set up contracts by installing NPM dependencies, cleaning Hardhat cache, and compiling contracts diff --git a/plugin/evm/customtypes/gen_header_serializable_rlp.go b/plugin/evm/customtypes/gen_header_serializable_rlp.go index 316dc79f5c..86583e6a14 100644 --- a/plugin/evm/customtypes/gen_header_serializable_rlp.go +++ b/plugin/evm/customtypes/gen_header_serializable_rlp.go @@ -2,11 +2,8 @@ package customtypes -import ( - "io" - - "github.com/ava-labs/libevm/rlp" -) +import "github.com/ava-labs/libevm/rlp" +import "io" func (obj *HeaderSerializable) EncodeRLP(_w io.Writer) error { w := rlp.NewEncoderBuffer(_w) diff --git a/plugin/evm/customtypes/header_ext.go b/plugin/evm/customtypes/header_ext.go index f3ec26c8ee..de890bc4d4 100644 --- a/plugin/evm/customtypes/header_ext.go +++ b/plugin/evm/customtypes/header_ext.go @@ -156,8 +156,11 @@ func (h *HeaderSerializable) updateToExtras(extras *HeaderExtra) { extras.TimeMilliseconds = h.TimeMilliseconds } +// NOTE: both generators currently do not support type aliases. +// We are using custom versions of these programs for now to support type aliases, +// see https://github.com/ava-labs/coreth/pull/746#discussion_r1969673252 //go:generate go run github.com/fjl/gencodec -type HeaderSerializable -field-override headerMarshaling -out gen_header_serializable_json.go -//go:generate go run github.com/ava-labs/libevm/rlp/rlpgen@739ba847f6f407f63fd6a24175b24e56fea583a1 -type HeaderSerializable -out gen_header_serializable_rlp.go +//go:generate go run github.com/ava-labs/libevm/rlp/rlpgen -type HeaderSerializable -out gen_header_serializable_rlp.go // HeaderSerializable defines the header of a block in the Ethereum blockchain, // as it is to be serialized into RLP and JSON. Note it must be exported so that From 1792a3a6c3f06c806802df92b3678e1db8bd4909 Mon Sep 17 00:00:00 2001 From: Jonathan Oppenheimer Date: Tue, 7 Oct 2025 11:12:41 -0400 Subject: [PATCH 14/19] sync: coreth PR #1217: have `checkPredicates` account for maximum available gas capacity (#1772) --- consensus/dummy/consensus.go | 5 +- plugin/evm/vm_test.go | 174 +++++++++++++++++++++++++++++++++++ plugin/evm/wrapped_block.go | 64 ++++++++++++- 3 files changed, 239 insertions(+), 4 deletions(-) diff --git a/consensus/dummy/consensus.go b/consensus/dummy/consensus.go index 383e45ca8a..a67a26bfb1 100644 --- a/consensus/dummy/consensus.go +++ b/consensus/dummy/consensus.go @@ -106,9 +106,8 @@ func verifyHeaderGasFields(config *extras.ChainConfig, header *types.Header, par if err != nil { return err } - if err := customheader.VerifyGasUsed(config, feeConfig, parent, header); err != nil { - return err - } + // Verifying the gas used occurs earlier in the block validation process in verifyIntrinsicGas, so + // customheader.VerifyGasUsed is not called here. if err := customheader.VerifyGasLimit(config, feeConfig, parent, header); err != nil { return err } diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go index 3c1629a4b3..98d6efabdb 100644 --- a/plugin/evm/vm_test.go +++ b/plugin/evm/vm_test.go @@ -25,16 +25,22 @@ import ( "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/consensus/snowman" "github.com/ava-labs/avalanchego/snow/engine/enginetest" + "github.com/ava-labs/avalanchego/snow/engine/snowman/block" "github.com/ava-labs/avalanchego/snow/snowtest" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/upgrade/upgradetest" "github.com/ava-labs/avalanchego/utils/crypto/secp256k1" + "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/vms/components/chain" + "github.com/ava-labs/avalanchego/vms/evm/predicate" "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" + "github.com/ava-labs/avalanchego/vms/platformvm/warp/payload" "github.com/ava-labs/libevm/common" + "github.com/ava-labs/libevm/common/math" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" "github.com/ava-labs/libevm/log" + "github.com/ava-labs/libevm/rlp" "github.com/ava-labs/libevm/trie" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -63,6 +69,8 @@ import ( commonEng "github.com/ava-labs/avalanchego/snow/engine/common" avagoconstants "github.com/ava-labs/avalanchego/utils/constants" + avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp" + warpcontract "github.com/ava-labs/subnet-evm/precompile/contracts/warp" ) func TestMain(m *testing.M) { @@ -3832,3 +3840,169 @@ func TestCreateHandlers(t *testing.T) { require.ErrorIs(t, elem.Error, rpc.ErrMissingBatchResponse) } } + +// TestBlockGasValidation tests the two validation checks: +// 1. invalid gas used relative to capacity +// 2. total intrinsic gas cost is greater than claimed gas used +func TestBlockGasValidation(t *testing.T) { + newBlock := func( + t *testing.T, + vm *VM, + claimedGasUsed uint64, + ) *types.Block { + require := require.New(t) + + chainExtra := params.GetExtra(vm.chainConfig) + parent := vm.eth.APIBackend.CurrentBlock() + const timeDelta = 5 // mocked block delay + timestamp := parent.Time + timeDelta + feeConfig, _, err := vm.blockChain.GetFeeConfigAt(parent) + require.NoError(err) + gasLimit, err := customheader.GasLimit(chainExtra, feeConfig, parent, timestamp) + require.NoError(err) + baseFee, err := customheader.BaseFee(chainExtra, feeConfig, parent, timestamp) + require.NoError(err) + + callPayload, err := payload.NewAddressedCall(nil, nil) + require.NoError(err) + unsignedMessage, err := avalancheWarp.NewUnsignedMessage( + 1, + ids.Empty, + callPayload.Bytes(), + ) + require.NoError(err) + signersBitSet := set.NewBits() + warpSignature := &avalancheWarp.BitSetSignature{ + Signers: signersBitSet.Bytes(), + } + signedMessage, err := avalancheWarp.NewMessage( + unsignedMessage, + warpSignature, + ) + require.NoError(err) + + // 9401 is the maximum number of predicates so that the block is less + // than 2 MiB. + const numPredicates = 9401 + accessList := make(types.AccessList, 0, numPredicates) + predicate := predicate.New(signedMessage.Bytes()) + for range numPredicates { + accessList = append(accessList, types.AccessTuple{ + Address: warpcontract.ContractAddress, + StorageKeys: predicate, + }) + } + + tx, err := types.SignTx( + types.NewTx(&types.DynamicFeeTx{ + ChainID: vm.chainConfig.ChainID, + Nonce: 1, + To: &testEthAddrs[0], + Gas: 8_000_000, // block gas limit + GasFeeCap: baseFee, + GasTipCap: baseFee, + Value: common.Big0, + AccessList: accessList, + }), + types.LatestSigner(vm.chainConfig), + testKeys[0].ToECDSA(), + ) + require.NoError(err) + + header := &types.Header{ + ParentHash: parent.Hash(), + Coinbase: constants.BlackholeAddr, + Difficulty: new(big.Int).Add(parent.Difficulty, common.Big1), + Number: new(big.Int).Add(parent.Number, common.Big1), + GasLimit: gasLimit, + GasUsed: 0, + Time: timestamp, + BaseFee: baseFee, + BlobGasUsed: new(uint64), + ExcessBlobGas: new(uint64), + ParentBeaconRoot: &common.Hash{}, + } + + configExtra := params.GetExtra(vm.chainConfig) + header.Extra, err = customheader.ExtraPrefix(configExtra, parent, header) + require.NoError(err) + + // Set TimeMilliseconds if Granite is active + if configExtra.IsGranite(timestamp) { + headerExtra := customtypes.GetHeaderExtra(header) + timeMilliseconds := timestamp * 1000 // convert to milliseconds + headerExtra.TimeMilliseconds = &timeMilliseconds + } + + // Set the gasUsed after calculating the extra prefix to support large + // claimed gas used values. + header.GasUsed = claimedGasUsed + return types.NewBlock( + header, + []*types.Transaction{tx}, + nil, + nil, + trie.NewStackTrie(nil), + ) + } + + tests := []struct { + name string + gasUsed uint64 + want error + }{ + { + name: "gas_used_over_capacity", + gasUsed: math.MaxUint64, + want: errInvalidGasUsedRelativeToCapacity, + }, + { + name: "intrinsic_gas_over_gas_used", + gasUsed: 0, + want: errTotalIntrinsicGasCostExceedsClaimed, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + require := require.New(t) + ctx := context.Background() + + // Configure genesis with warp precompile enabled since test uses warp predicates + genesis := &core.Genesis{} + require.NoError(genesis.UnmarshalJSON([]byte(genesisJSONSubnetEVM))) + params.GetExtra(genesis.Config).GenesisPrecompiles = extras.Precompiles{ + warpcontract.ConfigKey: warpcontract.NewDefaultConfig(utils.TimeToNewUint64(upgrade.InitiallyActiveTime)), + } + genesisJSON, err := genesis.MarshalJSON() + require.NoError(err) + + tvm := newVM(t, testVMConfig{ + genesisJSON: string(genesisJSON), + }) + vm := tvm.vm + defer func() { + require.NoError(vm.Shutdown(ctx)) + }() + + blk := newBlock(t, vm, test.gasUsed) + blkBytes, err := rlp.EncodeToBytes(blk) + require.NoError(err) + + parsedBlk, err := vm.ParseBlock(ctx, blkBytes) + require.NoError(err) + + parsedBlkWithContext, ok := parsedBlk.(block.WithVerifyContext) + require.True(ok) + + shouldVerify, err := parsedBlkWithContext.ShouldVerifyWithContext(ctx) + require.NoError(err) + require.True(shouldVerify) + + err = parsedBlkWithContext.VerifyWithContext( + ctx, + &block.Context{}, + ) + require.ErrorIs(err, test.want) + }) + } +} diff --git a/plugin/evm/wrapped_block.go b/plugin/evm/wrapped_block.go index bc3c381469..dbab069172 100644 --- a/plugin/evm/wrapped_block.go +++ b/plugin/evm/wrapped_block.go @@ -13,6 +13,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/consensus/snowman" "github.com/ava-labs/avalanchego/snow/engine/snowman/block" + "github.com/ava-labs/avalanchego/utils/math" "github.com/ava-labs/avalanchego/vms/evm/predicate" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" @@ -33,7 +34,10 @@ var ( _ snowman.Block = (*wrappedBlock)(nil) _ block.WithVerifyContext = (*wrappedBlock)(nil) - errInvalidParent = errors.New("parent header not found") + errInvalidParent = errors.New("parent header not found") + errMissingParentBlock = errors.New("missing parent block") + errInvalidGasUsedRelativeToCapacity = errors.New("invalid gas used relative to capacity") + errTotalIntrinsicGasCostExceedsClaimed = errors.New("total intrinsic gas cost is greater than claimed gas used") ) // wrappedBlock implements the snowman.Block interface by wrapping a libevm block @@ -193,6 +197,7 @@ func (b *wrappedBlock) verify(predicateContext *precompileconfig.PredicateContex } else { log.Debug("Verifying block without context", "block", b.ID(), "height", b.Height()) } + if err := b.syntacticVerify(); err != nil { return fmt.Errorf("syntactic block verification failed: %w", err) } @@ -203,6 +208,12 @@ func (b *wrappedBlock) verify(predicateContext *precompileconfig.PredicateContex // Only enforce predicates if the chain has already bootstrapped. if b.vm.bootstrapped.Get() { + if err := b.verifyIntrinsicGas(); err != nil { + return fmt.Errorf("failed to verify intrinsic gas: %w", err) + } + + // Verify that all the ICM messages are correctly marked as either valid + // or invalid. if err := b.verifyPredicates(predicateContext); err != nil { return fmt.Errorf("failed to verify predicates: %w", err) } @@ -216,6 +227,57 @@ func (b *wrappedBlock) verify(predicateContext *precompileconfig.PredicateContex return b.vm.blockChain.InsertBlockManual(b.ethBlock, writes) } +func (b *wrappedBlock) verifyIntrinsicGas() error { + // Verify claimed gas used fits within available capacity for this header. + // This checks that the gas used is less than the block's capacity. + parentHash := b.ethBlock.ParentHash() + parentHeight := b.ethBlock.NumberU64() - 1 + parent := b.vm.blockChain.GetHeader(parentHash, parentHeight) + if parent == nil { + return fmt.Errorf("%w: hash:%q height:%d", + errMissingParentBlock, + parentHash, + parentHeight, + ) + } + + // Verify that the claimed GasUsed is within the current capacity. + feeConfig, _, err := b.vm.blockChain.GetFeeConfigAt(parent) + if err != nil { + return fmt.Errorf("failed to get fee config: %w", err) + } + if err := customheader.VerifyGasUsed(b.vm.chainConfigExtra(), feeConfig, parent, b.ethBlock.Header()); err != nil { + return fmt.Errorf("%w: %w", errInvalidGasUsedRelativeToCapacity, err) + } + + // Collect all intrinsic gas costs for all transactions in the block. + rules := b.vm.chainConfig.Rules(b.ethBlock.Number(), params.IsMergeTODO, b.ethBlock.Time()) + var totalIntrinsicGasCost uint64 + for _, tx := range b.ethBlock.Transactions() { + intrinsicGas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.To() == nil, rules) + if err != nil { + return fmt.Errorf("failed to calculate intrinsic gas: %w for tx %s", err, tx.Hash()) + } + + totalIntrinsicGasCost, err = math.Add(totalIntrinsicGasCost, intrinsicGas) + if err != nil { + return fmt.Errorf("%w: intrinsic gas exceeds MaxUint64", errTotalIntrinsicGasCostExceedsClaimed) + } + } + + // Verify that the total intrinsic gas cost is less than or equal to the + // claimed GasUsed. + if claimedGasUsed := b.ethBlock.GasUsed(); totalIntrinsicGasCost > claimedGasUsed { + return fmt.Errorf("%w: intrinsic gas (%d) > claimed gas used (%d)", + errTotalIntrinsicGasCostExceedsClaimed, + totalIntrinsicGasCost, + claimedGasUsed, + ) + } + + return nil +} + // semanticVerify verifies that a *Block is internally consistent. func (b *wrappedBlock) semanticVerify() error { extraConfig := params.GetExtra(b.vm.chainConfig) From e68d48d799566b7edd0cd6f27d3138d43772c2a6 Mon Sep 17 00:00:00 2001 From: Jonathan Oppenheimer Date: Tue, 7 Oct 2025 11:37:34 -0400 Subject: [PATCH 15/19] sync: coreth PR #1188: fix test aggregation goroutine leak (#1783) Co-authored-by: Michael Kaplan <55204436+michaelkaplan13@users.noreply.github.com> --- tests/warp/aggregator/aggregator.go | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/warp/aggregator/aggregator.go b/tests/warp/aggregator/aggregator.go index ce19ed764f..d4c5800914 100644 --- a/tests/warp/aggregator/aggregator.go +++ b/tests/warp/aggregator/aggregator.go @@ -63,7 +63,7 @@ func (a *Aggregator) AggregateSignatures(ctx context.Context, unsignedMessage *a defer signatureFetchCancel() // Fetch signatures from validators concurrently. - signatureFetchResultChan := make(chan *signatureFetchResult) + signatureFetchResultChan := make(chan *signatureFetchResult, len(a.validators)) for i, validator := range a.validators { var ( i = i @@ -86,7 +86,10 @@ func (a *Aggregator) AggregateSignatures(ctx context.Context, unsignedMessage *a "err", err, "msgID", unsignedMessage.ID(), ) - signatureFetchResultChan <- nil + select { + case <-signatureFetchCtx.Done(): + case signatureFetchResultChan <- nil: + } return } @@ -102,14 +105,20 @@ func (a *Aggregator) AggregateSignatures(ctx context.Context, unsignedMessage *a "index", i, "msgID", unsignedMessage.ID(), ) - signatureFetchResultChan <- nil + select { + case <-signatureFetchCtx.Done(): + case signatureFetchResultChan <- nil: + } return } - signatureFetchResultChan <- &signatureFetchResult{ + select { + case <-signatureFetchCtx.Done(): + case signatureFetchResultChan <- &signatureFetchResult{ sig: signature, index: i, weight: validator.Weight, + }: } }() } From 484a2fb5e314631de105177376e2eaa37be2ea14 Mon Sep 17 00:00:00 2001 From: Jonathan Oppenheimer Date: Tue, 7 Oct 2025 13:38:16 -0400 Subject: [PATCH 16/19] sync: coreth PR #1268: simplify test (#1786) Co-authored-by: Ceyhun Onur --- plugin/evm/vm_test.go | 70 +++++++++++-------------------------------- 1 file changed, 18 insertions(+), 52 deletions(-) diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go index 98d6efabdb..8a24b029b1 100644 --- a/plugin/evm/vm_test.go +++ b/plugin/evm/vm_test.go @@ -25,7 +25,6 @@ import ( "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/consensus/snowman" "github.com/ava-labs/avalanchego/snow/engine/enginetest" - "github.com/ava-labs/avalanchego/snow/engine/snowman/block" "github.com/ava-labs/avalanchego/snow/snowtest" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/upgrade/upgradetest" @@ -40,7 +39,6 @@ import ( "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" "github.com/ava-labs/libevm/log" - "github.com/ava-labs/libevm/rlp" "github.com/ava-labs/libevm/trie" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -3852,15 +3850,7 @@ func TestBlockGasValidation(t *testing.T) { ) *types.Block { require := require.New(t) - chainExtra := params.GetExtra(vm.chainConfig) - parent := vm.eth.APIBackend.CurrentBlock() - const timeDelta = 5 // mocked block delay - timestamp := parent.Time + timeDelta - feeConfig, _, err := vm.blockChain.GetFeeConfigAt(parent) - require.NoError(err) - gasLimit, err := customheader.GasLimit(chainExtra, feeConfig, parent, timestamp) - require.NoError(err) - baseFee, err := customheader.BaseFee(chainExtra, feeConfig, parent, timestamp) + blk, err := vm.BuildBlock(context.Background()) require.NoError(err) callPayload, err := payload.NewAddressedCall(nil, nil) @@ -3899,8 +3889,8 @@ func TestBlockGasValidation(t *testing.T) { Nonce: 1, To: &testEthAddrs[0], Gas: 8_000_000, // block gas limit - GasFeeCap: baseFee, - GasTipCap: baseFee, + GasFeeCap: big.NewInt(10), + GasTipCap: big.NewInt(10), Value: common.Big0, AccessList: accessList, }), @@ -3909,36 +3899,14 @@ func TestBlockGasValidation(t *testing.T) { ) require.NoError(err) - header := &types.Header{ - ParentHash: parent.Hash(), - Coinbase: constants.BlackholeAddr, - Difficulty: new(big.Int).Add(parent.Difficulty, common.Big1), - Number: new(big.Int).Add(parent.Number, common.Big1), - GasLimit: gasLimit, - GasUsed: 0, - Time: timestamp, - BaseFee: baseFee, - BlobGasUsed: new(uint64), - ExcessBlobGas: new(uint64), - ParentBeaconRoot: &common.Hash{}, - } - - configExtra := params.GetExtra(vm.chainConfig) - header.Extra, err = customheader.ExtraPrefix(configExtra, parent, header) - require.NoError(err) - - // Set TimeMilliseconds if Granite is active - if configExtra.IsGranite(timestamp) { - headerExtra := customtypes.GetHeaderExtra(header) - timeMilliseconds := timestamp * 1000 // convert to milliseconds - headerExtra.TimeMilliseconds = &timeMilliseconds - } + ethBlock := blk.(*chain.BlockWrapper).Block.(*wrappedBlock).ethBlock + modifiedHeader := types.CopyHeader(ethBlock.Header()) // Set the gasUsed after calculating the extra prefix to support large // claimed gas used values. - header.GasUsed = claimedGasUsed + modifiedHeader.GasUsed = claimedGasUsed return types.NewBlock( - header, + modifiedHeader, []*types.Transaction{tx}, nil, nil, @@ -3984,24 +3952,22 @@ func TestBlockGasValidation(t *testing.T) { require.NoError(vm.Shutdown(ctx)) }() - blk := newBlock(t, vm, test.gasUsed) - blkBytes, err := rlp.EncodeToBytes(blk) - require.NoError(err) - - parsedBlk, err := vm.ParseBlock(ctx, blkBytes) + // Add a transaction to the pool so BuildBlock doesn't create an empty block + // (subnet-evm doesn't allow empty blocks) + tx := types.NewTransaction(uint64(0), testEthAddrs[1], big.NewInt(1), 21000, big.NewInt(testMinGasPrice), nil) + signedTx, err := types.SignTx(tx, types.NewEIP155Signer(vm.chainConfig.ChainID), testKeys[0].ToECDSA()) require.NoError(err) + errs := vm.txPool.AddRemotesSync([]*types.Transaction{signedTx}) + for i, err := range errs { + require.NoError(err, "Failed to add tx at index %d", i) + } - parsedBlkWithContext, ok := parsedBlk.(block.WithVerifyContext) - require.True(ok) + blk := newBlock(t, vm, test.gasUsed) - shouldVerify, err := parsedBlkWithContext.ShouldVerifyWithContext(ctx) + modifiedBlk, err := wrapBlock(blk, vm) require.NoError(err) - require.True(shouldVerify) - err = parsedBlkWithContext.VerifyWithContext( - ctx, - &block.Context{}, - ) + err = modifiedBlk.Verify(ctx) require.ErrorIs(err, test.want) }) } From 7c1de96aacc0f5a7553e919656c4236f03bc82f1 Mon Sep 17 00:00:00 2001 From: Jonathan Oppenheimer Date: Tue, 7 Oct 2025 14:59:12 -0400 Subject: [PATCH 17/19] sync: coreth PR #1149: add precompile reversion logic for Granite activation (#1761) Signed-off-by: Jonathan Oppenheimer Signed-off-by: Jonathan Oppenheimer <147infiniti@gmail.com> Co-authored-by: Ceyhun Onur Co-authored-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com> Co-authored-by: Stephen Buttolph --- params/hooks_libevm.go | 15 ++-- plugin/evm/vm_test.go | 186 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+), 5 deletions(-) diff --git a/params/hooks_libevm.go b/params/hooks_libevm.go index c5ccf2756a..a748f03376 100644 --- a/params/hooks_libevm.go +++ b/params/hooks_libevm.go @@ -29,7 +29,7 @@ import ( // invalidateDelegateTime is the Unix timestamp for August 2nd, 2025, midnight Eastern Time // (August 2nd, 2025, 04:00 UTC) -const invalidateDelegateUnix = 1754107200 +const InvalidateDelegateUnix = 1754107200 // P256VerifyAddress is the address of the p256 signature verification precompile var P256VerifyAddress = common.BytesToAddress([]byte{0x1, 0x00}) @@ -115,10 +115,15 @@ func makePrecompile(contract contract.StatefulPrecompiledContract) libevm.Precom }, } - callType := env.IncomingCallType() - isDisallowedCallType := callType == vm.DelegateCall || callType == vm.CallCode - if env.BlockTime() >= invalidateDelegateUnix && isDisallowedCallType { - env.InvalidateExecution(fmt.Errorf("precompile cannot be called with %s", callType)) + rules := GetRulesExtra(env.Rules()).AvalancheRules + switch call := env.IncomingCallType(); { + case call != vm.DelegateCall && call != vm.CallCode: // Others always allowed + case rules.IsGranite: + return nil, 0, vm.ErrExecutionReverted + case env.BlockTime() >= InvalidateDelegateUnix: + env.InvalidateExecution(fmt.Errorf("precompile cannot be called with %s", call)) + default: + // Otherwise, we allow the precompile to be called } return contract.Run(accessibleState, env.Addresses().EVMSemantic.Caller, env.Addresses().EVMSemantic.Self, input, suppliedGas, env.ReadOnly()) diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go index 8a24b029b1..dc913ecc96 100644 --- a/plugin/evm/vm_test.go +++ b/plugin/evm/vm_test.go @@ -5,6 +5,7 @@ package evm import ( "context" + "crypto/ecdsa" "encoding/json" "errors" "fmt" @@ -31,6 +32,7 @@ import ( "github.com/ava-labs/avalanchego/utils/crypto/secp256k1" "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/vms/components/chain" + "github.com/ava-labs/avalanchego/vms/evm/acp176" "github.com/ava-labs/avalanchego/vms/evm/predicate" "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/avalanchego/vms/platformvm/warp/payload" @@ -38,6 +40,7 @@ import ( "github.com/ava-labs/libevm/common/math" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" + "github.com/ava-labs/libevm/crypto" "github.com/ava-labs/libevm/log" "github.com/ava-labs/libevm/trie" "github.com/stretchr/testify/assert" @@ -71,6 +74,8 @@ import ( warpcontract "github.com/ava-labs/subnet-evm/precompile/contracts/warp" ) +const delegateCallPrecompileCode = "6080604052348015600e575f5ffd5b506106608061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80638b336b5e14610043578063b771b3bc14610061578063e4246eec1461007f575b5f5ffd5b61004b61009d565b604051610058919061029e565b60405180910390f35b610069610256565b6040516100769190610331565b60405180910390f35b61008761026e565b604051610094919061036a565b60405180910390f35b5f5f6040516020016100ae906103dd565b60405160208183030381529060405290505f63ee5b48eb60e01b826040516024016100d9919061046b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090505f5f73020000000000000000000000000000000000000573ffffffffffffffffffffffffffffffffffffffff168360405161017391906104c5565b5f60405180830381855af49150503d805f81146101ab576040519150601f19603f3d011682016040523d82523d5f602084013e6101b0565b606091505b5091509150816101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061054b565b60405180910390fd5b808060200190518101906102099190610597565b94505f5f1b850361024f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102469061060c565b60405180910390fd5b5050505090565b73020000000000000000000000000000000000000581565b73020000000000000000000000000000000000000581565b5f819050919050565b61029881610286565b82525050565b5f6020820190506102b15f83018461028f565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6102f96102f46102ef846102b7565b6102d6565b6102b7565b9050919050565b5f61030a826102df565b9050919050565b5f61031b82610300565b9050919050565b61032b81610311565b82525050565b5f6020820190506103445f830184610322565b92915050565b5f610354826102b7565b9050919050565b6103648161034a565b82525050565b5f60208201905061037d5f83018461035b565b92915050565b5f82825260208201905092915050565b7f68656c6c6f0000000000000000000000000000000000000000000000000000005f82015250565b5f6103c7600583610383565b91506103d282610393565b602082019050919050565b5f6020820190508181035f8301526103f4816103bb565b9050919050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61043d826103fb565b6104478185610405565b9350610457818560208601610415565b61046081610423565b840191505092915050565b5f6020820190508181035f8301526104838184610433565b905092915050565b5f81905092915050565b5f61049f826103fb565b6104a9818561048b565b93506104b9818560208601610415565b80840191505092915050565b5f6104d08284610495565b915081905092915050565b7f44656c65676174652063616c6c20746f2073656e64576172704d6573736167655f8201527f206661696c656400000000000000000000000000000000000000000000000000602082015250565b5f610535602783610383565b9150610540826104db565b604082019050919050565b5f6020820190508181035f83015261056281610529565b9050919050565b5f5ffd5b61057681610286565b8114610580575f5ffd5b50565b5f815190506105918161056d565b92915050565b5f602082840312156105ac576105ab610569565b5b5f6105b984828501610583565b91505092915050565b7f4661696c656420746f2073656e642077617270206d65737361676500000000005f82015250565b5f6105f6601b83610383565b9150610601826105c2565b602082019050919050565b5f6020820190508181035f830152610623816105ea565b905091905056fea2646970667358221220192acba01cff6d70ce187c63c7ccac116d811f6c35e316fde721f14929ced12564736f6c634300081e0033" + func TestMain(m *testing.M) { RegisterAllLibEVMExtras() os.Exit(m.Run()) @@ -3972,3 +3977,184 @@ func TestBlockGasValidation(t *testing.T) { }) } } + +// newSignedLegacyTx builds a legacy transaction and signs it using the +// LatestSigner derived from the provided chain config. +func newSignedLegacyTx( + t *testing.T, + cfg *params.ChainConfig, + key *ecdsa.PrivateKey, + nonce uint64, + to *common.Address, + value *big.Int, + gas uint64, + gasPrice *big.Int, + data []byte, +) *types.Transaction { + t.Helper() + + tx := types.NewTx(&types.LegacyTx{ + Nonce: nonce, + To: to, + Value: value, + Gas: gas, + GasPrice: gasPrice, + Data: data, + }) + signedTx, err := types.SignTx(tx, types.LatestSigner(cfg), key) + require.NoError(t, err) + return signedTx +} + +// deployContract deploys the provided EVM bytecode using a prefunded test account +// and returns the created contract address. It is reusable for any contract code. +func deployContract(ctx context.Context, t *testing.T, vm *VM, gasPrice *big.Int, code []byte) common.Address { + callerAddr := testEthAddrs[0] + callerKey := testKeys[0] + + nonce := vm.txPool.Nonce(callerAddr) + signedTx := newSignedLegacyTx(t, vm.chainConfig, callerKey.ToECDSA(), nonce, nil, big.NewInt(0), 1000000, gasPrice, code) + + for _, err := range vm.txPool.AddRemotesSync([]*types.Transaction{signedTx}) { + require.NoError(t, err) + } + + blk, err := vm.BuildBlock(ctx) + require.NoError(t, err) + require.NoError(t, blk.Verify(ctx)) + require.NoError(t, vm.SetPreference(ctx, blk.ID())) + require.NoError(t, blk.Accept(ctx)) + + ethBlock := blk.(*chain.BlockWrapper).Block.(*wrappedBlock).ethBlock + receipts := vm.blockChain.GetReceiptsByHash(ethBlock.Hash()) + require.Len(t, receipts, len(ethBlock.Transactions())) + + found := false + for i, btx := range ethBlock.Transactions() { + if btx.Hash() == signedTx.Hash() { + found = true + require.Equal(t, types.ReceiptStatusSuccessful, receipts[i].Status) + break + } + } + require.True(t, found, "deployContract: expected deploy tx %s to be included in block %s (caller=%s, nonce=%d)", + signedTx.Hash().Hex(), + ethBlock.Hash().Hex(), + callerAddr.Hex(), + nonce, + ) + + return crypto.CreateAddress(callerAddr, nonce) +} + +func TestDelegatePrecompile_BehaviorAcrossUpgrades(t *testing.T) { + ctx := context.Background() + tests := []struct { + name string + fork upgradetest.Fork + deployGasPrice *big.Int + txGasPrice *big.Int + preDeployTime int64 + setTime int64 + refillCapacityFortuna bool + wantIncluded bool + wantReceiptStatus uint64 + }{ + { + name: "granite_should_revert", + fork: upgradetest.Granite, + deployGasPrice: big.NewInt(testMinGasPrice), + txGasPrice: big.NewInt(testMinGasPrice), + // Time is irrelevant as only the fork dictates the logic + refillCapacityFortuna: false, + wantIncluded: true, + wantReceiptStatus: types.ReceiptStatusFailed, + }, + { + name: "fortuna_post_cutoff_should_invalidate", + fork: upgradetest.Fortuna, + deployGasPrice: big.NewInt(testMinGasPrice), + txGasPrice: big.NewInt(testMinGasPrice), + setTime: params.InvalidateDelegateUnix + 1, + refillCapacityFortuna: true, + wantIncluded: false, + }, + { + name: "fortuna_pre_cutoff_should_succeed", + fork: upgradetest.Fortuna, + deployGasPrice: big.NewInt(testMinGasPrice), + txGasPrice: big.NewInt(testMinGasPrice), + preDeployTime: params.InvalidateDelegateUnix - acp176.TimeToFillCapacity - 1, + refillCapacityFortuna: true, + wantIncluded: true, + wantReceiptStatus: types.ReceiptStatusSuccessful, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + genesis := &core.Genesis{} + require.NoError(t, genesis.UnmarshalJSON([]byte(toGenesisJSON(paramstest.ForkToChainConfig[tt.fork])))) + params.GetExtra(genesis.Config).GenesisPrecompiles = extras.Precompiles{ + warpcontract.ConfigKey: warpcontract.NewDefaultConfig(utils.TimeToNewUint64(upgrade.InitiallyActiveTime)), + } + genesisJSON, err := genesis.MarshalJSON() + require.NoError(t, err) + + vm := newVM(t, testVMConfig{ + genesisJSON: string(genesisJSON), + fork: &tt.fork, + }).vm + defer vm.Shutdown(ctx) + + if tt.preDeployTime != 0 { + vm.clock.Set(time.Unix(tt.preDeployTime, 0)) + } + + contractAddr := deployContract(ctx, t, vm, tt.deployGasPrice, common.FromHex(delegateCallPrecompileCode)) + + if tt.setTime != 0 { + vm.clock.Set(time.Unix(tt.setTime, 0)) + } + + if tt.refillCapacityFortuna { + // Ensure gas capacity is refilled relative to the parent block's timestamp + parent := vm.blockChain.CurrentBlock() + parentTime := time.Unix(int64(parent.Time), 0) + minRefillTime := parentTime.Add(acp176.TimeToFillCapacity * time.Second) + if vm.clock.Time().Before(minRefillTime) { + vm.clock.Set(minRefillTime) + } + } + + data := crypto.Keccak256([]byte("delegateSendHello()"))[:4] + nonce := vm.txPool.Nonce(testEthAddrs[0]) + signedTx := newSignedLegacyTx(t, vm.chainConfig, testKeys[0].ToECDSA(), nonce, &contractAddr, big.NewInt(0), 100000, tt.txGasPrice, data) + for _, err := range vm.txPool.AddRemotesSync([]*types.Transaction{signedTx}) { + require.NoError(t, err) + } + + blk, err := vm.BuildBlock(ctx) + + if !tt.wantIncluded { + // On subnet-evm, InvalidateExecution causes the transaction to be excluded from the block. + // BuildBlock will create a block but it will fail verification because it's empty + // and subnet-evm doesn't allow empty blocks. + require.Error(t, err, "BuildBlock should fail because it would create an empty block") + require.ErrorContains(t, err, "empty block", "Should fail with empty block error") + return + } + + require.NoError(t, err) + require.NoError(t, blk.Verify(ctx)) + require.NoError(t, vm.SetPreference(ctx, blk.ID())) + require.NoError(t, blk.Accept(ctx)) + + ethBlock := blk.(*chain.BlockWrapper).Block.(*wrappedBlock).ethBlock + require.Len(t, ethBlock.Transactions(), 1) + receipts := vm.blockChain.GetReceiptsByHash(ethBlock.Hash()) + require.Len(t, receipts, 1) + require.Equal(t, tt.wantReceiptStatus, receipts[0].Status) + }) + } +} From 7a69418f80cfc676d4f295d9c9fe5cb374993942 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Wed, 8 Oct 2025 15:11:19 +0300 Subject: [PATCH 18/19] chore: update to latest avalanchego version --- .github/workflows/tests.yml | 4 ++-- go.mod | 4 ++-- go.sum | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ddb892b3e..951ebebb5e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -97,7 +97,7 @@ jobs: - name: Setup Contracts run: ./scripts/run_task.sh setup-contracts - name: Run Warp E2E Tests - uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@bf62dfb8084fe23e847c68d0636a2bf3525cb80a + uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@fff1df9564d3fa86899780d73e887d9ee5b9b54e with: run: ./scripts/run_task.sh test-e2e-warp-ci artifact_prefix: warp @@ -122,7 +122,7 @@ jobs: with: go-version-file: "go.mod" - name: Run E2E Load Tests - uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@bf62dfb8084fe23e847c68d0636a2bf3525cb80a + uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@fff1df9564d3fa86899780d73e887d9ee5b9b54e with: run: ./scripts/run_task.sh test-e2e-load-ci artifact_prefix: load diff --git a/go.mod b/go.mod index 2079c7e455..6e678fa506 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module github.com/ava-labs/subnet-evm -go 1.24.7 +go 1.24.8 require ( github.com/VictoriaMetrics/fastcache v1.12.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/avalanchego v1.13.6-0.20251006134645-bf62dfb8084f + github.com/ava-labs/avalanchego v1.13.6-0.20251008120019-fff1df9564d3 github.com/ava-labs/firewood-go-ethhash/ffi v0.0.12 github.com/ava-labs/libevm v1.13.15-0.20251002164226-35926db4d661 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc diff --git a/go.sum b/go.sum index 2566b922ad..3b245adb8e 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/ava-labs/avalanchego v1.13.6-0.20251006134645-bf62dfb8084f h1:Nibzh1oBd3YNSJdmrBclcEq9FQ5H6HoJAbx7aejVpNk= -github.com/ava-labs/avalanchego v1.13.6-0.20251006134645-bf62dfb8084f/go.mod h1:yplWYV/FzAZeYAhy0yOj8wjJA1PCdTPxQf8Wzpwg6DY= +github.com/ava-labs/avalanchego v1.13.6-0.20251008120019-fff1df9564d3 h1:PExdlCEpGaAg75iIlWYBYFtUeqiyBityzAjRiZ5nm4M= +github.com/ava-labs/avalanchego v1.13.6-0.20251008120019-fff1df9564d3/go.mod h1:EL0MGbL2liE9jp4QtCHR2thkNl8hCkD26DJ+7cmcaqs= github.com/ava-labs/coreth v0.15.4-rc.3.0.20251002221438-a857a64c28ea h1:vrHUSx6hlQgdVufhtT9LT9i7eHZcWmBEjH9cBozDLuc= github.com/ava-labs/coreth v0.15.4-rc.3.0.20251002221438-a857a64c28ea/go.mod h1:y/14LplmA0lLwIDlKiGAZ8OlxQ7OxhaU2dfkYcviLPM= github.com/ava-labs/firewood-go-ethhash/ffi v0.0.12 h1:aMcrLbpJ/dyu2kZDf/Di/4JIWsUcYPyTDKymiHpejt0= From f77a1708fcb8c230f1f2ab45f721395af1063b28 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Wed, 8 Oct 2025 15:27:35 +0300 Subject: [PATCH 19/19] chore: update golang image to 1.24.8 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 42579193d9..d711000028 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG AVALANCHEGO_NODE_IMAGE="invalid-image" # ============= Compilation Stage ================ -FROM --platform=$BUILDPLATFORM golang:1.24.7-bookworm AS builder +FROM --platform=$BUILDPLATFORM golang:1.24.8-bookworm AS builder WORKDIR /build