Skip to content

Commit

Permalink
mul small
Browse files Browse the repository at this point in the history
  • Loading branch information
ohad-starkware committed Feb 4, 2025
1 parent 63c4f31 commit 5d95adf
Show file tree
Hide file tree
Showing 16 changed files with 2,178 additions and 67 deletions.
2 changes: 1 addition & 1 deletion stwo_cairo_prover/crates/adapted_prover/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn run(args: impl Iterator<Item = String>) -> Result<(), Error> {
let args = Args::try_parse_from(args)?;

let vm_output: ProverInput =
adapt_vm_output(args.pub_json.as_path(), args.priv_json.as_path(), true)?;
adapt_vm_output(args.pub_json.as_path(), args.priv_json.as_path())?;
let prover_config = ConfigBuilder::default()
.track_relations(args.track_relations)
.display_components(args.display_components)
Expand Down
38 changes: 36 additions & 2 deletions stwo_cairo_prover/crates/prover/src/cairo_air/debug_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ use crate::components::{
generic_opcode, jnz_opcode, jnz_opcode_dst_base_fp, jnz_opcode_taken,
jnz_opcode_taken_dst_base_fp, jump_opcode, jump_opcode_double_deref, jump_opcode_rel,
jump_opcode_rel_imm, memory_address_to_id, memory_id_to_big, mul_opcode, mul_opcode_imm,
range_check_builtin_bits_128, range_check_builtin_bits_96, ret_opcode, verify_bitwise_xor_9,
verify_instruction,
mul_opcode_small, mul_opcode_small_imm, range_check_builtin_bits_128,
range_check_builtin_bits_96, ret_opcode, verify_bitwise_xor_9, verify_instruction,
};
use crate::felt::split_f252;
use crate::relations;
Expand Down Expand Up @@ -440,6 +440,40 @@ where
.entries(trace),
);
}
for claim in claim.opcodes.mul_small.clone() {
entries.extend(
RelationTrackerComponent::new(
tree_span_provider,
mul_opcode_small::Eval {
claim,
memory_address_to_id_lookup_elements: relations::MemoryAddressToId::dummy(),
memory_id_to_big_lookup_elements: relations::MemoryIdToBig::dummy(),
opcodes_lookup_elements: relations::Opcodes::dummy(),
verify_instruction_lookup_elements: relations::VerifyInstruction::dummy(),
range_check_11_lookup_elements: relations::RangeCheck_11::dummy(),
},
claim.n_rows,
)
.entries(trace),
);
}
for claim in claim.opcodes.mul_small_imm.clone() {
entries.extend(
RelationTrackerComponent::new(
tree_span_provider,
mul_opcode_small_imm::Eval {
claim,
memory_address_to_id_lookup_elements: relations::MemoryAddressToId::dummy(),
memory_id_to_big_lookup_elements: relations::MemoryIdToBig::dummy(),
opcodes_lookup_elements: relations::Opcodes::dummy(),
verify_instruction_lookup_elements: relations::VerifyInstruction::dummy(),
range_check_11_lookup_elements: relations::RangeCheck_11::dummy(),
},
claim.n_rows,
)
.entries(trace),
);
}
for claim in claim.opcodes.ret.clone() {
entries.extend(
RelationTrackerComponent::new(
Expand Down
2 changes: 1 addition & 1 deletion stwo_cairo_prover/crates/prover/src/cairo_air/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ mod tests {
}
.instructions;

input_from_plain_casm(instructions, true)
input_from_plain_casm(instructions)
}

fn test_cfg() -> ProverConfig {
Expand Down
Loading

0 comments on commit 5d95adf

Please sign in to comment.