Skip to content

Anchor v1: send every test transaction as a v1 transaction - #198

Merged
mikemaccana merged 7 commits into
mainfrom
claude/solana-transaction-v1-lw43l0
Oct 15, 2026
Merged

mikemaccana merged 7 commits into
mainfrom
claude/solana-transaction-v1-lw43l0

Conversation

@mikemaccana

@mikemaccana mikemaccana commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Every Anchor v1 example's tests now send v1 transactions (SIMD-0385), the 4,096-byte format live on mainnet since epoch 1035 (15 September 2026). They send them through solana-kite 0.6.0, which builds every transaction as v1, including the setup transactions its token, Token Extensions and transfer hook helpers send. No program changes: a program sees the same accounts and instruction data whichever format carried them.

This PR touches Anchor v1 only. Anchor v2 and Quasar cannot follow yet; see Not in this PR.

How

  • kite 0.6.0. The 55 Anchor v1 manifests that used kite 0.5.0 move to 0.6.0.
  • Compute unit limits. A v1 transaction's unset limits are zero, not the legacy defaults, so kite 0.6 sets the compute unit and loaded-accounts data size limits in every transaction it builds. Its senders and helpers take a new last argument, compute_unit_limit: Option<u32>. All 554 calls here pass None, so kite simulates each transaction and sends it with the compute units the simulation used.
  • Tests that read a transaction's metadata. Six tests build their own transactions, to read logs, measure compute units or read a program error code. They are hello-solana, the three compression examples, options and order-book. They now build with kite's build_transaction_from_instructions and get_transaction_config, using solana-compute-budget's MAX_COMPUTE_UNIT_LIMIT, and send through LiteSVM. The compression examples add kite for this. All six drop solana-message and solana-transaction from their manifests.
  • New example. basics/transaction-v1/anchor-v1 stores a 3,000-byte document in one instruction, which only fits in a v1 transaction. It builds its transactions without kite, to show each config field. Its tests measure the transaction against both size limits and show that an unset field means zero: an empty config fails with MaxLoadedAccountsDataSizeExceeded before the program runs, and a missing compute limit fails on the first instruction.
  • README catalog and FAQ entries, a CONTRIBUTING note on kite 0.6's senders, and a CHANGELOG entry.

An earlier commit on this branch carried a copy of a v1 sender module in each example while kite still built legacy transactions. kite 0.6.0 replaces it, and all 57 copies are gone.

Testing

All 57 Anchor v1 projects pass with kite 0.6.0 resolved: 437 tests, the same count as before the switch. They ran against program binaries built with Solana 3.1.14, as CI installs it, and platform-tools v1.57 with SBPF v3, the build anchor-cli 1.2.0 runs. No program source changed in this PR or in the merge from main. The nine projects whose program or test crate shares a name with another example's ran in their own target directories.

Not in this PR

  • Anchor v2 can't follow yet. Its harness, anchor-v2-testing on otter-sec/anchor's anchor-next, pins litesvm = "=0.13.1", which predates v1. LiteSVM 0.16 is the first release that runs v1. otter-sec/anchor#5123, which would have moved it, was closed unmerged on 1 October. Once the pin moves, the 56 Anchor v2 examples need kite 0.6 too, and so do the root workspace's native and Pinocchio tests, which share its lockfile.
  • Quasar can't follow yet. quasar-svm 0.1.0 is its only release and is on solana-message 3.x. It never runs a transaction: it compiles each instruction chain into a legacy message under a fixed compute budget, so there is nowhere to ask for v1. It needs solana-message 4.2+, a v1 message path with a TransactionConfig, and a release. Then quasar-test needs a way for #[quasar_test] to choose the format.

🤖 Generated with Claude Code

https://claude.ai/code/session_014EotgxjmAGtATDFVnBtjXj

claude and others added 7 commits September 3, 2026 01:25
…hain

Solana's v1 transaction format (SIMD-0385) raises the transaction size
limit from 1,232 to 4,096 bytes and moves the compute budget into the
message. Programs need no change for it; tests and clients do.

basics/transaction-v1/, in Anchor v2, Anchor v1, Pinocchio and native
Rust: a program that stores a 3,000 byte document in one instruction,
which only fits in a v1 transaction. Its LiteSVM 0.16 tests build the v1
transactions by hand, measure them against both size limits, and show
the config fields that replace ComputeBudget instructions, including
that an unset field means zero rather than the default. The four
directories are standalone workspaces: the root workspace pins LiteSVM
0.13.1 through anchor-v2-testing and solana-kite, and 0.13.1 and 0.16.0
cannot share a lockfile.

