Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/ratan/constrain-entrypoint' into…
Browse files Browse the repository at this point in the history
… ratan/zellic-audit-changes
  • Loading branch information
ratankaliani committed Mar 3, 2024
2 parents 2994586 + 1800e7c commit a6f31dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion circuits/skip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ impl<L: PlonkParameters<D>, const D: usize> TendermintSkipCircuit<L, D> for Circ
input_stream,
SkipOffchainInputs::<MAX_VALIDATOR_SET_SIZE> {},
);
let skip_variable = output_stream.read::<VerifySkipVariable<MAX_VALIDATOR_SET_SIZE>>(self);
let mut skip_variable =
output_stream.read::<VerifySkipVariable<MAX_VALIDATOR_SET_SIZE>>(self);
skip_variable.trusted_block = trusted_block;
skip_variable.trusted_header = trusted_header_hash;
skip_variable.target_block = target_block;

let target_header = skip_variable.target_header;

Expand Down
7 changes: 6 additions & 1 deletion circuits/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ impl<L: PlonkParameters<D>, const D: usize> TendermintStepCircuit<L, D> for Circ
input_stream,
StepOffchainInputs::<MAX_VALIDATOR_SET_SIZE> {},
);
let step_variable = output_stream.read::<VerifyStepVariable<MAX_VALIDATOR_SET_SIZE>>(self);
let mut step_variable =
output_stream.read::<VerifyStepVariable<MAX_VALIDATOR_SET_SIZE>>(self);
step_variable.prev_header = prev_header_hash;
let one = self.one();
let next_block = self.add(prev_block_number, one);
step_variable.next_block = next_block;

let next_header = step_variable.next_header;

Expand Down

0 comments on commit a6f31dd

Please sign in to comment.