Skip to content

feat: use Lifted STARK#2739

Draft
adr1anh wants to merge 15 commits intonextfrom
adr1anh/lifted-stark
Draft

feat: use Lifted STARK#2739
adr1anh wants to merge 15 commits intonextfrom
adr1anh/lifted-stark

Conversation

@adr1anh
Copy link
Contributor

@adr1anh adr1anh commented Feb 25, 2026

Work in progress branch using the new Lifted STARK.

adr1anh and others added 11 commits March 3, 2026 13:33
…proach

Update p3-miden dependencies and remove the LiftedConfig wrapper in favor
of the upstream GenericStarkConfig which now implements the StarkConfig
trait directly. Move public-input-dependent init terms (program hash,
transcript state, kernel digests) from aux trace seeding to verifier-side
reduced_aux_values checks. Simplify AuxTraceBuilder by removing kernel
and final_transcript_state fields, and update snapshots accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…traints

The upstream p3-miden now supports direct EF x F arithmetic on
expressions, so the explicit AB::ExprEF::from(...) wrappers are no
longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update p3-miden git deps to latest lifted-stark-aux (1382822). Key API
changes: reduced_aux_values now returns Result, prove_single takes
var_len_public_inputs, and var-len public inputs are flat (one slice per
kernel digest) rather than grouped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EmptyAuxBuilder was removed upstream; replace with a local
DummyAuxBuilder and implement the three new required LiftedAir
methods (num_randomness, aux_width, num_aux_values).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ebase

Replace MidenAirBuilder with LiftedAirBuilder in system constraints,
tagging infrastructure, and OodEvalAirBuilder. The monolithic
MidenAirBuilder impl is split into individual trait impls (AirBuilder,
ExtensionBuilder, PermutationAirBuilder, PeriodicAirBuilder,
LiftedAirBuilder).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Plonky3 prover/verifier samples only `num_randomness()` challenges
from the Fiat-Shamir transcript. Previously AUX_TRACE_RAND_ELEMENTS was
16 (matching the old winterfell approach), but the processor needs 16
*derived* challenges from only 2 independent ones: [c0, 1, c1, c1^2,
..., c1^14].

- Add `derive_challenges()` and `DERIVED_CHALLENGE_LEN` constant
- Change `AUX_TRACE_RAND_ELEMENTS` from 16 to 2
- Derive challenges in AuxTraceAdapter, eval(), and reduced_aux_values()
- Pass derived challenges explicitly to bus constraint functions
- Replace expect()/unwrap_or in reduced_aux_values with ReductionError
- Use Matrix::row_slice() for last-row extraction in AuxTraceAdapter
- Update processor tests to use DERIVED_CHALLENGE_LEN

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace `Result<_, String>` in `config::prove`/`config::verify` with
typed `ProvingError`/`VerificationError` enums that wrap the upstream
p3-miden errors and bincode errors directly. Update `ExecutionError`
and `VerificationError` to hold these typed errors instead of strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reverts the derivation scheme introduced in 4c649f4 and 4f601df
which sampled only 2 elements (c0, c1) and expanded them into 16 via
powers. Now `num_randomness()` returns 16 and all challenges are
sampled independently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adr1anh adr1anh force-pushed the adr1anh/lifted-stark branch from 4a08cd1 to 14c82ae Compare March 3, 2026 12:34
adr1anh and others added 4 commits March 3, 2026 16:12
Remove the intermediary `AuxTraceBuilder` trait and `AuxTraceAdapter`
newtype from the air crate, and the `row_major_adapter` module from the
processor crate. `AuxTraceBuilders` now implements the upstream
`AuxBuilder<Felt, EF>` trait from `p3_miden_lifted_air` directly, with
the row-major/column-major conversion logic inlined.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BusColumnBuilder (b_chiplets) ends at kernel_reduced and
BlockHashTableColumnBuilder (p2) ends at 1/program_hash_msg.
Their balance is verified via reduced_aux_values (aux-finals),
not the bus debugger, so enforce_bus_balance should return false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The block hash table column p2 is no longer seeded with the program
hash at initialization. Instead, it starts at 1 and its final value
encodes the program hash binding, verified by the verifier via
reduced_aux_values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ranch

Update to the main branch of p3-miden which introduces breaking API changes:
- Replace p3-air with p3-air-next (traits re-exported via p3-miden-lifted-air)
- Remove BaseAirWithPublicValues (num_public_values moved to BaseAir)
- Remove AirBuilderWithPublicValues (public_values/PublicVar moved to AirBuilder)
- Add PermutationVal type and permutation_values() to PermutationAirBuilder
- Remove manual LiftedAirBuilder impl (now a blanket impl upstream)
- Add num_var_len_public_inputs to ProcessorAir for kernel procedure validation
- Fix clone_on_copy clippy warnings from new Copy bound on AirBuilder::Var

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant