-
Notifications
You must be signed in to change notification settings - Fork 954
EIP-7756 Trace updates #8006
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
EIP-7756 Trace updates #8006
Conversation
...ain/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/processor/TransactionTracer.java
Show resolved
Hide resolved
1470a95
to
338e491
Compare
This pr is stale because it has been open for 30 days with no activity. |
4a767bc
to
d656bdd
Compare
d656bdd
to
21d844a
Compare
This pr is stale because it has been open for 30 days with no activity. |
ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EvmToolCommand.java
Outdated
Show resolved
Hide resolved
if (eip3155strict) { | ||
sb.append("\"op\":").append(opcode).append(","); | ||
} else { | ||
sb.append("\"op\":\"").append(fastHexByte(opcode)).append("\","); |
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.
Correct me if I'm wrong but fastHexByte
is the same as "0x" + Integer.toHexString(opcode)
why not use JDK features?
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.
fastHexByte
only works on a single byte, and only does hex, and always keeps the leading zero, producing exactly two characters. The Integer alternative may do up to 4 character and does not keep the leading zero.
21d844a
to
a5e734c
Compare
@lu-pinto Ready for review. The defaults are to do 3155 tracing data, but I am needing the new EOF elements for fuzzing in the main branch. |
@@ -199,6 +199,13 @@ void setBytes(final String optionValue) { | |||
scope = INHERIT) | |||
final Boolean showJsonAlloc = false; | |||
|
|||
@Option( | |||
names = {"--eip-3155", "--trace.noeip-3155"}, |
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.
is --trace.noeip-3155
really required or intencional? Isn't it --trace.eip-3155
instead?
The negative version --no-trace.noeip-3155
looks kinda weird
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.
The negation is --noeip-3155
- will update code. There are wierd things going on with picocli and negation, but the end result is that --eip-3155
and --noeip3155
have the expected impact.
Yeah no probs with that, current version looks alright to me. Just made a small remark regarding the 2nd name of the flag |
Update tracing for EIP-7756 changes, mostly swapping hex format and numbers for opcode and gas members. Signed-off-by: Danno Ferrin <danno@numisight.com>
EIP-3155 and EIP-7756 call for "stateRoot" where we use "postHash". Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Change the defaults so EIP-7756 trace variations have to be explicitly enabled for now. Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
000f804
to
5251020
Compare
I see you updated it to:
But it doesn't feel very intuitive to me, I think you should have |
Whether it is a bug (as most people think) or a design choice (what PicoCLI calls it) "flag" type PicoCLI options need to have the value when not specified be the default value, and when specified be the parsed value. Because the default is true we need to specify the negation as the PicoCLI value. And once Fusaka ships I intend to flip the default, so keeping the API "--trace.eip-3155" to enable backwards compatibility mode is the goal. Try changing the option names yourself and watch the tests break. PicoCLI is bizarre in this sense. You can see it works itself out in the help text.
|
I would like to re-iterate this PR is needed for fuzz testing EOF in Fusaka. All the tests pass and the options are all exercised. To the best of my ability to tweak it, it appears the PicoCLI documentation is leading to an incorrect understanding of what their code actually does. |
Thanks! |
PR description
Update tracing for EIP-7756 changes, mostly swapping hex format and numbers for opcode and gas members.
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests