Skip to content

Commit

Permalink
Avago 1.11.7 (#1206)
Browse files Browse the repository at this point in the history
* remove notes/ (#571)

* Remove optional gatherer (#563)

* Remove optional gatherer

* nit

* Do not register chain state metrics when metrics are disabled

---------

Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>

* add compatibility for v0.6.6

* update avago in readme

---------

Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
  • Loading branch information
3 people authored Jun 6, 2024
1 parent d103a5e commit cc0c311
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`.

Expand Down
1 change: 1 addition & 0 deletions compatibility.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"rpcChainVMProtocolVersion": {
"v0.6.6": 35,
"v0.6.5": 35,
"v0.6.4": 35,
"v0.6.3": 35,
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 6 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
96 changes: 0 additions & 96 deletions notes/copied-list.txt

This file was deleted.

46 changes: 0 additions & 46 deletions notes/hacked-list.txt

This file was deleted.

2 changes: 1 addition & 1 deletion plugin/evm/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
35 changes: 16 additions & 19 deletions plugin/evm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -104,6 +103,7 @@ const (

// Prefixes for metrics gatherers
ethMetricsPrefix = "eth"
sdkMetricsPrefix = "sdk"
chainStateMetricsPrefix = "chain_state"

// p2p app protocols
Expand Down Expand Up @@ -229,8 +229,7 @@ type VM struct {
validators *p2p.Validators

// Metrics
multiGatherer avalanchegoMetrics.MultiGatherer
sdkMetrics *prometheus.Registry
sdkMetrics *prometheus.Registry

bootstrapped bool

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion scripts/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utils/snow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
}
Expand Down

0 comments on commit cc0c311

Please sign in to comment.