mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-03 20:44:54 +01:00
5591c0b5d8
Keeping the uintmap ordering all the broadcastable messages is expensive: 130MB for the million-channels project. But now we delete obsolete entries from the store, we can have the per-peer daemons simply read that sequentially and stream the gossip itself. This is the most primitive version, where all gossip is streamed; successive patches will bring back proper handling of timestamp filtering and initial_routing_sync. We add a gossip_state field to track what's happening with our gossip streaming: it's initialized in gossipd, and currently always set, but once we handle timestamps the per-peer daemon may do it when the first filter is sent. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
731 B
731 B
1 | #include <common/per_peer_state.h> |
---|---|
2 | #include <common/wireaddr.h> |
3 | # Communication between gossipd and connectd. |
4 | gossip_new_peer,4000 |
5 | gossip_new_peer,,id,struct node_id |
6 | # Did we negotiate LOCAL_GOSSIP_QUERIES? |
7 | gossip_new_peer,,gossip_queries_feature,bool |
8 | # Did they offer LOCAL_INITIAL_ROUTING_SYNC? |
9 | gossip_new_peer,,initial_routing_sync,bool |
10 | # if success: + gossip fd and gossip_store fd |
11 | gossip_new_peer_reply,4100 |
12 | gossip_new_peer_reply,,success,bool |
13 | gossip_new_peer_reply,,gs,?struct gossip_state |
14 | # Connectd asks gossipd for any known addresses for that node. |
15 | gossip_get_addrs,4001 |
16 | gossip_get_addrs,,id,struct node_id |
17 | gossip_get_addrs_reply,4101 |
18 | gossip_get_addrs_reply,,num,u16 |
19 | gossip_get_addrs_reply,,addrs,num*struct wireaddr |