Releases: fluxrpc/solana-go
Release list
v0.1.9
Memo program & Compatibility helpers
v0.1.7 — Native programs and confidential transfers
Highlights
- Added native codecs for the Compute Budget, Loader v2/v3/v4, Address Lookup Table, Stake, and Vote programs.
- Added SPL Token, Token-2022, and Metaplex Token Metadata instruction and account codecs.
- Added the complete Token-2022 confidential-transfer suite in the isolated
programs/token-2022module: current and legacy key derivation, AE and ElGamal encryption, all 12 ZK proof discriminators, transfer fees, confidential mint/burn, proof context and record accounts, the ElGamal registry, and composed transaction workflows. - Added native proof verification, stable error classification, boundary and concurrent race coverage, and interoperability tests against the Solana Rust verifier from solana-foundation/solana-go PR #484.
- Native confidential proof generation and verification is 9.1–11.5x faster than the compared WASM implementation on the documented benchmark machine.
- Added a runnable confidential-transfer example that builds a signed SIMD-0385 v1 transaction, validates its 4096-byte envelope, and base64-encodes it for RPC submission.
Install
go get github.com/fluxrpc/solana-go@v0.1.7
go get github.com/fluxrpc/solana-go/programs/token-2022@v0.1.0Token-2022 remains a separate Go module, so projects that do not use confidential transfers do not inherit its cryptographic dependency graph.
What's Changed
- Native program codecs in #10
- SPL Token and Metaplex codecs in #11
- Token-2022 confidential-transfer suite in #12
Full Changelog: v0.1.6...v0.1.7
v0.1.6
v0.1.5 — Agave 4.2 transaction v1
v0.1.4 — Full FluxRPC and Yellowstone clients
What's Changed
Full Changelog: v0.1.3...v0.1.4
v0.1.3
v0.1.2 — Message account helpers
Message account helpers
Gagliardetto-compatible helpers on the static account keys, added for downstream migration (first consumer: alphabatem/rpc_shard):
Message.Account(index uint16) (PublicKey, error)Message.AccountMetaList() (AccountMetaSlice, error)— returns the newErrAddressTablesNotSetsentinel for versioned messages that reference address table lookups (this package carries no lookup-table resolution)Message.IsWritableStatic(PublicKey) bool— implements the message account-ordering rule with saturating arithmetic, same as upstream RustMessage.UnmarshalBase64(string) errorPublicKeySlice.ToBase58() []string
Base58 interning on the String paths
PublicKey.String and Hash.String now serve repeated keys from base58.EncodeCached32's lock-free intern table — these APIs allocate a string regardless, so a cache hit erases the allocation entirely (program IDs, mints, hot accounts and blockhashes repeat constantly in Solana workloads). The hand-built JSON writers are unchanged and keep encoding directly into the output buffer; JSON output is byte-identical.
v0.1.1
v0.1.0 — binary decoder
New: solana-go/binary
A minimal, reflection-free decoder for the little-endian ("bincode") and Borsh layouts used by Solana account state and instruction data. No encode side, no struct tags — callers read fields explicitly in layout order, so every read is a bounds check and a fixed-width load.
- Sticky-error
Decoder: read a struct with straight-line calls and checkErr()once at the end. Cold paths record bare sentinels; offset context is formatted lazily, keeping the hot reads inlineable and allocation-free. - Reads:
Uint8/16/32/64,Int64,Bool,Bytes(n)(zero-copy, withCopyvariant),BorshString(zero-copy viaunsafe.String, withCopyvariant), typedPublicKey/Signature/Hash, BorshOptionand SPLCOptiontags (validated), canonical compact-u16 (shortvec) lengths,Skip/Pos/Len/Remaining. - Sentinel errors matchable with
errors.Is:ErrUnexpectedEOF,ErrInvalidTag,ErrNonCanonical,ErrOverflow.
Benchmarks vs gagliardetto/binary
| Operation | fluxrpc | upstream | speedup |
|---|---|---|---|
| SPL token account decode (165 B) | 36 ns, 0 allocs | 150 ns, 1 alloc | 4.1x |
| Metaplex metadata (zero-copy strings) | 123 ns, 1 alloc | 369 ns, 5 allocs | 3.0x |
| Metaplex metadata (copied strings) | 202 ns | 336 ns | 1.7x |
| compact-u16 (3-byte worst case) | 6.5 ns | 8.6 ns | 1.3x |
Verified by differential parity tests in benchcmp (identical decode results vs upstream on token account, mint and metadata fixtures, plus the full 0–0xFFFF compact-u16 range) and 700k+ fuzz executions with no panics.
Root package additions
MPK(string) PublicKey— convenience alias forMustPublicKeyFromBase58.PublicKeySlice—[]PublicKey, JSON-encodes as an array of base58 strings.TransactionFromBase58— base58 counterpart toTransactionFromBase64.