Rusty Russell
f9189254e4
lightningd/commit_tx: creation of BOLT 3 commitment transaction.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-07 12:14:22 +10:30
Rusty Russell
b290a96a4a
lightningd: use daemon/htlc_state.c
...
We're about to need HTLC handling.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-07 12:14:22 +10:30
Rusty Russell
be46fdf254
lightningd/funding_tx.c: helper to create a funding transaction (with change).
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-07 12:14:21 +10:30
Rusty Russell
75c6dd1981
channel_config: convenient structure for handling open/accept config info.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-07 12:14:21 +10:30
Rusty Russell
dc3b27e1d3
key_derive: key derivation from basepoints as specified in BOLT 3
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-07 12:14:21 +10:30
Christian Decker
76e2c980e1
gossip: Moving to intmap-based broadcast for the legacy daemon
...
Moved the broadcast functionality to broadcast.[ch]. So far this
includes only the enqueuing side of broadcasts, the dequeuing and
actual push to the peer is daemon dependent. This also adds the
broadcast_state to the routing_state and the last broadcast index to
the peer for the legacy daemon.
2017-02-03 05:52:11 +10:30
Rusty Russell
6bf3c30a10
lightningd/Makefile: fix check-source
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-13 10:51:57 +10:30
Christian Decker
b41d71da30
Makefile: Making sure header vars are populated correctly
...
The problem with wire headers not being generated in time before stuff
depended on it turns out to be related with inclusion order of
sub-makefiles. The inclusions must preceed the use of
LIGHTNINGD_HEADERS since they append to that variable.
2017-01-13 10:50:07 +10:30
Rusty Russell
33748bf119
lightningd/Makefile: combine all headers (wire/gen was missing)
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-11 10:15:27 +10:30
Rusty Russell
73d07ce441
libsodium: use our local submodule.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-11 10:04:26 +10:30
Rusty Russell
3af081aded
Makefile: make all lightningd objects depend on all lightningd headers.
...
Christian reported that we weren't generating some gen_ files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-11 09:16:29 +10:30
Rusty Russell
83b156517f
lightningd/lightningd: maintain "condition" for each peer.
...
This lets us return better messages to the connect json command on failure.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
c536616bee
lightningd/lightningd: wire up lightningd_gossip.
...
Now we hand peers off to the gossip daemon, to do the INIT handshake and
re-transmit/receive gossip. They may stay there forever if neither we nor
them wants to open a channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
21a5c62ead
lightningd_gossip: daemon to look after peers which don't a channel (yet)
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
bf118f1b86
lightningd/lightningd: add connect command.
...
Unlike the old daemon, this just connects; a separate command will be needed
to create a channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
211491f4d7
lightningd/lightningd: add lightning_handshake.
...
Now we do crypto handshake when peer comes in.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
32e1b5bb06
lightningd/handshake: simple daemon to do BOLT 8 crypto handshake.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
0444d68197
lightningd/lightningd: add rpc interface.
...
daemon/lightning-cli works with this.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
542e6844f7
lightningd/lightningd: start HSM at initialization time.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
10b8dc5950
lightningd/hsm: simple daemon to control the keys.
...
This provides APIs to access the keys.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
89a06734c4
lightningd/cryptomsg: test routines.
...
This creates output similar to the BOLT #8 test vectors.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
a7f682c66e
lightningd/cryptomsg: routines to encrypt on the wire.
...
After the handshake, it's a simple matter of AEAD and key rotation.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
faebb87d01
lightningd/subdaemon: routines to create daemons and get request/response.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:38:33 +10:30
Rusty Russell
8bf33c7839
lightningd/lightningd: daemon for controlling the other daemons.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-10 15:37:51 +10:30