Skip to content

Commit

Permalink
Update versions for v1.9.10 (ava-labs#2673)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick O'Grady <[email protected]>
  • Loading branch information
StephenButtolph and patrick-ogrady authored Mar 2, 2023
1 parent 51eae95 commit 98c4466
Show file tree
Hide file tree
Showing 35 changed files with 95 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-mac-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- name: build_test
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- name: build_test
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-public-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-ubuntu-amd64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-ubuntu-arm64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-win-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- run: go version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- name: Run static analysis tests
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- name: Build the avalanchego binary
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.19'
check-latest: true
- name: Build the avalanchego binary
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ linters:
- bodyclose
- depguard
- errcheck
- errorlint
- exportloopref
- goconst
- gocritic
Expand All @@ -44,6 +43,7 @@ linters:
- unparam
- unused
- whitespace
# - errorlint (TODO: re-enable in go1.20 migration)
# - goerr113
# - gomnd
# - lll
Expand Down Expand Up @@ -97,7 +97,7 @@ linters-settings:
- name: useless-break
disabled: false
staticcheck:
go: "1.20"
go: "1.19"
# https://staticcheck.io/docs/options#checks
checks:
- "all"
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 @@
# README.md
# go.mod
# ============= Compilation Stage ================
FROM golang:1.20.1-buster AS builder
FROM golang:1.19.6-buster AS builder
RUN apt-get update && apt-get install -y --no-install-recommends bash=5.0-4 make=4.2.1-1.2 gcc=4:8.3.0-1 musl-dev=1.1.21-2 ca-certificates=20200601~deb10u2 linux-headers-amd64

WORKDIR /build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The minimum recommended hardware specification for nodes connected to Mainnet is

If you plan to build AvalancheGo from source, you will also need the following software:

- [Go](https://golang.org/doc/install) version >= 1.20.1
- [Go](https://golang.org/doc/install) version >= 1.19.6
- [gcc](https://gcc.gnu.org/)
- g++

Expand Down
37 changes: 37 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Release Notes

## [v1.9.10](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.10)

This version is backwards compatible to [v1.9.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.0). It is optional, but encouraged. The supported plugin version is `24`.

### MerkleDB

- Removed parent tracking from `merkledb.trieView`
- Removed `base` caches from `merkledb.trieView`
- Fixed error handling during `merkledb` intermediate node eviction
- Replaced values larger than `32` bytes with a hash in the `merkledb` hash representation

### AVM

- Refactored `avm` API tx creation into a standalone `Spender` implementation
- Migrated UTXO interfaces from the `platformvm` into the `components` for use in the `avm`
- Refactored `avm` `tx.SyntacticVerify` to expect the config rather than the fee fields

### Miscellaneous

- Updated the minimum golang version to `v1.19.6`
- Fixed `rpcchainvm` signal handling to only shutdown upon receipt of `SIGTERM`
- Added `warp.Signature#NumSigners` for better cost tracking support
- Added `snow.Context#PublicKey` to provide access to the local node's BLS public key inside the VM execution environment
- Renamed Avalanche consensus metric prefix to `avalanche_{chainID}_avalanche`
- Specified an explicit TCP `Linger` timeout of `15` seconds
- Updated the `secp256k1` library to `v4.1.0`

### Cleanup

- Removed support for the `--whitelisted-subnets` flag
- Removed unnecessary abstractions from the `app` package
- Removed `Factory` embedding from `platformvm.VM` and `avm.VM`
- Removed `validator` package from the `platformvm`
- Removed `timer.TimeoutManager`
- Replaced `snow.Context` in `Factory.New` with `logging.Logger`
- Renamed `set.Bits#Len` to `BitLen` and `set.Bits#HammingWeight` to `Len` to align with `set.Bits64`

## [v1.9.9](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.9)

This version is backwards compatible to [v1.9.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.0). It is optional, but encouraged. The supported plugin version is `23`.
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ module github.com/ava-labs/avalanchego
// Dockerfile
// README.md
// go.mod (here, only major.minor can be specified)
go 1.20
go 1.19

require (
github.com/Microsoft/go-winio v0.5.2
github.com/NYTimes/gziphandler v1.1.1
github.com/ava-labs/avalanche-network-runner-sdk v0.3.0
github.com/ava-labs/coreth v0.11.8-0.20230223235704-14175cdd347d
github.com/ava-labs/coreth v0.11.8-rc.3
github.com/ava-labs/ledger-avalanche/go v0.0.0-20230105152938-00a24d05a8c7
github.com/btcsuite/btcd/btcutil v1.1.3
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0
Expand Down Expand Up @@ -89,6 +89,7 @@ require (
github.com/hashicorp/go-bexpr v0.1.10 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/big v0.0.0-20221017200358-a027dc42d04e // indirect
github.com/holiman/uint256 v1.2.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/ava-labs/avalanche-network-runner-sdk v0.3.0 h1:TVi9JEdKNU/RevYZ9PyW4pULbEdS+KQDA9Ki2DUvuAs=
github.com/ava-labs/avalanche-network-runner-sdk v0.3.0/go.mod h1:SgKJvtqvgo/Bl/c8fxEHCLaSxEbzimYfBopcfrajxQk=
github.com/ava-labs/coreth v0.11.8-0.20230223235704-14175cdd347d h1:i2pf4SXb1kmmAMgQOsoTHwy2rpOhU3dy1ND06nEdwdE=
github.com/ava-labs/coreth v0.11.8-0.20230223235704-14175cdd347d/go.mod h1:UiSBTrY+KwCiwHaIsGMZgoDtLLah8UXealH6LK0wEbc=
github.com/ava-labs/coreth v0.11.8-rc.3 h1:pS+OTFPc9edcFuCJIQGn5TdyAZncT9Hhs9jCcmm7+PM=
github.com/ava-labs/coreth v0.11.8-rc.3/go.mod h1:pc44yvJD4jTPIwkPI64pUXyJDvQ/UAqkbmhXOx78PXA=
github.com/ava-labs/ledger-avalanche/go v0.0.0-20230105152938-00a24d05a8c7 h1:EdxD90j5sClfL5Ngpz2TlnbnkNYdFPDXa0jDOjam65c=
github.com/ava-labs/ledger-avalanche/go v0.0.0-20230105152938-00a24d05a8c7/go.mod h1:XhiXSrh90sHUbkERzaxEftCmUz53eCijshDLZ4fByVM=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
Expand Down Expand Up @@ -269,6 +269,8 @@ github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuW
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/holiman/big v0.0.0-20221017200358-a027dc42d04e h1:pIYdhNkDh+YENVNi3gto8n9hAmRxKxoar0iE6BLucjw=
github.com/holiman/big v0.0.0-20221017200358-a027dc42d04e/go.mod h1:j9cQbcqHQujT0oKJ38PylVfqohClLr3CvDC+Qcg+lhU=
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA=
github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM=
Expand Down
2 changes: 1 addition & 1 deletion proto/Dockerfile.buf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update && apt -y install bash curl unzip git
WORKDIR /opt

RUN \
curl -L https://golang.org/dl/go1.18.5.linux-amd64.tar.gz > golang.tar.gz && \
curl -L https://golang.org/dl/go1.19.6.linux-amd64.tar.gz > golang.tar.gz && \
mkdir golang && \
tar -zxvf golang.tar.gz -C golang/

Expand Down
2 changes: 1 addition & 1 deletion proto/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Avalanche gRPC

Now Serving: **Protocol Version 23**
Now Serving: **Protocol Version 24**

Protobuf files are hosted at [https://buf.build/ava-labs/avalanche](https://buf.build/ava-labs/avalanche) and can be used as dependencies in other projects.

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_avalanche.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ done
# Dockerfile
# README.md
# go.mod
go_version_minimum="1.20.1"
go_version_minimum="1.19.6"

go_version() {
go version | sed -nE -e 's/[^0-9.]+([0-9.]+).+/\1/p'
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_coreth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ go build $build_args -ldflags "-X github.com/ava-labs/coreth/plugin/evm.Version=
cd "$AVALANCHE_PATH"

# Building coreth + using go get can mess with the go.mod file.
go mod tidy -compat=1.18
go mod tidy -compat=1.19

# Exit build successfully if the Coreth EVM binary is created successfully
if [[ -f "$evm_path" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd ) # Direct
avalanchego_path="$AVALANCHE_PATH/build/avalanchego"
plugin_dir=${PLUGIN_DIR:-$HOME/.avalanchego/plugins}
evm_path=${EVM_PATH:-$plugin_dir/evm}
coreth_version=${CORETH_VERSION:-'v0.11.8-0.20230223235704-14175cdd347d'}
coreth_version=${CORETH_VERSION:-'v0.11.8-rc.3'}

# Set the PATHS
GOPATH="$(go env GOPATH)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/local.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Dockerfile
# README.md
# go.mod
FROM golang:1.20.1-buster
FROM golang:1.19.6-buster

RUN mkdir -p /go/src/github.com/ava-labs

Expand Down
2 changes: 1 addition & 1 deletion snow/engine/avalanche/transitive.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (t *Transitive) HealthCheck(ctx context.Context) (interface{}, error) {
if vmErr == nil {
return intf, consensusErr
}
return intf, fmt.Errorf("vm: %w ; consensus: %w", vmErr, consensusErr)
return intf, fmt.Errorf("vm: %w ; consensus: %v", vmErr, consensusErr)
}

func (t *Transitive) GetVM() common.VM {
Expand Down
2 changes: 1 addition & 1 deletion snow/engine/snowman/transitive.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func (t *Transitive) HealthCheck(ctx context.Context) (interface{}, error) {
if vmErr == nil {
return intf, consensusErr
}
return intf, fmt.Errorf("vm: %w ; consensus: %w", vmErr, consensusErr)
return intf, fmt.Errorf("vm: %w ; consensus: %v", vmErr, consensusErr)
}

func (t *Transitive) GetVM() common.VM {
Expand Down
3 changes: 3 additions & 0 deletions version/compatibility.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"24": [
"v1.9.10"
],
"23": [
"v1.9.9"
],
Expand Down
4 changes: 2 additions & 2 deletions version/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import (

// RPCChainVMProtocol should be bumped anytime changes are made which require
// the plugin vm to upgrade to latest avalanchego release to be compatible.
const RPCChainVMProtocol uint = 23
const RPCChainVMProtocol uint = 24

// These are globals that describe network upgrades and node versions
var (
Current = &Semantic{
Major: 1,
Minor: 9,
Patch: 9,
Patch: 10,
}
CurrentApp = &Application{
Major: Current.Major,
Expand Down
4 changes: 2 additions & 2 deletions vms/components/avax/utxo_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ func UTXOIDFromString(s string) (*UTXOID, error) {

txID, err := ids.FromString(ss[0])
if err != nil {
return nil, fmt.Errorf("%w: %w", errFailedDecodingUTXOIDTxID, err)
return nil, fmt.Errorf("%w: %v", errFailedDecodingUTXOIDTxID, err)
}

idx, err := strconv.ParseUint(ss[1], 10, 32)
if err != nil {
return nil, fmt.Errorf("%w: %w", errFailedDecodingUTXOIDIndex, err)
return nil, fmt.Errorf("%w: %v", errFailedDecodingUTXOIDIndex, err)
}

return &UTXOID{
Expand Down
Loading

0 comments on commit 98c4466

Please sign in to comment.