core-lightning/connectd/connect_gossip_wire.csv
Rusty Russell 5591c0b5d8 gossipd: don't send gossip stream, let per-peer daemons read it themselves.
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>
2019-06-04 01:29:39 +00:00

731 B

1#include <common/per_peer_state.h>
2#include <common/wireaddr.h>
3# Communication between gossipd and connectd.
4gossip_new_peer,4000
5gossip_new_peer,,id,struct node_id
6# Did we negotiate LOCAL_GOSSIP_QUERIES?
7gossip_new_peer,,gossip_queries_feature,bool
8# Did they offer LOCAL_INITIAL_ROUTING_SYNC?
9gossip_new_peer,,initial_routing_sync,bool
10# if success: + gossip fd and gossip_store fd
11gossip_new_peer_reply,4100
12gossip_new_peer_reply,,success,bool
13gossip_new_peer_reply,,gs,?struct gossip_state
14# Connectd asks gossipd for any known addresses for that node.
15gossip_get_addrs,4001
16gossip_get_addrs,,id,struct node_id
17gossip_get_addrs_reply,4101
18gossip_get_addrs_reply,,num,u16
19gossip_get_addrs_reply,,addrs,num*struct wireaddr