diff --git a/geth-utils/gethutil/trace.go b/geth-utils/gethutil/trace.go index 53b4a481a73..8df082cbe27 100644 --- a/geth-utils/gethutil/trace.go +++ b/geth-utils/gethutil/trace.go @@ -224,7 +224,7 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { executionResults := make([]*ExecutionResult, len(config.Transactions)) for i, message := range messages { tracer := logger.NewStructLogger(config.LoggerConfig) - evm := vm.NewEVM(blockCtx, core.NewEVMTxContext(&message), stateDB, &chainConfig, vm.Config{Tracer: tracer, NoBaseFee: true}) + evm := vm.NewEVM(blockCtx, core.NewEVMTxContext(&message), stateDB, &chainConfig, vm.Config{Tracer: tracer}) result, err := core.ApplyMessage(evm, &message, new(core.GasPool).AddGas(message.GasLimit)) if err != nil { diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 4436626afe6..f41590366d5 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -169,7 +169,7 @@ impl Default for MockTransaction { max_priority_fee_per_gas: *MOCK_GASTIPCAP, max_fee_per_gas: *MOCK_GASFEECAP, chain_id: *MOCK_CHAIN_ID, - enable_skipping_invalid_tx: false, + enable_skipping_invalid_tx: true, } } } diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index d0188ba36fe..2e2d82889e1 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -675,16 +675,10 @@ impl ExecutionGadget for BeginTxGadget { call.is_persistent, )?; - let intrinsic_gas = select::value( - F::from(tx.is_create as u64), - F::from(GasCost::CREATION_TX.as_u64()), - F::from(GasCost::TX.as_u64()), - ) + F::from(tx.call_data_gas_cost) - + F::from(tx.access_list_gas_cost); - + let intrinsic_gas = if tx.invalid_tx { 0 } else { step.gas_cost.0 }; // Check gas_left is sufficient self.is_gas_not_enough - .assign(region, offset, F::from(tx.gas), intrinsic_gas)?; + .assign(region, offset, F::from(tx.gas), F::from(intrinsic_gas))?; // Transfer value from caller to callee, creating account if necessary. let (intrinsic_tx_value, intrinsic_gas_fee) = if !tx.invalid_tx { @@ -1188,7 +1182,7 @@ mod test { let to = MOCK_ACCOUNTS[0]; let from = MOCK_ACCOUNTS[1]; - let balance = gwei(1) + Word::from(10u64.pow(5)); + let balance = Word::from(1) + Word::from(10u64.pow(5)); let ctx = TestContext::<2, 2>::new( None, |accs| { diff --git a/zkevm-circuits/src/evm_circuit/execution/end_block.rs b/zkevm-circuits/src/evm_circuit/execution/end_block.rs index 768cf56867c..fc089b354ee 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_block.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_block.rs @@ -191,6 +191,6 @@ mod test { // EndBlocks at the end after the trace steps #[test] fn end_block_padding() { - test_circuit(50); + test_circuit(55); } }