Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

First Joint: sdk 46 #39

Closed
wants to merge 14 commits into from
Closed

First Joint: sdk 46 #39

wants to merge 14 commits into from

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Sep 2, 2022

I'll use this branch to bump bcna to v46, mainly as a test/exploration.

....and it's done now.

The next step, which will be in a separate PR, will be the liquid staking module.

opinion: ibc-go v5.0.0 will be out soon, and it likely makes the most sense, to upgrade to 46+lsm. BCNA would be the first to do this, and it would enable the full feature set of quicksilver, while improving performance and making the code here generally easier to work with.

Huge thanks to:

  • cosmos-sdk team
  • ignite cli team
  • ibc-go team
  • iqlusion

@RaulBernal
Copy link
Member

Ok thanks by your support ;)

@faddat
Copy link
Contributor Author

faddat commented Sep 2, 2022

thanks for the state sync script that saved more hours of my life than I can even estimate.

@faddat faddat changed the title sdk-46 lsm and sdk 46 Sep 2, 2022
@faddat faddat changed the title lsm and sdk 46 sdk 46 Sep 2, 2022
@faddat
Copy link
Contributor Author

faddat commented Sep 2, 2022

This PR will remove starport's cmd folder shims, and leave the chain otherwise compatible with the nightly build of starport. Then we can do one that adds the lsm.

@tbruyelle
Copy link

Hi there, ignite-hq shouldn't be used any more, it's the previous org.

To get the latest ignite CLI, it's a little tricky for the moment : you can't go get github.com/ignite/cli@develop because of this v0.0.0-nighlty tag (this kind of tag is not compatible with go modules, it will be fixed later).

  • revert the changes ignite -> ignite-hq (in code and in go.mod)
  • run GOSUMDB=off go get -u github.com/ignite/[email protected] (for some reasons, this latest version is not present at sum.golang.org, so you need to disable that)
  • run go mod tidy, if there's no error, you're good.

@faddat
Copy link
Contributor Author

faddat commented Sep 2, 2022

thanks!

@faddat
Copy link
Contributor Author

faddat commented Sep 2, 2022

@tbruyelle what is

"GOSUMDB=off"

haven't seen this before.

@faddat faddat changed the title sdk 46 First Joint: sdk 46 Sep 2, 2022
@tbruyelle
Copy link

@tbruyelle what is

"GOSUMDB=off"

haven't seen this before.

That disables the checksum verification with sum.golang.org. For some reason, it doesn't work with our latest version (sum.golang.org returns a 404 not found). It might also be related to this v0.0.0-nightly tag.

CI is passing now 🎉

@robert-zaremba
Copy link

Where is the state sync script?

@RaulBernal
Copy link
Member

Where is the state sync script?

Do you mean this?
https://github.com/BitCannaGlobal/cosmos-statesync_client

"github.com/cosmos/cosmos-sdk/testutil/network"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/ignite/cli/ignite/pkg/cosmoscmd"
"github.com/jaekwon/testify/require"

Choose a reason for hiding this comment

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

Not sure if this was intended or not, but since this looks pretty abandoned I would perhaps suggest using github.com/stretchr/testify instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That came in with the updated ignite cli code.... let's see if the alternative works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my first inclination was to remove ignite altogether.

Choose a reason for hiding this comment

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

we removed Ignite CLI - was causing problems in CI.

Copy link
Member

Choose a reason for hiding this comment

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

we removed Ignite CLI - was causing problems in CI.
Before remove it:

  • How to reproduce the problems?
  • Should be fixed in github.com/ignite/cli v0.24.0

I have opened a new branch here
main...SDK-v0.46.1-&-IBC/go-v5-on-the-way

  • ICA integration fixed
  • IBC production version 5

Please fell free to collaborate there 🙏

@RaulBernal
Copy link
Member

@faddat we have just integrated the ICA in our main (production) branch, so this development should also contains it. Thanks 😊

go.mod Outdated
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/ignite/cli v0.23.0
github.com/ignite/cli v0.23.1-0.20220902151340-d0fd60f1d4ad
github.com/jaekwon/testify v1.6.1

Choose a reason for hiding this comment

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

Same here. I also see that github.com/stretchr/testify is already included, so probably not necessary with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the review!

I think that the ignite cli uses the jaekwon code. Both imports came in when updating the ignite cli, and I believe came from upstream.

@faddat
Copy link
Contributor Author

faddat commented Sep 12, 2022

@bjaanes thanks very much for the review! I've addressed your findings here, and that was quite helpful.

@faddat
Copy link
Contributor Author

faddat commented Sep 12, 2022

