Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ jobs:

- name: Pin jolt-sdk to current commit in Cargo.toml files
run: |
COMMIT_HASH=$(git rev-parse HEAD)
COMMIT_HASH="${{ github.event.pull_request.head.sha || github.sha }}"
JOLT_REPO_URL="${{ github.event.pull_request.head.repo.clone_url || format('https://github.com/{0}', github.repository) }}"
# Pin jolt-sdk in the host Cargo.toml
sed -i 's|jolt-sdk = { git = "https://github.com/a16z/jolt", features = \["host"\] }|jolt-sdk = { git = "https://github.com/a16z/jolt", rev = "'$COMMIT_HASH'", features = ["host"] }|' sample_project/Cargo.toml
sed -i 's|jolt-sdk = { git = "https://github.com/a16z/jolt", features = \["host"\] }|jolt-sdk = { git = "'$JOLT_REPO_URL'", rev = "'$COMMIT_HASH'", features = ["host"] }|' sample_project/Cargo.toml
# Pin jolt-sdk in the guest Cargo.toml
sed -i 's|jolt = { package = "jolt-sdk", git = "https://github.com/a16z/jolt" }|jolt = { package = "jolt-sdk", git = "https://github.com/a16z/jolt", rev = "'$COMMIT_HASH'" }|' sample_project/guest/Cargo.toml
sed -i 's|jolt = { package = "jolt-sdk", git = "https://github.com/a16z/jolt" }|jolt = { package = "jolt-sdk", git = "'$JOLT_REPO_URL'", rev = "'$COMMIT_HASH'" }|' sample_project/guest/Cargo.toml

- name: Make sure the generated code runs
working-directory: ./sample_project
Expand Down Expand Up @@ -195,9 +196,10 @@ jobs:

- name: Pin jolt-sdk to current commit
run: |
COMMIT_HASH=$(git rev-parse HEAD)
sed -i 's|jolt-sdk = { git = "https://github.com/a16z/jolt", features = \["host"\] }|jolt-sdk = { git = "https://github.com/a16z/jolt", rev = "'$COMMIT_HASH'", features = ["host"] }|' sample_project/Cargo.toml
sed -i 's|jolt = { package = "jolt-sdk", git = "https://github.com/a16z/jolt" }|jolt = { package = "jolt-sdk", git = "https://github.com/a16z/jolt", rev = "'$COMMIT_HASH'" }|' sample_project/guest/Cargo.toml
COMMIT_HASH="${{ github.event.pull_request.head.sha || github.sha }}"
JOLT_REPO_URL="${{ github.event.pull_request.head.repo.clone_url || format('https://github.com/{0}', github.repository) }}"
sed -i 's|jolt-sdk = { git = "https://github.com/a16z/jolt", features = \["host"\] }|jolt-sdk = { git = "'$JOLT_REPO_URL'", rev = "'$COMMIT_HASH'", features = ["host"] }|' sample_project/Cargo.toml
sed -i 's|jolt = { package = "jolt-sdk", git = "https://github.com/a16z/jolt" }|jolt = { package = "jolt-sdk", git = "'$JOLT_REPO_URL'", rev = "'$COMMIT_HASH'" }|' sample_project/guest/Cargo.toml

- name: Set up prover and verifier scripts
run: |
Expand Down
77 changes: 77 additions & 0 deletions STACK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Committed Bytecode Stack

This stack splits PR [#1344](https://github.com/a16z/jolt/pull/1344) into reviewable PRs that remain buildable one step at a time.
The end-state implementation lives on `amir/bytecode-commitment-merged`; these stack branches are the review surface, not the source of truth for the original work.

## Invariants

- The first stack branch is based on `origin/main`.
- Each later stack branch is based on the previous stack branch.
- Every slice must compile at its stated checkpoint before the next slice is published.
- Full mode must keep working until committed mode is explicitly activated.
- PRs are opened ready for review, not draft.
- PR bodies must disclose that they were posted by Cursor assistant on behalf of Quang Dao, including the active model.
- The detailed implementation checklist is `specs/1344-committed-bytecode-program-image.md`.

## Stack Order

| # | Branch | Base | Contents |
|---|---|---|---|
| 00 | `stack/00-bytecode-stack-automation` | `main` | stack docs, branch plan, scripts, committed-bytecode spec |
| 01 | `stack/01-program-preprocessing-refactor` | `stack/00-bytecode-stack-automation` | full-mode `ProgramPreprocessing` wrapper |
| 02 | `stack/02-committed-preprocessing-model` | `stack/01-program-preprocessing-refactor` | committed preprocessing data model and validation |
| 03 | `stack/03-precommitted-geometry-substrate` | `stack/02-committed-preprocessing-model` | Dory/precommitted geometry substrate |
| 04 | `stack/04-stage6a-stage6b-full-mode` | `stack/03-precommitted-geometry-substrate` | full-mode Stage 6a/6b split |
| 05 | `stack/05-precommitted-claim-reduction-advice` | `stack/04-stage6a-stage6b-full-mode` | shared precommitted claim reduction and advice port |
| 06 | `stack/06-bytecode-program-image-reductions` | `stack/05-precommitted-claim-reduction-advice` | committed bytecode/program-image reductions and IDs |
| 07 | `stack/07-committed-mode-protocol-wiring` | `stack/06-bytecode-program-image-reductions` | committed-mode protocol activation |
| 08 | `stack/08-sdk-examples-transpiler-docs` | `stack/07-committed-mode-protocol-wiring` | SDK, examples, transpiler, and docs |
| 09 | `stack/09-cleanup-perf-regression-tests` | `stack/08-sdk-examples-transpiler-docs` | cleanup, perf fixes, and regression tests |

## Local Commands

Print the stack plan:

```bash
./stack/update-stack.sh
```

Check path coverage against the current end-state source:

```bash
./stack/update-stack.sh --check-coverage --from amir/bytecode-commitment-merged --base origin/main
```

Open or update ready PRs after branches have been pushed:

```bash
./stack/open-prs.sh --apply --base main --source amir/bytecode-commitment-merged
```

## Validation

Run focused checks on each slice according to `specs/1344-committed-bytecode-program-image.md`.
For protocol-changing slices, the minimum correctness checks are:

```bash
cargo nextest run -p jolt-core muldiv --cargo-quiet --features host
cargo nextest run -p jolt-core muldiv --cargo-quiet --features host,zk
```

For the full stack tip, also run committed-mode and advice coverage:

```bash
cargo nextest run -p jolt-core muldiv_e2e_dory_committed_program_commitments --cargo-quiet --features host
cargo nextest run -p jolt-core muldiv_e2e_dory_committed_program_commitments --cargo-quiet --features host,zk
cargo nextest run -p jolt-core advice_e2e_dory --cargo-quiet --features host
RUST_MIN_STACK=33554432 cargo nextest run -p jolt-core advice_e2e_dory --cargo-quiet --features host,zk
cargo nextest run -p jolt-core final_advice_output_scale --cargo-quiet --features host
```

Strict linting before final publication:

```bash
cargo clippy --all --features host -q --all-targets -- -D warnings
cargo clippy --all --features host,zk -q --all-targets -- -D warnings
cargo fmt -q
```
Loading