Transactions Best Practices
Reliable, cost-efficient transaction landing.
Search across all documentation pages
Reliable, cost-efficient transaction landing.
confirmed or finalized. Do not treat processed as final.Agave 4.1.1 enforces account lists, blockhashes, and fee markets exactly as in the checklist.
Use Solana CLI 3.0.10, which pairs with Agave 4.1.1. Install with agave-install init 4.1.1 (or your team's pin file), then verify with solana --version and agave-install --version.
Use @solana/kit 7.0.0 for new TypeScript—typed RPC methods, smaller API surface, and examples on this page already use Kit. Keep web3.js only for legacy codebases; migrate RPC calls and transaction building incrementally.
Simulate at confirmed, then poll getSignatureStatuses at confirmed for speed. Use finalized before treating token movements as settled.
Most failures: expired blockhash, wrong account metas, or missing priority fee—simulate before every send.
Yes—point CLI and RPC to https://api.devnet.solana.com. Behavior matches mainnet; only account data and economics differ.
Always set SetComputeUnitLimit from simulation plus ~10% headroom; add SetComputeUnitPrice when congested.
Anchor 0.32.1 uses #[program], Context<T>, and #[derive(Accounts)] with explicit mut/signer constraints—run anchor build and anchor test on 0.32.1 via avm use 0.32.1.
Run anchor test with Surfpool 0.12.0 to simulate full transactions against a mainnet fork—especially priority-fee and v0/ALT paths.
LiteSVM catches account-meta and CU issues; devnet validates fee-market landing.
The validator client rebranded to Agave (4.1.1), CLI 3.0.10 aligns with it, and Alpenglow work is changing finality—pin versions and read release notes each upgrade.
simulateTransaction, getLatestBlockhash, getRecentPrioritizationFees, sendTransaction.
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 19, 2026