-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a packet commitment structure which contains multiple packet data's #1129
Comments
This issue relates to #1140, specifically:
UsageWe have a few goals here:
One future feature which we can already see desirability for is conditional packets. That is, the ability to indicate the packet data's should be executed in strict ordering and maintain interdependency (that is, if a packet data in a chain of packet data fails, revert the entire execution flow). problem/solution discussionLets define the packet v2 structure as something like: message Packet {
uint64 sequence = 1;
string source_id = 2;
string destination_id = 3;
string timeout = 4;
repeated PacketData data = 5;
} where the Packets need a source identifier and a destination identifer for sending and delivery. They need timeout information and they need a unique identifier to represent them (the id + sequence tuple depending on the reference point). Finally they need a payload, or data to be delivered at the application layer. The key path for the packet commitment should include: With regards to the timeout. We currently support I would like to provide a starting point for discussion: Here we would hash the final buffer before setting the packet commitment Pros:
Cons:
If we wanted to extend this packet commitment structure, I imagine we could insert an "options" section which can also be length prefixed. This might indicate additional processing for the packet like if it should be conditionally processed, or perhaps if the results of the packet processing should be passed to another actor (contract). I'd like to also note, if we wanted to protect the commitment structure even further, we could prefix the final commitment hash with the protocol version it used to generate the commitment. In this case, we could set the final commitment as Acknolwedgement commitmentWe have similar goals for generating the acknowledgement commitment. Currently we just hash the acknowledgement data. It's not very clear how to structure the acknowledgement commitment. Another goal with acknowledgements we should support are one-sided application, the ability for a single side to add a ibc application which the counterparty can send data to. A good example would be if the receiving chain adds a new ibc module. The sender side may not have added it, but may want to interact with it by sending it data from the source chain. In this case, the packet data is specified only for the destination port (source port is left empty). There is no reason for the destination chain to write an acknowledgement for the source side to interact with (as no processing should occur, source port was left empty).
Otherwise, I think it'd be natural to say the acknowledgement should be stored under a key that contains the |
Create a spec requirement for sending packets with multiple packet data's as outlined cosmos/ibc-go#7008
The spec should also indicate how a packet be self introspected to determine if it contains a multi-packetdata data. This may be through:
The text was updated successfully, but these errors were encountered: