-
Notifications
You must be signed in to change notification settings - Fork 31
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
[R4R] fix state_sync #150
[R4R] fix state_sync #150
Conversation
fc532fd
to
c49ad65
Compare
store/statesync_helper.go
Outdated
names := make([]string, 0, len(kvStores)) | ||
nameToKey := make(map[string]sdk.StoreKey, len(kvStores)) | ||
for key, store := range cms.GetCommitKVStores() { | ||
for key, store := range helper.commitMS.GetCommitKVStores() { |
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.
why not use kvStores above
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.
my brain was dead
store/statesync_helper.go
Outdated
names := make([]string, 0, len(kvStores)) | ||
nameToKey := make(map[string]sdk.StoreKey, len(kvStores)) | ||
for key, store := range cms.GetCommitKVStores() { | ||
for key, store := range helper.commitMS.GetCommitKVStores() { |
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.
How about replacing helper.commitMS.GetCommitKVStores()
with kvStores
? Here you call helper.commitMS.GetCommitKVStores()
twice.
aa91c18
to
c530429
Compare
c530429
to
99f7fee
Compare
This fixes newly added store might broken statesync.
This fix makes state sync helper no longer cache mounted stores (as they may dynamically change according to upgrade) and load needed stores according to upgrade height.
cosmos build and unit test can pass
node manually test (state sync before and after upgrade) can pass