Skip to content

Attributable failures (feature 36/37) #1044

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions 02-peer-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -2359,13 +2359,21 @@ For a timed out or route-failed HTLC:
* [`u64`:`id`]
* [`u16`:`len`]
* [`len*byte`:`reason`]
1. `tlv_stream`: `update_fail_htlc_tlvs`
2. types:
1. type: 1 (`attribution_data`)
2. data:
* [`20*u32`:`htlc_hold_times`]
* [`210*sha256[..4]`:`truncated_hmacs`]

The `reason` field is an opaque encrypted blob for the benefit of the
original HTLC initiator, as defined in [BOLT #4](04-onion-routing.md);
however, there's a special malformed failure variant for the case where
the peer couldn't parse it: in this case the current node instead takes action, encrypting
it into a `update_fail_htlc` for relaying.

Nodes that support attributable failures will populate the optional `attribution_data` field containing timing information and hmac series, as defined in [BOLT #4](04-onion-routing.md).

For an unparsable HTLC:

1. type: 135 (`update_fail_malformed_htlc`)
Expand Down
Loading