Skip to content
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

Merged
merged 19 commits into from
Feb 22, 2024
Merged

feat: iavl v1 #528

merged 19 commits into from
Feb 22, 2024

Conversation

czarcas7ic
Copy link
Member

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...

  • included the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

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...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@czarcas7ic czarcas7ic marked this pull request as draft February 20, 2024 03:06
store/wrapper/ics23.go Dismissed Show dismissed Hide dismissed
@@ -626,6 +626,7 @@ func (rs *Store) PruneStores(clearPruningManager bool, pruningHeights []int64) (
}

rs.logger.Debug("pruning store", "heights", pruningHeights)
pruneHeight := pruningHeights[len(pruningHeights)-1]
Copy link
Member Author

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:"
Copy link
Member Author

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
Comment on lines 45 to 48
- path: "crypto/keyring"
text: "G306:"
linters:
- gosec
Copy link
Member Author

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.

@@ -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())
Copy link
Member Author

@czarcas7ic czarcas7ic Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czarcas7ic czarcas7ic marked this pull request as ready for review February 20, 2024 21:01
@czarcas7ic czarcas7ic changed the base branch from osmo/v0.47.5 to adam/go-bump February 20, 2024 22:26
@czarcas7ic czarcas7ic changed the base branch from adam/go-bump to osmo/v0.47.5 February 20, 2024 22:26
Comment on lines +54 to +56
func (db *DBWrapper) NewBatchWithSize(size int) cdbm.Batch {
return NewCosmosBatch(db.db.NewBatch())
}
Copy link
Member

@ValarDragon ValarDragon Feb 21, 2024

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)

Copy link
Member Author

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

Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@czarcas7ic czarcas7ic merged commit f09bb25 into osmo/v0.47.5 Feb 22, 2024
8 of 16 checks passed
@czarcas7ic czarcas7ic deleted the adam/iavl-v1-final branch February 22, 2024 06:17
mergify bot pushed a commit that referenced this pull request Feb 22, 2024
* 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)
@mergify mergify bot mentioned this pull request Feb 22, 2024
mergify bot pushed a commit that referenced this pull request Feb 22, 2024
* 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)
@mergify mergify bot mentioned this pull request Feb 22, 2024
czarcas7ic added a commit that referenced this pull request Feb 22, 2024
* 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]>
czarcas7ic added a commit that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants