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

post-upgrade with x/upgrade queries not working #7531

Merged
merged 13 commits into from
Oct 16, 2020
Merged

post-upgrade with x/upgrade queries not working #7531

merged 13 commits into from
Oct 16, 2020

Conversation

RiccardoM
Copy link
Contributor

@RiccardoM RiccardoM commented Oct 14, 2020

Description

Backport of #7415 for Cosmos v0.39.2.
Closes the already closed #7385

Note

There was no base branch to compare with for Cosmos v0.39.1, so I picked this one. Please let me know if I should change it.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

❗ No coverage uploaded for pull request base (launchpad/backports@59c6527). Click here to learn what that means.
The diff coverage is n/a.

@@                  Coverage Diff                   @@
##             launchpad/backports    #7531   +/-   ##
======================================================
  Coverage                       ?   50.26%           
======================================================
  Files                          ?      338           
  Lines                          ?    17560           
  Branches                       ?        0           
======================================================
  Hits                           ?     8827           
  Misses                         ?     7940           
  Partials                       ?      793           

@alexanderbez
Copy link
Contributor

okwme/v0.39.1-target doesn't seem right. @alessio do we not have a backport branch for 0.39?

@alessio alessio changed the base branch from okwme/v0.39.1-target to launchpad/backports October 14, 2020 13:10
@alessio alessio added this to the 0.39.2 - The Launchpad Series milestone Oct 14, 2020
@alessio
Copy link
Contributor

alessio commented Oct 14, 2020

Updated base branch accordingly. Please resolve the conflicts.
Stable Release Managers approval needed for this to be merged, thus CC'ing @ethanfrey and @clevinson. I'll review ASAP.

Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

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

Please update the changelog file.

@RiccardoM RiccardoM requested a review from alessio October 15, 2020 07:01
Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

lgtm.

I would downgrade go-amino back to the 0.15.x series unless there is a strong reason for this (and tests that it works)

go.mod Outdated Show resolved Hide resolved
// LoadStore returns an IAVL Store as a CommitKVStore setting its initialVersion
// to the one given. Internally, it will load the store's version (id) from the
// provided DB. An error is returned if the version fails to load.
func LoadStoreWithInitialVersion(db dbm.DB, id types.CommitID, lazyLoading bool, initialVersion uint64) (types.CommitKVStore, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a very nice function.

// been pruned, an error will be returned. Any mutable operations executed will
// result in a panic.
// been pruned, an empty immutable IAVL tree will be used.
// Any mutable operations executed will result in a panic.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why the behavior here needs to change? Ah, for the historical queries once the new, empty store is created.

CHANGELOG.md Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
go.mod Show resolved Hide resolved
@alessio
Copy link
Contributor

alessio commented Oct 15, 2020

@clevinson please review and provide approval

Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes. Happy to merge this from my side.

Copy link
Contributor

@clevinson clevinson left a comment

Choose a reason for hiding this comment

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

Few comment nits. otherwise lgtm.

store/types/store.go Outdated Show resolved Hide resolved
store/rootmulti/store_test.go Outdated Show resolved Hide resolved
@alessio alessio changed the title Upgrade fix post-upgrade with x/upgrade queries not working Oct 15, 2020
@alessio alessio merged commit 792c7bc into cosmos:launchpad/backports Oct 16, 2020
@amaury1093 amaury1093 mentioned this pull request Nov 13, 2020
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants