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

Prepare gaia alpha release for cosmoshub-4.6 upgrade #834

Closed
wants to merge 26 commits into from

Conversation

shahankhatch
Copy link
Contributor

@shahankhatch shahankhatch commented Apr 27, 2021

Closes #829

This branch is for the DEX and the upcoming Hub upgrade

Updates deps to Cosmos SDK v0.43-alpha1 and ibc-go v1.0.0-alpha1

@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #834 (0101175) into main (8bc3a8f) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##            main    #834      +/-   ##
========================================
- Coverage   0.41%   0.39%   -0.02%     
========================================
  Files          7       7              
  Lines        483     504      +21     
========================================
  Hits           2       2              
- Misses       480     501      +21     
  Partials       1       1              

@shahankhatch
Copy link
Contributor Author

shahankhatch commented Apr 27, 2021

I have two places in the code commented with // TODO: cosmoshub-4.6 where I'm not sure if the right API was used to update breaking changes.

Note that these breaking changes don't look like they were included in the SDK changelog.

Tobias Schwarz and others added 8 commits April 27, 2021 10:22
* Updates installation, join-mainnet and first start for service provider docs

* Modifies service providers doc

* Updates Service Providers remote access gaia

* Remove validator step from full-node setup

* Updates service provider guide rest api documentation

* Updates to go v1.16 on gaia v4.2.1

* Changes format on the join-mainnet guide

* Updates to go v1.16 and wording in the join-mainnet documentation

* Updates CLI commands

* Adds more descriptive CLI command output

* Adds more account cli details

* Adds index with links

* Remove transaction signing for now

* Adds sentence that default pruning is recommended for most setups

* Apply suggestions from code review

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* Use go1.15

* Remove relayer as word for http calls

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
* Changes version in reproducible-builds

