Skip to content

Commit

Permalink
fixup! BOLT 9: Assume gossip_queries.
Browse files Browse the repository at this point in the history
Just demote it, so its absence means "I don't know anything useful".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Mar 25, 2024
1 parent 5e7a917 commit e0ee59f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions 07-routing-gossip.md
Expand Up @@ -575,6 +575,12 @@ be present, so `must_be_one` is a constant value, and ignored by receivers.

## Query Messages

Understanding of messages used to be indicated with the `gossip_queries`
feature bit; now these messages are universally supported, that feature has
now been slightly repurposed. Not offering this feature means a node is not
worth querying for gossip: either they do not store the entire gossip map, or
they are only connected to a single peer (this one).

There are several messages which contain a long array of
`short_channel_id`s (called `encoded_short_ids`) so we include an encoding byte
which allows for different encoding schemes to be defined in the future, if they
Expand Down Expand Up @@ -638,6 +644,7 @@ from `reply_channel_range`.
#### Requirements

The sender:
- SHOULD NOT send this to a peer which does not offer `gossip_queries`.
- 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`.
- MUST set `chain_hash` to the 32-byte hash that uniquely identifies the chain
that the `short_channel_id`s refer to.
Expand Down Expand Up @@ -778,6 +785,7 @@ This allows querying for channels within specific blocks.
#### Requirements

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

The receiver:
- SHOULD send all gossip messages whose `timestamp` is greater or
Expand Down
2 changes: 1 addition & 1 deletion 09-features.md
Expand Up @@ -34,7 +34,7 @@ The Context column decodes as follows:
|-------|-----------------------------------|-----------------------------------------------------------|----------|---------------------------|-----------------------------------------------------------------------|
| 0/1 | `option_data_loss_protect` | ASSUMED | | | |
| 4/5 | `option_upfront_shutdown_script` | Commits to a shutdown scriptpubkey when opening channel | IN | | [BOLT #2][bolt02-open] |
| 6/7 | `gossip_queries` | ASSUMED | | | |
| 6/7 | `gossip_queries` | Peer has useful gossip to share | | | |
| 8/9 | `var_onion_optin` | ASSUMED | | | |
| 10/11 | `gossip_queries_ex` | Gossip queries can include additional information | IN | | [BOLT #7][bolt07-query] |
| 12/13 | `option_static_remotekey` | ASSUMED | | | |
Expand Down

0 comments on commit e0ee59f

Please sign in to comment.