Closed chipshort closed 3 months ago
Attention: Patch coverage is 38.31776%
with 66 lines
in your changes missing coverage. Please review.
Project coverage is 54.68%. Comparing base (
5ae2f4a
) to head (eeb3cd4
).
how to cleanup this temporary packet store at some point for the packets that get never acknowledged. Would be great to have some sort of configurable lifetime.
That's a general problem with async acks, even on the ibc-go layer. If there is no ack, the packet commitment is not deleted there either. Adding a lifetime opens a whole different can of worms. When would we clean it up? Also, I'm not sure how a valid contract should handle that case. After deleting the stored packet, there is no way to ack the packet anymore, so that can in theory cause a packet that would otherwise have been acknowledged to get stuck.
I'm not convinced there's a good solution for this, so my take is to just live with the fact that incorrect contracts will write packets that are never cleaned up (just like they can write stuff into their own state that never gets cleaned up).
my take is to just live with the fact that incorrect contracts will write packets that are never cleaned up
Right, sounds good. In that case should we add a storage write fee to StoreAsyncAckPacket
? Or does prefixStore.Set(key, packetBz)
charge gas automatically?
Yes prefixStore.Set(key, packetBz)
will charge that. You can see an example in the test in relay_test.go.
also fixes #1891
I had to do changes in quite a few places