Files
palladum-lightning/channeld/channeld_wire.csv
Rusty Russell 57263a3eb2 lightningd: handle reestablish directly from connectd.
We don't need to hand it to channeld: it will read it!  We simply
need to tell it to expect it.

Similarly, openingd/dualopend will never see it, so remove that logic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-03-23 13:20:12 +10:30

12 KiB

1#include <bitcoin/psbt.h>
2#include <bitcoin/tx.h>
3#include <common/bip32.h>
4#include <common/blockheight_states.h>
5#include <common/cryptomsg.h>
6#include <common/channel_config.h>
7#include <common/channel_id.h>
8#include <common/channel_type.h>
9#include <common/derive_basepoints.h>
10#include <common/features.h>
11#include <common/fee_states.h>
12# Begin! (passes gossipd-client fd)
13msgtypechanneld_init1000
14msgdatachanneld_initchainparamschainparams
15msgdatachanneld_initour_featuresfeature_set
16msgdatachanneld_initchannel_idchannel_id
17msgdatachanneld_initfundingbitcoin_outpoint
18msgdatachanneld_initfunding_satoshiamount_sat
19msgdatachanneld_initminimum_depthu32
20msgdatachanneld_initour_blockheightu32
21msgdatachanneld_initblockheight_statesheight_states
22msgdatachanneld_initlease_expiryu32
23msgdatachanneld_initour_configchannel_config
24msgdatachanneld_inittheir_configchannel_config
25msgdatachanneld_initfee_statesfee_states
26msgdatachanneld_initfeerate_minu32
27msgdatachanneld_initfeerate_maxu32
28msgdatachanneld_initfeerate_penaltyu32
29msgdatachanneld_initfirst_commit_sigbitcoin_signature
30msgdatachanneld_initremote_fundingkeypubkey
31msgdatachanneld_initremote_basepointsbasepoints
32msgdatachanneld_initremote_per_commitpubkey
33msgdatachanneld_initold_remote_per_commitpubkey
34msgdatachanneld_initopenerenum side
35msgdatachanneld_initfee_baseu32
36msgdatachanneld_initfee_proportionalu32
37msgdatachanneld_inithtlc_minimum_msatamount_msat
38msgdatachanneld_inithtlc_maximum_msatamount_msat
39msgdatachanneld_initlocal_msatoshiamount_msat
40msgdatachanneld_initour_basepointsbasepoints
41msgdatachanneld_initour_funding_pubkeypubkey
42msgdatachanneld_initlocal_node_idnode_id
43msgdatachanneld_initremote_node_idnode_id
44msgdatachanneld_initcommit_msecu32
45msgdatachanneld_initcltv_deltau16
46msgdatachanneld_initlast_was_revokebool
47msgdatachanneld_initnum_last_sent_commitu16
48msgdatachanneld_initlast_sent_commitchanged_htlcnum_last_sent_commit
49msgdatachanneld_initnext_index_localu64
50msgdatachanneld_initnext_index_remoteu64
51msgdatachanneld_initrevocations_receivedu64
52msgdatachanneld_initnext_htlc_idu64
53msgdatachanneld_initnum_existing_htlcsu16
54msgdatachanneld_inithtlcsexisting_htlcnum_existing_htlcs
55msgdatachanneld_initlocal_funding_lockedbool
56msgdatachanneld_initremote_funding_lockedbool
57msgdatachanneld_initfunding_short_idshort_channel_id
58msgdatachanneld_initreestablishbool
59msgdatachanneld_initsend_shutdownbool
60msgdatachanneld_initremote_shutdown_receivedbool
61msgdatachanneld_initfinal_indexu32
62msgdatachanneld_initfinal_ext_keyext_key
63msgdatachanneld_initfinal_scriptpubkey_lenu16
64msgdatachanneld_initfinal_scriptpubkeyu8final_scriptpubkey_len
65msgdatachanneld_initflagsu8
66msgdatachanneld_initinit_peer_pkt_lenu16
67msgdatachanneld_initinit_peer_pktu8init_peer_pkt_len
68msgdatachanneld_initreached_announce_depthbool
69msgdatachanneld_initlast_remote_secretsecret
70msgdatachanneld_initflenu16
71msgdatachanneld_inittheir_featuresu8flen
72msgdatachanneld_initupfront_shutdown_script_lenu16
73msgdatachanneld_initupfront_shutdown_scriptu8upfront_shutdown_script_len
74msgdatachanneld_initremote_ann_node_sig?secp256k1_ecdsa_signature
75msgdatachanneld_initremote_ann_bitcoin_sig?secp256k1_ecdsa_signature
76msgdatachanneld_initdesired_typechannel_type
77msgdatachanneld_initdev_fast_gossipbool
78msgdatachanneld_initdev_fail_process_onionpacketbool
79msgdatachanneld_initdev_disable_commit?u32
80msgdatachanneld_initnum_penalty_basesu32
81msgdatachanneld_initpbasespenalty_basenum_penalty_bases
82msgdatachanneld_initreestablish_onlybool
83msgdatachanneld_initchannel_update_lenu16
84msgdatachanneld_initchannel_updateu8channel_update_len
85# master->channeld funding hit new depth(funding locked if >= lock depth)
86msgtypechanneld_funding_depth1002
87msgdatachanneld_funding_depthshort_channel_id?short_channel_id
88msgdatachanneld_funding_depthdepthu32
89# Tell channel to offer this htlc
90msgtypechanneld_offer_htlc1004
91msgdatachanneld_offer_htlcamount_msatamount_msat
92msgdatachanneld_offer_htlccltv_expiryu32
93msgdatachanneld_offer_htlcpayment_hashsha256
94msgdatachanneld_offer_htlconion_routing_packetu81366
95msgdatachanneld_offer_htlcblinding?pubkey
96# Reply; synchronous since IDs have to increment.
97msgtypechanneld_offer_htlc_reply1104
98msgdatachanneld_offer_htlc_replyidu64
99# Empty failure message means success.
100msgdatachanneld_offer_htlc_replylenu16
101msgdatachanneld_offer_htlc_replyfailuremsgu8len
102msgdatachanneld_offer_htlc_replyfailurestrwirestring
103# Main daemon found out the preimage for an HTLC
104#include <bitcoin/preimage.h>
105msgtypechanneld_fulfill_htlc1005
106msgdatachanneld_fulfill_htlcfulfilled_htlcfulfilled_htlc
107# Main daemon says HTLC failed
108msgtypechanneld_fail_htlc1006
109msgdatachanneld_fail_htlcfailed_htlcfailed_htlc
110# When we receive funding_locked.
111msgtypechanneld_got_funding_locked1019
112msgdatachanneld_got_funding_lockednext_per_commit_pointpubkey
113#include <common/penalty_base.h>
114# When we send a commitment_signed messagetell master.
115msgtypechanneld_sending_commitsig1020
116msgdatachanneld_sending_commitsigcommitnumu64
117msgdatachanneld_sending_commitsigpbase?penalty_base
118msgdatachanneld_sending_commitsigfee_statesfee_states
119msgdatachanneld_sending_commitsigblockheight_statesheight_states
120# SENT_ADD_COMMITSENT_REMOVE_ACK_COMMITSENT_ADD_ACK_COMMITSENT_REMOVE_COMMIT
121msgdatachanneld_sending_commitsignum_changedu16
122msgdatachanneld_sending_commitsigchangedchanged_htlcnum_changed
123msgdatachanneld_sending_commitsigcommit_sigbitcoin_signature
124msgdatachanneld_sending_commitsignum_htlc_sigsu16
125msgdatachanneld_sending_commitsightlc_sigsbitcoin_signaturenum_htlc_sigs
126# Wait for replyto make sure it's on disk before we send commit.
127msgtypechanneld_sending_commitsig_reply1120
128# When we have a commitment_signed messagetell master to remember.
129msgtypechanneld_got_commitsig1021
130msgdatachanneld_got_commitsigcommitnumu64
131msgdatachanneld_got_commitsigfee_statesfee_states
132msgdatachanneld_got_commitsigblockheight_statesheight_states
133msgdatachanneld_got_commitsigsignaturebitcoin_signature
134msgdatachanneld_got_commitsignum_htlcsu16
135msgdatachanneld_got_commitsightlc_signaturebitcoin_signaturenum_htlcs
136# RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
137msgdatachanneld_got_commitsignum_addedu16
138msgdatachanneld_got_commitsigaddedadded_htlcnum_added
139# RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
140msgdatachanneld_got_commitsignum_fulfilledu16
141msgdatachanneld_got_commitsigfulfilledfulfilled_htlcnum_fulfilled
142msgdatachanneld_got_commitsignum_failedu16
143msgdatachanneld_got_commitsigfailedfailed_htlcnum_failed
144# RCVD_ADD_ACK_COMMITRCVD_REMOVE_ACK_COMMIT
145msgdatachanneld_got_commitsignum_changedu16
146msgdatachanneld_got_commitsigchangedchanged_htlcnum_changed
147msgdatachanneld_got_commitsigtxbitcoin_tx
148# Wait for replyto make sure it's on disk before we send revocation.
149msgtypechanneld_got_commitsig_reply1121
150#include <common/htlc_wire.h>
151msgtypechanneld_got_revoke1022
152msgdatachanneld_got_revokerevokenumu64
153msgdatachanneld_got_revokeper_commitment_secretsecret
154msgdatachanneld_got_revokenext_per_commit_pointpubkey
155# RCVD_ADD_ACK_REVOCATIONRCVD_REMOVE_ACK_REVOCATIONRCVD_ADD_REVOCATIONRCVD_REMOVE_REVOCATION
156msgdatachanneld_got_revokefee_statesfee_states
157msgdatachanneld_got_revokeblockheight_statesheight_states
158msgdatachanneld_got_revokenum_changedu16
159msgdatachanneld_got_revokechangedchanged_htlcnum_changed
160msgdatachanneld_got_revokepbase?penalty_base
161msgdatachanneld_got_revokepenalty_tx?bitcoin_tx
162# Wait for replyto make sure it's on disk before we continue
163# (eg. if we sent another commitment_signedthat would implicitly ack).
164msgtypechanneld_got_revoke_reply1122
165#include <wally_bip32.h>
166# Tell peer to shut down channel.
167msgtypechanneld_send_shutdown1023
168msgdatachanneld_send_shutdownfinal_index?u32
169msgdatachanneld_send_shutdownfinal_ext_key?ext_key
170msgdatachanneld_send_shutdownshutdown_lenu16
171msgdatachanneld_send_shutdownshutdown_scriptpubkeyu8shutdown_len
172msgdatachanneld_send_shutdownwrong_funding?bitcoin_outpoint
173# Peer told us that channel is shutting down
174msgtypechanneld_got_shutdown1024
175msgdatachanneld_got_shutdownscriptpubkey_lenu16
176msgdatachanneld_got_shutdownscriptpubkeyu8scriptpubkey_len
177msgdatachanneld_got_shutdownwrong_funding?bitcoin_outpoint
178# Shutdown is completeready for closing negotiation. + peer_fd & gossip_fd.
179msgtypechanneld_shutdown_complete1025
180# Re-enable commit timer.
181msgtypechanneld_dev_reenable_commit1026
182msgtypechanneld_dev_reenable_commit_reply1126
183msgtypechanneld_feerates1027
184msgdatachanneld_feeratesfeerateu32
185msgdatachanneld_feeratesmin_feerateu32
186msgdatachanneld_feeratesmax_feerateu32
187msgdatachanneld_feeratespenalty_feerateu32
188# master -> channeld: do you have a memleak?
189msgtypechanneld_dev_memleak1033
190msgtypechanneld_dev_memleak_reply1133
191msgdatachanneld_dev_memleak_replyleakbool
192# Peer presented proof it was from the future.
193msgtypechanneld_fail_fallen_behind1028
194# This is NULL if option_static_remotekey.
195msgdatachanneld_fail_fallen_behindremote_per_commitment_point?pubkey
196# Handle a channel-specific configuration change
197msgtypechanneld_config_channel1029
198msgdatachanneld_config_channelfeerate_base?u32
199msgdatachanneld_config_channelfeerate_ppm?u32
200msgdatachanneld_config_channelhtlc_minimum?amount_msat
201msgdatachanneld_config_channelhtlc_maximum?amount_msat
202# When we receive announcement_signatures for channel announce
203msgtypechanneld_got_announcement1017
204msgdatachanneld_got_announcementremote_ann_node_sigsecp256k1_ecdsa_signature
205msgdatachanneld_got_announcementremote_ann_bitcoin_sigsecp256k1_ecdsa_signature
206# Ask channeld to send a error message. Used in forgetting channel case.
207msgtypechanneld_send_error1008
208msgdatachanneld_send_errorreasonwirestring
209# Tell master channeld has sent the error message.
210msgtypechanneld_send_error_reply1108
211# Tell channeld about the latest channel_update
212msgtypechanneld_channel_update1001
213msgdatachanneld_channel_updatelenu16
214msgdatachanneld_channel_updatemsgu8len
215# Tell lightningd we used the latest channel_update for an error.
216msgtypechanneld_used_channel_update1102
217# Channeld: tell gossipd to make this channel_update.
218msgtypechanneld_local_channel_update1013
219msgdatachanneld_local_channel_updateshort_channel_idshort_channel_id
220msgdatachanneld_local_channel_updatedisablebool
221msgdatachanneld_local_channel_updatecltv_expiry_deltau16
222msgdatachanneld_local_channel_updatehtlc_minimum_msatamount_msat
223msgdatachanneld_local_channel_updatefee_base_msatu32
224msgdatachanneld_local_channel_updatefee_proportional_millionthsu32
225msgdatachanneld_local_channel_updatehtlc_maximum_msatamount_msat
226# Channeld: tell gossipd about our channel_announcement
227msgtypechanneld_local_channel_announcement1014
228msgdatachanneld_local_channel_announcementlenu16
229msgdatachanneld_local_channel_announcementcannounceu8len
230# Channeld: tell gossipd about this (as-yet) unannounced channel
231msgtypechanneld_local_private_channel1015
232msgdatachanneld_local_private_channelcapacityamount_sat
233msgdatachanneld_local_private_channellenu16
234msgdatachanneld_local_private_channelfeaturesu8len
235# Ask channeld to quiesce.
236msgtypechanneld_dev_quiesce1009
237msgtypechanneld_dev_quiesce_reply1109
238# Tell master we're upgrading the commitment tx.
239msgtypechanneld_upgraded1011
240msgdatachanneld_upgradednew_typechannel_type
241# Tell peer about our latest and greatest blockheight.
242msgtypechanneld_blockheight1012
243msgdatachanneld_blockheightblockheightu32