core/state/snapshot: add generation logs to storage too #22177
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.
Currently the snapshot generator only logs every 8 seconds while it's processing the account trie (possibly a regression, I surely know it logged for storage tries too at one time). The generator however does not log while it's crunching through a storage trie.
If the node is receiving blocks, this is fine, because every block interrupts the generator and will resume it afterwards, forcing a log anyway. However, if no blocks are arriving (e.g. benchmarking with networking disabled), the generator will not print anything until it gets done with a contract. With contracts weighting gigabytes on mainnet, that amounts to hours of potential "no log" scenarios, which is not a good UX.
This PR adds a log back so that the generator will log if it was crunching a storage trie for too long too.