Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Parent data is_mod_extension witness store fix; constraint added.
Browse files Browse the repository at this point in the history
  • Loading branch information
miha-stopar committed Aug 2, 2023
1 parent 9fb4668 commit 9a76442
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions zkevm-circuits/src/mpt_circuit/extension_branch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl<F: Field> ExtensionBranchConfig<F> {
mod_node_hash_rlc[is_s.idx()],
false,
false,
parent_data[is_s.idx()].is_mod_extension,
extension_branch.is_mod_extension[is_s.idx()],
0.scalar(),
)?;
} else {
Expand All @@ -310,7 +310,7 @@ impl<F: Field> ExtensionBranchConfig<F> {
parent_data[is_s.idx()].rlc,
parent_data[is_s.idx()].is_root,
true,
parent_data[is_s.idx()].is_mod_extension,
extension_branch.is_mod_extension[is_s.idx()],
mod_node_hash_rlc[is_s.idx()],
)?;
}
Expand Down
2 changes: 1 addition & 1 deletion zkevm-circuits/src/mpt_circuit/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ impl<F: Field> DriftedGadget<F> {
ifx! {parent_data[true.idx()].is_placeholder.expr() + parent_data[false.idx()].is_placeholder.expr() => {
config.drifted_rlp_key = ListKeyGadget::construct(cb, drifted_item);
for is_s in [true, false] {
ifx! {parent_data[is_s.idx()].is_placeholder.expr() => {
ifx! {and::expr(&[parent_data[is_s.idx()].is_placeholder.expr(), not!(parent_data[is_s.idx()].is_mod_extension.expr())]) => {
// Check that the drifted leaf is unchanged and is stored at `drifted_index`.
// TODO(Brecht): Length can change so need to add RLP consistency checks?

Expand Down

0 comments on commit 9a76442

Please sign in to comment.