Skip to content

Commit e0ee59f

Browse files
committed
fixup! BOLT 9: Assume gossip_queries.
Just demote it, so its absence means "I don't know anything useful". Signed-off-by: Rusty Russell <[email protected]>
1 parent 5e7a917 commit e0ee59f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

07-routing-gossip.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,12 @@ be present, so `must_be_one` is a constant value, and ignored by receivers.
575575

576576
## Query Messages
577577

578+
Understanding of messages used to be indicated with the `gossip_queries`
579+
feature bit; now these messages are universally supported, that feature has
580+
now been slightly repurposed. Not offering this feature means a node is not
581+
worth querying for gossip: either they do not store the entire gossip map, or
582+
they are only connected to a single peer (this one).
583+
578584
There are several messages which contain a long array of
579585
`short_channel_id`s (called `encoded_short_ids`) so we include an encoding byte
580586
which allows for different encoding schemes to be defined in the future, if they
@@ -638,6 +644,7 @@ from `reply_channel_range`.
638644
#### Requirements
639645

640646
The sender:
647+
- SHOULD NOT send this to a peer which does not offer `gossip_queries`.
641648
- MUST NOT send `query_short_channel_ids` if it has sent a previous `query_short_channel_ids` to this peer and not received `reply_short_channel_ids_end`.
642649
- MUST set `chain_hash` to the 32-byte hash that uniquely identifies the chain
643650
that the `short_channel_id`s refer to.
@@ -778,6 +785,7 @@ This allows querying for channels within specific blocks.
778785
#### Requirements
779786

780787
The sender of `query_channel_range`:
788+
- SHOULD NOT send this to a peer which does not offer `gossip_queries`.
781789
- MUST NOT send this if it has sent a previous `query_channel_range` to this peer and not received all `reply_channel_range` replies.
782790
- MUST set `chain_hash` to the 32-byte hash that uniquely identifies the chain
783791
that it wants the `reply_channel_range` to refer to
@@ -842,6 +850,8 @@ multiple times to change the gossip from a peer.
842850
The sender:
843851
- MUST set `chain_hash` to the 32-byte hash that uniquely identifies the chain
844852
that it wants the gossip to refer to.
853+
- If the receiver does not offer `gossip_queries`:
854+
- SHOULD set `first_timestamp` to 0xFFFFFFFF and `timestamp_range` to 0.
845855

846856
The receiver:
847857
- SHOULD send all gossip messages whose `timestamp` is greater or

09-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The Context column decodes as follows:
3434
|-------|-----------------------------------|-----------------------------------------------------------|----------|---------------------------|-----------------------------------------------------------------------|
3535
| 0/1 | `option_data_loss_protect` | ASSUMED | | | |
3636
| 4/5 | `option_upfront_shutdown_script` | Commits to a shutdown scriptpubkey when opening channel | IN | | [BOLT #2][bolt02-open] |
37-
| 6/7 | `gossip_queries` | ASSUMED | | | |
37+
| 6/7 | `gossip_queries` | Peer has useful gossip to share | | | |
3838
| 8/9 | `var_onion_optin` | ASSUMED | | | |
3939
| 10/11 | `gossip_queries_ex` | Gossip queries can include additional information | IN | | [BOLT #7][bolt07-query] |
4040
| 12/13 | `option_static_remotekey` | ASSUMED | | | |

0 commit comments

Comments
 (0)