Standardise log content in AbstractEngineNewPayload and AbstractEngineForkchoiceUpdated#8568
Conversation
ahamlat
left a comment
There was a problem hiding this comment.
I like the general suggestion, I asked few modifications in regard to what is scheduled for Fusaka.
| 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"); | ||
| "| %d blobs| %s base| %,10d (%5.1f%%) gas used| %01.3fs exec| %6.2f Mgas/s| %2d peers"); |
There was a problem hiding this comment.
With peerdas scheduled for Fusaka, blob count is expected to exceed 10, so we should stick with at least two-digit formatting to maintain consistent log output.
There was a problem hiding this comment.
The same for gas used, we want to support more gas limit starting from fusaka, we are discussing about 100 and 150 million gas limit in the next months. So we still need to have 11 characters for gas used (9 digits and two commas).
There was a problem hiding this comment.
I suggest to replace base with bfee, because base doesn't reflect the base fee and exec with time
There was a problem hiding this comment.
We can also replace gas used with gas to reduce more
There was a problem hiding this comment.
We can also replace
gas usedwithgasto reduce more
Replacing gas used with gas may cause ambiguity as in gas used vs gas limit. 🤔
There was a problem hiding this comment.
I suggest to replace
basewithbfee, becausebasedoesn't reflect the base fee andexecwithtime
The unit s is probably already indicative of time?
| final StringBuilder message = new StringBuilder(); | ||
| final int nbTransactions = block.getBody().getTransactions().size(); | ||
| message.append("Imported #%,d (%s)|%5d tx"); | ||
| message.append("Imported #%,d (%s)| %4d tx"); |
| } | ||
| if (block.getBody().getWithdrawals().isPresent()) { | ||
| message.append("|%3d ws"); | ||
| message.append("| %2d ws"); |
…eForkchoiceUpdated Signed-off-by: Wetitpig <winsto003@hotmail.com>
Signed-off-by: Wetitpig <winsto003@hotmail.com>
Signed-off-by: Wetitpig <winsto003@hotmail.com>
Signed-off-by: Wetitpig <winsto003@hotmail.com>
PR description
Further to PR #7961 the logs are now rather long (183 characters), requiring font size 9 to fit on one line within a Ubuntu console at its maximum size.
Moreover, the labels are now standardised to be appended instead of prepended to values, and block hash labels are standardised without the word
blockHashThis PR attempts to trim down log size.
Sample log lines:
Further trims would be most welcome.
Fork choice update block hashes are also listed in ascending order of finality (
head→safe→finalized)Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests