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.
Relay packet flows in one direction even if there are errors with the other direction.
Replaces error groups with wait groups so that relaying can proceed for packet flows from src to dst if there are errors for queries from dst to src, for example.
Reason for this change:
chantypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"
chantypes.QueryClient
has a methodPacketAcknowledgements
which we are using to query the packet commitments on the destination chain in order to assembleMsgAcknowledgement
messages to send back to the source chain.PacketAcknowledgements
query will returnnil
error, and alsonil
response, if noMsgTransfer
messages have been committed to the chain.errQueryUnrelayedPacketAcks
.UnrelayedAcknowledgements
, was using an error group to make this query on both chains. If this error occurred on one chain involved in the path, it would return the error and refuse to continue with a success for the other chain.UnrelayedAcknowledgements
andUnrelayedSequences
with wait groups, and only proceeding for the non-error condition packet flows. This allows packet flows in one direction to continue to be processed even if the other chain has an error with one of the queries throughout the process.errQueryUnrelayedPacketAcks
is still a valid error, since we cannot query packet commitments on a chain that does not have anyMsgTransfer
messages sent yet. But, it does not need to halt the processing of the packet flows in the opposite direction.