ibc-go icon indicating copy to clipboard operation
ibc-go copied to clipboard

Refactor `WriteAcknowledgement` to take in the packetID rather than the entire packet

Open colin-axner opened this issue 1 year ago • 2 comments

Summary

WriteAcknowledgement only uses the packetID information provided in the packet arg, except when emitting events. Though, there is open issue https://github.com/cosmos/ibc-go/issues/5901 to remove the unnecessary attributes emitted (non packetID info). We should change the packet arg to be a packetID instead. This allows async application to only store the packetID rather than the entire packet which improves storage performance


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged/assigned

colin-axner avatar Jun 18 '24 14:06 colin-axner

Heads up, this will require #6653 which requires changes in hermes (and likely changes to MsgAcknowledgement to take in just the packetID as opposed to the full packet)

colin-axner avatar Jun 20 '24 15:06 colin-axner

This issue is on hold until https://github.com/informalsystems/hermes/issues/4078 is addressed. I have moved the issue out of the v9 milestone and into v10, but the exact release it can be addressed in is dependent on the relayers

colin-axner avatar Jul 03 '24 13:07 colin-axner

We can also implement this if we store the packet in ibc-core if the recvPacket returns an async ack, thus the application is not required to store the packet themselves and then provide it to ibc-core in WriteAck since ibc-core can retrieve the stored packet and emit the necessary events

We also need to then delete the stored packet as well on WriteAcknowledgement to remove the temporary storage of the packet while we wait for the ack to be written

AdityaSripal avatar Jan 20 '25 12:01 AdityaSripal

Completed in https://github.com/cosmos/ibc-go/pull/7869

AdityaSripal avatar Feb 10 '25 19:02 AdityaSripal

This issue was mistakenly reopened during some integration work, so closing again now.

gjermundgaraba avatar May 09 '25 14:05 gjermundgaraba