diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 3d6cb25bf4..b54a39f08a 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: "~1.21.10" + go-version: "~1.21.11" check-latest: true - run: go mod download shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0ec774044d..bd7b22373c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "~1.21.10" + go-version: "~1.21.11" check-latest: true - name: Set up arm64 cross compiler run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a66b5a9fd..11e298ac3a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: pull_request: env: - min_go_version: "~1.21.10" + min_go_version: "~1.21.11" grafana_url: https://grafana-experimental.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7Cava-labs%2Fsubnet-evm&var-filter=gh_run_id%7C%3D%7C${{ github.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ github.run_attempt }} jobs: @@ -36,7 +36,7 @@ jobs: run: scripts/shellcheck.sh unit_test: - name: Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }}) + name: Golang Unit Tests (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/Dockerfile b/Dockerfile index c74583d595..9bfe7620fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG AVALANCHE_VERSION # ============= Compilation Stage ================ -FROM golang:1.21.10-bullseye AS builder +FROM golang:1.21.11-bullseye AS builder WORKDIR /build diff --git a/README.md b/README.md index 597596373a..7c68a7c74b 100644 --- a/README.md +++ b/README.md @@ -59,9 +59,10 @@ The Subnet EVM runs in a separate process from the main AvalancheGo process and [v0.6.0] AvalancheGo@v1.11.0-v1.11.1 (Protocol Version: 33) [v0.6.1] AvalancheGo@v1.11.0-v1.11.1 (Protocol Version: 33) [v0.6.2] AvalancheGo@v1.11.2 (Protocol Version: 34) -[v0.6.3] AvalancheGo@v1.11.3-v1.11.6 (Protocol Version: 35) -[v0.6.4] AvalancheGo@v1.11.3-v1.11.6 (Protocol Version: 35) -[v0.6.5] AvalancheGo@v1.11.3-v1.11.6 (Protocol Version: 35) +[v0.6.3] AvalancheGo@v1.11.3-v1.11.7 (Protocol Version: 35) +[v0.6.4] AvalancheGo@v1.11.3-v1.11.7 (Protocol Version: 35) +[v0.6.5] AvalancheGo@v1.11.3-v1.11.7 (Protocol Version: 35) +[v0.6.6] AvalancheGo@v1.11.3-v1.11.7 (Protocol Version: 35) ``` ## API @@ -101,7 +102,7 @@ To support these changes, there have been a number of changes to the SubnetEVM b ### Clone Subnet-evm -First install Go 1.21.10 or later. Follow the instructions [here](https://go.dev/doc/install). You can verify by running `go version`. +First install Go 1.21.11 or later. Follow the instructions [here](https://go.dev/doc/install). You can verify by running `go version`. Set `$GOPATH` environment variable properly for Go to look for Go Workspaces. Please read [this](https://go.dev/doc/code) for details. You can verify by running `echo $GOPATH`. diff --git a/compatibility.json b/compatibility.json index c06a645549..bb2b95c039 100644 --- a/compatibility.json +++ b/compatibility.json @@ -1,5 +1,6 @@ { "rpcChainVMProtocolVersion": { + "v0.6.6": 35, "v0.6.5": 35, "v0.6.4": 35, "v0.6.3": 35, diff --git a/go.mod b/go.mod index 3e4bd7868f..3f232cacf0 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/ava-labs/subnet-evm -go 1.21.10 +go 1.21.11 require ( github.com/VictoriaMetrics/fastcache v1.12.1 - github.com/ava-labs/avalanchego v1.11.6 + github.com/ava-labs/avalanchego v1.11.7 github.com/cespare/cp v0.1.0 github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 github.com/davecgh/go-spew v1.1.1 @@ -54,7 +54,7 @@ require ( require ( github.com/DataDog/zstd v1.5.2 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/ava-labs/coreth v0.13.4-rc.0 // indirect + github.com/ava-labs/coreth v0.13.5-rc.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect @@ -135,7 +135,7 @@ require ( go.uber.org/zap v1.26.0 // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/term v0.18.0 // indirect - golang.org/x/tools v0.16.0 // indirect + golang.org/x/tools v0.17.0 // indirect gonum.org/v1/gonum v0.11.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect diff --git a/go.sum b/go.sum index 9756d53584..30889c4fde 100644 --- a/go.sum +++ b/go.sum @@ -56,10 +56,10 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.11.6 h1:gPWNQSV+bY3XW9OhfJ4wNwxp/qidTSHA4V+VYP8kWpQ= -github.com/ava-labs/avalanchego v1.11.6/go.mod h1:s8U9tOakcU6ftSL4JcRcFrNNYI5JbekNCjTkdqZWYdE= -github.com/ava-labs/coreth v0.13.4-rc.0 h1:UU7SOlLVeviT59Y+FyDyrdt0Wvl+SOj0EyET8ZtH1ZY= -github.com/ava-labs/coreth v0.13.4-rc.0/go.mod h1:mP1QRzaQKq+y+bqyx3xMR3/K/+TpjHbPJi+revI6Y38= +github.com/ava-labs/avalanchego v1.11.7 h1:BemCJEa6+f79fzRLdR0+iJAA3v9shOyhVniAKuibFyk= +github.com/ava-labs/avalanchego v1.11.7/go.mod h1:aPYTETkM0KjtC7vFwPO6S8z2L0QTKaXjVUi98pTdNO4= +github.com/ava-labs/coreth v0.13.5-rc.0 h1:PJQbR9o2RrW3j9ba4r1glXnmM2PNAP3xR569+gMcBd0= +github.com/ava-labs/coreth v0.13.5-rc.0/go.mod h1:cm5c12xo5NiTgtbmeduv8i2nYdzgkczz9Wm3yiwwTRU= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -669,8 +669,6 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -884,8 +882,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= 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= diff --git a/notes/copied-list.txt b/notes/copied-list.txt deleted file mode 100644 index d05d38c4ab..0000000000 --- a/notes/copied-list.txt +++ /dev/null @@ -1,96 +0,0 @@ -./consensus/errors.go -./consensus/misc/dao.go -./consensus/misc/forks.go -./core/blockchain_insert.go -./core/blocks.go -./core/block_validator.go -./core/bloombits/doc.go -./core/bloombits/generator.go -./core/bloombits/matcher.go -./core/bloombits/scheduler.go -./core/chain_indexer.go -./core/error.go -./core/gaspool.go -./core/headerchain.go -./core/mkalloc.go -./core/rawdb/accessors_indexes.go -./core/rawdb/accessors_metadata.go -./core/rawdb/database.go -./core/rawdb/freezer.go -./core/rawdb/freezer_reinit.go -./core/rawdb/freezer_table.go -./core/rawdb/schema.go -./core/rawdb/table.go -./core/state/database.go -./core/state/dump.go -./core/state/iterator.go -./core/state_prefetcher.go -./core/state/sync.go -./core/state_transition.go -./core/tx_cacher.go -./core/tx_journal.go -./core/tx_list.go -./core/tx_noncer.go -./core/types/bloom9.go -./core/types/derive_sha.go -./core/types/gen_header_json.go -./core/types/gen_log_json.go -./core/types/gen_receipt_json.go -./core/types/gen_tx_json.go -./core/types.go -./core/types/log.go -./core/types/receipt.go -./core/types/transaction.go -./core/types/transaction_signing.go -./core/vm/analysis.go -./core/vm/common.go -./core/vm/contract.go -./core/vm/contracts.go -./core/vm/doc.go -./core/vm/eips.go -./core/vm/gas.go -./core/vm/gas_table.go -./core/vm/gen_structlog.go -./core/vm/intpool.go -./core/vm/int_pool_verifier_empty.go -./core/vm/int_pool_verifier.go -./core/vm/logger.go -./core/vm/logger_json.go -./core/vm/memory.go -./core/vm/stack.go -./core/vm/stack_table.go -./eth/bloombits.go -./eth/filters/api.go -./eth/filters/filter.go -./eth/filters/filter_system.go -./eth/metrics.go -./eth/tracers/internal/tracers/tracers.go -./eth/tracers/tracer.go -./eth/tracers/tracers.go -./internal/debug/api.go -./internal/debug/flags.go -./internal/debug/loudpanic_fallback.go -./internal/debug/loudpanic.go -./internal/debug/trace_fallback.go -./internal/debug/trace.go -./internal/ethapi/addrlock.go -./miner/unconfirmed.go -./node/defaults.go -./node/errors.go -./params/dao.go -./params/denomination.go -./params/network_params.go -./params/version.go -./rpc/constants_unix_nocgo.go -./rpc/doc.go -./rpc/errors.go -./rpc/gzip.go -./rpc/handler.go -./rpc/http.go -./rpc/ipc_js.go -./rpc/json.go -./rpc/server.go -./rpc/service.go -./rpc/subscription.go -./rpc/websocket.go -./accounts/* diff --git a/notes/hacked-list.txt b/notes/hacked-list.txt deleted file mode 100644 index 691fa507da..0000000000 --- a/notes/hacked-list.txt +++ /dev/null @@ -1,46 +0,0 @@ -./consensus/dummy/consensus.go -./consensus/consensus.go -./core/blockchain.go -./core/events.go -./core/evm.go -./core/genesis.go -./core/gen_genesis_account.go -./core/gen_genesis.go -./core/rawdb/accessors_chain.go -./core/state/journal.go -./core/state_processor.go -./core/state/statedb.go -./core/state/state_object.go -./core/tx_pool.go -./core/types/block.go -./core/vm/errors.go -./core/vm/evm.go -./core/vm/instructions.go -./core/vm/interface.go -./core/vm/interpreter.go -./core/vm/jump_table.go -./core/vm/memory_table.go -./core/vm/opcodes.go -./eth/api_backend.go -./eth/api.go -./eth/api_tracer.go -./eth/backend.go -./eth/config.go -./eth/gasprice/gasprice.go -./eth/tracers/internal/tracers/assets.go -./ethclient/ethclient.go -./ethclient/signer.go -./internal/ethapi/api.go -./internal/ethapi/backend.go -./miner/miner.go -./miner/worker.go -./node/api.go -./node/config.go -./node/node.go -./node/service.go -./params/config.go -./params/protocol_params.go -./rpc/client.go -./rpc/types.go -./interfaces.go (moved to interfaces/interfaces.go) -./accounts/keystore/account_cache.go (minor formatting change to pass linting) diff --git a/plugin/evm/version.go b/plugin/evm/version.go index 9c908a91bd..cea2ceae2f 100644 --- a/plugin/evm/version.go +++ b/plugin/evm/version.go @@ -11,7 +11,7 @@ var ( // GitCommit is set by the build script GitCommit string // Version is the version of Subnet EVM - Version string = "v0.6.5" + Version string = "v0.6.6" ) func init() { diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index d461e8a767..1c480b497b 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -16,7 +16,6 @@ import ( "sync" "time" - avalanchegoMetrics "github.com/ava-labs/avalanchego/api/metrics" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/gossip" "github.com/prometheus/client_golang/prometheus" @@ -104,6 +103,7 @@ const ( // Prefixes for metrics gatherers ethMetricsPrefix = "eth" + sdkMetricsPrefix = "sdk" chainStateMetricsPrefix = "chain_state" // p2p app protocols @@ -229,8 +229,7 @@ type VM struct { validators *p2p.Validators // Metrics - multiGatherer avalanchegoMetrics.MultiGatherer - sdkMetrics *prometheus.Registry + sdkMetrics *prometheus.Registry bootstrapped bool @@ -513,22 +512,16 @@ func (vm *VM) Initialize( func (vm *VM) initializeMetrics() error { vm.sdkMetrics = prometheus.NewRegistry() - vm.multiGatherer = avalanchegoMetrics.NewMultiGatherer() - // If metrics are enabled, register the default metrics regitry - if metrics.Enabled { - gatherer := subnetEVMPrometheus.Gatherer(metrics.DefaultRegistry) - if err := vm.multiGatherer.Register(ethMetricsPrefix, gatherer); err != nil { - return err - } - if err := vm.multiGatherer.Register("sdk", vm.sdkMetrics); err != nil { - return err - } - // Register [multiGatherer] after registerers have been registered to it - if err := vm.ctx.Metrics.Register(vm.multiGatherer); err != nil { - return err - } + // If metrics are enabled, register the default metrics registry + if !metrics.Enabled { + return nil } - return nil + + gatherer := subnetEVMPrometheus.Gatherer(metrics.DefaultRegistry) + if err := vm.ctx.Metrics.Register(ethMetricsPrefix, gatherer); err != nil { + return err + } + return vm.ctx.Metrics.Register(sdkMetricsPrefix, vm.sdkMetrics) } func (vm *VM) initializeChain(lastAcceptedHash common.Hash, ethConfig ethconfig.Config) error { @@ -652,7 +645,11 @@ func (vm *VM) initChainState(lastAcceptedBlock *types.Block) error { } vm.State = state - return vm.multiGatherer.Register(chainStateMetricsPrefix, chainStateRegisterer) + if !metrics.Enabled { + return nil + } + + return vm.ctx.Metrics.Register(chainStateMetricsPrefix, chainStateRegisterer) } func (vm *VM) SetState(_ context.Context, state snow.State) error { diff --git a/scripts/versions.sh b/scripts/versions.sh index b550af9cdd..289da977fe 100644 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -4,7 +4,7 @@ # shellcheck disable=SC2034 # Don't export them as they're used in the context of other calls -AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.11.6'} +AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.11.7'} GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'} # This won't be used, but it's here to make code syncs easier diff --git a/utils/snow.go b/utils/snow.go index 114f0cf372..96c13708d3 100644 --- a/utils/snow.go +++ b/utils/snow.go @@ -26,7 +26,7 @@ func TestSnowContext() *snow.Context { PublicKey: pk, Log: logging.NoLog{}, BCLookup: ids.NewAliaser(), - Metrics: metrics.NewOptionalGatherer(), + Metrics: metrics.NewMultiGatherer(), ChainDataDir: "", ValidatorState: &validators.TestState{}, }