Skip to content

Conversation

@rustyrussell
Copy link
Contributor

Found a bug where we were not keeping our gossip_store in order, when a channel was deleted and that was the last channel_announcement preceding a node_announcement. This is actually a little unusual, but it's now fixed.

@rustyrussell rustyrussell added this to the v26.03 milestone Dec 8, 2025
@rustyrussell rustyrussell added the 25.12.1 Point release for 25.12 label Dec 8, 2025
Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

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

ACK a6bd708

…ements.

We usually lose the node announcement on restart, because the
node_announcement message is ignored by gossmap, as it doesn't (yet!) know of the node, since the
channel_announcement does not precede the node_announcement.

This is supposed to be detected and fixed by gossipd, but this simple test shows that it is not!

```
FAILED tests/test_gossip.py::test_gossmap_lost_node - AssertionError: assert {'nodes': [{'nodeid': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'alias': 'SILENTARTIST-v25.12-2-g703851b', 'color': '022d22', 'last_timestamp': 1765172273, 'features': '8898880a8a59a1', 'addresses': []}, {'nodeid': '0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518', 'alias': 'JUNIORBEAM-v25.12-2-g703851b', 'color': '0266e4', 'last_timestamp': 1765172273, 'features': '8898880a8a59a1', 'addresses': []}, {'nodeid': '035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d'}, {'nodeid': '0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199', 'alias': 'JUNIORFELONY-v25.12-2-g703851b', 'color': '0382ce', 'last_timestamp': 1765172273, 'features': '8898880a8a59a1', 'addresses': []}]} == {'nodes': [{'nodeid': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'alias': 'SILENTARTIST-v25.12-2-g703851b', 'color': '022d22', 'last_timestamp': 1765172273, 'features': '8898880a8a59a1', 'addresses': []}, {'nodeid': '0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518', 'alias': 'JUNIORBEAM-v25.12-2-g703851b', 'color': '0266e4', 'last_timestamp': 1765172273, 'features': '8898880a8a59a1', 'addresses': []}, {'nodeid': '035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d', 'alias': 'HOPPINGFIRE-v25.12-2-g703851b', 'color': '035d2b', 'last_timestamp': 1765172273, 'features': '8898880a8a59a1', 'addresses': []}, {'nodeid': '0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199', 'alias': 'JUNIORFELONY-v25.12-2-g703851b', 'color': '0382ce', 'last_timestamp': 1765172273, 'features': '8898880a8a59a1', 'addresses': []}]}
  
  Differing items:
  {'nodes': [{'addresses': [], 'alias': 'SILENTARTIST-v25.12-2-g703851b', 'color': '022d22', 'features': '8898880a8a59a1...}, {'addresses': [], 'alias': 'JUNIORFELONY-v25.12-2-g703851b', 'color': '0382ce', 'features': '8898880a8a59a1', ...}]} != {'nodes': [{'addresses': [], 'alias': 'SILENTARTIST-v25.12-2-g703851b', 'color': '022d22', 'features': '8898880a8a59a1...}, {'addresses': [], 'alias': 'JUNIORFELONY-v25.12-2-g703851b', 'color': '0382ce', 'features': '8898880a8a59a1', ...}]}
  
  Full diff:
    {
        'nodes': [
            {
                'addresses': [],
                'alias': 'SILENTARTIST-v25.12-2-g703851b',
                'color': '022d22',
                'features': '8898880a8a59a1',
                'last_timestamp': 1765172273,
                'nodeid': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59',
            },
            {
                'addresses': [],
                'alias': 'JUNIORBEAM-v25.12-2-g703851b',
                'color': '0266e4',
                'features': '8898880a8a59a1',
                'last_timestamp': 1765172273,
                'nodeid': '0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518',
            },
            {
  -             'addresses': [],
  -             'alias': 'HOPPINGFIRE-v25.12-2-g703851b',
  -             'color': '035d2b',
  -             'features': '8898880a8a59a1',
  -             'last_timestamp': 1765172273,
                'nodeid': '035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d',
            },
            {
                'addresses': [],
                'alias': 'JUNIORFELONY-v25.12-2-g703851b',
                'color': '0382ce',
                'features': '8898880a8a59a1',
                'last_timestamp': 1765172273,
                'nodeid': '0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199',
            },
        ],
    }

```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…nel preceeds it in the gossip store.

We had the test backwards, so we moved it *all the time*.  This bloats our gossip store, as well as
not moving it in the case where we need to.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: gossipd: we would occasionally not show a node announcement in listnodes().
@endothermicdev endothermicdev force-pushed the fix-gossipd-node_announcement-ordering branch from 748feaf to a8b8ea4 Compare December 16, 2025 20:45
@endothermicdev
Copy link
Collaborator

rebased on master

@madelinevibes madelinevibes merged commit f0e9547 into ElementsProject:master Dec 17, 2025
83 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants