2020-08-25 11:35:45 +09:30
|
|
|
#include <common/cryptomsg.h>
|
|
|
|
#include <common/features.h>
|
|
|
|
#include <common/wireaddr.h>
|
2021-05-28 11:39:52 -05:00
|
|
|
#include <wire/peer_wire.h>
|
2020-09-08 06:36:50 +09:30
|
|
|
#include <wire/onion_wire.h>
|
2020-08-25 11:35:45 +09:30
|
|
|
|
|
|
|
# Initialize the gossip daemon.
|
|
|
|
msgtype,gossipd_init,3000
|
|
|
|
msgdata,gossipd_init,chainparams,chainparams,
|
|
|
|
msgdata,gossipd_init,our_features,feature_set,
|
|
|
|
msgdata,gossipd_init,id,node_id,
|
|
|
|
msgdata,gossipd_init,dev_gossip_time,?u32,
|
|
|
|
msgdata,gossipd_init,dev_fast_gossip,bool,
|
|
|
|
msgdata,gossipd_init,dev_fast_gossip_prune,bool,
|
|
|
|
|
2023-07-28 15:06:18 +09:30
|
|
|
# Gossipd tells us all our public channel_updates before init_reply.
|
|
|
|
msgtype,gossipd_init_cupdate,3101
|
|
|
|
msgdata,gossipd_init_cupdate,scid,short_channel_id,
|
|
|
|
msgdata,gossipd_init_cupdate,len,u16,
|
|
|
|
msgdata,gossipd_init_cupdate,cupdate,u8,len
|
|
|
|
|
2024-01-31 13:46:18 +10:30
|
|
|
# Gossipd tells us our node_announcement before init_reply.
|
|
|
|
msgtype,gossipd_init_nannounce,3102
|
|
|
|
msgdata,gossipd_init_nannounce,len,u16,
|
|
|
|
msgdata,gossipd_init_nannounce,nannounce,u8,len
|
|
|
|
|
2021-06-15 06:37:39 +09:30
|
|
|
msgtype,gossipd_init_reply,3100
|
|
|
|
|
2020-08-25 11:35:45 +09:30
|
|
|
# In developer mode, we can mess with time.
|
|
|
|
msgtype,gossipd_dev_set_time,3001
|
|
|
|
msgdata,gossipd_dev_set_time,dev_gossip_time,u32,
|
|
|
|
|
|
|
|
# Gossipd->master get this tx output please.
|
|
|
|
msgtype,gossipd_get_txout,3018
|
|
|
|
msgdata,gossipd_get_txout,short_channel_id,short_channel_id,
|
|
|
|
|
|
|
|
# master->gossipd here is the output, or empty if none.
|
|
|
|
msgtype,gossipd_get_txout_reply,3118
|
|
|
|
msgdata,gossipd_get_txout_reply,short_channel_id,short_channel_id,
|
|
|
|
msgdata,gossipd_get_txout_reply,satoshis,amount_sat,
|
|
|
|
msgdata,gossipd_get_txout_reply,len,u16,
|
|
|
|
msgdata,gossipd_get_txout_reply,outscript,u8,len
|
|
|
|
|
2022-09-14 13:20:32 +09:30
|
|
|
# master -> gossipd: these potential funding outpoints were spent, please forget any channels
|
|
|
|
msgtype,gossipd_outpoints_spent,3024
|
|
|
|
msgdata,gossipd_outpoints_spent,blockheight,u32,
|
|
|
|
msgdata,gossipd_outpoints_spent,len,u32,
|
|
|
|
msgdata,gossipd_outpoints_spent,short_channel_id,short_channel_id,len
|
2020-08-25 11:35:45 +09:30
|
|
|
|
|
|
|
# master -> gossipd: do you have a memleak?
|
|
|
|
msgtype,gossipd_dev_memleak,3033
|
|
|
|
|
|
|
|
msgtype,gossipd_dev_memleak_reply,3133
|
|
|
|
msgdata,gossipd_dev_memleak_reply,leak,bool,
|
|
|
|
|
|
|
|
# master -> gossipd: blockheight increased.
|
|
|
|
msgtype,gossipd_new_blockheight,3026
|
|
|
|
msgdata,gossipd_new_blockheight,blockheight,u32,
|
2021-01-08 05:12:47 +10:30
|
|
|
|
2022-01-08 23:51:29 +10:30
|
|
|
# gossipd: got it!
|
|
|
|
msgtype,gossipd_new_blockheight_reply,3126
|
|
|
|
|
2021-02-02 15:46:20 +10:30
|
|
|
# Lightningd tells us to inject a gossip message (for addgossip RPC)
|
|
|
|
msgtype,gossipd_addgossip,3044
|
|
|
|
msgdata,gossipd_addgossip,len,u16,
|
|
|
|
msgdata,gossipd_addgossip,msg,u8,len
|
2024-01-31 15:03:12 +10:30
|
|
|
msgdata,gossipd_addgossip,known_channel,?amount_sat,
|
2021-02-02 15:46:20 +10:30
|
|
|
|
|
|
|
# Empty string means no problem.
|
|
|
|
msgtype,gossipd_addgossip_reply,3144
|
|
|
|
msgdata,gossipd_addgossip_reply,err,wirestring,
|
|
|
|
|
2022-01-11 11:45:48 +10:30
|
|
|
# Lightningd asks gossipd for any known addresses for that node.
|
|
|
|
msgtype,gossipd_get_addrs,3050
|
|
|
|
msgdata,gossipd_get_addrs,id,node_id,
|
|
|
|
|
|
|
|
msgtype,gossipd_get_addrs_reply,3150
|
|
|
|
msgdata,gossipd_get_addrs_reply,num,u16,
|
|
|
|
msgdata,gossipd_get_addrs_reply,addrs,wireaddr,num
|
2022-01-25 06:28:52 +10:30
|
|
|
|
2023-12-07 06:44:05 +10:30
|
|
|
subtype,peer_update
|
|
|
|
subtypedata,peer_update,scid,short_channel_id,
|
|
|
|
subtypedata,peer_update,fee_base,u32,
|
|
|
|
subtypedata,peer_update,fee_ppm,u32,
|
|
|
|
subtypedata,peer_update,cltv_delta,u16,
|
|
|
|
subtypedata,peer_update,htlc_minimum_msat,amount_msat,
|
|
|
|
subtypedata,peer_update,htlc_maximum_msat,amount_msat,
|
2023-12-07 06:44:05 +10:30
|
|
|
|
|
|
|
# Tell lightningd we received channel update info for a local channel
|
|
|
|
msgtype,gossipd_remote_channel_update,3010
|
2023-12-07 06:44:05 +10:30
|
|
|
msgdata,gossipd_remote_channel_update,source_node,?node_id,
|
|
|
|
msgdata,gossipd_remote_channel_update,peer_update,peer_update,
|