@robert-zaremba also on just about every cosmos chain of a certain age. Gaia def has it, I did significant refactors, but it is fundamentally from here.

@RaulBernal
Copy link
Member

Your code run smooth as I tested in a new dev-chain :D
Thanks for collaborating 👍

@RaulBernal
Copy link
Member

Question @faddat Should we bump Tendermint to v0.35.x? I think yes

@RaulBernal
Copy link
Member

@faddat I have compiled your code and works flawless :)

Migrations to ibc-go v4 and v5 appears to be trivial; look:
https://github.com/cosmos/ibc-go/tree/main/docs/migrations

@robert-zaremba
Copy link

Question faddat Should we bump Tendermint to v0.35.x? I think yes

No, tendermint v0.35 is retracted.

@robert-zaremba
Copy link

Re IBC v5: important decision is if you want to enable ICA and IBC fees.

@RaulBernal
Copy link
Member

RaulBernal commented Sep 29, 2022

Re IBC v5: important decision is if you want to enable ICA and IBC fees.

Full integration of ICA here. (and new stable production version IBC/go v5.0):
https://github.com/BitCannaGlobal/bcna/tree/SDK_046

also for you @faddat @bjaanes @tbruyelle
Controller code should be wired and disabled in a upgrade if not the it returns a panic when you query the controller params in example:

./gaiad-v7.0.3-linux-amd64 query interchain-accounts  controller params --node https://rpc-cosmoshub.goldenratiostaking.net:443
Error: rpc error: code = Unknown desc = panic message redacted to hide potentially sensitive system info: panic
Usage:
  gaiad query interchain-accounts controller params [flags]

Examples:
gaiad query interchain-accounts controller params

Or:

./bcnad query ica controller params --trace
Error: rpc error: code = Unknown desc = 
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Query.func1
	/Users/raul/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/abci.go:409
runtime.gopanic
	/usr/local/go/src/runtime/panic.go:838
runtime.panicwrap
	/usr/local/go/src/runtime/error.go:328
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/keeper.(*Keeper).Params
	<autogenerated>:1
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types._Query_Params_Handler
	/Users/raul/go/pkg/mod/github.com/cosmos/ibc-go/[email protected]/modules/apps/27-interchain-accounts/controller/types/query.pb.go:204
github.com/cosmos/cosmos-sdk/baseapp.(*GRPCQueryRouter).RegisterService.func1
	/Users/raul/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/grpcrouter.go:85
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).handleQueryGRPC
	/Users/raul/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/abci.go:577
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Query
	/Users/raul/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/abci.go:421
github.com/tendermint/tendermint/abci/client.(*localClient).QuerySync
	/Users/raul/go/pkg/mod/github.com/tendermint/[email protected]/abci/client/local_client.go:256
github.com/tendermint/tendermint/proxy.(*appConnQuery).QuerySync
	/Users/raul/go/pkg/mod/github.com/tendermint/[email protected]/proxy/app_conn.go:159
github.com/tendermint/tendermint/rpc/core.ABCIQuery
	/Users/raul/go/pkg/mod/github.com/tendermint/[email protected]/rpc/core/abci.go:20
reflect.Value.call
	/usr/local/go/src/reflect/value.go:556
reflect.Value.Call
	/usr/local/go/src/reflect/value.go:339
github.com/tendermint/tendermint/rpc/jsonrpc/server.makeJSONRPCHandler.func1
	/Users/raul/go/pkg/mod/github.com/tendermint/[email protected]/rpc/jsonrpc/server/http_json_handler.go:96
github.com/tendermint/tendermint/rpc/jsonrpc/server.handleInvalidJSONRPCPaths.func1
	/Users/raul/go/pkg/mod/github.com/tendermint/[email protected]/rpc/jsonrpc/server/http_json_handler.go:122
net/http.HandlerFunc.ServeHTTP
	/usr/local/go/src/net/http/server.go:2084
net/http.(*ServeMux).ServeHTTP
	/usr/local/go/src/net/http/server.go:2462
github.com/tendermint/tendermint/rpc/jsonrpc/server.maxBytesHandler.ServeHTTP
	/Users/raul/go/pkg/mod/github.com/tendermint/[email protected]/rpc/jsonrpc/server/http_server.go:238
github.com/tendermint/tendermint/rpc/jsonrpc/server.RecoverAndLogHandler.func1
	/Users/raul/go/pkg/mod/github.com/tendermint/[email protected]/rpc/jsonrpc/server/http_server.go:211
net/http.HandlerFunc.ServeHTTP
	/usr/local/go/src/net/http/server.go:2084
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2916
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1966
value method github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/keeper.Keeper.Params called using nil *Keeper pointer: panic
Usage:
  bcnad query interchain-accounts controller params [flags]

