Christian Decker
7bb5c279a8
sphinx: Implemented sphinx onion routing
...
Implements a spec-compliant sphinx onion routing format. The format has
been cross-checked with the go implementation
cdecker/lightning-onion@b9e117e .
2016-10-16 16:40:43 +02:00
Rusty Russell
766249ec2b
Makefile: don't regenerate manpages unless they've really changed.
...
This is terribly ugly :(
Closes : #36
Reported-by: Glenn Willen
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-10-07 13:57:57 +10:30
Rusty Russell
4fcdf6de5c
irc: fix check-source.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-10-07 13:56:57 +10:30
Rusty Russell
5b3bde715a
getinfo: add version information
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-14 05:28:51 +09:30
Rusty Russell
c648897695
Makefile: clean up ccan-enumstr object for make clean.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-08 15:57:33 +09:30
Rusty Russell
2452df315a
doc: manpages for the various lightning RPC calls.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 16:47:41 +09:30
Rusty Russell
678df3525e
ccan: update, add cppmagic.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 13:47:07 +09:30
Rusty Russell
af8e4ed2b9
ccan: remove unused modules.
...
These tal submodules got pulled in initially by an overzealous copy.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-31 16:11:17 +09:30
Rusty Russell
c11c81a920
daemon: first unit test, infrastructure.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-25 11:39:46 +09:30
Rusty Russell
8d2776376a
0.4: Wright's Cryptographic Proof
...
Christian Decker moved us to libbase58 and off openssl; he got to name
this release.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-19 11:13:10 +09:30
Rusty Russell
190b30e958
daemon: test restarting.
...
We add a "dev-restart" command which causes the daemon to close fds
and exec itself. Then we do it after every command, with the caveat
that we always send a commit before newhtlc, because if not committed,
that is forgotten. Fulfillhtlc and failhtlc get resent, since they're
idempotent.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-18 14:25:14 +09:30
Rusty Russell
71b8a07c56
db.c: database API.
...
These tables could use a rework, as they largely reflect our internal
state. But it's a start.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-18 14:25:13 +09:30
Rusty Russell
3866d7605c
daemon: reconnect support.
...
To do this we keep an order counter so we know how to retransmit. We
could simply keep old packets, but this is a little clearer for now.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-18 14:25:08 +09:30
Rusty Russell
23f9c7c209
permute_tx: don't save permutation map.
...
We no longer need it anywhere. This simplifies things to the point where
we might as well just not include dust outputs as we go, rather than
explicitly removing them, which gets rid of remove_dust.c as well.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-18 14:23:46 +09:30
Rusty Russell
809caa8588
bitcoin/pullpush.[ch]: expose bitcoin-style marshal/unmarshal.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-18 14:23:45 +09:30
Rusty Russell
ca142a0b47
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-18 14:23:45 +09:30
Rusty Russell
748f477508
maintclean: fix depends and typo
...
Make CORE_OBJS depends on headers, also make them depend on CCAN headers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-09 13:11:13 +09:30
Christian Decker
7546fad324
Removing OpenSSL as a dependency.
2016-08-09 13:10:19 +09:30
Christian Decker
1f4a056009
Switched base58 to use libbase58.
2016-08-09 13:10:19 +09:30
Rusty Russell
c649f62e43
libsecp256k1: update.
...
Add Makefile target update-secp256k1, and run it.
The only API change is that len is now an IN-OUT parameter to serialization
functions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-07-01 12:00:17 +09:30
Rusty Russell
de90b44bf6
Makefile: erase libsecp results on distclean.
...
If upgrade changes configure flags, 'make distclean' can fail as it
tries to reconfigure. Deleting secp256k1/libsecp256k1.la forces a
full autogen/configure/make cycle.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-07-01 12:00:17 +09:30
Rusty Russell
42bed80145
pubkey: don't carry around DER encoding.
...
We just wrap the libsecp256k1 structure, and convert to DER on demand.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-07-01 12:00:17 +09:30
Rusty Russell
fecd91ab2a
Move funding.[ch] to daemon/channel.[ch].
...
It's a more logical name, and a more logical place. We change
"funding" to "channel" in the remaining exposed symbols, too.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-07-01 12:00:17 +09:30
Rusty Russell
04b3e8f91d
daemon: use siphash for hashes.
...
Remove ccan/hash (aka Jenkins lookup3) altogether.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-07-01 12:00:17 +09:30
Rusty Russell
d1416ea5b5
TAGS: don't go into git dirs.
...
Things get quite confusing when this happens.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-07-01 11:59:15 +09:30
ocinq
bcdab60694
Makefile : ccan/asort is referenced
...
Added explicit compilation and linking of ccan/asort as needed by daemon/chaintopology
2016-06-14 17:25:07 +02:00
Rusty Russell
49ebed737d
daemon/test: test differential fees.
...
This would have revealed the previous breakage (and I tested that!),
plus now we test negotiate on closing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-30 11:18:46 +09:30
Rusty Russell
9bb070f5b6
0.3 release: Braydon Fuller: Nakamoto's Genesis Coins
...
Braydon wrote the INSTALL.md file; he gets to name this release,
in line with the theme.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-26 15:25:25 +09:30
Rusty Russell
97bc4ed0cb
daemon/test: test mutual close with outstanding HTLCS.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-26 15:25:24 +09:30
Rusty Russell
f43cc72d6a
Makefile: add generated packet names.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-26 15:25:24 +09:30
Rusty Russell
e46a2ed49a
test/test_protocol: rename internally to match updated 02-wire-protocol.md
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-17 15:06:12 +09:30
Rusty Russell
06d2c19c41
test/test_protocol: make pretty(-ish) SVG diagrams.
...
Could make them much prettier, but they're functional.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-17 15:02:08 +09:30
Rusty Russell
c710a64ccf
Makefile: support for suppressing valgrind.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-17 13:49:54 +09:30
Rusty Russell
7f90d183da
test/test_protocol: simulator for the updated wire-protocol BOLT.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-17 13:47:44 +09:30
Rusty Russell
35d1b13cde
daemon: commit outstanding changes via timer.
...
While useful for testing, it doesn't make sense to have an explicit commit
command; we should commit whenever there are outstanding changes.
We have a 10ms timer to allow limited batching, however.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-10 06:30:11 +09:30
Rusty Russell
4beaedfa49
daemon/test: clean up Makefile.
...
This means mkae tells us directly what failed.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-06 16:22:47 +09:30
Rusty Russell
d6603adc2f
daemon/test: test stealing.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-06 12:00:30 +09:30
Rusty Russell
623eec4068
daemon/test: test unilateral close.
...
We use dev-disconnect to convince one node the other has disconnected
(but not vice versa), to get deterministic behaviour. We do this with
one HTLC outstanding, to test the HTLC timeout path.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-04 16:14:22 +09:30
Rusty Russell
f29a6043d2
daemon: open-code handling of on-chain states.
...
Once we see an on-chain tx, we ignore the state machine and handle it
as per the onchain.md draft. This specifies a *resolution* for each
output, and we're done when they're irrevocable.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-04 16:14:22 +09:30
Rusty Russell
3f374d8d8b
check-bolt: handle references to early-drafts too.
...
Particularly for the onchain.md draft.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-04 16:03:04 +09:30
Rusty Russell
9eabab78ab
utils: tal_hexstr() helper.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-03 11:28:49 +09:30
Rusty Russell
a150bd191a
remove_dust: don't ever create dust outputs.
...
This behavior will be specified in BOLT #3 .
Closes : #14
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-03 11:28:49 +09:30
Rusty Russell
4bbb86ae30
daemon: clean up test dirs.
...
Move final helpers out of test-cli/
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-03 11:27:56 +09:30
Rusty Russell
03a538ca02
check-bolt: check that comments in code match the specs.
...
And fix the mistakes!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-03 11:27:56 +09:30
Rusty Russell
5ba7692254
Makefile: fix config.h rebuilds in parallel.
...
Occasionally make seems to rebuild this in parallel, so make sure to
never have a partially complete one.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-05-03 11:27:56 +09:30
Rusty Russell
e7b9a913a6
bitcoind: getrawblock helper.
...
It turns out using the verbose=false parameter, you can get the raw block
from getblock. Do that.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-24 19:40:29 +09:30
Rusty Russell
410fc3b272
misc: remove some unused functions.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-24 19:33:13 +09:30
Rusty Russell
6b956ea22a
varint: new file.
...
Move varint handling from tx.c and generalize it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-12 13:07:03 +09:30
Rusty Russell
ed70b13041
bitcoin: add first unit test.
...
Should grow from here.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-11 16:42:53 +09:30
Rusty Russell
f8796c261b
Make BIP68 and CSV support the default.
...
This has gone upstream into bitcoind, so enable it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-11 16:35:29 +09:30