mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
45533584e2
Get with the modern nomenclature: the pubkey inside a blinded path is called the `path_key` now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7.1 KiB
7.1 KiB
1 | #include <bitcoin/block.h> |
---|---|
2 | #include <common/channel_id.h> |
3 | #include <common/cryptomsg.h> |
4 | #include <common/features.h> |
5 | #include <common/node_id.h> |
6 | #include <common/wireaddr.h> |
7 | #include <wire/onion_wire.h> |
8 | msgtype,connectd_init,2000 |
9 | msgdata,connectd_init,chainparams,chainparams, |
10 | msgdata,connectd_init,our_features,feature_set, |
11 | msgdata,connectd_init,id,node_id, |
12 | msgdata,connectd_init,num_wireaddrs,u16, |
13 | msgdata,connectd_init,wireaddrs,wireaddr_internal,num_wireaddrs |
14 | msgdata,connectd_init,listen_announce,enum addr_listen_announce,num_wireaddrs |
15 | msgdata,connectd_init,tor_proxyaddr,?wireaddr, |
16 | msgdata,connectd_init,use_tor_proxy_always,bool, |
17 | msgdata,connectd_init,dev_allow_localhost,bool, |
18 | msgdata,connectd_init,use_dns,bool, |
19 | msgdata,connectd_init,tor_password,wirestring, |
20 | msgdata,connectd_init,timeout_secs,u32, |
21 | msgdata,connectd_init,websocket_helper,wirestring, |
22 | msgdata,connectd_init,announce_websocket,bool, |
23 | msgdata,connectd_init,dev_fast_gossip,bool, |
24 | # If this is set, then fd 5 is dev_disconnect_fd. |
25 | msgdata,connectd_init,dev_disconnect,bool, |
26 | msgdata,connectd_init,dev_no_ping_timer,bool, |
27 | # Allow incoming connections, but don't talk. |
28 | msgdata,connectd_init,dev_noreply,bool, |
29 | msgdata,connectd_init,dev_throttle_gossip,bool, |
30 | # Connectd->master, here are the addresses I bound, can announce. |
31 | msgtype,connectd_init_reply,2100 |
32 | msgdata,connectd_init_reply,num_bindings,u16, |
33 | msgdata,connectd_init_reply,bindings,wireaddr_internal,num_bindings |
34 | msgdata,connectd_init_reply,num_announceable,u16, |
35 | msgdata,connectd_init_reply,announceable,wireaddr,num_announceable |
36 | msgdata,connectd_init_reply,failmsg,?wirestring, |
37 | # Activate the connect daemon, so others can connect. |
38 | msgtype,connectd_activate,2025 |
39 | # Do we listen? |
40 | msgdata,connectd_activate,listen,bool, |
41 | # Set the allowed (i.e. don't hang up on!) unknown messages. |
42 | msgtype,connectd_set_custommsgs,2007 |
43 | msgdata,connectd_set_custommsgs,len,u32, |
44 | msgdata,connectd_set_custommsgs,msgnums,u16,len |
45 | # Connectd->master, I am ready. |
46 | msgtype,connectd_activate_reply,2125 |
47 | msgdata,connectd_activate_reply,failmsg,?wirestring, |
48 | # lightningd -> connectd: here's an SCID->peer mapping for onion messages |
49 | msgtype,connectd_scid_map,2024 |
50 | msgdata,connectd_scid_map,scid,short_channel_id, |
51 | msgdata,connectd_scid_map,node_id,node_id, |
52 | # Master -> connectd: connect to a peer. |
53 | msgtype,connectd_connect_to_peer,2001 |
54 | msgdata,connectd_connect_to_peer,id,node_id, |
55 | msgdata,connectd_connect_to_peer,len,u32, |
56 | msgdata,connectd_connect_to_peer,addrs,wireaddr,len |
57 | msgdata,connectd_connect_to_peer,addrhint,?wireaddr_internal, |
58 | msgdata,connectd_connect_to_peer,dns_fallback,bool, |
59 | msgdata,connectd_connect_to_peer,transient,bool, |
60 | # Connectd->master: connect failed. |
61 | msgtype,connectd_connect_failed,2020 |
62 | msgdata,connectd_connect_failed,id,node_id, |
63 | msgdata,connectd_connect_failed,failcode,enum jsonrpc_errcode, |
64 | msgdata,connectd_connect_failed,failreason,wirestring, |
65 | msgdata,connectd_connect_failed,addrhint,?wireaddr_internal, |
66 | # Connectd -> master: we got a peer. |
67 | msgtype,connectd_peer_connected,2002 |
68 | msgdata,connectd_peer_connected,id,node_id, |
69 | msgdata,connectd_peer_connected,counter,u64, |
70 | msgdata,connectd_peer_connected,addr,wireaddr_internal, |
71 | msgdata,connectd_peer_connected,remote_addr,?wireaddr, |
72 | msgdata,connectd_peer_connected,incoming,bool, |
73 | msgdata,connectd_peer_connected,flen,u16, |
74 | msgdata,connectd_peer_connected,features,u8,flen |
75 | # connectd -> master: peer disconnected. |
76 | msgtype,connectd_peer_disconnect_done,2006 |
77 | msgdata,connectd_peer_disconnect_done,id,node_id, |
78 | msgdata,connectd_peer_disconnect_done,counter,u64, |
79 | # Master -> connectd: make peer active immediately (we want to talk) (+ fd to subd). |
80 | msgtype,connectd_peer_connect_subd,2004 |
81 | msgdata,connectd_peer_connect_subd,id,node_id, |
82 | msgdata,connectd_peer_connect_subd,counter,u64, |
83 | msgdata,connectd_peer_connect_subd,channel_id,channel_id, |
84 | # Connectd -> master: peer said something interesting |
85 | msgtype,connectd_peer_spoke,2005 |
86 | msgdata,connectd_peer_spoke,id,node_id, |
87 | msgdata,connectd_peer_spoke,counter,u64, |
88 | msgdata,connectd_peer_spoke,msgtype,u16, |
89 | msgdata,connectd_peer_spoke,channel_id,channel_id, |
90 | # If msgtype == WIRE_ERROR, this is the string. |
91 | msgdata,connectd_peer_spoke,error,?wirestring, |
92 | # master -> connectd: peer no longer wanted, you can disconnect. |
93 | msgtype,connectd_discard_peer,2015 |
94 | msgdata,connectd_discard_peer,id,node_id, |
95 | msgdata,connectd_discard_peer,counter,u64, |
96 | # master -> connectd: give message to peer. |
97 | msgtype,connectd_peer_send_msg,2003 |
98 | msgdata,connectd_peer_send_msg,id,node_id, |
99 | msgdata,connectd_peer_send_msg,counter,u64, |
100 | msgdata,connectd_peer_send_msg,len,u16, |
101 | msgdata,connectd_peer_send_msg,msg,u8,len |
102 | # master -> connectd: do you have a memleak? |
103 | msgtype,connectd_dev_memleak,2033 |
104 | msgtype,connectd_dev_memleak_reply,2133 |
105 | msgdata,connectd_dev_memleak_reply,leak,bool, |
106 | # master -> connectd: dump status of your fds. |
107 | msgtype,connectd_dev_report_fds,2034 |
108 | # Ping/pong test. Waits for a reply if it expects one. |
109 | msgtype,connectd_ping,2030 |
110 | msgdata,connectd_ping,id,node_id, |
111 | msgdata,connectd_ping,num_pong_bytes,u16, |
112 | msgdata,connectd_ping,len,u16, |
113 | msgtype,connectd_ping_reply,2130 |
114 | # False if we there was already a ping in progress. |
115 | msgdata,connectd_ping_reply,sent,bool, |
116 | # 0 == no pong expected, otherwise length of pong. |
117 | msgdata,connectd_ping_reply,totlen,u16, |
118 | # We tell lightningd we got an onionmsg |
119 | msgtype,connectd_got_onionmsg_to_us,2145 |
120 | msgdata,connectd_got_onionmsg_to_us,path_secret,?secret, |
121 | msgdata,connectd_got_onionmsg_to_us,reply,?blinded_path, |
122 | msgdata,connectd_got_onionmsg_to_us,rawmsg_len,u16, |
123 | msgdata,connectd_got_onionmsg_to_us,rawmsg,u8,rawmsg_len |
124 | # Lightningd tells us to send an onion message. |
125 | msgtype,connectd_send_onionmsg,2041 |
126 | msgdata,connectd_send_onionmsg,id,node_id, |
127 | msgdata,connectd_send_onionmsg,onion_len,u16, |
128 | msgdata,connectd_send_onionmsg,onion,u8,onion_len |
129 | msgdata,connectd_send_onionmsg,path_key,pubkey, |
130 | # Lightningd tells us to digest an onion message. |
131 | msgtype,connectd_inject_onionmsg,2042 |
132 | msgdata,connectd_inject_onionmsg,path_key,pubkey, |
133 | msgdata,connectd_inject_onionmsg,onion_len,u16, |
134 | msgdata,connectd_inject_onionmsg,onion,u8,onion_len |
135 | # Reply. If error isn't empty, something went wrong. |
136 | msgtype,connectd_inject_onionmsg_reply,2142 |
137 | msgdata,connectd_inject_onionmsg_reply,err,wirestring, |
138 | # A custom message that we got from a peer and don't know how to handle, so we |
139 | # forward it to the master for further handling. |
140 | msgtype,connectd_custommsg_in,2110 |
141 | msgdata,connectd_custommsg_in,id,node_id, |
142 | msgdata,connectd_custommsg_in,msg_len,u16, |
143 | msgdata,connectd_custommsg_in,msg,u8,msg_len |
144 | # A custom message that the lightningd tells us to send to the peer. |
145 | msgtype,connectd_custommsg_out,2011 |
146 | msgdata,connectd_custommsg_out,id,node_id, |
147 | msgdata,connectd_custommsg_out,msg_len,u16, |
148 | msgdata,connectd_custommsg_out,msg,u8,msg_len |
149 | # master -> connectd: we're shutting down, no new connections. |
150 | msgtype,connectd_start_shutdown,2031 |
151 | # connect - >master: acknowledged. |
152 | msgtype,connectd_start_shutdown_reply,2131 |
153 | # master -> connect: stop sending gossip. |
154 | msgtype,connectd_dev_suppress_gossip,2032 |
155 | # master -> connect: waste all your fds. |
156 | msgtype,connectd_dev_exhaust_fds,2036 |
157 | # master -> connect: set artificial maximum reply_channel_range size. |
158 | msgtype,connectd_dev_set_max_scids_encode_size,2035 |
159 | msgdata,connectd_dev_set_max_scids_encode_size,max,u32, |