6.0 KiB
6.0 KiB
| 1 | #include <common/cryptomsg.h> | ||||
|---|---|---|---|---|---|
| 2 | #include <common/wireaddr.h> | ||||
| 3 | #include <wire/gen_onion_wire.h> | ||||
| 4 | # Initialize the gossip daemon. | ||||
| 5 | msgtype | gossipctl_init | 3000 | ||
| 6 | msgdata | gossipctl_init | chain_hash | bitcoin_blkid | |
| 7 | msgdata | gossipctl_init | id | node_id | |
| 8 | msgdata | gossipctl_init | gflen | u16 | |
| 9 | msgdata | gossipctl_init | globalfeatures | u8 | gflen |
| 10 | msgdata | gossipctl_init | rgb | u8 | 3 |
| 11 | msgdata | gossipctl_init | alias | u8 | 32 |
| 12 | msgdata | gossipctl_init | update_channel_interval | u32 | |
| 13 | msgdata | gossipctl_init | num_announcable | u16 | |
| 14 | msgdata | gossipctl_init | announcable | wireaddr | num_announcable |
| 15 | msgdata | gossipctl_init | dev_gossip_time | ?u32 | |
| 16 | # Pass JSON-RPC getnodes call through | ||||
| 17 | msgtype | gossip_getnodes_request | 3005 | ||
| 18 | msgdata | gossip_getnodes_request | id | ?node_id | |
| 19 | #include <lightningd/gossip_msg.h> | ||||
| 20 | msgtype | gossip_getnodes_reply | 3105 | ||
| 21 | msgdata | gossip_getnodes_reply | num_nodes | u32 | |
| 22 | msgdata | gossip_getnodes_reply | nodes | gossip_getnodes_entry | num_nodes |
| 23 | # Pass JSON-RPC getroute call through | ||||
| 24 | msgtype | gossip_getroute_request | 3006 | ||
| 25 | msgdata | gossip_getroute_request | source | ?node_id | |
| 26 | msgdata | gossip_getroute_request | destination | node_id | |
| 27 | msgdata | gossip_getroute_request | msatoshi | amount_msat | |
| 28 | # We don't pass doubles | so pass riskfactor 1000000. | |||
| 29 | msgdata | gossip_getroute_request | riskfactor_by_million | u64 | |
| 30 | msgdata | gossip_getroute_request | final_cltv | u32 | |
| 31 | msgdata | gossip_getroute_request | fuzz | double | |
| 32 | msgdata | gossip_getroute_request | num_excluded | u16 | |
| 33 | msgdata | gossip_getroute_request | excluded | short_channel_id_dir | num_excluded |
| 34 | msgdata | gossip_getroute_request | max_hops | u32 | |
| 35 | msgtype | gossip_getroute_reply | 3106 | ||
| 36 | msgdata | gossip_getroute_reply | num_hops | u16 | |
| 37 | msgdata | gossip_getroute_reply | hops | route_hop | num_hops |
| 38 | msgtype | gossip_getchannels_request | 3007 | ||
| 39 | msgdata | gossip_getchannels_request | short_channel_id | ?short_channel_id | |
| 40 | msgdata | gossip_getchannels_request | source | ?node_id | |
| 41 | msgdata | gossip_getchannels_request | prev | ?short_channel_id | |
| 42 | msgtype | gossip_getchannels_reply | 3107 | ||
| 43 | msgdata | gossip_getchannels_reply | complete | bool | |
| 44 | msgdata | gossip_getchannels_reply | num_channels | u32 | |
| 45 | msgdata | gossip_getchannels_reply | nodes | gossip_getchannels_entry | num_channels |
| 46 | # Ping/pong test. Waits for a reply if it expects one. | ||||
| 47 | msgtype | gossip_ping | 3008 | ||
| 48 | msgdata | gossip_ping | id | node_id | |
| 49 | msgdata | gossip_ping | num_pong_bytes | u16 | |
| 50 | msgdata | gossip_ping | len | u16 | |
| 51 | msgtype | gossip_ping_reply | 3108 | ||
| 52 | msgdata | gossip_ping_reply | id | node_id | |
| 53 | # False if id in gossip_ping was unknown. | ||||
| 54 | msgdata | gossip_ping_reply | sent | bool | |
| 55 | # 0 == no pong expected | ||||
| 56 | msgdata | gossip_ping_reply | totlen | u16 | |
| 57 | # Test of query_short_channel_ids. Master->gossipd | ||||
| 58 | msgtype | gossip_query_scids | 3031 | ||
| 59 | msgdata | gossip_query_scids | id | node_id | |
| 60 | msgdata | gossip_query_scids | num_ids | u16 | |
| 61 | msgdata | gossip_query_scids | ids | short_channel_id | num_ids |
| 62 | # Gossipd -> master | ||||
| 63 | msgtype | gossip_scids_reply | 3131 | ||
| 64 | msgdata | gossip_scids_reply | ok | bool | |
| 65 | msgdata | gossip_scids_reply | complete | bool | |
| 66 | # Test gossip timestamp filtering. | ||||
| 67 | msgtype | gossip_send_timestamp_filter | 3028 | ||
| 68 | msgdata | gossip_send_timestamp_filter | id | node_id | |
| 69 | msgdata | gossip_send_timestamp_filter | first_timestamp | u32 | |
| 70 | msgdata | gossip_send_timestamp_filter | timestamp_range | u32 | |
| 71 | # Test of query_channel_range. Master->gossipd | ||||
| 72 | msgtype | gossip_query_channel_range | 3029 | ||
| 73 | msgdata | gossip_query_channel_range | id | node_id | |
| 74 | msgdata | gossip_query_channel_range | first_blocknum | u32 | |
| 75 | msgdata | gossip_query_channel_range | number_of_blocks | u32 | |
| 76 | # Gossipd -> master | ||||
| 77 | msgtype | gossip_query_channel_range_reply | 3129 | ||
| 78 | msgdata | gossip_query_channel_range_reply | final_first_block | u32 | |
| 79 | msgdata | gossip_query_channel_range_reply | final_num_blocks | u32 | |
| 80 | msgdata | gossip_query_channel_range_reply | final_complete | bool | |
| 81 | msgdata | gossip_query_channel_range_reply | num | u16 | |
| 82 | msgdata | gossip_query_channel_range_reply | scids | short_channel_id | num |
| 83 | # Set artificial maximum reply_channel_range size. Master->gossipd | ||||
| 84 | msgtype | gossip_dev_set_max_scids_encode_size | 3030 | ||
| 85 | msgdata | gossip_dev_set_max_scids_encode_size | max | u32 | |
| 86 | # Given a short_channel_id | return the other endpoint (or none if DNE) | |||
| 87 | msgtype | gossip_get_channel_peer | 3009 | ||
| 88 | msgdata | gossip_get_channel_peer | channel_id | short_channel_id | |
| 89 | msgtype | gossip_get_channel_peer_reply | 3109 | ||
| 90 | msgdata | gossip_get_channel_peer_reply | peer_id | ?node_id | |
| 91 | # gossipd->master: we're closing this channel. | ||||
| 92 | msgtype | gossip_local_channel_close | 3027 | ||
| 93 | msgdata | gossip_local_channel_close | short_channel_id | short_channel_id | |
| 94 | # Gossipd->master get this tx output please. | ||||
| 95 | msgtype | gossip_get_txout | 3018 | ||
| 96 | msgdata | gossip_get_txout | short_channel_id | short_channel_id | |
| 97 | # master->gossipd here is the output | or empty if none. | |||
| 98 | msgtype | gossip_get_txout_reply | 3118 | ||
| 99 | msgdata | gossip_get_txout_reply | short_channel_id | short_channel_id | |
| 100 | msgdata | gossip_get_txout_reply | satoshis | amount_sat | |
| 101 | msgdata | gossip_get_txout_reply | len | u16 | |
| 102 | msgdata | gossip_get_txout_reply | outscript | u8 | len |
| 103 | # master->gossipd an htlc failed with this onion error. | ||||
| 104 | msgtype | gossip_payment_failure | 3021 | ||
| 105 | msgdata | gossip_payment_failure | erring_node | node_id | |
| 106 | msgdata | gossip_payment_failure | erring_channel | short_channel_id | |
| 107 | msgdata | gossip_payment_failure | erring_channel_direction | u8 | |
| 108 | msgdata | gossip_payment_failure | len | u16 | |
| 109 | msgdata | gossip_payment_failure | error | u8 | len |
| 110 | # master -> gossipd: a potential funding outpoint was spent | please forget the eventual channel | |||
| 111 | msgtype | gossip_outpoint_spent | 3024 | ||
| 112 | msgdata | gossip_outpoint_spent | short_channel_id | short_channel_id | |
| 113 | # master -> gossipd: stop gossip timers. | ||||
| 114 | msgtype | gossip_dev_suppress | 3032 | ||
| 115 | # master -> gossipd: do you have a memleak? | ||||
| 116 | msgtype | gossip_dev_memleak | 3033 | ||
| 117 | msgtype | gossip_dev_memleak_reply | 3133 | ||
| 118 | msgdata | gossip_dev_memleak_reply | leak | bool | |
| 119 | # master -> gossipd: please rewrite the gossip_store | ||||
| 120 | msgtype | gossip_dev_compact_store | 3034 | ||
| 121 | # gossipd -> master: ok | ||||
| 122 | msgtype | gossip_dev_compact_store_reply | 3134 | ||
| 123 | msgdata | gossip_dev_compact_store_reply | success | bool | |
| 124 | #include <common/bolt11.h> | ||||
| 125 | # master -> gossipd: get route_info for our incoming channels | ||||
| 126 | msgtype | gossip_get_incoming_channels | 3025 | ||
| 127 | msgdata | gossip_get_incoming_channels | private_too | ?bool | |
| 128 | # gossipd -> master: here they are. | ||||
| 129 | msgtype | gossip_get_incoming_channels_reply | 3125 | ||
| 130 | msgdata | gossip_get_incoming_channels_reply | num | u16 | |
| 131 | msgdata | gossip_get_incoming_channels_reply | route_info | route_info | num |