Commit 119bc8b
committed
test(program): end-to-end chunked-STARK SBF integration test (#76)
Validates the full chunked STARK verification flow on the real
solana-program-test VM, across separate transactions -- the capstone
for #76's "largest Phase-3 piece".
tests/chunked_stark.rs:
chunked_stark_verifies_across_transactions
- tx1: InitializeSession (FriStark) + AppendChunk(s) uploading a
valid 4-query depth-zero proof + BeginStarkVerify (setup gate,
records num_queries=4)
- asserts the session persists with cursor 0/4, setup_done, finalized
- tx2: StarkVerifyStep batch=2 -> cursor 2/4, still open
- tx3: StarkVerifyStep batch=5 (clamps to 4) -> complete -> the
session PDA is closed (rent refunded)
The cursor advancing 0 -> 2 -> 4 across three transactions, and the
PDA closing on completion, is the on-chain proof that the resumable
verifier + checkpoint cursor compose across transaction boundaries.
stark_step_before_begin_is_rejected
A StarkVerifyStep before BeginStarkVerify fails with
StarkVerifyNotStarted (Custom(0x38)).
Observed per-instruction CU on the depth-zero scaffold: begin ~14.6K,
each step ~10-12K -- trivially under the 1.4M cap. A production
~7.8M-CU proof splits into batches each well under the cap, exactly as
designed.
Both tests pass on the VM (borsh 1.5.7 / platform-tools v1.52). Full
SBF regression: verify_proof_sbf 17 + cross_validator_determinism 4 +
chunked_handlers 8 + chunked_stark 2 = 31 SBF integration tests green.
CI: ci.yml test-sbf job now runs all four SBF suites (added
chunked_handlers + chunked_stark) so the on-chain chunked path runs on
every push.
#76 chunked execution is now implemented + validated end-to-end. The
remaining #76 work is the real Plonky3/Winterfell reference fixture
(the prover-fixture track) + the SDK auto-chunk helper.1 parent caccd43 commit 119bc8b
3 files changed
Lines changed: 391 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
| |||
0 commit comments