Skip to content

Commit 50b2df2

Browse files
TheBlueMattt-bast
authored andcommitted
Update onion errors since we allow overpaying or under-CLTVing
In #1032 we allowed overshooting the final amount and expiry, but forgot to update the onion error descriptions which make reference thereto.
1 parent 29c14c6 commit 50b2df2

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

04-onion-routing.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,16 +1181,17 @@ handling by the processing node.
11811181
* [`u32`:`height`]
11821182

11831183
The `payment_hash` is unknown to the final node, the `payment_secret` doesn't
1184-
match the `payment_hash`, the amount for that `payment_hash` is incorrect,
1184+
match the `payment_hash`, the amount for that `payment_hash` is too low,
11851185
the CLTV expiry of the htlc is too close to the current block height for safe
11861186
handling or `payment_metadata` isn't present while it should be.
11871187

11881188
The `htlc_msat` parameter is superfluous, but left in for backwards
1189-
compatibility. The value of `htlc_msat` always matches the amount specified in
1190-
the final hop onion payload. It therefore does not have any informative value to
1191-
the sender. A penultimate hop sending a different amount or expiry for the htlc
1192-
is handled through `final_incorrect_cltv_expiry` and
1193-
`final_incorrect_htlc_amount`.
1189+
compatibility. The value of `htlc_msat` is required to be at least the value
1190+
specified in the final hop onion payload. It therefore does not have any
1191+
substantial informative value to the sender (though may indicate the
1192+
penultimate node took a lower fee than expected). A penultimate hop sending an
1193+
amount or an expiry that is too low for the htlc is handled through
1194+
`final_incorrect_cltv_expiry` and `final_incorrect_htlc_amount`.
11941195

11951196
The `height` parameter is set by the final node to the best known block height
11961197
at the time of receiving the htlc. This can be used by the sender to distinguish
@@ -1212,13 +1213,13 @@ failures now represented by `incorrect_or_unknown_payment_details` (PERM|15).
12121213
2. data:
12131214
* [`u32`:`cltv_expiry`]
12141215

1215-
The CLTV expiry in the HTLC doesn't match the value in the onion.
1216+
The CLTV expiry in the HTLC is less than the value in the onion.
12161217

12171218
1. type: 19 (`final_incorrect_htlc_amount`)
12181219
2. data:
12191220
* [`u64`:`incoming_htlc_amt`]
12201221

1221-
The amount in the HTLC doesn't match the value in the onion.
1222+
The amount in the HTLC is less than the value in the onion.
12221223

12231224
1. type: UPDATE|20 (`channel_disabled`)
12241225
2. data:

0 commit comments

Comments
 (0)