-
Notifications
You must be signed in to change notification settings - Fork 642
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
Move channel back to counterparty #7842
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e1167c9
add back client registerCounterparty
AdityaSripal 09eacf4
change channel to id in packet
AdityaSripal 70d5872
fix tests
AdityaSripal f2bf1ed
split messaging key to prefix and clientId
AdityaSripal 180e5f1
change eureka packet handlers to no longer rely on channel
AdityaSripal 480ba8e
naming suggestions
AdityaSripal 63bed6b
fix test file
AdityaSripal 249c170
start to fix tests
AdityaSripal be89aaf
fix v2/keeper tests
AdityaSripal b632f4c
fix tests
AdityaSripal 0ba8de7
DELETE channel from v2
AdityaSripal a5aa5ff
rm commented code
AdityaSripal adcb847
move nextSeqSend to a better place
AdityaSripal 25b8bb6
remove resolveV2Identifiers for now
AdityaSripal a0eb482
lint
AdityaSripal b0c1f22
lint
AdityaSripal b759f29
review suggestions
AdityaSripal 09a4ac8
Update cli.go
AdityaSripal 7151c12
Merge branch 'feat/ibc-eureka' into aditya/back-to-counterparty
AdityaSripal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,20 +265,20 @@ func (suite *KeeperTestSuite) TestMsgRecvPacketTransfer() { | |
nil, | ||
}, | ||
{ | ||
"failure: invalid destination channel on received packet", | ||
"failure: invalid destination client on received packet", | ||
func() {}, | ||
func() { | ||
packet.DestinationChannel = ibctesting.InvalidID | ||
packet.DestinationClient = ibctesting.InvalidID | ||
}, | ||
channeltypesv2.ErrChannelNotFound, | ||
clienttypes.ErrCounterpartyNotFound, | ||
}, | ||
{ | ||
"failure: counter party channel does not match source channel", | ||
"failure: counter party client does not match source client", | ||
func() {}, | ||
func() { | ||
packet.SourceChannel = ibctesting.InvalidID | ||
packet.SourceClient = ibctesting.InvalidID | ||
}, | ||
channeltypes.ErrInvalidChannelIdentifier, | ||
clienttypes.ErrInvalidCounterparty, | ||
}, | ||
{ | ||
"failure: receive is disabled", | ||
|
@@ -335,15 +335,15 @@ func (suite *KeeperTestSuite) TestMsgRecvPacketTransfer() { | |
if expPass { | ||
suite.Require().NoError(err) | ||
|
||
actualAckHash := suite.chainB.GetSimApp().IBCKeeper.ChannelKeeperV2.GetPacketAcknowledgement(suite.chainB.GetContext(), packet.DestinationChannel, packet.Sequence) | ||
actualAckHash := suite.chainB.GetSimApp().IBCKeeper.ChannelKeeperV2.GetPacketAcknowledgement(suite.chainB.GetContext(), packet.DestinationClient, packet.Sequence) | ||
expectedHash := channeltypesv2.CommitAcknowledgement(expectedAck) | ||
|
||
suite.Require().Equal(expectedHash, actualAckHash) | ||
|
||
denom := transfertypes.Denom{ | ||
Base: sdk.DefaultBondDenom, | ||
Trace: []transfertypes.Hop{ | ||
transfertypes.NewHop(sendPayload.DestinationPort, packet.DestinationChannel), | ||
transfertypes.NewHop(sendPayload.DestinationPort, packet.DestinationClient), | ||
}, | ||
} | ||
|
||
|
@@ -593,7 +593,7 @@ func (suite *KeeperTestSuite) TestV2RetainsFungibility() { | |
denomBtoC := transfertypes.Denom{ | ||
Base: sdk.DefaultBondDenom, | ||
Trace: []transfertypes.Hop{ | ||
transfertypes.NewHop(transfertypes.ModuleName, pathv2.EndpointB.ChannelID), | ||
transfertypes.NewHop(transfertypes.ModuleName, pathv2.EndpointB.ClientID), | ||
transfertypes.NewHop(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), | ||
Comment on lines
+596
to
597
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First hop used IBC Classic, second hop used IBC Eureka |
||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package types | ||
|
||
// NewCounterpartyInfo creates a new counterparty info instance from merlePrefix and clientID | ||
func NewCounterpartyInfo(merklePrefix [][]byte, clientID string) CounterpartyInfo { | ||
AdityaSripal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return CounterpartyInfo{ | ||
MerklePrefix: merklePrefix, | ||
ClientId: clientID, | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit of a nit, but I don't get why we don't just add the ID to all these names? If we're dealing with the ID, and we use that name in most other contexts, why not keep it consistent and always refer to it as SourceClientID and so on?