Skip to content
Closed
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
14 changes: 14 additions & 0 deletions 02-peer-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -2350,6 +2350,12 @@ To supply the preimage:
* [`channel_id`:`channel_id`]
* [`u64`:`id`]
* [`32*byte`:`payment_preimage`]
1. `tlv_stream`: `update_fulfill_htlc_tlvs`
2. types:
1. type: 1 (`attribution_data`)
2. data:
* [`20*u32`:`htlc_hold_times`]
* [`210*sha256[..4]`:`truncated_hmacs`]

For a timed out or route-failed HTLC:

Expand All @@ -2359,13 +2365,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