Repository navigation
Description
The current GKR round kernel receives materialized field tables. Bit-affine leaves and the first product levels have only a small number of cases determined by packed witness bits.
This issue owns leaf, pair and four-leaf lookup-prefix kernels that delay dense field materialization while preserving the ordinary GKR round protocol.
Sources
The target repository's existing relation, field encoding, coordinate order, and transcript contracts are authoritative. The current target implementation determines compatibility; the PoC implementation is reference-only and must be re-derived against those contracts.
In scope
- Derive shared weighted case products over the target GF(2^128) representation, including the both-set pair contribution and equality weights.
- Use packed selecting bits for early messages/folds and materialize residues only at the documented transition to dense execution.
- Keep every ordinary round boundary: absorb the existing round message, then derive its challenge, then update the prover state. Lookup preparation may not use future challenges.
Out of scope: univariate round skipping, changing degree bounds/encoding, new PCS handoffs, cache layout tuning (#113), and making private-data timing guarantees absent from the existing witness path.
Potential impact
The leaf message can replace per-tree multiplications with table selection/addition after shared preparation; two or three early variables may remain bit-driven. Setup must amortize across enough trees. Dense-memory savings overlap lazy storage and cannot be multiplied as independent gains.
Done when
- Compare each message, folded residue and terminal evaluation with the eager reference, covering all bit patterns and zero/one/general challenges.
- Prove byte-identical transcript/proof behavior across lookup/dense transitions; malformed proofs and terminal openings continue to reject.
- Check shared-table dimensions and checked indexing for shallow/partial groups; unsupported shapes use the reference path.
- Profile preparation, first messages, materialization and full GKR separately for narrow/wide forests, including allocation and peak memory.
Dependencies and coordination
Depends on #107, #58. Coordinate with #52. The GKR tracker #52 tracks the wider programme; this issue owns only the scoped implementation above.
Activity
zkfriendly commentedon Nov 24, 2026
Status update (
main34addac): partially implemented by #146 (f433296). Round 1 of layers 0, 1, and 2 (prove_lut_layerincrates/gkr/src/lib.rs) now reads nibbles and 16-entry lookup tables with bucketed eq sums (and open PR #152 splitsEqTablesfor #58). Remaining scope: keeping rounds 2–3 bit-driven before materializing densebound_children.