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

Commit

Permalink
simplify word
Browse files Browse the repository at this point in the history
  • Loading branch information
ChihChengLiang committed Apr 9, 2024
1 parent 82e8d8f commit 9a45603
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions zkevm-circuits/src/state_circuit/constraint_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::{
use crate::{
evm_circuit::util::{math_gadget::generate_lagrange_base_polynomial, not},
table::{AccountFieldTag, MPTProofType},
util::{word, Expr},
util::{word::{self, WordExpr}, Expr},
};
use bus_mapping::operation::Target;
use eth_types::Field;
Expand Down Expand Up @@ -205,13 +205,10 @@ impl<F: Field> ConstraintBuilder<F> {
"non-first access reads don't change value (lo)",
q.is_read() * (q.rw_table.value.lo() - q.rw_table.value_prev.lo()),
);
cb.require_zero(
"initial value doesn't change in an access group (hi)",
q.initial_value.hi() - q.initial_value_prev().hi(),
);
cb.require_zero(
"initial value doesn't change in an access group (lo)",
q.initial_value.lo() - q.initial_value_prev().lo(),
cb.require_word_equal(
"initial value doesn't change in an access group",
q.initial_value.to_word(),
q.initial_value_prev(),
);
});
}
Expand Down

0 comments on commit 9a45603

Please sign in to comment.