-
Notifications
You must be signed in to change notification settings - Fork 867
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
Trigger OperationTracer
on contexts enter & exit
#5756
Trigger OperationTracer
on contexts enter & exit
#5756
Conversation
|
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/tracing/OperationTracer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
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 change needs tests. Either directly such as how ExtendedOperationTracerTest
tested the code or indirectly like how traceEndTransaction
is integrated into the testing of the T8nExecutor
.
If we are mimicing Geth's behavior on their tracer some of their samples should provide the skeleton for how to test it is working as intended.
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/processor/AbstractMessageProcessor.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
I was hoping for a test more like
With mocks-only testing I just don't feel it proves that it's not behaving in surprising ways. |
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
…niellehrner/besu into feat/issue-5728/trace-context-changes
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
@shemnon I added another test without mocks, based on EIP-3155. Could you please review again? |
* | ||
* @param frame the frame | ||
*/ | ||
default void traceContextExit(final MessageFrame frame) {} |
Check notice
Code scanning / CodeQL
Useless parameter
* | ||
* @param frame the frame | ||
*/ | ||
default void traceContextEnter(final MessageFrame frame) {} |
Check notice
Code scanning / CodeQL
Useless parameter
* Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * added a test without mocking Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fixed unit tests Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * added a test without mocking Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fixed unit tests Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * added a test without mocking Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fixed unit tests Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net> Signed-off-by: garyschulte <garyschulte@gmail.com>
* Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * added a test without mocking Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fixed unit tests Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * Trigger `OperationTracer` on contexts enter & exit Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Update CHANGELOG.md Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Spotless Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Daniel's comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Ensure `OperationTracer` is not null before calling it Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Move back hook calls into `process` Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * Fix @shemnon comments Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> * added test for context enter and context exit Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * added a test without mocking Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fixed unit tests Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu> Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
PR description
Extends the
OperationTracer
interface to be triggered on contexts enter & exit.@daniellehrner @shemnon
Fixed Issue(s)
Fixes #5728