-
Notifications
You must be signed in to change notification settings - Fork 419
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
ICS 11: IBC state optimizations / pruning #5
Comments
Ref #48 - the more I think about this the more I think we should just separate availability from commitment instead of implementing pruning strategies. |
Can you clarify this further ? Specifically the impact on the spec |
In the original IBC specifications (that I have read, and the latest version in #36), packets were stored in full in the state of the outgoing chain, then later deleted once a receipt had been sent back from the destination chain. I do not think this is necessary, and it might be an overly complex / costly (more transactions required) way to minimize state usage (especially when receipts are not required for the application layer) as compared to storing a much smaller commitment or updated accumulator root in the source chain. The destination chain, when it checks the inclusion proof, wants to verify:
(2) already requires prior knowledge about how the source chain's state machine works, so I think we can instead have the source chain execute the packet but only store a commitment (e.g. Thoughts? If this seems reasonable, I will write it up in more detail in #36. Source chains could still opt to store the packet data if desired, I just think it doesn't really need to be part of the protocol. |
Oh interesting - so just store the hash in the egress queue rather than the whole packet. I guess the only concern may be re data availability, eg if the source needs to do a dump/restart and loses its tx history |
Yes, precisely.
That's true but seems like an exceptional case - a chain would have to be export-imported, restarted, and all nodes (or all nodes willing to provide the data) would need to have deleted their transaction history. Even in that case, if the packet had a timeout, a new one could just be resent after the new chain started. If there is at least a minor incentive to relay packets (including just an incentive for the original sender, if they are acting as their own relayer) nodes seem likely to keep the transaction data. |
I agree that commitment values are much efficient on space occupiation & there are almost no drawbacks. I'm just not sure is it better to enforce that in the core protocol, we can easily implement a wrapper to make the IBC applications store the hashes (which is treated as a plain text by the IBC logic) instead of the actual values. Also, we need a way to query original data from only the transaction and the state machine, without storing it in the state, which will be tricky. It is more like an implementation issue. Especially there can be cases where the transactions do not include the packet data: the packet can be generated from the state and the state machine, without relying on the transaction(e.g. a heartbeat ibc packet generated on endblocker...?) which needs the full state for the relayers to acknowledge about the packet data |
Not yet sure if this will need to be separate from ICS 4 or not. |
I think this can be part of ICS 4. |
Superseded by ICS 4, which covers everything we should need for the moment. |
Primarily a port of the optimizations section of the original IBC spec.
Will cover:
The text was updated successfully, but these errors were encountered: