-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat: iavl v1 #528
feat: iavl v1 #528
Conversation
@@ -626,6 +626,7 @@ func (rs *Store) PruneStores(clearPruningManager bool, pruningHeights []int64) ( | |||
} | |||
|
|||
rs.logger.Debug("pruning store", "heights", pruningHeights) | |||
pruneHeight := pruningHeights[len(pruningHeights)-1] |
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.
This is making the assumption that the last index pruneHeight is the largest height.
.golangci.yml
Outdated
@@ -40,10 +39,13 @@ issues: | |||
- text: "ST1016:" | |||
linters: | |||
- stylecheck | |||
- path: "migrations" | |||
text: "SA1019:" | |||
- text: "SA1019:" |
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.
This was popping for a lot of the IAVL changes, I think b/c we are using a wrapper, so I silenced them here by removing the "migrations" path. Might be a little overkill but I was spending too much time fixing this linter
.golangci.yml
Outdated
- path: "crypto/keyring" | ||
text: "G306:" | ||
linters: | ||
- gosec |
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.
Some file has 0500 privileges and the lint was expecting 0600 or higher, seems unhelpful.
x/gov/simulation/operations_test.go
Outdated
@@ -152,7 +152,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { | |||
require.True(t, operationMsg.OK) | |||
require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Proposer) | |||
require.NotEqual(t, len(msg.InitialDeposit), 0) | |||
require.Equal(t, "560969stake", msg.InitialDeposit[0].String()) | |||
require.Equal(t, "47841094stake", msg.InitialDeposit[0].String()) |
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.
x/gov/simulation/operations_test.go
Outdated
@@ -182,7 +182,7 @@ func TestSimulateMsgSubmitLegacyProposal(t *testing.T) { | |||
require.True(t, operationMsg.OK) | |||
require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Proposer) | |||
require.NotEqual(t, len(msg.InitialDeposit), 0) | |||
require.Equal(t, "13430055stake", msg.InitialDeposit[0].String()) | |||
require.Equal(t, "25166256stake", msg.InitialDeposit[0].String()) |
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.
func (db *DBWrapper) NewBatchWithSize(size int) cdbm.Batch { | ||
return NewCosmosBatch(db.db.NewBatch()) | ||
} |
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.
This is the db.Grow bug, we need to do batch with size. We can merge this as-is and fix in a followup, but this is a real win for epoch. (Extra 7 seconds on IAVL v1)
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.
Will wait a little longer to see if they do a release by end of day
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.
LGTM
* final iavl v1 implementation * bump go1.19 to 1.20 * go mod tidy * inc golang in CI * codeQL * Revert "codeQL" This reverts commit 1b1366b. * try to inc version for linter * adds config * fix config path * Revert "fix config path" This reverts commit 6498b69. * Revert "adds config" This reverts commit ae6cd9c. * golang ci fixes * fix gov simulation * fix values * remove explicit config location call * remove unnecessary CI check * remove unnecessary go bumps (cherry picked from commit f09bb25)
* final iavl v1 implementation * bump go1.19 to 1.20 * go mod tidy * inc golang in CI * codeQL * Revert "codeQL" This reverts commit 1b1366b. * try to inc version for linter * adds config * fix config path * Revert "fix config path" This reverts commit 6498b69. * Revert "adds config" This reverts commit ae6cd9c. * golang ci fixes * fix gov simulation * fix values * remove explicit config location call * remove unnecessary CI check * remove unnecessary go bumps (cherry picked from commit f09bb25)
* final iavl v1 implementation * bump go1.19 to 1.20 * go mod tidy * inc golang in CI * codeQL * Revert "codeQL" This reverts commit 1b1366b. * try to inc version for linter * adds config * fix config path * Revert "fix config path" This reverts commit 6498b69. * Revert "adds config" This reverts commit ae6cd9c. * golang ci fixes * fix gov simulation * fix values * remove explicit config location call * remove unnecessary CI check * remove unnecessary go bumps (cherry picked from commit f09bb25) Co-authored-by: Adam Tucker <[email protected]>
This reverts commit f09bb25.
Description
Closes: #XXXX
IAVL v1 implementation.
After merge, create a v23 branch that is the same as the current v23 branch, but with this commit.
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...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers 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...