Skip to main content
This page documents the runnable gates that validate ProofForge today and separates them from gates that are planned but not yet implemented. It mirrors actual scripts, root justfile recipes, and .github/workflows/ci.yml; it does not add or edit CI jobs.

Current gates

Planned gates that are not runnable yet

The following gates are Planned and do not exist in CI or as scripts:
  • proof-forge build --target <id> — unified target-oriented build command.
  • proof-forge test --target <id> — unified target-oriented test command.
  • Non-EVM, non-Psy proof-forge-artifact.json validation — artifact metadata schema validation for targets that do not yet write metadata.
  • Golden Yul/output snapshots — regression detection via snapshot diffing.
  • CosmWasm smoke — cosmwasm-check or cw-multi-test validation.
  • Solana sBPF assembly gates (target solana-sbpf-asm, D-026). These become runnable as Workstreams 6–7 land; the sbpf toolchain is validated locally (build + disassemble round-trip + sbpf test on the counter example):
    • V-GATE-SOLANA-01--emit-sbpf-asm produces valid .s accepted by sbpf build (no assembly errors). Script: scripts/solana/emit-asm-smoke.sh (runnable, Phase 0 complete).
    • V-GATE-SOLANA-02sbpf build produces a valid ELF that sbpf disassemble round-trips. Script: scripts/solana/emit-asm-smoke.sh (runnable, Phase 0 complete).
    • V-GATE-SOLANA-03 — Counter scenario (initialize, increment, get) passes sbpf test (Mollusk). Script: scripts/solana/counter-smoke.sh (Phase 1 complete; 4 Mollusk assertions: initialize→0, increment 0→1, increment 5→6, get→return_data). The emitted .s now includes the account-validation prologue (writable + owner checks) and is accompanied by manifest.toml; the tracked Examples/Solana/Counter.golden.s / Counter.manifest.toml are kept in sync by scripts/solana/build-examples.sh.
    • V-GATE-SOLANA-04 — Counter scenario passes a Surfpool local simnet deployment and Web3.js behavior smoke. Script: scripts/solana/surfpool-web3-smoke.sh (optional, gated on surfpool, Solana CLI, sbpf, Node, and npm). The script builds the Counter ELF, starts Surfpool, deploys with solana program deploy --use-rpc, creates a program-owned counter account through @solana/web3.js, invokes initialize/increment/get, validates account data 0→1→2, and checks get return data.
    • V-GATE-SOLANA-05 — Capability checker rejects IR modules using unsupported capabilities with a clear diagnostic citing target id and capability id. Script: scripts/solana/diagnostic-smoke.sh runs Tests/SolanaDiagnostics.lean and asserts 8 crosscall rejection cases (the generic crosscall.invoke family) all produce the expected message target \solana-sbpf-asm` does not support capability `crosscall.invoke`: …`. (Phase 1 complete.)
    • V-GATE-SOLANA-06proof-forge-artifact.json includes target: "solana-sbpf-asm", irVersion, and entrypoint list.
    • V-GATE-SOLANA-07sbpf debug --elf --input works interactively (developer ergonomics gate — not CI).
    • V-GATE-SOLANA-08 — Control-flow + assertion IR coverage. Two halves:
      • Emission half (runnable, no sbpf required) — scripts/solana/emit-control-smoke.sh runs --emit-control-ir-sbpf, greps the emitted .s for the control.conditional / control.assert / control.assert_eq markers, the assert_fail (exit 2) and assert_eq_fail (exit 3) global labels, the dispatch lines for the three entrypoints, the comparison instructions jeq/jlt driving r3 vs r2, asserts the asm is bit-for-bit reproducible across re-emissions, and validates the artifact metadata records target: "solana-sbpf-asm", fixture: "control-ir-sbpf", sourceModule: "ControlFlowAssertProbe", and the storage.scalar / control.conditional / assertions.check / account.explicit capabilities. (Emission half complete.)
      • Runtime half (gated on sbpf + cargo + solana-keygen) — scripts/solana/control-smoke.sh assembles the emitted .s via sbpf build and runs the Mollusk test crate rendered from Tests/solana/control_mollusk.rs.tpl. Six Mollusk checks cover lifecycle from a zero and from a large pre-state (both land on 10u64 and return 10), guarded_increment from 3 (assert passes, count→4) and from 9 (assert reverts via assert_fail exit 2), and equality_guard from 7 (assertEq passes, count→7 and return 7) and from 42 (assertEq reverts via assert_eq_fail exit 3). The Mollusk fixtures disable account_data_direct_mapping / direct_account_pointers_in_program_input / virtual_address_space_adjustments so the Phase 1 lowering’s legacy embedded account-data layout is exercised. (Phase 1 complete.)
    • V-GATE-SOLANA-09 — PDA typed seed descriptor compatibility with Solana Web3.js. Script: scripts/solana/pda-web3-smoke.sh emits the SDK Vault artifact, installs @solana/web3.js in an isolated temp project, reads solanaExtensions.pdas[].typedSeeds, and checks that literal/account/bump descriptors reproduce the same PDA through PublicKey.findProgramAddressSync and PublicKey.createProgramAddressSync. The harness also covers UTF-8 and instruction-parameter seed resolver behavior. This is an offline derivation gate; it does not deploy or execute a transaction.
    • V-GATE-SOLANA-10 — System Program transfer CPI live behavior through Surfpool and Web3.js. Script: scripts/solana/system-cpi-web3-smoke.sh builds the generated --solana-system-cpi-elf fixture, validates its artifact schema, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes the generated transfer entrypoint with a standard @solana/web3.js transaction, and checks both the recipient lamport delta and the program-owned state account’s recorded lamports value.
    • V-GATE-SOLANA-10R — System Program transfer Pinocchio reference-equivalence contract. Script: scripts/solana/pinocchio-system-transfer-equivalence.sh emits the same --solana-system-cpi-elf fixture and compares its generated artifact against references/solana/pinocchio/system-transfer/reference-manifest.json plus source constants. This pins the reference account order, signer/writable constraints, instruction data shape, CPI protocol/data layout, and state-write contract before the later dual-deploy runtime harness.
    • V-GATE-SOLANA-10L — System Program transfer Pinocchio live equivalence. Script: scripts/solana/pinocchio-system-transfer-live-equivalence.sh builds the ProofForge ELF and the checked-in Pinocchio reference ELF, starts Surfpool, deploys both programs with separate program ids, invokes the same @solana/web3.js System transfer scenario against each, and compares the recipient lamport delta and program-owned state write. This gate skips when cargo-build-sbf cannot find Solana rustc/platform-tools; run just solana-pinocchio-install-sbf-tools to repair that toolchain.
    • V-GATE-SOLANA-11 — System Program create_account CPI live behavior through Surfpool and Web3.js. Script: scripts/solana/system-create-account-cpi-web3-smoke.sh builds the generated --solana-system-create-account-cpi-elf fixture, validates its artifact schema, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes the generated create entrypoint with payer and new-account signers, and checks the new account owner, data length, lamports, plus the state account’s recorded lamports and space values.
    • V-GATE-SOLANA-11R — System Program create_account Pinocchio reference equivalence. Script: scripts/solana/pinocchio-system-create-account-equivalence.sh emits the generated --solana-system-create-account-cpi-elf artifact, compares the instruction ABI, account order, signer/writable constraints, CPI protocol/data layout, lamports/space/owner contract, and two-field state-write contract against references/solana/pinocchio/system-create-account, and can additionally typecheck that reference with pinocchio-system when PROOF_FORGE_PINOCCHIO_CARGO_CHECK=1.
    • V-GATE-SOLANA-11L — System Program create_account Pinocchio live equivalence. Script: scripts/solana/pinocchio-system-create-account-live-equivalence.sh builds the ProofForge ELF and the checked-in Pinocchio reference ELF, starts Surfpool, deploys both programs with separate program ids, invokes the same @solana/web3.js create-account scenario against each, and compares the lamports/space inputs plus the two program-owned state writes. This gate skips when cargo-build-sbf cannot find Solana rustc/platform-tools; run just solana-pinocchio-install-sbf-tools to repair that toolchain.
    • V-GATE-SOLANA-12 — SPL Token transfer_checked CPI live behavior through Surfpool and Web3.js. Script: scripts/solana/spl-token-transfer-cpi-web3-smoke.sh builds the generated --solana-spl-token-transfer-cpi-elf fixture, validates its artifact schema, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, creates a mint plus source/destination token accounts through @solana/spl-token, invokes the generated transfer entrypoint with the source authority signer, and checks token balance deltas plus the state account’s recorded amount.
    • V-GATE-SOLANA-12R — SPL Token transfer_checked Pinocchio reference equivalence. Script: scripts/solana/pinocchio-spl-token-transfer-equivalence.sh emits the generated --solana-spl-token-transfer-cpi-elf artifact, compares the instruction ABI, account order, signer/writable constraints, CPI protocol/data layout, decimals/amount contract, and state-write contract against references/solana/pinocchio/spl-token-transfer, and can additionally typecheck that reference with pinocchio-token when PROOF_FORGE_PINOCCHIO_CARGO_CHECK=1.
    • V-GATE-SOLANA-12L — SPL Token transfer_checked Pinocchio live equivalence. Script: scripts/solana/pinocchio-spl-token-transfer-live-equivalence.sh builds the ProofForge ELF and the checked-in Pinocchio Token reference ELF, starts Surfpool, deploys both programs with separate program ids, invokes the same @solana/web3.js + @solana/spl-token transfer_checked scenario against each, and compares source/destination token balance deltas plus the program-owned amount state write. This gate skips when cargo-build-sbf cannot find Solana rustc/platform-tools; run just solana-pinocchio-install-sbf-tools to repair that toolchain.
    • V-GATE-SOLANA-13 — SPL Token mint_to/burn/approve/revoke CPI live behavior through Surfpool and Web3.js. Script: scripts/solana/spl-token-ops-cpi-web3-smoke.sh builds the generated --solana-spl-token-ops-cpi-elf fixture, validates artifact instruction schemas for four entrypoints, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, creates a mint plus source/destination token accounts through @solana/spl-token, invokes the generated mint, burn, approve, and revoke entrypoints with the source/mint authority signer, and checks supply/balance/delegate changes plus the state account’s recorded mint, burn, approve, and revoke values.
    • V-GATE-SOLANA-13R — SPL Token mint_to/burn/approve/revoke Pinocchio reference equivalence. Script: scripts/solana/pinocchio-spl-token-ops-equivalence.sh emits the generated --solana-spl-token-ops-cpi-elf artifact, compares the four instruction ABIs, shared account order, signer/writable constraints, CPI protocol/data layout, SPL Token instruction tags, and state-write contract against references/solana/pinocchio/spl-token-ops, and can additionally typecheck that reference with pinocchio-token when PROOF_FORGE_PINOCCHIO_CARGO_CHECK=1.
    • V-GATE-SOLANA-13L — SPL Token mint_to/burn/approve/revoke Pinocchio live equivalence. Script: scripts/solana/pinocchio-spl-token-ops-live-equivalence.sh builds the ProofForge ELF and the checked-in Pinocchio Token ops reference ELF, starts Surfpool, deploys both programs with separate program ids, invokes the same @solana/web3.js + @solana/spl-token mint/burn/approve/revoke scenario against each, and compares token effects plus the program-owned state writes. This gate skips when cargo-build-sbf cannot find Solana rustc/platform-tools; run just solana-pinocchio-install-sbf-tools to repair that toolchain.
    • V-GATE-SOLANA-13A — SPL Token set_authority CPI live behavior through Surfpool and Web3.js. Script: scripts/solana/spl-token-authority-cpi-web3-smoke.sh builds the generated --solana-spl-token-authority-cpi-elf fixture, validates the artifact’s single-entrypoint ABI, starts Surfpool, deploys the ELF, creates an SPL Token mint through @solana/spl-token, invokes the generated program to transfer mint authority to a new authority pubkey read from the instruction accounts, and checks the mint authority plus state marker.
    • V-GATE-SOLANA-13AR — SPL Token set_authority Pinocchio reference equivalence. Script: scripts/solana/pinocchio-spl-token-authority-equivalence.sh emits the generated --solana-spl-token-authority-cpi-elf artifact, compares the instruction ABI, account order, signer/writable constraints, CPI metadata, SetAuthority instruction data contract, and marker state-write contract against references/solana/pinocchio/spl-token-authority, and can additionally typecheck that reference with pinocchio-token when PROOF_FORGE_PINOCCHIO_CARGO_CHECK=1.
    • V-GATE-SOLANA-13AL — SPL Token set_authority Pinocchio live equivalence. Script: scripts/solana/pinocchio-spl-token-authority-live-equivalence.sh builds the ProofForge ELF and the checked-in Pinocchio Token authority reference ELF, starts Surfpool, deploys both programs with separate program ids, invokes the same @solana/web3.js + @solana/spl-token mint-authority transfer scenario against each, and compares mint authority plus state marker. This gate skips when cargo-build-sbf cannot find Solana rustc/ platform-tools; run just solana-pinocchio-install-sbf-tools to repair that toolchain.
    • V-GATE-SOLANA-14 — Solana events.emit scalar log plus sol_log_pubkey and sol_log_data live behavior through Surfpool and Web3.js. Script: scripts/solana/log-event-web3-smoke.sh builds the generated --solana-log-event-elf fixture, validates artifact instruction schema, events.emit capability metadata, Solana-only pubkeyLogActions, and Solana-only dataLogActions, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes the generated emit entrypoint with a scalar amount instruction parameter, checks the program-owned state account’s recorded amount, checks transaction logMessages for the sol_log_64_ output containing the stable AmountEvent tag and scalar value, invokes log_state_pubkey, checks transaction logMessages for the state account’s base58 pubkey from sol_log_pubkey, invokes log_state_data, and checks transaction logMessages for the base64 Program data: payload from sol_log_data.
    • V-GATE-SOLANA-15 — Solana Clock sysvar live behavior through Surfpool and Web3.js. Script: scripts/solana/clock-sysvar-web3-smoke.sh builds the generated --solana-clock-sysvar-elf fixture, validates artifact instruction schema and env.block capability metadata, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes the generated record entrypoint, checks that sol_get_clock_sysvar wrote Clock.slot into the program-owned state account, and compares that value with the transaction slot from Web3.js metadata.
    • V-GATE-SOLANA-16 — Solana memory syscall live behavior through Surfpool and Web3.js. Script: scripts/solana/memory-web3-smoke.sh builds the generated --solana-memory-elf fixture, validates runtime.memory artifact metadata, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes set_source and copy_compare_fill, and checks copied value, moved value, memcmp result, and memset byte pattern in the program-owned state account.
    • V-GATE-SOLANA-17 — Solana SHA-256/Keccak-256/Blake3 syscall live behavior through Surfpool and Web3.js. Script: scripts/solana/crypto-hash-web3-smoke.sh builds the generated --solana-crypto-hash-elf fixture, validates crypto.hash artifact metadata, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes set_preimage, hash_preimage, keccak_preimage, and blake3_preimage, and compares the program-owned account’s 32-byte digests against Node crypto.createHash("sha256") and @noble/hashes Keccak-256/Blake3 for the same preimage bytes.
    • V-GATE-SOLANA-18 — Solana Rent sysvar live behavior through Surfpool and Web3.js. Script: scripts/solana/rent-sysvar-web3-smoke.sh builds the generated --solana-rent-sysvar-elf fixture, validates sysvar target extension artifact metadata, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes record_rent, and compares the program-owned account’s recorded Rent.lamports_per_byte_year with the Rent sysvar account’s first u64 word.
    • V-GATE-SOLANA-19 — Solana EpochSchedule sysvar live behavior through Surfpool and Web3.js. Script: scripts/solana/epoch-schedule-sysvar-web3-smoke.sh builds the generated --solana-epoch-schedule-sysvar-elf fixture, validates sysvar target extension artifact metadata, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes record_epoch_schedule, and compares the program-owned account’s recorded EpochSchedule.slots_per_epoch, EpochSchedule.leader_schedule_slot_offset, EpochSchedule.warmup, EpochSchedule.first_normal_epoch, and EpochSchedule.first_normal_slot fields with RPC getEpochSchedule().
    • V-GATE-SOLANA-20 — Solana LastRestartSlot sysvar live behavior through Surfpool and Web3.js. Script: scripts/solana/last-restart-slot-sysvar-web3-smoke.sh builds the generated --solana-last-restart-slot-sysvar-elf fixture, validates feature-gated sysvar target-extension artifact metadata, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes record_last_restart_slot, and compares the program-owned account’s recorded LastRestartSlot.last_restart_slot with the LastRestartSlot sysvar account’s first u64 word. The generated assembly uses sol_get_sysvar with SysvarLastRestartS1ot1111111111111111111111 to stay compatible with the current sbpf assembler while preserving the Solana SDK-level LastRestartSlot capability.
    • V-GATE-SOLANA-21 — Solana EpochRewards sysvar live behavior through Surfpool and Web3.js. Script: scripts/solana/epoch-rewards-sysvar-web3-smoke.sh builds the generated --solana-epoch-rewards-sysvar-elf fixture, validates sysvar target extension artifact metadata for all current EpochRewards fields, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, invokes record_epoch_rewards, and compares the program-owned account’s recorded EpochRewards.distribution_starting_block_height, EpochRewards.num_partitions, EpochRewards.parent_blockhash_word0..3, EpochRewards.total_points_low/high, EpochRewards.total_rewards, EpochRewards.distributed_rewards, and EpochRewards.active with the EpochRewards sysvar account data.
    • V-GATE-SOLANA-22 — Solana return-data and compute-unit syscall live behavior through Surfpool and Web3.js. Script: scripts/solana/return-data-compute-web3-smoke.sh builds the generated --solana-return-data-compute-elf fixture, validates runtime.return_data and runtime.compute_units target-extension artifact metadata, starts Surfpool, deploys the ELF with solana program deploy --use-rpc, confirms sol_set_return_data via simulation returnData, checks empty sol_get_return_data reads, checks a same-instruction set/get roundtrip including the returned program id words, records a nonzero sol_remaining_compute_units value, and verifies sol_log_compute_units_ emits compute-unit logs.
  • Move smoke — aptos move compile/test or Sui Move validation.
  • Cross-target capability rejection matrix — compile-time diagnostics for unsupported capability/target combinations beyond the target-specific Psy and EVM diagnostic smokes.

