Open
Conversation
This was referenced Mar 25, 2026
Collaborator
Author
This was referenced Mar 25, 2026
f089b0c to
9d859ae
Compare
9d859ae to
141bc87
Compare
011fa4f to
2a63a07
Compare
Contributor
|
Warning This PR has more than 500 changed lines and does not include a spec. Large features and architectural changes benefit from a spec-driven workflow. If this PR is a bug fix, refactor, or doesn't warrant a spec, feel free to ignore this message. |
Contributor
Benchmark comparison (crates) |
10 similar comments
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
Contributor
Benchmark comparison (crates) |
66a8432 to
6ae5520
Compare
…tions, and suffixes allocation
- Fix W-suffix execute()/table sign-extension mismatch: VirtualXorRotW{16,12,8,7}
and VirtualRotriw were sign-extending results but their tables zero-extend.
Aligned execute() to match tables.
- Fix VirtualChangeDivisorW execute() to explicitly sign-extend, matching table.
- Add compile-time const assertions for NUM_SUFFIXES, NUM_CIRCUIT_FLAGS,
and NUM_INSTRUCTION_FLAGS (matching existing LookupTableKind::COUNT pattern).
- Change PrefixSuffixDecomposition::suffixes() to return &'static [Suffixes]
instead of Vec<Suffixes>, avoiding heap allocation in prover hot path.
- Add debug_assert to LookupBits::pop_msb for empty bitvector.
- Remove unnecessary #![allow(unused_results)] from lookup_table_tests.
- Add WHY comments for shift/W-suffix instructions with flag/table mismatches.
Remove the `opcodes` module and `fn opcode()` from the `Instruction` trait. The opcode is now purely the registration index in `JoltInstructionSet::new()`, eliminating a manually-synced constants file (105 constants) and simplifying the instruction definition macro. Integration tests now use instruction structs directly instead of opcode-based registry lookups.
`virtual` is a reserved keyword; `virt` is the standard abbreviation.
jolt-lookup-tables: 41 lookup tables, MLE evaluation, prefix/suffix decomposition, LookupBits, ChallengeOps, bit interleaving. jolt-riscv: 105 RISC-V instruction definitions, flags, macro, registry. Depends on jolt-lookup-tables and re-exports all its types for downstream convenience and macro compatibility.
…, remove XLEN generic - Eliminate `LookupTables<XLEN>` enum, `dispatch_table!` macro, and `kind_table_identity!` macro. All dispatch methods now live as explicit match arms on `LookupTableKind`. - Move all lookup table tests from centralized `lookup_table_tests.rs` into `#[cfg(test)] mod tests` blocks in each table file. - Replace `<const XLEN: usize>` generic with `pub const XLEN: usize = 64`. Delete all XLEN=8 code paths, `mle_full_hypercube_test`, and the `materialize()` default method.
Replace `[bool; NUM_CIRCUIT_FLAGS]` and `[bool; NUM_INSTRUCTION_FLAGS]` with `CircuitFlagSet(u16)` and `InstructionFlagSet(u8)` packed bitfields. Builder-pattern `.set()` for construction, `Index` impl for ergonomic access. 21 bytes → 3 bytes per instruction flag set.
jolt-riscv is now a leaf crate (jolt-field + serde only). Removed fn lookup_table() from Instruction trait and table: clause from define_instruction! macro. jolt-lookup-tables depends on jolt-riscv and defines InstructionLookupTable extension trait mapping all 105 instructions to their lookup tables.
… arithmetic files
Add `use crate::{...}` imports at the top of arithmetic.rs and
arithmetic_w.rs, replacing all fully-qualified crate:: paths in
manual trait implementations.
15 flag mismatches found by cross-referencing against jolt-core: - Add missing AddOperands to: AssertWordAlignment, AssertHalfwordAlignment, VirtualRev8W, VirtualSignExtendWord, VirtualZeroExtendWord, VirtualShiftRightBitmask, VirtualShiftRightBitmaskI - Add missing MultiplyOperands to AssertMulUNoOverflow - Add missing RightOperandIsImm to: AssertWordAlignment, AssertHalfwordAlignment, VirtualShiftRightBitmask - Remove incorrect LeftOperandIsRs1Value from: Pow2I, Pow2IW, VirtualShiftRightBitmaskI - Remove incorrect RightOperandIsImm from Pow2W - Remove unused jolt-field dependency from jolt-riscv
Align the extracted instruction semantics with the existing tracer and jolt-core contracts for virtual shifts, assertions, pow2 helpers, and LISC-V LUI handling. Clarify that advice and host I/O opcodes remain runtime-managed and only expose placeholder execute semantics through the registry API. Constraint: Keep extracted crate behavior aligned with existing tracer/jolt-core operand contracts Rejected: Make advice instructions emulate runtime state | trait API has no access to emulator context Confidence: high Scope-risk: narrow
6ae5520 to
406ce72
Compare
Contributor
Benchmark comparison (crates) |
…(Flags)] Add jolt-riscv-derive proc macro crate that generates Flags trait impls from #[circuit(...)] and #[instruction(...)] attributes on structs. All 105 instructions now use normal struct + impl Instruction + derive instead of the declarative macro. Remove macros.rs entirely.
Contributor
Benchmark comparison (crates) |
Replace hardcoded NUM_CIRCUIT_FLAGS, NUM_INSTRUCTION_FLAGS, NUM_PREFIXES, NUM_SUFFIXES, and LookupTableKind::COUNT with strum::EnumCount derives. Remove manual const assert checks.
No external consumers — only used in its own tests. Instruction structs are ZSTs usable directly. Opcode-indexed dispatch belongs at the tracer/jolt-core integration point, not here.
Contributor
Benchmark comparison (crates) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Changes
Testing
cargo clippyandcargo fmtpassSecurity Considerations
Breaking Changes
None