Skip to content

Bound the size of ChannelManager internal HTLC holding maps #1888

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

Closed
ariard opened this issue Nov 30, 2022 · 2 comments
Closed

Bound the size of ChannelManager internal HTLC holding maps #1888

ariard opened this issue Nov 30, 2022 · 2 comments

Comments

@ariard
Copy link

ariard commented Nov 30, 2022

See #1835 (comment) A counterparty could still open thousands of channels during period of low-fees, and from then hold the HTLCs commitment on outbound links to blow up our memory.

@TheBlueMatt
Copy link
Collaborator

We need to take a systematic approach here. There's more trivial issues - a counterparty could simply open a million channels and never fund any of them and we'll probably OOM.

@TheBlueMatt
Copy link
Collaborator

I don't think this is super actionable - as a lightning node we're always bound by the rate at which a DoS attacker can put stuff on the chain - whether to open channels directly with us or to fill our network graph with channel entries. Its important that we have a constant factor space per on-chain transaction, but I think as of 114 we do, with the exception of the ChannelMonitor's historical state map. If there's some map that stands out as particularly bigger (say, bigger than 1KB/channel or 256B/HTLC) we should fix that, but I'm not aware of any such maps currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants