Skip to content

Commit 35c479d

Browse files
committed
Advertize zlib support via feature bits
Add a feature bit to zlib compression support. This compression will be used in several places, currently in extended gossip queries.
1 parent d0c8385 commit 35c479d

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

07-routing-gossip.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ simple compression scheme: the first byte indicates the encoding, the
571571
rest contains the data.
572572

573573
Encoding types:
574+
574575
* `0`: uncompressed array of `short_channel_id` types, in ascending order.
575576
* `1`: array of `short_channel_id` types, in ascending order, compressed with zlib deflate<sup>[1](#reference-1)</sup>
576577

@@ -588,6 +589,7 @@ Query messages can be extended with optional fields that can help reduce the num
588589
- checksum-based filtering of `channel_update` messages: only ask for `channel_update` messages that carry different information from the ones you already have.
589590

590591
Nodes can signal that they support extended gossip queries with the `gossip_queries_ex` feature bit.
592+
Nodes can signal that they support zlib compression with the `zlib_compress` feature bit.
591593

592594
### The `query_short_channel_ids`/`reply_short_channel_ids_end` Messages
593595

09-features.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ The Context column decodes as follows:
2626
* `C+`: presented in the `channel_announcement` message, but always even (required).
2727
* `9`: presented in [BOLT 11](11-payment-encoding.md) invoices.
2828

29-
| Bits | Name | Description | Context | Dependencies | Link |
30-
|-------|----------------------------------|-----------------------------------------------------------|----------|-------------------|---------------------------------------|
31-
| 0/1 | `option_data_loss_protect` | Requires or supports extra `channel_reestablish` fields | IN | | [BOLT #2][bolt02-retransmit] |
32-
| 3 | `initial_routing_sync` | Sending node needs a complete routing information dump | I | | [BOLT #7][bolt07-sync] |
33-
| 4/5 | `option_upfront_shutdown_script` | Commits to a shutdown scriptpubkey when opening channel | IN | | [BOLT #2][bolt02-open] |
34-
| 6/7 | `gossip_queries` | More sophisticated gossip control | IN | | [BOLT #7][bolt07-query] |
35-
| 8/9 | `var_onion_optin` | Requires/supports variable-length routing onion payloads | IN9 | | [Routing Onion Specification][bolt04] |
36-
| 10/11 | `gossip_queries_ex` | Gossip queries can include additional information | IN | `gossip_queries` | [BOLT #7][bolt07-query] |
37-
| 12/13 | `option_static_remotekey` | Static key for remote output | IN | | [BOLT #3](03-transactions.md) |
38-
| 14/15 | `payment_secret` | Node supports `payment_secret` field | IN9 | `var_onion_optin` | [Routing Onion Specification][bolt04] |
39-
| 16/17 | `basic_mpp` | Node can receive basic multi-part payments | IN9 | `payment_secret` | [BOLT #4][bolt04-mpp] |
40-
| 18/19 | `option_support_large_channel` | Can create large channels | IN | | [BOLT #2](02-peer-protocol.md#the-open_channel-message) |
41-
| 20/21 | `option_anchor_outputs` | Anchor outputs | IN | `option_static_remotekey` | [BOLT #3](03-transactions.md) |
42-
29+
| Bits | Name | Description | Context | Dependencies | Link |
30+
|-------|----------------------------------|-----------------------------------------------------------|----------|---------------------------|---------------------------------------------------------|
31+
| 0/1 | `option_data_loss_protect` | Requires or supports extra `channel_reestablish` fields | IN | | [BOLT #2][bolt02-retransmit] |
32+
| 3 | `initial_routing_sync` | Sending node needs a complete routing information dump | I | | [BOLT #7][bolt07-sync] |
33+
| 4/5 | `option_upfront_shutdown_script` | Commits to a shutdown scriptpubkey when opening channel | IN | | [BOLT #2][bolt02-open] |
34+
| 6/7 | `gossip_queries` | More sophisticated gossip control | IN | | [BOLT #7][bolt07-query] |
35+
| 8/9 | `var_onion_optin` | Requires/supports variable-length routing onion payloads | IN9 | | [Routing Onion Specification][bolt04] |
36+
| 10/11 | `gossip_queries_ex` | Gossip queries can include additional information | IN | `gossip_queries` | [BOLT #7][bolt07-query] |
37+
| 12/13 | `option_static_remotekey` | Static key for remote output | IN | | [BOLT #3](03-transactions.md) |
38+
| 14/15 | `payment_secret` | Node supports `payment_secret` field | IN9 | `var_onion_optin` | [Routing Onion Specification][bolt04] |
39+
| 16/17 | `basic_mpp` | Node can receive basic multi-part payments | IN9 | `payment_secret` | [BOLT #4][bolt04-mpp] |
40+
| 18/19 | `option_support_large_channel` | Can create large channels | IN | | [BOLT #2](02-peer-protocol.md#the-open_channel-message) |
41+
| 20/21 | `option_anchor_outputs` | Anchor outputs | IN | `option_static_remotekey` | [BOLT #3](03-transactions.md) |
42+
| 24/25 | `zlib_compress` | Support for zlib compression | IN | `gossip_queries_ex` | [BOLT #7][bolt07-query] |
4343
## Requirements
4444

4545
The origin node:

0 commit comments

Comments
 (0)