Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracer bullet implementations of runtime observation #319

Open
6 tasks
Tracked by #246
fvictorio opened this issue Mar 7, 2024 · 0 comments
Open
6 tasks
Tracked by #246

Tracer bullet implementations of runtime observation #319

fvictorio opened this issue Mar 7, 2024 · 0 comments
Assignees

Comments

@fvictorio
Copy link
Member

fvictorio commented Mar 7, 2024

We have enough definition to implement some tracer bullets for the port of the runtime observation component of Hardhat.

We should start with the simplest possible stack trace test. After that, we should do a couple of other representative tests to further validate the way we are modelling and implementing this. And once we have this, we could make a first implementation of how this is consumed on the Hardhat side; that is, how a solidity trace returned by EDR is converted into a javascript Error object that is compatible with what we have now.

Tasks

  • Tracer bullet implementation of a console.log test.
    • This is the easiest way to check that we can run a simple test through our runtime observation component.
    • Any test under test-files/0_8/console-logs should do.
  • A simple revert test without message
    • This should add sourcemaps and basic trace building.
    • If we use test-files/0_8/revert-without-message/require-without-message/within-function/no-other-statements, then no error decoding is necessary.
  • A simple revert test with a message
    • This would mean adding error string decoding.
    • We can use test-files/0_8/call-message/no-calls/revert-with-message for this.
  • A simple revert with a panic code
    • This would add another kind of revert data encoding.
    • We can use test-files/0_8/panic-codes/division-by-zero for this.
  • A simple error inferring test
    • This would let us put in place the error inferring mechanism with a basic heuristic.
    • I'm not sure which one would be the easiest one. My guess is test-files/0_8/call-message/external-calls/non-contract-account-called
  • Implement a basic conversion of the Solidity error returned by EDR into a backwards-compatible JS error thrown by Hardhat.

Out of scope

  • Compiling the solidity test files is not necessary. This can be generated on the Hardhat side by running these tests once. Then the whole directory, including the artifacts, can be copied over to the EDR side.
@fvictorio fvictorio changed the title Tracer bullet implementation of runtime observation Tracer bullet implementations of runtime observation Mar 7, 2024
@fvictorio fvictorio added this to EDR Mar 7, 2024
@github-project-automation github-project-automation bot moved this to Unconfirmed in EDR Mar 7, 2024
@Wodann Wodann moved this from Unconfirmed to Todo in EDR Mar 15, 2024
@Wodann Wodann moved this from Todo to In Progress in EDR Mar 15, 2024
@fvictorio fvictorio moved this from In Progress to Todo in EDR May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants