chore(cosmos): state-sync improvements #8975
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.
refs: #8888
Description
Adds simple logging to know when we're starting each step of the state-sync restore.
A test of the upcoming upgrade-14 on mainfork took almost 3 hours to restore, which is a big regression (approx 50%) from earlier versions, and the lack of logging makes it hard to pin-point where this regressions is.
This is not a fix for 8888, only some surface logging that could be easily added without enabling the more verbose option that would spamming stdout.
This also syncs up the commands that are in upstream
cosmos-sdk/simapp/simd/cmd/root.go
, in particular the newsnapshot
command which allows to manage the local snapshot DB and perform all snapshot operations triggered by the command line! See cosmos/cosmos-sdk#16067Security Considerations
None
Scaling Considerations
None
Documentation Considerations
None
Testing Considerations
Manually tested that snapshots list / dump / load works as expected
snapshots export
does not work because the way our extension integrates with the snapshot mechanism is not compatible (will file an issue)I did manage to verify
snapshots restore
works, with some necessary shenanigans due to discrepancy between tendermint and cosmos heights.Upgrade Considerations
Would like to include in upgrade-14