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

Remove IBC from the SDK #8735

Merged
merged 12 commits into from
Mar 4, 2021
Merged

Remove IBC from the SDK #8735

merged 12 commits into from
Mar 4, 2021

Conversation

colin-axner
Copy link
Contributor

@colin-axner colin-axner commented Mar 1, 2021

Description

The IBC module is being moved to cosmos/ibc-go

closes: #8501


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

@colin-axner colin-axner added S:blocked Status: Blocked x/ibc labels Mar 1, 2021
@colin-axner
Copy link
Contributor Author

I will leave the docs for now. Doesn't hurt to have documentation in multiple places

@@ -114,16 +114,6 @@ func (suite *KeeperTestSuite) TestNewCapability() {
suite.Require().Nil(cap)
}

func (suite *KeeperTestSuite) TestOriginalCapabilityKeeper() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AdityaSripal should I replace this test with something? If so, how?

Copy link
Member

Choose a reason for hiding this comment

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

Ahh this is testing the original capability keeper in simapp since that was holding a capability for transfer. Now that simapp no longer does that, we don't need this test.

I would remove it.

@@ -497,83 +436,6 @@ func (s *IntegrationTestSuite) testQueryIBCTx(txRes sdk.TxResponse, cmd *cobra.C
s.Require().Contains(errResp.Error, errMsg)
}

// TestLegacyRestErrMessages creates two IBC txs, one that fails, one that
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AmauryM how should I deal with these tests? Should I open an issue? Comment them out? Replace the IBC parts somehow?

Copy link
Contributor

Choose a reason for hiding this comment

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

afaik it's only one test. If you're okay to move this one test to the IBC repo, that'd be ideal. If not, then just create an issue and we'll figure out later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there are a couple tests, but I'll look into moving them to the IBC repo and report back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I managed to move these over to ibc-go but it involved some code duplication since we need to route the suite setup to the ibc-go simapp.

I guess we cannot bring these tests back to the SDK until the SDK supports a Msg type that doesn't support amino and one that doesn't support REST?

@colin-axner
Copy link
Contributor Author

someone will need to run proto swagger gen for me. It doesn't work on my machine for some reason

@colin-axner colin-axner mentioned this pull request Mar 3, 2021
9 tasks
Copy link
Member

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Looks good colin!

What's the strategy here? Is the idea that master will not import ibc-go? We're just going to have ibc-go imports into gaia?

@@ -64,17 +64,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/gov"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
transfer "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer"
Copy link
Member

Choose a reason for hiding this comment

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

Will we be adding these back from the ibc-go repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ibc-go has its own simapp now. The SDK team can decide if they would like simapp to import ibc-go (after we do a stable release), but I think it isn't worth it to deal with version dependencies

@@ -114,16 +114,6 @@ func (suite *KeeperTestSuite) TestNewCapability() {
suite.Require().Nil(cap)
}

func (suite *KeeperTestSuite) TestOriginalCapabilityKeeper() {
Copy link
Member

Choose a reason for hiding this comment

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

Ahh this is testing the original capability keeper in simapp since that was holding a capability for transfer. Now that simapp no longer does that, we don't need this test.

I would remove it.

@colin-axner
Copy link
Contributor Author

What's the strategy here? Is the idea that master will not import ibc-go? We're just going to have ibc-go imports into gaia?

Correct. At least in the short term (until we have releases with ibc-go).

It seems possible to me to have a go.mod circular dependency, but probably makes things more complex (I'm not entirely sure how this works). If the SDK wanted to integrate IBC into its existing modules then we may need to add ibc-go into the go.mod, but there are probably multiple solutions here, like giving each SDK module its own go.mod file

It seems unnecessary to introduce a circular go.mod dep just for tests

@colin-axner colin-axner removed the S:blocked Status: Blocked label Mar 4, 2021
@@ -482,7 +482,8 @@ func (suite *AnteTestSuite) TestAnteHandlerFees() {
{
"signer as enough funds, should pass",
func() {
accNums = []uint64{7}
accNums = []uint64{acc1.GetAccountNumber()}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think when I removed IBC registration from simapp, one less account was being created causing the account number to become 6 and not 7. I used the account associated with addr0 since that is the account being funded in this test

@colin-axner colin-axner marked this pull request as ready for review March 4, 2021 12:32
@colin-axner colin-axner requested a review from amaury1093 March 4, 2021 12:33
@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #8735 (ab27bc3) into master (eef8d4d) will decrease coverage by 2.04%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8735      +/-   ##
==========================================
- Coverage   61.39%   59.34%   -2.05%     
==========================================
  Files         672      563     -109     
  Lines       38404    31251    -7153     
==========================================
- Hits        23577    18545    -5032     
+ Misses      12342    10551    -1791     
+ Partials     2485     2155     -330     
Impacted Files Coverage Δ
crypto/keys/secp256r1/doc.go 60.00% <60.00%> (ø)
crypto/keys/internal/ecdsa/pubkey.go 69.56% <69.56%> (ø)
crypto/keys/internal/ecdsa/privkey.go 73.91% <73.91%> (ø)
crypto/keys/secp256r1/pubkey.go 76.92% <76.92%> (ø)
crypto/keys/secp256r1/privkey.go 80.00% <80.00%> (ø)
simapp/app.go 83.50% <100.00%> (-1.97%) ⬇️
x/auth/client/rest/encode.go 53.33% <0.00%> (-20.01%) ⬇️
x/auth/client/rest/query.go 28.15% <0.00%> (-10.68%) ⬇️
x/auth/client/rest/decode.go 41.93% <0.00%> (-9.68%) ⬇️
x/ibc/core/simulation/decoder.go
... and 41 more

@tac0turtle
Copy link
Member

Screenshot 2021-03-04 at 14 10 34

😎

@alessio alessio merged commit da064e1 into master Mar 4, 2021
@alessio alessio deleted the colin/remove-ibc branch March 4, 2021 13:11
@alessio
Copy link
Contributor

alessio commented Mar 5, 2021

Hey @colin-axner! Mind updating references in github.com/cosmos/gaia (main branch), please?

@colin-axner
Copy link
Contributor Author

Hey @colin-axner! Mind updating references in github.com/cosmos/gaia (main branch), please?

Yes. I presume you mean just for documentation? I cannot update the code until a release of the SDK includes IBC removed. It is my understanding that this is slated for v0.43.0 of the SDK

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.

Move x/ibc to it's own repository
5 participants