Skip to content

Commit

Permalink
bol09: Specify behavior when a node specifies both optional and requi…
Browse files Browse the repository at this point in the history
…red 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>
  • Loading branch information
vincenzopalazzo committed Jul 31, 2023
1 parent e0995c9 commit da27563
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 09-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@ The origin node:
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 in fields not specified by the table above.
* MUST NOT set both the optional and mandatory field.
* MUST set all transitive feature dependencies.

The origin node MUST support:
* `var_onion_optin`

The received node:
* if both the optional and the mandatory feature bits 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 feature bits that are not defined
above can be found in [BOLT #1: The `init` Message](01-messaging.md#the-init-message).
Expand Down

0 comments on commit da27563

Please sign in to comment.