← Theory library
Solana theory
Anchor, Pinocchio, Steel, Bolt ECS, and Token-2022 Extensions.
Practise in the Code Lab →Easy
- 1. What is Solana?High-throughput, low-latency execution and Proof of History.
- 2. The Accounts ModelUnderstanding Solana's fundamental data unit.
- 3. Programs and Executable DataBPF Loader and on-chain program deployment.
- 4. SOL and LamportsNative token denominations and fractional precision.
- 5. Rent and Rent ExemptionStorage fee mechanics and permanent account allocation.
- 6. Program Derived Addresses (PDAs)Deterministic addresses without private keys.
- 7. Cross-Program Invocations (CPIs)Composability and inter-program calls.
- 8. Instruction Data and Serialization FormatsBorsh vs Bytemuck vs Zero-Copy serialization payloads.
- 9. The System ProgramCreating accounts and managing native SOL.
- 10. SBF Virtual Machine & ArchitectureRegisters, stack limits, and execution mechanics.
- 11. Compute Budget and Units (CUs)Managing transaction compute and priority.
- 12. Transaction Atomicity and InstructionsAll-or-nothing execution of multi-instruction transactions.
- 13. Sysvars: Clock, Rent, SlotHistoryAccessing cluster state on-chain.
- 26. Anchor: declare_id! & #[program]Pinning program addresses and routing instructions.
- 27. Anchor: Account Validation & #[derive(Accounts)]Declarative struct validation.
- 28. Anchor: Signer<'info> & #[account(mut)]Enforcing signatures and mutable write locks.
- 29. Anchor: #[account(init, ...)]Creating and funding accounts in one declarative step.
- 30. Anchor: 8-Byte Discriminator and Space CalculationAccounting for Anchor headers.
Medium
- 14. Versioned Transactions & Address Lookup Tables (ALTs)Compressing transaction payload sizes.
- 15. Priority Fees and Localized Fee MarketsMicroLamport pricing and hotspot isolation.
- 16. Native Rust: The entrypoint! MacroRaw program execution without framework magic.
- 17. Native Rust: Manual Account IterationUsing next_account_info safely.
- 18. Native Rust: Manual Signer and Ownership ChecksImplementing manual security assertions.
- 19. Native Rust: Manual Instruction UnpackingEnum dispatching using Borsh or byte slicing.
- 20. Native Rust: Manual Cross-Program Invocationsinvoke and invoke_signed with Instruction and AccountInfo slices.
- 21. Native Rust: Direct Lamport TransfersTransferring native SOL between program-owned accounts.
- 22. Native Rust: Modifying Account Data Lengthrealloc and rent adjustments.
- 25. Native Rust vs Anchor ComparisonCompute unit efficiency vs developer ergonomics.
- 31. Anchor: PDA Constraints (seeds & bump)Declarative PDA validation and creation.
- 32. Anchor: CPIs with CpiContextExecuting type-safe cross-program calls.
- 33. Anchor: Error Codes and require! MacroCustom error handling in Anchor.
- 34. Anchor: has_one ConstraintAsserting relational account field matches.
- 35. Anchor: constraint AttributeArbitrary boolean assertions in account structs.
- 36. Anchor: Account Closing with close ConstraintReclaiming rent and zeroing data.
- 39. Anchor: Program<'info, T> ValidationPreventing arbitrary CPI attacks.
- 41. Anchor: realloc ConstraintDeclarative account resizing in Anchor.
- 42. Anchor: Interface<'info, T> & Token-2022Unified support for SPL Token and Token-2022.
- 43. Anchor: The IDL (Interface Definition Language)Bridging on-chain programs to TypeScript clients.
- 44. Anchor: TypeScript Client Integration (@coral-xyz/anchor)Program invocation in JavaScript/TypeScript.
- 45. Anchor: Testing with anchor testLocal validator integration testing.
- 73. Seahorse: Writing Solana Programs in PythonPythonic syntax compiled to Anchor Rust.
- 74. Seahorse: Account Structures & Built-in TypesData types, Signers, and Empty accounts in Python.
- 75. Poseidon Framework (TypeScript On-Chain Transpiler)Writing Solana programs directly in TypeScript.
- 83. Client-Side Simulation (simulateTransaction)Pre-flight verification and revert diagnostics.
Hard
- 23. Native Rust: Zero-Copy with RefCell & Pointer CastingAvoiding memory allocations for large accounts.
- 24. Native Rust: Security Invariants and Account VerificationAuditing checklist for native programs.
- 37. Anchor: Zero-Copy and AccountLoaderManaging large accounts with zero-copy deserialization.
- 38. Anchor: Box<Account<'info, T>>Preventing SBF stack overflows.
- 40. Anchor: Init-if-needed Mechanics & PitfallsConditional account creation and security risks.
- 46. What is Pinocchio?Zero-dependency, #![no_std] lightweight Solana framework.
- 47. Pinocchio: Memory Layout & Zero-Allocation ModelDirect memory mapping over deserialization.
- 48. Pinocchio: Entrypoint & Direct Account Parsingpinocchio::entrypoint and raw account parsing.
- 49. Pinocchio: AccountInfo and Direct BorrowingZero-copy data and lamport mutation.
- 50. Pinocchio: Efficient CPIs (pinocchio-system & token)Ultra-low CU cross-program calls.
- 51. Pinocchio: Custom Instruction DispatchingManual byte-matching and match dispatch.
- 52. Pinocchio: Working with PDAs (pinocchio-pubkey)Fast PDA derivation and signing.
- 53. Pinocchio: Logging and Errors (pinocchio-log)Zero-allocation debugging and error handling.
- 54. Pinocchio + Shank: Generating IDLsAdding Shank annotations to generate Anchor-compatible IDLs.
- 55. Pinocchio + Codama: TypeScript Client GenerationGenerating type-safe clients from Shank IDLs.
- 56. Pinocchio: Testing with LiteSVMSub-millisecond testing without a local validator.
- 57. Pinocchio: Real-World Use Case (High-Performance AMM Vault)Building an ultra-lean vault.
- 58. Pinocchio vs Native vs Anchor: Architectural MatrixChoosing the right tool for the job.
- 59. What is Steel?Modular, ergonomic native framework by Hardhat Chad.
- 60. Steel: The account! Macro & BytemuckZero-copy account definitions.
- 61. Steel: AccountValidation TraitFluent validation chains.
- 62. Steel: Zero-Copy Loading (as_account & as_account_mut)In-place account reading and writing.
- 63. Steel: Modular CPI HelpersErgonomic system and token calls.
- 64. Steel: Error Handling and Return CodesCustom error declarations in Steel.
- 65. Steel: Project Layout and ArchitectureStructuring scalable Steel workspaces.
- 66. Steel: Testing with solana-program-test & LiteSVMFast integration tests for Steel programs.
- 67. Steel: Case Study (Ore Mining Protocol Architecture)How Steel powers proof-of-work mining on Solana.
- 68. Steel vs Pinocchio vs Anchor: Deep Framework MatrixComparing architecture, ergonomics, and performance.
- 69. What is Bolt ECS?Entity Component System on Solana by MagicBlock.
- 70. Bolt ECS: Components as Data AccountsStateless modular game state.
- 71. Bolt ECS: Systems as Executable LogicDecoupled game mechanics and physics.
- 72. Bolt: Ephemeral Rollups & MagicBlock EngineSub-millisecond gameplay with state delegation.
- 76. What is Codama?Standardized, framework-agnostic IDL & client generator.
- 77. Codama Nodes & AST TransformationCustomizing generated client interfaces.
- 78. Solana Web3.js v2 (@solana/kit)Modular, functional, tree-shakeable JavaScript SDK.
- 79. Building Transactions with @solana/kitPipes, instruction composition, and signing.
- 80. Shank: Attribute-Based IDL GenerationDecorating native and Pinocchio programs.
- 81. Kinobi: Legacy IDL Tooling & Evolution into CodamaThe transition to unified code generation.
- 82. Umi: Metaplex's Modular Client FrameworkPluggable interfaces for signers, RPC, and serializers.
- 84. WebSocket Subscriptions and Geyser PluginsReal-time streaming and validator data streaming.
- 85. Submitting Transactions via Jito Bundles in TSDirect block-leader submission and tip instructions.
- 86. Token-2022: Transfer Fees ExtensionNative on-chain protocol fees.
- 87. Token-2022: Confidential TransfersZero-knowledge encrypted balances using ElGamal and Twisted Edwards.
- 88. Token-2022: Transfer Hooks ExtensionEnforcing custom logic on every transfer.
- 89. Token-2022: Non-Transferable & Interest-Bearing ExtensionsSoulbound badges and yield tokens.
- 90. State Compression & Concurrent Merkle TreesMinting millions of NFTs for pennies.
- 91. Metaplex Bubblegum (Compressed NFTs)The standard for cNFT minting, transferring, and burning.
- 92. Read API and Digital Asset Standard (DAS)Querying compressed assets off-chain.
- 93. Security: Bump Canonicalization & Seed InjectionPreventing multi-address PDA exploits.
- 94. Security: Account Revival & Lamport DrainingPreventing zombie account vulnerabilities.
- 95. Security: Arbitrary Account Metas in CPIVerifying forwarded account privileges.
- 96. Testing with Bankrun & LiteSVMHigh-speed clock warping and state injection.
- 97. Fuzzing Solana Programs (Trident & Honggfuzz)Property-based automated vulnerability discovery.
- 98. Cross-Chain Messaging (Wormhole & LayerZero on Solana)Handling cross-chain VAA messages and payload decoding.
- 99. Auditing and Formal Verification ChecklistPre-mainnet security review protocol.
- 100. Capstone: Production-Grade Multi-Framework Solana ProtocolComplete end-to-end architecture across Anchor, Pinocchio, and Codama.