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

channeld: allow remote node to exceed their own HTLC count limits. #4432

Merged

Conversation

rustyrussell
Copy link
Contributor

We try not to exceed either side, but the spec still allows them to
(we don't, but older nodes would have, as could other implementations).

Fixes: #3953
Changelog-Fixed: protocol: overzealous close when peer sent more HTLCs than they'd told us we could send.
Signed-off-by: Rusty Russell [email protected]

@rustyrussell rustyrussell added channeld protocol These issues are protocol level issues that should be discussed on the protocol spec repo labels Mar 16, 2021
@rustyrussell rustyrussell added this to the v0.9.4 milestone Mar 16, 2021
We try not to exceed either side, but the spec still allows them to
(we don't, but older nodes would have, as could other implementations).

Fixes: ElementsProject#3953
Changelog-Fixed: protocol: overzealous close when peer sent more HTLCs than they'd told us we could send.
Signed-off-by: Rusty Russell <[email protected]>
@cdecker
Copy link
Member

cdecker commented Mar 16, 2021

Code seems fine, just for clarification: this is preventing us from adding a new HTLC to an outgoing channel, caused by a forwarded payment, this is not meant to protect against the peer with whom we share the channel from adding more HTLCs than we'd like to have to the channel (which we might be funder of and thus paying fees for), correct?

ACK 260032b

@rustyrussell
Copy link
Contributor Author

Code seems fine, just for clarification: this is preventing us from adding a new HTLC to an outgoing channel, caused by a forwarded payment, this is not meant to protect against the peer with whom we share the channel from adding more HTLCs than we'd like to have to the channel (which we might be funder of and thus paying fees for), correct?

ACK 260032b

No, they could never add more than we allowed. But they could add more than they allowed! That's how the spec was written. This behavior change should have been codified in the spec (that you take the min of the two values), but until it is and everyone is upgraded, we'll break channels if it happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
channeld protocol These issues are protocol level issues that should be discussed on the protocol spec repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

question about CHANNEL_ERR_TOO_MANY_HTLCS
2 participants