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

Capacity indications on HTLC failures #695

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion 04-onion-routing.md
Expand Up @@ -766,9 +766,12 @@ The ephemeral key was unparsable by the processing node.
2. data:
* [`u16`:`len`]
* [`len*byte`:`channel_update`]
* [`u8`:`capacity_order`] (`option_capacity_order`)

The channel from the processing node was unable to handle this HTLC,
but may be able to handle it, or others, later.
but may be able to handle it, or others, later. The optional
`capacity_order` field gives a very rough indication of how far over
the channel capacity this htlc amount was.

1. type: PERM|8 (`permanent_channel_failure`)

Expand Down Expand Up @@ -918,6 +921,8 @@ A _forwarding node_ MAY, but a _final node_ MUST NOT:
transient error occurs in the outgoing channel (e.g. channel capacity reached,
too many in-flight HTLCs, etc.):
- return a `temporary_channel_failure` error.
- MAY set `capacity_order` to the approximate number of powers of 2 that the HTLC amount exceeded the available capacity.
- SHOULD randomize `capacity_order`.
- if an otherwise unspecified, permanent error occurs during forwarding to its
receiving peer (e.g. channel recently closed):
- return a `permanent_channel_failure` error.
Expand Down