Open Xanewok opened 6 days ago
Latest commit: 86d601458eb2f8d6898a1fce4dd399f7364b82d8
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Part of https://github.com/NomicFoundation/edr/issues/246
While this is not immediately at the top of the module dependency chain, the logic was pretty self-contained (so easier to port and verify) and it was helpful for me to port the important trace data types as it helped me understand how the information flows and what's used and how.
The biggest change is that this exposes a single
observe
method that can be used in HH to digest the traces directly on the Rust side, rather than 3 separate methods, without marshalling the data over FFI when fetching the stack trace (and possibly in the future if we remove the minimal node/vm EthereumJS events).The companion branch is here https://github.com/NomicFoundation/hardhat/tree/refactor/port-vm-tracer; I still need to figure out how to streamline the process and at least prove that the PR works in a backwards-compatible fashion with Hardhat.
It might be helpful to see these files used when porting, when reviewing: