Files
palladum-lightning/channeld/channeld_wire.csv
2021-06-01 12:08:51 -05:00

9.4 KiB

1#include <bitcoin/psbt.h>
2#include <bitcoin/tx.h>
3#include <common/cryptomsg.h>
4#include <common/channel_config.h>
5#include <common/channel_id.h>
6#include <common/derive_basepoints.h>
7#include <common/features.h>
8#include <common/fee_states.h>
9#include <common/per_peer_state.h>
10# Begin! (passes gossipd-client fd)
11msgtypechanneld_init1000
12msgdatachanneld_initchainparamschainparams
13msgdatachanneld_initour_featuresfeature_set
14msgdatachanneld_initchannel_idchannel_id
15msgdatachanneld_initfunding_txidbitcoin_txid
16msgdatachanneld_initfunding_txoutu16
17msgdatachanneld_initfunding_satoshiamount_sat
18msgdatachanneld_initminimum_depthu32
19msgdatachanneld_initour_configchannel_config
20msgdatachanneld_inittheir_configchannel_config
21msgdatachanneld_initfee_statesfee_states
22msgdatachanneld_initfeerate_minu32
23msgdatachanneld_initfeerate_maxu32
24msgdatachanneld_initfeerate_penaltyu32
25msgdatachanneld_initfirst_commit_sigbitcoin_signature
26msgdatachanneld_initper_peer_stateper_peer_state
27msgdatachanneld_initremote_fundingkeypubkey
28msgdatachanneld_initremote_basepointsbasepoints
29msgdatachanneld_initremote_per_commitpubkey
30msgdatachanneld_initold_remote_per_commitpubkey
31msgdatachanneld_initopenerenum side
32msgdatachanneld_initfee_baseu32
33msgdatachanneld_initfee_proportionalu32
34msgdatachanneld_initlocal_msatoshiamount_msat
35msgdatachanneld_initour_basepointsbasepoints
36msgdatachanneld_initour_funding_pubkeypubkey
37msgdatachanneld_initlocal_node_idnode_id
38msgdatachanneld_initremote_node_idnode_id
39msgdatachanneld_initcommit_msecu32
40msgdatachanneld_initcltv_deltau16
41msgdatachanneld_initlast_was_revokebool
42msgdatachanneld_initnum_last_sent_commitu16
43msgdatachanneld_initlast_sent_commitchanged_htlcnum_last_sent_commit
44msgdatachanneld_initnext_index_localu64
45msgdatachanneld_initnext_index_remoteu64
46msgdatachanneld_initrevocations_receivedu64
47msgdatachanneld_initnext_htlc_idu64
48msgdatachanneld_initnum_existing_htlcsu16
49msgdatachanneld_inithtlcsexisting_htlcnum_existing_htlcs
50msgdatachanneld_initlocal_funding_lockedbool
51msgdatachanneld_initremote_funding_lockedbool
52msgdatachanneld_initfunding_short_idshort_channel_id
53msgdatachanneld_initreestablishbool
54msgdatachanneld_initsend_shutdownbool
55msgdatachanneld_initremote_shutdown_receivedbool
56msgdatachanneld_initfinal_scriptpubkey_lenu16
57msgdatachanneld_initfinal_scriptpubkeyu8final_scriptpubkey_len
58msgdatachanneld_initflagsu8
59msgdatachanneld_initinit_peer_pkt_lenu16
60msgdatachanneld_initinit_peer_pktu8init_peer_pkt_len
61msgdatachanneld_initreached_announce_depthbool
62msgdatachanneld_initlast_remote_secretsecret
63msgdatachanneld_initflenu16
64msgdatachanneld_inittheir_featuresu8flen
65msgdatachanneld_initupfront_shutdown_script_lenu16
66msgdatachanneld_initupfront_shutdown_scriptu8upfront_shutdown_script_len
67msgdatachanneld_initremote_ann_node_sig?secp256k1_ecdsa_signature
68msgdatachanneld_initremote_ann_bitcoin_sig?secp256k1_ecdsa_signature
69msgdatachanneld_initoption_static_remotekeybool
70msgdatachanneld_initoption_anchor_outputsbool
71msgdatachanneld_initdev_fast_gossipbool
72msgdatachanneld_initdev_fail_process_onionpacketbool
73msgdatachanneld_initnum_penalty_basesu32
74msgdatachanneld_initpbasespenalty_basenum_penalty_bases
75# master->channeld funding hit new depth(funding locked if >= lock depth)
76msgtypechanneld_funding_depth1002
77msgdatachanneld_funding_depthshort_channel_id?short_channel_id
78msgdatachanneld_funding_depthdepthu32
79# Tell channel to offer this htlc
80msgtypechanneld_offer_htlc1004
81msgdatachanneld_offer_htlcamount_msatamount_msat
82msgdatachanneld_offer_htlccltv_expiryu32
83msgdatachanneld_offer_htlcpayment_hashsha256
84msgdatachanneld_offer_htlconion_routing_packetu81366
85msgdatachanneld_offer_htlcblinding?pubkey
86# Reply; synchronous since IDs have to increment.
87msgtypechanneld_offer_htlc_reply1104
88msgdatachanneld_offer_htlc_replyidu64
89# Empty failure message means success.
90msgdatachanneld_offer_htlc_replylenu16
91msgdatachanneld_offer_htlc_replyfailuremsgu8len
92msgdatachanneld_offer_htlc_replyfailurestrwirestring
93# Main daemon found out the preimage for an HTLC
94#include <bitcoin/preimage.h>
95msgtypechanneld_fulfill_htlc1005
96msgdatachanneld_fulfill_htlcfulfilled_htlcfulfilled_htlc
97# Main daemon says HTLC failed
98msgtypechanneld_fail_htlc1006
99msgdatachanneld_fail_htlcfailed_htlcfailed_htlc
100# When we receive funding_locked.
101msgtypechanneld_got_funding_locked1019
102msgdatachanneld_got_funding_lockednext_per_commit_pointpubkey
103#include <common/penalty_base.h>
104# When we send a commitment_signed messagetell master.
105msgtypechanneld_sending_commitsig1020
106msgdatachanneld_sending_commitsigcommitnumu64
107msgdatachanneld_sending_commitsigpbase?penalty_base
108msgdatachanneld_sending_commitsigfee_statesfee_states
109# SENT_ADD_COMMITSENT_REMOVE_ACK_COMMITSENT_ADD_ACK_COMMITSENT_REMOVE_COMMIT
110msgdatachanneld_sending_commitsignum_changedu16
111msgdatachanneld_sending_commitsigchangedchanged_htlcnum_changed
112msgdatachanneld_sending_commitsigcommit_sigbitcoin_signature
113msgdatachanneld_sending_commitsignum_htlc_sigsu16
114msgdatachanneld_sending_commitsightlc_sigsbitcoin_signaturenum_htlc_sigs
115# Wait for replyto make sure it's on disk before we send commit.
116msgtypechanneld_sending_commitsig_reply1120
117# When we have a commitment_signed messagetell master to remember.
118msgtypechanneld_got_commitsig1021
119msgdatachanneld_got_commitsigcommitnumu64
120msgdatachanneld_got_commitsigfee_statesfee_states
121msgdatachanneld_got_commitsigsignaturebitcoin_signature
122msgdatachanneld_got_commitsignum_htlcsu16
123msgdatachanneld_got_commitsightlc_signaturebitcoin_signaturenum_htlcs
124# RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
125msgdatachanneld_got_commitsignum_addedu16
126msgdatachanneld_got_commitsigaddedadded_htlcnum_added
127# RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
128msgdatachanneld_got_commitsignum_fulfilledu16
129msgdatachanneld_got_commitsigfulfilledfulfilled_htlcnum_fulfilled
130msgdatachanneld_got_commitsignum_failedu16
131msgdatachanneld_got_commitsigfailedfailed_htlcnum_failed
132# RCVD_ADD_ACK_COMMITRCVD_REMOVE_ACK_COMMIT
133msgdatachanneld_got_commitsignum_changedu16
134msgdatachanneld_got_commitsigchangedchanged_htlcnum_changed
135msgdatachanneld_got_commitsigtxbitcoin_tx
136# Wait for replyto make sure it's on disk before we send revocation.
137msgtypechanneld_got_commitsig_reply1121
138#include <common/htlc_wire.h>
139msgtypechanneld_got_revoke1022
140msgdatachanneld_got_revokerevokenumu64
141msgdatachanneld_got_revokeper_commitment_secretsecret
142msgdatachanneld_got_revokenext_per_commit_pointpubkey
143# RCVD_ADD_ACK_REVOCATIONRCVD_REMOVE_ACK_REVOCATIONRCVD_ADD_REVOCATIONRCVD_REMOVE_REVOCATION
144msgdatachanneld_got_revokefee_statesfee_states
145msgdatachanneld_got_revokenum_changedu16
146msgdatachanneld_got_revokechangedchanged_htlcnum_changed
147msgdatachanneld_got_revokepbase?penalty_base
148msgdatachanneld_got_revokepenalty_tx?bitcoin_tx
149# Wait for replyto make sure it's on disk before we continue
150# (eg. if we sent another commitment_signedthat would implicitly ack).
151msgtypechanneld_got_revoke_reply1122
152# Tell peer to shut down channel.
153msgtypechanneld_send_shutdown1023
154msgdatachanneld_send_shutdownshutdown_lenu16
155msgdatachanneld_send_shutdownshutdown_scriptpubkeyu8shutdown_len
156msgdatachanneld_send_shutdownwrong_funding?bitcoin_outpoint
157# Peer told us that channel is shutting down
158msgtypechanneld_got_shutdown1024
159msgdatachanneld_got_shutdownscriptpubkey_lenu16
160msgdatachanneld_got_shutdownscriptpubkeyu8scriptpubkey_len
161msgdatachanneld_got_shutdownwrong_funding?bitcoin_outpoint
162# Shutdown is completeready for closing negotiation. + peer_fd & gossip_fd.
163msgtypechanneld_shutdown_complete1025
164msgdatachanneld_shutdown_completeper_peer_stateper_peer_state
165# Re-enable commit timer.
166msgtypechanneld_dev_reenable_commit1026
167msgtypechanneld_dev_reenable_commit_reply1126
168msgtypechanneld_feerates1027
169msgdatachanneld_feeratesfeerateu32
170msgdatachanneld_feeratesmin_feerateu32
171msgdatachanneld_feeratesmax_feerateu32
172msgdatachanneld_feeratespenalty_feerateu32
173# master -> channeld: do you have a memleak?
174msgtypechanneld_dev_memleak1033
175msgtypechanneld_dev_memleak_reply1133
176msgdatachanneld_dev_memleak_replyleakbool
177# Peer presented proof it was from the future.
178msgtypechanneld_fail_fallen_behind1028
179# This is NULL if option_static_remotekey.
180msgdatachanneld_fail_fallen_behindremote_per_commitment_point?pubkey
181# Handle a channel specific feerate base ppm configuration
182msgtypechanneld_specific_feerates1029
183msgdatachanneld_specific_feeratesfeerate_baseu32
184msgdatachanneld_specific_feeratesfeerate_ppmu32
185# When we receive announcement_signatures for channel announce
186msgtypechanneld_got_announcement1017
187msgdatachanneld_got_announcementremote_ann_node_sigsecp256k1_ecdsa_signature
188msgdatachanneld_got_announcementremote_ann_bitcoin_sigsecp256k1_ecdsa_signature
189# Ask channeld to send a error message. Used in forgetting channel case.
190msgtypechanneld_send_error1008
191msgdatachanneld_send_errorreasonwirestring
192# Tell master channeld has sent the error message.
193msgtypechanneld_send_error_reply1108
194# Ask channeld to quiesce.
195msgtypechanneld_dev_quiesce1009
196msgtypechanneld_dev_quiesce_reply1109