-
Notifications
You must be signed in to change notification settings - Fork 487
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
[NIT-2689] Add custom native tracer for cargo stylus replay #2560
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :), some comments, most are just doubts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work!
callArgs := argsForMulticall(vm.CALL, stylusMulticall, nil, []byte{0}) | ||
evmCall := argsForMulticall(vm.CALL, evmMulticall, nil, []byte{0}) | ||
|
||
for _, testCase := range []struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for now - but after both this and stylus_EVM are merged, we might be able to re-use some testcases between the two
I created a PR on Cargo Stylus to port the JS tracer improvements and add an option to use the native tracer: OffchainLabs/cargo-stylus#84 I tested it with the test node, and the native tracer works as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments that can be done in a separate PR.
LGTM
// Copyright 2024, Offchain Labs, Inc. | ||
// For license information, see https://github.com/OffchainLabs/nitro/blob/master/LICENSE | ||
|
||
package stack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will fit very well in util/containers
Currently, Cargo Stylus Replay uses a special JS tracer, which is not supported by 3rd party providers. This tracer captures all executed HostIOs and their metadata. This PR adds an equivalent native tracer (
stylusTracer
) that makes it easier for 3rd party providers to expose it to their users.