docs/transaction-v1.md records what v1 changes, where it is live, and
which of the tools the examples build on can send it, checked against
the pinned versions. README, CHANGELOG and llms.txt link to it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014EotgxjmAGtATDFVnBtjXj
Main moved the Anchor v1 examples to Anchor 1.2.0, LiteSVM 0.16 and
solana-kite 0.5.0 while this branch was open, which retires one of the
three blockers the docs listed. Transaction v1 also activated on mainnet
beta at epoch 1035 (15 September 2026) and is live on devnet.

- The example's Anchor v1 copy moves to anchor-lang 1.2.0 like the rest.
- Both Anchor copies go back to solana_version 3.1.8 like every other
  example. CI installs 3.1.14, and a 4.2.2 pin would make anchor try to
  install another CLI mid-build. The LiteSVM tests bring their own
  v1-capable runtime, so the CLI version does not matter to them.
- docs/transaction-v1.md, the READMEs and the changelog report mainnet
  activation, kite 0.5.0 and the current example counts. Only
  anchor-v2-testing (still litesvm =0.13.1) and quasar-svm (still 0.1.0)
  remain as blockers.
- The README catalog and FAQ entries are restored on top of main's
  rewritten intro.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014EotgxjmAGtATDFVnBtjXj
…tion-v1-lw43l0

# Conflicts:
#	CHANGELOG.md
#	llms.txt
Solana's v1 transaction format (SIMD-0385) activated on mainnet beta at
epoch 1035. Programs need no change for it; the client that builds the
transaction does, and in these examples that is the tests.

Each Anchor v1 test directory gains a transaction_v1 module, the same file
in all 57 examples. Its send_transaction_from_instructions has the same
arguments and error type as solana-kite's, which builds a legacy
transaction, so each test file swaps one import and no call site changes.
A v1 transaction's unset limits are zero, so the module asks for what a
legacy transaction gets by default: 200,000 compute units per instruction
up to 1,400,000, and 64 MiB of loaded account data. The six tests that
build a transaction by hand use the module's v1_transaction instead.

This change is Anchor v1 only. The Anchor v2, Pinocchio and native copies
of basics/transaction-v1 and docs/transaction-v1.md leave the branch; they
remain in commit 8bec3dc. Anchor v2 and Quasar tests cannot send v1 yet:
anchor-v2-testing pins LiteSVM 0.13.1 and quasar-svm is on a
solana-message without the v1 module.

Kite's token helpers still send their setup transactions as legacy ones,
through kite's own sender.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014EotgxjmAGtATDFVnBtjXj
kite 0.6.0 builds every transaction as v1, including the setup transactions
its token, Token Extensions and transfer hook helpers send. The 57 copies of
the tests/transaction_v1 module, which stood in for kite's legacy sender, are
gone, and each test file imports from kite again.

kite 0.6's senders and helpers take a new last argument,
compute_unit_limit: Option<u32>. Every call passes None, so kite simulates
the transaction and sends it with the compute units the simulation used.

The six tests that read a transaction's metadata (logs, compute units, a
program error code) build it with kite's build_transaction_from_instructions
and get_transaction_config, with solana-compute-budget's
MAX_COMPUTE_UNIT_LIMIT, and send it through LiteSVM. They no longer use
solana-message or solana-transaction directly.

In the transaction v1 example, v1_transaction becomes build_v1_transaction,
and the sample document's pattern length is a named constant.

Claude-Session: https://claude.ai/code/session_014EotgxjmAGtATDFVnBtjXj
…tests

anchor build failed for compression/cnft-vault: the IDL build links the test
binary, and both cnft_vault and spl-token 9 defined `entrypoint`. spl-token
came in through solana-kite 0.6.0, which depends on spl-token 9 and
spl-associated-token-account 8 without their `no-entrypoint` feature.

The three compression test manifests now name both crates with
`no-entrypoint`, which Cargo's feature unification applies to kite's copies
too. A TODO says to delete them once kite turns the feature on itself.

Claude-Session: https://claude.ai/code/session_014EotgxjmAGtATDFVnBtjXj
@mikemaccana
mikemaccana merged commit 2c964c4 into main Oct 15, 2026
47 checks passed
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.

2 participants