feat(l1): add noopTracer for debug_traceTransaction and debug_traceBlockByNumber#6657
feat(l1): add noopTracer for debug_traceTransaction and debug_traceBlockByNumber#6657ElFantasma wants to merge 5 commits into
Conversation
|
| EIP | Bucket | Count |
|---|---|---|
| EIP-7702 | set_code_txs |
24 |
| EIP-7702 | set_code_txs_2 |
15 |
| EIP-7702 | gas |
1 |
| EIP-8037 | state_gas_set_code |
17 |
| EIP-8037 | state_gas_pricing |
1 |
| EIP-8037 | state_gas_sstore |
1 |
| EIP-7928 | block_access_lists_eip7702 |
8 |
| EIP-7928 | block_access_lists |
1 |
| EIP-7778 | gas_accounting |
3 |
| EIP-7708 | transfer_logs |
1 |
| EIP-7976 | refunds |
1 |
| EIP-1344 | chainid (Amsterdam fork-transition fixture) |
1 |
| Total | 74 |
Re-enable once we either:
- (a) bump fixtures to a snobal-devnet-7 release that locks in the new
accounting; or - (b) revert the bal-devnet-7-prep subtraction for bal-devnet-6
compatibility.
Full test list (74)
EIP-7702 — for_amsterdam/prague/eip7702_set_code_tx/set_code_txs/
delegation_clearingdelegation_clearing_and_setdelegation_clearing_failing_txdelegation_clearing_tx_toeoa_tx_after_set_codeext_code_on_chain_delegating_set_codeext_code_on_self_delegating_set_codeext_code_on_self_set_codeext_code_on_set_codemany_delegationsnonce_overflow_after_first_authorizationnonce_validityreset_codeself_code_on_set_codeself_sponsored_set_codeset_code_multiple_valid_authorization_tuples_same_signer_increasing_nonceset_code_multiple_valid_authorization_tuples_same_signer_increasing_nonce_self_sponsoredset_code_to_logset_code_to_non_empty_storage_non_zero_nonceset_code_to_self_destructset_code_to_self_destructing_account_deployed_in_same_txset_code_to_sstoreset_code_to_sstore_then_sloadset_code_to_system_contract
EIP-7702 — for_amsterdam/prague/eip7702_set_code_tx/set_code_txs_2/
call_pointer_to_created_from_create_after_oog_call_againcall_to_precompile_in_pointer_contextcontract_storage_to_pointer_with_storagedelegation_replacement_call_previous_contractdouble_authpointer_measurementspointer_normalpointer_reentrypointer_resets_an_empty_code_account_with_storagepointer_revertspointer_to_pointerpointer_to_precompilepointer_to_staticpointer_to_static_reentrystatic_to_pointer
EIP-7702 — for_amsterdam/prague/eip7702_set_code_tx/gas/
account_warming
EIP-8037 — for_amsterdam/amsterdam/eip8037_state_creation_gas_cost_increase/state_gas_set_code/
auth_refund_block_gas_accountingauth_refund_bypasses_one_fifth_capauth_with_calldata_and_access_listauth_with_multiple_sstoresauthorization_exact_state_gas_boundaryauthorization_to_precompile_addressauthorization_with_sstoreduplicate_signer_authorizationsexisting_account_auth_header_gas_used_uses_worst_caseexisting_account_refundexisting_account_refund_enables_sstoreexisting_auth_with_reverted_execution_preserves_intrinsicmany_authorizations_state_gasmixed_auths_header_gas_used_uses_worst_casemixed_new_and_existing_authsmixed_valid_and_invalid_authsmulti_tx_block_auth_refund_and_sstore
EIP-8037 — state_gas_pricing/
auth_state_gas_scales_with_cpsb
EIP-8037 — state_gas_sstore/
sstore_state_gas_all_tx_types
EIP-7928 — for_amsterdam/amsterdam/eip7928_block_level_access_lists/block_access_lists_eip7702/
bal_7702_delegation_clearbal_7702_delegation_createbal_7702_delegation_updatebal_7702_double_auth_resetbal_7702_double_auth_swapbal_7702_null_address_delegation_no_code_changebal_selfdestruct_to_7702_delegationbal_withdrawal_to_7702_delegation
EIP-7928 — block_access_lists/
bal_all_transaction_types
EIP-7778 — for_amsterdam/amsterdam/eip7778_block_gas_accounting_without_refunds/gas_accounting/
multiple_refund_types_in_one_txsimple_gas_accountingvarying_calldata_costs
EIP-7708 — for_amsterdam/amsterdam/eip7708_eth_transfer_logs/transfer_logs/
transfer_with_all_tx_types
EIP-7976 — for_amsterdam/amsterdam/eip7976_increase_calldata_floor_cost/refunds/
gas_refunds_from_data_floor
EIP-1344 — for_amsterdam/istanbul/eip1344_chainid/chainid/
chainid(Amsterdam fork-transition fixture)
🤖 Kimi Code ReviewThe PR implements Minor observations:
Security/Performance:
Verdict: LGTM. The implementation correctly follows the established patterns for tracer integration and properly handles the async timeout requirements. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
Lines of code reportTotal lines added: Detailed view |
🤖 Claude Code ReviewNow I have all the context needed for a thorough review. Let me compile the findings. Review: feat(l1): add noopTracer for debug_traceTransaction and debug_traceBlockByNumberOverall AssessmentThe implementation is correct and closely mirrors the patterns established by CorrectnessState accumulation in Serde mapping — correct. Empty return value — correct. Error propagation — correct. Issues1. Missing explanatory comment on The analogous methods have comments that explain the
2. Asymmetric return type in The two existing block tracers return
3. let tx_hash = block.as_ref().body.transactions[index].hash();
Style / Minor
SummaryNo bugs, no security issues, no consensus risk. Two actionable suggestions: add the Automated review by Claude (Anthropic) · sonnet · custom prompt |
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — the noopTracer is a thin, read-only addition that runs transactions through the existing EVM harness without any state commits to storage or new data structures. The four changed files each follow the established pattern for existing tracers character for character. State management, timeout wrapping, Arc/Mutex usage, serde deserialization, and JSON output format are all consistent with the callTracer and prestateTracer implementations that are already in production. No edge cases in the new code paths deviate from the existing tracers. No files require special attention.
|
| Filename | Overview |
|---|---|
| crates/vm/backends/levm/tracing.rs | Adds LEVM::trace_tx_noop — runs the transaction with LevmCallTracer::disabled() and discards the result; mirrors trace_tx_prestate exactly but without the pre-snapshot capture and post-state build, which is correct for a noop tracer. |
| crates/vm/tracing.rs | Thin Evm::trace_tx_noop facade that delegates to LEVM::trace_tx_noop, consistent with the existing trace_tx_calls / trace_tx_prestate pattern. |
| crates/blockchain/tracing.rs | Adds trace_transaction_noop and trace_block_noop following the exact same Arc/Mutex/timeout pattern as the existing call and prestate tracers; state correctly accumulates across transactions in the block variant. |
| crates/networking/rpc/tracing.rs | Adds TracerType::NoopTracer variant (deserializes correctly from noopTracer via rename_all = camelCase) and wires it through both RPC handlers; response format ({} / [{txHash, result:{}}]) matches Geth's noopTracer output. |
Reviews (1): Last reviewed commit: "feat(l1): add noopTracer for debug_trace..." | Re-trigger Greptile
🤖 Codex Code ReviewNo blocking findings. Residual risk:
The implementation itself is aligned with the existing call/prestate tracing flow; I didn’t spot an obvious EVM/gas-accounting, consensus, or security regression in the noop path from source inspection. I couldn’t run Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
|
Follow-up commit
Skipped intentionally:
Also: kept |
Motivation
The
noopTraceris a standard Geth debug tracer that runs a transaction through the trace harness without recording any per-step data. It is mostly used for benchmarking trace-pipeline overhead and as a smoke test for the tracer dispatch machinery, and several downstream tools expect it to be available.Description
Adds
noopTraceras a thirdTracerTypealongsidecallTracerandprestateTracer, wired throughdebug_traceTransactionanddebug_traceBlockByNumber:LEVM::trace_tx_noopincrates/vm/backends/levm/tracing.rs— executes the tx withLevmCallTracer::disabled()(same disabled tracer already used bytrace_tx_prestate) and discards the result.Evm::trace_tx_noopincrates/vm/tracing.rs— thin façade.Blockchain::trace_transaction_noop/Blockchain::trace_block_noopincrates/blockchain/tracing.rs— rebuild parent state, replay earlier txs, run target tx(s) under the noop tracer with the usual timeout wrapping.TracerType::NoopTracervariant incrates/networking/rpc/tracing.rsplus arms in both handlers. Single-tx returns{}; block returns[{ txHash, result: {} }, …]using the existingBlockTraceComponentwrapper.No new types, no new files, no storage changes.
Closes #6645
How to Test
Checklist