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

Commit 7f289f0

Browse files
fix build
1 parent 5683ec9 commit 7f289f0

16 files changed

+39
-35
lines changed

zkevm-circuits/src/evm_circuit/execution/begin_tx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::{
2727
},
2828
};
2929
use bus_mapping::state_db::CodeDB;
30-
use eth_types::{evm_types::PRECOMPILE_COUNT, keccak256, Field, ToWord, U256};
30+
use eth_types::{evm_types::PRECOMPILE_COUNT, keccak256, Field, OpsIdentity, ToWord, U256};
3131
use halo2_proofs::{
3232
circuit::Value,
3333
plonk::{Error, Expression},

zkevm-circuits/src/evm_circuit/execution/callop.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ use bus_mapping::{
3131
evm::OpcodeId,
3232
precompile::{is_precompiled, PrecompileCalls},
3333
};
34-
use eth_types::{evm_types::GAS_STIPEND_CALL_WITH_VALUE, Field, ToAddress, ToScalar, U256};
34+
use eth_types::{
35+
evm_types::GAS_STIPEND_CALL_WITH_VALUE, Field, OpsIdentity, ToAddress, ToScalar, U256,
36+
};
3537
use halo2_proofs::{circuit::Value, plonk::Error};
3638
use std::cmp::min;
3739

zkevm-circuits/src/evm_circuit/execution/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use bus_mapping::{
3434
};
3535
use eth_types::{
3636
evm_types::{GasCost, INIT_CODE_WORD_GAS},
37-
Field, ToBigEndian, ToScalar, ToWord, U256,
37+
Field, OpsIdentity, ToBigEndian, ToScalar, ToWord, U256,
3838
};
3939
use ethers_core::utils::keccak256;
4040
use gadgets::util::{and, select};

zkevm-circuits/src/evm_circuit/execution/end_block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::{
1414
table::{CallContextFieldTag, TxContextFieldTag},
1515
util::{word::Word, Expr},
1616
};
17-
use eth_types::Field;
17+
use eth_types::{Field, OpsIdentity};
1818
use gadgets::util::select;
1919
use halo2_proofs::{circuit::Value, plonk::Error};
2020

zkevm-circuits/src/evm_circuit/execution/error_precompile_failed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{
1717
witness::{Block, Call, ExecStep, Transaction},
1818
};
1919
use bus_mapping::evm::OpcodeId;
20-
use eth_types::{Field, U256};
20+
use eth_types::{Field, OpsIdentity, U256};
2121
use halo2_proofs::{circuit::Value, plonk::Error};
2222

2323
#[derive(Clone, Debug)]

zkevm-circuits/src/evm_circuit/execution/error_write_protection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::{
1616
Expr,
1717
},
1818
};
19-
use eth_types::{evm_types::OpcodeId, Field, ToAddress, U256};
19+
use eth_types::{evm_types::OpcodeId, Field, OpsIdentity, ToAddress, U256};
2020
use halo2_proofs::{circuit::Value, plonk::Error};
2121

2222
#[derive(Clone, Debug)]

zkevm-circuits/src/evm_circuit/execution/stop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::{
2121
},
2222
};
2323
use bus_mapping::evm::OpcodeId;
24-
use eth_types::Field;
24+
use eth_types::{Field, OpsIdentity};
2525
use halo2_proofs::{circuit::Value, plonk::Error};
2626

2727
#[derive(Clone, Debug)]

zkevm-circuits/src/evm_circuit/util/common_gadget.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ use crate::{
2828
witness::{Block, Call, ExecStep},
2929
};
3030
use bus_mapping::state_db::CodeDB;
31-
use eth_types::{evm_types::GasCost, Field, ToAddress, ToLittleEndian, ToScalar, ToWord, U256};
31+
use eth_types::{
32+
evm_types::GasCost, Field, OpsIdentity, ToAddress, ToLittleEndian, ToScalar, ToWord, U256,
33+
};
3234
use gadgets::util::{select, sum};
3335
use halo2_proofs::{
3436
circuit::Value,

zkevm-circuits/src/evm_circuit/util/constraint_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::{
1818
use bus_mapping::{
1919
circuit_input_builder::FeatureConfig, operation::Target, state_db::EMPTY_CODE_HASH_LE,
2020
};
21-
use eth_types::Field;
21+
use eth_types::{Field, OpsIdentity};
2222
use gadgets::util::{not, sum};
2323
use halo2_proofs::{
2424
circuit::Value,

zkevm-circuits/src/mpt_circuit/account_leaf.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use eth_types::{Field, U256};
1+
use eth_types::{Field, OpsIdentity, U256};
22
use gadgets::util::{pow, Scalar};
33
use halo2_proofs::{
44
circuit::Value,
@@ -554,10 +554,10 @@ impl<F: Field> AccountLeafConfig<F> {
554554

555555
// Key
556556
let mut key_rlc = vec![0.scalar(); 2];
557-
let mut nonce = vec![Word::zero_f(); 2];
558-
let mut balance = vec![Word::zero_f(); 2];
559-
let mut storage = vec![Word::zero_f(); 2];
560-
let mut codehash = vec![Word::zero_f(); 2];
557+
let mut nonce = vec![Word::zero(); 2];
558+
let mut balance = vec![Word::zero(); 2];
559+
let mut storage = vec![Word::zero(); 2];
560+
let mut codehash = vec![Word::zero(); 2];
561561
let mut key_data = vec![KeyDataWitness::default(); 2];
562562
let mut parent_data = vec![ParentDataWitness::default(); 2];
563563
for is_s in [true, false] {
@@ -727,11 +727,11 @@ impl<F: Field> AccountLeafConfig<F> {
727727
} else if is_codehash_mod {
728728
(MPTProofType::CodeHashChanged, codehash)
729729
} else if is_account_delete_mod {
730-
(MPTProofType::AccountDestructed, vec![Word::zero_f(); 2])
730+
(MPTProofType::AccountDestructed, vec![Word::zero(); 2])
731731
} else if is_non_existing_proof {
732-
(MPTProofType::AccountDoesNotExist, vec![Word::zero_f(); 2])
732+
(MPTProofType::AccountDoesNotExist, vec![Word::zero(); 2])
733733
} else {
734-
(MPTProofType::Disabled, vec![Word::zero_f(); 2])
734+
(MPTProofType::Disabled, vec![Word::zero(); 2])
735735
};
736736

737737
if account.is_mod_extension[0] || account.is_mod_extension[1] {
@@ -746,10 +746,10 @@ impl<F: Field> AccountLeafConfig<F> {
746746
let mut new_value = value[false.idx()];
747747
let mut old_value = value[true.idx()];
748748
if parent_data[false.idx()].is_placeholder {
749-
new_value = word::Word::zero_f();
749+
new_value = word::Word::zero();
750750
} else if is_non_existing_proof {
751-
new_value = word::Word::zero_f();
752-
old_value = word::Word::zero_f();
751+
new_value = word::Word::zero();
752+
old_value = word::Word::zero();
753753
}
754754
mpt_config.mpt_table.assign_cached(
755755
region,
@@ -758,7 +758,7 @@ impl<F: Field> AccountLeafConfig<F> {
758758
address: Value::known(from_bytes::value(
759759
&account.address.iter().cloned().rev().collect::<Vec<_>>(),
760760
)),
761-
storage_key: word::Word::zero_f().into_value(),
761+
storage_key: word::Word::zero().into_value(),
762762
proof_type: Value::known(proof_type.scalar()),
763763
new_root: main_data.new_root.into_value(),
764764
old_root: main_data.old_root.into_value(),

0 commit comments

Comments
 (0)