Skip to content

BOLT 7: add reader requirement on canonical node id ordering.#1333

Merged
Roasbeef merged 1 commit into
lightning:masterfrom
rustyrussell:gossip-node-check
May 4, 2026
Merged

BOLT 7: add reader requirement on canonical node id ordering.#1333
Roasbeef merged 1 commit into
lightning:masterfrom
rustyrussell:gossip-node-check

Conversation

@rustyrussell

Copy link
Copy Markdown
Collaborator

We require this for writers, but omitted it for readers:

  - MUST set `node_id_1` and `node_id_2` to the public keys of the two nodes
  operating the channel, such that `node_id_1` is the lexicographically-lesser of the
  two compressed keys sorted in ascending lexicographic order.

We require this for writers, but omitted it for readers:

```
  - MUST set `node_id_1` and `node_id_2` to the public keys of the two nodes
  operating the channel, such that `node_id_1` is the lexicographically-lesser of the
  two compressed keys sorted in ascending lexicographic order.
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
sangbida pushed a commit to ElementsProject/lightning that referenced this pull request Apr 24, 2026
…d node-ids.

See lightning/bolts#1333

Every reader of the gossip_store gets upset, and we get many errors if this happens :(

Reported-by: https://github.com/NishantBansal2003
Changelog-Fixed: Protocol: We correctly reject invalidly ordered channel_announcement messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
sangbida pushed a commit to sangbida/lightning that referenced this pull request Apr 24, 2026
…d node-ids.

See lightning/bolts#1333

Every reader of the gossip_store gets upset, and we get many errors if this happens :(

Reported-by: https://github.com/NishantBansal2003
Changelog-Fixed: Protocol: We correctly reject invalidly ordered channel_announcement messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

@Roasbeef Roasbeef left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍇

@Roasbeef
Roasbeef merged commit 915d215 into lightning:master May 4, 2026
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this pull request May 11, 2026
We already enforced that nodes can't have a chanel with themselves,
but the spec was updated to require strict ordering at
lightning/bolts#1333 so we enforce this as
well.
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this pull request May 12, 2026
We already enforced that nodes can't have a chanel with themselves,
but the spec was updated to require strict ordering at
lightning/bolts#1333 so we enforce this as
well.

Test fixes by claude.
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this pull request May 21, 2026
We already enforced that nodes can't have a chanel with themselves,
but the spec was updated to require strict ordering at
lightning/bolts#1333 so we enforce this as
well.

Test fixes by claude.
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this pull request May 21, 2026
We already enforced that nodes can't have a chanel with themselves,
but the spec was updated to require strict ordering at
lightning/bolts#1333 so we enforce this as
well.

Test fixes by claude.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants