Add a debugger tool to check Kernel (user code) execution against StructLogs #697
Add a debugger tool to check Kernel (user code) execution against StructLogs #697LindaGuiga wants to merge 22 commits intodevelopfrom
Conversation
| Ok(structlogs) | ||
| } | ||
|
|
||
| pub mod zerostructlog { |
There was a problem hiding this comment.
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.
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.
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.
I think @einar-polygon has alternative cli option which will conflict with this one.
There was a problem hiding this comment.
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.
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.
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-logsto get the transactionStructLogswhen fetching generation inputs. Then, during interpreter execution, if running in debugger mode andStructLogs are available, it checks at each step the PC, opcode, gas, stack and possible errors against theStructLogs.(Helped debug failing block 678.)