Skip to content

fix(deps)!: upgrade avalanchego to v1.15.3 for Go 1.27 - #67

Merged
owenwahlgren merged 6 commits into
mainfrom
fix/avalanchego-v1.15.3
Nov 23, 2026
Merged

owenwahlgren merged 6 commits into
mainfrom
fix/avalanchego-v1.15.3

Conversation

@jhkimqd

@jhkimqd jhkimqd commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Summary

go install github.com/ava-labs/platform-cli@main with Go 1.27+ produces a binary that panics on every command:

panic: failed to decode checkpoints.json: first and last characters should be quotes

Root cause: Go 1.27 enables encoding/json v2 by default, which passes map keys to UnmarshalText unquoted. The pinned avalanchego's ids.ID.UnmarshalText delegated to UnmarshalJSON, which requires quotes, so genesis init() fails. avalanchego v1.15.3 fixes this (ava-labs/avalanchego#6297).

Changes

  • deps: avalanchego v1.14.3-0.20260717… → v1.15.3. API updates: platformvm/txs → platformvm/platform, cb58.Decode(s, PrivateKeyLen).
  • ⚠️ Breaking: darwin/amd64 dropped. v1.15.3 links firewood-go/ffi, which has no Intel-Mac library; avalanchego doesn't support darwin/amd64 either. install.sh maps Rosetta shells to arm64 and explains missing assets.
  • ci: Go version comes only from go.mod (go 1.26.10, parity with avalanchego). New smoke-test step with GOEXPERIMENT=jsonv2 guards against this regression without needing Go 1.27.
  • docs: README install requirements.

Type of Change

  • fix - Bug fix

Testing

  • On Go 1.26.10: go vet, staticcheck, go test -race ./... and the clie2e smoke tests pass. linux/amd64 and linux/arm64 -tags ledger release builds succeed.
  • Reproduced the panic on main with Go 1.27.1 and with GOEXPERIMENT=jsonv2; both pass on this branch.
  • Adversarial review: P-Chain builder, fee, and codec type IDs are unchanged across the upgrade; cb58 accepts all valid 32-byte keys.
  • Network E2E (Fuji P↔C through the new C-Chain client) not run yet. Suggest a manual Nightly Network E2E dispatch on this branch before merging.

Notes

  • govulncheck will fail on GO-2026-6859 (net/http, Go 1.26.10 stdlib, fixed in 1.26.11). The same finding exists on main; we're staying on 1.26.10 for parity until avalanchego bumps.
  • The binary grows from 47 MB to 71 MB because the SAE C-Chain client and firewood are now linked in.

Binaries built with Go 1.27+ panic at startup:

  failed to decode checkpoints.json: first and last characters should
  be quotes

Go 1.27 enables encoding/json v2 by default, which passes map keys to
UnmarshalText unquoted. The pinned avalanchego's ids.ID.UnmarshalText
delegated to UnmarshalJSON, which requires quotes, so genesis init
failed. avalanchego v1.15.3 fixes this (ava-labs/avalanchego#6297).

Adapt to v1.15 API changes:
- vms/platformvm/txs is renamed to vms/platformvm/platform
- cb58.Decode takes a max payload length; pass PrivateKeyLen

go.mod now declares go 1.26.10 with no toolchain line, matching
avalanchego. Also correct the C-Chain await comments for the v1.15.3
wallet behavior.
avalanchego v1.15.3 links github.com/ava-labs/firewood-go/ffi through
wallet/chain/c. firewood ships prebuilt libraries only for linux/amd64,
linux/arm64 and darwin/arm64, so darwin/amd64 cannot link. avalanchego
itself lists darwin/amd64 as not supported.

install.sh now resolves Apple Silicon under Rosetta 2 to arm64 and
reports a clear error when a release asset is missing.

BREAKING CHANGE: releases no longer include a darwin/amd64 (Intel Mac)
binary.
Use setup-go's go-version-file and GOTOOLCHAIN=local instead of
hardcoding 1.26.10 in each workflow. go.mod becomes the single source
of the Go version, as in avalanchego.
Go 1.27+ enables encoding/json v2 by default. Running the smoke tests
with GOEXPERIMENT=jsonv2 on the pinned toolchain catches JSON decoding
regressions, such as the checkpoints.json startup panic, without
installing a newer Go.
Require Go 1.26.10+ to match go.mod and avalanchego, note the cgo
requirement, and list supported platforms.
@jhkimqd
jhkimqd requested a review from owenwahlgren November 23, 2026 06:32
govulncheck flags GO-2026-6859 (net/http) in Go 1.26.10. Go 1.26.11
fixes it, but also rejects cgo link objects with LLVM LTO sections.
firewood-go/ffi v0.9.0 ships such libraries, so the build fails.

Bump the go directive to 1.26.11 and firewood-go/ffi to v0.9.1, which
strips the LTO sections. The ffi Go API is unchanged.
@owenwahlgren
owenwahlgren merged commit 07c9d22 into main Nov 23, 2026
6 checks passed
@owenwahlgren
owenwahlgren deleted the fix/avalanchego-v1.15.3 branch November 23, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants