Skip to content

v2.0.0-rc

Pre-release
Pre-release

Choose a tag to compare

@HealthyBuilder HealthyBuilder released this 03 Jul 03:58
96a7b0e

v2.0.0-rc

First release candidate for solana-go v2. Publishing for feedback before cutting stable v2.0.0.

Why v2?

We split the project into two parallel lines:

  • v1 (main): backward-compatible improvements only. New features and bug fixes that don't break existing callers continue to land here.
  • v2: everything in main, plus breaking changes we can't ship in v1 without disrupting existing users.

v2 stays continuously in sync with main, so choosing v2 doesn't mean falling behind on new features — it means opting into the cleaner API.

Breaking changes

1. Module path

The module path changed from github.com/gagliardetto/solana-go (from before Solana Foundation adopted the repo) to github.com/solana-foundation/solana-go/v2.

- import "github.com/gagliardetto/solana-go"
- import "github.com/gagliardetto/solana-go/rpc"
+ import "github.com/solana-foundation/solana-go/v2"
+ import "github.com/solana-foundation/solana-go/v2/rpc"

2. Loader program packages (#410)

programs/loader-v2, programs/loader-v3, and programs/loader-v4 were realigned to match the on-chain Loader program specs (account flags, instruction layouts). Callers using these builders will need to update — go build ./... will surface the exact call sites.

3. WebSocket subscription API (#407)

rpc/ws was aligned with the Solana WebSocket JSON-RPC spec. Subscription method signatures changed; the compiler will flag any callers that need updating.

What's NOT breaking

rpc/jsonrpc was intentionally kept identical to v1 for backward compatibility. If you use it directly, only the module path changes.

Migration

# 1. Update imports
find . -type f -name '*.go' -exec sed -i.bak \
  's|github.com/gagliardetto/solana-go|github.com/solana-foundation/solana-go/v2|g' {} +

# 2. Update go.mod
go get github.com/solana-foundation/solana-go/v2@v2.0.0-rc
go mod tidy

# 3. Build and address any errors from #410 / #407
go build ./...

See [Migrating from v1](https://github.com/solana-foundation/solana-go/blob/v2/README.md#migrating-from-v1) in the README for the full walkthrough.

Everything from v1.22 is here too

This RC includes all 12 changes from [v1.22.0](https://github.com/solana-foundation/solana-go/releases/tag/v1.22.0):

  • One-call ALT resolve, getTransactionsForAddress, full MinContextSlot parity
  • Nonce + Sysvar account decoding
  • ws / token / message fixes

Requirements

  • Go 1.24 or later

What about v1?

v1.x will continue to receive backward-compatible improvements and security/bug fixes. v2 is opt-in.

Feedback

Please file issues with the v2 label. Targeting stable v2.0.0 in 2 weeks after RC feedback.

Full diff

[v1.22.0...v2.0.0-rc](v1.22.0...v2.0.0-rc)