Commit c88df18
authored
feat: Add SP1 and Zisk kernel proving backends (#411)
* feat: Cargo workspace + SP1/Zisk proving backends
Convert the crate to a Cargo workspace with subcrates and add the SP1
and Zisk kernel proving backends.
Make aiur::vk_codec::aiur_system_to_bytes public so the FFI layer
(crates/ffi/src/aiur/protocol.rs) can serialize the verifying key.
* feat: manifest-driven sharding and bisection-tree aggregation
Port the kernel-sharding profiler and partitioner into the workspace and
build the proving pipeline on top of it:
- manifest-driven sharding for the Zisk host (drops --topo/stats scaffolding)
- budget-driven shard count from a per-shard cycle cap, recalibrated
cycles-per-heartbeat (208k->215k), and auto-sizing from machine RAM
- emit the bisection tree and carry it in the .ixes manifest
- tree-aligned aggregation with in-circuit assumption discharge
- cross-run proof reuse on the shard-plan path (drops the legacy reuse path)
- store-aware planning: partition only novel work, resolve the rest by reuse
* fix: kernel proving fixes, formatting, and cleanup
- add NatSuccMode::Stuck cache to prove
ByteArray.utf8DecodeChar?_utf8EncodeChar_append
- cargo fmt and clippy fixes in the shard examples
* chore: SP1 blake3 fork, CI, and cleanup
- publish the blake3 precompile fork, fix the SP1 guest build, and
document proving
- add CI
* fix: clippy in vk_codec, document Zisk sharding, scope CI execute
- vk_codec: drop the always-Ok `Result` wrapper from `to_bytes`
(clippy `unnecessary_wraps`); callers updated.
- README: document the Zisk shard-proving path — profile → shard →
prove via `--shard-plan`, and the resumable proof store
(`--store-dir`/`--no-reuse`/`--require-closed`).
- ci: scope the riscv-zkvm-execute job to `--only-const myReflEq` so
it certifies one constant (Init deps become Claim assumptions)
instead of typechecking all of Init, which never finished.
* feat: out-of-circuit profiler + bin-packing shard planner
`ix profile`: record every kernel-work counter on each run (heartbeats,
subst-node visits, whnf/def-eq calls, nat-arith limb-work) plus the
delta-unfold graph into a `.ixprof` sidecar, and print a cargo-zisk-style
cost breakdown with a predicted Zisk leaf cycles/RAM estimate. Counter
instrumentation lives in subst/def_eq/tc/whnf; the model coefficients are
defined once in `shard.rs` and shared with the planner.
`ix shard`: ingest the `.ixprof` and partition with no kernel re-run. The
default cap path bin-packs to a per-shard cycle (hence prover-RAM) cap
instead of balancing into a fixed count — the fewest shards that each stay
under the cap, each packed as full as the dependency structure allows. A
fine min-cut pre-partition supplies a cut-coherent block order so
dependency overlap packs into the same shard (paid once, not re-ingressed
per shard); the cap test counts that cross-ingress exactly. `--shards N`
keeps balanced min-cut bisection for manual control; `--max-ram` defaults
to detected system RAM at RAM_USABLE_FRAC headroom.
`ix shard` also reports total shards, total predicted cycles, and a
prove-time estimate from the measured leaf model (54 s + 158 s·Bsteps per
shard). `--parallelism N` divides the wall-clock for an N-prover setup;
sharded proving is sequential today, so the default is 1.
Default sidecar names mirror the env base name: `init.ixe` → `init.ixprof`
→ `init.ixes`.
Remove the kernel example binaries: all functionality is reachable via the
`ix profile`/`ix shard` CLI or the public `shard.rs` functions, so the
examples (and their `env_logger` dev-dep) are dropped.
Also folds in the in-progress SP1/Zisk host `--constant`/`--skip-deps` flag
unification and the Zisk cycle cost-model doc. The ~10-min zkVM execute CI
moves out of the per-PR path into a push-to-main `riscv-bench.yml` (fixture
compile + SP1/Zisk execute), using the matching `--constant --skip-deps`.1 parent 0f8eef5 commit c88df18
181 files changed
Lines changed: 26370 additions & 2513 deletions
File tree
- .github/workflows
- Benchmarks
- CompileFC
- Compile
- Ix
- Cli
- Tests
- crates
- aiur
- src
- gadgets
- common
- src
- compile
- src
- compile
- aux_gen
- congruence
- ffi
- src
- aiur
- iroh
- ix
- lean_ixon
- ixon
- src
- kernel
- src
- tutorial
- docs
- sp1
- .cargo
- guest
- src
- host
- src
- scripts
- src
- ix
- zisk
- agg-guest
- src
- guest
- src
- host
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments