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

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodino committed Jun 11, 2023
1 parent 0f76a4d commit 352e9be
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions zkevm-circuits/src/evm_circuit/execution/begin_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,32 @@ pub(crate) struct BeginTxGadget<F> {
tx_value: Word<F>,
tx_call_data_length: Cell<F>,
tx_call_data_gas_cost: Cell<F>,

tx_is_invalid: Cell<F>,
tx_access_list_gas_cost: Cell<F>,

// nonce
nonce: Cell<F>,
nonce_prev: Cell<F>,
is_nonce_valid: IsEqualGadget<F>,

// gas fee and tx value for invalid tx
effective_gas_fee: Word<F>,
effective_tx_value: Word<F>,

reversion_info: ReversionInfo<F>,

gas_not_enough: LtGadget<F, N_BYTES_GAS>,

transfer_with_gas_fee: TransferWithGasFeeGadget<F>,
phase2_code_hash: Cell<F>,
is_empty_code_hash: IsEqualGadget<F>,
caller_nonce_hash_bytes: [Cell<F>; N_BYTES_WORD],
create: ContractCreateGadget<F, false>,
callee_not_exists: IsZeroGadget<F>,
is_caller_callee_equal: Cell<F>,

// balance
}

impl<F: Field> ExecutionGadget<F> for BeginTxGadget<F> {
Expand Down Expand Up @@ -998,8 +1005,8 @@ mod test {

#[test]
fn begin_tx_enable_skipping_invalid_tx() {
begin_tx_invalid_nonce(true);
// begin_tx_not_enough_eth(true);
// begin_tx_invalid_nonce(true);
begin_tx_not_enough_eth(true);
// begin_tx_insufficient_gas(true);
}

Expand Down

0 comments on commit 352e9be

Please sign in to comment.