-
Notifications
You must be signed in to change notification settings - Fork 1k
added trace logging in EVM interpreter loop #9561
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: rve/revm-instructions-bitwise
Are you sure you want to change the base?
Conversation
/cmd prdoc --audience runtime_dev --bump patch |
/cmd bench --runtime dev --pallet pallet_revive |
Command "bench --runtime dev --pallet pallet_revive" has started 🚀 See logs here |
…--pallet pallet_revive'
Command "bench --runtime dev --pallet pallet_revive" has finished ✅ See logs here Subweight results:
Command output:✅ Successful benchmarks of runtimes/pallets: |
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 - I guess this helps a lot when writing and debugging low level tests. Is subject to final review when the base goes into master
.
We need the run_plain function in #9414 in order to propagate the Edit: Maybe not and we can get around with error conversions. Ignore this comment for now. |
substrate/frame/revive/src/vm/evm.rs
Outdated
interpreter.bytecode.pc(), | ||
OpCode::new(interpreter.bytecode.opcode()) | ||
.map_or("INVALID".to_string(), |x| format!("{:?}", x.info())), | ||
interpreter.stack.top().map_or("None".to_string(), |x| format!("{:#x}", x)), |
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.
Thanks, looks good. Is there a way to print more than just the top of the stack? Many functions pop more than one argument. 5 values would be a good limit I 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.
Not without popping elements, then printing, and then pushing them back.
Review required! Latest push from author must always be reviewed |
All GitHub workflows were cancelled due to failure one of the required jobs. |
Why so many conditionals? You can just define the function twice. Once for std and once without. You can also move the action inside. Where the no-std version just calls the original |
Added trace logging for each instruction to evm::run function.
solves #9575