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

Commit

Permalink
Word::zero() used
Browse files Browse the repository at this point in the history
  • Loading branch information
miha-stopar committed Feb 1, 2024
1 parent cc98424 commit 711f774
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions zkevm-circuits/src/mpt_circuit/account_leaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ impl<F: Field> AccountLeafConfig<F> {
require!(config.main_data.is_below_account => false);

let mut key_rlc = vec![0.expr(); 2];
let mut nonce = vec![Word::<Expression<F>>::new([0.expr(), 0.expr()]); 2];
let mut balance = vec![Word::<Expression<F>>::new([0.expr(), 0.expr()]); 2];
let mut storage = vec![Word::<Expression<F>>::new([0.expr(), 0.expr()]); 2];
let mut codehash = vec![Word::<Expression<F>>::new([0.expr(), 0.expr()]); 2];
let mut nonce = vec![Word::zero(); 2];
let mut balance = vec![Word::zero(); 2];
let mut storage = vec![Word::zero(); 2];
let mut codehash = vec![Word::zero(); 2];
let mut leaf_no_key_rlc = vec![0.expr(); 2];
let mut leaf_no_key_rlc_mult = vec![0.expr(); 2];
let mut value_list_num_bytes = vec![0.expr(); 2];
Expand Down Expand Up @@ -471,7 +471,7 @@ impl<F: Field> AccountLeafConfig<F> {
&mut cb.base,
address.clone(),
proof_type.clone(),
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
config.main_data.new_root.expr(),
config.main_data.old_root.expr(),
Word::<Expression<F>>::new([new_value_lo, new_value_hi]),
Expand All @@ -485,11 +485,11 @@ impl<F: Field> AccountLeafConfig<F> {
&mut cb.base,
address.clone(),
proof_type.clone(),
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
config.main_data.new_root.expr(),
config.main_data.old_root.expr(),
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
Word::zero(),
);
}};
} elsex {
Expand All @@ -503,10 +503,10 @@ impl<F: Field> AccountLeafConfig<F> {
&mut cb.base,
address,
proof_type,
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
config.main_data.new_root.expr(),
config.main_data.old_root.expr(),
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
Word::<Expression<F>>::new([old_value_lo, old_value_hi]),
);
}};
Expand Down
12 changes: 6 additions & 6 deletions zkevm-circuits/src/mpt_circuit/storage_leaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl<F: Field> StorageLeafConfig<F> {
require!(config.main_data.is_below_account => true);

let mut key_rlc = vec![0.expr(); 2];
let mut value_word = vec![Word::<Expression<F>>::new([0.expr(), 0.expr()]); 2];
let mut value_word = vec![Word::zero(); 2];
let mut value_rlp_rlc = vec![0.expr(); 2];
let mut value_rlp_rlc_mult = vec![0.expr(); 2];

Expand Down Expand Up @@ -246,11 +246,11 @@ impl<F: Field> StorageLeafConfig<F> {
ParentData::store(
cb,
&mut ctx.memory[parent_memory(is_s)],
word::Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
0.expr(),
true.expr(),
false.expr(),
word::Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
);
}

Expand Down Expand Up @@ -377,8 +377,8 @@ impl<F: Field> StorageLeafConfig<F> {
address_item.word(),
config.main_data.new_root.expr(),
config.main_data.old_root.expr(),
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
Word:zero(),
);
}};
} elsex {
Expand All @@ -395,7 +395,7 @@ impl<F: Field> StorageLeafConfig<F> {
address_item.word(),
config.main_data.new_root.expr(),
config.main_data.old_root.expr(),
Word::<Expression<F>>::new([0.expr(), 0.expr()]),
Word::zero(),
value_word[true.idx()].clone(),
);
}};
Expand Down

0 comments on commit 711f774

Please sign in to comment.