mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-27 02:44:33 +01:00
wire-gen: move in-house wire delcarations to new format
tidying things up!
This commit is contained in:
committed by
Rusty Russell
parent
236d26308f
commit
32eaae0cb9
2
Makefile
2
Makefile
@@ -184,8 +184,8 @@ ALL_GEN_HEADERS += gen_version.h
|
|||||||
|
|
||||||
CDUMP_OBJS := ccan-cdump.o ccan-strmap.o
|
CDUMP_OBJS := ccan-cdump.o ccan-strmap.o
|
||||||
|
|
||||||
WIRE_GEN := tools/generate-wire.py
|
|
||||||
BOLT_GEN := tools/generate-bolts.py
|
BOLT_GEN := tools/generate-bolts.py
|
||||||
|
WIRE_GEN := $(BOLT_GEN)
|
||||||
BOLT_DEPS := $(BOLT_GEN)
|
BOLT_DEPS := $(BOLT_GEN)
|
||||||
|
|
||||||
ALL_PROGRAMS =
|
ALL_PROGRAMS =
|
||||||
|
|||||||
@@ -103,10 +103,10 @@ channeld/gen_full_channel_error_names.h: channeld/full_channel_error.h ccan/ccan
|
|||||||
$(LIGHTNINGD_CHANNEL_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_GOSSIP_CONTROL_HEADERS)
|
$(LIGHTNINGD_CHANNEL_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_GOSSIP_CONTROL_HEADERS)
|
||||||
|
|
||||||
channeld/gen_channel_wire.h: $(WIRE_GEN) channeld/channel_wire.csv
|
channeld/gen_channel_wire.h: $(WIRE_GEN) channeld/channel_wire.csv
|
||||||
$(WIRE_GEN) --header $@ channel_wire_type < channeld/channel_wire.csv > $@
|
$(WIRE_GEN) --page header $@ channel_wire_type < channeld/channel_wire.csv > $@
|
||||||
|
|
||||||
channeld/gen_channel_wire.c: $(WIRE_GEN) channeld/channel_wire.csv
|
channeld/gen_channel_wire.c: $(WIRE_GEN) channeld/channel_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} channel_wire_type < channeld/channel_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} channel_wire_type < channeld/channel_wire.csv > $@
|
||||||
|
|
||||||
LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o)
|
LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o)
|
||||||
|
|
||||||
|
|||||||
@@ -4,192 +4,192 @@
|
|||||||
#include <common/per_peer_state.h>
|
#include <common/per_peer_state.h>
|
||||||
|
|
||||||
# Begin! (passes gossipd-client fd)
|
# Begin! (passes gossipd-client fd)
|
||||||
channel_init,1000
|
msgtype,channel_init,1000
|
||||||
channel_init,,chain_hash,struct bitcoin_blkid
|
msgdata,channel_init,chain_hash,bitcoin_blkid,
|
||||||
channel_init,,funding_txid,struct bitcoin_txid
|
msgdata,channel_init,funding_txid,bitcoin_txid,
|
||||||
channel_init,,funding_txout,u16
|
msgdata,channel_init,funding_txout,u16,
|
||||||
channel_init,,funding_satoshi,struct amount_sat
|
msgdata,channel_init,funding_satoshi,amount_sat,
|
||||||
channel_init,,minimum_depth,u32
|
msgdata,channel_init,minimum_depth,u32,
|
||||||
channel_init,,our_config,struct channel_config
|
msgdata,channel_init,our_config,channel_config,
|
||||||
channel_init,,their_config,struct channel_config
|
msgdata,channel_init,their_config,channel_config,
|
||||||
# FIXME: Fix generate-wire.py to allow NUM_SIDES*u32 here.
|
# FIXME: Fix generate-wire.py to allow NUM_SIDES*u32 here.,
|
||||||
channel_init,,feerate_per_kw,2*u32
|
msgdata,channel_init,feerate_per_kw,u32,2
|
||||||
channel_init,,feerate_min,u32
|
msgdata,channel_init,feerate_min,u32,
|
||||||
channel_init,,feerate_max,u32
|
msgdata,channel_init,feerate_max,u32,
|
||||||
channel_init,,first_commit_sig,struct bitcoin_signature
|
msgdata,channel_init,first_commit_sig,bitcoin_signature,
|
||||||
channel_init,,per_peer_state,struct per_peer_state
|
msgdata,channel_init,per_peer_state,per_peer_state,
|
||||||
channel_init,,remote_fundingkey,struct pubkey
|
msgdata,channel_init,remote_fundingkey,pubkey,
|
||||||
channel_init,,remote_basepoints,struct basepoints
|
msgdata,channel_init,remote_basepoints,basepoints,
|
||||||
channel_init,,remote_per_commit,struct pubkey
|
msgdata,channel_init,remote_per_commit,pubkey,
|
||||||
channel_init,,old_remote_per_commit,struct pubkey
|
msgdata,channel_init,old_remote_per_commit,pubkey,
|
||||||
channel_init,,funder,enum side
|
msgdata,channel_init,funder,e:side,
|
||||||
channel_init,,fee_base,u32
|
msgdata,channel_init,fee_base,u32,
|
||||||
channel_init,,fee_proportional,u32
|
msgdata,channel_init,fee_proportional,u32,
|
||||||
channel_init,,local_msatoshi,struct amount_msat
|
msgdata,channel_init,local_msatoshi,amount_msat,
|
||||||
channel_init,,our_basepoints,struct basepoints
|
msgdata,channel_init,our_basepoints,basepoints,
|
||||||
channel_init,,our_funding_pubkey,struct pubkey
|
msgdata,channel_init,our_funding_pubkey,pubkey,
|
||||||
channel_init,,local_node_id,struct node_id
|
msgdata,channel_init,local_node_id,node_id,
|
||||||
channel_init,,remote_node_id,struct node_id
|
msgdata,channel_init,remote_node_id,node_id,
|
||||||
channel_init,,commit_msec,u32
|
msgdata,channel_init,commit_msec,u32,
|
||||||
channel_init,,cltv_delta,u16
|
msgdata,channel_init,cltv_delta,u16,
|
||||||
channel_init,,last_was_revoke,bool
|
msgdata,channel_init,last_was_revoke,bool,
|
||||||
channel_init,,num_last_sent_commit,u16
|
msgdata,channel_init,num_last_sent_commit,u16,
|
||||||
channel_init,,last_sent_commit,num_last_sent_commit*struct changed_htlc
|
msgdata,channel_init,last_sent_commit,changed_htlc,num_last_sent_commit
|
||||||
channel_init,,next_index_local,u64
|
msgdata,channel_init,next_index_local,u64,
|
||||||
channel_init,,next_index_remote,u64
|
msgdata,channel_init,next_index_remote,u64,
|
||||||
channel_init,,revocations_received,u64
|
msgdata,channel_init,revocations_received,u64,
|
||||||
channel_init,,next_htlc_id,u64
|
msgdata,channel_init,next_htlc_id,u64,
|
||||||
channel_init,,num_htlcs,u16
|
msgdata,channel_init,num_htlcs,u16,
|
||||||
channel_init,,htlcs,num_htlcs*struct added_htlc
|
msgdata,channel_init,htlcs,added_htlc,num_htlcs
|
||||||
channel_init,,htlc_states,num_htlcs*enum htlc_state
|
msgdata,channel_init,htlc_states,e:htlc_state,num_htlcs
|
||||||
channel_init,,num_fulfilled,u16
|
msgdata,channel_init,num_fulfilled,u16,
|
||||||
channel_init,,fulfilled,num_fulfilled*struct fulfilled_htlc
|
msgdata,channel_init,fulfilled,fulfilled_htlc,num_fulfilled
|
||||||
channel_init,,fulfilled_sides,num_fulfilled*enum side
|
msgdata,channel_init,fulfilled_sides,e:side,num_fulfilled
|
||||||
channel_init,,num_failed,u16
|
msgdata,channel_init,num_failed,u16,
|
||||||
channel_init,,failed,num_failed*struct failed_htlc
|
msgdata,channel_init,failed,failed_htlc,num_failed
|
||||||
channel_init,,failed_sides,num_failed*enum side
|
msgdata,channel_init,failed_sides,e:side,num_failed
|
||||||
channel_init,,local_funding_locked,bool
|
msgdata,channel_init,local_funding_locked,bool,
|
||||||
channel_init,,remote_funding_locked,bool
|
msgdata,channel_init,remote_funding_locked,bool,
|
||||||
channel_init,,funding_short_id,struct short_channel_id
|
msgdata,channel_init,funding_short_id,short_channel_id,
|
||||||
channel_init,,reestablish,bool
|
msgdata,channel_init,reestablish,bool,
|
||||||
channel_init,,send_shutdown,bool
|
msgdata,channel_init,send_shutdown,bool,
|
||||||
channel_init,,remote_shutdown_received,bool
|
msgdata,channel_init,remote_shutdown_received,bool,
|
||||||
channel_init,,final_scriptpubkey_len,u16
|
msgdata,channel_init,final_scriptpubkey_len,u16,
|
||||||
channel_init,,final_scriptpubkey,final_scriptpubkey_len*u8
|
msgdata,channel_init,final_scriptpubkey,u8,final_scriptpubkey_len
|
||||||
channel_init,,flags,u8
|
msgdata,channel_init,flags,u8,
|
||||||
channel_init,,init_peer_pkt_len,u16
|
msgdata,channel_init,init_peer_pkt_len,u16,
|
||||||
channel_init,,init_peer_pkt,init_peer_pkt_len*u8
|
msgdata,channel_init,init_peer_pkt,u8,init_peer_pkt_len
|
||||||
channel_init,,reached_announce_depth,bool
|
msgdata,channel_init,reached_announce_depth,bool,
|
||||||
channel_init,,last_remote_secret,struct secret
|
msgdata,channel_init,last_remote_secret,secret,
|
||||||
channel_init,,lflen,u16
|
msgdata,channel_init,lflen,u16,
|
||||||
channel_init,,localfeatures,lflen*u8
|
msgdata,channel_init,localfeatures,u8,lflen
|
||||||
channel_init,,upfront_shutdown_script_len,u16
|
msgdata,channel_init,upfront_shutdown_script_len,u16,
|
||||||
channel_init,,upfront_shutdown_script,upfront_shutdown_script_len*u8
|
msgdata,channel_init,upfront_shutdown_script,u8,upfront_shutdown_script_len
|
||||||
channel_init,,remote_ann_node_sig,?secp256k1_ecdsa_signature
|
msgdata,channel_init,remote_ann_node_sig,?secp256k1_ecdsa_signature,
|
||||||
channel_init,,remote_ann_bitcoin_sig,?secp256k1_ecdsa_signature
|
msgdata,channel_init,remote_ann_bitcoin_sig,?secp256k1_ecdsa_signature,
|
||||||
|
|
||||||
# master->channeld funding hit new depth(funding locked if >= lock depth)
|
# master->channeld funding hit new depth(funding locked if >= lock depth)
|
||||||
channel_funding_depth,1002
|
msgtype,channel_funding_depth,1002
|
||||||
channel_funding_depth,,short_channel_id,?struct short_channel_id
|
msgdata,channel_funding_depth,short_channel_id,?short_channel_id,
|
||||||
channel_funding_depth,,depth,u32
|
msgdata,channel_funding_depth,depth,u32,
|
||||||
|
|
||||||
# Tell channel to offer this htlc
|
# Tell channel to offer this htlc
|
||||||
channel_offer_htlc,1004
|
msgtype,channel_offer_htlc,1004
|
||||||
channel_offer_htlc,,amount_msat,struct amount_msat
|
msgdata,channel_offer_htlc,amount_msat,amount_msat,
|
||||||
channel_offer_htlc,,cltv_expiry,u32
|
msgdata,channel_offer_htlc,cltv_expiry,u32,
|
||||||
channel_offer_htlc,,payment_hash,struct sha256
|
msgdata,channel_offer_htlc,payment_hash,sha256,
|
||||||
channel_offer_htlc,,onion_routing_packet,1366*u8
|
msgdata,channel_offer_htlc,onion_routing_packet,u8,1366
|
||||||
|
|
||||||
# Reply; synchronous since IDs have to increment.
|
# Reply; synchronous since IDs have to increment.
|
||||||
channel_offer_htlc_reply,1104
|
msgtype,channel_offer_htlc_reply,1104
|
||||||
channel_offer_htlc_reply,,id,u64
|
msgdata,channel_offer_htlc_reply,id,u64,
|
||||||
# Zero failure code means success.
|
# Zero failure code means success.,
|
||||||
channel_offer_htlc_reply,,failure_code,u16
|
msgdata,channel_offer_htlc_reply,failure_code,u16,
|
||||||
channel_offer_htlc_reply,,failurestrlen,u16
|
msgdata,channel_offer_htlc_reply,failurestrlen,u16,
|
||||||
channel_offer_htlc_reply,,failurestr,failurestrlen*u8
|
msgdata,channel_offer_htlc_reply,failurestr,u8,failurestrlen
|
||||||
|
|
||||||
# Main daemon found out the preimage for an HTLC
|
# Main daemon found out the preimage for an HTLC
|
||||||
#include <bitcoin/preimage.h>
|
#include <bitcoin/preimage.h>
|
||||||
channel_fulfill_htlc,1005
|
msgtype,channel_fulfill_htlc,1005
|
||||||
channel_fulfill_htlc,,fulfilled_htlc,struct fulfilled_htlc
|
msgdata,channel_fulfill_htlc,fulfilled_htlc,fulfilled_htlc,
|
||||||
|
|
||||||
# Main daemon says HTLC failed
|
# Main daemon says HTLC failed
|
||||||
channel_fail_htlc,1006
|
msgtype,channel_fail_htlc,1006
|
||||||
channel_fail_htlc,,failed_htlc,struct failed_htlc
|
msgdata,channel_fail_htlc,failed_htlc,failed_htlc,
|
||||||
|
|
||||||
# When we receive funding_locked.
|
# When we receive funding_locked.
|
||||||
channel_got_funding_locked,1019
|
msgtype,channel_got_funding_locked,1019
|
||||||
channel_got_funding_locked,,next_per_commit_point,struct pubkey
|
msgdata,channel_got_funding_locked,next_per_commit_point,pubkey,
|
||||||
|
|
||||||
# When we send a commitment_signed message, tell master.
|
# When we send a commitment_signed message, tell master.
|
||||||
channel_sending_commitsig,1020
|
msgtype,channel_sending_commitsig,1020
|
||||||
channel_sending_commitsig,,commitnum,u64
|
msgdata,channel_sending_commitsig,commitnum,u64,
|
||||||
channel_sending_commitsig,,feerate,u32
|
msgdata,channel_sending_commitsig,feerate,u32,
|
||||||
# SENT_ADD_COMMIT, SENT_REMOVE_ACK_COMMIT, SENT_ADD_ACK_COMMIT, SENT_REMOVE_COMMIT
|
# SENT_ADD_COMMIT, SENT_REMOVE_ACK_COMMIT, SENT_ADD_ACK_COMMIT, SENT_REMOVE_COMMIT
|
||||||
channel_sending_commitsig,,num_changed,u16
|
msgdata,channel_sending_commitsig,num_changed,u16,
|
||||||
channel_sending_commitsig,,changed,num_changed*struct changed_htlc
|
msgdata,channel_sending_commitsig,changed,changed_htlc,num_changed
|
||||||
channel_sending_commitsig,,commit_sig,struct bitcoin_signature
|
msgdata,channel_sending_commitsig,commit_sig,bitcoin_signature,
|
||||||
channel_sending_commitsig,,num_htlc_sigs,u16
|
msgdata,channel_sending_commitsig,num_htlc_sigs,u16,
|
||||||
channel_sending_commitsig,,htlc_sigs,num_htlc_sigs*secp256k1_ecdsa_signature
|
msgdata,channel_sending_commitsig,htlc_sigs,secp256k1_ecdsa_signature,num_htlc_sigs
|
||||||
|
|
||||||
# Wait for reply, to make sure it's on disk before we send commit.
|
# Wait for reply, to make sure it's on disk before we send commit.
|
||||||
channel_sending_commitsig_reply,1120
|
msgtype,channel_sending_commitsig_reply,1120
|
||||||
|
|
||||||
# When we have a commitment_signed message, tell master to remember.
|
# When we have a commitment_signed message, tell master to remember.
|
||||||
channel_got_commitsig,1021
|
msgtype,channel_got_commitsig,1021
|
||||||
channel_got_commitsig,,commitnum,u64
|
msgdata,channel_got_commitsig,commitnum,u64,
|
||||||
channel_got_commitsig,,feerate,u32
|
msgdata,channel_got_commitsig,feerate,u32,
|
||||||
channel_got_commitsig,,signature,struct bitcoin_signature
|
msgdata,channel_got_commitsig,signature,bitcoin_signature,
|
||||||
channel_got_commitsig,,num_htlcs,u16
|
msgdata,channel_got_commitsig,num_htlcs,u16,
|
||||||
channel_got_commitsig,,htlc_signature,num_htlcs*secp256k1_ecdsa_signature
|
msgdata,channel_got_commitsig,htlc_signature,secp256k1_ecdsa_signature,num_htlcs
|
||||||
# RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
|
# RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
|
||||||
channel_got_commitsig,,num_added,u16
|
msgdata,channel_got_commitsig,num_added,u16,
|
||||||
channel_got_commitsig,,added,num_added*struct added_htlc
|
msgdata,channel_got_commitsig,added,added_htlc,num_added
|
||||||
channel_got_commitsig,,shared_secret,num_added*struct secret
|
msgdata,channel_got_commitsig,shared_secret,secret,num_added
|
||||||
# RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
|
# RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
|
||||||
channel_got_commitsig,,num_fulfilled,u16
|
msgdata,channel_got_commitsig,num_fulfilled,u16,
|
||||||
channel_got_commitsig,,fulfilled,num_fulfilled*struct fulfilled_htlc
|
msgdata,channel_got_commitsig,fulfilled,fulfilled_htlc,num_fulfilled
|
||||||
channel_got_commitsig,,num_failed,u16
|
msgdata,channel_got_commitsig,num_failed,u16,
|
||||||
channel_got_commitsig,,failed,num_failed*struct failed_htlc
|
msgdata,channel_got_commitsig,failed,failed_htlc,num_failed
|
||||||
# RCVD_ADD_ACK_COMMIT, RCVD_REMOVE_ACK_COMMIT
|
# RCVD_ADD_ACK_COMMIT, RCVD_REMOVE_ACK_COMMIT
|
||||||
channel_got_commitsig,,num_changed,u16
|
msgdata,channel_got_commitsig,num_changed,u16,
|
||||||
channel_got_commitsig,,changed,num_changed*struct changed_htlc
|
msgdata,channel_got_commitsig,changed,changed_htlc,num_changed
|
||||||
channel_got_commitsig,,tx,struct bitcoin_tx
|
msgdata,channel_got_commitsig,tx,bitcoin_tx,
|
||||||
|
|
||||||
# Wait for reply, to make sure it's on disk before we send revocation.
|
# Wait for reply, to make sure it's on disk before we send revocation.
|
||||||
channel_got_commitsig_reply,1121
|
msgtype,channel_got_commitsig_reply,1121
|
||||||
|
|
||||||
#include <common/htlc_wire.h>
|
#include <common/htlc_wire.h>
|
||||||
|
|
||||||
channel_got_revoke,1022
|
msgtype,channel_got_revoke,1022
|
||||||
channel_got_revoke,,revokenum,u64
|
msgdata,channel_got_revoke,revokenum,u64,
|
||||||
channel_got_revoke,,per_commitment_secret,struct secret
|
msgdata,channel_got_revoke,per_commitment_secret,secret,
|
||||||
channel_got_revoke,,next_per_commit_point,struct pubkey
|
msgdata,channel_got_revoke,next_per_commit_point,pubkey,
|
||||||
# RCVD_ADD_ACK_REVOCATION, RCVD_REMOVE_ACK_REVOCATION, RCVD_ADD_REVOCATION, RCVD_REMOVE_REVOCATION
|
# RCVD_ADD_ACK_REVOCATION, RCVD_REMOVE_ACK_REVOCATION, RCVD_ADD_REVOCATION, RCVD_REMOVE_REVOCATION
|
||||||
channel_got_revoke,,feerate,u32
|
msgdata,channel_got_revoke,feerate,u32,
|
||||||
channel_got_revoke,,num_changed,u16
|
msgdata,channel_got_revoke,num_changed,u16,
|
||||||
channel_got_revoke,,changed,num_changed*struct changed_htlc
|
msgdata,channel_got_revoke,changed,changed_htlc,num_changed
|
||||||
# Wait for reply, to make sure it's on disk before we continue
|
# Wait for reply, to make sure it's on disk before we continue
|
||||||
# (eg. if we sent another commitment_signed, that would implicitly ack).
|
# (eg. if we sent another commitment_signed, that would implicitly ack).
|
||||||
channel_got_revoke_reply,1122
|
msgtype,channel_got_revoke_reply,1122
|
||||||
|
|
||||||
# Tell peer to shut down channel.
|
# Tell peer to shut down channel.
|
||||||
channel_send_shutdown,1023
|
msgtype,channel_send_shutdown,1023
|
||||||
|
|
||||||
# Peer told us that channel is shutting down
|
# Peer told us that channel is shutting down
|
||||||
channel_got_shutdown,1024
|
msgtype,channel_got_shutdown,1024
|
||||||
channel_got_shutdown,,scriptpubkey_len,u16
|
msgdata,channel_got_shutdown,scriptpubkey_len,u16,
|
||||||
channel_got_shutdown,,scriptpubkey,scriptpubkey_len*u8
|
msgdata,channel_got_shutdown,scriptpubkey,u8,scriptpubkey_len
|
||||||
|
|
||||||
# Shutdown is complete, ready for closing negotiation. + peer_fd & gossip_fd.
|
# Shutdown is complete, ready for closing negotiation. + peer_fd & gossip_fd.
|
||||||
channel_shutdown_complete,1025
|
msgtype,channel_shutdown_complete,1025
|
||||||
channel_shutdown_complete,,per_peer_state,struct per_peer_state
|
msgdata,channel_shutdown_complete,per_peer_state,per_peer_state,
|
||||||
|
|
||||||
# Re-enable commit timer.
|
# Re-enable commit timer.
|
||||||
channel_dev_reenable_commit,1026
|
msgtype,channel_dev_reenable_commit,1026
|
||||||
channel_dev_reenable_commit_reply,1126
|
msgtype,channel_dev_reenable_commit_reply,1126,
|
||||||
|
|
||||||
channel_feerates,1027
|
msgtype,channel_feerates,1027
|
||||||
channel_feerates,,feerate,u32
|
msgdata,channel_feerates,feerate,u32,
|
||||||
channel_feerates,,min_feerate,u32
|
msgdata,channel_feerates,min_feerate,u32,
|
||||||
channel_feerates,,max_feerate,u32
|
msgdata,channel_feerates,max_feerate,u32,
|
||||||
|
|
||||||
# master -> channeld: do you have a memleak?
|
# master -> channeld: do you have a memleak?
|
||||||
channel_dev_memleak,1033
|
msgtype,channel_dev_memleak,1033
|
||||||
|
|
||||||
channel_dev_memleak_reply,1133
|
msgtype,channel_dev_memleak_reply,1133
|
||||||
channel_dev_memleak_reply,,leak,bool
|
msgdata,channel_dev_memleak_reply,leak,bool,
|
||||||
|
|
||||||
# Peer presented proof it was from the future.
|
# Peer presented proof it was from the future.
|
||||||
channel_fail_fallen_behind,1028
|
msgtype,channel_fail_fallen_behind,1028
|
||||||
channel_fail_fallen_behind,,remote_per_commitment_point,struct pubkey
|
msgdata,channel_fail_fallen_behind,remote_per_commitment_point,pubkey,
|
||||||
|
|
||||||
# Handle a channel specific feerate base ppm configuration
|
# Handle a channel specific feerate base ppm configuration
|
||||||
channel_specific_feerates,1029
|
msgtype,channel_specific_feerates,1029
|
||||||
channel_specific_feerates,,feerate_base,u32
|
msgdata,channel_specific_feerates,feerate_base,u32,
|
||||||
channel_specific_feerates,,feerate_ppm,u32
|
msgdata,channel_specific_feerates,feerate_ppm,u32,
|
||||||
|
|
||||||
# When we receive announcement_signatures for channel announce
|
# When we receive announcement_signatures for channel announce
|
||||||
channel_got_announcement,1017
|
msgtype,channel_got_announcement,1017
|
||||||
channel_got_announcement,,remote_ann_node_sig,secp256k1_ecdsa_signature
|
msgdata,channel_got_announcement,remote_ann_node_sig,secp256k1_ecdsa_signature,
|
||||||
channel_got_announcement,,remote_ann_bitcoin_sig,secp256k1_ecdsa_signature
|
msgdata,channel_got_announcement,remote_ann_bitcoin_sig,secp256k1_ecdsa_signature,
|
||||||
|
|||||||
|
@@ -80,10 +80,10 @@ CLOSINGD_COMMON_OBJS := \
|
|||||||
hsmd/gen_hsm_wire.o
|
hsmd/gen_hsm_wire.o
|
||||||
|
|
||||||
closingd/gen_closing_wire.h: $(WIRE_GEN) closingd/closing_wire.csv
|
closingd/gen_closing_wire.h: $(WIRE_GEN) closingd/closing_wire.csv
|
||||||
$(WIRE_GEN) --header $@ closing_wire_type < closingd/closing_wire.csv > $@
|
$(WIRE_GEN) --page header $@ closing_wire_type < closingd/closing_wire.csv > $@
|
||||||
|
|
||||||
closingd/gen_closing_wire.c: $(WIRE_GEN) closingd/closing_wire.csv
|
closingd/gen_closing_wire.c: $(WIRE_GEN) closingd/closing_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} closing_wire_type < closingd/closing_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} closing_wire_type < closingd/closing_wire.csv > $@
|
||||||
|
|
||||||
LIGHTNINGD_CLOSING_OBJS := $(LIGHTNINGD_CLOSING_SRC:.c=.o) $(LIGHTNINGD_CLOSING_GEN_SRC:.c=.o)
|
LIGHTNINGD_CLOSING_OBJS := $(LIGHTNINGD_CLOSING_SRC:.c=.o) $(LIGHTNINGD_CLOSING_GEN_SRC:.c=.o)
|
||||||
|
|
||||||
|
|||||||
@@ -2,41 +2,41 @@
|
|||||||
#include <common/htlc_wire.h>
|
#include <common/htlc_wire.h>
|
||||||
#include <common/per_peer_state.h>
|
#include <common/per_peer_state.h>
|
||||||
# Begin! (passes peer fd, gossipd-client fd)
|
# Begin! (passes peer fd, gossipd-client fd)
|
||||||
closing_init,2001
|
msgtype,closing_init,2001
|
||||||
closing_init,,pps,struct per_peer_state
|
msgdata,closing_init,pps,per_peer_state,
|
||||||
closing_init,,funding_txid,struct bitcoin_txid
|
msgdata,closing_init,funding_txid,bitcoin_txid,
|
||||||
closing_init,,funding_txout,u16
|
msgdata,closing_init,funding_txout,u16,
|
||||||
closing_init,,funding_satoshi,struct amount_sat
|
msgdata,closing_init,funding_satoshi,amount_sat,
|
||||||
closing_init,,local_fundingkey,struct pubkey
|
msgdata,closing_init,local_fundingkey,pubkey,
|
||||||
closing_init,,remote_fundingkey,struct pubkey
|
msgdata,closing_init,remote_fundingkey,pubkey,
|
||||||
closing_init,,funder,enum side
|
msgdata,closing_init,funder,e:side,
|
||||||
closing_init,,local_sat,struct amount_sat
|
msgdata,closing_init,local_sat,amount_sat,
|
||||||
closing_init,,remote_sat,struct amount_sat
|
msgdata,closing_init,remote_sat,amount_sat,
|
||||||
closing_init,,our_dust_limit,struct amount_sat
|
msgdata,closing_init,our_dust_limit,amount_sat,
|
||||||
closing_init,,min_fee_satoshi,struct amount_sat
|
msgdata,closing_init,min_fee_satoshi,amount_sat,
|
||||||
closing_init,,fee_limit_satoshi,struct amount_sat
|
msgdata,closing_init,fee_limit_satoshi,amount_sat,
|
||||||
closing_init,,initial_fee_satoshi,struct amount_sat
|
msgdata,closing_init,initial_fee_satoshi,amount_sat,
|
||||||
closing_init,,local_scriptpubkey_len,u16
|
msgdata,closing_init,local_scriptpubkey_len,u16,
|
||||||
closing_init,,local_scriptpubkey,local_scriptpubkey_len*u8
|
msgdata,closing_init,local_scriptpubkey,u8,local_scriptpubkey_len
|
||||||
closing_init,,remote_scriptpubkey_len,u16
|
msgdata,closing_init,remote_scriptpubkey_len,u16,
|
||||||
closing_init,,remote_scriptpubkey,remote_scriptpubkey_len*u8
|
msgdata,closing_init,remote_scriptpubkey,u8,remote_scriptpubkey_len
|
||||||
closing_init,,reconnected,bool
|
msgdata,closing_init,reconnected,bool,
|
||||||
closing_init,,next_index_local,u64
|
msgdata,closing_init,next_index_local,u64,
|
||||||
closing_init,,next_index_remote,u64
|
msgdata,closing_init,next_index_remote,u64,
|
||||||
closing_init,,revocations_received,u64
|
msgdata,closing_init,revocations_received,u64,
|
||||||
closing_init,,channel_reestablish_len,u16
|
msgdata,closing_init,channel_reestablish_len,u16,
|
||||||
closing_init,,channel_reestablish,channel_reestablish_len*u8
|
msgdata,closing_init,channel_reestablish,u8,channel_reestablish_len
|
||||||
closing_init,,final_scriptpubkey_len,u16
|
msgdata,closing_init,final_scriptpubkey_len,u16,
|
||||||
closing_init,,final_scriptpubkey,final_scriptpubkey_len*u8
|
msgdata,closing_init,final_scriptpubkey,u8,final_scriptpubkey_len
|
||||||
closing_init,,last_remote_secret,struct secret
|
msgdata,closing_init,last_remote_secret,secret,
|
||||||
|
|
||||||
# We received an offer, save signature.
|
# We received an offer, save signature.
|
||||||
closing_received_signature,2002
|
msgtype,closing_received_signature,2002
|
||||||
closing_received_signature,,signature,struct bitcoin_signature
|
msgdata,closing_received_signature,signature,bitcoin_signature,
|
||||||
closing_received_signature,,tx,struct bitcoin_tx
|
msgdata,closing_received_signature,tx,bitcoin_tx,
|
||||||
|
|
||||||
closing_received_signature_reply,2102
|
msgtype,closing_received_signature_reply,2102
|
||||||
closing_received_signature_reply,,closing_txid,struct bitcoin_txid
|
msgdata,closing_received_signature_reply,closing_txid,bitcoin_txid,
|
||||||
|
|
||||||
# Negotiations complete, we're exiting.
|
# Negotiations complete, we're exiting.
|
||||||
closing_complete,2004
|
msgtype,closing_complete,2004
|
||||||
|
|||||||
|
@@ -80,16 +80,16 @@ common/gen_htlc_state_names.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-e
|
|||||||
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@
|
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@
|
||||||
|
|
||||||
common/gen_status_wire.h: $(WIRE_GEN) common/status_wire.csv
|
common/gen_status_wire.h: $(WIRE_GEN) common/status_wire.csv
|
||||||
$(WIRE_GEN) --header $@ status < common/status_wire.csv > $@
|
$(WIRE_GEN) --page header $@ status < common/status_wire.csv > $@
|
||||||
|
|
||||||
common/gen_status_wire.c: $(WIRE_GEN) common/status_wire.csv
|
common/gen_status_wire.c: $(WIRE_GEN) common/status_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} status < common/status_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} status < common/status_wire.csv > $@
|
||||||
|
|
||||||
common/gen_peer_status_wire.h: $(WIRE_GEN) common/peer_status_wire.csv
|
common/gen_peer_status_wire.h: $(WIRE_GEN) common/peer_status_wire.csv
|
||||||
$(WIRE_GEN) --header $@ peer_status < common/peer_status_wire.csv > $@
|
$(WIRE_GEN) --page header $@ peer_status < common/peer_status_wire.csv > $@
|
||||||
|
|
||||||
common/gen_peer_status_wire.c: $(WIRE_GEN) common/peer_status_wire.csv
|
common/gen_peer_status_wire.c: $(WIRE_GEN) common/peer_status_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} peer_status < common/peer_status_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} peer_status < common/peer_status_wire.csv > $@
|
||||||
|
|
||||||
check-makefile: check-common-makefile
|
check-makefile: check-common-makefile
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include <common/per_peer_state.h>
|
#include <common/per_peer_state.h>
|
||||||
|
|
||||||
# An error occurred: if error_for_them, that to go to them.
|
# An error occurred: if error_for_them, that to go to them.
|
||||||
status_peer_error,0xFFF4
|
msgtype,status_peer_error,0xFFF4
|
||||||
# This is implied if error_for_them, but master tries not to parse packets.
|
# This is implied if error_for_them, but master tries not to parse packets.
|
||||||
status_peer_error,,channel,struct channel_id
|
msgdata,status_peer_error,channel,channel_id,
|
||||||
status_peer_error,,desc,wirestring
|
msgdata,status_peer_error,desc,wirestring,
|
||||||
status_peer_error,,pps,struct per_peer_state
|
msgdata,status_peer_error,pps,per_peer_state,
|
||||||
status_peer_error,,len,u16
|
msgdata,status_peer_error,len,u16,
|
||||||
status_peer_error,,error_for_them,len*u8
|
msgdata,status_peer_error,error_for_them,u8,len
|
||||||
|
|||||||
|
@@ -1,23 +1,23 @@
|
|||||||
#include <common/per_peer_state.h>
|
#include <common/per_peer_state.h>
|
||||||
#include <common/status_wire.h>
|
#include <common/status_wire.h>
|
||||||
|
|
||||||
status_log,0xFFF0
|
msgtype,status_log,0xFFF0
|
||||||
status_log,,level,enum log_level
|
msgdata,status_log,level,e:log_level,
|
||||||
status_log,,entry,wirestring
|
msgdata,status_log,entry,wirestring,
|
||||||
|
|
||||||
status_io,0xFFF1
|
msgtype,status_io,0xFFF1
|
||||||
status_io,,iodir,enum log_level
|
msgdata,status_io,iodir,e:log_level,
|
||||||
status_io,,who,wirestring
|
msgdata,status_io,who,wirestring,
|
||||||
status_io,,len,u16
|
msgdata,status_io,len,u16,
|
||||||
status_io,,data,len*u8
|
msgdata,status_io,data,u8,len
|
||||||
|
|
||||||
status_fail,0xFFF2
|
msgtype,status_fail,0xFFF2
|
||||||
status_fail,,failreason,enum status_failreason
|
msgdata,status_fail,failreason,e:status_failreason,
|
||||||
status_fail,,desc,wirestring
|
msgdata,status_fail,desc,wirestring,
|
||||||
|
|
||||||
status_peer_connection_lost,0xFFF3
|
msgtype,status_peer_connection_lost,0xFFF3
|
||||||
|
|
||||||
status_peer_billboard,0xFFF5
|
msgtype,status_peer_billboard,0xFFF5
|
||||||
status_peer_billboard,,perm,bool
|
msgdata,status_peer_billboard,perm,bool,
|
||||||
status_peer_billboard,,happenings,wirestring
|
msgdata,status_peer_billboard,happenings,wirestring,
|
||||||
# Note: 0xFFFF is reserved for MSG_PASS_FD!
|
# Note: 0xFFFF is reserved for MSG_PASS_FD!
|
||||||
|
|||||||
|
@@ -80,16 +80,16 @@ connectd-all: lightningd/lightning_connectd
|
|||||||
lightningd/lightning_connectd: $(LIGHTNINGD_CONNECT_OBJS) $(CONNECTD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS)
|
lightningd/lightning_connectd: $(LIGHTNINGD_CONNECT_OBJS) $(CONNECTD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS)
|
||||||
|
|
||||||
connectd/gen_connect_wire.h: $(WIRE_GEN) connectd/connect_wire.csv
|
connectd/gen_connect_wire.h: $(WIRE_GEN) connectd/connect_wire.csv
|
||||||
$(WIRE_GEN) --header $@ connect_wire_type < connectd/connect_wire.csv > $@
|
$(WIRE_GEN) --page header $@ connect_wire_type < connectd/connect_wire.csv > $@
|
||||||
|
|
||||||
connectd/gen_connect_wire.c: $(WIRE_GEN) connectd/connect_wire.csv
|
connectd/gen_connect_wire.c: $(WIRE_GEN) connectd/connect_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} connect_wire_type < connectd/connect_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} connect_wire_type < connectd/connect_wire.csv > $@
|
||||||
|
|
||||||
connectd/gen_connect_gossip_wire.h: $(WIRE_GEN) connectd/connect_gossip_wire.csv
|
connectd/gen_connect_gossip_wire.h: $(WIRE_GEN) connectd/connect_gossip_wire.csv
|
||||||
$(WIRE_GEN) --header $@ connect_gossip_wire_type < connectd/connect_gossip_wire.csv > $@
|
$(WIRE_GEN) --page header $@ connect_gossip_wire_type < connectd/connect_gossip_wire.csv > $@
|
||||||
|
|
||||||
connectd/gen_connect_gossip_wire.c: $(WIRE_GEN) connectd/connect_gossip_wire.csv
|
connectd/gen_connect_gossip_wire.c: $(WIRE_GEN) connectd/connect_gossip_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} connect_gossip_wire_type < connectd/connect_gossip_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} connect_gossip_wire_type < connectd/connect_gossip_wire.csv > $@
|
||||||
|
|
||||||
check-source: $(LIGHTNINGD_CONNECT_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_CONNECT_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
|
check-source: $(LIGHTNINGD_CONNECT_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_CONNECT_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
|
||||||
check-source-bolt: $(LIGHTNINGD_CONNECT_SRC:%=bolt-check/%) $(LIGHTNINGD_CONNECT_HEADERS:%=bolt-check/%)
|
check-source-bolt: $(LIGHTNINGD_CONNECT_SRC:%=bolt-check/%) $(LIGHTNINGD_CONNECT_HEADERS:%=bolt-check/%)
|
||||||
|
|||||||
@@ -2,22 +2,22 @@
|
|||||||
#include <common/wireaddr.h>
|
#include <common/wireaddr.h>
|
||||||
|
|
||||||
# Communication between gossipd and connectd.
|
# Communication between gossipd and connectd.
|
||||||
gossip_new_peer,4000
|
msgtype,gossip_new_peer,4000
|
||||||
gossip_new_peer,,id,struct node_id
|
msgdata,gossip_new_peer,id,node_id,
|
||||||
# Did we negotiate LOCAL_GOSSIP_QUERIES?
|
# Did we negotiate LOCAL_GOSSIP_QUERIES?
|
||||||
gossip_new_peer,,gossip_queries_feature,bool
|
msgdata,gossip_new_peer,gossip_queries_feature,bool,
|
||||||
# Did they offer LOCAL_INITIAL_ROUTING_SYNC?
|
# Did they offer LOCAL_INITIAL_ROUTING_SYNC?
|
||||||
gossip_new_peer,,initial_routing_sync,bool
|
msgdata,gossip_new_peer,initial_routing_sync,bool,
|
||||||
|
|
||||||
# if success: + gossip fd and gossip_store fd
|
# if success: + gossip fd and gossip_store fd
|
||||||
gossip_new_peer_reply,4100
|
msgtype,gossip_new_peer_reply,4100
|
||||||
gossip_new_peer_reply,,success,bool
|
msgdata,gossip_new_peer_reply,success,bool,
|
||||||
gossip_new_peer_reply,,gs,?struct gossip_state
|
msgdata,gossip_new_peer_reply,gs,?gossip_state,
|
||||||
|
|
||||||
# Connectd asks gossipd for any known addresses for that node.
|
# Connectd asks gossipd for any known addresses for that node.
|
||||||
gossip_get_addrs,4001
|
msgtype,gossip_get_addrs,4001
|
||||||
gossip_get_addrs,,id,struct node_id
|
msgdata,gossip_get_addrs,id,node_id,
|
||||||
|
|
||||||
gossip_get_addrs_reply,4101
|
msgtype,gossip_get_addrs_reply,4101
|
||||||
gossip_get_addrs_reply,,num,u16
|
msgdata,gossip_get_addrs_reply,num,u16,
|
||||||
gossip_get_addrs_reply,,addrs,num*struct wireaddr
|
msgdata,gossip_get_addrs_reply,addrs,wireaddr,num
|
||||||
|
|||||||
|
@@ -3,65 +3,65 @@
|
|||||||
#include <common/wireaddr.h>
|
#include <common/wireaddr.h>
|
||||||
#include <lightningd/gossip_msg.h>
|
#include <lightningd/gossip_msg.h>
|
||||||
|
|
||||||
connectctl_init,2000
|
msgtype,connectctl_init,2000
|
||||||
connectctl_init,,id,struct node_id
|
msgdata,connectctl_init,id,node_id,
|
||||||
connectctl_init,,num_wireaddrs,u16
|
msgdata,connectctl_init,num_wireaddrs,u16,
|
||||||
connectctl_init,,wireaddrs,num_wireaddrs*struct wireaddr_internal
|
msgdata,connectctl_init,wireaddrs,wireaddr_internal,num_wireaddrs
|
||||||
connectctl_init,,listen_announce,num_wireaddrs*enum addr_listen_announce
|
msgdata,connectctl_init,listen_announce,e:addr_listen_announce,num_wireaddrs
|
||||||
connectctl_init,,tor_proxyaddr,?struct wireaddr
|
msgdata,connectctl_init,tor_proxyaddr,?wireaddr,
|
||||||
connectctl_init,,use_tor_proxy_always,bool
|
msgdata,connectctl_init,use_tor_proxy_always,bool,
|
||||||
connectctl_init,,dev_allow_localhost,bool
|
msgdata,connectctl_init,dev_allow_localhost,bool,
|
||||||
connectctl_init,,use_dns,bool
|
msgdata,connectctl_init,use_dns,bool,
|
||||||
connectctl_init,,tor_password,wirestring
|
msgdata,connectctl_init,tor_password,wirestring,
|
||||||
|
|
||||||
# Connectd->master, here are the addresses I bound, can announce.
|
# Connectd->master, here are the addresses I bound, can announce.
|
||||||
connectctl_init_reply,2100
|
msgtype,connectctl_init_reply,2100
|
||||||
connectctl_init_reply,,num_bindings,u16
|
msgdata,connectctl_init_reply,num_bindings,u16,
|
||||||
connectctl_init_reply,,bindings,num_bindings*struct wireaddr_internal
|
msgdata,connectctl_init_reply,bindings,wireaddr_internal,num_bindings
|
||||||
connectctl_init_reply,,num_announcable,u16
|
msgdata,connectctl_init_reply,num_announcable,u16,
|
||||||
connectctl_init_reply,,announcable,num_announcable*struct wireaddr
|
msgdata,connectctl_init_reply,announcable,wireaddr,num_announcable
|
||||||
|
|
||||||
# Activate the connect daemon, so others can connect.
|
# Activate the connect daemon, so others can connect.
|
||||||
connectctl_activate,2025
|
msgtype,connectctl_activate,2025
|
||||||
# Do we listen?
|
# Do we listen?
|
||||||
connectctl_activate,,listen,bool
|
msgdata,connectctl_activate,listen,bool,
|
||||||
|
|
||||||
# Connectd->master, I am ready.
|
# Connectd->master, I am ready.
|
||||||
connectctl_activate_reply,2125
|
msgtype,connectctl_activate_reply,2125
|
||||||
|
|
||||||
# connectd->master: disconnect this peer please (due to reconnect).
|
# connectd->master: disconnect this peer please (due to reconnect).
|
||||||
connect_reconnected,2112
|
msgtype,connect_reconnected,2112
|
||||||
connect_reconnected,,id,struct node_id
|
msgdata,connect_reconnected,id,node_id,
|
||||||
|
|
||||||
# Master -> connectd: connect to a peer.
|
# Master -> connectd: connect to a peer.
|
||||||
connectctl_connect_to_peer,2001
|
msgtype,connectctl_connect_to_peer,2001
|
||||||
connectctl_connect_to_peer,,id,struct node_id
|
msgdata,connectctl_connect_to_peer,id,node_id,
|
||||||
connectctl_connect_to_peer,,seconds_waited,u32
|
msgdata,connectctl_connect_to_peer,seconds_waited,u32,
|
||||||
connectctl_connect_to_peer,,addrhint,?struct wireaddr_internal
|
msgdata,connectctl_connect_to_peer,addrhint,?wireaddr_internal,
|
||||||
|
|
||||||
# Connectd->master: connect failed.
|
# Connectd->master: connect failed.
|
||||||
connectctl_connect_failed,2020
|
msgtype,connectctl_connect_failed,2020
|
||||||
connectctl_connect_failed,,id,struct node_id
|
msgdata,connectctl_connect_failed,id,node_id,
|
||||||
connectctl_connect_failed,,failreason,wirestring
|
msgdata,connectctl_connect_failed,failreason,wirestring,
|
||||||
connectctl_connect_failed,,seconds_to_delay,u32
|
msgdata,connectctl_connect_failed,seconds_to_delay,u32,
|
||||||
connectctl_connect_failed,,addrhint,?struct wireaddr_internal
|
msgdata,connectctl_connect_failed,addrhint,?wireaddr_internal,
|
||||||
|
|
||||||
# Connectd -> master: we got a peer. Three fds: peer, gossip and gossip_store
|
# Connectd -> master: we got a peer. Three fds: peer, gossip and gossip_store
|
||||||
connect_peer_connected,2002
|
msgtype,connect_peer_connected,2002
|
||||||
connect_peer_connected,,id,struct node_id
|
msgdata,connect_peer_connected,id,node_id,
|
||||||
connect_peer_connected,,addr,struct wireaddr_internal
|
msgdata,connect_peer_connected,addr,wireaddr_internal,
|
||||||
connect_peer_connected,,pps,struct per_peer_state
|
msgdata,connect_peer_connected,pps,per_peer_state,
|
||||||
connect_peer_connected,,gflen,u16
|
msgdata,connect_peer_connected,gflen,u16,
|
||||||
connect_peer_connected,,globalfeatures,gflen*u8
|
msgdata,connect_peer_connected,globalfeatures,u8,gflen
|
||||||
connect_peer_connected,,lflen,u16
|
msgdata,connect_peer_connected,lflen,u16,
|
||||||
connect_peer_connected,,localfeatures,lflen*u8
|
msgdata,connect_peer_connected,localfeatures,u8,lflen
|
||||||
|
|
||||||
# master -> connectd: peer has disconnected.
|
# master -> connectd: peer has disconnected.
|
||||||
connectctl_peer_disconnected,2015
|
msgtype,connectctl_peer_disconnected,2015
|
||||||
connectctl_peer_disconnected,,id,struct node_id
|
msgdata,connectctl_peer_disconnected,id,node_id,
|
||||||
|
|
||||||
# master -> connectd: do you have a memleak?
|
# master -> connectd: do you have a memleak?
|
||||||
connect_dev_memleak,2033
|
msgtype,connect_dev_memleak,2033
|
||||||
|
|
||||||
connect_dev_memleak_reply,2133
|
msgtype,connect_dev_memleak_reply,2133
|
||||||
connect_dev_memleak_reply,,leak,bool
|
msgdata,connect_dev_memleak_reply,leak,bool,
|
||||||
|
|||||||
|
@@ -81,22 +81,22 @@ gossipd-all: lightningd/lightning_gossipd $(LIGHTNINGD_GOSSIP_CLIENT_OBJS)
|
|||||||
lightningd/lightning_gossipd: $(LIGHTNINGD_GOSSIP_OBJS) $(GOSSIPD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS)
|
lightningd/lightning_gossipd: $(LIGHTNINGD_GOSSIP_OBJS) $(GOSSIPD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS)
|
||||||
|
|
||||||
gossipd/gen_gossip_wire.h: $(WIRE_GEN) gossipd/gossip_wire.csv
|
gossipd/gen_gossip_wire.h: $(WIRE_GEN) gossipd/gossip_wire.csv
|
||||||
$(WIRE_GEN) --header $@ gossip_wire_type < gossipd/gossip_wire.csv > $@
|
$(WIRE_GEN) --page header $@ gossip_wire_type < gossipd/gossip_wire.csv > $@
|
||||||
|
|
||||||
gossipd/gen_gossip_wire.c: $(WIRE_GEN) gossipd/gossip_wire.csv
|
gossipd/gen_gossip_wire.c: $(WIRE_GEN) gossipd/gossip_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} gossip_wire_type < gossipd/gossip_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} gossip_wire_type < gossipd/gossip_wire.csv > $@
|
||||||
|
|
||||||
gossipd/gen_gossip_peerd_wire.h: $(WIRE_GEN) gossipd/gossip_peerd_wire.csv
|
gossipd/gen_gossip_peerd_wire.h: $(WIRE_GEN) gossipd/gossip_peerd_wire.csv
|
||||||
$(WIRE_GEN) --header $@ gossip_peerd_wire_type < gossipd/gossip_peerd_wire.csv > $@
|
$(WIRE_GEN) --page header $@ gossip_peerd_wire_type < gossipd/gossip_peerd_wire.csv > $@
|
||||||
|
|
||||||
gossipd/gen_gossip_peerd_wire.c: $(WIRE_GEN) gossipd/gossip_peerd_wire.csv
|
gossipd/gen_gossip_peerd_wire.c: $(WIRE_GEN) gossipd/gossip_peerd_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} gossip_peerd_wire_type < gossipd/gossip_peerd_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} gossip_peerd_wire_type < gossipd/gossip_peerd_wire.csv > $@
|
||||||
|
|
||||||
gossipd/gen_gossip_store.h: $(WIRE_GEN) gossipd/gossip_store.csv
|
gossipd/gen_gossip_store.h: $(WIRE_GEN) gossipd/gossip_store.csv
|
||||||
$(WIRE_GEN) --header $@ gossip_store_type < gossipd/gossip_store.csv > $@
|
$(WIRE_GEN) --page header $@ gossip_store_type < gossipd/gossip_store.csv > $@
|
||||||
|
|
||||||
gossipd/gen_gossip_store.c: $(WIRE_GEN) gossipd/gossip_store.csv
|
gossipd/gen_gossip_store.c: $(WIRE_GEN) gossipd/gossip_store.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} gossip_store_type < gossipd/gossip_store.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} gossip_store_type < gossipd/gossip_store.csv > $@
|
||||||
|
|
||||||
|
|
||||||
check-source: $(LIGHTNINGD_GOSSIP_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
|
check-source: $(LIGHTNINGD_GOSSIP_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
|
||||||
|
|||||||
@@ -1,33 +1,33 @@
|
|||||||
# These must be distinct from WIRE_CHANNEL_ANNOUNCEMENT etc. gossip msgs!
|
# These must be distinct from WIRE_CHANNEL_ANNOUNCEMENT etc. gossip msgs!
|
||||||
# Channel daemon can ask for updates for a specific channel, for sending
|
# Channel daemon can ask for updates for a specific channel, for sending
|
||||||
# errors.
|
# errors.
|
||||||
gossipd_get_update,3501
|
msgtype,gossipd_get_update,3501
|
||||||
gossipd_get_update,,short_channel_id,struct short_channel_id
|
msgdata,gossipd_get_update,short_channel_id,short_channel_id,
|
||||||
|
|
||||||
# If channel isn't known, update will be empty.
|
# If channel isn't known, update will be empty.
|
||||||
gossipd_get_update_reply,3601
|
msgtype,gossipd_get_update_reply,3601
|
||||||
gossipd_get_update_reply,,len,u16
|
msgdata,gossipd_get_update_reply,len,u16,
|
||||||
gossipd_get_update_reply,,update,len*u8
|
msgdata,gossipd_get_update_reply,update,u8,len
|
||||||
|
|
||||||
# Both sides have seen the funding tx being locked, but we have not
|
# Both sides have seen the funding tx being locked, but we have not
|
||||||
# yet reached the announcement depth. So we add the channel locally so
|
# yet reached the announcement depth. So we add the channel locally so
|
||||||
# we (and peer) can update it already.
|
# we (and peer) can update it already.
|
||||||
gossipd_local_add_channel,3503
|
msgtype,gossipd_local_add_channel,3503
|
||||||
gossipd_local_add_channel,,short_channel_id,struct short_channel_id
|
msgdata,gossipd_local_add_channel,short_channel_id,short_channel_id,
|
||||||
gossipd_local_add_channel,,remote_node_id,struct node_id
|
msgdata,gossipd_local_add_channel,remote_node_id,node_id,
|
||||||
gossipd_local_add_channel,,satoshis,struct amount_sat
|
msgdata,gossipd_local_add_channel,satoshis,amount_sat,
|
||||||
|
|
||||||
# Send this channel_update.
|
# Send this channel_update.
|
||||||
gossipd_local_channel_update,3504
|
msgtype,gossipd_local_channel_update,3504
|
||||||
gossipd_local_channel_update,,short_channel_id,struct short_channel_id
|
msgdata,gossipd_local_channel_update,short_channel_id,short_channel_id,
|
||||||
gossipd_local_channel_update,,disable,bool
|
msgdata,gossipd_local_channel_update,disable,bool,
|
||||||
gossipd_local_channel_update,,cltv_expiry_delta,u16
|
msgdata,gossipd_local_channel_update,cltv_expiry_delta,u16,
|
||||||
gossipd_local_channel_update,,htlc_minimum_msat,struct amount_msat
|
msgdata,gossipd_local_channel_update,htlc_minimum_msat,amount_msat,
|
||||||
gossipd_local_channel_update,,fee_base_msat,u32
|
msgdata,gossipd_local_channel_update,fee_base_msat,u32,
|
||||||
gossipd_local_channel_update,,fee_proportional_millionths,u32
|
msgdata,gossipd_local_channel_update,fee_proportional_millionths,u32,
|
||||||
gossipd_local_channel_update,,htlc_maximum_msat,struct amount_msat
|
msgdata,gossipd_local_channel_update,htlc_maximum_msat,amount_msat,
|
||||||
|
|
||||||
# Update your gossip_store fd: + gossip_store_fd
|
# Update your gossip_store fd: + gossip_store_fd
|
||||||
gossipd_new_store_fd,3505
|
msgtype,gossipd_new_store_fd,3505
|
||||||
# How much shorter the new store is, so you can offset streaming.
|
# How much shorter the new store is, so you can offset streaming.
|
||||||
gossipd_new_store_fd,,offset_shorter,u64
|
msgdata,gossipd_new_store_fd,offset_shorter,u64,
|
||||||
|
|||||||
|
@@ -3,9 +3,9 @@
|
|||||||
# 256/257/258 or gossipd_local_add_channel (3503)
|
# 256/257/258 or gossipd_local_add_channel (3503)
|
||||||
|
|
||||||
# This always follows the channel_announce.
|
# This always follows the channel_announce.
|
||||||
gossip_store_channel_amount,4101
|
msgtype,gossip_store_channel_amount,4101
|
||||||
gossip_store_channel_amount,,satoshis,struct amount_sat
|
msgdata,gossip_store_channel_amount,satoshis,amount_sat,
|
||||||
|
|
||||||
gossip_store_private_update,4102
|
msgtype,gossip_store_private_update,4102
|
||||||
gossip_store_private_update,,len,u16
|
msgdata,gossip_store_private_update,len,u16,
|
||||||
gossip_store_private_update,,update,len*u8
|
msgdata,gossip_store_private_update,update,u8,len
|
||||||
|
|||||||
|
@@ -3,160 +3,160 @@
|
|||||||
#include <wire/gen_onion_wire.h>
|
#include <wire/gen_onion_wire.h>
|
||||||
|
|
||||||
# Initialize the gossip daemon.
|
# Initialize the gossip daemon.
|
||||||
gossipctl_init,3000
|
msgtype,gossipctl_init,3000
|
||||||
gossipctl_init,,chain_hash,struct bitcoin_blkid
|
msgdata,gossipctl_init,chain_hash,bitcoin_blkid,
|
||||||
gossipctl_init,,id,struct node_id
|
msgdata,gossipctl_init,id,node_id,
|
||||||
gossipctl_init,,gflen,u16
|
msgdata,gossipctl_init,gflen,u16,
|
||||||
gossipctl_init,,globalfeatures,gflen*u8
|
msgdata,gossipctl_init,globalfeatures,u8,gflen
|
||||||
gossipctl_init,,rgb,3*u8
|
msgdata,gossipctl_init,rgb,u8,3
|
||||||
gossipctl_init,,alias,32*u8
|
msgdata,gossipctl_init,alias,u8,32
|
||||||
gossipctl_init,,update_channel_interval,u32
|
msgdata,gossipctl_init,update_channel_interval,u32,
|
||||||
gossipctl_init,,num_announcable,u16
|
msgdata,gossipctl_init,num_announcable,u16,
|
||||||
gossipctl_init,,announcable,num_announcable*struct wireaddr
|
msgdata,gossipctl_init,announcable,wireaddr,num_announcable
|
||||||
gossipctl_init,,dev_gossip_time,?u32
|
msgdata,gossipctl_init,dev_gossip_time,?u32,
|
||||||
|
|
||||||
# Pass JSON-RPC getnodes call through
|
# Pass JSON-RPC getnodes call through
|
||||||
gossip_getnodes_request,3005
|
msgtype,gossip_getnodes_request,3005
|
||||||
gossip_getnodes_request,,id,?struct node_id
|
msgdata,gossip_getnodes_request,id,?node_id,
|
||||||
|
|
||||||
#include <lightningd/gossip_msg.h>
|
#include <lightningd/gossip_msg.h>
|
||||||
gossip_getnodes_reply,3105
|
msgtype,gossip_getnodes_reply,3105
|
||||||
gossip_getnodes_reply,,num_nodes,u32
|
msgdata,gossip_getnodes_reply,num_nodes,u32,
|
||||||
gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry
|
msgdata,gossip_getnodes_reply,nodes,gossip_getnodes_entry,num_nodes
|
||||||
|
|
||||||
# Pass JSON-RPC getroute call through
|
# Pass JSON-RPC getroute call through
|
||||||
gossip_getroute_request,3006
|
msgtype,gossip_getroute_request,3006
|
||||||
# Source defaults to "us", and means we don't consider first-hop channel fees
|
# Source defaults to "us", and means we don't consider first-hop channel fees
|
||||||
gossip_getroute_request,,source,?struct node_id
|
msgdata,gossip_getroute_request,source,?node_id,
|
||||||
gossip_getroute_request,,destination,struct node_id
|
msgdata,gossip_getroute_request,destination,node_id,
|
||||||
gossip_getroute_request,,msatoshi,struct amount_msat
|
msgdata,gossip_getroute_request,msatoshi,amount_msat,
|
||||||
# We don't pass doubles, so pass riskfactor * 1000000.
|
# We don't pass doubles, so pass riskfactor 1000000.
|
||||||
gossip_getroute_request,,riskfactor_by_million,u64
|
msgdata,gossip_getroute_request,riskfactor_by_million,u64,
|
||||||
gossip_getroute_request,,final_cltv,u32
|
msgdata,gossip_getroute_request,final_cltv,u32,
|
||||||
gossip_getroute_request,,fuzz,double
|
msgdata,gossip_getroute_request,fuzz,double,
|
||||||
gossip_getroute_request,,num_excluded,u16
|
msgdata,gossip_getroute_request,num_excluded,u16,
|
||||||
gossip_getroute_request,,excluded,num_excluded*struct short_channel_id_dir
|
msgdata,gossip_getroute_request,excluded,short_channel_id_dir,num_excluded
|
||||||
gossip_getroute_request,,max_hops,u32
|
msgdata,gossip_getroute_request,max_hops,u32,
|
||||||
|
|
||||||
gossip_getroute_reply,3106
|
msgtype,gossip_getroute_reply,3106
|
||||||
gossip_getroute_reply,,num_hops,u16
|
msgdata,gossip_getroute_reply,num_hops,u16,
|
||||||
gossip_getroute_reply,,hops,num_hops*struct route_hop
|
msgdata,gossip_getroute_reply,hops,route_hop,num_hops
|
||||||
|
|
||||||
gossip_getchannels_request,3007
|
msgtype,gossip_getchannels_request,3007
|
||||||
gossip_getchannels_request,,short_channel_id,?struct short_channel_id
|
msgdata,gossip_getchannels_request,short_channel_id,?short_channel_id,
|
||||||
gossip_getchannels_request,,source,?struct node_id
|
msgdata,gossip_getchannels_request,source,?node_id,
|
||||||
gossip_getchannels_request,,prev,?struct short_channel_id
|
msgdata,gossip_getchannels_request,prev,?short_channel_id,
|
||||||
|
|
||||||
gossip_getchannels_reply,3107
|
msgtype,gossip_getchannels_reply,3107
|
||||||
gossip_getchannels_reply,,complete,bool
|
msgdata,gossip_getchannels_reply,complete,bool,
|
||||||
gossip_getchannels_reply,,num_channels,u32
|
msgdata,gossip_getchannels_reply,num_channels,u32,
|
||||||
gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry
|
msgdata,gossip_getchannels_reply,nodes,gossip_getchannels_entry,num_channels
|
||||||
|
|
||||||
# Ping/pong test. Waits for a reply if it expects one.
|
# Ping/pong test. Waits for a reply if it expects one.
|
||||||
gossip_ping,3008
|
msgtype,gossip_ping,3008
|
||||||
gossip_ping,,id,struct node_id
|
msgdata,gossip_ping,id,node_id,
|
||||||
gossip_ping,,num_pong_bytes,u16
|
msgdata,gossip_ping,num_pong_bytes,u16,
|
||||||
gossip_ping,,len,u16
|
msgdata,gossip_ping,len,u16,
|
||||||
|
|
||||||
gossip_ping_reply,3108
|
msgtype,gossip_ping_reply,3108
|
||||||
gossip_ping_reply,,id,struct node_id
|
msgdata,gossip_ping_reply,id,node_id,
|
||||||
# False if id in gossip_ping was unknown.
|
# False if id in gossip_ping was unknown.
|
||||||
gossip_ping_reply,,sent,bool
|
msgdata,gossip_ping_reply,sent,bool,
|
||||||
# 0 == no pong expected
|
# 0 == no pong expected
|
||||||
gossip_ping_reply,,totlen,u16
|
msgdata,gossip_ping_reply,totlen,u16,
|
||||||
|
|
||||||
# Test of query_short_channel_ids. Master->gossipd
|
# Test of query_short_channel_ids. Master->gossipd
|
||||||
gossip_query_scids,3031
|
msgtype,gossip_query_scids,3031
|
||||||
gossip_query_scids,,id,struct node_id
|
msgdata,gossip_query_scids,id,node_id,
|
||||||
gossip_query_scids,,num_ids,u16
|
msgdata,gossip_query_scids,num_ids,u16,
|
||||||
gossip_query_scids,,ids,num_ids*struct short_channel_id
|
msgdata,gossip_query_scids,ids,short_channel_id,num_ids
|
||||||
|
|
||||||
# Gossipd -> master
|
# Gossipd -> master
|
||||||
gossip_scids_reply,3131
|
msgtype,gossip_scids_reply,3131
|
||||||
gossip_scids_reply,,ok,bool
|
msgdata,gossip_scids_reply,ok,bool,
|
||||||
gossip_scids_reply,,complete,bool
|
msgdata,gossip_scids_reply,complete,bool,
|
||||||
|
|
||||||
# Test gossip timestamp filtering.
|
# Test gossip timestamp filtering.
|
||||||
gossip_send_timestamp_filter,3028
|
msgtype,gossip_send_timestamp_filter,3028
|
||||||
gossip_send_timestamp_filter,,id,struct node_id
|
msgdata,gossip_send_timestamp_filter,id,node_id,
|
||||||
gossip_send_timestamp_filter,,first_timestamp,u32
|
msgdata,gossip_send_timestamp_filter,first_timestamp,u32,
|
||||||
gossip_send_timestamp_filter,,timestamp_range,u32
|
msgdata,gossip_send_timestamp_filter,timestamp_range,u32,
|
||||||
|
|
||||||
# Test of query_channel_range. Master->gossipd
|
# Test of query_channel_range. Master->gossipd
|
||||||
gossip_query_channel_range,3029
|
msgtype,gossip_query_channel_range,3029
|
||||||
gossip_query_channel_range,,id,struct node_id
|
msgdata,gossip_query_channel_range,id,node_id,
|
||||||
gossip_query_channel_range,,first_blocknum,u32
|
msgdata,gossip_query_channel_range,first_blocknum,u32,
|
||||||
gossip_query_channel_range,,number_of_blocks,u32
|
msgdata,gossip_query_channel_range,number_of_blocks,u32,
|
||||||
|
|
||||||
# Gossipd -> master
|
# Gossipd -> master
|
||||||
gossip_query_channel_range_reply,3129
|
msgtype,gossip_query_channel_range_reply,3129
|
||||||
gossip_query_channel_range_reply,,final_first_block,u32
|
msgdata,gossip_query_channel_range_reply,final_first_block,u32,
|
||||||
gossip_query_channel_range_reply,,final_num_blocks,u32
|
msgdata,gossip_query_channel_range_reply,final_num_blocks,u32,
|
||||||
gossip_query_channel_range_reply,,final_complete,bool
|
msgdata,gossip_query_channel_range_reply,final_complete,bool,
|
||||||
gossip_query_channel_range_reply,,num,u16
|
msgdata,gossip_query_channel_range_reply,num,u16,
|
||||||
gossip_query_channel_range_reply,,scids,num*struct short_channel_id
|
msgdata,gossip_query_channel_range_reply,scids,short_channel_id,num
|
||||||
|
|
||||||
# Set artificial maximum reply_channel_range size. Master->gossipd
|
# Set artificial maximum reply_channel_range size. Master->gossipd
|
||||||
gossip_dev_set_max_scids_encode_size,3030
|
msgtype,gossip_dev_set_max_scids_encode_size,3030
|
||||||
gossip_dev_set_max_scids_encode_size,,max,u32
|
msgdata,gossip_dev_set_max_scids_encode_size,max,u32,
|
||||||
|
|
||||||
# Given a short_channel_id, return the other endpoint (or none if DNE)
|
# Given a short_channel_id, return the other endpoint (or none if DNE)
|
||||||
gossip_get_channel_peer,3009
|
msgtype,gossip_get_channel_peer,3009
|
||||||
gossip_get_channel_peer,,channel_id,struct short_channel_id
|
msgdata,gossip_get_channel_peer,channel_id,short_channel_id,
|
||||||
|
|
||||||
gossip_get_channel_peer_reply,3109
|
msgtype,gossip_get_channel_peer_reply,3109
|
||||||
gossip_get_channel_peer_reply,,peer_id,?struct node_id
|
msgdata,gossip_get_channel_peer_reply,peer_id,?node_id,
|
||||||
|
|
||||||
# gossipd->master: we're closing this channel.
|
# gossipd->master: we're closing this channel.
|
||||||
gossip_local_channel_close,3027
|
msgtype,gossip_local_channel_close,3027
|
||||||
gossip_local_channel_close,,short_channel_id,struct short_channel_id
|
msgdata,gossip_local_channel_close,short_channel_id,short_channel_id,
|
||||||
|
|
||||||
# Gossipd->master get this tx output please.
|
# Gossipd->master get this tx output please.
|
||||||
gossip_get_txout,3018
|
msgtype,gossip_get_txout,3018
|
||||||
gossip_get_txout,,short_channel_id,struct short_channel_id
|
msgdata,gossip_get_txout,short_channel_id,short_channel_id,
|
||||||
|
|
||||||
# master->gossipd here is the output, or empty if none.
|
# master->gossipd here is the output, or empty if none.
|
||||||
gossip_get_txout_reply,3118
|
msgtype,gossip_get_txout_reply,3118
|
||||||
gossip_get_txout_reply,,short_channel_id,struct short_channel_id
|
msgdata,gossip_get_txout_reply,short_channel_id,short_channel_id,
|
||||||
gossip_get_txout_reply,,satoshis,struct amount_sat
|
msgdata,gossip_get_txout_reply,satoshis,amount_sat,
|
||||||
gossip_get_txout_reply,,len,u16
|
msgdata,gossip_get_txout_reply,len,u16,
|
||||||
gossip_get_txout_reply,,outscript,len*u8
|
msgdata,gossip_get_txout_reply,outscript,u8,len
|
||||||
|
|
||||||
# master->gossipd an htlc failed with this onion error.
|
# master->gossipd an htlc failed with this onion error.
|
||||||
gossip_payment_failure,3021
|
msgtype,gossip_payment_failure,3021
|
||||||
gossip_payment_failure,,erring_node,struct node_id
|
msgdata,gossip_payment_failure,erring_node,node_id,
|
||||||
gossip_payment_failure,,erring_channel,struct short_channel_id
|
msgdata,gossip_payment_failure,erring_channel,short_channel_id,
|
||||||
gossip_payment_failure,,erring_channel_direction,u8
|
msgdata,gossip_payment_failure,erring_channel_direction,u8,
|
||||||
gossip_payment_failure,,len,u16
|
msgdata,gossip_payment_failure,len,u16,
|
||||||
gossip_payment_failure,,error,len*u8
|
msgdata,gossip_payment_failure,error,u8,len
|
||||||
|
|
||||||
# master -> gossipd: a potential funding outpoint was spent, please forget the eventual channel
|
# master -> gossipd: a potential funding outpoint was spent, please forget the eventual channel
|
||||||
gossip_outpoint_spent,3024
|
msgtype,gossip_outpoint_spent,3024
|
||||||
gossip_outpoint_spent,,short_channel_id,struct short_channel_id
|
msgdata,gossip_outpoint_spent,short_channel_id,short_channel_id,
|
||||||
|
|
||||||
# master -> gossipd: stop gossip timers.
|
# master -> gossipd: stop gossip timers.
|
||||||
gossip_dev_suppress,3032
|
msgtype,gossip_dev_suppress,3032
|
||||||
|
|
||||||
# master -> gossipd: do you have a memleak?
|
# master -> gossipd: do you have a memleak?
|
||||||
gossip_dev_memleak,3033
|
msgtype,gossip_dev_memleak,3033
|
||||||
|
|
||||||
gossip_dev_memleak_reply,3133
|
msgtype,gossip_dev_memleak_reply,3133
|
||||||
gossip_dev_memleak_reply,,leak,bool
|
msgdata,gossip_dev_memleak_reply,leak,bool,
|
||||||
|
|
||||||
# master -> gossipd: please rewrite the gossip_store
|
# master -> gossipd: please rewrite the gossip_store
|
||||||
gossip_dev_compact_store,3034
|
msgtype,gossip_dev_compact_store,3034
|
||||||
|
|
||||||
# gossipd -> master: ok
|
# gossipd -> master: ok
|
||||||
gossip_dev_compact_store_reply,3134
|
msgtype,gossip_dev_compact_store_reply,3134
|
||||||
gossip_dev_compact_store_reply,,success,bool
|
msgdata,gossip_dev_compact_store_reply,success,bool,
|
||||||
|
|
||||||
#include <common/bolt11.h>
|
#include <common/bolt11.h>
|
||||||
|
|
||||||
# master -> gossipd: get route_info for our incoming channels
|
# master -> gossipd: get route_info for our incoming channels
|
||||||
gossip_get_incoming_channels,3025
|
msgtype,gossip_get_incoming_channels,3025
|
||||||
gossip_get_incoming_channels,,private_too,?bool
|
msgdata,gossip_get_incoming_channels,private_too,?bool,
|
||||||
|
|
||||||
# gossipd -> master: here they are.
|
# gossipd -> master: here they are.
|
||||||
gossip_get_incoming_channels_reply,3125
|
msgtype,gossip_get_incoming_channels_reply,3125
|
||||||
gossip_get_incoming_channels_reply,,num,u16
|
msgdata,gossip_get_incoming_channels_reply,num,u16,
|
||||||
gossip_get_incoming_channels_reply,,route_info,num*struct route_info
|
msgdata,gossip_get_incoming_channels_reply,route_info,route_info,num
|
||||||
|
|||||||
|
Can't render this file because it has a wrong number of fields in line 6.
|
@@ -51,10 +51,10 @@ hsmd-all: lightningd/lightning_hsmd
|
|||||||
lightningd/lightning_hsmd: $(LIGHTNINGD_HSM_OBJS) $(LIGHTNINGD_LIB_OBJS) $(HSMD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS)
|
lightningd/lightning_hsmd: $(LIGHTNINGD_HSM_OBJS) $(LIGHTNINGD_LIB_OBJS) $(HSMD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS)
|
||||||
|
|
||||||
hsmd/gen_hsm_wire.h: $(WIRE_GEN) hsmd/hsm_wire.csv
|
hsmd/gen_hsm_wire.h: $(WIRE_GEN) hsmd/hsm_wire.csv
|
||||||
$(WIRE_GEN) --header $@ hsm_wire_type < hsmd/hsm_wire.csv > $@
|
$(WIRE_GEN) --page header $@ hsm_wire_type < hsmd/hsm_wire.csv > $@
|
||||||
|
|
||||||
hsmd/gen_hsm_wire.c: $(WIRE_GEN) hsmd/hsm_wire.csv
|
hsmd/gen_hsm_wire.c: $(WIRE_GEN) hsmd/hsm_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} hsm_wire_type < hsmd/hsm_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} hsm_wire_type < hsmd/hsm_wire.csv > $@
|
||||||
|
|
||||||
check-source: $(LIGHTNINGD_HSM_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_HSM_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
|
check-source: $(LIGHTNINGD_HSM_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_HSM_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
|
||||||
check-source-bolt: $(LIGHTNINGD_HSM_SRC:%=bolt-check/%)
|
check-source-bolt: $(LIGHTNINGD_HSM_SRC:%=bolt-check/%)
|
||||||
|
|||||||
@@ -1,197 +1,198 @@
|
|||||||
# Clients should not give a bad request but not the HSM's decision to crash.
|
# Clients should not give a bad request but not the HSM's decision to crash.
|
||||||
hsmstatus_client_bad_request,1000
|
msgtype,hsmstatus_client_bad_request,1000
|
||||||
hsmstatus_client_bad_request,,id,struct node_id
|
msgdata,hsmstatus_client_bad_request,id,node_id,
|
||||||
hsmstatus_client_bad_request,,description,wirestring
|
msgdata,hsmstatus_client_bad_request,description,wirestring,
|
||||||
hsmstatus_client_bad_request,,len,u16
|
msgdata,hsmstatus_client_bad_request,len,u16,
|
||||||
hsmstatus_client_bad_request,,msg,len*u8
|
msgdata,hsmstatus_client_bad_request,msg,u8,len
|
||||||
|
|
||||||
#include <bitcoin/chainparams.h>
|
#include <bitcoin/chainparams.h>
|
||||||
# Start the HSM.
|
# Start the HSM.
|
||||||
hsm_init,11
|
msgtype,hsm_init,11
|
||||||
hsm_init,,bip32_key_version,struct bip32_key_version
|
msgdata,hsm_init,bip32_key_version,bip32_key_version,
|
||||||
hsm_init,,dev_force_privkey,?struct privkey
|
msgdata,hsm_init,dev_force_privkey,?privkey,
|
||||||
hsm_init,,dev_force_bip32_seed,?struct secret
|
msgdata,hsm_init,dev_force_bip32_seed,?secret,
|
||||||
hsm_init,,dev_force_channel_secrets,?struct secrets
|
msgdata,hsm_init,dev_force_channel_secrets,?secrets,
|
||||||
hsm_init,,dev_force_channel_secrets_shaseed,?struct sha256
|
msgdata,hsm_init,dev_force_channel_secrets_shaseed,?sha256,
|
||||||
|
|
||||||
#include <common/bip32.h>
|
#include <common/bip32.h>
|
||||||
hsm_init_reply,111
|
msgtype,hsm_init_reply,111
|
||||||
hsm_init_reply,,node_id,struct node_id
|
msgdata,hsm_init_reply,node_id,node_id,
|
||||||
hsm_init_reply,,bip32,struct ext_key
|
msgdata,hsm_init_reply,bip32,ext_key,
|
||||||
|
|
||||||
# Get a new HSM FD, with the specified capabilities
|
# Get a new HSM FD, with the specified capabilities
|
||||||
hsm_client_hsmfd,9
|
msgtype,hsm_client_hsmfd,9
|
||||||
hsm_client_hsmfd,,id,struct node_id # Which identity to use for requests
|
# Which identity to use for requests
|
||||||
|
msgdata,hsm_client_hsmfd,id,node_id,
|
||||||
# Database id for this client, if any.
|
# Database id for this client, if any.
|
||||||
hsm_client_hsmfd,,dbid,u64
|
msgdata,hsm_client_hsmfd,dbid,u64,
|
||||||
hsm_client_hsmfd,,capabilities,u64
|
msgdata,hsm_client_hsmfd,capabilities,u64,
|
||||||
|
|
||||||
# No content, just an fd.
|
# No content, just an fd.
|
||||||
hsm_client_hsmfd_reply,109
|
msgtype,hsm_client_hsmfd_reply,109
|
||||||
|
|
||||||
#include <common/derive_basepoints.h>
|
#include <common/derive_basepoints.h>
|
||||||
# Get the basepoints and funding key for this specific channel.
|
# Get the basepoints and funding key for this specific channel.
|
||||||
hsm_get_channel_basepoints,10
|
msgtype,hsm_get_channel_basepoints,10
|
||||||
hsm_get_channel_basepoints,,peerid,struct node_id
|
msgdata,hsm_get_channel_basepoints,peerid,node_id,
|
||||||
hsm_get_channel_basepoints,,dbid,u64
|
msgdata,hsm_get_channel_basepoints,dbid,u64,
|
||||||
|
|
||||||
hsm_get_channel_basepoints_reply,110
|
msgtype,hsm_get_channel_basepoints_reply,110
|
||||||
hsm_get_channel_basepoints_reply,,basepoints,struct basepoints
|
msgdata,hsm_get_channel_basepoints_reply,basepoints,basepoints,
|
||||||
hsm_get_channel_basepoints_reply,,funding_pubkey,struct pubkey
|
msgdata,hsm_get_channel_basepoints_reply,funding_pubkey,pubkey,
|
||||||
|
|
||||||
# Return signature for a funding tx.
|
# Return signature for a funding tx.
|
||||||
#include <common/utxo.h>
|
#include <common/utxo.h>
|
||||||
# FIXME: This should also take their commit sig & details, to verify.
|
# FIXME: This should also take their commit sig & details, to verify.
|
||||||
hsm_sign_funding,4
|
msgtype,hsm_sign_funding,4
|
||||||
hsm_sign_funding,,satoshi_out,struct amount_sat
|
msgdata,hsm_sign_funding,satoshi_out,amount_sat,
|
||||||
hsm_sign_funding,,change_out,struct amount_sat
|
msgdata,hsm_sign_funding,change_out,amount_sat,
|
||||||
hsm_sign_funding,,change_keyindex,u32
|
msgdata,hsm_sign_funding,change_keyindex,u32,
|
||||||
hsm_sign_funding,,our_pubkey,struct pubkey
|
msgdata,hsm_sign_funding,our_pubkey,pubkey,
|
||||||
hsm_sign_funding,,their_pubkey,struct pubkey
|
msgdata,hsm_sign_funding,their_pubkey,pubkey,
|
||||||
hsm_sign_funding,,num_inputs,u16
|
msgdata,hsm_sign_funding,num_inputs,u16,
|
||||||
hsm_sign_funding,,inputs,num_inputs*struct utxo
|
msgdata,hsm_sign_funding,inputs,utxo,num_inputs
|
||||||
|
|
||||||
hsm_sign_funding_reply,104
|
msgtype,hsm_sign_funding_reply,104
|
||||||
hsm_sign_funding_reply,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_funding_reply,tx,bitcoin_tx,
|
||||||
|
|
||||||
# Master asks the HSM to sign a node_announcement
|
# Master asks the HSM to sign a node_announcement
|
||||||
hsm_node_announcement_sig_req,6
|
msgtype,hsm_node_announcement_sig_req,6
|
||||||
hsm_node_announcement_sig_req,,annlen,u16
|
msgdata,hsm_node_announcement_sig_req,annlen,u16,
|
||||||
hsm_node_announcement_sig_req,,announcement,annlen*u8
|
msgdata,hsm_node_announcement_sig_req,announcement,u8,annlen
|
||||||
|
|
||||||
hsm_node_announcement_sig_reply,106
|
msgtype,hsm_node_announcement_sig_reply,106
|
||||||
hsm_node_announcement_sig_reply,,signature,secp256k1_ecdsa_signature
|
msgdata,hsm_node_announcement_sig_reply,signature,secp256k1_ecdsa_signature,
|
||||||
|
|
||||||
# Sign a withdrawal request
|
# Sign a withdrawal request
|
||||||
hsm_sign_withdrawal,7
|
msgtype,hsm_sign_withdrawal,7
|
||||||
hsm_sign_withdrawal,,satoshi_out,struct amount_sat
|
msgdata,hsm_sign_withdrawal,satoshi_out,amount_sat,
|
||||||
hsm_sign_withdrawal,,change_out,struct amount_sat
|
msgdata,hsm_sign_withdrawal,change_out,amount_sat,
|
||||||
hsm_sign_withdrawal,,change_keyindex,u32
|
msgdata,hsm_sign_withdrawal,change_keyindex,u32,
|
||||||
hsm_sign_withdrawal,,scriptpubkey_len,u16
|
msgdata,hsm_sign_withdrawal,scriptpubkey_len,u16,
|
||||||
hsm_sign_withdrawal,,scriptpubkey,scriptpubkey_len*u8
|
msgdata,hsm_sign_withdrawal,scriptpubkey,u8,scriptpubkey_len
|
||||||
hsm_sign_withdrawal,,num_inputs,u16
|
msgdata,hsm_sign_withdrawal,num_inputs,u16,
|
||||||
hsm_sign_withdrawal,,inputs,num_inputs*struct utxo
|
msgdata,hsm_sign_withdrawal,inputs,utxo,num_inputs
|
||||||
|
|
||||||
hsm_sign_withdrawal_reply,107
|
msgtype,hsm_sign_withdrawal_reply,107
|
||||||
hsm_sign_withdrawal_reply,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_withdrawal_reply,tx,bitcoin_tx,
|
||||||
|
|
||||||
# Sign an invoice
|
# Sign an invoice
|
||||||
hsm_sign_invoice,8
|
msgtype,hsm_sign_invoice,8
|
||||||
hsm_sign_invoice,,len,u16
|
msgdata,hsm_sign_invoice,len,u16,
|
||||||
hsm_sign_invoice,,u5bytes,len*u8
|
msgdata,hsm_sign_invoice,u5bytes,u8,len
|
||||||
hsm_sign_invoice,,hrplen,u16
|
msgdata,hsm_sign_invoice,hrplen,u16,
|
||||||
hsm_sign_invoice,,hrp,hrplen*u8
|
msgdata,hsm_sign_invoice,hrp,u8,hrplen
|
||||||
|
|
||||||
hsm_sign_invoice_reply,108
|
msgtype,hsm_sign_invoice_reply,108
|
||||||
hsm_sign_invoice_reply,,sig,secp256k1_ecdsa_recoverable_signature
|
msgdata,hsm_sign_invoice_reply,sig,secp256k1_ecdsa_recoverable_signature,
|
||||||
|
|
||||||
# Give me ECDH(node-id-secret,point)
|
# Give me ECDH(node-id-secret,point)
|
||||||
hsm_ecdh_req,1
|
msgtype,hsm_ecdh_req,1
|
||||||
hsm_ecdh_req,,point,struct pubkey
|
msgdata,hsm_ecdh_req,point,pubkey,
|
||||||
hsm_ecdh_resp,100
|
msgtype,hsm_ecdh_resp,100
|
||||||
hsm_ecdh_resp,,ss,struct secret
|
msgdata,hsm_ecdh_resp,ss,secret,
|
||||||
|
|
||||||
hsm_cannouncement_sig_req,2
|
msgtype,hsm_cannouncement_sig_req,2
|
||||||
hsm_cannouncement_sig_req,,calen,u16
|
msgdata,hsm_cannouncement_sig_req,calen,u16,
|
||||||
hsm_cannouncement_sig_req,,ca,calen*u8
|
msgdata,hsm_cannouncement_sig_req,ca,u8,calen
|
||||||
|
|
||||||
hsm_cannouncement_sig_reply,102
|
msgtype,hsm_cannouncement_sig_reply,102
|
||||||
hsm_cannouncement_sig_reply,,node_signature,secp256k1_ecdsa_signature
|
msgdata,hsm_cannouncement_sig_reply,node_signature,secp256k1_ecdsa_signature,
|
||||||
hsm_cannouncement_sig_reply,,bitcoin_signature,secp256k1_ecdsa_signature
|
msgdata,hsm_cannouncement_sig_reply,bitcoin_signature,secp256k1_ecdsa_signature,
|
||||||
|
|
||||||
hsm_cupdate_sig_req,3
|
msgtype,hsm_cupdate_sig_req,3
|
||||||
hsm_cupdate_sig_req,,culen,u16
|
msgdata,hsm_cupdate_sig_req,culen,u16,
|
||||||
hsm_cupdate_sig_req,,cu,culen*u8
|
msgdata,hsm_cupdate_sig_req,cu,u8,culen
|
||||||
|
|
||||||
hsm_cupdate_sig_reply,103
|
msgtype,hsm_cupdate_sig_reply,103
|
||||||
hsm_cupdate_sig_reply,,culen,u16
|
msgdata,hsm_cupdate_sig_reply,culen,u16,
|
||||||
hsm_cupdate_sig_reply,,cu,culen*u8
|
msgdata,hsm_cupdate_sig_reply,cu,u8,culen
|
||||||
|
|
||||||
# Master asks HSM to sign a commitment transaction.
|
# Master asks HSM to sign a commitment transaction.
|
||||||
hsm_sign_commitment_tx,5
|
msgtype,hsm_sign_commitment_tx,5
|
||||||
hsm_sign_commitment_tx,,peer_id,struct node_id
|
msgdata,hsm_sign_commitment_tx,peer_id,node_id,
|
||||||
hsm_sign_commitment_tx,,channel_dbid,u64
|
msgdata,hsm_sign_commitment_tx,channel_dbid,u64,
|
||||||
hsm_sign_commitment_tx,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_commitment_tx,tx,bitcoin_tx,
|
||||||
hsm_sign_commitment_tx,,remote_funding_key,struct pubkey
|
msgdata,hsm_sign_commitment_tx,remote_funding_key,pubkey,
|
||||||
hsm_sign_commitment_tx,,funding_amount,struct amount_sat
|
msgdata,hsm_sign_commitment_tx,funding_amount,amount_sat,
|
||||||
|
|
||||||
hsm_sign_commitment_tx_reply,105
|
msgtype,hsm_sign_commitment_tx_reply,105
|
||||||
hsm_sign_commitment_tx_reply,,sig,struct bitcoin_signature
|
msgdata,hsm_sign_commitment_tx_reply,sig,bitcoin_signature,
|
||||||
|
|
||||||
# Onchaind asks HSM to sign a spend to-us. Four variants, since each set
|
# Onchaind asks HSM to sign a spend to-us. Four variants, since each set
|
||||||
# of keys is derived differently...
|
# of keys is derived differently...
|
||||||
# FIXME: Have master tell hsmd the keyindex, so it can validate output!
|
# FIXME: Have master tell hsmd the keyindex, so it can validate output!
|
||||||
hsm_sign_delayed_payment_to_us,12
|
msgtype,hsm_sign_delayed_payment_to_us,12
|
||||||
hsm_sign_delayed_payment_to_us,,commit_num,u64
|
msgdata,hsm_sign_delayed_payment_to_us,commit_num,u64,
|
||||||
hsm_sign_delayed_payment_to_us,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_delayed_payment_to_us,tx,bitcoin_tx,
|
||||||
hsm_sign_delayed_payment_to_us,,wscript_len,u16
|
msgdata,hsm_sign_delayed_payment_to_us,wscript_len,u16,
|
||||||
hsm_sign_delayed_payment_to_us,,wscript,wscript_len*u8
|
msgdata,hsm_sign_delayed_payment_to_us,wscript,u8,wscript_len
|
||||||
hsm_sign_delayed_payment_to_us,,input_amount,struct amount_sat
|
msgdata,hsm_sign_delayed_payment_to_us,input_amount,amount_sat,
|
||||||
|
|
||||||
hsm_sign_remote_htlc_to_us,13
|
msgtype,hsm_sign_remote_htlc_to_us,13
|
||||||
hsm_sign_remote_htlc_to_us,,remote_per_commitment_point,struct pubkey
|
msgdata,hsm_sign_remote_htlc_to_us,remote_per_commitment_point,pubkey,
|
||||||
hsm_sign_remote_htlc_to_us,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_remote_htlc_to_us,tx,bitcoin_tx,
|
||||||
hsm_sign_remote_htlc_to_us,,wscript_len,u16
|
msgdata,hsm_sign_remote_htlc_to_us,wscript_len,u16,
|
||||||
hsm_sign_remote_htlc_to_us,,wscript,wscript_len*u8
|
msgdata,hsm_sign_remote_htlc_to_us,wscript,u8,wscript_len
|
||||||
hsm_sign_remote_htlc_to_us,,input_amount,struct amount_sat
|
msgdata,hsm_sign_remote_htlc_to_us,input_amount,amount_sat,
|
||||||
|
|
||||||
hsm_sign_penalty_to_us,14
|
msgtype,hsm_sign_penalty_to_us,14
|
||||||
hsm_sign_penalty_to_us,,revocation_secret,struct secret
|
msgdata,hsm_sign_penalty_to_us,revocation_secret,secret,
|
||||||
hsm_sign_penalty_to_us,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_penalty_to_us,tx,bitcoin_tx,
|
||||||
hsm_sign_penalty_to_us,,wscript_len,u16
|
msgdata,hsm_sign_penalty_to_us,wscript_len,u16,
|
||||||
hsm_sign_penalty_to_us,,wscript,wscript_len*u8
|
msgdata,hsm_sign_penalty_to_us,wscript,u8,wscript_len
|
||||||
hsm_sign_penalty_to_us,,input_amount,struct amount_sat
|
msgdata,hsm_sign_penalty_to_us,input_amount,amount_sat,
|
||||||
|
|
||||||
# Onchaind asks HSM to sign a local HTLC success or HTLC timeout tx.
|
# Onchaind asks HSM to sign a local HTLC success or HTLC timeout tx.
|
||||||
hsm_sign_local_htlc_tx,16
|
msgtype,hsm_sign_local_htlc_tx,16
|
||||||
hsm_sign_local_htlc_tx,,commit_num,u64
|
msgdata,hsm_sign_local_htlc_tx,commit_num,u64,
|
||||||
hsm_sign_local_htlc_tx,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_local_htlc_tx,tx,bitcoin_tx,
|
||||||
hsm_sign_local_htlc_tx,,wscript_len,u16
|
msgdata,hsm_sign_local_htlc_tx,wscript_len,u16,
|
||||||
hsm_sign_local_htlc_tx,,wscript,wscript_len*u8
|
msgdata,hsm_sign_local_htlc_tx,wscript,u8,wscript_len
|
||||||
hsm_sign_local_htlc_tx,,input_amount,struct amount_sat
|
msgdata,hsm_sign_local_htlc_tx,input_amount,amount_sat,
|
||||||
|
|
||||||
# Openingd/channeld asks HSM to sign the other sides' commitment tx.
|
# Openingd/channeld asks HSM to sign the other sides' commitment tx.
|
||||||
hsm_sign_remote_commitment_tx,19
|
msgtype,hsm_sign_remote_commitment_tx,19
|
||||||
hsm_sign_remote_commitment_tx,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_remote_commitment_tx,tx,bitcoin_tx,
|
||||||
hsm_sign_remote_commitment_tx,,remote_funding_key,struct pubkey
|
msgdata,hsm_sign_remote_commitment_tx,remote_funding_key,pubkey,
|
||||||
hsm_sign_remote_commitment_tx,,funding_amount,struct amount_sat
|
msgdata,hsm_sign_remote_commitment_tx,funding_amount,amount_sat,
|
||||||
|
|
||||||
# channeld asks HSM to sign remote HTLC tx.
|
# channeld asks HSM to sign remote HTLC tx.
|
||||||
hsm_sign_remote_htlc_tx,20
|
msgtype,hsm_sign_remote_htlc_tx,20
|
||||||
hsm_sign_remote_htlc_tx,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_remote_htlc_tx,tx,bitcoin_tx,
|
||||||
hsm_sign_remote_htlc_tx,,len,u16
|
msgdata,hsm_sign_remote_htlc_tx,len,u16,
|
||||||
hsm_sign_remote_htlc_tx,,wscript,len*u8
|
msgdata,hsm_sign_remote_htlc_tx,wscript,u8,len
|
||||||
hsm_sign_remote_htlc_tx,,amounts_satoshi,struct amount_sat
|
msgdata,hsm_sign_remote_htlc_tx,amounts_satoshi,amount_sat,
|
||||||
hsm_sign_remote_htlc_tx,,remote_per_commit_point,struct pubkey
|
msgdata,hsm_sign_remote_htlc_tx,remote_per_commit_point,pubkey,
|
||||||
|
|
||||||
# closingd asks HSM to sign mutual close tx.
|
# closingd asks HSM to sign mutual close tx.
|
||||||
hsm_sign_mutual_close_tx,21
|
msgtype,hsm_sign_mutual_close_tx,21
|
||||||
hsm_sign_mutual_close_tx,,tx,struct bitcoin_tx
|
msgdata,hsm_sign_mutual_close_tx,tx,bitcoin_tx,
|
||||||
hsm_sign_mutual_close_tx,,remote_funding_key,struct pubkey
|
msgdata,hsm_sign_mutual_close_tx,remote_funding_key,pubkey,
|
||||||
hsm_sign_mutual_close_tx,,funding,struct amount_sat
|
msgdata,hsm_sign_mutual_close_tx,funding,amount_sat,
|
||||||
|
|
||||||
# Reply for all the above requests.
|
# Reply for all the above requests.
|
||||||
hsm_sign_tx_reply,112
|
msgtype,hsm_sign_tx_reply,112
|
||||||
hsm_sign_tx_reply,,sig,struct bitcoin_signature
|
msgdata,hsm_sign_tx_reply,sig,bitcoin_signature,
|
||||||
|
|
||||||
# Openingd/channeld/onchaind asks for Nth per_commitment_point, if > 2, gets N-2 secret.
|
# Openingd/channeld/onchaind asks for Nth per_commitment_point, if > 2, gets N-2 secret.
|
||||||
hsm_get_per_commitment_point,18
|
msgtype,hsm_get_per_commitment_point,18
|
||||||
hsm_get_per_commitment_point,,n,u64
|
msgdata,hsm_get_per_commitment_point,n,u64,
|
||||||
|
|
||||||
hsm_get_per_commitment_point_reply,118
|
msgtype,hsm_get_per_commitment_point_reply,118
|
||||||
hsm_get_per_commitment_point_reply,,per_commitment_point,struct pubkey
|
msgdata,hsm_get_per_commitment_point_reply,per_commitment_point,pubkey,
|
||||||
hsm_get_per_commitment_point_reply,,old_commitment_secret,?struct secret
|
msgdata,hsm_get_per_commitment_point_reply,old_commitment_secret,?secret,
|
||||||
|
|
||||||
# master -> hsmd: do you have a memleak?
|
# master -> hsmd: do you have a memleak?
|
||||||
hsm_dev_memleak,33
|
msgtype,hsm_dev_memleak,33
|
||||||
|
|
||||||
hsm_dev_memleak_reply,133
|
msgtype,hsm_dev_memleak_reply,133
|
||||||
hsm_dev_memleak_reply,,leak,bool
|
msgdata,hsm_dev_memleak_reply,leak,bool,
|
||||||
|
|
||||||
# channeld asks to check if claimed future commitment_secret is correct.
|
# channeld asks to check if claimed future commitment_secret is correct.
|
||||||
hsm_check_future_secret,22
|
msgtype,hsm_check_future_secret,22
|
||||||
hsm_check_future_secret,,n,u64
|
msgdata,hsm_check_future_secret,n,u64,
|
||||||
hsm_check_future_secret,,commitment_secret,struct secret
|
msgdata,hsm_check_future_secret,commitment_secret,secret,
|
||||||
|
|
||||||
hsm_check_future_secret_reply,122
|
msgtype,hsm_check_future_secret_reply,122
|
||||||
hsm_check_future_secret_reply,,correct,bool
|
msgdata,hsm_check_future_secret_reply,correct,bool,
|
||||||
|
|||||||
|
@@ -441,7 +441,7 @@ u8 *towire_errorfmt(const tal_t *ctx UNNEEDED,
|
|||||||
const char *fmt UNNEEDED, ...)
|
const char *fmt UNNEEDED, ...)
|
||||||
{ fprintf(stderr, "towire_errorfmt called!\n"); abort(); }
|
{ fprintf(stderr, "towire_errorfmt called!\n"); abort(); }
|
||||||
/* Generated stub for towire_gossip_get_incoming_channels */
|
/* Generated stub for towire_gossip_get_incoming_channels */
|
||||||
u8 *towire_gossip_get_incoming_channels(const tal_t *ctx UNNEEDED, const bool *private_too UNNEEDED)
|
u8 *towire_gossip_get_incoming_channels(const tal_t *ctx UNNEEDED, bool *private_too UNNEEDED)
|
||||||
{ fprintf(stderr, "towire_gossip_get_incoming_channels called!\n"); abort(); }
|
{ fprintf(stderr, "towire_gossip_get_incoming_channels called!\n"); abort(); }
|
||||||
/* Generated stub for towire_hsm_get_channel_basepoints */
|
/* Generated stub for towire_hsm_get_channel_basepoints */
|
||||||
u8 *towire_hsm_get_channel_basepoints(const tal_t *ctx UNNEEDED, const struct node_id *peerid UNNEEDED, u64 dbid UNNEEDED)
|
u8 *towire_hsm_get_channel_basepoints(const tal_t *ctx UNNEEDED, const struct node_id *peerid UNNEEDED, u64 dbid UNNEEDED)
|
||||||
|
|||||||
@@ -74,10 +74,10 @@ ONCHAIND_COMMON_OBJS := \
|
|||||||
hsmd/gen_hsm_wire.o
|
hsmd/gen_hsm_wire.o
|
||||||
|
|
||||||
onchaind/gen_onchain_wire.h: $(WIRE_GEN) onchaind/onchain_wire.csv
|
onchaind/gen_onchain_wire.h: $(WIRE_GEN) onchaind/onchain_wire.csv
|
||||||
$(WIRE_GEN) --header $@ onchain_wire_type < onchaind/onchain_wire.csv > $@
|
$(WIRE_GEN) --page header $@ onchain_wire_type < onchaind/onchain_wire.csv > $@
|
||||||
|
|
||||||
onchaind/gen_onchain_wire.c: $(WIRE_GEN) onchaind/onchain_wire.csv
|
onchaind/gen_onchain_wire.c: $(WIRE_GEN) onchaind/onchain_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} onchain_wire_type < onchaind/onchain_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} onchain_wire_type < onchaind/onchain_wire.csv > $@
|
||||||
|
|
||||||
LIGHTNINGD_ONCHAIN_OBJS := $(LIGHTNINGD_ONCHAIN_SRC:.c=.o) $(LIGHTNINGD_ONCHAIN_GEN_SRC:.c=.o)
|
LIGHTNINGD_ONCHAIN_OBJS := $(LIGHTNINGD_ONCHAIN_SRC:.c=.o) $(LIGHTNINGD_ONCHAIN_GEN_SRC:.c=.o)
|
||||||
|
|
||||||
|
|||||||
@@ -3,107 +3,107 @@
|
|||||||
#include <common/wallet.h>
|
#include <common/wallet.h>
|
||||||
|
|
||||||
# Begin! Here's the onchain tx which spends funding tx, followed by all HTLCs.
|
# Begin! Here's the onchain tx which spends funding tx, followed by all HTLCs.
|
||||||
onchain_init,5001
|
msgtype,onchain_init,5001
|
||||||
onchain_init,,shachain,struct shachain
|
msgdata,onchain_init,shachain,shachain,
|
||||||
onchain_init,,funding_amount_satoshi,struct amount_sat
|
msgdata,onchain_init,funding_amount_satoshi,amount_sat,
|
||||||
# Remote per commit point for committed tx.
|
# Remote per commit point for committed tx.
|
||||||
onchain_init,,old_remote_per_commitment_point,struct pubkey
|
msgdata,onchain_init,old_remote_per_commitment_point,pubkey,
|
||||||
# Remote per commit point for current tx (needed if we haven't got revoke_and_ack yet).
|
# Remote per commit point for current tx (needed if we haven't got revoke_and_ack yet).
|
||||||
onchain_init,,remote_per_commitment_point,struct pubkey
|
msgdata,onchain_init,remote_per_commitment_point,pubkey,
|
||||||
onchain_init,,local_to_self_delay,u32
|
msgdata,onchain_init,local_to_self_delay,u32,
|
||||||
onchain_init,,remote_to_self_delay,u32
|
msgdata,onchain_init,remote_to_self_delay,u32,
|
||||||
onchain_init,,feerate_per_kw,u32
|
msgdata,onchain_init,feerate_per_kw,u32,
|
||||||
onchain_init,,local_dust_limit_satoshi,struct amount_sat
|
msgdata,onchain_init,local_dust_limit_satoshi,amount_sat,
|
||||||
# Gives an easy way to tell if it's our unilateral close or theirs...
|
# Gives an easy way to tell if it's our unilateral close or theirs...
|
||||||
onchain_init,,our_broadcast_txid,struct bitcoin_txid
|
msgdata,onchain_init,our_broadcast_txid,bitcoin_txid,
|
||||||
onchain_init,,local_scriptpubkey_len,u16
|
msgdata,onchain_init,local_scriptpubkey_len,u16,
|
||||||
onchain_init,,local_scriptpubkey,local_scriptpubkey_len*u8
|
msgdata,onchain_init,local_scriptpubkey,u8,local_scriptpubkey_len
|
||||||
onchain_init,,remote_scriptpubkey_len,u16
|
msgdata,onchain_init,remote_scriptpubkey_len,u16,
|
||||||
onchain_init,,remote_scriptpubkey,remote_scriptpubkey_len*u8
|
msgdata,onchain_init,remote_scriptpubkey,u8,remote_scriptpubkey_len
|
||||||
onchain_init,,ourwallet_pubkey,struct pubkey
|
msgdata,onchain_init,ourwallet_pubkey,pubkey,
|
||||||
# We need these two for commit number obscurer
|
# We need these two for commit number obscurer
|
||||||
onchain_init,,funder,enum side
|
msgdata,onchain_init,funder,e:side,
|
||||||
onchain_init,,local_basepoints,struct basepoints
|
msgdata,onchain_init,local_basepoints,basepoints,
|
||||||
onchain_init,,remote_basepoints,struct basepoints
|
msgdata,onchain_init,remote_basepoints,basepoints,
|
||||||
onchain_init,,tx,struct bitcoin_tx
|
msgdata,onchain_init,tx,bitcoin_tx,
|
||||||
onchain_init,,tx_blockheight,u32
|
msgdata,onchain_init,tx_blockheight,u32,
|
||||||
onchain_init,,reasonable_depth,u32
|
msgdata,onchain_init,reasonable_depth,u32,
|
||||||
onchain_init,,num_htlc_sigs,u16
|
msgdata,onchain_init,num_htlc_sigs,u16,
|
||||||
onchain_init,,htlc_signature,num_htlc_sigs*secp256k1_ecdsa_signature
|
msgdata,onchain_init,htlc_signature,secp256k1_ecdsa_signature,num_htlc_sigs
|
||||||
onchain_init,,num_htlcs,u64
|
msgdata,onchain_init,num_htlcs,u64,
|
||||||
onchain_init,,min_possible_feerate,u32
|
msgdata,onchain_init,min_possible_feerate,u32,
|
||||||
onchain_init,,max_possible_feerate,u32
|
msgdata,onchain_init,max_possible_feerate,u32,
|
||||||
onchain_init,,possible_remote_per_commit_point,?struct pubkey
|
msgdata,onchain_init,possible_remote_per_commit_point,?pubkey,
|
||||||
|
|
||||||
#include <onchaind/onchain_wire.h>
|
#include <onchaind/onchain_wire.h>
|
||||||
# This is all the HTLCs: one per message
|
# This is all the HTLCs: one per message
|
||||||
onchain_htlc,5002
|
msgtype,onchain_htlc,5002
|
||||||
onchain_htlc,,htlc,struct htlc_stub
|
msgdata,onchain_htlc,htlc,htlc_stub,
|
||||||
# If it's not in the commitment tx, tell us (immediately or htlc_missing_depth)
|
# If it's not in the commitment tx, tell us (immediately or htlc_missing_depth)
|
||||||
onchain_htlc,,tell_if_missing,bool
|
msgdata,onchain_htlc,tell_if_missing,bool,
|
||||||
onchain_htlc,,tell_immediately,bool
|
msgdata,onchain_htlc,tell_immediately,bool,
|
||||||
|
|
||||||
# This says we're ready; give us preimages.
|
# This says we're ready; give us preimages.
|
||||||
onchain_init_reply,5101
|
msgtype,onchain_init_reply,5101
|
||||||
|
|
||||||
# onchaind->master: Send out a tx.
|
# onchaind->master: Send out a tx.
|
||||||
onchain_broadcast_tx,5003
|
msgtype,onchain_broadcast_tx,5003
|
||||||
onchain_broadcast_tx,,tx,struct bitcoin_tx
|
msgdata,onchain_broadcast_tx,tx,bitcoin_tx,
|
||||||
onchain_broadcast_tx,,type,enum wallet_tx_type
|
msgdata,onchain_broadcast_tx,type,e:wallet_tx_type,
|
||||||
|
|
||||||
# master->onchaind: Notifier that an output has been spent by input_num of tx.
|
# master->onchaind: Notifier that an output has been spent by input_num of tx.
|
||||||
onchain_spent,5004
|
msgtype,onchain_spent,5004
|
||||||
onchain_spent,,tx,struct bitcoin_tx
|
msgdata,onchain_spent,tx,bitcoin_tx,
|
||||||
onchain_spent,,input_num,u32
|
msgdata,onchain_spent,input_num,u32,
|
||||||
onchain_spent,,blockheight,u32
|
msgdata,onchain_spent,blockheight,u32,
|
||||||
|
|
||||||
# master->onchaind: We will receive more than one of these, as depth changes.
|
# master->onchaind: We will receive more than one of these, as depth changes.
|
||||||
onchain_depth,5005
|
msgtype,onchain_depth,5005
|
||||||
onchain_depth,,txid,struct bitcoin_txid
|
msgdata,onchain_depth,txid,bitcoin_txid,
|
||||||
onchain_depth,,depth,u32
|
msgdata,onchain_depth,depth,u32,
|
||||||
|
|
||||||
# onchaind->master: We don't want to watch this tx, or its outputs
|
# onchaind->master: We don't want to watch this tx, or its outputs
|
||||||
onchain_unwatch_tx,5006
|
msgtype,onchain_unwatch_tx,5006
|
||||||
onchain_unwatch_tx,,txid,struct bitcoin_txid
|
msgdata,onchain_unwatch_tx,txid,bitcoin_txid,
|
||||||
|
|
||||||
# master->onchaind: We know HTLC preimage
|
# master->onchaind: We know HTLC preimage
|
||||||
onchain_known_preimage,5007
|
msgtype,onchain_known_preimage,5007
|
||||||
onchain_known_preimage,,preimage,struct preimage
|
msgdata,onchain_known_preimage,preimage,preimage,
|
||||||
|
|
||||||
# onchaind->master: We discovered HTLC preimage
|
# onchaind->master: We discovered HTLC preimage
|
||||||
onchain_extracted_preimage,5008
|
msgtype,onchain_extracted_preimage,5008
|
||||||
onchain_extracted_preimage,,preimage,struct preimage
|
msgdata,onchain_extracted_preimage,preimage,preimage,
|
||||||
|
|
||||||
# onchaind->master: this HTLC was missing from commit tx.
|
# onchaind->master: this HTLC was missing from commit tx.
|
||||||
onchain_missing_htlc_output,5009
|
msgtype,onchain_missing_htlc_output,5009
|
||||||
onchain_missing_htlc_output,,htlc,struct htlc_stub
|
msgdata,onchain_missing_htlc_output,htlc,htlc_stub,
|
||||||
|
|
||||||
# onchaind->master: this HTLC has timed out (after reasonable_depth)
|
# onchaind->master: this HTLC has timed out (after reasonable_depth)
|
||||||
onchain_htlc_timeout,5010
|
msgtype,onchain_htlc_timeout,5010
|
||||||
onchain_htlc_timeout,,htlc,struct htlc_stub
|
msgdata,onchain_htlc_timeout,htlc,htlc_stub,
|
||||||
|
|
||||||
# onchaind->master: this peer can be forgotten
|
# onchaind->master: this peer can be forgotten
|
||||||
onchain_all_irrevocably_resolved,5011
|
msgtype,onchain_all_irrevocably_resolved,5011
|
||||||
|
|
||||||
# onchaind->master: hey, I identified an UTXO you'll want to track
|
# onchaind->master: hey, I identified an UTXO you'll want to track
|
||||||
onchain_add_utxo,5012
|
msgtype,onchain_add_utxo,5012
|
||||||
onchain_add_utxo,,prev_out_tx,struct bitcoin_txid
|
msgdata,onchain_add_utxo,prev_out_tx,bitcoin_txid,
|
||||||
onchain_add_utxo,,prev_out_index,u32
|
msgdata,onchain_add_utxo,prev_out_index,u32,
|
||||||
onchain_add_utxo,,per_commit_point,struct pubkey
|
msgdata,onchain_add_utxo,per_commit_point,pubkey,
|
||||||
onchain_add_utxo,,value,struct amount_sat
|
msgdata,onchain_add_utxo,value,amount_sat,
|
||||||
onchain_add_utxo,,blockheight,u32
|
msgdata,onchain_add_utxo,blockheight,u32,
|
||||||
onchain_add_utxo,,len,u16
|
msgdata,onchain_add_utxo,len,u16,
|
||||||
onchain_add_utxo,,scriptpubkey,len*u8
|
msgdata,onchain_add_utxo,scriptpubkey,u8,len
|
||||||
|
|
||||||
# master -> onchaind: do you have a memleak?
|
# master -> onchaind: do you have a memleak?
|
||||||
onchain_dev_memleak,5033
|
msgtype,onchain_dev_memleak,5033
|
||||||
|
|
||||||
onchain_dev_memleak_reply,5133
|
msgtype,onchain_dev_memleak_reply,5133
|
||||||
onchain_dev_memleak_reply,,leak,bool
|
msgdata,onchain_dev_memleak_reply,leak,bool,
|
||||||
|
|
||||||
# Tell the main daemon what we've been watching, mainly used for transactions
|
# Tell the main daemon what we've been watching, mainly used for transactions
|
||||||
# that we tracked automatically but only onchaind knows how to classify their
|
# that we tracked automatically but only onchaind knows how to classify their
|
||||||
# transactions.
|
# transactions.
|
||||||
onchain_transaction_annotate,5034
|
msgtype,onchain_transaction_annotate,5034
|
||||||
onchain_transaction_annotate,,txid,struct bitcoin_txid
|
msgdata,onchain_transaction_annotate,txid,bitcoin_txid,
|
||||||
onchain_transaction_annotate,,type,enum wallet_tx_type
|
msgdata,onchain_transaction_annotate,type,e:wallet_tx_type,
|
||||||
|
|||||||
|
@@ -80,10 +80,10 @@ OPENINGD_COMMON_OBJS := \
|
|||||||
$(LIGHTNINGD_OPENING_OBJS): $(LIGHTNINGD_HEADERS)
|
$(LIGHTNINGD_OPENING_OBJS): $(LIGHTNINGD_HEADERS)
|
||||||
|
|
||||||
openingd/gen_opening_wire.h: $(WIRE_GEN) openingd/opening_wire.csv
|
openingd/gen_opening_wire.h: $(WIRE_GEN) openingd/opening_wire.csv
|
||||||
$(WIRE_GEN) --header $@ opening_wire_type < openingd/opening_wire.csv > $@
|
$(WIRE_GEN) --page header $@ opening_wire_type < openingd/opening_wire.csv > $@
|
||||||
|
|
||||||
openingd/gen_opening_wire.c: $(WIRE_GEN) openingd/opening_wire.csv
|
openingd/gen_opening_wire.c: $(WIRE_GEN) openingd/opening_wire.csv
|
||||||
$(WIRE_GEN) ${@:.c=.h} opening_wire_type < openingd/opening_wire.csv > $@
|
$(WIRE_GEN) --page impl ${@:.c=.h} opening_wire_type < openingd/opening_wire.csv > $@
|
||||||
|
|
||||||
LIGHTNINGD_OPENING_OBJS := $(LIGHTNINGD_OPENING_SRC:.c=.o) $(LIGHTNINGD_OPENING_GEN_SRC:.c=.o)
|
LIGHTNINGD_OPENING_OBJS := $(LIGHTNINGD_OPENING_SRC:.c=.o) $(LIGHTNINGD_OPENING_GEN_SRC:.c=.o)
|
||||||
|
|
||||||
|
|||||||
@@ -3,136 +3,136 @@
|
|||||||
#include <common/derive_basepoints.h>
|
#include <common/derive_basepoints.h>
|
||||||
#include <common/per_peer_state.h>
|
#include <common/per_peer_state.h>
|
||||||
|
|
||||||
opening_init,6000
|
msgtype,opening_init,6000
|
||||||
# Which network are we configured for?
|
# Which network are we configured for?
|
||||||
opening_init,,chain_hash,struct bitcoin_blkid
|
msgdata,opening_init,chain_hash,bitcoin_blkid,
|
||||||
# Base configuration we'll offer (channel reserve will vary with amount)
|
# Base configuration we'll offer (channel reserve will vary with amount)
|
||||||
opening_init,,our_config,struct channel_config
|
msgdata,opening_init,our_config,channel_config,
|
||||||
# Minimum/maximum configuration values we'll accept
|
# Minimum/maximum configuration values we'll accept
|
||||||
opening_init,,max_to_self_delay,u32
|
msgdata,opening_init,max_to_self_delay,u32,
|
||||||
opening_init,,min_effective_htlc_capacity_msat,struct amount_msat
|
msgdata,opening_init,min_effective_htlc_capacity_msat,amount_msat,
|
||||||
opening_init,,pps,struct per_peer_state
|
msgdata,opening_init,pps,per_peer_state,
|
||||||
opening_init,,our_basepoints,struct basepoints
|
msgdata,opening_init,our_basepoints,basepoints,
|
||||||
opening_init,,our_funding_pubkey,struct pubkey
|
msgdata,opening_init,our_funding_pubkey,pubkey,
|
||||||
# Constraints in case the other end tries to open a channel.
|
# Constraints in case the other end tries to open a channel.
|
||||||
opening_init,,minimum_depth,u32
|
msgdata,opening_init,minimum_depth,u32,
|
||||||
opening_init,,min_feerate,u32
|
msgdata,opening_init,min_feerate,u32,
|
||||||
opening_init,,max_feerate,u32
|
msgdata,opening_init,max_feerate,u32,
|
||||||
opening_init,,lfeatures_len,u16
|
msgdata,opening_init,lfeatures_len,u16,
|
||||||
opening_init,,lfeatures,lfeatures_len*u8
|
msgdata,opening_init,lfeatures,u8,lfeatures_len
|
||||||
# Optional msg to send.
|
# Optional msg to send.
|
||||||
opening_init,,len,u16
|
msgdata,opening_init,len,u16,
|
||||||
opening_init,,msg,len*u8
|
msgdata,opening_init,msg,u8,len
|
||||||
|
|
||||||
# Openingd->master: they offered channel, should we continue?
|
# Openingd->master: they offered channel, should we continue?
|
||||||
opening_got_offer,6005
|
msgtype,opening_got_offer,6005
|
||||||
opening_got_offer,,funding_satoshis,struct amount_sat
|
msgdata,opening_got_offer,funding_satoshis,amount_sat,
|
||||||
opening_got_offer,,push_msat,struct amount_msat
|
msgdata,opening_got_offer,push_msat,amount_msat,
|
||||||
opening_got_offer,,dust_limit_satoshis,struct amount_sat
|
msgdata,opening_got_offer,dust_limit_satoshis,amount_sat,
|
||||||
opening_got_offer,,max_htlc_value_in_flight_msat,struct amount_msat
|
msgdata,opening_got_offer,max_htlc_value_in_flight_msat,amount_msat,
|
||||||
opening_got_offer,,channel_reserve_satoshis,struct amount_sat
|
msgdata,opening_got_offer,channel_reserve_satoshis,amount_sat,
|
||||||
opening_got_offer,,htlc_minimum_msat,struct amount_msat
|
msgdata,opening_got_offer,htlc_minimum_msat,amount_msat,
|
||||||
opening_got_offer,,feerate_per_kw,u32
|
msgdata,opening_got_offer,feerate_per_kw,u32,
|
||||||
opening_got_offer,,to_self_delay,u16
|
msgdata,opening_got_offer,to_self_delay,u16,
|
||||||
opening_got_offer,,max_accepted_htlcs,u16
|
msgdata,opening_got_offer,max_accepted_htlcs,u16,
|
||||||
opening_got_offer,,channel_flags,u8
|
msgdata,opening_got_offer,channel_flags,u8,
|
||||||
opening_got_offer,,shutdown_len,u16
|
msgdata,opening_got_offer,shutdown_len,u16,
|
||||||
opening_got_offer,,shutdown_scriptpubkey,shutdown_len*u8
|
msgdata,opening_got_offer,shutdown_scriptpubkey,u8,shutdown_len
|
||||||
# master->openingd: optional rejection message
|
# master->openingd: optional rejection message
|
||||||
opening_got_offer_reply,6105
|
msgtype,opening_got_offer_reply,6105
|
||||||
opening_got_offer_reply,,rejection,?wirestring
|
msgdata,opening_got_offer_reply,rejection,?wirestring,
|
||||||
|
|
||||||
#include <common/bip32.h>
|
#include <common/bip32.h>
|
||||||
#include <common/htlc_wire.h>
|
#include <common/htlc_wire.h>
|
||||||
# Master->openingd: please fund a channel.
|
# Master->openingd: please fund a channel.
|
||||||
opening_funder,6001
|
msgtype,opening_funder,6001
|
||||||
opening_funder,,funding_satoshis,struct amount_sat
|
msgdata,opening_funder,funding_satoshis,amount_sat,
|
||||||
opening_funder,,push_msat,struct amount_msat
|
msgdata,opening_funder,push_msat,amount_msat,
|
||||||
opening_funder,,feerate_per_kw,u32
|
msgdata,opening_funder,feerate_per_kw,u32,
|
||||||
opening_funder,,change_satoshis,struct amount_sat
|
msgdata,opening_funder,change_satoshis,amount_sat,
|
||||||
opening_funder,,change_keyindex,u32
|
msgdata,opening_funder,change_keyindex,u32,
|
||||||
opening_funder,,channel_flags,u8
|
msgdata,opening_funder,channel_flags,u8,
|
||||||
#include <common/utxo.h>
|
#include <common/utxo.h>
|
||||||
opening_funder,,num_inputs,u16
|
msgdata,opening_funder,num_inputs,u16,
|
||||||
opening_funder,,inputs,num_inputs*struct utxo
|
msgdata,opening_funder,inputs,utxo,num_inputs
|
||||||
opening_funder,,bip32,struct ext_key
|
msgdata,opening_funder,bip32,ext_key,
|
||||||
|
|
||||||
# Openingd->master: we've successfully offered channel.
|
# Openingd->master: we've successfully offered channel.
|
||||||
# This gives their sig, means we can broadcast tx: we're done.
|
# This gives their sig, means we can broadcast tx: we're done.
|
||||||
opening_funder_reply,6101
|
msgtype,opening_funder_reply,6101
|
||||||
opening_funder_reply,,their_config,struct channel_config
|
msgdata,opening_funder_reply,their_config,channel_config,
|
||||||
opening_funder_reply,,first_commit,struct bitcoin_tx
|
msgdata,opening_funder_reply,first_commit,bitcoin_tx,
|
||||||
opening_funder_reply,,first_commit_sig,struct bitcoin_signature
|
msgdata,opening_funder_reply,first_commit_sig,bitcoin_signature,
|
||||||
opening_funder_reply,,pps,struct per_peer_state
|
msgdata,opening_funder_reply,pps,per_peer_state,
|
||||||
opening_funder_reply,,revocation_basepoint,struct pubkey
|
msgdata,opening_funder_reply,revocation_basepoint,pubkey,
|
||||||
opening_funder_reply,,payment_basepoint,struct pubkey
|
msgdata,opening_funder_reply,payment_basepoint,pubkey,
|
||||||
opening_funder_reply,,htlc_basepoint,struct pubkey
|
msgdata,opening_funder_reply,htlc_basepoint,pubkey,
|
||||||
opening_funder_reply,,delayed_payment_basepoint,struct pubkey
|
msgdata,opening_funder_reply,delayed_payment_basepoint,pubkey,
|
||||||
opening_funder_reply,,their_per_commit_point,struct pubkey
|
msgdata,opening_funder_reply,their_per_commit_point,pubkey,
|
||||||
opening_funder_reply,,minimum_depth,u32
|
msgdata,opening_funder_reply,minimum_depth,u32,
|
||||||
opening_funder_reply,,remote_fundingkey,struct pubkey
|
msgdata,opening_funder_reply,remote_fundingkey,pubkey,
|
||||||
opening_funder_reply,,funding_txid,struct bitcoin_txid
|
msgdata,opening_funder_reply,funding_txid,bitcoin_txid,
|
||||||
opening_funder_reply,,funding_txout,u16
|
msgdata,opening_funder_reply,funding_txout,u16,
|
||||||
opening_funder_reply,,feerate_per_kw,u32
|
msgdata,opening_funder_reply,feerate_per_kw,u32,
|
||||||
opening_funder_reply,,our_channel_reserve_satoshis,struct amount_sat
|
msgdata,opening_funder_reply,our_channel_reserve_satoshis,amount_sat,
|
||||||
opening_funder_reply,,shutdown_len,u16
|
msgdata,opening_funder_reply,shutdown_len,u16,
|
||||||
opening_funder_reply,,shutdown_scriptpubkey,shutdown_len*u8
|
msgdata,opening_funder_reply,shutdown_scriptpubkey,u8,shutdown_len
|
||||||
|
|
||||||
# master->openingd: start channel establishment for a funding
|
# master->openingd: start channel establishment for a funding
|
||||||
# tx that will be paid for by an external wallet
|
# tx that will be paid for by an external wallet
|
||||||
opening_funder_start,6002
|
msgtype,opening_funder_start,6002
|
||||||
opening_funder_start,,funding_satoshis,struct amount_sat
|
msgdata,opening_funder_start,funding_satoshis,amount_sat,
|
||||||
opening_funder_start,,push_msat,struct amount_msat
|
msgdata,opening_funder_start,push_msat,amount_msat,
|
||||||
opening_funder_start,,feerate_per_kw,u32
|
msgdata,opening_funder_start,feerate_per_kw,u32,
|
||||||
opening_funder_start,,channel_flags,u8
|
msgdata,opening_funder_start,channel_flags,u8,
|
||||||
|
|
||||||
# openingd->master: send back output script for 2-of-2 funding output
|
# openingd->master: send back output script for 2-of-2 funding output
|
||||||
opening_funder_start_reply,6102
|
msgtype,opening_funder_start_reply,6102
|
||||||
opening_funder_start_reply,,script_len,u8
|
msgdata,opening_funder_start_reply,script_len,u8,
|
||||||
opening_funder_start_reply,,scriptpubkey,script_len*u8
|
msgdata,opening_funder_start_reply,scriptpubkey,u8,script_len
|
||||||
|
|
||||||
# master->openingd: complete channel establishment for a funding
|
# master->openingd: complete channel establishment for a funding
|
||||||
# tx that will be paid for by an external wallet
|
# tx that will be paid for by an external wallet
|
||||||
# response to this is a normal `opening_funder_reply` ??
|
# response to this is a normal `opening_funder_reply` ??
|
||||||
opening_funder_complete,6012
|
msgtype,opening_funder_complete,6012
|
||||||
opening_funder_complete,,funding_txid,struct bitcoin_txid
|
msgdata,opening_funder_complete,funding_txid,bitcoin_txid,
|
||||||
opening_funder_complete,,funding_txout,u16
|
msgdata,opening_funder_complete,funding_txout,u16,
|
||||||
|
|
||||||
#master->openingd: cancel channel establishment for a funding
|
#master->openingd: cancel channel establishment for a funding
|
||||||
opening_funder_cancel,6013
|
msgtype,opening_funder_cancel,6013
|
||||||
|
|
||||||
# Openingd->master: we failed to negotiation channel
|
# Openingd->master: we failed to negotiation channel
|
||||||
opening_funder_failed,6004
|
msgtype,opening_funder_failed,6004
|
||||||
opening_funder_failed,,reason,wirestring
|
msgdata,opening_funder_failed,reason,wirestring,
|
||||||
|
|
||||||
# Openingd->master: they offered channel.
|
# Openingd->master: they offered channel.
|
||||||
# This gives their txid and info, means we can send funding_signed: we're done.
|
# This gives their txid and info, means we can send funding_signed: we're done.
|
||||||
opening_fundee,6003
|
msgtype,opening_fundee,6003
|
||||||
opening_fundee,,their_config,struct channel_config
|
msgdata,opening_fundee,their_config,channel_config,
|
||||||
opening_fundee,,first_commit,struct bitcoin_tx
|
msgdata,opening_fundee,first_commit,bitcoin_tx,
|
||||||
opening_fundee,,first_commit_sig,struct bitcoin_signature
|
msgdata,opening_fundee,first_commit_sig,bitcoin_signature,
|
||||||
opening_fundee,,pps,struct per_peer_state
|
msgdata,opening_fundee,pps,per_peer_state,
|
||||||
opening_fundee,,revocation_basepoint,struct pubkey
|
msgdata,opening_fundee,revocation_basepoint,pubkey,
|
||||||
opening_fundee,,payment_basepoint,struct pubkey
|
msgdata,opening_fundee,payment_basepoint,pubkey,
|
||||||
opening_fundee,,htlc_basepoint,struct pubkey
|
msgdata,opening_fundee,htlc_basepoint,pubkey,
|
||||||
opening_fundee,,delayed_payment_basepoint,struct pubkey
|
msgdata,opening_fundee,delayed_payment_basepoint,pubkey,
|
||||||
opening_fundee,,their_per_commit_point,struct pubkey
|
msgdata,opening_fundee,their_per_commit_point,pubkey,
|
||||||
opening_fundee,,remote_fundingkey,struct pubkey
|
msgdata,opening_fundee,remote_fundingkey,pubkey,
|
||||||
opening_fundee,,funding_txid,struct bitcoin_txid
|
msgdata,opening_fundee,funding_txid,bitcoin_txid,
|
||||||
opening_fundee,,funding_txout,u16
|
msgdata,opening_fundee,funding_txout,u16,
|
||||||
opening_fundee,,funding_satoshis,struct amount_sat
|
msgdata,opening_fundee,funding_satoshis,amount_sat,
|
||||||
opening_fundee,,push_msat,struct amount_msat
|
msgdata,opening_fundee,push_msat,amount_msat,
|
||||||
opening_fundee,,channel_flags,u8
|
msgdata,opening_fundee,channel_flags,u8,
|
||||||
opening_fundee,,feerate_per_kw,u32
|
msgdata,opening_fundee,feerate_per_kw,u32,
|
||||||
# The funding signed message: send this and we're committed.
|
# The funding signed message: send this and we're committed.
|
||||||
opening_fundee,,msglen,u16
|
msgdata,opening_fundee,msglen,u16,
|
||||||
opening_fundee,,funding_signed_msg,msglen*u8
|
msgdata,opening_fundee,funding_signed_msg,u8,msglen
|
||||||
opening_fundee,,our_channel_reserve_satoshis,struct amount_sat
|
msgdata,opening_fundee,our_channel_reserve_satoshis,amount_sat,
|
||||||
opening_fundee,,shutdown_len,u16
|
msgdata,opening_fundee,shutdown_len,u16,
|
||||||
opening_fundee,,shutdown_scriptpubkey,shutdown_len*u8
|
msgdata,opening_fundee,shutdown_scriptpubkey,u8,shutdown_len
|
||||||
|
|
||||||
# master -> openingd: do you have a memleak?
|
# master -> openingd: do you have a memleak?
|
||||||
opening_dev_memleak,6033
|
msgtype,opening_dev_memleak,6033
|
||||||
|
|
||||||
opening_dev_memleak_reply,6133
|
msgtype,opening_dev_memleak_reply,6133
|
||||||
opening_dev_memleak_reply,,leak,bool
|
msgdata,opening_dev_memleak_reply,leak,bool,
|
||||||
|
|||||||
|
@@ -169,6 +169,9 @@ class Type(FieldSet):
|
|||||||
'u64',
|
'u64',
|
||||||
'bool',
|
'bool',
|
||||||
'secp256k1_ecdsa_signature',
|
'secp256k1_ecdsa_signature',
|
||||||
|
'secp256k1_ecdsa_recoverable_signature',
|
||||||
|
'wirestring',
|
||||||
|
'double',
|
||||||
]
|
]
|
||||||
|
|
||||||
truncated_typedefs = [
|
truncated_typedefs = [
|
||||||
@@ -576,6 +579,7 @@ def main(options, args=None, output=sys.stdout, lines=None):
|
|||||||
|
|
||||||
msg.add_data_field(tokens[2], type_obj, count, comments=list(comment_set),
|
msg.add_data_field(tokens[2], type_obj, count, comments=list(comment_set),
|
||||||
optional=optional)
|
optional=optional)
|
||||||
|
|
||||||
comment_set = []
|
comment_set = []
|
||||||
elif token_type.startswith('#include'):
|
elif token_type.startswith('#include'):
|
||||||
master.add_include(token_type)
|
master.add_include(token_type)
|
||||||
|
|||||||
Reference in New Issue
Block a user