Skip to content

Commit 5d4ca40

Browse files
committed
Add attribution data to update_fail_htlc and update_fulfill_htlc
1 parent 14272b1 commit 5d4ca40

File tree

3 files changed

+223
-29
lines changed

3 files changed

+223
-29
lines changed

02-peer-protocol.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,6 +2339,12 @@ To supply the preimage:
23392339
* [`channel_id`:`channel_id`]
23402340
* [`u64`:`id`]
23412341
* [`32*byte`:`payment_preimage`]
2342+
1. `tlv_stream`: `update_fulfill_htlc_tlvs`
2343+
2. types:
2344+
1. type: 1 (`attribution_data`)
2345+
2. data:
2346+
* [`20*u32`:`htlc_hold_times`]
2347+
* [`210*sha256[..4]`:`truncated_hmacs`]
23422348

23432349
For a timed out or route-failed HTLC:
23442350

@@ -2348,6 +2354,12 @@ For a timed out or route-failed HTLC:
23482354
* [`u64`:`id`]
23492355
* [`u16`:`len`]
23502356
* [`len*byte`:`reason`]
2357+
1. `tlv_stream`: `update_fail_htlc_tlvs`
2358+
2. types:
2359+
1. type: 1 (`attribution_data`)
2360+
2. data:
2361+
* [`20*u32`:`htlc_hold_times`]
2362+
* [`210*sha256[..4]`:`truncated_hmacs`]
23512363

23522364
The `reason` field is an opaque encrypted blob for the benefit of the
23532365
original HTLC initiator, as defined in [BOLT #4](04-onion-routing.md);
@@ -2386,6 +2398,9 @@ A node:
23862398
`invalid_onion_blinding` failure code for any local or downstream errors.
23872399
- SHOULD use the `sha256_of_onion` of the onion it received.
23882400
- MAY use an all zero `sha256_of_onion`.
2401+
- When supporting `option_attribution_data`:
2402+
- if `path_key` is not set in the incoming `update_add_htlc`:
2403+
- MUST initialize `attribution_data` and include it in `update_fail_htlc` and `update_fulfill_htlc`. See [BOLT04](04-onion-routing.md).
23892404

23902405
A receiving node:
23912406
- if the `id` does not correspond to an HTLC in its current commitment transaction:

0 commit comments

Comments
 (0)