[GH-ISSUE #2394] [Feature] Solidity: inspect recorded EVM opcode/call traces and attribute debugging locations #803

Open
opened 2026-10-15 18:28:36 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @matbrgz on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2394

Type: Feature Domain: Blockchain RE Status: Proposed Ecosystem: REA

Analyst question and current gap

Static selectors do not show which call, revert or source location ran. REA can add a recorded-debugging lane without starting a node, executing contracts or retrieving transactions.

Proposed outcome

  • Import explicitly selected local captures for separately admitted Geth struct/opcode-log and callTracer profiles; record capture digest, producer/version/configuration and available transaction/block/fork context.
  • Retain exact PCs, depth, call type, stack/memory/storage availability, return/revert payloads and code versus storage context when established.
  • Link known bytecode/source-map/ABI evidence without inventing identity from addresses or treating missing trace facets as empty state.
  • Expose bounded step/call selections and source-attributed observations through CLI/MCP. Record truncation and unverified capture claims.
  • Keep original recorded observations separate from any later replay-derived results; importing a trace performs no RPC, wallet action or contract execution.

Acceptance and verification

  • Owned local test contracts produce nested calls, delegatecall, reverts, logs and persistent/transient storage activity outside the import operation.
  • Real captured formats establish each advertised producer profile; synthetic JSON alone is insufficient.
  • Truncated captures, disabled memory/stack/storage, unknown code and wrong source-map associations preserve partial facets.
  • Large captures page/bound records and cancel without reading source URLs or launching a node.
  • Record one feature specification, one implementation plan and incremental tasks under docs/specs/solidity/recorded-traces/ before code.

Scope and relationships

Independently scoped follow-up to roadmap #972 and existing EVM interface PR #1051; parent TIOBE language tracker #2383. Initial analysis uses caller-selected local evidence and owned fixtures. New provider choices require the explicit CONTRIBUTING.md maintainer decision before substantial implementation for integration. Runtime acquisition, local execution and blockchain mutation are not implicit parts of this feature.

Primary references

Originally created by @matbrgz on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2394 [![Type: Feature](https://img.shields.io/badge/type-feature-blue.svg?style=flat-square)](https://github.com/morluto/rea) [![Domain: Blockchain RE](https://img.shields.io/badge/domain-blockchain_RE-orange.svg?style=flat-square)](https://github.com/morluto/rea) [![Status: Proposed](https://img.shields.io/badge/status-proposed-blue.svg?style=flat-square)](https://github.com/morluto/rea) [![Ecosystem: REA](https://img.shields.io/badge/ecosystem-morluto%2Frea-8A2BE2.svg?style=flat-square)](https://github.com/morluto/rea) ## Analyst question and current gap Static selectors do not show which call, revert or source location ran. REA can add a recorded-debugging lane without starting a node, executing contracts or retrieving transactions. ## Proposed outcome - Import explicitly selected local captures for separately admitted Geth struct/opcode-log and callTracer profiles; record capture digest, producer/version/configuration and available transaction/block/fork context. - Retain exact PCs, depth, call type, stack/memory/storage availability, return/revert payloads and code versus storage context when established. - Link known bytecode/source-map/ABI evidence without inventing identity from addresses or treating missing trace facets as empty state. - Expose bounded step/call selections and source-attributed observations through CLI/MCP. Record truncation and unverified capture claims. - Keep original recorded observations separate from any later replay-derived results; importing a trace performs no RPC, wallet action or contract execution. ## Acceptance and verification - [ ] Owned local test contracts produce nested calls, delegatecall, reverts, logs and persistent/transient storage activity outside the import operation. - [ ] Real captured formats establish each advertised producer profile; synthetic JSON alone is insufficient. - [ ] Truncated captures, disabled memory/stack/storage, unknown code and wrong source-map associations preserve partial facets. - [ ] Large captures page/bound records and cancel without reading source URLs or launching a node. - [ ] Record one feature specification, one implementation plan and incremental tasks under docs/specs/solidity/recorded-traces/ before code. ## Scope and relationships Independently scoped follow-up to roadmap #972 and existing EVM interface PR #1051; parent TIOBE language tracker #2383. Initial analysis uses caller-selected local evidence and owned fixtures. New provider choices require the explicit CONTRIBUTING.md maintainer decision before substantial implementation for integration. Runtime acquisition, local execution and blockchain mutation are not implicit parts of this feature. ## Primary references - [Geth built-in trace profiles](https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers)
Author
Owner

@matbrgz commented on GitHub (Oct 12, 2026):

Triage & Architectural Review Notes

Objective (ELI5):
Reconstruct recorded execution paths (EVM opcode execution traces and call tree frames) offline and map steps back to source coordinates.

Boundary Contract:

  • Consume standard debug traces (debug_traceTransaction / structLogs or Foundry/Anvil call traces).
  • Frame hierarchy must preserve child calls (DELEGATECALL, STATICCALL, CALL, CREATE2), gas consumption delta, and retained return/revert memory slices.
  • Trace step PC numbers must look up directly into the verified source mapping provider (#2390).
<!-- gh-comment-id:6133856021 --> @matbrgz commented on GitHub (Oct 12, 2026): ### Triage & Architectural Review Notes **Objective (ELI5):** Reconstruct recorded execution paths (EVM opcode execution traces and call tree frames) offline and map steps back to source coordinates. **Boundary Contract:** - Consume standard debug traces (`debug_traceTransaction` / `structLogs` or Foundry/Anvil call traces). - Frame hierarchy must preserve child calls (`DELEGATECALL`, `STATICCALL`, `CALL`, `CREATE2`), gas consumption delta, and retained return/revert memory slices. - Trace step PC numbers must look up directly into the verified source mapping provider (#2390).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#803
No description provided.