Skip to content

Commit

Permalink
fix: execution shard initialization (#1576)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirhemo authored Sep 30, 2024
1 parent 7fc5975 commit 682942d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion crates/recursion/circuit-v2/src/machine/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,17 @@ where
* (SymbolicFelt::one() - contains_execution_shard),
);

// If this is the first execution shard, then we update the start execution shard.
// If this is the first execution shard, then we update the start execution shard
// and the `execution_shard` values.
compress_public_values.start_execution_shard = builder.eval(
current_public_values.start_execution_shard * is_first_execution_shard_seen
+ compress_public_values.start_execution_shard
* (SymbolicFelt::one() - is_first_execution_shard_seen),
);
execution_shard = builder.eval(
current_public_values.start_execution_shard * is_first_execution_shard_seen
+ execution_shard * (SymbolicFelt::one() - is_first_execution_shard_seen),
);

// If this is an execution shard, make the assertion that the value is consistent.
builder.assert_felt_eq(
Expand Down
2 changes: 0 additions & 2 deletions crates/recursion/circuit-v2/src/machine/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ where
let public_values: &PublicValues<Word<Felt<_>>, Felt<_>> =
shard_proof.public_values.as_slice().borrow();

let _shard = public_values.shard;

// If this is the first proof in the batch, initialize the variables.
if i == 0 {
// Shard.
Expand Down

0 comments on commit 682942d

Please sign in to comment.