Upfront validation rule for new target work

Before a target exits Research, docs must name:
  1. The external tools required.
  2. The minimal artifact the target produces.
  3. A local command or script that builds or validates the artifact.
  4. The expected artifact path.
  5. One observable success criterion.
If no runnable local command exists, the target remains Research.

Optional external tools

Current CI installs just 1.48.0, Foundry stable, and solc 0.8.30. Local machines may not have just, solc, cast, forge, psyup, dargo, sbpf, surfpool, Solana CLI, Node, or npm. Missing just blocks the local command catalog but not direct script execution. Missing EVM tools block EVM toolchain gates but not lake build. Missing Psy tools block only the Psy smoke Dargo portions; source generation and golden diff still run before each script exits. Missing Solana tools block Solana assembly/runtime smokes but not Lean builds or target-registry checks. All Dargo-backed Psy smoke scripts also record the generated Dargo package source copy at src/main.psy and the generated Dargo.toml package manifest in proof-forge-artifact.json. The metadata validator checks the package source path, byte size, SHA-256 hash, and hash parity with the generated source file. It also checks the manifest path, byte size, SHA-256 hash, [package] section, type = "bin", and [dependencies] section. Package generation is shared through scripts/psy/write-dargo-package.py so every smoke uses the same source-copy and manifest layout.