feat: update store module for new iavl#15568
Conversation
This comment has been minimized.
This comment has been minimized.
tac0turtle
left a comment
There was a problem hiding this comment.
before merging this we need an issue on how to do migrations
elias-orijtech
left a comment
There was a problem hiding this comment.
LGTM apart from nits.
|
build doesnt pass |
|
waiting to merge this until we have migrations tested as this merge would signify the adoption of this in the Eden release |
odeke-em
left a comment
There was a problem hiding this comment.
Thank you for this change @cool-develope, I've added my first round of review, please take a look.
| LazyLoadVersionForOverwriting(targetVersion int64) (int64, error) | ||
| LoadVersionForOverwriting(targetVersion int64) error | ||
| TraverseStateChanges(startVersion, endVersion int64, fn func(version int64, changeSet *iavl.ChangeSet) error) error | ||
| SaveChangeSet(changeSet *iavl.ChangeSet) (int64, error) |
There was a problem hiding this comment.
do we still need this api change?
There was a problem hiding this comment.
it can be useful when create the migrating tool of the archived node.
There was a problem hiding this comment.
since users can get this api from iavl lets remove it for now
There was a problem hiding this comment.
This comment is still unimplemented.
|
@tac0turtle , we need new tag of iavl |
|
this is unblocked and can use v1.0.0-beta.2 of iavl |
|
|
||
| // "restart" | ||
| ms = newMultiStoreWithMounts(db, pruningtypes.NewCustomPruningOptions(2, 11)) | ||
| ms.SetSnapshotInterval(3) |
There was a problem hiding this comment.
i think we should still keep this so we dont break pruning dependence on snapshot intervals
There was a problem hiding this comment.
for now, the snapshot interval doesn't affect the pruning strategy if we don't call HandleHeightSnapshot.
tac0turtle
left a comment
There was a problem hiding this comment.
Looks good. Been running this on juno for a week now
|
lets resolve the conflicts then we can merge this |
| - Remov `DeleteVersion`, `DeleteVersions`, `LazyLoadVersionForOverwriting` from `iavl` tree API. | ||
| - Add `DeleteVersionsTo` and `SaveChangeSet`, since it will keep versions sequentially like `fromVersion` to `toVersion`. | ||
| - Refactor the pruning manager to use `DeleteVersionsTo`. | ||
| - Remove `IAVLLazyLoading` option from baseapp. |
There was a problem hiding this comment.
This one should be in the main changelog ./CHANGELOG.md instead of under store/CHANGELOG.md
| LazyLoadVersionForOverwriting(targetVersion int64) (int64, error) | ||
| LoadVersionForOverwriting(targetVersion int64) error | ||
| TraverseStateChanges(startVersion, endVersion int64, fn func(version int64, changeSet *iavl.ChangeSet) error) error | ||
| SaveChangeSet(changeSet *iavl.ChangeSet) (int64, error) |
There was a problem hiding this comment.
This comment is still unimplemented.
| if err != nil { | ||
| return err | ||
| // Consider the snapshot height | ||
| pruneHeight := height - 1 - int64(m.opts.KeepRecent) // we should keep the current height at least |
There was a problem hiding this comment.
What if pruneHeight gets negative?
There was a problem hiding this comment.
this will be checked in PruneStores when pruning in rootmulti
| github.com/cosmos/cosmos-db v1.0.0 | ||
| github.com/cosmos/gogoproto v1.4.10 | ||
| github.com/cosmos/iavl v0.21.0 | ||
| github.com/cosmos/iavl v1.0.0-beta.1 |
|
Let's get @julienrbrt's suggestions in and we can merge. The conflicts should be trivial to resolve. |
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!to the type prefix if API or client breaking changeCHANGELOG.mdReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!in the type prefix if API or client breaking change