core-lightning/gossipd/gossip_store.csv
Rusty Russell 7ede5aac31 gossip_store: change format so we store raw messages.
Save some overhead, plus gets us ready for giving subdaemons direct
store access.  This is the first time we *upgrade* the gossip_store,
rather than just discarding.

The downside is that we need to add an extra message after each
channel_announcement, containing the channel capacity.

After:
  store_load_msec:28337-30288(28975+/-7.4e+02)
  vsz_kb:582304-582316(582306+/-4.8)
  store_rewrite_sec:11.240000-11.800000(11.55+/-0.21)
  listnodes_sec:1.800000-1.880000(1.84+/-0.028)
  listchannels_sec:22.690000-26.260000(23.878+/-1.3)
  routing_sec:2.280000-9.570000(6.842+/-2.8)
  peer_write_all_sec:48.160000-51.480000(49.608+/-1.1)

Differences:
  -vsz_kb:582320
  +vsz_kb:582316
  -listnodes_sec:2.100000-2.170000(2.118+/-0.026)
  +listnodes_sec:1.800000-1.880000(1.84+/-0.028)
  -peer_write_all_sec:51.600000-52.550000(52.188+/-0.34)
  +peer_write_all_sec:48.160000-51.480000(49.608+/-1.1)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-13 05:16:18 +00:00

1.0 KiB

1# gossip_store messages: messages persisted in the gossip_store
2# We store raw messages here, so these numbers must not overlap with
3# 256/257/258 or gossipd_local_add_channel (3503)
4# This always follows the channel_announce.
5gossip_store_channel_amount,4101
6gossip_store_channel_amount,,satoshis,struct amount_sat
7gossip_store_channel_delete,4099
8gossip_store_channel_delete,,short_channel_id,struct short_channel_id
9### Older v3 messages
10gossip_store_v3_channel_announcement,4096
11gossip_store_v3_channel_announcement,,len,u16
12gossip_store_v3_channel_announcement,,announcement,len*u8
13gossip_store_v3_channel_announcement,,satoshis,struct amount_sat
14gossip_store_v3_channel_update,4097
15gossip_store_v3_channel_update,,len,u16
16gossip_store_v3_channel_update,,update,len*u8
17gossip_store_v3_node_announcement,4098
18gossip_store_v3_node_announcement,,len,u16
19gossip_store_v3_node_announcement,,announcement,len*u8
20gossip_store_v3_local_add_channel,4100
21gossip_store_v3_local_add_channel,,len,u16
22gossip_store_v3_local_add_channel,,local_add,len*u8