Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bus-mapping/src/circuit_input_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,13 @@ impl<P: JsonRpcClient> BuilderClient<P> {
eth_block: &EthBlock,
geth_traces: &[eth_types::GethExecTrace],
) -> Result<AccessSet, Error> {
let mut block_access_trace = Vec::new();
let mut block_access_trace = vec![Access {
step_index: None,
rw: RW::WRITE,
value: AccessValue::Account {
address: eth_block.author,
},
}];
for (tx_index, tx) in eth_block.transactions.iter().enumerate() {
let geth_trace = &geth_traces[tx_index];
let tx_access_trace = gen_state_access_trace(eth_block, tx, geth_trace)?;
Expand Down
32 changes: 18 additions & 14 deletions bus-mapping/src/evm/opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,20 +324,24 @@ pub fn gen_begin_tx_ops(state: &mut CircuitInputStateRef) -> Result<(), Error> {
},
)?;

if call.is_create() {
unimplemented!("Creation transaction is not yet implemented")
} else if state.is_precompiled(&call.address) {
unimplemented!("Call to precompiled is not yet implemented")
} else {
state.push_op(
RW::READ,
AccountOp {
address: call.address,
field: AccountField::CodeHash,
value: code_hash.to_word(),
value_prev: code_hash.to_word(),
},
);
match (call.is_create(), state.is_precompiled(&call.address)) {
(true, _) => {
// TODO: Implement creation transaction
}
(_, true) => {
// TODO: Implement calling to precompiled
}
_ => {
state.push_op(
RW::READ,
AccountOp {
address: call.address,
field: AccountField::CodeHash,
value: code_hash.to_word(),
value_prev: code_hash.to_word(),
},
);
}
}

for (field, value) in [
Expand Down