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

Commit

Permalink
rebase latest main and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamWuGit committed Jan 14, 2022
1 parent 515b084 commit 723912d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion bus-mapping/src/circuit_input_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,10 @@ impl<P: JsonRpcClient> BuilderClient<P> {
code_db,
eth_block,
self.constants.clone(),
BlockConstants::from_eth_block(&eth_block, &Word::from(self.constants.chain_id)),
BlockConstants::from_eth_block(
eth_block,
&Word::from(self.constants.chain_id),
),
);
for (tx_index, tx) in eth_block.transactions.iter().enumerate() {
let geth_trace = &geth_traces[tx_index];
Expand Down
5 changes: 1 addition & 4 deletions bus-mapping/src/external_tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ pub struct BlockConstants {

impl BlockConstants {
/// Generate a BlockConstants from an ethereum block, useful for testing.
pub fn from_eth_block<TX>(
block: &Block<TX>,
chain_id: &Word,
) -> Self {
pub fn from_eth_block<TX>(block: &Block<TX>, chain_id: &Word) -> Self {
Self {
hash: block.hash.unwrap(),
coinbase: block.author,
Expand Down
2 changes: 2 additions & 0 deletions integration-tests/tests/circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ mod test_evm_circuit {
let tx_table = [(); 4].map(|_| meta.advice_column());
let rw_table = [(); 8].map(|_| meta.advice_column());
let bytecode_table = [(); 4].map(|_| meta.advice_column());
let block_table = [(); 3].map(|_| meta.advice_column());
let randomness = meta.instance_column();

Self::Config {
Expand All @@ -198,6 +199,7 @@ mod test_evm_circuit {
tx_table,
rw_table,
bytecode_table,
block_table,
),
}
}
Expand Down
1 change: 1 addition & 0 deletions zkevm-circuits/src/evm_circuit/execution/begin_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ mod test {
]
.concat(),
bytecodes: vec![bytecode],
..Default::default()
};
assert_eq!(run_test_circuit_incomplete_fixed_table(block), Ok(()));
}
Expand Down
3 changes: 2 additions & 1 deletion zkevm-circuits/src/evm_circuit/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use crate::evm_circuit::{
param::STACK_CAPACITY,
step::ExecutionState,
table::{
AccountFieldTag, CallContextFieldTag, RwTableTag, TxContextFieldTag,BlockContextFieldTag
AccountFieldTag, BlockContextFieldTag, CallContextFieldTag, RwTableTag,
TxContextFieldTag,
},
util::RandomLinearCombination,
};
Expand Down

0 comments on commit 723912d

Please sign in to comment.