rgb-cln/lightningd/channel/channel_wire.csv

6.6 KiB

1# Shouldn't happen
2channel_bad_command,0x8000
3# Also shouldn't happen
4channel_hsm_failed,0x8001
5channel_crypto_failed,0x8002
6channel_internal_error,0x8003
7channel_gossip_bad_message,0x8004
8# These are due to peer.
9channel_peer_write_failed,0x8010
10channel_peer_read_failed,0x8011
11channel_peer_bad_message,0x8012
12channel_peer_bad_message,,len,u16
13channel_peer_bad_message,,msg,len*u8
14# Received and sent funding_locked
15channel_normal_operation,1001
16#include <lightningd/cryptomsg.h>
17#include <lightningd/channel_config.h>
18# Begin! (passes gossipd-client fd)
19channel_init,1
20channel_init,,funding_txid,struct sha256_double
21channel_init,,funding_txout,2
22channel_init,,funding_satoshi,8
23channel_init,,our_config,struct channel_config
24channel_init,,their_config,struct channel_config
25channel_init,,feerate_per_kw,4
26channel_init,,first_commit_sig,secp256k1_ecdsa_signature
27channel_init,,crypto_state,struct crypto_state
28channel_init,,remote_fundingkey,33
29channel_init,,revocation_basepoint,33
30channel_init,,payment_basepoint,33
31channel_init,,delayed_payment_basepoint,33
32channel_init,,remote_per_commit,33
33channel_init,,old_remote_per_commit,33
34channel_init,,funder,enum side
35channel_init,,fee_base,4
36channel_init,,fee_proportional,4
37channel_init,,local_msatoshi,8
38channel_init,,seed,struct privkey
39channel_init,,local_node_id,struct pubkey
40channel_init,,remote_node_id,struct pubkey
41channel_init,,commit_msec,4
42channel_init,,cltv_delta,u16
43channel_init,,last_was_revoke,bool
44channel_init,,num_last_sent_commit,u16
45channel_init,,last_sent_commit,num_last_sent_commit*struct changed_htlc
46channel_init,,next_index_local,u64
47channel_init,,next_index_remote,u64
48channel_init,,revocations_received,u64
49channel_init,,next_htlc_id,u64
50channel_init,,num_htlcs,u16
51channel_init,,htlcs,num_htlcs*struct added_htlc
52channel_init,,htlc_states,num_htlcs*enum htlc_state
53channel_init,,num_fulfilled,u16
54channel_init,,fulfilled,num_fulfilled*struct fulfilled_htlc
55channel_init,,fulfilled_sides,num_fulfilled*enum side
56channel_init,,num_failed,u16
57channel_init,,failed,num_failed*struct failed_htlc
58channel_init,,failed_sides,num_failed*enum side
59channel_init,,local_funding_locked,bool
60channel_init,,remote_funding_locked,bool
61channel_init,,funding_short_id,struct short_channel_id
62channel_init,,reestablish,bool
63channel_init,,shutdown_scriptpubkey_len,u16
64channel_init,,shutdown_scriptpubkey,shutdown_scriptpubkey_len*u8
65channel_init,,remote_shutdown_received,bool
66channel_init,,flags,u8
67channel_init,,init_peer_pkt_len,u16
68channel_init,,init_peer_pkt,init_peer_pkt_len*u8
69# Tx is deep enough, go!
70channel_funding_locked,2
71channel_funding_locked,,short_channel_id,struct short_channel_id
72# Tell the channel that we may announce the channel's existence
73channel_funding_announce_depth,3
74# Tell channel to offer this htlc
75channel_offer_htlc,4
76channel_offer_htlc,,amount_msat,8
77channel_offer_htlc,,cltv_expiry,4
78channel_offer_htlc,,payment_hash,32
79channel_offer_htlc,,onion_routing_packet,1366*u8
80# Reply; synchronous since IDs have to increment.
81channel_offer_htlc_reply,104
82channel_offer_htlc_reply,,id,8
83# Zero failure code means success.
84channel_offer_htlc_reply,,failure_code,2
85channel_offer_htlc_reply,,failurestrlen,2
86channel_offer_htlc_reply,,failurestr,failurestrlen*u8
87# Main daemon found out the preimage for an htlc
88#include <bitcoin/preimage.h>
89channel_fulfill_htlc,5
90channel_fulfill_htlc,,id,8
91channel_fulfill_htlc,,payment_preimage,struct preimage
92# Main daemon says HTLC failed
93channel_fail_htlc,6
94channel_fail_htlc,,id,8
95# If malformed is non-zero, it's a BADONION code
96channel_fail_htlc,,malformed,u16
97# Otherwise, error_pkt contains failreason.
98channel_fail_htlc,,len,2
99channel_fail_htlc,,error_pkt,len*u8
100# Ping/pong test.
101channel_ping,11
102channel_ping,,num_pong_bytes,u16
103channel_ping,,len,u16
104channel_ping_reply,111
105channel_ping_reply,,totlen,u16
106# Channeld tells the master that the channel has been announced
107channel_announced,12
108# When we receive funding_locked.
109channel_got_funding_locked,19
110channel_got_funding_locked,,next_per_commit_point,struct pubkey
111# When we send a commitment_signed message, tell master.
112channel_sending_commitsig,20
113channel_sending_commitsig,,commitnum,u64
114# SENT_ADD_COMMIT, SENT_REMOVE_ACK_COMMIT, SENT_ADD_ACK_COMMIT, SENT_REMOVE_COMMIT
115channel_sending_commitsig,,num_changed,u16
116channel_sending_commitsig,,changed,num_changed*struct changed_htlc
117channel_sending_commitsig,,commit_sig,secp256k1_ecdsa_signature
118channel_sending_commitsig,,num_htlc_sigs,u16
119channel_sending_commitsig,,htlc_sigs,num_htlc_sigs*secp256k1_ecdsa_signature
120# Wait for reply, to make sure it's on disk before we send commit.
121channel_sending_commitsig_reply,120
122# When we have a commitment_signed message, tell master to remember.
123channel_got_commitsig,21
124channel_got_commitsig,,commitnum,u64
125channel_got_commitsig,,signature,secp256k1_ecdsa_signature
126channel_got_commitsig,,num_htlcs,u16
127channel_got_commitsig,,htlc_signature,num_htlcs*secp256k1_ecdsa_signature
128# RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
129channel_got_commitsig,,num_added,u16
130channel_got_commitsig,,added,num_added*struct added_htlc
131channel_got_commitsig,,shared_secret,num_added*struct secret
132# RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
133channel_got_commitsig,,num_fulfilled,u16
134channel_got_commitsig,,fulfilled,num_fulfilled*struct fulfilled_htlc
135channel_got_commitsig,,num_failed,u16
136channel_got_commitsig,,failed,num_failed*struct failed_htlc
137# RCVD_ADD_ACK_COMMIT, RCVD_REMOVE_ACK_COMMIT
138channel_got_commitsig,,num_changed,u16
139channel_got_commitsig,,changed,num_changed*struct changed_htlc
140# Wait for reply, to make sure it's on disk before we send revocation.
141channel_got_commitsig_reply,121
142#include <lightningd/htlc_wire.h>
143channel_got_revoke,22
144channel_got_revoke,,revokenum,u64
145channel_got_revoke,,per_commitment_secret,struct sha256
146channel_got_revoke,,next_per_commit_point,struct pubkey
147# RCVD_ADD_ACK_REVOCATION, RCVD_REMOVE_ACK_REVOCATION, RCVD_ADD_REVOCATION, RCVD_REMOVE_REVOCATION
148channel_got_revoke,,num_changed,u16
149channel_got_revoke,,changed,num_changed*struct changed_htlc
150# Wait for reply, to make sure it's on disk before we continue
151# (eg. if we sent another commitment_signed, that would implicitly ack).
152channel_got_revoke_reply,122
153# Tell peer that channel is shutting down
154channel_send_shutdown,23
155channel_send_shutdown,,scriptpubkey_len,u16
156channel_send_shutdown,,scriptpubkey,scriptpubkey_len*u8
157# Peer told us that channel is shutting down
158channel_got_shutdown,24
159channel_got_shutdown,,scriptpubkey_len,u16
160channel_got_shutdown,,scriptpubkey,scriptpubkey_len*u8
161# Shutdown is complete, ready for closing negotiation. + peer_fd & gossip_fd.
162channel_shutdown_complete,25
163channel_shutdown_complete,,crypto_state,struct crypto_state