Skip to content

Simplify Solidity stack trace code #1290

@Wodann

Description

@Wodann

In #545 and #614 we ported the Hardhat stack trace generation logic, first verbatim, then with some changes to the memory management.

The code is still very hard to maintain due to:

  • concurrent code paths for immutable and mutable access
    • this should be avoidable as the stack trace is generated once and then never modified
  • multiple layers of conversion, from CallTraceArena to NestedTrace to SolidityStackTrace
    • ideally we simplify this to a direct conversion from CallTraceArena to SolidityStackTrace
  • the business logic operates by checking heuristics and returning if a match is found. This makes it very hard to create a high-level understanding of which heuristics are applied in which order and where to add new heuristics.

Definition of done
One or multiple design and implementation passes of refactors that address the above concerns

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions