2017-02-07 01:53:39 +01:00
# BOLT #9: Assigned Feature Flags
2018-06-07 21:39:17 -07:00
This document tracks the assignment of `localfeatures` and `globalfeatures`
flags in the `init` message ([BOLT #1 ](01-messaging.md )) along with the
`features` flag fields in the `channel_announcement` and `node_announcement`
messages ([BOLT #7 ](07-routing-gossip.md )).
The flags are tracked separately, since new flags will likely be added over time.
2017-02-07 01:53:39 +01:00
2018-06-07 21:39:17 -07:00
The `features` flags in the routing messages are a subset of the
`globalfeatures` flags, as `localfeatures` , by definition, are only of interest
to direct peers.
2017-02-07 01:53:39 +01:00
2017-12-13 18:08:43 -08:00
Flags are numbered from the least-significant bit, at bit 0 (i.e. 0x1,
2018-06-07 21:39:17 -07:00
an _even_ bit). They are generally assigned in pairs so that features
can be introduced as optional (_odd_ bits) and later upgraded to be compulsory
(_even_ bits), which will be refused by outdated nodes:
see [BOLT #1: The `init` Message ](01-messaging.md#the-init-message ).
2017-02-07 01:53:39 +01:00
2017-05-25 09:43:31 +09:30
## Assigned `localfeatures` flags
2017-02-07 01:53:39 +01:00
2017-05-25 09:43:31 +09:30
These flags may only be used in the `init` message:
2017-02-07 14:58:31 +10:30
| Bits | Name |Description | Link |
|------|------------------|------------------------------------------------|---------------------------------------------------------------------|
2018-02-23 15:17:26 +01:00
| 0/1 | `option_data_loss_protect` | Requires or supports extra `channel_reestablish` fields | [BOLT #2 ](02-peer-protocol.md#message-retransmission ) |
2017-12-13 18:08:43 -08:00
| 3 | `initial_routing_sync` | Indicates that the sending node needs a complete routing information dump | [BOLT #7 ](07-routing-gossip.md#initial-sync ) |
2018-06-07 21:39:17 -07:00
| 4/5 | `option_upfront_shutdown_script` | Commits to a shutdown scriptpubkey when opening channel | [BOLT #2 ](02-peer-protocol.md#the-open_channel-message ) |
2018-06-27 06:32:11 +09:30
| 6/7 | `gossip_queries` | More sophisticated gossip control | [BOLT #7 ](07-routing-gossip.md#query-messages ) |
2017-02-07 01:53:39 +01:00
## Assigned `globalfeatures` flags
2017-05-11 11:16:05 +09:30
2017-12-13 18:08:43 -08:00
There are currently no `globalfeatures` flags.
2017-05-25 09:43:31 +09:30
## Requirements
2017-12-13 18:08:43 -08:00
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
2018-01-30 14:56:52 +10:30
above can be found in [BOLT #1: The `init` Message ](01-messaging.md#the-init-message ).
2017-05-25 09:43:31 +09:30
## Rationale
2018-06-07 21:39:17 -07:00
There is no _even_ bit for `initial_routing_sync` , as there would be little
point: a local node can't determine if a remote node complies, and it must
interpret the flag, as defined in the initial spec.
2017-05-25 09:43:31 +09:30
2017-05-11 11:16:05 +09:30

< br >
This work is licensed under a [Creative Commons Attribution 4.0 International License ](http://creativecommons.org/licenses/by/4.0/ ).