-
Notifications
You must be signed in to change notification settings - Fork 83
feat: Introduced Initializers to trace inspector #138
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
base: main
Are you sure you want to change the base?
Conversation
mattsse
left a comment
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, this looks great,
but after further evaluating this, we actually need this to be fallible.
the main use case for this is is so we can use new Inspectors that are not Clone that we need to reinitialize per tx, specifically:
but creating this one is fallible:
so we actually need the initalizer to also return a Result
and then the trace fn would also need to be fallible and we likely need a new error type for
-> Result<TraceOutput<E::HaltReason, E::Inspector>, E::Error>
or use either::Either<E::Error, Init::Error>
wdyt @klkvr
If I get you right;
|
yep, for example if initializer is |
Understood, this has been impl |
crates/evm/src/tracing.rs
Outdated
| <E as Evm>::Inspector, | ||
| <E as Evm>::Error, |
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.
| <E as Evm>::Inspector, | |
| <E as Evm>::Error, | |
| E::Inspector, | |
| E::Error, |
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.
I couldn't let this go. I needed to specify the associated type before I could proceed with compilation
Close #132
Solution
Introduced an
InspectorInitializerwhich can init both cloneable and non-cloneable inspectorsPR Checklist