-
Notifications
You must be signed in to change notification settings - Fork 860
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
Improve newPayload and FCU logs #7961
Conversation
c160af3
to
09cb8da
Compare
message.append(" / %d blobs / base fee %s / %,d (%01.1f%%) gas / (%s) in %01.3fs. Peers: %d"); | ||
double mgasPerSec = (timeInS != 0) ? block.getHeader().getGasUsed() / (timeInS * 1_000_000) : 0; | ||
message.append( | ||
"|%2d blobs|base fee %s|gas used %,11d (%5.1f%%)|exec time %01.3fs|mgas/s %6.2f"); |
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.
There's inconsistent spaces/no spaces between the pipes, I'd say with spaces are easier to read.
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 inconsistencies related to space come from the padding mecanism, which depends on the represented data. I can add a space for cases that don't start with a number.
.../hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java
Outdated
Show resolved
Hide resolved
.../hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java
Outdated
Show resolved
Hide resolved
.../hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java
Show resolved
Hide resolved
.../hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java
Outdated
Show resolved
Hide resolved
forkChoice.getHeadBlockHash(), | ||
forkChoice.getFinalizedBlockHash(), | ||
forkChoice.getSafeBlockHash()); | ||
AbstractEngineNewPayload.shortenString(forkChoice.getHeadBlockHash().toHexString()), |
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.
same comment about making etherscan debugging more difficult, less important for FCU though I think since can cross ref with Imported log
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 same as for newPayload call.
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
* Upgrade to Promethus java client 1.x and adapt the code to the new version Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * Update CHANGELOG.md Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> --------- Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
…7953) Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
…erledger#7956) * fix TransactionLocation in DefaultBlockchain unsafeImportBlock() and make some readability improvements Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
* fast sync log warnings for deprecation Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> * minor text change in changelog Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: daniellehrner <daniel.lehrner@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
…sonrpc/internal/methods/engine/AbstractEngineNewPayload.java Co-authored-by: Simon Dudley <simon.dudley@consensys.net> Signed-off-by: ahamlat <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
4d06966
to
01cf738
Compare
.../hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java
Outdated
Show resolved
Hide resolved
public void setIsProcessedInParallel(final Optional<Boolean> isProcessedInParallel) { | ||
this.isProcessedInParallel = isProcessedInParallel; | ||
} |
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.
can we avoid to make this class mutable?
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 issue is that currently, when a transaction executes, it doesn't know itself if it si being executed in parallel or not, so the instance of TransactionProcessingResult is not aware if it was parallel or not. This information is only accessible later on. that's why we need to make the result mutable at this level only.
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.
ok I see, fine for me, but maybe this is a sign that some refactor is needed, to postponed the creation of the result, of the data should be kept elsewhere
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
datatypes/src/main/java/org/hyperledger/besu/datatypes/Hash.java
Outdated
Show resolved
Hide resolved
public void setIsProcessedInParallel(final Optional<Boolean> isProcessedInParallel) { | ||
this.isProcessedInParallel = isProcessedInParallel; | ||
} |
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.
ok I see, fine for me, but maybe this is a sign that some refactor is needed, to postponed the creation of the result, of the data should be kept elsewhere
…ilar methods Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
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
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
* Change the output log on newPayload and FCU executions Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Simon Dudley <simon.dudley@consensys.net> Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
PR description
This PR improves the default output for newPayload and FCU calls within the Engine API. The goal is to provide a matrix-like output format, making it easier to identify and analyze the relevant information at a glance. Also, we’ve included new log details, such as mgas/s and the percentage of parallelized transactions, which are displayed when
Xbonsai-parallel-tx-processing-enabled
is active.The default output before this PR
With this PR (we can notice that each part of the log is padded to avoid having differences between the lines)
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