core-lightning/lightningd/opening/opening_wire.csv
Rusty Russell ba12e316f1 lightningd: fix minimum depth.
Only the side *accepting* the connection gives a `minumum_depth`, but both
sides are supposed to wait that long:

BOLT #2:

	### The `funding_locked` message
...
	#### Requirements
	
	The sender MUST wait until the funding transaction has reached
	`minimum-depth` before sending this message.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-04-12 09:09:19 -07:00

2.9 KiB

1# These shouldn't happen
2opening_bad_command,0x8000
3opening_key_derivation_failed,0x8001
4opening_bad_param,0x8002
5opening_hsm_failed,0x8003
6# These are due to peer.
7opening_peer_write_failed,0x8010
8opening_peer_read_failed,0x8011
9opening_peer_bad_funding,0x8012
10opening_peer_bad_config,0x8013
11opening_peer_bad_initial_message,0x8014
12#include <lightningd/cryptomsg.h>
13#include <lightningd/channel_config.h>
14opening_init,0
15# Base configuration we'll offer (channel reserve will vary with amount)
16opening_init,0,our_config,struct channel_config
17# Minimum/maximum configuration values we'll accept
18opening_init,36,max_to_self_delay,4
19opening_init,40,min_effective_htlc_capacity_msat,8
20opening_init,48,crypto_state,struct crypto_state
21# Seed to generate all the keys from
22opening_init,196,seed,struct privkey
23# This means we offer the open.
24opening_open,1
25opening_open,0,funding_satoshis,8
26opening_open,8,push_msat,8
27opening_open,16,feerate_per_kw,4
28opening_open,20,max_minimum_depth,4
29# Reply asks for txid of funding transaction.
30opening_open_reply,101
31opening_open_reply,0,local_fundingkey,33
32opening_open_reply,0,remote_fundingkey,33
33# Now we give the funding txid and outnum.
34opening_open_funding,2
35opening_open_funding,0,txid,struct sha256_double
36opening_open_funding,32,txout,u16
37# This gives their sig, means we can broadcast tx: we're done.
38opening_open_funding_reply,102
39opening_open_funding_reply,0,their_config,struct channel_config
40opening_open_funding_reply,36,first_commit_sig,secp256k1_ecdsa_signature
41opening_open_funding_reply,100,crypto_state,struct crypto_state
42opening_open_funding_reply,244,revocation_basepoint,33
43opening_open_funding_reply,277,payment_basepoint,33
44opening_open_funding_reply,310,delayed_payment_basepoint,33
45opening_open_funding_reply,343,their_per_commit_point,33
46opening_open_funding_reply,376,minimum_depth,4
47# This means they offer the open (contains their offer packet)
48opening_accept,3
49opening_accept,0,minimum_depth,4
50opening_accept,0,min_feerate,4
51opening_accept,4,max_feerate,4
52opening_accept,8,len,2
53opening_accept,10,msg,len*u8
54# This gives the txid of their funding tx to watch.
55opening_accept_reply,103
56opening_accept_reply,0,funding_txid,struct sha256_double
57# Acknowledge watch is in place, now can send sig.
58opening_accept_finish,4
59opening_accept_finish_reply,104
60opening_accept_finish_reply,32,funding_txout,u16
61opening_accept_finish_reply,0,their_config,struct channel_config
62opening_accept_finish_reply,36,first_commit_sig,secp256k1_ecdsa_signature
63opening_accept_finish_reply,100,crypto_state,struct crypto_state
64opening_accept_finish_reply,244,remote_fundingkey,33
65opening_accept_finish_reply,277,revocation_basepoint,33
66opening_accept_finish_reply,310,payment_basepoint,33
67opening_accept_finish_reply,343,delayed_payment_basepoint,33
68opening_accept_finish_reply,377,their_per_commit_point,33
69opening_accept_finish_reply,410,funding_satoshis,8
70opening_accept_finish_reply,418,push_msat,8