* Updates reproducible build example
* Update gaia to go1.16
not intended for use
@@ -68,7 +68,9 @@ func loadKeydataFromFile(clientCtx client.Context, replacementrJSON string, genD

toReplaceValConsAddress, _ := val.GetConsAddr()

consPubKey, err := sdk.GetPubKeyFromBech32(sdk.Bech32PubKeyTypeConsPub, replacement.ConsensusPubkey)
// TODO: cosmoshub-4.6
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disable linter for use of deprecated api

@zmanian
Copy link
Member

zmanian commented May 9, 2021

Wouldn't this be gaia 5.0?

@colin-axner
Copy link
Contributor

colin-axner commented May 10, 2021

There's a regression in this branch when compared against v4.2.1. The --home flag doesn't work. It only partially applies the new home directory, so some files are placed in the right location and others are placed in .gaia. Came across this bug since relayers use this functionality in there scripts which break with this branch

Verified by installing this and v4.2.1 and running gaia init --home <different director>

Haven't looked into where the bug is exactly

Quickly looking at the diffs, looks like the issue should be in the SDK, but I was unable to reproduce using simd from v0.43.0-alpha1

@zmanian
Copy link
Member

zmanian commented May 10, 2021

@colin-axner I have a lead on the root cause for this bug. I ran into it too. It's missing changes in root.go. I'll try have a patch soon after i have get out of back to back calls.

@shahankhatch
Copy link
Contributor Author

Wouldn't this be gaia 5.0?

Thanks, good point. I'll apply this to the codebase.

This branch name is 4.6 for now to note the tentative upgrade month, and that the Cosmos Hub chain id won't be changing.

@zmanian
Copy link
Member

zmanian commented May 11, 2021

Here is a fix for the home flag issue.
#852

Puzanira and others added 2 commits May 11, 2021 04:50
* Removed unnecessary slash in the link
* Adds the necessary setup to the gaia viper root to handle the home flag and config.toml file correctly

* Add an environment variable prefix.
shahankhatch and others added 4 commits May 11, 2021 11:36
* Completing feegrant module integration

* Completing authz module integration and added vesting cli
* Adds the necessary setup to the gaia viper root to handle the home flag and config.toml file correctly

* Add an environment variable prefix.
@shahankhatch shahankhatch changed the title Update gaiad deps to Cosmos SDK v0.43-alpha1 and ibc-go v1.0.0-alpha1 Prepare gaia for alpha release May 11, 2021
@shahankhatch shahankhatch changed the title Prepare gaia for alpha release Prepare gaia alpha release for cosmoshub-4.6 upgrade May 11, 2021
@shahankhatch
Copy link
Contributor Author

Seems like non-deterministic sim is failing with

panic: type_url /cosmos.authz.v1beta1.Msg/GrantAuthorization has not been registered yet. Before calling RegisterService, you must register all interfaces by calling the `RegisterInterfaces` method on module.BasicManager. Each module should call `msgservice.RegisterMsgServiceDesc` inside its `RegisterInterfaces` method with the `_Msg_serviceDesc` generated by proto-gen [recovered]
	panic: type_url /cosmos.authz.v1beta1.Msg/GrantAuthorization has not been registered yet. Before calling RegisterService, you must register all interfaces by calling the `RegisterInterfaces` method on module.BasicManager. Each module should call `msgservice.RegisterMsgServiceDesc` inside its `RegisterInterfaces` method with the `_Msg_serviceDesc` generated by proto-gen

I will look into this.

@colin-axner
Copy link
Contributor

Seems like non-deterministic sim is failing with

panic: type_url /cosmos.authz.v1beta1.Msg/GrantAuthorization has not been registered yet. Before calling RegisterService, you must register all interfaces by calling the `RegisterInterfaces` method on module.BasicManager. Each module should call `msgservice.RegisterMsgServiceDesc` inside its `RegisterInterfaces` method with the `_Msg_serviceDesc` generated by proto-gen [recovered]
	panic: type_url /cosmos.authz.v1beta1.Msg/GrantAuthorization has not been registered yet. Before calling RegisterService, you must register all interfaces by calling the `RegisterInterfaces` method on module.BasicManager. Each module should call `msgservice.RegisterMsgServiceDesc` inside its `RegisterInterfaces` method with the `_Msg_serviceDesc` generated by proto-gen

I will look into this.

Maybe try bumping to beta1? I'd expect this to be an error in the SDK, but a lot has changed since their alpha1 release

@shahankhatch
Copy link
Contributor Author

Thanks @colin-axner I suspect it's because feegrant module wasn't included in sim setup within the gaia app. I added it so hopefully that'll do the trick.

@shahankhatch shahankhatch added sim and removed sim labels May 12, 2021
@shahankhatch shahankhatch added sim and removed sim labels May 12, 2021
@shahankhatch shahankhatch added sim and removed sim labels May 12, 2021
@shahankhatch
Copy link
Contributor Author

Apart from adding the code that was missing, I updated to sdk beta1 and ibc-go alpha2, and the sims seem to be running. Thanks @colin-axner for the suggestion!

app/app.go Outdated Show resolved Hide resolved
@colin-axner
Copy link
Contributor

The migrate command should be removed or updated. I'm in favor of updating it

I view the plan for this upgrade as the following:

  • Plan A - x/upgrade + upgrade migrations (probably via cosmovisor)
  • Plan B - validators use flag unsafe-skip-upgrades
  • Plan C - before Plan A, validators would have exported genesis. If > 1/3 validators accidentally get corrupt databases due to a failure in Plan A, Plan B may no longer be viable. In such a situation, the chain should restart via the exported genesis

My main concern is validators not doing a back up before upgrade migrations and upgrade migrations failing for some unforeseen reason . Does cosmovisor do backups before restarting? I think Plan C is super rare, but if Plan A and Plan B fail, it'd be a real mess to get the network back up

@shahankhatch
Copy link
Contributor Author

Closing this as the liquidity module has been merged into master through another branch #858

@colin-axner
Copy link
Contributor

this branch was unrelated to the liquidity module and was preparation for SDK v0.43. Is there a new branch that will be opened?

@tac0turtle tac0turtle deleted the hub/cosmoshub-4.6 branch October 5, 2021 14:07
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.

Create branch that imports closest SDK v0.43 branch/tag
5 participants