core-lightning/lightningd
Christian Decker def3d77a70 lightningd: Base peer->seed off of the channel ID
The peer->seed needs to be unique for each channel, since bitcoin
pubkeys and the shachain are generated from it. However we also need
to guarantee that the same seed is generated for a given channel every
time, e.g., upon a restart. The DB channel ID is guaranteed to be
unique, and will not change throughout the lifetime of a channel, so
we simply mix it in, instead of a separate increasing counter.

We also needed to make sure to store in the DB before deriving the
seed, in order to get an ID assigned by the DB.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-08-23 10:23:54 +09:30
..
channel gossip: include chain_hash in gossip messages. 2017-08-22 14:56:02 +02:00
closing BOLT: Update text to latest commit. 2017-08-22 14:56:02 +02:00
gossip gossip: include chain_hash in gossip messages. 2017-08-22 14:56:02 +02:00
handshake gossip: Use bit 3 (mask 0x08) to signal initial routing sync 2017-08-09 10:01:33 +09:30
hsm gossip: include chain_hash in gossip messages. 2017-08-22 14:56:02 +02:00
onchain onchain/onchain_wire: routines to marshal/unmarshal htlc stubs. 2017-08-20 13:06:41 +09:30
opening generate-wire.py: generate chain_hash fields as sha256_double. 2017-08-22 14:56:02 +02:00
test htlc_tx: use keyset abstraction. 2017-08-20 13:06:41 +09:30
.gitignore Update .gitignore files. 2017-05-12 12:59:09 +02:00
bip32.c bip32: marshal/unmarshal routines. 2017-08-20 13:06:41 +09:30
bip32.h bip32: marshal/unmarshal routines. 2017-08-20 13:06:41 +09:30
build_utxos.c wallet: move can_spend to wallet.c and json_addfunds to walletrpc.c 2017-06-23 16:02:20 +09:30
build_utxos.h wallet: Move coin-selection primitives to wallet 2017-06-23 16:02:20 +09:30
channel_config.c
channel_config.h wallet: Implement channel_config persistence 2017-08-10 12:34:58 +09:30
channel.c htlc_tx: use keyset abstraction. 2017-08-20 13:06:41 +09:30
channel.h Misc feedback minor fixes. 2017-07-12 10:21:16 +09:30
commit_tx.c keyset: abstraction over what keys we need for a specific commitment. 2017-08-20 13:06:41 +09:30
commit_tx.h keyset: abstraction over what keys we need for a specific commitment. 2017-08-20 13:06:41 +09:30
crypto_sync.c sync_crypto_write: support take(msg) 2017-06-29 00:08:21 +02:00
crypto_sync.h sync_crypto_write: support take(msg) 2017-06-29 00:08:21 +02:00
cryptomsg.c sync_crypto_write: support take(msg) 2017-06-29 00:08:21 +02:00
cryptomsg.h struct secret: use everywhere. 2017-05-09 11:43:35 +09:30
daemon_conn.c daemon_conn: fix daemon_conn_sync_flush. 2017-07-12 10:21:16 +09:30
daemon_conn.h subdaemons: handle master or gossipd failing. 2017-06-07 09:19:04 +09:30
debug.c lightningd: --dev-disconnect support. 2017-05-25 14:24:47 +09:30
debug.h
derive_basepoints.c lightningd/channel: hand commit_index in when creating txs only. 2017-06-23 09:29:42 +09:30
derive_basepoints.h lightningd/channel: hand commit_index in when creating txs only. 2017-06-23 09:29:42 +09:30
dev_disconnect.c dev_disconnect: support '*N' syntax for disconnecting on the N'th occurance. 2017-08-20 13:06:41 +09:30
dev_disconnect.h lightningd: --dev-disconnect support. 2017-05-25 14:24:47 +09:30
dev_ping.c sphinx: Updating daemon to new sphinx implementation 2017-05-02 11:47:52 +02:00
funding_tx.c lightningd/funding_tx: fix no-change-needed case. 2017-05-25 14:24:47 +09:30
funding_tx.h
gossip_control.c gossipd: hand in chain_hash. 2017-08-22 14:56:02 +02:00
gossip_control.h
gossip_msg.c routing: Cleaning up old hostname and port handling 2017-05-10 12:37:44 +09:30
gossip_msg.h routing: Cleaning up old hostname and port handling 2017-05-10 12:37:44 +09:30
hsm_control.c bip32: marshal/unmarshal routines. 2017-08-20 13:06:41 +09:30
hsm_control.h lightningd/hsm_control: use a simple fd for HSM. 2017-06-27 10:25:53 +09:30
htlc_end.c lightningd: fix up malformed onion handling. 2017-06-23 09:29:42 +09:30
htlc_end.h lightningd: fix up malformed onion handling. 2017-06-23 09:29:42 +09:30
htlc_tx.c htlc_tx: use keyset abstraction. 2017-08-20 13:06:41 +09:30
htlc_tx.h htlc_tx: use keyset abstraction. 2017-08-20 13:06:41 +09:30
htlc_wire.c lightningd/htlc_wire: marshal/unmashal bitcoin tx. 2017-08-20 13:06:41 +09:30
htlc_wire.h lightningd/htlc_wire: marshal/unmashal bitcoin tx. 2017-08-20 13:06:41 +09:30
key_derive.c Massive BOLT text underscore and formatting updates. 2017-06-07 09:19:04 +09:30
key_derive.h keyset: abstraction over what keys we need for a specific commitment. 2017-08-20 13:06:41 +09:30
keyset.c BOLT: Update text to latest commit. 2017-08-22 14:56:02 +02:00
keyset.h keyset: abstraction over what keys we need for a specific commitment. 2017-08-20 13:06:41 +09:30
lightningd.c lightningd: Base peer->seed off of the channel ID 2017-08-23 10:23:54 +09:30
lightningd.h lightningd: Base peer->seed off of the channel ID 2017-08-23 10:23:54 +09:30
Makefile keyset: abstraction over what keys we need for a specific commitment. 2017-08-20 13:06:41 +09:30
msg_queue.c lightningd/msg_queue: add msg_wake helper. 2017-04-25 22:00:28 +02:00
msg_queue.h lightningd/msg_queue: add msg_wake helper. 2017-04-25 22:00:28 +02:00
new_connection.c gossip: Use bit 3 (mask 0x08) to signal initial routing sync 2017-08-09 10:01:33 +09:30
new_connection.h lightningd: set up reconnect timer if we don't want to forget peer. 2017-05-25 14:24:47 +09:30
pay.c lightningd: move common "can I send HTLC" checks into send_htlc_out. 2017-06-23 09:29:42 +09:30
pay.h lightningd: unify pay vs forward path when handling failures. 2017-06-23 09:29:42 +09:30
peer_control.c lightningd: Base peer->seed off of the channel ID 2017-08-23 10:23:54 +09:30
peer_control.h lightningd: Load persisted channels on startup 2017-08-23 10:23:54 +09:30
peer_failed.c daemon_conn: fix daemon_conn_sync_flush. 2017-07-12 10:21:16 +09:30
peer_failed.h
peer_htlcs.c lightningd: save last htlc sigs. 2017-08-20 13:06:41 +09:30
peer_htlcs.h openingd: supply initial tx as well as signature. 2017-08-20 13:06:41 +09:30
peer_state.h lightningd: new peer state CLOSINGD_COMPLETE. 2017-07-12 10:21:16 +09:30
ping.c lightningd: add dev_ping command for channeld. 2017-04-25 22:00:28 +02:00
ping.h lightningd/ping: ping support. 2017-04-25 22:00:28 +02:00
sphinx.c sphinx: update padding as per latest BOLT 4 2017-08-22 14:56:02 +02:00
sphinx.h BOLT: Update text to latest commit. 2017-08-22 14:56:02 +02:00
status.c wire_sync_write: support take() 2017-06-27 10:25:53 +09:30
status.h
subd.c lightningd: add dev-fail command to inject permenant failure. 2017-08-20 13:06:41 +09:30
subd.h dev_disconnect: support 'permfail' line to permanently fail peer. 2017-08-20 13:06:41 +09:30
utxo.c lightningd/utxo: helpers to translate from utxo * <-> utxo ** 2017-05-25 14:24:47 +09:30
utxo.h wallet: Move UTXO tracking to DB 2017-06-06 09:16:10 +09:30
withdraw_tx.c wallet: Implement withdrawal transaction generation 2017-06-23 16:02:20 +09:30
withdraw_tx.h wallet: Implement withdrawal transaction generation 2017-06-23 16:02:20 +09:30