mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-10 15:45:09 +01:00
daf8866eb5
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.
1.8 KiB
1.8 KiB
1 | # These are fatal. |
---|---|
2 | hsmstatus_init_failed,0x8000 |
3 | hsmstatus_writemsg_failed,0x8001 |
4 | hsmstatus_bad_request,0x8002 |
5 | hsmstatus_fd_failed,0x8003 |
6 | hsmstatus_key_failed,0x8004 |
7 | # Clients should not give a bad request but not the HSM's decision to crash. |
8 | hsmstatus_client_bad_request,1000 |
9 | hsmstatus_client_bad_request,0,unique-id,8 |
10 | hsmstatus_client_bad_request,8,len,2 |
11 | hsmstatus_client_bad_request,10,msg,len*u8 |
12 | # Start the HSM. |
13 | hsmctl_init,1 |
14 | hsmctl_init,0,new,bool |
15 | hsmctl_init_reply,101 |
16 | hsmctl_init_reply,0,node_id,33 |
17 | hsmctl_init_reply,33,peer_seed,struct secret |
18 | hsmctl_init_reply,65,bip32_len,2 |
19 | hsmctl_init_reply,67,bip32_seed,bip32_len*u8 |
20 | # ECDH returns an fd. |
21 | hsmctl_hsmfd_ecdh,3 |
22 | hsmctl_hsmfd_ecdh,0,unique_id,8 |
23 | # No contents, just an fd. |
24 | hsmctl_hsmfd_ecdh_fd_reply,103 |
25 | # Return signature for a funding tx. |
26 | #include <lightningd/utxo.h> |
27 | # FIXME: This should also take their commit sig & details, to verify. |
28 | hsmctl_sign_funding,4 |
29 | hsmctl_sign_funding,0,satoshi_out,8 |
30 | hsmctl_sign_funding,8,change_out,8 |
31 | hsmctl_sign_funding,16,change_keyindex,4 |
32 | hsmctl_sign_funding,20,our_pubkey,33 |
33 | hsmctl_sign_funding,52,their_pubkey,33 |
34 | hsmctl_sign_funding,85,num_inputs,2 |
35 | hsmctl_sign_funding,87,inputs,num_inputs*struct utxo |
36 | hsmctl_sign_funding_reply,104 |
37 | hsmctl_sign_funding_reply,0,num_sigs,2 |
38 | hsmctl_sign_funding_reply,0,sig,num_sigs*secp256k1_ecdsa_signature |
39 | # Request a client socket for a `channeld`, allows signing announcements |
40 | hsmctl_hsmfd_channeld,5 |
41 | hsmctl_hsmfd_channeld,0,unique_id,8 |
42 | # Empty reply, just an fd |
43 | hsmctl_hsmfd_channeld_reply,105 |
44 | # Master asks the HSM to sign a node_announcement |
45 | hsmctl_node_announcement_sig_req,6 |
46 | hsmctl_node_announcement_sig_req,0,annlen,2 |
47 | hsmctl_node_announcement_sig_req,2,announcement,annlen*u8 |
48 | hsmctl_node_announcement_sig_reply,106 |
49 | hsmctl_node_announcement_sig_reply,0,signature,secp256k1_ecdsa_signature |