Skip to content
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

Cleanup and Pruning #559

Open
colin-axner opened this issue Apr 9, 2021 · 1 comment
Open

Cleanup and Pruning #559

colin-axner opened this issue Apr 9, 2021 · 1 comment
Labels
feature Possible future feature. tao Transport, authentication, & ordering layer.

Comments

@colin-axner
Copy link
Contributor

The cosmos hub, about 1 month after launching IBC has around 100 clients, 150 connections and 100 channels. In reality, there are probably ~25 unique connections. Most of these instances came from testing. The amount of usused/abandoned clients/connections/channels will only increase with time.

I'm curious if there is any way to specify a safe way to remove old clients/connections/channels. A chain could prune any non-active clients and thus the associated connections/channels, but I could see this being problematic if the counterparty has an active client, not to mention, the counterparty may be a multitude of clients since each connection can specify a different client, with different client parameters.

Opening this issue as I'd like ICS to create a recommendation for how to go about pruning old state

@cwgoes
Copy link
Contributor

cwgoes commented Apr 9, 2021

In general, at the moment, it is safe to prune connections not in use by any channel, but unsafe to prune channels once they have been opened, since there's no way to determine whether or not there are packets in flight - at least not without control on the part of the application layer.

However, at the moment there is an even more fundamental problem, which is that pruning anything is unsafe unless identifier reuse is prevented, otherwise handshake steps or packets can be replayed. This could be addressed by pruning the values but keeping the identifiers pointed to some kind of null sentinel value, or by figuring out the timeout constraints required to prune safely - in principle this should be possible, but it will require a lot of precise reasoning about timeouts on packets and protocol changes to enforce these accordingly.

@mpoke mpoke added tao Transport, authentication, & ordering layer. feature Possible future feature. labels Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Possible future feature. tao Transport, authentication, & ordering layer.
Projects
None yet
Development

No branches or pull requests

3 participants