cosmos / ibc-go

Inter-Blockchain Communication Protocol (IBC) implementation in Golang.
https://ibc.cosmos.network/
MIT License
543 stars 577 forks source link

Conditional Packets #7003

Open womensrights opened 1 month ago

womensrights commented 1 month ago

Summary

Conditional packets enable a user to send an IBC packet containing a list of packet data for different applications, e.g. transfer and ICA, and the aggregate packet should execute atomically. For example if there was a transfer and ICA aggregate packet, both the transfer and following ICA message should succeed, if the transfer fails the whole workflow should be aborted.

Problem Definition

Use cases

Proposal


For Admin Use

colin-axner commented 1 month ago

For design consideration here:

Conceptually, when processing a packet which has conditional ordering, a full RecvPacket flow for a single packet data should occur before we process the next packet. This should be fine with the port router refactor. The tricky part will be if after the first packet there is a failure. We will need to introduce an interface to revert receives on packet data's which had succeeded earlier in the chain of packet data's. This interface should look similar to what is already implemented in transfer