For this and for other issue the IBC Team relased the security version.

@RaulBernal
Copy link
Member

RaulBernal commented Sep 29, 2022

Definitely we decided to close this PR in favor to develop the branch https://github.com/BitCannaGlobal/bcna/tree/SDK_046
We hope to see your collaboration there.

@tbruyelle
Copy link

also for you @faddat @bjaanes @tbruyelle
Controller code should be wired and disabled in a upgrade if not the it returns a panic when you query the controller params in example:

Thanks for the report, I created an issue in CLI ignite/cli#2867.

Why do you say we need to disable it ?

@RaulBernal
Copy link
Member

also for you @faddat @bjaanes @tbruyelle
Controller code should be wired and disabled in a upgrade if not the it returns a panic when you query the controller params in example:

Thanks for the report, I created an issue in CLI ignite/cli#2867.

Why do you say we need to disable it ?

I'm curious too to know @robert-zaremba and @faddat commented it before

@faddat
Copy link
Contributor Author

faddat commented Nov 2, 2022

whole thing needs a refactor, will do soon....

@RaulBernal
Copy link
Member

whole thing needs a refactor, will do soon....

Certainly it needs because I refactored the branch v1.4.X & v1.5.X based in:

  • Your PRs
  • Paloma/Alek PRs
  • Ignite cosmoscmd removing doc
  • Gaiad & Cosmos SDK repos

I planed to do next week but maybe before if I can. Anyway you can work in https://github.com/BitCannaGlobal/bcna/tree/SDK_046

@robert-zaremba
Copy link

BTW, the ICA controller stack is going to be updated in IBC v6.
Enabling ICA controller is more complex because you need to implement account registration. I recommend to do it separately.

@robert-zaremba
Copy link

AS for Ignite CLI - we had problems with it in CI and eventually just removed it because nobody was using it.

@RaulBernal
Copy link
Member

BTW, the ICA controller stack is going to be updated in IBC v6. Enabling ICA controller is more complex because you need to implement account registration. I recommend to do it separately.

In our next upgrade (next monday) we will include the ICA stack (with controller = disabled) in the v0.45 branch. By the moment is not our business enable it.

Next upgrade will be v0.46 and IBC/5 or 6

Many thanks by your advice 🙏

@RaulBernal
Copy link
Member

AS for Ignite CLI - we had problems with it in CI and eventually just removed it because nobody was using it.

Attending your past comments and @faddat ones, we have removed cosmoscmd from our current branchs (v0.45) & (v0.46)

Thanks everyone by your support 👏 👏

v0.46 migration is at https://github.com/BitCannaGlobal/bcna/tree/SDK_046 branch :)

@RaulBernal RaulBernal closed this Nov 4, 2022
@tbruyelle
Copy link

tbruyelle commented Nov 4, 2022

@RaulBernal We removed cosmoscmd from Ignite CLI v0.25.0, here is the complete migration guide for existing chain : https://docs.ignite.com/migration/v0.25.0#removing-cosmoscmd

About the ICA controller bug you have raised, there's also a migration guide : https://docs.ignite.com/migration/v0.25.0#fix-ica-controller-keeper-wiring

AS for Ignite CLI - we had problems with it in CI and eventually just removed it because nobody was using it.

@robert-zaremba I'm pretty sure that you no longer have the problem with the latest version of CLI, we fixed a couple of dependencies issues. Anyway if you did the effort to remove the CLI dependency from your chain, there's no reason to re-add it :) I just try to clarify for readers.

@RaulBernal
Copy link
Member

@RaulBernal We removed cosmoscmd from Ignite CLI v0.25.0, here is the complete migration guide for existing chain : https://docs.ignite.com/migration/v0.25.0#removing-cosmoscmd

About the ICA controller bug you have raised, there's also a migration guide : https://docs.ignite.com/migration/v0.25.0#fix-ica-controller-keeper-wiring

AS for Ignite CLI - we had problems with it in CI and eventually just removed it because nobody was using it.

@robert-zaremba I'm pretty sure that you no longer have the problem with the latest version of CLI, we fixed a couple of dependencies issues. Anyway if you did the effort to remove the CLI dependency from your chain, there's no reason to re-add it :) I just try to clarify for readers.

Yeah I've participated in that doc with my testing :) really a pleasure work with you (I only get from ignite/cli the openapi package)

In next days I'm going to refactor again with all guides. We make COSMOS big with guides. I think I'm going to share a doc integrating the NFT feature in SDK v046 (and Ignite CLI)

@robert-zaremba
Copy link

Sure. Thanks for the note @tbruyelle .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants