mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
a2fa699e0e
I tried to just do gossipd, but it was uncontainable, so this ended up being a complete sweep. We didn't get much space saving in gossipd, even though we should save 24 bytes per node. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
5.4 KiB
5.4 KiB
1 | #include <common/cryptomsg.h> |
---|---|
2 | #include <common/wireaddr.h> |
3 | #include <wire/gen_onion_wire.h> |
4 | # Initialize the gossip daemon. |
5 | gossipctl_init,3000 |
6 | gossipctl_init,,broadcast_interval_msec,u32 |
7 | gossipctl_init,,chain_hash,struct bitcoin_blkid |
8 | gossipctl_init,,id,struct node_id |
9 | gossipctl_init,,gflen,u16 |
10 | gossipctl_init,,globalfeatures,gflen*u8 |
11 | gossipctl_init,,rgb,3*u8 |
12 | gossipctl_init,,alias,32*u8 |
13 | gossipctl_init,,update_channel_interval,u32 |
14 | gossipctl_init,,num_announcable,u16 |
15 | gossipctl_init,,announcable,num_announcable*struct wireaddr |
16 | gossipctl_init,,dev_gossip_time,?u32 |
17 | gossipctl_init,,dev_unknown_channel_satoshis,?struct amount_sat |
18 | # Pass JSON-RPC getnodes call through |
19 | gossip_getnodes_request,3005 |
20 | gossip_getnodes_request,,id,?struct node_id |
21 | #include <lightningd/gossip_msg.h> |
22 | gossip_getnodes_reply,3105 |
23 | gossip_getnodes_reply,,num_nodes,u32 |
24 | gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry |
25 | # Pass JSON-RPC getroute call through |
26 | gossip_getroute_request,3006 |
27 | gossip_getroute_request,,source,struct node_id |
28 | gossip_getroute_request,,destination,struct node_id |
29 | gossip_getroute_request,,msatoshi,struct amount_msat |
30 | # We don't pass doubles, so pass riskfactor * 1000000. |
31 | gossip_getroute_request,,riskfactor_by_million,u64 |
32 | gossip_getroute_request,,final_cltv,u32 |
33 | gossip_getroute_request,,fuzz,double |
34 | gossip_getroute_request,,num_excluded,u16 |
35 | gossip_getroute_request,,excluded,num_excluded*struct short_channel_id_dir |
36 | gossip_getroute_request,,max_hops,u32 |
37 | gossip_getroute_reply,3106 |
38 | gossip_getroute_reply,,num_hops,u16 |
39 | gossip_getroute_reply,,hops,num_hops*struct route_hop |
40 | gossip_getchannels_request,3007 |
41 | gossip_getchannels_request,,short_channel_id,?struct short_channel_id |
42 | gossip_getchannels_request,,source,?struct node_id |
43 | gossip_getchannels_reply,3107 |
44 | gossip_getchannels_reply,,num_channels,u32 |
45 | gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry |
46 | # Ping/pong test. Waits for a reply if it expects one. |
47 | gossip_ping,3008 |
48 | gossip_ping,,id,struct node_id |
49 | gossip_ping,,num_pong_bytes,u16 |
50 | gossip_ping,,len,u16 |
51 | gossip_ping_reply,3108 |
52 | gossip_ping_reply,,id,struct node_id |
53 | # False if id in gossip_ping was unknown. |
54 | gossip_ping_reply,,sent,bool |
55 | # 0 == no pong expected |
56 | gossip_ping_reply,,totlen,u16 |
57 | # Test of query_short_channel_ids. Master->gossipd |
58 | gossip_query_scids,3031 |
59 | gossip_query_scids,,id,struct node_id |
60 | gossip_query_scids,,num_ids,u16 |
61 | gossip_query_scids,,ids,num_ids*struct short_channel_id |
62 | # Gossipd -> master |
63 | gossip_scids_reply,3131 |
64 | gossip_scids_reply,,ok,bool |
65 | gossip_scids_reply,,complete,bool |
66 | # Test gossip timestamp filtering. |
67 | gossip_send_timestamp_filter,3028 |
68 | gossip_send_timestamp_filter,,id,struct node_id |
69 | gossip_send_timestamp_filter,,first_timestamp,u32 |
70 | gossip_send_timestamp_filter,,timestamp_range,u32 |
71 | # Test of query_channel_range. Master->gossipd |
72 | gossip_query_channel_range,3029 |
73 | gossip_query_channel_range,,id,struct node_id |
74 | gossip_query_channel_range,,first_blocknum,u32 |
75 | gossip_query_channel_range,,number_of_blocks,u32 |
76 | # Gossipd -> master |
77 | gossip_query_channel_range_reply,3129 |
78 | gossip_query_channel_range_reply,,final_first_block,u32 |
79 | gossip_query_channel_range_reply,,final_num_blocks,u32 |
80 | gossip_query_channel_range_reply,,final_complete,bool |
81 | gossip_query_channel_range_reply,,num,u16 |
82 | gossip_query_channel_range_reply,,scids,num*struct short_channel_id |
83 | # Set artificial maximum reply_channel_range size. Master->gossipd |
84 | gossip_dev_set_max_scids_encode_size,3030 |
85 | gossip_dev_set_max_scids_encode_size,,max,u32 |
86 | # Given a short_channel_id, return the other endpoint (or none if DNE) |
87 | gossip_get_channel_peer,3009 |
88 | gossip_get_channel_peer,,channel_id,struct short_channel_id |
89 | gossip_get_channel_peer_reply,3109 |
90 | gossip_get_channel_peer_reply,,peer_id,?struct node_id |
91 | # gossipd->master: we're closing this channel. |
92 | gossip_local_channel_close,3027 |
93 | gossip_local_channel_close,,short_channel_id,struct short_channel_id |
94 | # Gossipd->master get this tx output please. |
95 | gossip_get_txout,3018 |
96 | gossip_get_txout,,short_channel_id,struct short_channel_id |
97 | # master->gossipd here is the output, or empty if none. |
98 | gossip_get_txout_reply,3118 |
99 | gossip_get_txout_reply,,short_channel_id,struct short_channel_id |
100 | gossip_get_txout_reply,,satoshis,struct amount_sat |
101 | gossip_get_txout_reply,,len,u16 |
102 | gossip_get_txout_reply,,outscript,len*u8 |
103 | # master->gossipd an htlc failed with this onion error. |
104 | gossip_payment_failure,3021 |
105 | gossip_payment_failure,,erring_node,struct node_id |
106 | gossip_payment_failure,,erring_channel,struct short_channel_id |
107 | gossip_payment_failure,,erring_channel_direction,u8 |
108 | gossip_payment_failure,,len,u16 |
109 | gossip_payment_failure,,error,len*u8 |
110 | # master -> gossipd: a potential funding outpoint was spent, please forget the eventual channel |
111 | gossip_outpoint_spent,3024 |
112 | gossip_outpoint_spent,,short_channel_id,struct short_channel_id |
113 | # master -> gossipd: stop gossip timers. |
114 | gossip_dev_suppress,3032 |
115 | # master -> gossipd: do you have a memleak? |
116 | gossip_dev_memleak,3033 |
117 | gossip_dev_memleak_reply,3133 |
118 | gossip_dev_memleak_reply,,leak,bool |
119 | # master -> gossipd: please rewrite the gossip_store |
120 | gossip_dev_compact_store,3034 |
121 | # gossipd -> master: ok |
122 | gossip_dev_compact_store_reply,3134 |
123 | gossip_dev_compact_store_reply,,success,bool |
124 | #include <common/bolt11.h> |
125 | # master -> gossipd: get route_info for our incoming channels |
126 | gossip_get_incoming_channels,3025 |
127 | gossip_get_incoming_channels,,private_too,?bool |
128 | # gossipd -> master: here they are. |
129 | gossip_get_incoming_channels_reply,3125 |
130 | gossip_get_incoming_channels_reply,,num,u16 |
131 | gossip_get_incoming_channels_reply,,route_info,num*struct route_info |