mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
f5a218f9d1
Instead of reading the store ourselves, we can just send them an offset. This saves gossipd a lot of work, putting it where it belongs (in the daemon responsible for the specific peer). MCP bench results: store_load_msec:28509-31001(29206.6+/-9.4e+02) vsz_kb:580004-580016(580006+/-4.8) store_rewrite_sec:11.640000-12.730000(11.908+/-0.41) listnodes_sec:1.790000-1.880000(1.83+/-0.032) listchannels_sec:21.180000-21.950000(21.476+/-0.27) routing_sec:2.210000-11.160000(7.126+/-3.1) peer_write_all_sec:36.270000-41.200000(38.168+/-1.9) Signficant savings in streaming gossip: -peer_write_all_sec:48.160000-51.480000(49.608+/-1.1) +peer_write_all_sec:35.780000-37.980000(36.43+/-0.81) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1.6 KiB
1.6 KiB
1 | # Channel daemon can ask for updates for a specific channel, for sending |
---|---|
2 | # errors. Must be distinct from WIRE_CHANNEL_ANNOUNCEMENT etc. gossip msgs! |
3 | gossipd_get_update,3501 |
4 | gossipd_get_update,,short_channel_id,struct short_channel_id |
5 | # If channel isn't known, update will be empty. |
6 | gossipd_get_update_reply,3601 |
7 | gossipd_get_update_reply,,len,u16 |
8 | gossipd_get_update_reply,,update,len*u8 |
9 | # Gossipd can tell channeld etc about raw messages to fwd. |
10 | gossipd_send_gossip,3502 |
11 | gossipd_send_gossip,,len,u16 |
12 | gossipd_send_gossip,,gossip,len*u8 |
13 | # But usually gossipd just gives an offset into the gossip_store |
14 | gossipd_send_gossip_from_store,3506 |
15 | gossipd_send_gossip_from_store,,offset,u64 |
16 | # Both sides have seen the funding tx being locked, but we have not |
17 | # yet reached the announcement depth. So we add the channel locally so |
18 | # we (and peer) can update it already. |
19 | gossipd_local_add_channel,3503 |
20 | gossipd_local_add_channel,,short_channel_id,struct short_channel_id |
21 | gossipd_local_add_channel,,remote_node_id,struct node_id |
22 | gossipd_local_add_channel,,satoshis,struct amount_sat |
23 | # Send this channel_update. |
24 | gossipd_local_channel_update,3504 |
25 | gossipd_local_channel_update,,short_channel_id,struct short_channel_id |
26 | gossipd_local_channel_update,,disable,bool |
27 | gossipd_local_channel_update,,cltv_expiry_delta,u16 |
28 | gossipd_local_channel_update,,htlc_minimum_msat,struct amount_msat |
29 | gossipd_local_channel_update,,fee_base_msat,u32 |
30 | gossipd_local_channel_update,,fee_proportional_millionths,u32 |
31 | gossipd_local_channel_update,,htlc_maximum_msat,struct amount_msat |
32 | # Update your gossip_store fd: + gossip_store_fd |
33 | gossipd_new_store_fd,3505 |