From c3a8e5e1a73216d0c58393e7ea6e0741a0f87472 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Fri, 17 Jan 2020 14:53:15 -0800 Subject: [PATCH] BOLT11: simplify existing writer feature requirements As a final step, we now can remove several of the BOLT 11 writer's requirements now that it builds on BOLT 9's, particularly: - setting the even bit if a feature is required. - only setting a feature if the node supports a given feature. The lone requirement that remains pertains to setting the `s` value if and only if the `payment_secret` feature is set. --- 11-payment-encoding.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/11-payment-encoding.md b/11-payment-encoding.md index 4a96fd5..86996ed 100644 --- a/11-payment-encoding.md +++ b/11-payment-encoding.md @@ -294,17 +294,7 @@ on the amount sent. A writer: - MUST set the `9` field to a feature vector compliant with the [BOLT 9 origin node requirements](09-features.md#requirements). - - if `payment_secret` feature is set: - - MUST include an `s` field. - - otherwise: - - MUST NOT include an `s` field. - - if the `payment_secret` field is required in the onion: - - MUST set the even feature `payment_secret`. - - If the final node supports [Basic multi-part payments](04-onion-routing.md#basic-multi-part-payments): - - MUST set the `basic_mpp` feature. - - Otherwise: - - MUST NOT set the `basic_mpp` feature. - - MUST set `var_onion_optin` if and only if it supports that feature. + - MUST set an `s` field if and only if the `payment_secret` feature is set. A reader: - if the feature vector does not set all known, transitive feature dependencies: