mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
lightningd: return invalid_onon_blinding for any blinded payment error.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
511e8e6477
commit
426886ff9b
@ -150,7 +150,11 @@ static void fail_in_htlc(struct htlc_in *hin,
|
||||
htlc_in_check(hin, __func__);
|
||||
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
/* In a blinded path, all failures become invalid_onion_blinding */
|
||||
/* BOLT-route-blinding #4:
|
||||
* - If `blinding_point` is set in the incoming `update_add_htlc`:
|
||||
* - MUST return `invalid_onion_blinding` on any error, including
|
||||
* downstream errors received from forwarding HTLCs.
|
||||
*/
|
||||
if (hin->blinding) {
|
||||
failed_htlc = mk_failed_htlc_badonion(tmpctx, hin,
|
||||
WIRE_INVALID_ONION_BLINDING);
|
||||
|
@ -1222,9 +1222,7 @@ handle_final_failure(struct command *cmd,
|
||||
case WIRE_PERMANENT_NODE_FAILURE:
|
||||
case WIRE_TEMPORARY_NODE_FAILURE:
|
||||
case WIRE_REQUIRED_NODE_FEATURE_MISSING:
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
case WIRE_INVALID_ONION_BLINDING:
|
||||
#endif
|
||||
case WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS:
|
||||
case WIRE_MPP_TIMEOUT:
|
||||
goto error;
|
||||
@ -1325,9 +1323,7 @@ handle_intermediate_failure(struct command *cmd,
|
||||
case WIRE_REQUIRED_NODE_FEATURE_MISSING:
|
||||
case WIRE_INVALID_ONION_PAYLOAD:
|
||||
case WIRE_INVALID_REALM:
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
case WIRE_INVALID_ONION_BLINDING:
|
||||
#endif
|
||||
tal_arr_expand(&root->excluded_nodes, *errnode);
|
||||
goto error;
|
||||
|
||||
@ -2239,9 +2235,7 @@ static bool payment_can_retry(struct payment *p)
|
||||
case WIRE_PERMANENT_CHANNEL_FAILURE:
|
||||
case WIRE_REQUIRED_CHANNEL_FEATURE_MISSING:
|
||||
case WIRE_TEMPORARY_CHANNEL_FAILURE:
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
case WIRE_INVALID_ONION_BLINDING:
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
8
wire/extracted_onion_05_route-blinding_error.patch
Normal file
8
wire/extracted_onion_05_route-blinding_error.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- wire/onion_wire.csv 2022-08-10 16:09:32.851789435 +0930
|
||||
+++ wire/onion_wire.csv.raw 2022-08-10 16:18:47.411275132 +0930
|
||||
@@ -95,3 +81,5 @@
|
||||
msgdata,invalid_onion_payload,type,bigsize,
|
||||
msgdata,invalid_onion_payload,offset,u16,
|
||||
msgtype,mpp_timeout,23
|
||||
+msgtype,invalid_onion_blinding,BADONION|PERM|24
|
||||
+msgdata,invalid_onion_blinding,sha256_of_onion,sha256,
|
@ -1,9 +0,0 @@
|
||||
diff --git a/wire/extracted_onion_wire_csv b/wire/extracted_onion_wire_csv
|
||||
index 58f278f38..253a50012 100644
|
||||
--- a/wire/extracted_onion_wire_csv
|
||||
+++ b/wire/extracted_onion_wire_csv
|
||||
@@ -71,3 +71,4 @@ msgtype,invalid_onion_payload,PERM|22
|
||||
msgdata,invalid_onion_payload,type,bigsize,
|
||||
msgdata,invalid_onion_payload,offset,u16,
|
||||
msgtype,mpp_timeout,23
|
||||
+msgtype,invalid_onion_blinding,BADONION|PERM|24
|
@ -96,3 +96,5 @@ msgtype,invalid_onion_payload,PERM|22
|
||||
msgdata,invalid_onion_payload,type,bigsize,
|
||||
msgdata,invalid_onion_payload,offset,u16,
|
||||
msgtype,mpp_timeout,23
|
||||
msgtype,invalid_onion_blinding,BADONION|PERM|24
|
||||
msgdata,invalid_onion_blinding,sha256_of_onion,sha256,
|
||||
|
|
Loading…
Reference in New Issue
Block a user