mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
abd01a1701
Now it's formatted properly, we don't need the patch. But we need to explicitly marshal/unmarshal into a byte stream, which involves some code rearrangement. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
15 KiB
15 KiB
1 | msgtype,init,16 |
---|---|
2 | msgdata,init,gflen,u16, |
3 | msgdata,init,globalfeatures,byte,gflen |
4 | msgdata,init,flen,u16, |
5 | msgdata,init,features,byte,flen |
6 | msgdata,init,tlvs,init_tlvs, |
7 | tlvtype,init_tlvs,networks,1 |
8 | tlvdata,init_tlvs,networks,chains,chain_hash,... |
9 | tlvtype,init_tlvs,remote_addr,3 |
10 | tlvdata,init_tlvs,remote_addr,data,byte,... |
11 | msgtype,error,17 |
12 | msgdata,error,channel_id,channel_id, |
13 | msgdata,error,len,u16, |
14 | msgdata,error,data,byte,len |
15 | msgtype,warning,1 |
16 | msgdata,warning,channel_id,channel_id, |
17 | msgdata,warning,len,u16, |
18 | msgdata,warning,data,byte,len |
19 | msgtype,ping,18 |
20 | msgdata,ping,num_pong_bytes,u16, |
21 | msgdata,ping,byteslen,u16, |
22 | msgdata,ping,ignored,byte,byteslen |
23 | msgtype,pong,19 |
24 | msgdata,pong,byteslen,u16, |
25 | msgdata,pong,ignored,byte,byteslen |
26 | tlvtype,n1,tlv1,1 |
27 | tlvdata,n1,tlv1,amount_msat,tu64, |
28 | tlvtype,n1,tlv2,2 |
29 | tlvdata,n1,tlv2,scid,short_channel_id, |
30 | tlvtype,n1,tlv3,3 |
31 | tlvdata,n1,tlv3,node_id,point, |
32 | tlvdata,n1,tlv3,amount_msat_1,u64, |
33 | tlvdata,n1,tlv3,amount_msat_2,u64, |
34 | tlvtype,n1,tlv4,254 |
35 | tlvdata,n1,tlv4,cltv_delta,u16, |
36 | tlvtype,n2,tlv1,0 |
37 | tlvdata,n2,tlv1,amount_msat,tu64, |
38 | tlvtype,n2,tlv2,11 |
39 | tlvdata,n2,tlv2,cltv_expiry,tu32, |
40 | msgtype,tx_add_input,66 |
41 | msgdata,tx_add_input,channel_id,channel_id, |
42 | msgdata,tx_add_input,serial_id,u64, |
43 | msgdata,tx_add_input,prevtx_len,u16, |
44 | msgdata,tx_add_input,prevtx,byte,prevtx_len |
45 | msgdata,tx_add_input,prevtx_vout,u32, |
46 | msgdata,tx_add_input,sequence,u32, |
47 | msgdata,tx_add_input,script_sig_len,u16, |
48 | msgdata,tx_add_input,script_sig,byte,script_sig_len |
49 | msgtype,tx_add_output,67 |
50 | msgdata,tx_add_output,channel_id,channel_id, |
51 | msgdata,tx_add_output,serial_id,u64, |
52 | msgdata,tx_add_output,sats,u64, |
53 | msgdata,tx_add_output,scriptlen,u16, |
54 | msgdata,tx_add_output,script,byte,scriptlen |
55 | msgtype,tx_remove_input,68 |
56 | msgdata,tx_remove_input,channel_id,channel_id, |
57 | msgdata,tx_remove_input,serial_id,u64, |
58 | msgtype,tx_remove_output,69 |
59 | msgdata,tx_remove_output,channel_id,channel_id, |
60 | msgdata,tx_remove_output,serial_id,u64, |
61 | msgtype,tx_complete,70 |
62 | msgdata,tx_complete,channel_id,channel_id, |
63 | msgtype,tx_signatures,71 |
64 | msgdata,tx_signatures,channel_id,channel_id, |
65 | msgdata,tx_signatures,txid,sha256, |
66 | msgdata,tx_signatures,num_witnesses,u16, |
67 | msgdata,tx_signatures,witness_stack,witness_stack,num_witnesses |
68 | subtype,witness_stack |
69 | subtypedata,witness_stack,num_input_witness,u16, |
70 | subtypedata,witness_stack,witness_element,witness_element,num_input_witness |
71 | subtype,witness_element |
72 | subtypedata,witness_element,len,u16, |
73 | subtypedata,witness_element,witness,byte,len |
74 | msgtype,open_channel,32 |
75 | msgdata,open_channel,chain_hash,chain_hash, |
76 | msgdata,open_channel,temporary_channel_id,byte,32 |
77 | msgdata,open_channel,funding_satoshis,u64, |
78 | msgdata,open_channel,push_msat,u64, |
79 | msgdata,open_channel,dust_limit_satoshis,u64, |
80 | msgdata,open_channel,max_htlc_value_in_flight_msat,u64, |
81 | msgdata,open_channel,channel_reserve_satoshis,u64, |
82 | msgdata,open_channel,htlc_minimum_msat,u64, |
83 | msgdata,open_channel,feerate_per_kw,u32, |
84 | msgdata,open_channel,to_self_delay,u16, |
85 | msgdata,open_channel,max_accepted_htlcs,u16, |
86 | msgdata,open_channel,funding_pubkey,point, |
87 | msgdata,open_channel,revocation_basepoint,point, |
88 | msgdata,open_channel,payment_basepoint,point, |
89 | msgdata,open_channel,delayed_payment_basepoint,point, |
90 | msgdata,open_channel,htlc_basepoint,point, |
91 | msgdata,open_channel,first_per_commitment_point,point, |
92 | msgdata,open_channel,channel_flags,byte, |
93 | msgdata,open_channel,tlvs,open_channel_tlvs, |
94 | tlvtype,open_channel_tlvs,upfront_shutdown_script,0 |
95 | tlvdata,open_channel_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,... |
96 | tlvtype,open_channel_tlvs,channel_type,1 |
97 | tlvdata,open_channel_tlvs,channel_type,type,byte,... |
98 | msgtype,accept_channel,33 |
99 | msgdata,accept_channel,temporary_channel_id,byte,32 |
100 | msgdata,accept_channel,dust_limit_satoshis,u64, |
101 | msgdata,accept_channel,max_htlc_value_in_flight_msat,u64, |
102 | msgdata,accept_channel,channel_reserve_satoshis,u64, |
103 | msgdata,accept_channel,htlc_minimum_msat,u64, |
104 | msgdata,accept_channel,minimum_depth,u32, |
105 | msgdata,accept_channel,to_self_delay,u16, |
106 | msgdata,accept_channel,max_accepted_htlcs,u16, |
107 | msgdata,accept_channel,funding_pubkey,point, |
108 | msgdata,accept_channel,revocation_basepoint,point, |
109 | msgdata,accept_channel,payment_basepoint,point, |
110 | msgdata,accept_channel,delayed_payment_basepoint,point, |
111 | msgdata,accept_channel,htlc_basepoint,point, |
112 | msgdata,accept_channel,first_per_commitment_point,point, |
113 | msgdata,accept_channel,tlvs,accept_channel_tlvs, |
114 | tlvtype,accept_channel_tlvs,upfront_shutdown_script,0 |
115 | tlvdata,accept_channel_tlvs,upfront_shutdown_script,shutdown_scriptpubkey,byte,... |
116 | tlvtype,accept_channel_tlvs,channel_type,1 |
117 | tlvdata,accept_channel_tlvs,channel_type,type,byte,... |
118 | msgtype,funding_created,34 |
119 | msgdata,funding_created,temporary_channel_id,byte,32 |
120 | msgdata,funding_created,funding_txid,sha256, |
121 | msgdata,funding_created,funding_output_index,u16, |
122 | msgdata,funding_created,signature,signature, |
123 | msgtype,funding_signed,35 |
124 | msgdata,funding_signed,channel_id,channel_id, |
125 | msgdata,funding_signed,signature,signature, |
126 | msgtype,funding_locked,36 |
127 | msgdata,funding_locked,channel_id,channel_id, |
128 | msgdata,funding_locked,next_per_commitment_point,point, |
129 | msgtype,open_channel2,64 |
130 | msgdata,open_channel2,chain_hash,chain_hash, |
131 | msgdata,open_channel2,channel_id,channel_id, |
132 | msgdata,open_channel2,funding_feerate_perkw,u32, |
133 | msgdata,open_channel2,commitment_feerate_perkw,u32, |
134 | msgdata,open_channel2,funding_satoshis,u64, |
135 | msgdata,open_channel2,dust_limit_satoshis,u64, |
136 | msgdata,open_channel2,max_htlc_value_in_flight_msat,u64, |
137 | msgdata,open_channel2,htlc_minimum_msat,u64, |
138 | msgdata,open_channel2,to_self_delay,u16, |
139 | msgdata,open_channel2,max_accepted_htlcs,u16, |
140 | msgdata,open_channel2,locktime,u32, |
141 | msgdata,open_channel2,funding_pubkey,point, |
142 | msgdata,open_channel2,revocation_basepoint,point, |
143 | msgdata,open_channel2,payment_basepoint,point, |
144 | msgdata,open_channel2,delayed_payment_basepoint,point, |
145 | msgdata,open_channel2,htlc_basepoint,point, |
146 | msgdata,open_channel2,first_per_commitment_point,point, |
147 | msgdata,open_channel2,channel_flags,byte, |
148 | msgdata,open_channel2,tlvs,opening_tlvs, |
149 | tlvtype,opening_tlvs,option_upfront_shutdown_script,1 |
150 | tlvdata,opening_tlvs,option_upfront_shutdown_script,shutdown_len,u16, |
151 | tlvdata,opening_tlvs,option_upfront_shutdown_script,shutdown_scriptpubkey,byte,shutdown_len |
152 | tlvtype,opening_tlvs,request_funds,3 |
153 | tlvdata,opening_tlvs,request_funds,requested_sats,u64, |
154 | tlvdata,opening_tlvs,request_funds,blockheight,u32, |
155 | msgtype,accept_channel2,65 |
156 | msgdata,accept_channel2,channel_id,channel_id, |
157 | msgdata,accept_channel2,funding_satoshis,u64, |
158 | msgdata,accept_channel2,dust_limit_satoshis,u64, |
159 | msgdata,accept_channel2,max_htlc_value_in_flight_msat,u64, |
160 | msgdata,accept_channel2,htlc_minimum_msat,u64, |
161 | msgdata,accept_channel2,minimum_depth,u32, |
162 | msgdata,accept_channel2,to_self_delay,u16, |
163 | msgdata,accept_channel2,max_accepted_htlcs,u16, |
164 | msgdata,accept_channel2,funding_pubkey,point, |
165 | msgdata,accept_channel2,revocation_basepoint,point, |
166 | msgdata,accept_channel2,payment_basepoint,point, |
167 | msgdata,accept_channel2,delayed_payment_basepoint,point, |
168 | msgdata,accept_channel2,htlc_basepoint,point, |
169 | msgdata,accept_channel2,first_per_commitment_point,point, |
170 | msgdata,accept_channel2,tlvs,accept_tlvs, |
171 | tlvtype,accept_tlvs,option_upfront_shutdown_script,1 |
172 | tlvdata,accept_tlvs,option_upfront_shutdown_script,shutdown_len,u16, |
173 | tlvdata,accept_tlvs,option_upfront_shutdown_script,shutdown_scriptpubkey,byte,shutdown_len |
174 | tlvtype,accept_tlvs,will_fund,2 |
175 | tlvdata,accept_tlvs,will_fund,signature,signature, |
176 | tlvdata,accept_tlvs,will_fund,lease_rates,lease_rates, |
177 | subtype,lease_rates |
178 | subtypedata,lease_rates,funding_weight,u16, |
179 | subtypedata,lease_rates,lease_fee_basis,u16, |
180 | subtypedata,lease_rates,channel_fee_max_proportional_thousandths,u16, |
181 | subtypedata,lease_rates,lease_fee_base_sat,u32, |
182 | subtypedata,lease_rates,channel_fee_max_base_msat,tu32, |
183 | msgtype,init_rbf,72 |
184 | msgdata,init_rbf,channel_id,channel_id, |
185 | msgdata,init_rbf,funding_satoshis,u64, |
186 | msgdata,init_rbf,locktime,u32, |
187 | msgdata,init_rbf,funding_feerate_perkw,u32, |
188 | msgtype,ack_rbf,73 |
189 | msgdata,ack_rbf,channel_id,channel_id, |
190 | msgdata,ack_rbf,funding_satoshis,u64, |
191 | msgtype,shutdown,38 |
192 | msgdata,shutdown,channel_id,channel_id, |
193 | msgdata,shutdown,len,u16, |
194 | msgdata,shutdown,scriptpubkey,byte,len |
195 | msgdata,shutdown,tlvs,shutdown_tlvs, |
196 | tlvtype,shutdown_tlvs,wrong_funding,100 |
197 | tlvdata,shutdown_tlvs,wrong_funding,txid,sha256, |
198 | tlvdata,shutdown_tlvs,wrong_funding,outnum,u32, |
199 | msgtype,closing_signed,39 |
200 | msgdata,closing_signed,channel_id,channel_id, |
201 | msgdata,closing_signed,fee_satoshis,u64, |
202 | msgdata,closing_signed,signature,signature, |
203 | msgdata,closing_signed,tlvs,closing_signed_tlvs, |
204 | tlvtype,closing_signed_tlvs,fee_range,1 |
205 | tlvdata,closing_signed_tlvs,fee_range,min_fee_satoshis,u64, |
206 | tlvdata,closing_signed_tlvs,fee_range,max_fee_satoshis,u64, |
207 | msgtype,update_add_htlc,128 |
208 | msgdata,update_add_htlc,channel_id,channel_id, |
209 | msgdata,update_add_htlc,id,u64, |
210 | msgdata,update_add_htlc,amount_msat,u64, |
211 | msgdata,update_add_htlc,payment_hash,sha256, |
212 | msgdata,update_add_htlc,cltv_expiry,u32, |
213 | msgdata,update_add_htlc,onion_routing_packet,byte,1366 |
214 | msgtype,update_fulfill_htlc,130 |
215 | msgdata,update_fulfill_htlc,channel_id,channel_id, |
216 | msgdata,update_fulfill_htlc,id,u64, |
217 | msgdata,update_fulfill_htlc,payment_preimage,byte,32 |
218 | msgtype,update_fail_htlc,131 |
219 | msgdata,update_fail_htlc,channel_id,channel_id, |
220 | msgdata,update_fail_htlc,id,u64, |
221 | msgdata,update_fail_htlc,len,u16, |
222 | msgdata,update_fail_htlc,reason,byte,len |
223 | msgtype,update_fail_malformed_htlc,135 |
224 | msgdata,update_fail_malformed_htlc,channel_id,channel_id, |
225 | msgdata,update_fail_malformed_htlc,id,u64, |
226 | msgdata,update_fail_malformed_htlc,sha256_of_onion,sha256, |
227 | msgdata,update_fail_malformed_htlc,failure_code,u16, |
228 | msgtype,commitment_signed,132 |
229 | msgdata,commitment_signed,channel_id,channel_id, |
230 | msgdata,commitment_signed,signature,signature, |
231 | msgdata,commitment_signed,num_htlcs,u16, |
232 | msgdata,commitment_signed,htlc_signature,signature,num_htlcs |
233 | msgtype,revoke_and_ack,133 |
234 | msgdata,revoke_and_ack,channel_id,channel_id, |
235 | msgdata,revoke_and_ack,per_commitment_secret,byte,32 |
236 | msgdata,revoke_and_ack,next_per_commitment_point,point, |
237 | msgtype,update_fee,134 |
238 | msgdata,update_fee,channel_id,channel_id, |
239 | msgdata,update_fee,feerate_per_kw,u32, |
240 | msgtype,update_blockheight,137 |
241 | msgdata,update_blockheight,channel_id,channel_id, |
242 | msgdata,update_blockheight,blockheight,u32, |
243 | msgtype,channel_reestablish,136 |
244 | msgdata,channel_reestablish,channel_id,channel_id, |
245 | msgdata,channel_reestablish,next_commitment_number,u64, |
246 | msgdata,channel_reestablish,next_revocation_number,u64, |
247 | msgdata,channel_reestablish,your_last_per_commitment_secret,byte,32 |
248 | msgdata,channel_reestablish,my_current_per_commitment_point,point, |
249 | msgtype,announcement_signatures,259 |
250 | msgdata,announcement_signatures,channel_id,channel_id, |
251 | msgdata,announcement_signatures,short_channel_id,short_channel_id, |
252 | msgdata,announcement_signatures,node_signature,signature, |
253 | msgdata,announcement_signatures,bitcoin_signature,signature, |
254 | msgtype,channel_announcement,256 |
255 | msgdata,channel_announcement,node_signature_1,signature, |
256 | msgdata,channel_announcement,node_signature_2,signature, |
257 | msgdata,channel_announcement,bitcoin_signature_1,signature, |
258 | msgdata,channel_announcement,bitcoin_signature_2,signature, |
259 | msgdata,channel_announcement,len,u16, |
260 | msgdata,channel_announcement,features,byte,len |
261 | msgdata,channel_announcement,chain_hash,chain_hash, |
262 | msgdata,channel_announcement,short_channel_id,short_channel_id, |
263 | msgdata,channel_announcement,node_id_1,point, |
264 | msgdata,channel_announcement,node_id_2,point, |
265 | msgdata,channel_announcement,bitcoin_key_1,point, |
266 | msgdata,channel_announcement,bitcoin_key_2,point, |
267 | msgtype,node_announcement,257 |
268 | msgdata,node_announcement,signature,signature, |
269 | msgdata,node_announcement,flen,u16, |
270 | msgdata,node_announcement,features,byte,flen |
271 | msgdata,node_announcement,timestamp,u32, |
272 | msgdata,node_announcement,node_id,point, |
273 | msgdata,node_announcement,rgb_color,byte,3 |
274 | msgdata,node_announcement,alias,byte,32 |
275 | msgdata,node_announcement,addrlen,u16, |
276 | msgdata,node_announcement,addresses,byte,addrlen |
277 | msgdata,node_announcement,tlvs,node_ann_tlvs, |
278 | tlvtype,node_ann_tlvs,option_will_fund,1 |
279 | tlvdata,node_ann_tlvs,option_will_fund,lease_rates,lease_rates, |
280 | msgtype,channel_update,258 |
281 | msgdata,channel_update,signature,signature, |
282 | msgdata,channel_update,chain_hash,chain_hash, |
283 | msgdata,channel_update,short_channel_id,short_channel_id, |
284 | msgdata,channel_update,timestamp,u32, |
285 | msgdata,channel_update,message_flags,byte, |
286 | msgdata,channel_update,channel_flags,byte, |
287 | msgdata,channel_update,cltv_expiry_delta,u16, |
288 | msgdata,channel_update,htlc_minimum_msat,u64, |
289 | msgdata,channel_update,fee_base_msat,u32, |
290 | msgdata,channel_update,fee_proportional_millionths,u32, |
291 | msgdata,channel_update,htlc_maximum_msat,u64,,option_channel_htlc_max |
292 | msgtype,query_short_channel_ids,261,gossip_queries |
293 | msgdata,query_short_channel_ids,chain_hash,chain_hash, |
294 | msgdata,query_short_channel_ids,len,u16, |
295 | msgdata,query_short_channel_ids,encoded_short_ids,byte,len |
296 | msgdata,query_short_channel_ids,tlvs,query_short_channel_ids_tlvs, |
297 | tlvtype,query_short_channel_ids_tlvs,query_flags,1 |
298 | tlvdata,query_short_channel_ids_tlvs,query_flags,encoding_type,byte, |
299 | tlvdata,query_short_channel_ids_tlvs,query_flags,encoded_query_flags,byte,... |
300 | msgtype,reply_short_channel_ids_end,262,gossip_queries |
301 | msgdata,reply_short_channel_ids_end,chain_hash,chain_hash, |
302 | msgdata,reply_short_channel_ids_end,full_information,byte, |
303 | msgtype,query_channel_range,263,gossip_queries |
304 | msgdata,query_channel_range,chain_hash,chain_hash, |
305 | msgdata,query_channel_range,first_blocknum,u32, |
306 | msgdata,query_channel_range,number_of_blocks,u32, |
307 | msgdata,query_channel_range,tlvs,query_channel_range_tlvs, |
308 | tlvtype,query_channel_range_tlvs,query_option,1 |
309 | tlvdata,query_channel_range_tlvs,query_option,query_option_flags,bigsize, |
310 | msgtype,reply_channel_range,264,gossip_queries |
311 | msgdata,reply_channel_range,chain_hash,chain_hash, |
312 | msgdata,reply_channel_range,first_blocknum,u32, |
313 | msgdata,reply_channel_range,number_of_blocks,u32, |
314 | msgdata,reply_channel_range,sync_complete,byte, |
315 | msgdata,reply_channel_range,len,u16, |
316 | msgdata,reply_channel_range,encoded_short_ids,byte,len |
317 | msgdata,reply_channel_range,tlvs,reply_channel_range_tlvs, |
318 | tlvtype,reply_channel_range_tlvs,timestamps_tlv,1 |
319 | tlvdata,reply_channel_range_tlvs,timestamps_tlv,encoding_type,byte, |
320 | tlvdata,reply_channel_range_tlvs,timestamps_tlv,encoded_timestamps,byte,... |
321 | tlvtype,reply_channel_range_tlvs,checksums_tlv,3 |
322 | tlvdata,reply_channel_range_tlvs,checksums_tlv,checksums,channel_update_checksums,... |
323 | subtype,channel_update_timestamps |
324 | subtypedata,channel_update_timestamps,timestamp_node_id_1,u32, |
325 | subtypedata,channel_update_timestamps,timestamp_node_id_2,u32, |
326 | subtype,channel_update_checksums |
327 | subtypedata,channel_update_checksums,checksum_node_id_1,u32, |
328 | subtypedata,channel_update_checksums,checksum_node_id_2,u32, |
329 | msgtype,gossip_timestamp_filter,265,gossip_queries |
330 | msgdata,gossip_timestamp_filter,chain_hash,chain_hash, |
331 | msgdata,gossip_timestamp_filter,first_timestamp,u32, |
332 | msgdata,gossip_timestamp_filter,timestamp_range,u32, |
333 | msgtype,obs2_onion_message,387,option_onion_messages |
334 | msgdata,obs2_onion_message,blinding,point, |
335 | msgdata,obs2_onion_message,len,u16, |
336 | msgdata,obs2_onion_message,onionmsg,byte,len |
337 | msgtype,onion_message,513,option_onion_messages |
338 | msgdata,onion_message,blinding,point, |
339 | msgdata,onion_message,len,u16, |
340 | msgdata,onion_message,onionmsg,byte,len |