cosmos / ibc-go

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

MsgAcknowledgement should accept only the packetID and not the full packet #6669

Closed colin-axner closed 3 weeks ago

colin-axner commented 3 weeks ago

Summary

When processing an acknowledgement on the source chain, IBC only needs to ask relayers for the ID of the packet in question, in addition to the existing, ack, proof and proof height arguments. Currently we ask for the full packet which is unnecessary. Checks are even performed in core IBC to verify the correctness of the additional arguments despite only be used for event emission, which is also unnecessary.

MsgAcknowledgement should be updated to accepting just the packetID rather than the full packet (source port, channel, sequence)


For Admin Use

colin-axner commented 3 weeks ago

I'm not sure why it slipped my mind last week, but the packet data is necessary for Acknowledgement in order to allow applications to revert state changes from a failed receive. This would be too radical of a change to do in short notice (as it would require apps to write the necessary revert information into the acknowledgement). I had only been thinking about the implications in core IBC

We will need to find an alternative solution