-
Notifications
You must be signed in to change notification settings - Fork 586
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
Rename Id Fields to Channel for Packet V2 #7428
Conversation
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.
LGTM you even catched some commented out code to change :D
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.
Noticed a few mishaps in calls to verifyMembership. As well as a few log/error strings to be updated.
Otherwise lgtm!
merklePath := types.BuildMerklePath(counterparty.MerklePathPrefix, path) | ||
|
||
if err := k.ClientKeeper.VerifyNonMembership( | ||
ctx, | ||
packet.SourceId, | ||
packet.SourceChannel, |
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 should be looking up the v2 channelEnd (now counterparty) and taking the clientID from it and using it here!
Not sure if you want to do that in this PR or not
merklePath := types.BuildMerklePath(counterparty.MerklePathPrefix, path) | ||
|
||
commitment := channeltypesv2.CommitPacket(packet) | ||
|
||
if err := k.ClientKeeper.VerifyMembership( | ||
ctx, | ||
packet.DestinationId, | ||
packet.DestinationChannel, |
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.
Likewise, lookup v2 channelEnd and use the clientID rather than channelID
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.
yes, changed this in packetserver/relay.go
recently. In general, there might be some tweaks necessary in these files before tests for it pass.
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.
nice catch!! Though it seems this was already wrong before
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.
Yup!
Co-authored-by: Damian Nolan <[email protected]>
} | ||
} | ||
if counterparty.ClientId != packet.SourceId { | ||
if counterparty.ClientId != packet.SourceChannel { |
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.
not related to this but should be CounterpartyChannelId
. Unsure if this applies elsewhere but feel free to fix in follow-up.
merklePath := types.BuildMerklePath(counterparty.MerklePathPrefix, path) | ||
|
||
commitment := channeltypesv2.CommitPacket(packet) | ||
|
||
if err := k.ClientKeeper.VerifyMembership( | ||
ctx, | ||
packet.DestinationId, | ||
packet.DestinationChannel, |
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.
yes, changed this in packetserver/relay.go
recently. In general, there might be some tweaks necessary in these files before tests for it pass.
Quality Gate passed for 'ibc-go'Issues Measures |
I think the above should be fixed in a separate PR. Will create a tracking issue |
Description
closes: #7416
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.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.