1
0
Fork 0
mirror of https://github.com/lightning/bolts.git synced 2025-03-10 09:10:07 +01:00

bol09: Specify behavior when a node specifies both optional and required features

While reviewing a patch on lnprototest, I encountered a scenario
where the BOLT 9 specification needed to provide clear guidance.

As a result, this commit adds specific requirements to
determine the appropriate behaviour when a node specifies
both optional and required features.

Additionally, if this situation appears to be an
implementation bug, it will be taken care of accordingly.

Reported-by: lnprototest
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
Vincenzo Palazzo 2023-07-15 02:51:05 +02:00
parent e0995c9b84
commit ec59f7c1ca
No known key found for this signature in database
GPG key ID: 8B6DC2B870B80D5F

View file

@ -64,10 +64,14 @@ The origin node:
unless indicated that it must set the odd feature bit instead. unless indicated that it must set the odd feature bit instead.
* MUST NOT set feature bits it does not support. * MUST NOT set feature bits it does not support.
* MUST NOT set feature bits in fields not specified by the table above. * MUST NOT set feature bits in fields not specified by the table above.
* MUST NOT set both the optional and mandatory bits.
* MUST set all transitive feature dependencies. * MUST set all transitive feature dependencies.
* MUST support:
* `var_onion_optin`
The origin node MUST support: The receiving node:
* `var_onion_optin` * if both the optional and the mandatory feature bits in a pair are set,
the feature should be treated as mandatory.
The requirements for receiving specific bits are defined in the linked sections in the table above. The requirements for receiving specific bits are defined in the linked sections in the table above.
The requirements for feature bits that are not defined The requirements for feature bits that are not defined