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

Minimal v0.44 app, without deleting unupgraded packages #1029

Merged
merged 56 commits into from
Oct 27, 2021

Conversation

rhuairahrighairidh
Copy link
Member

@rhuairahrighairidh rhuairahrighairidh commented Oct 21, 2021

This PR simplifies the app and upgrades it to sdk v0.44.2.

The app can be run with make install then make start.

Previously I'd planned to delete all packages, then add them back in as they were upgraded. This would avoid having uncompilable code hanging out in the repo causing problems with go tooling (go test, go mod tidy, etc).
However, this means that PRs will have no diff against the old code, making reviews more difficult and removing PRs as a source of documentation.
An alternative is to not delete modules, but to "ignore" them by adding an empty go.mod file. This makes various go tools ignore their contents - go mod tidy, go test ./... all work.
A downside is vscode/gopls does not ignore the contents, and on my machine maxes out cpu. Best way I have of fixing this is locally renaming folders/files with a "_" prefix, to make go (and gopls) completely ignore them.
If we do want to delete all modules, we can use #1028

Main Changes

  • app/ has been upgraded
    • kava modules have been removed
    • other features have been removed and will be added back - upgrade module, export, antehandler, sim tests
  • new kava binary replaces kvd and kvcli
    • v44 chains now use a single binary combining the commands of the old binaries
      • should we follow this pattern at the expense of breaking some backwards compatibility?
    • some commands have been temporarily removed - ie migration
  • removed unused files
    • rest_test was never functional and will not be needed with the new grpc-gateway rest server
    • remove old unused genesis examples from contrib
  • non-upgraded modules have an empty go.mod added to make go mod ignore them
  • go.mod updated to go 1.16.
    • v0.44 of the sdk requires 1.15, and it looks like version of gaia (cosmos hub) on v0.44 will use go 1.17.
    • We could go straight to 1.17, but I though one back from the current version will allow a bit more compatibility for any validators slow to upgrade.

build time.  This is shown in the tendermint /status endpoint
Copy link
Member

@nddeluca nddeluca left a comment

Choose a reason for hiding this comment

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

PR lgtm, the only regression I noticed is we used to disable cobra sorting when creating the root command.

Copy link
Member

@nddeluca nddeluca left a comment

Choose a reason for hiding this comment

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

revisions look good

for i := range addresses {
coinsList[i] = coins
// NewFundedGenStateWithSameCoins creates a (auth and bank) genesis state populated with accounts from the given addresses and balance.
func NewFundedGenStateWithSameCoins(cdc codec.JSONCodec, balance sdk.Coins, addresses []sdk.AccAddress) app.GenesisState {
Copy link
Contributor

@DracoLi DracoLi Oct 26, 2021

Choose a reason for hiding this comment

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

should we move this to test_common? NewAuthGenState from test_common should do the same thing but is currently not returning the gen state for the bank module so its not giving the accounts any coins

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah that makes sense, moved in 18a2266

Copy link
Contributor

Choose a reason for hiding this comment

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

perfect, looks great!

@rhuairahrighairidh rhuairahrighairidh merged commit d31cd31 into upgrade-v44 Oct 27, 2021
@karzak karzak deleted the ro-add-back-modules branch November 5, 2021 03:27
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.

3 participants