From 35c479d135507cb04730e7c9de6706c793ec09f7 Mon Sep 17 00:00:00 2001 From: t-bast Date: Mon, 14 Dec 2020 15:46:14 +0100 Subject: [PATCH] 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. --- 07-routing-gossip.md | 2 ++ 09-features.md | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/07-routing-gossip.md b/07-routing-gossip.md index a27c2cd60..4564b9849 100644 --- a/07-routing-gossip.md +++ b/07-routing-gossip.md @@ -571,6 +571,7 @@ simple compression scheme: the first byte indicates the encoding, the rest contains the data. Encoding types: + * `0`: uncompressed array of `short_channel_id` types, in ascending order. * `1`: array of `short_channel_id` types, in ascending order, compressed with zlib deflate[1](#reference-1) @@ -588,6 +589,7 @@ Query messages can be extended with optional fields that can help reduce the num - checksum-based filtering of `channel_update` messages: only ask for `channel_update` messages that carry different information from the ones you already have. Nodes can signal that they support extended gossip queries with the `gossip_queries_ex` feature bit. +Nodes can signal that they support zlib compression with the `zlib_compress` feature bit. ### The `query_short_channel_ids`/`reply_short_channel_ids_end` Messages diff --git a/09-features.md b/09-features.md index e0b1b5d15..f9469aa04 100644 --- a/09-features.md +++ b/09-features.md @@ -26,20 +26,20 @@ The Context column decodes as follows: * `C+`: presented in the `channel_announcement` message, but always even (required). * `9`: presented in [BOLT 11](11-payment-encoding.md) invoices. -| Bits | Name | Description | Context | Dependencies | Link | -|-------|----------------------------------|-----------------------------------------------------------|----------|-------------------|---------------------------------------| -| 0/1 | `option_data_loss_protect` | Requires or supports extra `channel_reestablish` fields | IN | | [BOLT #2][bolt02-retransmit] | -| 3 | `initial_routing_sync` | Sending node needs a complete routing information dump | I | | [BOLT #7][bolt07-sync] | -| 4/5 | `option_upfront_shutdown_script` | Commits to a shutdown scriptpubkey when opening channel | IN | | [BOLT #2][bolt02-open] | -| 6/7 | `gossip_queries` | More sophisticated gossip control | IN | | [BOLT #7][bolt07-query] | -| 8/9 | `var_onion_optin` | Requires/supports variable-length routing onion payloads | IN9 | | [Routing Onion Specification][bolt04] | -| 10/11 | `gossip_queries_ex` | Gossip queries can include additional information | IN | `gossip_queries` | [BOLT #7][bolt07-query] | -| 12/13 | `option_static_remotekey` | Static key for remote output | IN | | [BOLT #3](03-transactions.md) | -| 14/15 | `payment_secret` | Node supports `payment_secret` field | IN9 | `var_onion_optin` | [Routing Onion Specification][bolt04] | -| 16/17 | `basic_mpp` | Node can receive basic multi-part payments | IN9 | `payment_secret` | [BOLT #4][bolt04-mpp] | -| 18/19 | `option_support_large_channel` | Can create large channels | IN | | [BOLT #2](02-peer-protocol.md#the-open_channel-message) | -| 20/21 | `option_anchor_outputs` | Anchor outputs | IN | `option_static_remotekey` | [BOLT #3](03-transactions.md) | - +| Bits | Name | Description | Context | Dependencies | Link | +|-------|----------------------------------|-----------------------------------------------------------|----------|---------------------------|---------------------------------------------------------| +| 0/1 | `option_data_loss_protect` | Requires or supports extra `channel_reestablish` fields | IN | | [BOLT #2][bolt02-retransmit] | +| 3 | `initial_routing_sync` | Sending node needs a complete routing information dump | I | | [BOLT #7][bolt07-sync] | +| 4/5 | `option_upfront_shutdown_script` | Commits to a shutdown scriptpubkey when opening channel | IN | | [BOLT #2][bolt02-open] | +| 6/7 | `gossip_queries` | More sophisticated gossip control | IN | | [BOLT #7][bolt07-query] | +| 8/9 | `var_onion_optin` | Requires/supports variable-length routing onion payloads | IN9 | | [Routing Onion Specification][bolt04] | +| 10/11 | `gossip_queries_ex` | Gossip queries can include additional information | IN | `gossip_queries` | [BOLT #7][bolt07-query] | +| 12/13 | `option_static_remotekey` | Static key for remote output | IN | | [BOLT #3](03-transactions.md) | +| 14/15 | `payment_secret` | Node supports `payment_secret` field | IN9 | `var_onion_optin` | [Routing Onion Specification][bolt04] | +| 16/17 | `basic_mpp` | Node can receive basic multi-part payments | IN9 | `payment_secret` | [BOLT #4][bolt04-mpp] | +| 18/19 | `option_support_large_channel` | Can create large channels | IN | | [BOLT #2](02-peer-protocol.md#the-open_channel-message) | +| 20/21 | `option_anchor_outputs` | Anchor outputs | IN | `option_static_remotekey` | [BOLT #3](03-transactions.md) | +| 24/25 | `zlib_compress` | Support for zlib compression | IN | `gossip_queries_ex` | [BOLT #7][bolt07-query] | ## Requirements The origin node: