Files
lightning/lightningd/gossip/gossip_wire.csv
Christian Decker daf8866eb5 gossip: Implement the basic node_announcement
Rather a big commit, but I couldn't figure out how to split it
nicely. It introduces a new message from the channel to the master
signaling that the channel has been announced, so that the master can
take care of announcing the node itself. A provisorial announcement is
created and passed to the HSM, which signs it and passes it back to
the master. Finally the master injects it into gossipd which will take
care of broadcasting it.
2017-05-10 12:37:44 +09:30

107 lines
3.4 KiB
CSV

# These are fatal.
gossipstatus_init_failed,0x8000
gossipstatus_bad_new_peer_request,0x8001
gossipstatus_bad_release_request,0x8002
gossipstatus_bad_request,0x8003
gossipstatus_fdpass_failed,0x8004
# Peers can give a bad message, we close their fd, but no harm done.
gossipstatus_peer_bad_msg,1000
gossipstatus_peer_bad_msg,0,unique_id,8
gossipstatus_peer_bad_msg,8,len,2
gossipstatus_peer_bad_msg,10,err,len*u8
# Misc problems like opening control fd.
gossipstatus_peer_failed,1001
gossipstatus_peer_failed,0,unique_id,8
gossipstatus_peer_failed,8,len,2
gossipstatus_peer_failed,10,err,len*u8
#include <lightningd/cryptomsg.h>
# Initialize the gossip daemon
gossipctl_init,0
gossipctl_init,0,broadcast_interval,4
# These take an fd, but have no response
# (if it is to move onto a channel, we get a status msg).
gossipctl_new_peer,1
gossipctl_new_peer,0,unique_id,8
gossipctl_new_peer,8,crypto_state,struct crypto_state
# Tell it to release a peer which has initialized.
gossipctl_release_peer,2
gossipctl_release_peer,0,unique_id,8
# This releases the peer and returns the cryptostate (followed two fds: peer and gossip)
gossipctl_release_peer_reply,102
gossipctl_release_peer_reply,0,unique_id,8
gossipctl_release_peer_reply,8,crypto_state,struct crypto_state
# This is where we save a peer's features.
#gossipstatus_peer_features,1
#gossipstatus_peer_features,0,unique_id,8
#gossipstatus_peer_features,8,gflen,2
#gossipstatus_peer_features,10,globalfeatures,gflen
#gossipstatus_peer_features,10+gflen,lflen,2
#gossipstatus_peer_features,12+gflen,localfeatures,lflen
# Peer init handshake complete (now you can release_peer if you want)
gossipstatus_peer_ready,3
gossipstatus_peer_ready,0,unique_id,8
# Peer can send non-gossip packet (usually an open_channel) (followed two fds: peer and gossip)
gossipstatus_peer_nongossip,4
gossipstatus_peer_nongossip,0,unique_id,8
gossipstatus_peer_nongossip,10,crypto_state,struct crypto_state
gossipstatus_peer_nongossip,154,len,2
gossipstatus_peer_nongossip,156,msg,len*u8
# Pass JSON-RPC getnodes call through
gossip_getnodes_request,5
#include <lightningd/gossip_msg.h>
gossip_getnodes_reply,105
gossip_getnodes_reply,0,num_nodes,u16
gossip_getnodes_reply,2,nodes,num_nodes*struct gossip_getnodes_entry
# Pass JSON-RPC getroute call through
gossip_getroute_request,6
gossip_getroute_request,0,source,struct pubkey
gossip_getroute_request,33,destination,struct pubkey
gossip_getroute_request,66,msatoshi,u32
gossip_getroute_request,70,riskfactor,u16
gossip_getroute_reply,106
gossip_getroute_reply,0,num_hops,u16
gossip_getroute_reply,2,hops,num_hops*struct route_hop
gossip_getchannels_request,7
gossip_getchannels_reply,107
gossip_getchannels_reply,0,num_channels,u16
gossip_getchannels_reply,2,nodes,num_channels*struct gossip_getchannels_entry
# Ping/pong test.
gossip_ping,8
gossip_ping,0,unique_id,u64
gossip_ping,0,num_pong_bytes,u16
gossip_ping,0,len,u16
gossip_ping_reply,108
gossip_ping_reply,0,totlen,u16
# Given a short_channel_id, return the endpoints
gossip_resolve_channel_request,9
gossip_resolve_channel_request,0,channel_id,struct short_channel_id
gossip_resolve_channel_reply,109
gossip_resolve_channel_reply,0,num_keys,u16
gossip_resolve_channel_reply,0,keys,num_keys*struct pubkey
# The main daemon forward some gossip message to gossipd, allows injecting
# arbitrary gossip messages.
gossip_forwarded_msg,10
gossip_forwarded_msg,0,msglen,2
gossip_forwarded_msg,2,msg,msglen