common, core, light: add block age into info logs #17718
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While catching up with the chain (you turned off your machine for a few days), it's generally annoying that you don't know where in the sync you are progress wise. Checking against a block explorer is of course an option, but it would be nice if the logs helped you a bit out.
This PR adds an
age
field to all the import logs (receipt, block, header) and also to the "loaded most recent" logs. This hopefully provides a bit more context as to how long a catch-up might take:Startup logs:
Import logs:
Note, this PR drops the
mgas
log field from imports. It's a cute statistic, but it's not really useful. Blocks are generally full, so there's not much surprise inmgas
. Also, themgas
is just theelapsed * mgasps
that we sill log so you can calculate it if you really must.