-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add a debugger tool to check Kernel (user code) execution against StructLogs #697
base: develop
Are you sure you want to change the base?
Conversation
Ok(structlogs) | ||
} | ||
|
||
pub mod zerostructlog { |
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 think you should check @einar-polygon's pr for a different way of doing this
} | ||
|
||
// Gets the struct logs with the necessary logs for debugging. | ||
pub async fn get_structlog_for_debug<ProviderT, TransportT>( |
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.
You should probably rebase this and merge with @einar-polygon branch and PR #682. There structlogs retrieval is optimized to be one call per block.
@@ -81,6 +84,7 @@ struct Cli { | |||
pub(crate) async fn fetch_block_prover_inputs<ProviderT, TransportT>( |
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 conflict with the work in #682, so you probably need to rebase on top of that.
/// If true, returns the struct_logs along with the generation data. | ||
#[arg(long, help_heading = HELP_HEADING, default_value_t = false)] | ||
get_struct_logs: bool, |
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 think @einar-polygon has alternative cli option which will conflict with this one.
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.
Yes, Einar's PR definitely conflicts with this one, but I wanted to open the PR against develop
since the changes are unrelated to Einar's. I will rebase when his is ready, but I think merging now with his PR might create a lot of "noise" for reviewers, don't you think?
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.
Maybe you could make the PR against his branch (rebase on top), then merge to develop
after his PR is included there?
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.
P.S. In the cases like this with major conflicts, I usually start clean (from his branch), then I cherry pick my changes one by one on top.
This PR aims at handling #221 .
It adds a flag
--get-struct-logs
to get the transactionStructLogs
when fetching generation inputs. Then, during interpreter execution, if running in debugger mode andStructLog
s are available, it checks at each step the PC, opcode, gas, stack and possible errors against theStructLog
s.(Helped debug failing block 678.)