Skip to content
Merged

v1.9.10 #1235

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8860f05
Remove `--whitelisted-subnets` (#2468)
StephenButtolph Feb 21, 2023
513bd44
Update secp256k1 version to v4.1.0 (#1634)
dhrubabasu Feb 21, 2023
08fb4f6
Simplify `app` package structure (#2631)
Feb 22, 2023
92c098f
Rename Avalanche consensus metrics to `avalanche_{chainID}_avalanche`…
gyuho Feb 22, 2023
88d444c
Remove parents map from merkledb trieview (#2601)
Feb 22, 2023
73d6e8c
Remove base caches from the trie view (#2640)
dboehm-avalabs Feb 22, 2023
888bada
Merkledb remove panic during cache eviction (#2638)
Feb 23, 2023
a7b20ed
Migrate utxo interfaces into `avax` package (#2643)
StephenButtolph Feb 23, 2023
1f8a494
Pass VM configs rather than factories (#2645)
StephenButtolph Feb 23, 2023
7703ea0
Remove `platformvm.VM#txExecutorBackend` (#2648)
StephenButtolph Feb 23, 2023
e4e41f2
Simplify VM Factory interface (#2649)
StephenButtolph Feb 24, 2023
e25eea0
Move p-chain `Validator` and `SubnetValidator` to the `txs` package (…
abi87 Feb 24, 2023
b16d82c
Refactor X-chain API tx creation (#2654)
StephenButtolph Feb 24, 2023
b12227c
Remove `timer.TimeoutManager` (#2653)
Feb 24, 2023
9f42ae0
Use the `maps` package when possible (#2647)
Feb 24, 2023
75a3815
Simplfy subprocess `Stop` & remove useless test (#2652)
hexfusion Feb 24, 2023
1212d48
Remove dangling buf.lock (#2659)
hexfusion Feb 26, 2023
b4c89eb
Add value digests and value verification in proofs (#2639)
dboehm-avalabs Feb 27, 2023
75cb25e
Add `Signature.NumSigners` to Warp messages (#2665)
patrick-ogrady Feb 28, 2023
b39246a
Standardize `set.Bits` method naming with `set.Bits64` (#2667)
patrick-ogrady Feb 28, 2023
590859d
Use AVM config in `tx.SyntacticVerify` (#2666)
StephenButtolph Feb 28, 2023
bf41c1d
Add BLS public key to `snow.Context` (#2661)
StephenButtolph Feb 28, 2023
379ac81
Update to go1.20.1 (#2671)
StephenButtolph Feb 28, 2023
1a2dca1
Set linger on p2p connections (#2646)
joshua-kim Feb 28, 2023
490f27c
[merkledb] remove `cache.Cache` from `onEvictCache` (#2674)
Feb 28, 2023
51eae95
Ignore sigint signals to ensure proper shutdown flow (#2682)
hexfusion Mar 1, 2023
98c4466
Update versions for v1.9.10 (#2673)
StephenButtolph Mar 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.19.3'
go-version: '1.19'
check-latest: true
- name: build_test
shell: bash
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.18'
go-version: '1.19'
check-latest: true
- name: Run static analysis tests
shell: bash
Expand Down
37 changes: 17 additions & 20 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,37 @@ linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- depguard
- errcheck
- errorlint
- exportloopref
- goconst
- gocritic
- gofmt
- gofumpt
- goimports
- revive
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- noctx
- nolintlint
- prealloc
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- unconvert
- whitespace
- staticcheck
# - bodyclose
# - structcheck
# - lll
# - gomnd
# - goprintffuncname
# - interfacer
# - typecheck
# - errorlint (TODO: re-enable in go1.20 migration)
# - goerr113
# - noctx
# - gomnd
# - lll

linters-settings:
errorlint:
Expand Down Expand Up @@ -83,13 +80,13 @@ linters-settings:
- name: unhandled-error
disabled: false
arguments:
- "fmt.Fprint"
- "fmt.Fprintf"
- "fmt.Print"
- "fmt.Printf"
- "fmt.Println"
- "rand.Read"
- "sb.WriteString"
- "fmt\\.Fprint"
- "fmt\\.Fprintf"
- "fmt\\.Print"
- "fmt\\.Printf"
- "fmt\\.Println"
- "math/rand\\.Read"
- "strings\\.Builder\\.WriteString"
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
- name: unused-parameter
disabled: false
Expand All @@ -100,7 +97,7 @@ linters-settings:
- name: useless-break
disabled: false
staticcheck:
go: "1.18"
go: "1.19"
# https://staticcheck.io/docs/options#checks
checks:
- "all"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# README.md
# go.mod
# ============= Compilation Stage ================
FROM golang:1.18.5-buster AS builder
RUN apt-get update && apt-get install -y --no-install-recommends bash=5.0-4 git=1:2.20.1-2+deb10u3 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
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
# Copy and download avalanche dependencies using go mod
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.18.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
7 changes: 3 additions & 4 deletions api/health/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

"github.com/prometheus/client_golang/prometheus"

"golang.org/x/exp/maps"

"github.com/ava-labs/avalanchego/utils"
)

Expand Down Expand Up @@ -120,10 +122,7 @@ func (w *worker) runChecks(ctx context.Context) {
// during this iteration. If [w.checks] is modified during this iteration of
// [runChecks], then the added check will not be run until the next
// iteration.
checks := make(map[string]Checker, len(w.checks))
for name, checker := range w.checks {
checks[name] = checker
}
checks := maps.Clone(w.checks)
w.checksLock.RUnlock()

var wg sync.WaitGroup
Expand Down
12 changes: 7 additions & 5 deletions api/server/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"sync"

"github.com/gorilla/mux"

"github.com/ava-labs/avalanchego/utils/set"
)

var (
Expand All @@ -22,15 +24,15 @@ type router struct {
router *mux.Router

routeLock sync.Mutex
reservedRoutes map[string]bool // Reserves routes so that there can't be alias that conflict
reservedRoutes set.Set[string] // Reserves routes so that there can't be alias that conflict
aliases map[string][]string // Maps a route to a set of reserved routes
routes map[string]map[string]http.Handler // Maps routes to a handler
}

func newRouter() *router {
return &router{
router: mux.NewRouter(),
reservedRoutes: make(map[string]bool),
reservedRoutes: set.Set[string]{},
aliases: make(map[string][]string),
routes: make(map[string]map[string]http.Handler),
}
Expand Down Expand Up @@ -68,7 +70,7 @@ func (r *router) AddRouter(base, endpoint string, handler http.Handler) error {
}

func (r *router) addRouter(base, endpoint string, handler http.Handler) error {
if r.reservedRoutes[base] {
if r.reservedRoutes.Contains(base) {
return fmt.Errorf("couldn't route to %s as that route is either aliased or already maps to a handler", base)
}

Expand Down Expand Up @@ -113,13 +115,13 @@ func (r *router) AddAlias(base string, aliases ...string) error {
defer r.routeLock.Unlock()

for _, alias := range aliases {
if r.reservedRoutes[alias] {
if r.reservedRoutes.Contains(alias) {
return fmt.Errorf("couldn't alias to %s as that route is either already aliased or already maps to a handler", alias)
}
}

for _, alias := range aliases {
r.reservedRoutes[alias] = true
r.reservedRoutes.Add(alias)
}

r.aliases[base] = append(r.aliases[base], aliases...)
Expand Down
Loading