diff --git a/graft/coreth/consensus/dummy/consensus.go b/graft/coreth/consensus/dummy/consensus.go index 29085dfaab58..b95795bc044d 100644 --- a/graft/coreth/consensus/dummy/consensus.go +++ b/graft/coreth/consensus/dummy/consensus.go @@ -18,7 +18,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/params/extras" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customheader" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customtypes" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/vms/components/gas" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/coreth/core/extstate/options.go b/graft/coreth/core/extstate/options.go index f5c955a0ef82..e59dfbb8f05d 100644 --- a/graft/coreth/core/extstate/options.go +++ b/graft/coreth/core/extstate/options.go @@ -6,7 +6,7 @@ package extstate import ( "github.com/ava-labs/libevm/core/state" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) type workerPool struct { diff --git a/graft/coreth/core/genesis_extra_test.go b/graft/coreth/core/genesis_extra_test.go index d4c0364621ab..c51a95d3d14d 100644 --- a/graft/coreth/core/genesis_extra_test.go +++ b/graft/coreth/core/genesis_extra_test.go @@ -35,7 +35,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/params" "github.com/ava-labs/avalanchego/graft/coreth/params/extras" "github.com/ava-labs/avalanchego/graft/coreth/params/paramstest" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/upgrade/upgradetest" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" diff --git a/graft/coreth/core/genesis_test.go b/graft/coreth/core/genesis_test.go index 75b112602054..485207f2b5eb 100644 --- a/graft/coreth/core/genesis_test.go +++ b/graft/coreth/core/genesis_test.go @@ -41,8 +41,8 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap3" "github.com/ava-labs/avalanchego/graft/coreth/precompile/contracts/warp" "github.com/ava-labs/avalanchego/graft/coreth/triedb/pathdb" - "github.com/ava-labs/avalanchego/graft/coreth/utils" "github.com/ava-labs/avalanchego/graft/evm/firewood" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" diff --git a/graft/coreth/core/state/snapshot/difflayer_test.go b/graft/coreth/core/state/snapshot/difflayer_test.go index 06f9382f47ea..caad0b89aaf7 100644 --- a/graft/coreth/core/state/snapshot/difflayer_test.go +++ b/graft/coreth/core/state/snapshot/difflayer_test.go @@ -33,7 +33,7 @@ import ( "math/rand" "testing" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/crypto" "github.com/ava-labs/libevm/ethdb/memorydb" diff --git a/graft/coreth/core/state/snapshot/disklayer.go b/graft/coreth/core/state/snapshot/disklayer.go index 5e8cf29572e0..afd55cc6bf19 100644 --- a/graft/coreth/core/state/snapshot/disklayer.go +++ b/graft/coreth/core/state/snapshot/disklayer.go @@ -32,7 +32,7 @@ import ( "sync" "time" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" diff --git a/graft/coreth/core/state/snapshot/generate.go b/graft/coreth/core/state/snapshot/generate.go index 8364aa69b1d1..a26314108e14 100644 --- a/graft/coreth/core/state/snapshot/generate.go +++ b/graft/coreth/core/state/snapshot/generate.go @@ -32,7 +32,7 @@ import ( "fmt" "time" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" diff --git a/graft/coreth/core/state/snapshot/snapshot_ext.go b/graft/coreth/core/state/snapshot/snapshot_ext.go index 61aaa4e0c559..0ac47fa73487 100644 --- a/graft/coreth/core/state/snapshot/snapshot_ext.go +++ b/graft/coreth/core/state/snapshot/snapshot_ext.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) func (t *Tree) DiskAccountIterator(seek common.Hash) AccountIterator { diff --git a/graft/coreth/core/state_processor_test.go b/graft/coreth/core/state_processor_test.go index fce16911fd0e..cbac6e30059e 100644 --- a/graft/coreth/core/state_processor_test.go +++ b/graft/coreth/core/state_processor_test.go @@ -41,7 +41,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap1" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap3" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/cortina" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/vms/evm/acp176" "github.com/ava-labs/libevm/common" diff --git a/graft/coreth/core/txpool/legacypool/legacypool.go b/graft/coreth/core/txpool/legacypool/legacypool.go index 273588020d9e..7207fa778231 100644 --- a/graft/coreth/core/txpool/legacypool/legacypool.go +++ b/graft/coreth/core/txpool/legacypool/legacypool.go @@ -41,7 +41,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/core/txpool" "github.com/ava-labs/avalanchego/graft/coreth/params" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customheader" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/prque" "github.com/ava-labs/libevm/core/state" diff --git a/graft/coreth/go.mod b/graft/coreth/go.mod index 7e4fa58ad4a2..db741b9a6d2c 100644 --- a/graft/coreth/go.mod +++ b/graft/coreth/go.mod @@ -17,7 +17,6 @@ require ( github.com/deckarep/golang-set/v2 v2.1.0 github.com/go-cmd/cmd v1.4.3 github.com/google/go-cmp v0.7.0 - github.com/gorilla/rpc v1.2.0 github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-bexpr v0.1.10 github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d @@ -48,7 +47,6 @@ require ( require ( connectrpc.com/connect v1.18.1 // indirect connectrpc.com/grpcreflect v1.3.0 // indirect - github.com/BurntSushi/toml v1.5.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.3 // indirect @@ -98,6 +96,7 @@ require ( 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/gorilla/rpc v1.2.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect github.com/huin/goupnp v1.3.0 // indirect diff --git a/graft/coreth/internal/ethapi/api_test.go b/graft/coreth/internal/ethapi/api_test.go index fe8341ddefdc..f7713434cc45 100644 --- a/graft/coreth/internal/ethapi/api_test.go +++ b/graft/coreth/internal/ethapi/api_test.go @@ -49,7 +49,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/params" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap3" "github.com/ava-labs/avalanchego/graft/coreth/rpc" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/accounts" "github.com/ava-labs/libevm/accounts/keystore" "github.com/ava-labs/libevm/common" diff --git a/graft/coreth/network/peer_tracker.go b/graft/coreth/network/peer_tracker.go index 802a75c23ee6..3da10624cc99 100644 --- a/graft/coreth/network/peer_tracker.go +++ b/graft/coreth/network/peer_tracker.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/libevm/log" "github.com/ava-labs/libevm/metrics" - "github.com/ava-labs/avalanchego/graft/coreth/utils/rand" + "github.com/ava-labs/avalanchego/graft/evm/utils/rand" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/version" diff --git a/graft/coreth/params/config.go b/graft/coreth/params/config.go index e506a2364ad4..3b8ff6d49760 100644 --- a/graft/coreth/params/config.go +++ b/graft/coreth/params/config.go @@ -31,7 +31,7 @@ import ( "math/big" "github.com/ava-labs/avalanchego/graft/coreth/params/extras" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/libevm" ethparams "github.com/ava-labs/libevm/params" ) diff --git a/graft/coreth/params/config_extra.go b/graft/coreth/params/config_extra.go index 732facd73808..3595f5891d4b 100644 --- a/graft/coreth/params/config_extra.go +++ b/graft/coreth/params/config_extra.go @@ -10,7 +10,7 @@ import ( "math/big" "github.com/ava-labs/avalanchego/graft/coreth/params/extras" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/upgrade" ) diff --git a/graft/coreth/params/config_extra_test.go b/graft/coreth/params/config_extra_test.go index afbe83fc676b..ad12fc28f266 100644 --- a/graft/coreth/params/config_extra_test.go +++ b/graft/coreth/params/config_extra_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/ava-labs/avalanchego/graft/coreth/params/extras" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/upgrade/upgradetest" ) diff --git a/graft/coreth/params/config_test.go b/graft/coreth/params/config_test.go index f6aad986cbc3..78a478fdf1f1 100644 --- a/graft/coreth/params/config_test.go +++ b/graft/coreth/params/config_test.go @@ -35,7 +35,7 @@ import ( "time" "github.com/ava-labs/avalanchego/graft/coreth/params/extras" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ethparams "github.com/ava-labs/libevm/params" ) diff --git a/graft/coreth/params/extras/config.go b/graft/coreth/params/extras/config.go index 6a2d90dbd383..f663ca94c2a3 100644 --- a/graft/coreth/params/extras/config.go +++ b/graft/coreth/params/extras/config.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/libevm/common" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/snow" ethparams "github.com/ava-labs/libevm/params" diff --git a/graft/coreth/params/extras/config_extra_test.go b/graft/coreth/params/extras/config_extra_test.go index 614946ef1196..250e8478cafd 100644 --- a/graft/coreth/params/extras/config_extra_test.go +++ b/graft/coreth/params/extras/config_extra_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) func TestIsTimestampForked(t *testing.T) { diff --git a/graft/coreth/params/extras/network_upgrades.go b/graft/coreth/params/extras/network_upgrades.go index 5652ddc617dd..90427da801b1 100644 --- a/graft/coreth/params/extras/network_upgrades.go +++ b/graft/coreth/params/extras/network_upgrades.go @@ -8,7 +8,7 @@ import ( "reflect" "strconv" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/upgrade" ethparams "github.com/ava-labs/libevm/params" diff --git a/graft/coreth/params/extras/precompile_upgrade.go b/graft/coreth/params/extras/precompile_upgrade.go index eb8e45d42fc6..b1ed364f1537 100644 --- a/graft/coreth/params/extras/precompile_upgrade.go +++ b/graft/coreth/params/extras/precompile_upgrade.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/precompile/modules" "github.com/ava-labs/avalanchego/graft/coreth/precompile/precompileconfig" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ethparams "github.com/ava-labs/libevm/params" ) diff --git a/graft/coreth/plugin/evm/atomic/vm/block_extension.go b/graft/coreth/plugin/evm/atomic/vm/block_extension.go index 9b0d2c552caf..8d2ed6b87ac1 100644 --- a/graft/coreth/plugin/evm/atomic/vm/block_extension.go +++ b/graft/coreth/plugin/evm/atomic/vm/block_extension.go @@ -16,7 +16,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customtypes" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/extension" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap5" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" safemath "github.com/ava-labs/avalanchego/utils/math" ) diff --git a/graft/coreth/plugin/evm/atomic/vm/export_tx_test.go b/graft/coreth/plugin/evm/atomic/vm/export_tx_test.go index bea3ce3a5dfb..da0860230f00 100644 --- a/graft/coreth/plugin/evm/atomic/vm/export_tx_test.go +++ b/graft/coreth/plugin/evm/atomic/vm/export_tx_test.go @@ -15,7 +15,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/params/extras/extrastest" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/atomic" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmtest" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/snowtest" "github.com/ava-labs/avalanchego/upgrade/upgradetest" diff --git a/graft/coreth/plugin/evm/atomic/vm/import_tx_test.go b/graft/coreth/plugin/evm/atomic/vm/import_tx_test.go index 8864a182cc54..46c8b395d72d 100644 --- a/graft/coreth/plugin/evm/atomic/vm/import_tx_test.go +++ b/graft/coreth/plugin/evm/atomic/vm/import_tx_test.go @@ -16,7 +16,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/atomic" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap0" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmtest" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/snowtest" "github.com/ava-labs/avalanchego/upgrade/upgradetest" diff --git a/graft/coreth/plugin/evm/atomic/vm/tx_gossip_test.go b/graft/coreth/plugin/evm/atomic/vm/tx_gossip_test.go index 39fcac72c03e..d76b05b7329f 100644 --- a/graft/coreth/plugin/evm/atomic/vm/tx_gossip_test.go +++ b/graft/coreth/plugin/evm/atomic/vm/tx_gossip_test.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/avalanchego/database/memdb" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/atomic" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmtest" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/gossip" diff --git a/graft/coreth/plugin/evm/atomic/vm/tx_test.go b/graft/coreth/plugin/evm/atomic/vm/tx_test.go index b61652e0aebf..1e355e04f50c 100644 --- a/graft/coreth/plugin/evm/atomic/vm/tx_test.go +++ b/graft/coreth/plugin/evm/atomic/vm/tx_test.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/params/extras" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/atomic" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/upgrade/upgradetest" diff --git a/graft/coreth/plugin/evm/atomic/vm/vm.go b/graft/coreth/plugin/evm/atomic/vm/vm.go index d36c8e077403..9581f0e76a62 100644 --- a/graft/coreth/plugin/evm/atomic/vm/vm.go +++ b/graft/coreth/plugin/evm/atomic/vm/vm.go @@ -32,8 +32,8 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/message" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap5" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmerrors" - "github.com/ava-labs/avalanchego/graft/coreth/utils" - "github.com/ava-labs/avalanchego/graft/coreth/utils/rpc" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/rpc" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/snow" diff --git a/graft/coreth/plugin/evm/atomic/vm/vm_test.go b/graft/coreth/plugin/evm/atomic/vm/vm_test.go index f6d9ca5ffc58..1e15a101b6de 100644 --- a/graft/coreth/plugin/evm/atomic/vm/vm_test.go +++ b/graft/coreth/plugin/evm/atomic/vm/vm_test.go @@ -29,7 +29,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap0" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap1" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmtest" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/upgrade/upgradetest" diff --git a/graft/coreth/plugin/evm/config/default_config.go b/graft/coreth/plugin/evm/config/default_config.go index 5f62f6cb2c69..3e716d2cef04 100644 --- a/graft/coreth/plugin/evm/config/default_config.go +++ b/graft/coreth/plugin/evm/config/default_config.go @@ -8,7 +8,7 @@ import ( "github.com/ava-labs/libevm/common" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) const defaultCommitInterval = 4096 diff --git a/graft/coreth/plugin/evm/customheader/base_fee_test.go b/graft/coreth/plugin/evm/customheader/base_fee_test.go index 6ba86dfac5ef..7562a65b527a 100644 --- a/graft/coreth/plugin/evm/customheader/base_fee_test.go +++ b/graft/coreth/plugin/evm/customheader/base_fee_test.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap4" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap5" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/etna" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/vms/components/gas" "github.com/ava-labs/avalanchego/vms/evm/acp176" ) diff --git a/graft/coreth/plugin/evm/customheader/extra_test.go b/graft/coreth/plugin/evm/customheader/extra_test.go index b2ba51ed0f10..12b31c83b45c 100644 --- a/graft/coreth/plugin/evm/customheader/extra_test.go +++ b/graft/coreth/plugin/evm/customheader/extra_test.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap3" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap4" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap5" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/vms/components/gas" "github.com/ava-labs/avalanchego/vms/evm/acp176" ) diff --git a/graft/coreth/plugin/evm/customheader/gas_limit_test.go b/graft/coreth/plugin/evm/customheader/gas_limit_test.go index 7bffa6148174..772f3bc49d17 100644 --- a/graft/coreth/plugin/evm/customheader/gas_limit_test.go +++ b/graft/coreth/plugin/evm/customheader/gas_limit_test.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap1" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap5" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/cortina" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/utils/math" "github.com/ava-labs/avalanchego/vms/components/gas" "github.com/ava-labs/avalanchego/vms/evm/acp176" diff --git a/graft/coreth/plugin/evm/customheader/min_delay_excess_test.go b/graft/coreth/plugin/evm/customheader/min_delay_excess_test.go index 0cea9bb2d851..d177109e1786 100644 --- a/graft/coreth/plugin/evm/customheader/min_delay_excess_test.go +++ b/graft/coreth/plugin/evm/customheader/min_delay_excess_test.go @@ -11,8 +11,8 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/params/extras" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customtypes" - "github.com/ava-labs/avalanchego/graft/coreth/utils" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/coreth/plugin/evm/customheader/time_test.go b/graft/coreth/plugin/evm/customheader/time_test.go index 8ea467719db9..dda6766cae1b 100644 --- a/graft/coreth/plugin/evm/customheader/time_test.go +++ b/graft/coreth/plugin/evm/customheader/time_test.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/params/extras" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customtypes" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/coreth/plugin/evm/customtypes/block_ext_test.go b/graft/coreth/plugin/evm/customtypes/block_ext_test.go index 52094d19bd10..0b16d551778d 100644 --- a/graft/coreth/plugin/evm/customtypes/block_ext_test.go +++ b/graft/coreth/plugin/evm/customtypes/block_ext_test.go @@ -16,8 +16,8 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/coreth/utils" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/coreth/plugin/evm/customtypes/header_ext_test.go b/graft/coreth/plugin/evm/customtypes/header_ext_test.go index bb4722bd2118..cf307765880f 100644 --- a/graft/coreth/plugin/evm/customtypes/header_ext_test.go +++ b/graft/coreth/plugin/evm/customtypes/header_ext_test.go @@ -16,7 +16,7 @@ import ( "github.com/ava-labs/libevm/rlp" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/coreth/plugin/evm/gossip_test.go b/graft/coreth/plugin/evm/gossip_test.go index b54c778db8e7..2b0a45312c3a 100644 --- a/graft/coreth/plugin/evm/gossip_test.go +++ b/graft/coreth/plugin/evm/gossip_test.go @@ -24,7 +24,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/core/txpool" "github.com/ava-labs/avalanchego/graft/coreth/core/txpool/legacypool" "github.com/ava-labs/avalanchego/graft/coreth/params" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/network/p2p/gossip" ) diff --git a/graft/coreth/plugin/evm/tx_gossip_test.go b/graft/coreth/plugin/evm/tx_gossip_test.go index c8de687e50f4..8ad4fbcd4007 100644 --- a/graft/coreth/plugin/evm/tx_gossip_test.go +++ b/graft/coreth/plugin/evm/tx_gossip_test.go @@ -19,7 +19,7 @@ import ( "github.com/ava-labs/avalanchego/database/memdb" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap0" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmtest" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/gossip" diff --git a/graft/coreth/plugin/evm/upgrade/ap0/params.go b/graft/coreth/plugin/evm/upgrade/ap0/params.go index 0f73b4be5a74..b68ff8a1fcdd 100644 --- a/graft/coreth/plugin/evm/upgrade/ap0/params.go +++ b/graft/coreth/plugin/evm/upgrade/ap0/params.go @@ -5,7 +5,7 @@ package ap0 import ( - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/utils/units" ) diff --git a/graft/coreth/plugin/evm/upgrade/ap1/params.go b/graft/coreth/plugin/evm/upgrade/ap1/params.go index 214bc724a2ea..85efca2330df 100644 --- a/graft/coreth/plugin/evm/upgrade/ap1/params.go +++ b/graft/coreth/plugin/evm/upgrade/ap1/params.go @@ -4,7 +4,7 @@ // AP1 defines constants used after the Apricot Phase 1 upgrade. package ap1 -import "github.com/ava-labs/avalanchego/graft/coreth/utils" +import "github.com/ava-labs/avalanchego/graft/evm/utils" const ( // MinGasPrice is the minimum gas price of a transaction after the Apricot diff --git a/graft/coreth/plugin/evm/upgrade/ap3/window.go b/graft/coreth/plugin/evm/upgrade/ap3/window.go index 9729dd84b982..607f66393eaf 100644 --- a/graft/coreth/plugin/evm/upgrade/ap3/window.go +++ b/graft/coreth/plugin/evm/upgrade/ap3/window.go @@ -10,7 +10,7 @@ import ( "fmt" "math" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/utils/wrappers" safemath "github.com/ava-labs/libevm/common/math" diff --git a/graft/coreth/plugin/evm/upgrade/ap4/cost.go b/graft/coreth/plugin/evm/upgrade/ap4/cost.go index 474d2b1da135..5a76743534a9 100644 --- a/graft/coreth/plugin/evm/upgrade/ap4/cost.go +++ b/graft/coreth/plugin/evm/upgrade/ap4/cost.go @@ -8,7 +8,7 @@ package ap4 import ( "math" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" safemath "github.com/ava-labs/avalanchego/utils/math" ) diff --git a/graft/coreth/plugin/evm/upgrade/etna/params.go b/graft/coreth/plugin/evm/upgrade/etna/params.go index cf5f6bdc1662..4cf8fe108dd2 100644 --- a/graft/coreth/plugin/evm/upgrade/etna/params.go +++ b/graft/coreth/plugin/evm/upgrade/etna/params.go @@ -4,7 +4,7 @@ // Etna defines constants used after the Etna upgrade. package etna -import "github.com/ava-labs/avalanchego/graft/coreth/utils" +import "github.com/ava-labs/avalanchego/graft/evm/utils" // MinBaseFee is the minimum base fee specified in ACP-125 that is allowed after // the Etna upgrade. diff --git a/graft/coreth/plugin/evm/vm.go b/graft/coreth/plugin/evm/vm.go index 285a54f8df41..4575ed8169cb 100644 --- a/graft/coreth/plugin/evm/vm.go +++ b/graft/coreth/plugin/evm/vm.go @@ -85,7 +85,7 @@ import ( warpcontract "github.com/ava-labs/avalanchego/graft/coreth/precompile/contracts/warp" statesyncclient "github.com/ava-labs/avalanchego/graft/coreth/sync/client" handlerstats "github.com/ava-labs/avalanchego/graft/coreth/sync/handlers/stats" - utilsrpc "github.com/ava-labs/avalanchego/graft/coreth/utils/rpc" + utilsrpc "github.com/ava-labs/avalanchego/graft/evm/utils/rpc" avalanchegossip "github.com/ava-labs/avalanchego/network/p2p/gossip" commonEng "github.com/ava-labs/avalanchego/snow/engine/common" avalancheUtils "github.com/ava-labs/avalanchego/utils" diff --git a/graft/coreth/plugin/evm/vm_test.go b/graft/coreth/plugin/evm/vm_test.go index 81116fd4e78a..0df029ac077a 100644 --- a/graft/coreth/plugin/evm/vm_test.go +++ b/graft/coreth/plugin/evm/vm_test.go @@ -42,9 +42,9 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap1" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmtest" "github.com/ava-labs/avalanchego/graft/coreth/rpc" - "github.com/ava-labs/avalanchego/graft/coreth/utils" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" "github.com/ava-labs/avalanchego/graft/evm/constants" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/snowtest" "github.com/ava-labs/avalanchego/upgrade" diff --git a/graft/coreth/plugin/evm/vm_warp_test.go b/graft/coreth/plugin/evm/vm_warp_test.go index 77b91cd11ea0..fa8f5a1a5998 100644 --- a/graft/coreth/plugin/evm/vm_warp_test.go +++ b/graft/coreth/plugin/evm/vm_warp_test.go @@ -27,8 +27,8 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap0" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmtest" "github.com/ava-labs/avalanchego/graft/coreth/precompile/contract" - "github.com/ava-labs/avalanchego/graft/coreth/utils" "github.com/ava-labs/avalanchego/graft/coreth/warp" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/acp118" diff --git a/graft/coreth/plugin/evm/vmsync/registry_test.go b/graft/coreth/plugin/evm/vmsync/registry_test.go index 5b8c5c5aad88..34b17eb1f53a 100644 --- a/graft/coreth/plugin/evm/vmsync/registry_test.go +++ b/graft/coreth/plugin/evm/vmsync/registry_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/require" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/message" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" syncpkg "github.com/ava-labs/avalanchego/graft/coreth/sync" ) diff --git a/graft/coreth/plugin/evm/vmtest/test_syncervm.go b/graft/coreth/plugin/evm/vmtest/test_syncervm.go index d2304157276a..0e6bc26c6f65 100644 --- a/graft/coreth/plugin/evm/vmtest/test_syncervm.go +++ b/graft/coreth/plugin/evm/vmtest/test_syncervm.go @@ -30,8 +30,8 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/extension" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmsync" "github.com/ava-labs/avalanchego/graft/coreth/sync/statesync/statesynctest" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" "github.com/ava-labs/avalanchego/graft/evm/constants" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/engine/enginetest" diff --git a/graft/coreth/precompile/contracts/warp/config_test.go b/graft/coreth/precompile/contracts/warp/config_test.go index 37c12639fcc8..682335efe929 100644 --- a/graft/coreth/precompile/contracts/warp/config_test.go +++ b/graft/coreth/precompile/contracts/warp/config_test.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/coreth/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) func TestVerify(t *testing.T) { diff --git a/graft/coreth/precompile/contracts/warp/predicate_test.go b/graft/coreth/precompile/contracts/warp/predicate_test.go index 7edf3cee5857..3e5222985d48 100644 --- a/graft/coreth/precompile/contracts/warp/predicate_test.go +++ b/graft/coreth/precompile/contracts/warp/predicate_test.go @@ -16,7 +16,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/params/extras/extrastest" "github.com/ava-labs/avalanchego/graft/coreth/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/coreth/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/engine/snowman/block" diff --git a/graft/coreth/precompile/modules/registerer.go b/graft/coreth/precompile/modules/registerer.go index e19ea66b6b84..3195c96ffdac 100644 --- a/graft/coreth/precompile/modules/registerer.go +++ b/graft/coreth/precompile/modules/registerer.go @@ -10,8 +10,8 @@ import ( "github.com/ava-labs/libevm/common" - "github.com/ava-labs/avalanchego/graft/coreth/utils" "github.com/ava-labs/avalanchego/graft/evm/constants" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) var ( diff --git a/graft/coreth/precompile/precompileconfig/upgradeable.go b/graft/coreth/precompile/precompileconfig/upgradeable.go index 9ff0851fd50a..47089d308ceb 100644 --- a/graft/coreth/precompile/precompileconfig/upgradeable.go +++ b/graft/coreth/precompile/precompileconfig/upgradeable.go @@ -3,7 +3,7 @@ package precompileconfig -import "github.com/ava-labs/avalanchego/graft/coreth/utils" +import "github.com/ava-labs/avalanchego/graft/evm/utils" // Upgrade contains the timestamp for the upgrade along with // a boolean [Disable]. If [Disable] is set, the upgrade deactivates diff --git a/graft/coreth/sync/client/leaf_syncer.go b/graft/coreth/sync/client/leaf_syncer.go index 8ef502280f20..1969d4ac73c0 100644 --- a/graft/coreth/sync/client/leaf_syncer.go +++ b/graft/coreth/sync/client/leaf_syncer.go @@ -13,7 +13,7 @@ import ( "golang.org/x/sync/errgroup" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/message" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) var ErrFailedToFetchLeafs = errors.New("failed to fetch leafs") diff --git a/graft/coreth/sync/handlers/leafs_request.go b/graft/coreth/sync/handlers/leafs_request.go index c565030d5cda..eb963e42934c 100644 --- a/graft/coreth/sync/handlers/leafs_request.go +++ b/graft/coreth/sync/handlers/leafs_request.go @@ -21,7 +21,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/message" "github.com/ava-labs/avalanchego/graft/coreth/sync/handlers/stats" "github.com/ava-labs/avalanchego/graft/coreth/sync/syncutils" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/ids" ) diff --git a/graft/coreth/sync/statesync/statesynctest/test_sync.go b/graft/coreth/sync/statesync/statesynctest/test_sync.go index b551475a9212..02cd2152bfe5 100644 --- a/graft/coreth/sync/statesync/statesynctest/test_sync.go +++ b/graft/coreth/sync/statesync/statesynctest/test_sync.go @@ -11,7 +11,7 @@ import ( "github.com/ava-labs/libevm/core/types" "github.com/ava-labs/libevm/triedb" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" ) // FillAccountsWithOverlappingStorage adds [numAccounts] randomly generated accounts to the secure trie at [root] diff --git a/graft/coreth/sync/statesync/statesynctest/test_trie.go b/graft/coreth/sync/statesync/statesynctest/test_trie.go index dc0168458db4..e65d91ddd651 100644 --- a/graft/coreth/sync/statesync/statesynctest/test_trie.go +++ b/graft/coreth/sync/statesync/statesynctest/test_trie.go @@ -18,7 +18,7 @@ import ( "github.com/holiman/uint256" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/utils/wrappers" ) diff --git a/graft/coreth/sync/statesync/trie_segments.go b/graft/coreth/sync/statesync/trie_segments.go index 7d17e5ed7985..2d83e36025ce 100644 --- a/graft/coreth/sync/statesync/trie_segments.go +++ b/graft/coreth/sync/statesync/trie_segments.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/libevm/trie" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/message" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/avalanchego/vms/evm/sync/customrawdb" diff --git a/graft/coreth/triedb/hashdb/database.go b/graft/coreth/triedb/hashdb/database.go index 16e84dad4729..37f08f9be6a5 100644 --- a/graft/coreth/triedb/hashdb/database.go +++ b/graft/coreth/triedb/hashdb/database.go @@ -34,7 +34,7 @@ import ( "sync" "time" - "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" diff --git a/graft/coreth/utils/metered_cache.go b/graft/coreth/utils/metered_cache.go deleted file mode 100644 index b4a5fe73c011..000000000000 --- a/graft/coreth/utils/metered_cache.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utils - -import ( - "sync/atomic" - "time" - - "github.com/VictoriaMetrics/fastcache" - "github.com/ava-labs/libevm/metrics" -) - -// MeteredCache wraps *fastcache.Cache and periodically pulls stats from it. -type MeteredCache struct { - *fastcache.Cache - namespace string - - // stats to be surfaced - entriesCount metrics.Gauge - bytesSize metrics.Gauge - collisions metrics.Gauge - gets metrics.Gauge - sets metrics.Gauge - misses metrics.Gauge - statsTime metrics.Gauge - - // count all operations to decide when to update stats - ops uint64 - updateFrequency uint64 -} - -// NewMeteredCache returns a new MeteredCache that will update stats to the -// provided namespace once per each [updateFrequency] operations. -// Note: if [updateFrequency] is passed as 0, it will be treated as 1. -func NewMeteredCache(size int, namespace string, updateFrequency uint64) *MeteredCache { - if updateFrequency == 0 { - updateFrequency = 1 // avoid division by zero - } - mc := &MeteredCache{ - Cache: fastcache.New(size), - namespace: namespace, - updateFrequency: updateFrequency, - } - if namespace != "" { - // only register stats if a namespace is provided. - mc.entriesCount = metrics.GetOrRegisterGauge(namespace+"/entriesCount", nil) - mc.bytesSize = metrics.GetOrRegisterGauge(namespace+"/bytesSize", nil) - mc.collisions = metrics.GetOrRegisterGauge(namespace+"/collisions", nil) - mc.gets = metrics.GetOrRegisterGauge(namespace+"/gets", nil) - mc.sets = metrics.GetOrRegisterGauge(namespace+"/sets", nil) - mc.misses = metrics.GetOrRegisterGauge(namespace+"/misses", nil) - mc.statsTime = metrics.GetOrRegisterGauge(namespace+"/statsTime", nil) - } - return mc -} - -// updateStats updates metrics from fastcache -func (mc *MeteredCache) updateStatsIfNeeded() { - if mc.namespace == "" { - return - } - ops := atomic.AddUint64(&mc.ops, 1) - if ops%mc.updateFrequency != 0 { - return - } - - start := time.Now() - s := fastcache.Stats{} - mc.UpdateStats(&s) - mc.entriesCount.Update(int64(s.EntriesCount)) - mc.bytesSize.Update(int64(s.BytesSize)) - mc.collisions.Update(int64(s.Collisions)) - mc.gets.Update(int64(s.GetCalls)) - mc.sets.Update(int64(s.SetCalls)) - mc.misses.Update(int64(s.Misses)) - mc.statsTime.Inc(int64(time.Since(start))) // cumulative metric -} - -func (mc *MeteredCache) Del(k []byte) { - mc.updateStatsIfNeeded() - mc.Cache.Del(k) -} - -func (mc *MeteredCache) Get(dst, k []byte) []byte { - mc.updateStatsIfNeeded() - return mc.Cache.Get(dst, k) -} - -func (mc *MeteredCache) GetBig(dst, k []byte) []byte { - mc.updateStatsIfNeeded() - return mc.Cache.GetBig(dst, k) -} - -func (mc *MeteredCache) Has(k []byte) bool { - mc.updateStatsIfNeeded() - return mc.Cache.Has(k) -} - -func (mc *MeteredCache) HasGet(dst, k []byte) ([]byte, bool) { - mc.updateStatsIfNeeded() - return mc.Cache.HasGet(dst, k) -} - -func (mc *MeteredCache) Set(k, v []byte) { - mc.updateStatsIfNeeded() - mc.Cache.Set(k, v) -} - -func (mc *MeteredCache) SetBig(k, v []byte) { - mc.updateStatsIfNeeded() - mc.Cache.SetBig(k, v) -} diff --git a/graft/coreth/utils/utilstest/snow.go b/graft/coreth/utils/utilstest/snow.go deleted file mode 100644 index 600834813507..000000000000 --- a/graft/coreth/utils/utilstest/snow.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utilstest - -import ( - "context" - "errors" - - "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/snow/snowtest" - "github.com/ava-labs/avalanchego/snow/validators" - "github.com/ava-labs/avalanchego/snow/validators/validatorstest" - "github.com/ava-labs/avalanchego/utils/constants" -) - -func NewTestValidatorState() *validatorstest.State { - return &validatorstest.State{ - GetCurrentHeightF: func(context.Context) (uint64, error) { - return 0, nil - }, - GetSubnetIDF: func(_ context.Context, chainID ids.ID) (ids.ID, error) { - subnetID, ok := map[ids.ID]ids.ID{ - constants.PlatformChainID: constants.PrimaryNetworkID, - snowtest.XChainID: constants.PrimaryNetworkID, - snowtest.CChainID: constants.PrimaryNetworkID, - }[chainID] - if !ok { - return ids.Empty, errors.New("unknown chain") - } - return subnetID, nil - }, - GetValidatorSetF: func(context.Context, uint64, ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error) { - return map[ids.NodeID]*validators.GetValidatorOutput{}, nil - }, - GetCurrentValidatorSetF: func(context.Context, ids.ID) (map[ids.ID]*validators.GetCurrentValidatorOutput, uint64, error) { - return map[ids.ID]*validators.GetCurrentValidatorOutput{}, 0, nil - }, - } -} diff --git a/graft/evm/go.mod b/graft/evm/go.mod index f1e59ea83a62..0d65abb49a37 100644 --- a/graft/evm/go.mod +++ b/graft/evm/go.mod @@ -3,62 +3,92 @@ module github.com/ava-labs/avalanchego/graft/evm go 1.24.11 require ( + github.com/VictoriaMetrics/fastcache v1.12.1 + github.com/ava-labs/avalanchego v1.14.1-0.20251120155522-df4a8e531761 github.com/ava-labs/firewood-go-ethhash/ffi v0.0.18 github.com/ava-labs/libevm v1.13.15-0.20251210210615-b8e76562a300 + github.com/gorilla/rpc v1.2.0 github.com/holiman/uint256 v1.2.4 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.1 ) require ( - github.com/DataDog/zstd v1.4.5 // indirect - github.com/StackExchange/wmi v1.2.1 // indirect - github.com/VictoriaMetrics/fastcache v1.12.1 // indirect + github.com/BurntSushi/toml v1.5.0 // indirect + github.com/DataDog/zstd v1.5.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.20.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.5 // 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.8.1 // indirect - github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect + github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect - github.com/cockroachdb/redact v1.0.8 // indirect - github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 // indirect + github.com/cockroachdb/redact v1.1.3 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/gnark-crypto v0.18.1 // indirect github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/ethereum/c-kzg-4844 v1.0.0 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // 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/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/renameio/v2 v2.0.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/klauspost/compress v1.18.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mr-tron/base58 v1.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.22.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_golang v1.23.0 // 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/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect + github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/supranational/blst v0.3.14 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.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.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 + go.uber.org/zap v1.27.0 // indirect golang.org/x/crypto v0.45.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/sync v0.17.0 // indirect + golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e // indirect + golang.org/x/net v0.47.0 // indirect + golang.org/x/sync v0.18.0 // indirect golang.org/x/sys v0.38.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect + golang.org/x/term v0.37.0 // indirect + golang.org/x/text v0.31.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 + google.golang.org/protobuf v1.36.8 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/graft/evm/go.sum b/graft/evm/go.sum index fbc4f35fce6e..c16622cb5916 100644 --- a/graft/evm/go.sum +++ b/graft/evm/go.sum @@ -1,17 +1,16 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 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/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= -github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= +github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= @@ -27,30 +26,35 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU= github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= -github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= +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/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +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/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= -github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= -github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= +github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= -github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= +github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= +github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= @@ -66,67 +70,83 @@ github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHH github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +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.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= 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.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +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/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= 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.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= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +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.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= -github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 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/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= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -135,13 +155,26 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +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/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/rpc v1.2.0 h1:WvvdC2lNeT1SP32zrIce5l0ECBfbAlmrmSBsuc57wfk= +github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +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-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= @@ -149,32 +182,33 @@ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iU github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= +github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= +github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= -github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= -github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= -github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= +github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= +github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= +github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= +github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -183,44 +217,57 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= +github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= -github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= +github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= -github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= @@ -228,28 +275,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/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +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= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= +github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -263,22 +315,30 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +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/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -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/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5fl+nylMaIr9PVV1w343YRDtsy+Rwu7XI= +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.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/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= @@ -290,21 +350,58 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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/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.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.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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 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.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +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= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -318,10 +415,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +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.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -331,8 +434,9 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= -golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.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= @@ -345,23 +449,43 @@ golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/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.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= golang.org/x/sys v0.38.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.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= +golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= 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= +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.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -370,41 +494,65 @@ golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 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.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= 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 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 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.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= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 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-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.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +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.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= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -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.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +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.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= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -412,6 +560,9 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/graft/coreth/utils/address_range.go b/graft/evm/utils/address_range.go similarity index 100% rename from graft/coreth/utils/address_range.go rename to graft/evm/utils/address_range.go diff --git a/graft/coreth/utils/bounded_workers.go b/graft/evm/utils/bounded_workers.go similarity index 100% rename from graft/coreth/utils/bounded_workers.go rename to graft/evm/utils/bounded_workers.go diff --git a/graft/coreth/utils/bytes.go b/graft/evm/utils/bytes.go similarity index 100% rename from graft/coreth/utils/bytes.go rename to graft/evm/utils/bytes.go diff --git a/graft/coreth/utils/bytes_test.go b/graft/evm/utils/bytes_test.go similarity index 100% rename from graft/coreth/utils/bytes_test.go rename to graft/evm/utils/bytes_test.go diff --git a/graft/coreth/utils/denomination.go b/graft/evm/utils/denomination.go similarity index 100% rename from graft/coreth/utils/denomination.go rename to graft/evm/utils/denomination.go diff --git a/graft/subnet-evm/utils/metered_cache.go b/graft/evm/utils/metered_cache.go similarity index 100% rename from graft/subnet-evm/utils/metered_cache.go rename to graft/evm/utils/metered_cache.go diff --git a/graft/coreth/utils/numbers.go b/graft/evm/utils/numbers.go similarity index 100% rename from graft/coreth/utils/numbers.go rename to graft/evm/utils/numbers.go diff --git a/graft/coreth/utils/numbers_test.go b/graft/evm/utils/numbers_test.go similarity index 100% rename from graft/coreth/utils/numbers_test.go rename to graft/evm/utils/numbers_test.go diff --git a/graft/coreth/utils/rand/rand.go b/graft/evm/utils/rand/rand.go similarity index 100% rename from graft/coreth/utils/rand/rand.go rename to graft/evm/utils/rand/rand.go diff --git a/graft/coreth/utils/rpc/handler.go b/graft/evm/utils/rpc/handler.go similarity index 99% rename from graft/coreth/utils/rpc/handler.go rename to graft/evm/utils/rpc/handler.go index 98f4a45f32dd..a71bd92a7327 100644 --- a/graft/coreth/utils/rpc/handler.go +++ b/graft/evm/utils/rpc/handler.go @@ -6,8 +6,9 @@ package rpc import ( "net/http" - "github.com/ava-labs/avalanchego/utils/json" "github.com/gorilla/rpc/v2" + + "github.com/ava-labs/avalanchego/utils/json" ) // NewHandler returns a new Handler for a service where: diff --git a/graft/coreth/utils/utilstest/context.go b/graft/evm/utils/utilstest/context.go similarity index 100% rename from graft/coreth/utils/utilstest/context.go rename to graft/evm/utils/utilstest/context.go diff --git a/graft/coreth/utils/utilstest/key.go b/graft/evm/utils/utilstest/key.go similarity index 100% rename from graft/coreth/utils/utilstest/key.go rename to graft/evm/utils/utilstest/key.go diff --git a/graft/coreth/utils/utilstest/pointer.go b/graft/evm/utils/utilstest/pointer.go similarity index 100% rename from graft/coreth/utils/utilstest/pointer.go rename to graft/evm/utils/utilstest/pointer.go diff --git a/graft/subnet-evm/utils/utilstest/snow.go b/graft/evm/utils/utilstest/snow.go similarity index 88% rename from graft/subnet-evm/utils/utilstest/snow.go rename to graft/evm/utils/utilstest/snow.go index 8ed07c8d2808..bcd77caea43d 100644 --- a/graft/subnet-evm/utils/utilstest/snow.go +++ b/graft/evm/utils/utilstest/snow.go @@ -38,15 +38,15 @@ func NewTestValidatorState() *validatorstest.State { } return subnetID, nil }, - GetValidatorSetF: func(context.Context, uint64, ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error) { - return map[ids.NodeID]*validators.GetValidatorOutput{}, nil - }, GetWarpValidatorSetsF: func(context.Context, uint64) (map[ids.ID]validators.WarpSet, error) { return nil, nil }, GetWarpValidatorSetF: func(context.Context, uint64, ids.ID) (validators.WarpSet, error) { return validators.WarpSet{}, nil }, + GetValidatorSetF: func(context.Context, uint64, ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error) { + return map[ids.NodeID]*validators.GetValidatorOutput{}, nil + }, GetCurrentValidatorSetF: func(context.Context, ids.ID) (map[ids.ID]*validators.GetCurrentValidatorOutput, uint64, error) { return map[ids.ID]*validators.GetCurrentValidatorOutput{}, 0, nil }, @@ -64,18 +64,18 @@ func NewTestValidatorState() *validatorstest.State { // // snowCtx.ValidatorState = validatorState // // // Use: -// snowCtx := utils.NewTestSnowContext(t) +// snowCtx := utils.NewTestSnowContext(t, snowtest.CChainID) // // This function ensures that the snow context has a properly configured validator state // that includes the GetValidatorSetF function, which is required by many tests. -func NewTestSnowContext(t testing.TB) *snow.Context { - return NewTestSnowContextWithValidatorState(t, NewTestValidatorState()) +func NewTestSnowContext(t testing.TB, chainID ids.ID) *snow.Context { + return NewTestSnowContextWithValidatorState(t, chainID, NewTestValidatorState()) } // NewTestSnowContextWithValidatorState returns a snow.Context with the provided validator state. // This is useful when you need to customize the validator state behavior for specific tests. -func NewTestSnowContextWithValidatorState(t testing.TB, validatorState validators.State) *snow.Context { - snowCtx := snowtest.Context(t, SubnetEVMTestChainID) +func NewTestSnowContextWithValidatorState(t testing.TB, chainID ids.ID, validatorState validators.State) *snow.Context { + snowCtx := snowtest.Context(t, chainID) snowCtx.ValidatorState = validatorState return snowCtx } diff --git a/graft/subnet-evm/utils/utilstest/context_test.go b/graft/evm/utils/utilstest/snow_test.go similarity index 95% rename from graft/subnet-evm/utils/utilstest/context_test.go rename to graft/evm/utils/utilstest/snow_test.go index 8275b9431cab..254967727bd4 100644 --- a/graft/subnet-evm/utils/utilstest/context_test.go +++ b/graft/evm/utils/utilstest/snow_test.go @@ -13,7 +13,7 @@ import ( func TestNewTestSnowContext(t *testing.T) { // Test that NewTestSnowContext creates a context with validator state - snowCtx := NewTestSnowContext(t) + snowCtx := NewTestSnowContext(t, SubnetEVMTestChainID) require.NotNil(t, snowCtx.ValidatorState) // Test that the validator state has the required functions diff --git a/graft/coreth/utils/utilstest/timeout.go b/graft/evm/utils/utilstest/timeout.go similarity index 100% rename from graft/coreth/utils/utilstest/timeout.go rename to graft/evm/utils/utilstest/timeout.go diff --git a/graft/subnet-evm/accounts/abi/bind/precompilebind/templatetest/precompile_config_test_template.go b/graft/subnet-evm/accounts/abi/bind/precompilebind/templatetest/precompile_config_test_template.go index 9d48a24d94e4..8133212216a8 100644 --- a/graft/subnet-evm/accounts/abi/bind/precompilebind/templatetest/precompile_config_test_template.go +++ b/graft/subnet-evm/accounts/abi/bind/precompilebind/templatetest/precompile_config_test_template.go @@ -16,7 +16,7 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" {{- if .Contract.AllowList}} "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" diff --git a/graft/subnet-evm/commontype/fee_config.go b/graft/subnet-evm/commontype/fee_config.go index dac1f179e5d9..423f45405c67 100644 --- a/graft/subnet-evm/commontype/fee_config.go +++ b/graft/subnet-evm/commontype/fee_config.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/libevm/common" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) var ( @@ -137,14 +137,14 @@ func (f *FeeConfig) Equal(other *FeeConfig) bool { return false } - return utils.BigNumEqual(f.GasLimit, other.GasLimit) && + return utils.BigEqual(f.GasLimit, other.GasLimit) && f.TargetBlockRate == other.TargetBlockRate && - utils.BigNumEqual(f.MinBaseFee, other.MinBaseFee) && - utils.BigNumEqual(f.TargetGas, other.TargetGas) && - utils.BigNumEqual(f.BaseFeeChangeDenominator, other.BaseFeeChangeDenominator) && - utils.BigNumEqual(f.MinBlockGasCost, other.MinBlockGasCost) && - utils.BigNumEqual(f.MaxBlockGasCost, other.MaxBlockGasCost) && - utils.BigNumEqual(f.BlockGasCostStep, other.BlockGasCostStep) + utils.BigEqual(f.MinBaseFee, other.MinBaseFee) && + utils.BigEqual(f.TargetGas, other.TargetGas) && + utils.BigEqual(f.BaseFeeChangeDenominator, other.BaseFeeChangeDenominator) && + utils.BigEqual(f.MinBlockGasCost, other.MinBlockGasCost) && + utils.BigEqual(f.MaxBlockGasCost, other.MaxBlockGasCost) && + utils.BigEqual(f.BlockGasCostStep, other.BlockGasCostStep) } // checkByteLens checks byte lengths against common.HashLen (32 bytes) and returns error diff --git a/graft/subnet-evm/consensus/dummy/consensus.go b/graft/subnet-evm/consensus/dummy/consensus.go index 9ae9b2a48d50..3e5d02a7514b 100644 --- a/graft/subnet-evm/consensus/dummy/consensus.go +++ b/graft/subnet-evm/consensus/dummy/consensus.go @@ -13,13 +13,13 @@ import ( "github.com/ava-labs/libevm/core/types" "github.com/ava-labs/libevm/trie" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customheader" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customtypes" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/vmerrors" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/subnet-evm/core/blockchain_ext_test.go b/graft/subnet-evm/core/blockchain_ext_test.go index beed7c6828b0..f5ccdf33a932 100644 --- a/graft/subnet-evm/core/blockchain_ext_test.go +++ b/graft/subnet-evm/core/blockchain_ext_test.go @@ -20,6 +20,7 @@ import ( "github.com/holiman/uint256" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" @@ -28,7 +29,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/deployerallowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/feemanager" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ethparams "github.com/ava-labs/libevm/params" ) diff --git a/graft/subnet-evm/core/extstate/options.go b/graft/subnet-evm/core/extstate/options.go index 58f960456b96..e59dfbb8f05d 100644 --- a/graft/subnet-evm/core/extstate/options.go +++ b/graft/subnet-evm/core/extstate/options.go @@ -6,7 +6,7 @@ package extstate import ( "github.com/ava-labs/libevm/core/state" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) type workerPool struct { diff --git a/graft/subnet-evm/core/genesis_extra_test.go b/graft/subnet-evm/core/genesis_extra_test.go index ea64965beb9d..02c4b4cd566d 100644 --- a/graft/subnet-evm/core/genesis_extra_test.go +++ b/graft/subnet-evm/core/genesis_extra_test.go @@ -14,11 +14,11 @@ import ( "github.com/ava-labs/libevm/triedb" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/paramstest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/upgrade/upgradetest" ) diff --git a/graft/subnet-evm/core/genesis_test.go b/graft/subnet-evm/core/genesis_test.go index 119364956dc9..53bf4f55fabb 100644 --- a/graft/subnet-evm/core/genesis_test.go +++ b/graft/subnet-evm/core/genesis_test.go @@ -36,6 +36,7 @@ import ( "testing" "github.com/ava-labs/avalanchego/graft/evm/firewood" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" @@ -44,7 +45,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/deployerallowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/triedb/pathdb" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/state" diff --git a/graft/subnet-evm/core/state/snapshot/difflayer_test.go b/graft/subnet-evm/core/state/snapshot/difflayer_test.go index 5be123622e88..caad0b89aaf7 100644 --- a/graft/subnet-evm/core/state/snapshot/difflayer_test.go +++ b/graft/subnet-evm/core/state/snapshot/difflayer_test.go @@ -33,7 +33,7 @@ import ( "math/rand" "testing" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/crypto" "github.com/ava-labs/libevm/ethdb/memorydb" diff --git a/graft/subnet-evm/core/state/snapshot/disklayer.go b/graft/subnet-evm/core/state/snapshot/disklayer.go index dd8b2e594d32..afd55cc6bf19 100644 --- a/graft/subnet-evm/core/state/snapshot/disklayer.go +++ b/graft/subnet-evm/core/state/snapshot/disklayer.go @@ -32,7 +32,7 @@ import ( "sync" "time" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" diff --git a/graft/subnet-evm/core/state/snapshot/generate.go b/graft/subnet-evm/core/state/snapshot/generate.go index 411f071766d1..ef287f1e2333 100644 --- a/graft/subnet-evm/core/state/snapshot/generate.go +++ b/graft/subnet-evm/core/state/snapshot/generate.go @@ -32,8 +32,8 @@ import ( "fmt" "time" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customrawdb" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" diff --git a/graft/subnet-evm/core/state/snapshot/snapshot_ext.go b/graft/subnet-evm/core/state/snapshot/snapshot_ext.go index a83508495005..0ac47fa73487 100644 --- a/graft/subnet-evm/core/state/snapshot/snapshot_ext.go +++ b/graft/subnet-evm/core/state/snapshot/snapshot_ext.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/ethdb" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) func (t *Tree) DiskAccountIterator(seek common.Hash) AccountIterator { diff --git a/graft/subnet-evm/core/state_processor_ext_test.go b/graft/subnet-evm/core/state_processor_ext_test.go index 3319cb28a737..131a4983ea57 100644 --- a/graft/subnet-evm/core/state_processor_ext_test.go +++ b/graft/subnet-evm/core/state_processor_ext_test.go @@ -14,12 +14,12 @@ import ( "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/vmerrors" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/txallowlist" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ethparams "github.com/ava-labs/libevm/params" ) diff --git a/graft/subnet-evm/core/state_processor_test.go b/graft/subnet-evm/core/state_processor_test.go index 6cee95d328a1..4791677e6144 100644 --- a/graft/subnet-evm/core/state_processor_test.go +++ b/graft/subnet-evm/core/state_processor_test.go @@ -32,6 +32,7 @@ import ( "math/big" "testing" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" @@ -39,7 +40,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customheader" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customtypes" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/upgrade/legacy" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/consensus/misc/eip4844" diff --git a/graft/subnet-evm/core/txpool/legacypool/legacypool.go b/graft/subnet-evm/core/txpool/legacypool/legacypool.go index cc2d179820fb..99e062a17d50 100644 --- a/graft/subnet-evm/core/txpool/legacypool/legacypool.go +++ b/graft/subnet-evm/core/txpool/legacypool/legacypool.go @@ -37,13 +37,13 @@ import ( "sync/atomic" "time" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/txpool" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customheader" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/feemanager" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/prque" "github.com/ava-labs/libevm/core/state" diff --git a/graft/subnet-evm/internal/ethapi/api_test.go b/graft/subnet-evm/internal/ethapi/api_test.go index cfe43798b57d..a5f577783182 100644 --- a/graft/subnet-evm/internal/ethapi/api_test.go +++ b/graft/subnet-evm/internal/ethapi/api_test.go @@ -42,6 +42,7 @@ import ( "testing" "time" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" @@ -50,7 +51,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/upgrade/legacy" "github.com/ava-labs/avalanchego/graft/subnet-evm/rpc" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/libevm/accounts" "github.com/ava-labs/libevm/accounts/keystore" diff --git a/graft/subnet-evm/network/peer_tracker.go b/graft/subnet-evm/network/peer_tracker.go index 6d6ceab2301c..3da10624cc99 100644 --- a/graft/subnet-evm/network/peer_tracker.go +++ b/graft/subnet-evm/network/peer_tracker.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/libevm/log" "github.com/ava-labs/libevm/metrics" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/rand" + "github.com/ava-labs/avalanchego/graft/evm/utils/rand" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/version" diff --git a/graft/subnet-evm/params/config.go b/graft/subnet-evm/params/config.go index 07ba1657af64..3e5f4783c9e9 100644 --- a/graft/subnet-evm/params/config.go +++ b/graft/subnet-evm/params/config.go @@ -30,8 +30,8 @@ package params import ( "math/big" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/libevm/libevm" ethparams "github.com/ava-labs/libevm/params" ) diff --git a/graft/subnet-evm/params/config_extra.go b/graft/subnet-evm/params/config_extra.go index b357cf36c5f9..e34969b66de7 100644 --- a/graft/subnet-evm/params/config_extra.go +++ b/graft/subnet-evm/params/config_extra.go @@ -8,8 +8,8 @@ import ( "errors" "math/big" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/upgrade" ) diff --git a/graft/subnet-evm/params/config_extra_test.go b/graft/subnet-evm/params/config_extra_test.go index a3afd1e9664d..887ed7bcf3d4 100644 --- a/graft/subnet-evm/params/config_extra_test.go +++ b/graft/subnet-evm/params/config_extra_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/upgrade/upgradetest" ) diff --git a/graft/subnet-evm/params/config_test.go b/graft/subnet-evm/params/config_test.go index 5ae1c1352792..212239ae991b 100644 --- a/graft/subnet-evm/params/config_test.go +++ b/graft/subnet-evm/params/config_test.go @@ -35,11 +35,11 @@ import ( "testing" "time" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/nativeminter" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/rewardmanager" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/txallowlist" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/libevm/common" ethparams "github.com/ava-labs/libevm/params" "github.com/stretchr/testify/require" diff --git a/graft/subnet-evm/params/extras/config.go b/graft/subnet-evm/params/extras/config.go index cf1b5b7e1974..57e868c7e039 100644 --- a/graft/subnet-evm/params/extras/config.go +++ b/graft/subnet-evm/params/extras/config.go @@ -10,8 +10,8 @@ import ( "github.com/ava-labs/libevm/common" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/utils/constants" diff --git a/graft/subnet-evm/params/extras/config_extra_test.go b/graft/subnet-evm/params/extras/config_extra_test.go index 9ba304b46b0d..250e8478cafd 100644 --- a/graft/subnet-evm/params/extras/config_extra_test.go +++ b/graft/subnet-evm/params/extras/config_extra_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) func TestIsTimestampForked(t *testing.T) { diff --git a/graft/subnet-evm/params/extras/network_upgrades.go b/graft/subnet-evm/params/extras/network_upgrades.go index 59606d9445a2..b8f83663d115 100644 --- a/graft/subnet-evm/params/extras/network_upgrades.go +++ b/graft/subnet-evm/params/extras/network_upgrades.go @@ -9,7 +9,7 @@ import ( "reflect" "strconv" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/upgrade" ethparams "github.com/ava-labs/libevm/params" diff --git a/graft/subnet-evm/params/extras/network_upgrades_test.go b/graft/subnet-evm/params/extras/network_upgrades_test.go index dcaad70f6c22..e97e659bc911 100644 --- a/graft/subnet-evm/params/extras/network_upgrades_test.go +++ b/graft/subnet-evm/params/extras/network_upgrades_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/upgrade/upgradetest" "github.com/ava-labs/avalanchego/utils/constants" diff --git a/graft/subnet-evm/params/extras/precompile_config_test.go b/graft/subnet-evm/params/extras/precompile_config_test.go index 3f4bb87f2afe..e36bdf9d2b4c 100644 --- a/graft/subnet-evm/params/extras/precompile_config_test.go +++ b/graft/subnet-evm/params/extras/precompile_config_test.go @@ -11,6 +11,8 @@ import ( "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/deployerallowlist" @@ -18,15 +20,13 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/nativeminter" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/rewardmanager" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/txallowlist" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" ) func TestVerifyWithChainConfig(t *testing.T) { admins := []common.Address{{1}} c := *TestChainConfig config := &c - config.SnowCtx = utilstest.NewTestSnowContext(t) + config.SnowCtx = utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) config.GenesisPrecompiles = Precompiles{ txallowlist.ConfigKey: txallowlist.NewConfig(utils.NewUint64(2), nil, nil, nil), } @@ -72,7 +72,7 @@ func TestVerifyWithChainConfigAtNilTimestamp(t *testing.T) { admins := []common.Address{{0}} c := *TestChainConfig config := &c - config.SnowCtx = utilstest.NewTestSnowContext(t) + config.SnowCtx = utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) config.PrecompileUpgrades = []PrecompileUpgrade{ // this does NOT enable the precompile, so it should be upgradeable. {Config: txallowlist.NewConfig(nil, nil, nil, nil)}, @@ -193,7 +193,7 @@ func TestVerifyPrecompileUpgrades(t *testing.T) { require := require.New(t) c := *TestChainConfig config := &c - config.SnowCtx = utilstest.NewTestSnowContext(t) + config.SnowCtx = utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) config.PrecompileUpgrades = tt.upgrades err := config.Verify() @@ -234,7 +234,7 @@ func TestVerifyPrecompiles(t *testing.T) { require := require.New(t) c := *TestChainConfig config := &c - config.SnowCtx = utilstest.NewTestSnowContext(t) + config.SnowCtx = utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) config.GenesisPrecompiles = tt.precompiles err := config.Verify() @@ -248,7 +248,7 @@ func TestVerifyRequiresSortedTimestamps(t *testing.T) { config := &ChainConfig{ FeeConfig: DefaultFeeConfig, AvalancheContext: AvalancheContext{ - SnowCtx: utilstest.NewTestSnowContext(t), + SnowCtx: utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID), }, } config.PrecompileUpgrades = []PrecompileUpgrade{ diff --git a/graft/subnet-evm/params/extras/precompile_upgrade.go b/graft/subnet-evm/params/extras/precompile_upgrade.go index 0fcb912b939c..021cd483f713 100644 --- a/graft/subnet-evm/params/extras/precompile_upgrade.go +++ b/graft/subnet-evm/params/extras/precompile_upgrade.go @@ -10,9 +10,9 @@ import ( "github.com/ava-labs/libevm/common" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/modules" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ethparams "github.com/ava-labs/libevm/params" ) diff --git a/graft/subnet-evm/params/extras/precompile_upgrade_test.go b/graft/subnet-evm/params/extras/precompile_upgrade_test.go index 5b88732bfaee..e05d1a31d5d4 100644 --- a/graft/subnet-evm/params/extras/precompile_upgrade_test.go +++ b/graft/subnet-evm/params/extras/precompile_upgrade_test.go @@ -10,9 +10,9 @@ import ( "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/deployerallowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/txallowlist" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) func TestVerifyUpgradeConfig(t *testing.T) { diff --git a/graft/subnet-evm/params/extras/state_upgrade_test.go b/graft/subnet-evm/params/extras/state_upgrade_test.go index 98a830b193e9..8a8deb947a7e 100644 --- a/graft/subnet-evm/params/extras/state_upgrade_test.go +++ b/graft/subnet-evm/params/extras/state_upgrade_test.go @@ -12,8 +12,8 @@ import ( "github.com/ava-labs/libevm/common/math" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" ) func TestVerifyStateUpgrades(t *testing.T) { @@ -64,7 +64,7 @@ func TestVerifyStateUpgrades(t *testing.T) { require := require.New(t) c := *TestChainConfig config := &c - config.SnowCtx = utilstest.NewTestSnowContext(t) + config.SnowCtx = utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) config.StateUpgrades = tt.upgrades err := config.Verify() diff --git a/graft/subnet-evm/plugin/evm/customheader/base_fee_test.go b/graft/subnet-evm/plugin/evm/customheader/base_fee_test.go index e7a6783c1366..50e8444a7040 100644 --- a/graft/subnet-evm/plugin/evm/customheader/base_fee_test.go +++ b/graft/subnet-evm/plugin/evm/customheader/base_fee_test.go @@ -11,10 +11,10 @@ import ( "github.com/ava-labs/libevm/core/types" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/upgrade/subnetevm" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) const ( diff --git a/graft/subnet-evm/plugin/evm/customheader/block_gas_cost_test.go b/graft/subnet-evm/plugin/evm/customheader/block_gas_cost_test.go index 69fc9db9a456..b70efceb3856 100644 --- a/graft/subnet-evm/plugin/evm/customheader/block_gas_cost_test.go +++ b/graft/subnet-evm/plugin/evm/customheader/block_gas_cost_test.go @@ -12,10 +12,10 @@ import ( "github.com/ava-labs/libevm/core/types" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customtypes" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) var ( diff --git a/graft/subnet-evm/plugin/evm/customheader/extra_test.go b/graft/subnet-evm/plugin/evm/customheader/extra_test.go index 5f1da55388be..17fd22b6814f 100644 --- a/graft/subnet-evm/plugin/evm/customheader/extra_test.go +++ b/graft/subnet-evm/plugin/evm/customheader/extra_test.go @@ -11,10 +11,10 @@ import ( "github.com/ava-labs/libevm/core/types" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customtypes" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/upgrade/subnetevm" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) func TestMain(m *testing.M) { diff --git a/graft/subnet-evm/plugin/evm/customheader/min_delay_excess_test.go b/graft/subnet-evm/plugin/evm/customheader/min_delay_excess_test.go index 6190502b7389..4a6aad3711f4 100644 --- a/graft/subnet-evm/plugin/evm/customheader/min_delay_excess_test.go +++ b/graft/subnet-evm/plugin/evm/customheader/min_delay_excess_test.go @@ -9,10 +9,10 @@ import ( "github.com/ava-labs/libevm/core/types" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customtypes" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/subnet-evm/plugin/evm/customheader/time_test.go b/graft/subnet-evm/plugin/evm/customheader/time_test.go index e9b4f9e684c9..2a4bcef71340 100644 --- a/graft/subnet-evm/plugin/evm/customheader/time_test.go +++ b/graft/subnet-evm/plugin/evm/customheader/time_test.go @@ -10,9 +10,9 @@ import ( "github.com/ava-labs/libevm/core/types" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customtypes" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/subnet-evm/plugin/evm/customtypes/block_ext_test.go b/graft/subnet-evm/plugin/evm/customtypes/block_ext_test.go index 87d6ebe51a38..b1a478298bd7 100644 --- a/graft/subnet-evm/plugin/evm/customtypes/block_ext_test.go +++ b/graft/subnet-evm/plugin/evm/customtypes/block_ext_test.go @@ -12,9 +12,9 @@ import ( "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/internal/blocktest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/subnet-evm/plugin/evm/customtypes/header_ext_test.go b/graft/subnet-evm/plugin/evm/customtypes/header_ext_test.go index c74f823f45af..7d0dc6d19cba 100644 --- a/graft/subnet-evm/plugin/evm/customtypes/header_ext_test.go +++ b/graft/subnet-evm/plugin/evm/customtypes/header_ext_test.go @@ -17,7 +17,7 @@ import ( "github.com/ava-labs/libevm/rlp" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/vms/evm/acp226" ) diff --git a/graft/subnet-evm/plugin/evm/gossip_test.go b/graft/subnet-evm/plugin/evm/gossip_test.go index c056cf4f8790..581909919827 100644 --- a/graft/subnet-evm/plugin/evm/gossip_test.go +++ b/graft/subnet-evm/plugin/evm/gossip_test.go @@ -19,12 +19,12 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/txpool" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/txpool/legacypool" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/network/p2p/gossip" ) diff --git a/graft/subnet-evm/plugin/evm/syncervm_test.go b/graft/subnet-evm/plugin/evm/syncervm_test.go index a10d316e76ed..215ba4bd15e0 100644 --- a/graft/subnet-evm/plugin/evm/syncervm_test.go +++ b/graft/subnet-evm/plugin/evm/syncervm_test.go @@ -25,13 +25,13 @@ import ( "github.com/ava-labs/avalanchego/api/metrics" "github.com/ava-labs/avalanchego/database/prefixdb" "github.com/ava-labs/avalanchego/graft/evm/constants" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/coretest" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/paramstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customrawdb" "github.com/ava-labs/avalanchego/graft/subnet-evm/sync/statesync/statesynctest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/engine/enginetest" diff --git a/graft/subnet-evm/plugin/evm/tx_gossip_test.go b/graft/subnet-evm/plugin/evm/tx_gossip_test.go index 1a4ea27e09be..2263ff0a19d9 100644 --- a/graft/subnet-evm/plugin/evm/tx_gossip_test.go +++ b/graft/subnet-evm/plugin/evm/tx_gossip_test.go @@ -17,8 +17,8 @@ import ( "google.golang.org/protobuf/proto" "github.com/ava-labs/avalanchego/database/memdb" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/paramstest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/gossip" @@ -38,7 +38,7 @@ func TestEthTxGossip(t *testing.T) { require := require.New(t) ctx := t.Context() validatorState := utilstest.NewTestValidatorState() - snowCtx := utilstest.NewTestSnowContextWithValidatorState(t, validatorState) + snowCtx := utilstest.NewTestSnowContextWithValidatorState(t, utilstest.SubnetEVMTestChainID, validatorState) responseSender := &enginetest.SenderStub{ SentAppResponse: make(chan []byte, 1), @@ -159,7 +159,7 @@ func TestEthTxGossip(t *testing.T) { func TestEthTxPushGossipOutbound(t *testing.T) { require := require.New(t) ctx := t.Context() - snowCtx := utilstest.NewTestSnowContext(t) + snowCtx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) sender := &enginetest.SenderStub{ SentAppGossip: make(chan []byte, 1), } @@ -212,7 +212,7 @@ func TestEthTxPushGossipOutbound(t *testing.T) { func TestEthTxPushGossipInbound(t *testing.T) { require := require.New(t) ctx := t.Context() - snowCtx := utilstest.NewTestSnowContext(t) + snowCtx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) sender := &enginetest.Sender{} vm := &VM{ diff --git a/graft/subnet-evm/plugin/evm/vm_test.go b/graft/subnet-evm/plugin/evm/vm_test.go index acdcdb65fe6f..199a5a07d0a8 100644 --- a/graft/subnet-evm/plugin/evm/vm_test.go +++ b/graft/subnet-evm/plugin/evm/vm_test.go @@ -30,6 +30,8 @@ import ( "github.com/ava-labs/avalanchego/database/memdb" "github.com/ava-labs/avalanchego/database/prefixdb" "github.com/ava-labs/avalanchego/graft/evm/constants" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/txpool" @@ -50,8 +52,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/rewardmanager" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/txallowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/rpc" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/consensus/snowman" @@ -153,7 +153,7 @@ type testVM struct { } func newVM(t *testing.T, config testVMConfig) *testVM { - ctx := utilstest.NewTestSnowContext(t) + ctx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) fork := upgradetest.Latest if config.fork != nil { fork = *config.fork @@ -228,7 +228,7 @@ func setupGenesis( *prefixdb.Database, []byte, ) { - ctx := utilstest.NewTestSnowContext(t) + ctx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) genesisJSON := toGenesisJSON(paramstest.ForkToChainConfig[fork]) ctx.NetworkUpgrades = upgradetest.GetConfig(fork) @@ -2671,7 +2671,7 @@ func TestParentBeaconRootBlock(t *testing.T) { func TestStandaloneDB(t *testing.T) { vm := &VM{} - ctx := utilstest.NewTestSnowContext(t) + ctx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) baseDB := memdb.New() atomicMemory := atomic.NewMemory(prefixdb.New([]byte{0}, baseDB)) ctx.SharedMemory = atomicMemory.NewSharedMemory(ctx.ChainID) diff --git a/graft/subnet-evm/plugin/evm/vm_upgrade_bytes_test.go b/graft/subnet-evm/plugin/evm/vm_upgrade_bytes_test.go index 2aec4414a49c..a05f0a8ea523 100644 --- a/graft/subnet-evm/plugin/evm/vm_upgrade_bytes_test.go +++ b/graft/subnet-evm/plugin/evm/vm_upgrade_bytes_test.go @@ -19,13 +19,13 @@ import ( "github.com/stretchr/testify/require" "github.com/ava-labs/avalanchego/api/metrics" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/paramstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/vmerrors" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/txallowlist" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/upgrade/upgradetest" diff --git a/graft/subnet-evm/plugin/evm/vm_warp_test.go b/graft/subnet-evm/plugin/evm/vm_warp_test.go index a9ae481d4d1f..9ab572960c4d 100644 --- a/graft/subnet-evm/plugin/evm/vm_warp_test.go +++ b/graft/subnet-evm/plugin/evm/vm_warp_test.go @@ -20,6 +20,7 @@ import ( _ "embed" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/eth/tracers" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" @@ -28,7 +29,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customheader" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/extension" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contract" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/warp" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" diff --git a/graft/subnet-evm/precompile/allowlist/allowlisttest/test_allowlist_config.go b/graft/subnet-evm/precompile/allowlist/allowlisttest/test_allowlist_config.go index b6547010f31f..15bdcc1e9869 100644 --- a/graft/subnet-evm/precompile/allowlist/allowlisttest/test_allowlist_config.go +++ b/graft/subnet-evm/precompile/allowlist/allowlisttest/test_allowlist_config.go @@ -11,11 +11,11 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/modules" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) // mkConfigWithAllowList creates a new config with the correct type for [module] diff --git a/graft/subnet-evm/precompile/contracts/deployerallowlist/config_test.go b/graft/subnet-evm/precompile/contracts/deployerallowlist/config_test.go index 15dff7b359fb..b484aedb211d 100644 --- a/graft/subnet-evm/precompile/contracts/deployerallowlist/config_test.go +++ b/graft/subnet-evm/precompile/contracts/deployerallowlist/config_test.go @@ -9,11 +9,11 @@ import ( "github.com/ava-labs/libevm/common" "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/deployerallowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) func TestVerify(t *testing.T) { diff --git a/graft/subnet-evm/precompile/contracts/deployerallowlist/simulated_test.go b/graft/subnet-evm/precompile/contracts/deployerallowlist/simulated_test.go index 6217561dd013..c0f0d2a95f59 100644 --- a/graft/subnet-evm/precompile/contracts/deployerallowlist/simulated_test.go +++ b/graft/subnet-evm/precompile/contracts/deployerallowlist/simulated_test.go @@ -11,6 +11,7 @@ import ( "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/accounts/abi/bind" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" @@ -19,7 +20,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/deployerallowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/utilstest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" sim "github.com/ava-labs/avalanchego/graft/subnet-evm/ethclient/simulated" allowlistbindings "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest/bindings" diff --git a/graft/subnet-evm/precompile/contracts/feemanager/config_test.go b/graft/subnet-evm/precompile/contracts/feemanager/config_test.go index 41dee876bac5..bcc78d509f38 100644 --- a/graft/subnet-evm/precompile/contracts/feemanager/config_test.go +++ b/graft/subnet-evm/precompile/contracts/feemanager/config_test.go @@ -10,12 +10,12 @@ import ( "github.com/ava-labs/libevm/common" "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/feemanager" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) var validFeeConfig = commontype.FeeConfig{ diff --git a/graft/subnet-evm/precompile/contracts/feemanager/simulated_test.go b/graft/subnet-evm/precompile/contracts/feemanager/simulated_test.go index 53e0e61f0728..ade2a9ed2fe7 100644 --- a/graft/subnet-evm/precompile/contracts/feemanager/simulated_test.go +++ b/graft/subnet-evm/precompile/contracts/feemanager/simulated_test.go @@ -13,6 +13,7 @@ import ( "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/accounts/abi/bind" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" @@ -23,7 +24,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/feemanager" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/utilstest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" sim "github.com/ava-labs/avalanchego/graft/subnet-evm/ethclient/simulated" feemanagerbindings "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/feemanager/feemanagertest/bindings" diff --git a/graft/subnet-evm/precompile/contracts/nativeminter/config.go b/graft/subnet-evm/precompile/contracts/nativeminter/config.go index 17c9e3438037..ed1ca4365d75 100644 --- a/graft/subnet-evm/precompile/contracts/nativeminter/config.go +++ b/graft/subnet-evm/precompile/contracts/nativeminter/config.go @@ -11,9 +11,9 @@ import ( "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/common/math" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) var ( @@ -84,7 +84,7 @@ func (c *Config) Equal(cfg precompileconfig.Config) bool { } bigIntAmount := (*big.Int)(amount) bigIntVal := (*big.Int)(val) - if !utils.BigNumEqual(bigIntAmount, bigIntVal) { + if !utils.BigEqual(bigIntAmount, bigIntVal) { return false } } diff --git a/graft/subnet-evm/precompile/contracts/nativeminter/config_test.go b/graft/subnet-evm/precompile/contracts/nativeminter/config_test.go index 50241e16d02b..f7798595ff99 100644 --- a/graft/subnet-evm/precompile/contracts/nativeminter/config_test.go +++ b/graft/subnet-evm/precompile/contracts/nativeminter/config_test.go @@ -10,12 +10,12 @@ import ( "github.com/ava-labs/libevm/common/math" "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/nativeminter" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) func TestVerify(t *testing.T) { diff --git a/graft/subnet-evm/precompile/contracts/nativeminter/simulated_test.go b/graft/subnet-evm/precompile/contracts/nativeminter/simulated_test.go index 738b5b935d59..5492c7fc7e32 100644 --- a/graft/subnet-evm/precompile/contracts/nativeminter/simulated_test.go +++ b/graft/subnet-evm/precompile/contracts/nativeminter/simulated_test.go @@ -12,6 +12,7 @@ import ( "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/accounts/abi/bind" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" @@ -20,7 +21,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/nativeminter" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/utilstest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" sim "github.com/ava-labs/avalanchego/graft/subnet-evm/ethclient/simulated" nativeminterbindings "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/nativeminter/nativemintertest/bindings" diff --git a/graft/subnet-evm/precompile/contracts/rewardmanager/config_test.go b/graft/subnet-evm/precompile/contracts/rewardmanager/config_test.go index 997116cc27d3..4ac532f028b6 100644 --- a/graft/subnet-evm/precompile/contracts/rewardmanager/config_test.go +++ b/graft/subnet-evm/precompile/contracts/rewardmanager/config_test.go @@ -9,11 +9,11 @@ import ( "github.com/ava-labs/libevm/common" "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/rewardmanager" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) func TestVerify(t *testing.T) { diff --git a/graft/subnet-evm/precompile/contracts/rewardmanager/simulated_test.go b/graft/subnet-evm/precompile/contracts/rewardmanager/simulated_test.go index c27fafcfada5..84a7669c0392 100644 --- a/graft/subnet-evm/precompile/contracts/rewardmanager/simulated_test.go +++ b/graft/subnet-evm/precompile/contracts/rewardmanager/simulated_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/require" "github.com/ava-labs/avalanchego/graft/evm/constants" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/accounts/abi/bind" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/eth/ethconfig" @@ -25,7 +26,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/rewardmanager" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/utilstest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" sim "github.com/ava-labs/avalanchego/graft/subnet-evm/ethclient/simulated" rewardmanagerbindings "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/rewardmanager/rewardmanagertest/bindings" diff --git a/graft/subnet-evm/precompile/contracts/txallowlist/config_test.go b/graft/subnet-evm/precompile/contracts/txallowlist/config_test.go index 026e42937751..3161ed445027 100644 --- a/graft/subnet-evm/precompile/contracts/txallowlist/config_test.go +++ b/graft/subnet-evm/precompile/contracts/txallowlist/config_test.go @@ -9,11 +9,11 @@ import ( "github.com/ava-labs/libevm/common" "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/txallowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) func TestVerify(t *testing.T) { diff --git a/graft/subnet-evm/precompile/contracts/txallowlist/simulated_test.go b/graft/subnet-evm/precompile/contracts/txallowlist/simulated_test.go index e746675ce5b2..763efc6a0f59 100644 --- a/graft/subnet-evm/precompile/contracts/txallowlist/simulated_test.go +++ b/graft/subnet-evm/precompile/contracts/txallowlist/simulated_test.go @@ -11,6 +11,7 @@ import ( "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/accounts/abi/bind" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" @@ -20,7 +21,6 @@ import ( "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/txallowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/utilstest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" sim "github.com/ava-labs/avalanchego/graft/subnet-evm/ethclient/simulated" allowlistbindings "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest/bindings" diff --git a/graft/subnet-evm/precompile/contracts/warp/config_test.go b/graft/subnet-evm/precompile/contracts/warp/config_test.go index f3c43d0248bb..67faf919a2ab 100644 --- a/graft/subnet-evm/precompile/contracts/warp/config_test.go +++ b/graft/subnet-evm/precompile/contracts/warp/config_test.go @@ -8,9 +8,9 @@ import ( "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) func TestVerify(t *testing.T) { diff --git a/graft/subnet-evm/precompile/contracts/warp/contract_test.go b/graft/subnet-evm/precompile/contracts/warp/contract_test.go index 962bdb23dbc2..9d4034cc75ae 100644 --- a/graft/subnet-evm/precompile/contracts/warp/contract_test.go +++ b/graft/subnet-evm/precompile/contracts/warp/contract_test.go @@ -12,12 +12,12 @@ import ( "github.com/ava-labs/libevm/core/vm" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/extstate" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras/extrastest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contract" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/upgrade/upgradetest" "github.com/ava-labs/avalanchego/utils/set" @@ -62,7 +62,7 @@ func runBenchmarks( func getBlockchainIDTests(tb testing.TB, rules extras.AvalancheRules) []precompiletest.PrecompileTest { callerAddr := common.HexToAddress("0x0123") - defaultSnowCtx := utilstest.NewTestSnowContext(tb) + defaultSnowCtx := utilstest.NewTestSnowContext(tb, utilstest.SubnetEVMTestChainID) blockchainID := defaultSnowCtx.ChainID gasConfig := CurrentGasConfig(rules) @@ -128,7 +128,7 @@ func BenchmarkGetBlockchainID(b *testing.B) { func sendWarpMessageTests(tb testing.TB, rules extras.AvalancheRules) []precompiletest.PrecompileTest { callerAddr := common.HexToAddress("0x0123") - defaultSnowCtx := utilstest.NewTestSnowContext(tb) + defaultSnowCtx := utilstest.NewTestSnowContext(tb, utilstest.SubnetEVMTestChainID) blockchainID := defaultSnowCtx.ChainID sendWarpMessagePayload := agoUtils.RandomBytes(100) diff --git a/graft/subnet-evm/precompile/contracts/warp/predicate_test.go b/graft/subnet-evm/precompile/contracts/warp/predicate_test.go index 50795dbbd7c5..976019a5b87d 100644 --- a/graft/subnet-evm/precompile/contracts/warp/predicate_test.go +++ b/graft/subnet-evm/precompile/contracts/warp/predicate_test.go @@ -12,15 +12,16 @@ import ( "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras/extrastest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompiletest" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/engine/snowman/block" + "github.com/ava-labs/avalanchego/snow/snowtest" "github.com/ava-labs/avalanchego/snow/validators" "github.com/ava-labs/avalanchego/snow/validators/validatorstest" "github.com/ava-labs/avalanchego/upgrade/upgradetest" @@ -225,7 +226,7 @@ func createSnowCtx(tb testing.TB, validatorRanges []validatorRange) *snow.Contex // results. warpValidators, warpValidatorsErr := validators.FlattenValidatorSet(validatorSet) - snowCtx := utilstest.NewTestSnowContext(tb) + snowCtx := snowtest.Context(tb, utilstest.SubnetEVMTestChainID) snowCtx.ValidatorState = &validatorstest.State{ GetSubnetIDF: func(context.Context, ids.ID) (ids.ID, error) { return sourceSubnetID, nil @@ -313,7 +314,7 @@ func testWarpMessageFromPrimaryNetwork(t *testing.T, requirePrimaryNetworkSigner pred := predicate.New(warpMsg.Bytes()) - snowCtx := utilstest.NewTestSnowContext(t) + snowCtx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) snowCtx.SubnetID = ids.GenerateTestID() snowCtx.ChainID = ids.GenerateTestID() snowCtx.CChainID = cChainID @@ -787,7 +788,7 @@ func makeWarpPredicateTests(tb testing.TB, rules extras.AvalancheRules) []precom warpValidators, err := validators.FlattenValidatorSet(validatorSet) require.NoError(tb, err) - snowCtx := utilstest.NewTestSnowContext(tb) + snowCtx := utilstest.NewTestSnowContext(tb, utilstest.SubnetEVMTestChainID) snowCtx.ValidatorState = &validatorstest.State{ GetSubnetIDF: func(context.Context, ids.ID) (ids.ID, error) { diff --git a/graft/subnet-evm/precompile/modules/registerer.go b/graft/subnet-evm/precompile/modules/registerer.go index 59738067a61b..3195c96ffdac 100644 --- a/graft/subnet-evm/precompile/modules/registerer.go +++ b/graft/subnet-evm/precompile/modules/registerer.go @@ -11,7 +11,7 @@ import ( "github.com/ava-labs/libevm/common" "github.com/ava-labs/avalanchego/graft/evm/constants" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" ) var ( diff --git a/graft/subnet-evm/precompile/precompileconfig/upgradeable.go b/graft/subnet-evm/precompile/precompileconfig/upgradeable.go index f3f8a1947792..47089d308ceb 100644 --- a/graft/subnet-evm/precompile/precompileconfig/upgradeable.go +++ b/graft/subnet-evm/precompile/precompileconfig/upgradeable.go @@ -3,7 +3,7 @@ package precompileconfig -import "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" +import "github.com/ava-labs/avalanchego/graft/evm/utils" // Upgrade contains the timestamp for the upgrade along with // a boolean [Disable]. If [Disable] is set, the upgrade deactivates diff --git a/graft/subnet-evm/precompile/precompiletest/test_precompile.go b/graft/subnet-evm/precompile/precompiletest/test_precompile.go index 74e2661cad18..831e457f4d78 100644 --- a/graft/subnet-evm/precompile/precompiletest/test_precompile.go +++ b/graft/subnet-evm/precompile/precompiletest/test_precompile.go @@ -14,13 +14,13 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/extstate" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/extras" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contract" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/modules" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/precompileconfig" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" "github.com/ava-labs/avalanchego/vms/evm/predicate" ) @@ -178,7 +178,7 @@ func (test PrecompileTest) setup(t testing.TB, module modules.Module, state *tes } else { blockContext.EXPECT().Number().Return(big.NewInt(0)).AnyTimes() } - snowContext := utilstest.NewTestSnowContext(t) + snowContext := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) // If Rules is explicitly set, use it; otherwise derive from ChainConfig rules := test.Rules diff --git a/graft/subnet-evm/sync/client/leaf_syncer.go b/graft/subnet-evm/sync/client/leaf_syncer.go index 53e2d2465604..ea76fa0cc639 100644 --- a/graft/subnet-evm/sync/client/leaf_syncer.go +++ b/graft/subnet-evm/sync/client/leaf_syncer.go @@ -13,8 +13,8 @@ import ( "github.com/ava-labs/libevm/log" "golang.org/x/sync/errgroup" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/message" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) var errFailedToFetchLeafs = errors.New("failed to fetch leafs") diff --git a/graft/subnet-evm/sync/handlers/leafs_request.go b/graft/subnet-evm/sync/handlers/leafs_request.go index f4854b0306fb..578dcaaa7613 100644 --- a/graft/subnet-evm/sync/handlers/leafs_request.go +++ b/graft/subnet-evm/sync/handlers/leafs_request.go @@ -17,11 +17,11 @@ import ( "github.com/ava-labs/libevm/triedb" "github.com/ava-labs/avalanchego/codec" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/state/snapshot" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/message" "github.com/ava-labs/avalanchego/graft/subnet-evm/sync/handlers/stats" "github.com/ava-labs/avalanchego/graft/subnet-evm/sync/syncutils" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/ids" ) diff --git a/graft/subnet-evm/sync/statesync/statesynctest/test_sync.go b/graft/subnet-evm/sync/statesync/statesynctest/test_sync.go index c58e4e772f2d..ea842601aa46 100644 --- a/graft/subnet-evm/sync/statesync/statesynctest/test_sync.go +++ b/graft/subnet-evm/sync/statesync/statesynctest/test_sync.go @@ -17,8 +17,8 @@ import ( "github.com/ava-labs/libevm/triedb" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customrawdb" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" ) // AssertDBConsistency checks [serverTrieDB] and [clientTrieDB] have the same EVM state trie at [root], diff --git a/graft/subnet-evm/sync/statesync/statesynctest/test_trie.go b/graft/subnet-evm/sync/statesync/statesynctest/test_trie.go index 5d7acd8d9395..e65d91ddd651 100644 --- a/graft/subnet-evm/sync/statesync/statesynctest/test_trie.go +++ b/graft/subnet-evm/sync/statesync/statesynctest/test_trie.go @@ -18,7 +18,7 @@ import ( "github.com/holiman/uint256" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/utils/wrappers" ) diff --git a/graft/subnet-evm/sync/statesync/trie_segments.go b/graft/subnet-evm/sync/statesync/trie_segments.go index 91854b255bce..37cb3dd03405 100644 --- a/graft/subnet-evm/sync/statesync/trie_segments.go +++ b/graft/subnet-evm/sync/statesync/trie_segments.go @@ -16,8 +16,8 @@ import ( "github.com/ava-labs/libevm/log" "github.com/ava-labs/libevm/trie" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customrawdb" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" "github.com/ava-labs/avalanchego/utils/wrappers" syncclient "github.com/ava-labs/avalanchego/graft/subnet-evm/sync/client" diff --git a/graft/subnet-evm/triedb/hashdb/database.go b/graft/subnet-evm/triedb/hashdb/database.go index 44c8e345cff1..37f08f9be6a5 100644 --- a/graft/subnet-evm/triedb/hashdb/database.go +++ b/graft/subnet-evm/triedb/hashdb/database.go @@ -34,7 +34,7 @@ import ( "sync" "time" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" + "github.com/ava-labs/avalanchego/graft/evm/utils" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/rawdb" "github.com/ava-labs/libevm/core/types" diff --git a/graft/subnet-evm/utils/address_range.go b/graft/subnet-evm/utils/address_range.go deleted file mode 100644 index 7fb81fd70d75..000000000000 --- a/graft/subnet-evm/utils/address_range.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utils - -import ( - "bytes" - - "github.com/ava-labs/libevm/common" -) - -// AddressRange represents a continuous range of addresses -type AddressRange struct { - Start common.Address - End common.Address -} - -// Contains returns true iff [addr] is contained within the (inclusive) -// range of addresses defined by [a]. -func (a *AddressRange) Contains(addr common.Address) bool { - addrBytes := addr.Bytes() - return bytes.Compare(addrBytes, a.Start[:]) >= 0 && bytes.Compare(addrBytes, a.End[:]) <= 0 -} diff --git a/graft/subnet-evm/utils/bounded_workers.go b/graft/subnet-evm/utils/bounded_workers.go deleted file mode 100644 index 619eb973c5d8..000000000000 --- a/graft/subnet-evm/utils/bounded_workers.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utils - -import ( - "sync" - "sync/atomic" -) - -type BoundedWorkers struct { - workerCount atomic.Int32 - workerSpawner chan struct{} - outstandingWorkers sync.WaitGroup - - work chan func() - workClose sync.Once -} - -// NewBoundedWorkers returns an instance of [BoundedWorkers] that -// will spawn up to count goroutines. -func NewBoundedWorkers(count int) *BoundedWorkers { - return &BoundedWorkers{ - workerSpawner: make(chan struct{}, count), - work: make(chan func()), - } -} - -// startWorker creates a new goroutine to execute [f] immediately and then keeps the goroutine -// alive to continue executing new work. -func (b *BoundedWorkers) startWorker(f func()) { - b.workerCount.Add(1) - b.outstandingWorkers.Add(1) - - go func() { - defer b.outstandingWorkers.Done() - - if f != nil { - f() - } - for f := range b.work { - f() - } - }() -} - -// Execute the given function on an existing goroutine waiting for more work, a new goroutine, -// or return if the context is canceled. -// -// Execute must not be called after Wait, otherwise it might panic. -func (b *BoundedWorkers) Execute(f func()) { - // Ensure we feed idle workers first - select { - case b.work <- f: - return - default: - } - - // Fallback to waiting for an idle worker or allocating - // a new worker (if we aren't yet at max concurrency) - select { - case b.work <- f: - case b.workerSpawner <- struct{}{}: - b.startWorker(f) - } -} - -// Wait returns after all enqueued work finishes and all goroutines to exit. -// Wait returns the number of workers that were spawned during the run. -// -// Wait can only be called after ALL calls to [Execute] have returned. -// -// It is safe to call Wait multiple times but not safe to call [Execute] -// after [Wait] has been called. -func (b *BoundedWorkers) Wait() int { - b.workClose.Do(func() { - close(b.work) - }) - b.outstandingWorkers.Wait() - return int(b.workerCount.Load()) -} diff --git a/graft/subnet-evm/utils/bytes.go b/graft/subnet-evm/utils/bytes.go deleted file mode 100644 index a22450d754f2..000000000000 --- a/graft/subnet-evm/utils/bytes.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utils - -import "github.com/ava-labs/libevm/common" - -// IncrOne increments bytes value by one -func IncrOne(bytes []byte) { - index := len(bytes) - 1 - for index >= 0 { - if bytes[index] < 255 { - bytes[index]++ - break - } else { - bytes[index] = 0 - index-- - } - } -} - -// HashSliceToBytes serializes a []common.Hash into a tightly packed byte array. -func HashSliceToBytes(hashes []common.Hash) []byte { - bytes := make([]byte, common.HashLength*len(hashes)) - for i, hash := range hashes { - copy(bytes[i*common.HashLength:], hash[:]) - } - return bytes -} - -// BytesToHashSlice packs [b] into a slice of hash values with zero padding -// to the right if the length of b is not a multiple of 32. -func BytesToHashSlice(b []byte) []common.Hash { - var ( - numHashes = (len(b) + 31) / 32 - hashes = make([]common.Hash, numHashes) - ) - - for i := range hashes { - start := i * common.HashLength - copy(hashes[i][:], b[start:]) - } - return hashes -} diff --git a/graft/subnet-evm/utils/bytes_test.go b/graft/subnet-evm/utils/bytes_test.go deleted file mode 100644 index b94b3fd62e90..000000000000 --- a/graft/subnet-evm/utils/bytes_test.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utils - -import ( - "bytes" - "testing" - - "github.com/ava-labs/libevm/common" - "github.com/stretchr/testify/require" - - "github.com/ava-labs/avalanchego/utils" -) - -func TestIncrOne(t *testing.T) { - type test struct { - input []byte - expected []byte - } - for name, test := range map[string]test{ - "increment no overflow no carry": { - input: []byte{0, 0}, - expected: []byte{0, 1}, - }, - "increment overflow": { - input: []byte{255, 255}, - expected: []byte{0, 0}, - }, - "increment carry": { - input: []byte{0, 255}, - expected: []byte{1, 0}, - }, - } { - t.Run(name, func(t *testing.T) { - output := common.CopyBytes(test.input) - IncrOne(output) - require.Equal(t, test.expected, output) - }) - } -} - -func testBytesToHashSlice(t testing.TB, b []byte) { - hashSlice := BytesToHashSlice(b) - - copiedBytes := HashSliceToBytes(hashSlice) - - if len(b)%32 == 0 { - require.Equal(t, b, copiedBytes) - } else { - require.Equal(t, b, copiedBytes[:len(b)]) - // Require that any additional padding is all zeroes - padding := copiedBytes[len(b):] - require.Equal(t, bytes.Repeat([]byte{0x00}, len(padding)), padding) - } -} - -func FuzzHashSliceToBytes(f *testing.F) { - for i := 0; i < 100; i++ { - f.Add(utils.RandomBytes(i)) - } - - f.Fuzz(func(t *testing.T, b []byte) { - testBytesToHashSlice(t, b) - }) -} diff --git a/graft/subnet-evm/utils/denomination.go b/graft/subnet-evm/utils/denomination.go deleted file mode 100644 index c2542b0b522e..000000000000 --- a/graft/subnet-evm/utils/denomination.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utils - -const ( - Wei = 1 - GWei = 1_000_000_000 * Wei - Ether = 1_000_000_000 * GWei -) diff --git a/graft/subnet-evm/utils/numbers.go b/graft/subnet-evm/utils/numbers.go deleted file mode 100644 index 1e03386b0f34..000000000000 --- a/graft/subnet-evm/utils/numbers.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utils - -import ( - "math/big" - "time" -) - -func NewUint64(val uint64) *uint64 { return &val } - -func TimeToNewUint64(time time.Time) *uint64 { - unix := uint64(time.Unix()) - return NewUint64(unix) -} - -func Uint64ToTime(val *uint64) time.Time { - timestamp := int64(*val) - return time.Unix(timestamp, 0) -} - -// BigNumEqual returns true if x and y are equivalent ie. both nil or both -// contain the same value. -func BigNumEqual(x, y *big.Int) bool { - if x == nil || y == nil { - return x == y - } - return x.Cmp(y) == 0 -} - -// Uint64PtrEqual returns true if x and y pointers are equivalent ie. both nil or both -// contain the same value. -func Uint64PtrEqual(x, y *uint64) bool { - if x == nil || y == nil { - return x == y - } - return *x == *y -} - -// BigEqual returns true if a is equal to b. If a and b are nil, it returns -// true. -func BigEqual(a, b *big.Int) bool { - if a == nil || b == nil { - return a == b - } - return a.Cmp(b) == 0 -} - -// BigEqualUint64 returns true if a is equal to b. If a is nil or not a uint64, -// it returns false. -func BigEqualUint64(a *big.Int, b uint64) bool { - return a != nil && - a.IsUint64() && - a.Uint64() == b -} - -// BigLessOrEqualUint64 returns true if a is less than or equal to b. If a is -// nil or not a uint64, it returns false. -func BigLessOrEqualUint64(a *big.Int, b uint64) bool { - return a != nil && - a.IsUint64() && - a.Uint64() <= b -} diff --git a/graft/subnet-evm/utils/numbers_test.go b/graft/subnet-evm/utils/numbers_test.go deleted file mode 100644 index e60f67898aba..000000000000 --- a/graft/subnet-evm/utils/numbers_test.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utils - -import ( - "math/big" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestBigEqual(t *testing.T) { - tests := []struct { - name string - a *big.Int - b *big.Int - want bool - }{ - { - name: "nil_nil", - a: nil, - b: nil, - want: true, - }, - { - name: "0_nil", - a: big.NewInt(0), - b: nil, - want: false, - }, - { - name: "0_1", - a: big.NewInt(0), - b: big.NewInt(1), - want: false, - }, - { - name: "1_1", - a: big.NewInt(1), - b: big.NewInt(1), - want: true, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - require := require.New(t) - - require.Equal(test.want, BigEqual(test.a, test.b)) - require.Equal(test.want, BigEqual(test.b, test.a)) - }) - } -} - -func TestBigEqualUint64(t *testing.T) { - tests := []struct { - name string - a *big.Int - b uint64 - want bool - }{ - { - name: "nil", - a: nil, - b: 0, - want: false, - }, - { - name: "not_uint64", - a: big.NewInt(-1), - b: 0, - want: false, - }, - { - name: "equal", - a: big.NewInt(1), - b: 1, - want: true, - }, - { - name: "not_equal", - a: big.NewInt(1), - b: 2, - want: false, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - got := BigEqualUint64(test.a, test.b) - require.Equal(t, test.want, got) - }) - } -} - -func TestLessOrEqualUint64(t *testing.T) { - tests := []struct { - name string - a *big.Int - b uint64 - want bool - }{ - { - name: "nil", - a: nil, - b: 0, - want: false, - }, - { - name: "not_uint64", - a: big.NewInt(-1), - b: 0, - want: false, - }, - { - name: "less", - a: big.NewInt(1), - b: 2, - want: true, - }, - { - name: "equal", - a: big.NewInt(1), - b: 1, - want: true, - }, - { - name: "greater", - a: big.NewInt(2), - b: 1, - want: false, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - got := BigLessOrEqualUint64(test.a, test.b) - require.Equal(t, test.want, got) - }) - } -} diff --git a/graft/subnet-evm/utils/rand/rand.go b/graft/subnet-evm/utils/rand/rand.go deleted file mode 100644 index e6c74a60a8ca..000000000000 --- a/graft/subnet-evm/utils/rand/rand.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package rand - -import ( - "crypto/rand" - "math/big" -) - -// Credit to Brandur Leach (@Brandur) for this implementation. -// https://brandur.org/fragments/crypto-rand-float64 - -// Intn is a shortcut for generating a random integer between 0 and -// n using crypto/rand. -func Intn(n int64) (int64, error) { - nBig, err := rand.Int(rand.Reader, big.NewInt(n)) - if err != nil { - return 0, err - } - return nBig.Int64(), nil -} - -// SecureFloat64 is a shortcut for generating a random float between 0 and -// 1 using crypto/rand. -func SecureFloat64() (float64, error) { - n, err := Intn(1 << 53) - if err != nil { - return 0, err - } - return float64(n) / (1 << 53), nil -} diff --git a/graft/subnet-evm/utils/utilstest/key.go b/graft/subnet-evm/utils/utilstest/key.go deleted file mode 100644 index 82e073519a90..000000000000 --- a/graft/subnet-evm/utils/utilstest/key.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utilstest - -import ( - "crypto/ecdsa" - "crypto/rand" - "testing" - - "github.com/ava-labs/libevm/common" - "github.com/ava-labs/libevm/crypto" - "github.com/stretchr/testify/require" -) - -// Key contains an ecdsa private key field as well as an address field -// obtained from converting the ecdsa public key. -type Key struct { - Address common.Address - PrivateKey *ecdsa.PrivateKey -} - -// NewKey generates a new key pair and returns a pointer to a [Key]. -func NewKey(t *testing.T) *Key { - t.Helper() - privateKeyECDSA, err := ecdsa.GenerateKey(crypto.S256(), rand.Reader) - require.NoError(t, err) - return &Key{ - Address: crypto.PubkeyToAddress(privateKeyECDSA.PublicKey), - PrivateKey: privateKeyECDSA, - } -} diff --git a/graft/subnet-evm/utils/utilstest/pointer.go b/graft/subnet-evm/utils/utilstest/pointer.go deleted file mode 100644 index 6fdc66ab290d..000000000000 --- a/graft/subnet-evm/utils/utilstest/pointer.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (C) 2019-2026, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package utilstest - -func PointerTo[T any](x T) *T { return &x } diff --git a/graft/subnet-evm/warp/verifier_backend_test.go b/graft/subnet-evm/warp/verifier_backend_test.go index 4816c2935eb0..718fa589d32b 100644 --- a/graft/subnet-evm/warp/verifier_backend_test.go +++ b/graft/subnet-evm/warp/verifier_backend_test.go @@ -15,7 +15,7 @@ import ( "github.com/ava-labs/avalanchego/cache" "github.com/ava-labs/avalanchego/cache/lru" "github.com/ava-labs/avalanchego/database/memdb" - "github.com/ava-labs/avalanchego/graft/subnet-evm/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/utils/utilstest" "github.com/ava-labs/avalanchego/graft/subnet-evm/warp/messages" "github.com/ava-labs/avalanchego/graft/subnet-evm/warp/warptest" "github.com/ava-labs/avalanchego/ids" @@ -36,7 +36,7 @@ func TestAddressedCallSignatures(t *testing.T) { metricstest.WithMetrics(t) database := memdb.New() - snowCtx := utilstest.NewTestSnowContext(t) + snowCtx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) offChainPayload, err := payload.NewAddressedCall([]byte{1, 2, 3}, []byte{1, 2, 3}) require.NoError(t, err) @@ -151,7 +151,7 @@ func TestBlockSignatures(t *testing.T) { metricstest.WithMetrics(t) database := memdb.New() - snowCtx := utilstest.NewTestSnowContext(t) + snowCtx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) knownBlkID := ids.GenerateTestID() blockClient := warptest.MakeBlockClient(knownBlkID) @@ -255,7 +255,7 @@ func TestBlockSignatures(t *testing.T) { func TestUptimeSignatures(t *testing.T) { database := memdb.New() - snowCtx := utilstest.NewTestSnowContext(t) + snowCtx := utilstest.NewTestSnowContext(t, utilstest.SubnetEVMTestChainID) validationID := ids.GenerateTestID() nodeID := ids.GenerateTestNodeID()