Skip to content

feat(l1): implement debug_traceCall RPC endpoint#6695

Draft
azteca1998 wants to merge 4 commits into
mainfrom
feat/debug-trace-call
Draft

feat(l1): implement debug_traceCall RPC endpoint#6695
azteca1998 wants to merge 4 commits into
mainfrom
feat/debug-trace-call

Conversation

@azteca1998
Copy link
Copy Markdown
Contributor

Summary

  • Adds debug_traceCall which traces an arbitrary call at a given block state without creating a transaction on-chain
  • Supports all existing tracers: callTracer, prestateTracer, opcodeTracer
  • Adds trace-call infrastructure at each layer (LEVM → Evm → Blockchain → RPC)
  • Accepts the same call object format as eth_call plus an optional trace config
  • Matches geth's debug_traceCall

Closes part of #6572

Test plan

  • debug_traceCall with callTracer returns nested call frames
  • debug_traceCall with prestateTracer returns pre/post state
  • debug_traceCall with opcodeTracer returns EIP-3155 step trace
  • Block identifier parameter works (latest, specific number, hash)
  • Default block (latest) works when block param omitted

Add debug_traceCall which traces an arbitrary call (GenericTransaction)
at a given block state without creating a transaction on-chain. Supports
all existing tracers: callTracer, prestateTracer, opcodeTracer.

Adds trace-call infrastructure at each layer:
- LEVM: trace_call_calls, trace_call_prestate, trace_call_opcodes
- Evm: wrapper methods for generic-tx tracing
- Blockchain: async trace_call_* methods with timeout support
- RPC: TraceCallRequest handler with geth-compatible param parsing

Part of #6572
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

⚠️ Known Issues — intentionally skipped tests

Source: docs/known_issues.md

Known Issues

Tests intentionally excluded from CI. Source of truth for the Known
Issues
section the L1 workflow appends to each ef-tests job summary
and posts as a sticky PR comment.

EF Tests — Stateless coverage narrowed to EIP-8025 optional-proofs

make -C tooling/ef_tests/blockchain test calls test-stateless-zkevm
instead of test-stateless. The zkevm@v0.3.3 fixtures are filled against
bal@v5.6.1, out of sync with current bal spec; the broad target trips ~549
fixtures. Re-broaden once the zkevm bundle is regenerated.

Why and resolution path

PR #6527 broadened
test-stateless to extract the entire for_amsterdam/ tree from the
zkevm bundle and run all of it under --features stateless; combined with
this branch's bal-devnet-7 semantics that scope produces ~549
GasUsedMismatch / ReceiptsRootMismatch /
BlockAccessListHashMismatch failures.

test-stateless-zkevm filters cargo to the eip8025_optional_proofs
suite, which still validates the stateless harness without the bal-version
mismatch.

Re-broaden by switching test: back to test-stateless in
tooling/ef_tests/blockchain/Makefile once the zkevm bundle is regenerated
against the current bal spec.

@github-actions github-actions Bot added the L1 Ethereum client label May 21, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Lines of code report

Total lines added: 419
Total lines removed: 0
Total lines changed: 419

Detailed view
+-------------------------------------------+-------+------+
| File                                      | Lines | Diff |
+-------------------------------------------+-------+------+
| ethrex/crates/blockchain/tracing.rs       | 288   | +47  |
+-------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/rpc.rs       | 1302  | +1   |
+-------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/tracing.rs   | 516   | +201 |
+-------------------------------------------+-------+------+
| ethrex/crates/vm/backends/levm/mod.rs     | 2492  | +44  |
+-------------------------------------------+-------+------+
| ethrex/crates/vm/backends/levm/tracing.rs | 406   | +77  |
+-------------------------------------------+-------+------+
| ethrex/crates/vm/tracing.rs               | 139   | +49  |
+-------------------------------------------+-------+------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant