Works with the AI Agents you already use
Solana tx Compute Design
by BanditXBT
Design around Solana compute, size, lock and fee limits; reliable landing, retries and commitment levels.
Free
About this skill
Limits shape architecture on Solana. Verify current numbers against the Solana docs/cluster feature set before relying on them; they change with network upgrades.
| Constraint | Typical value | Consequence |
|---|---|---|
| Compute units | 200k default per instruction, 1.4M max per tx | Bound loops; measure CU per path |
| Transaction size | 1232 bytes (serialized) | Limits accounts/instruction data; use lookup tables |
| CPI depth | 4 | Avoid deep call chains |
| Stack / heap | 4 KB per frame / 32 KB heap default | Box large structs; zero-copy |
| Account data | up to 10 MiB; +10 KiB growth per instruction | Plan realloc |
| Blockhash validity | ~150 blocks (≈ 1-2 min) | Retry/expiry logic |
| Signature fee | 5000 lamports base per signature | Plus priority fee |
| Account locks per tx | 64 enforced for legacy/v0 (a 128 limit exists as an inactive feature; a new tx version proposes 96) | Count program IDs and signers too; re-check the current limit |
| CPI limits | 16 PDA signers and 128 account infos per CPI (higher limit proposed) | Wide CPIs need batching |
| Loaded/growth limits | Account data growth per tx is capped (tens of MiB); 10 KiB per-instruction realloc | Plan large allocations across instructions |
- Measure: log
sol_log_compute_units()in dev, or readunitsConsumedfromsimulateTransaction. Test the worst-case path (max positions, max accounts), not the average. - Set explicit limits in clients:
ComputeBudgetInstruction::set_compute_unit_limit(measured × 1.1-1.2). Over-requesting wastes priority fee (fee = limit × price); under-requesting fails. - Reduce CU: avoid heap allocation and large copies, prefer
zero_copy, use fixed-size arrays, avoidmsg!formatting in hot paths, precompute, avoid repeated PDA derivation (find_program_addressis expensive; store bumps and usecreate_program_address), use efficient serialization, minimize CPIs and logs. - Cap work per transaction by design: paginated/batched processing with explicit
max_iterations, cursor state in accounts.
- Each tx declares read/write accounts up front. Write-locks serialize: avoid a global mutable account on the hot path; shard or partition by user/market; mark accounts read-only whenever possible.
- Address lookup tables with v0 transactions expand account capacity within the size limit; tables must be activated (wait for slot warm-up) before use; know that lookup tables cannot supply signer keys.
- Account locks per transaction are capped (64 for legacy/v0 at last check, including program IDs and signers); lookup tables fix size, not the lock cap. Verify the current limit in the Solana constants reference.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 13 days ago
- Free with an Agensi account
Requires
Nothing to install.
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.