]> git.bitcoin.ninja Git - rust-lightning/log
rust-lightning
6 years agof 260-fuzz-change
Matt Corallo [Mon, 26 Nov 2018 17:33:53 +0000 (12:33 -0500)]
f

6 years agoImplements get_session_key for full_stack_target
Yuntai Kyong [Mon, 26 Nov 2018 16:23:29 +0000 (01:23 +0900)]
Implements get_session_key for full_stack_target

6 years agoAdd a method to get session secret for onion packet to KeysInterface
Yuntai Kyong [Mon, 26 Nov 2018 11:10:01 +0000 (20:10 +0900)]
Add a method to get session secret for onion packet to KeysInterface

6 years agoMerge pull request #259 from TheBlueMatt/2018-11-256-redux
Matt Corallo [Fri, 23 Nov 2018 20:21:35 +0000 (15:21 -0500)]
Merge pull request #259 from TheBlueMatt/2018-11-256-redux

Add test_claim_on_remote_revoked_sizeable_push_msat

6 years agoAdd test_claim_on_remote_revoked_sizeable_push_msat 2018-11-256-redux
Antoine Riard [Fri, 23 Nov 2018 00:45:11 +0000 (19:45 -0500)]
Add test_claim_on_remote_revoked_sizeable_push_msat

6 years agoRefactor check spendable outputs macros into one
Antoine Riard [Fri, 23 Nov 2018 00:42:02 +0000 (19:42 -0500)]
Refactor check spendable outputs macros into one

In consequence, harden spendable outputs tests

Fix vocabulary abuse

6 years agoMerge pull request #257 from TheBlueMatt/2018-11-007-bump
Matt Corallo [Wed, 21 Nov 2018 21:45:17 +0000 (16:45 -0500)]
Merge pull request #257 from TheBlueMatt/2018-11-007-bump

Bump to 0.0.7 for API rev

6 years agoBump to 0.0.7 for API rev 2018-11-007-bump
Matt Corallo [Wed, 21 Nov 2018 21:18:02 +0000 (16:18 -0500)]
Bump to 0.0.7 for API rev

6 years agoMerge pull request #246 from TheBlueMatt/2018-11-fuzz-crash-redux
Matt Corallo [Wed, 21 Nov 2018 21:17:01 +0000 (16:17 -0500)]
Merge pull request #246 from TheBlueMatt/2018-11-fuzz-crash-redux

Several fuzz-found bugfixes.

6 years agoMerge pull request #255 from TheBlueMatt/2018-11-230-ext
Matt Corallo [Wed, 21 Nov 2018 16:41:42 +0000 (11:41 -0500)]
Merge pull request #255 from TheBlueMatt/2018-11-230-ext

Two post-#230 fixups

6 years agoCheck P2WPKH script against expected before gen'ing an output event 2018-11-230-ext
Matt Corallo [Tue, 20 Nov 2018 20:09:47 +0000 (15:09 -0500)]
Check P2WPKH script against expected before gen'ing an output event

This fixes a bug in 3518f1f85d8a3daff451b3fe56cc7854b833e2bd where
we may generate an output event for a P2WPKH output which is not
ours if the transaction has a sequence/lock_time combination which
false-positives our remote tx detection.

Also note that the TODO is removed as this should already be
covered without issue if the client properly replays the chain on
restart.

6 years agoProvide commitment point to monitor with the remote txn update
Matt Corallo [Mon, 19 Nov 2018 22:12:17 +0000 (17:12 -0500)]
Provide commitment point to monitor with the remote txn update

This extends 1b33064554ae48c9173acf8bf1e0052d33a855df by
re-simplifying the ChannelMonitor <-> Channel interface a bit as we
never have any use for the latest remote commitment point until we
have knowledge of a remote transaction generated using it.

6 years agoMerge pull request #254 from TheBlueMatt/2018-11-channelerror
Matt Corallo [Wed, 21 Nov 2018 00:00:49 +0000 (19:00 -0500)]
Merge pull request #254 from TheBlueMatt/2018-11-channelerror

Move a ton of Channel functions to ChannelError from HandleError

6 years agoFix two compiler warnings introduced in a51dbb4a4de014238ab67ba507c 2018-11-channelerror
Matt Corallo [Tue, 20 Nov 2018 21:34:40 +0000 (16:34 -0500)]
Fix two compiler warnings introduced in a51dbb4a4de014238ab67ba507c

6 years agoMove a ton of Channel functions to ChannelError from HandleError
Matt Corallo [Tue, 30 Oct 2018 00:38:29 +0000 (20:38 -0400)]
Move a ton of Channel functions to ChannelError from HandleError

This is a big patch, but its all very mechanical, everything here
should be pretty obvious, and it all has to happen at once due to a
few common utility functions all having the same return type.

Note that this exposes a race in channel closure where we may
access a channel via some non-peer-specific mechanism like
forwarding an HTLC or sending a payment during the time between
the channel gave us a Close error and expected us to never call it
again and the time we actually removed it from the channel_state
set outside of the internal_* handler.

6 years agoCreate simple ChannelMonitor-specific Err type
Matt Corallo [Thu, 15 Nov 2018 12:47:07 +0000 (07:47 -0500)]
Create simple ChannelMonitor-specific Err type

6 years agoMerge pull request #231 from philipr-za/philip-204-check-commitment-transaction-fee
Matt Corallo [Tue, 20 Nov 2018 21:29:21 +0000 (16:29 -0500)]
Merge pull request #231 from philipr-za/philip-204-check-commitment-transaction-fee

Check funder can afford commitment transaction fee when receiving update_fee

6 years agoMerge pull request #230 from ariard/handle_sizeable_push_msat
Matt Corallo [Tue, 20 Nov 2018 20:51:27 +0000 (15:51 -0500)]
Merge pull request #230 from ariard/handle_sizeable_push_msat

Handle sizeable push msat (fix #195) + handle two first per_commitment_point + keys interface tests

6 years agoAdd test_static_output_closing_tx
Antoine Riard [Wed, 7 Nov 2018 00:41:45 +0000 (00:41 +0000)]
Add test_static_output_closing_tx

6 years agoAdd test_dynamic_spendable_outputs_local_htlc_*
Antoine Riard [Tue, 6 Nov 2018 03:24:07 +0000 (03:24 +0000)]
Add test_dynamic_spendable_outputs_local_htlc_*

Cover both local HTLC-Timeout/Success case

6 years agoAdd key_storage selection in ChannelMonitor insert_combine
Antoine Riard [Tue, 6 Nov 2018 03:23:22 +0000 (03:23 +0000)]
Add key_storage selection in ChannelMonitor insert_combine

Based on commitment_number

6 years agoAdd test_static_spendable_outputs_justice_tx_revoked_htlc*
Antoine Riard [Tue, 6 Nov 2018 00:43:06 +0000 (00:43 +0000)]
Add test_static_spendable_outputs_justice_tx_revoked_htlc*

Cover both HTLC-Timeout/Success cases

6 years agoAdd test_static_spendable_outputs_justice_tx_revoked_commitment_tx
Antoine Riard [Mon, 5 Nov 2018 02:17:33 +0000 (02:17 +0000)]
Add test_static_spendable_outputs_justice_tx_revoked_commitment_tx

6 years agoAdd test_claim_on_remote_sizeable_push_msat
Antoine Riard [Mon, 5 Nov 2018 01:31:49 +0000 (01:31 +0000)]
Add test_claim_on_remote_sizeable_push_msat

Contrary to sizeable push_msat on local
commitment tx, the output go to a P2WPKH

6 years agoAdd check_spend_closing_transaction ChannelMonitor
Antoine Riard [Sat, 17 Nov 2018 01:52:33 +0000 (20:52 -0500)]
Add check_spend_closing_transaction ChannelMonitor

Aims to send back closing output descriptor to user wallet

6 years agoAdd test_static_spendable_outputs_preimage_tx
Antoine Riard [Thu, 1 Nov 2018 03:22:56 +0000 (03:22 +0000)]
Add test_static_spendable_outputs_preimage_tx

Aims to covered both keysinterace preimage tx case and
detection of second remote commitment tx

Split DynamicDescriptor between *P2WSH and *P2WKH

6 years agoEnsure fuzz release builds use codegen-units=1 and LTO 2018-11-fuzz-crash-redux
Matt Corallo [Sun, 18 Nov 2018 20:34:13 +0000 (15:34 -0500)]
Ensure fuzz release builds use codegen-units=1 and LTO

6 years agoDon't unwrap() get_channel_update result in HTLC router
Matt Corallo [Sun, 18 Nov 2018 21:15:08 +0000 (16:15 -0500)]
Don't unwrap() get_channel_update result in HTLC router

This fixes a bug in 78232f2aeded08b32fa4ebfeb0b77d80b337518d found
by fuzzer - if the channel isn't yet fully established we will call
get_channel_update(), get an Err result, and then unwrap() it. If
this actually happens it means someone on the network is making up
short_channel_ids and trying to route over them, but that shouldn't
result in us crashing

6 years agoFix pre-noise peer disconnect panic on non-Err disconnect
Matt Corallo [Thu, 8 Nov 2018 00:06:34 +0000 (10:36 +1030)]
Fix pre-noise peer disconnect panic on non-Err disconnect

366e79615b7251771465d6c69c2941ac233674da fixed the same crash for
Errs that come up during handshake, but was incomplete and should
have just dropped the node_id being different based on
inbound/outbound. This patch does so and actually fixes the issue.

Found by fuzzer.

6 years agoMerge pull request #253 from TheBlueMatt/2018-11-misc-tweaks
Matt Corallo [Fri, 16 Nov 2018 16:47:50 +0000 (11:47 -0500)]
Merge pull request #253 from TheBlueMatt/2018-11-misc-tweaks

Misc Tweaks

6 years agoSplit provide_their_next_commitment_point from provide_secret
Antoine Riard [Thu, 1 Nov 2018 03:19:37 +0000 (03:19 +0000)]
Split provide_their_next_commitment_point from provide_secret

We needed it to be able to track remote_per_commitment_point
after channel opening and funds locking

6 years agoAdd test_claim_sizeable_push_msat
Antoine Riard [Wed, 31 Oct 2018 02:51:25 +0000 (02:51 +0000)]
Add test_claim_sizeable_push_msat

Aims to cover both claiming of sizeable_push_msat and
spendable output generation for to_local output

6 years agoAdd TxOut in DynamicOutput
Antoine Riard [Sun, 11 Nov 2018 20:59:03 +0000 (15:59 -0500)]
Add TxOut in DynamicOutput

6 years agoTrack local_commitment_tx at funding_created
Antoine Riard [Wed, 31 Oct 2018 02:49:19 +0000 (02:49 +0000)]
Track local_commitment_tx at funding_created

Goal to claim sizeable push_msat and in event of
local commitment tx being broadcast without htlcs

6 years agoImplement spendable output to_local output on local commitment tx
Antoine Riard [Wed, 31 Oct 2018 02:45:50 +0000 (02:45 +0000)]
Implement spendable output to_local output on local commitment tx

6 years agoMerge pull request #249 from stevenroose/bitcoin-0.15
Matt Corallo [Thu, 15 Nov 2018 17:37:44 +0000 (06:37 +1300)]
Merge pull request #249 from stevenroose/bitcoin-0.15

Update to rust-bitcoin v0.15

6 years agoPanic if funding transaction has non-witness inputs 2018-11-misc-tweaks
Matt Corallo [Sun, 4 Nov 2018 01:56:54 +0000 (12:56 +1100)]
Panic if funding transaction has non-witness inputs

6 years agoClarify get_update_*_htlc docs and tweak one case slightly
Matt Corallo [Sun, 4 Nov 2018 08:35:37 +0000 (19:35 +1100)]
Clarify get_update_*_htlc docs and tweak one case slightly

6 years agoExpand test_funding_peer_disconnect somewhat by being non-symmetric
Matt Corallo [Sat, 3 Nov 2018 03:52:44 +0000 (23:52 -0400)]
Expand test_funding_peer_disconnect somewhat by being non-symmetric

I thought I found a bug in one-side-funded-first reconnect, but
seems I can't reproduce it here. Either way worth improving the
test coverage.

6 years agoCheck affordability of new fee during update_fee call #204
Philip Robinson [Tue, 30 Oct 2018 12:31:57 +0000 (14:31 +0200)]
Check affordability of new fee during update_fee call #204

6 years agoUpdate to rust-bitcoin v0.15
Steven Roose [Sun, 11 Nov 2018 22:40:01 +0000 (22:40 +0000)]
Update to rust-bitcoin v0.15

6 years agoMerge pull request #248 from TheBlueMatt/2018-11-monitor-test-split
Matt Corallo [Tue, 13 Nov 2018 22:50:54 +0000 (09:20 +1030)]
Merge pull request #248 from TheBlueMatt/2018-11-monitor-test-split

Split up channel_monitor_network_test a little bit

6 years agoMerge pull request #247 from TheBlueMatt/2018-11-202-redux
Matt Corallo [Tue, 13 Nov 2018 20:48:40 +0000 (07:18 +1030)]
Merge pull request #247 from TheBlueMatt/2018-11-202-redux

Handle-initial_routing_sync-requests-from-peers-in-their-Init-messages

6 years agoSplit up channel_monitor_network_test a little bit 2018-11-monitor-test-split
Matt Corallo [Fri, 9 Nov 2018 04:31:53 +0000 (15:01 +1030)]
Split up channel_monitor_network_test a little bit

6 years agoHandle-initial_routing_sync-requests-from-peers-in-their-Init-messages 2018-11-202-redux
Schalk van Heerden [Tue, 2 Oct 2018 14:02:17 +0000 (16:02 +0200)]
Handle-initial_routing_sync-requests-from-peers-in-their-Init-messages

6 years agoAdd test justice tx on revoked htlc_success
Antoine Riard [Thu, 8 Nov 2018 02:21:28 +0000 (02:21 +0000)]
Add test justice tx on revoked htlc_success

Extend channel_monitor_network_test to cover
all check_spend_remote_htlc cases

6 years agoMerge pull request #242 from yuntai/201811-malformed
Matt Corallo [Mon, 5 Nov 2018 21:14:34 +0000 (16:14 -0500)]
Merge pull request #242 from yuntai/201811-malformed

Fail channel when BADONION is not set

6 years agofail channel when BADONION is not set.
Yuntai Kyong [Mon, 5 Nov 2018 12:10:17 +0000 (21:10 +0900)]
fail channel when BADONION is not set.

6 years agoMerge pull request #241 from TheBlueMatt/2018-10-peer-free-panic
Matt Corallo [Sat, 3 Nov 2018 03:59:59 +0000 (23:59 -0400)]
Merge pull request #241 from TheBlueMatt/2018-10-peer-free-panic

Fix pre-noise outbound peer disconnect panic found by fuzzer

6 years agoMerge pull request #233 from TheBlueMatt/2018-10-shutdown-updates
Matt Corallo [Sat, 3 Nov 2018 03:07:54 +0000 (23:07 -0400)]
Merge pull request #233 from TheBlueMatt/2018-10-shutdown-updates

Shutdown Updates

6 years agoTest the various shutdown handling updates 2018-10-shutdown-updates
Matt Corallo [Fri, 2 Nov 2018 01:45:59 +0000 (21:45 -0400)]
Test the various shutdown handling updates

6 years agoRebroadcast shutdown on channel_reestablish (and reprocess them)
Matt Corallo [Thu, 1 Nov 2018 21:17:28 +0000 (17:17 -0400)]
Rebroadcast shutdown on channel_reestablish (and reprocess them)

6 years agoDelay closing_signed until update_fee exchanges complete
Matt Corallo [Thu, 1 Nov 2018 21:12:20 +0000 (17:12 -0400)]
Delay closing_signed until update_fee exchanges complete

See https://github.com/lightningnetwork/lightning-rfc/issues/499
for a bit more about the ambiguity we're addressing here.

Also drop holding cell update_fee the same way we drop holding
cell update_add_htlcs when sending shutdown, resolving a bug.

6 years agoFail incoming HTLCs sent after we start shutdown, not the chan
Matt Corallo [Wed, 31 Oct 2018 01:47:56 +0000 (21:47 -0400)]
Fail incoming HTLCs sent after we start shutdown, not the chan

6 years agoAvoid double-panic in full_stack_target to assist debugging 2018-10-peer-free-panic
Matt Corallo [Fri, 2 Nov 2018 14:54:25 +0000 (10:54 -0400)]
Avoid double-panic in full_stack_target to assist debugging

6 years agoFix pre-noise outbound peer disconnect panic found by fuzzer
Matt Corallo [Fri, 2 Nov 2018 14:50:32 +0000 (10:50 -0400)]
Fix pre-noise outbound peer disconnect panic found by fuzzer

If we make an outbound connection to a peer who we are already
connected to, and the outbound connection fails
pre-noise-completion, we will remove the original peer connection
from our node_id_to_descriptor map.

The fuzzer managed to find this by crashing in Channel's assertions
that we don't do a get_channel_reestablish() when the Channel isn't
already marked disconnected.

6 years agoAdd logging for (dis)connect in peer_handler/channelmanager
Matt Corallo [Fri, 2 Nov 2018 14:45:29 +0000 (10:45 -0400)]
Add logging for (dis)connect in peer_handler/channelmanager

6 years agoSend closing_signed when appropriate as pending HTLCs clear
Matt Corallo [Tue, 30 Oct 2018 20:25:38 +0000 (16:25 -0400)]
Send closing_signed when appropriate as pending HTLCs clear

6 years agoAlways send Shutdown resposnes to Shutdown messages
Matt Corallo [Tue, 30 Oct 2018 19:53:34 +0000 (15:53 -0400)]
Always send Shutdown resposnes to Shutdown messages

We always require that any changes to Channel state be committed
immediately (within the same lock) so we should never have
uncommitted changes which would prevent us from sending a Shutdown
response.

6 years agoRefactor out first-closing-sent creation
Matt Corallo [Tue, 30 Oct 2018 18:39:20 +0000 (14:39 -0400)]
Refactor out first-closing-sent creation

6 years agoUse ChannelError in shutdown handling, clean up, impl err actions
Matt Corallo [Mon, 29 Oct 2018 21:38:16 +0000 (17:38 -0400)]
Use ChannelError in shutdown handling, clean up, impl err actions

6 years agoAdd warnings reminding users to use SegWit funding inputs
Matt Corallo [Tue, 30 Oct 2018 00:21:47 +0000 (20:21 -0400)]
Add warnings reminding users to use SegWit funding inputs

6 years agoMerge pull request #235 from TheBlueMatt/2018-10-229-redux
Matt Corallo [Thu, 1 Nov 2018 02:44:16 +0000 (22:44 -0400)]
Merge pull request #235 from TheBlueMatt/2018-10-229-redux

Bug fix using same seed sequence for channel key geneartion

6 years agoBug fix using same seed sequence for channel key geneartion 2018-10-229-redux
Yuntai Kyong [Sun, 28 Oct 2018 05:35:49 +0000 (14:35 +0900)]
Bug fix using same seed sequence for channel key geneartion

6 years agoMerge pull request #234 from TheBlueMatt/2018-10-169-redux
Matt Corallo [Wed, 31 Oct 2018 20:25:29 +0000 (16:25 -0400)]
Merge pull request #234 from TheBlueMatt/2018-10-169-redux

169 Tweaked

6 years agoAdded config interface to allow users to specify channel limits 2018-10-169-redux
Schalk van Heerden [Wed, 31 Oct 2018 18:51:39 +0000 (14:51 -0400)]
Added config interface to allow users to specify channel limits

6 years agoRequire at least 1k sat for outbound channels and meet BTC's dust
Matt Corallo [Wed, 31 Oct 2018 18:45:29 +0000 (14:45 -0400)]
Require at least 1k sat for outbound channels and meet BTC's dust

6 years agoUse non-funder's funding block wait instead of max with ours
Matt Corallo [Wed, 31 Oct 2018 18:38:07 +0000 (14:38 -0400)]
Use non-funder's funding block wait instead of max with ours

This is both required by the protocol and also makes sense - if
we're the funder we don't mind accepting payment on the channel
after one confirmation because we assume we won't double-spend
ourselves.

6 years agoMerge pull request #232 from TheBlueMatt/master
Matt Corallo [Wed, 31 Oct 2018 19:05:19 +0000 (15:05 -0400)]
Merge pull request #232 from TheBlueMatt/master

Fix a full_stack_target crash

6 years ago[full_stack_target] don't allow double-confirming txn
Matt Corallo [Mon, 29 Oct 2018 18:24:21 +0000 (14:24 -0400)]
[full_stack_target] don't allow double-confirming txn

6 years agoGive ManyChannelMonitor a logger and trace add_update events
Matt Corallo [Mon, 29 Oct 2018 17:38:15 +0000 (13:38 -0400)]
Give ManyChannelMonitor a logger and trace add_update events

6 years agoMerge pull request #226 from TheBlueMatt/2018-10-0.0.6
Matt Corallo [Sat, 27 Oct 2018 14:49:05 +0000 (10:49 -0400)]
Merge pull request #226 from TheBlueMatt/2018-10-0.0.6

Bump version to 0.0.6

6 years agoMerge pull request #223 from TheBlueMatt/2018-10-chanmanager-serialize
Matt Corallo [Sat, 27 Oct 2018 14:46:12 +0000 (10:46 -0400)]
Merge pull request #223 from TheBlueMatt/2018-10-chanmanager-serialize

Implement and document Channel/ChannelManager (de)serialization

6 years agoMerge pull request #222 from TheBlueMatt/2018-10-pre-commit-disconnect
Matt Corallo [Sat, 27 Oct 2018 14:46:04 +0000 (10:46 -0400)]
Merge pull request #222 from TheBlueMatt/2018-10-pre-commit-disconnect

Fix and test update_add_htlc but disconnect pre-commitment_signed

6 years agoMerge pull request #217 from TheBlueMatt/2018-10-msg-resp-overhaul
Matt Corallo [Sat, 27 Oct 2018 14:45:53 +0000 (10:45 -0400)]
Merge pull request #217 from TheBlueMatt/2018-10-msg-resp-overhaul

Send ChannelManager messages out-of-band to ensure ordered delivery

6 years agoMerge pull request #225 from TheBlueMatt/2018-10-214-redo
Matt Corallo [Sat, 27 Oct 2018 14:45:43 +0000 (10:45 -0400)]
Merge pull request #225 from TheBlueMatt/2018-10-214-redo

Keys Interface Simplification

6 years agoBump version to 0.0.6 2018-10-0.0.6
Matt Corallo [Fri, 26 Oct 2018 21:24:46 +0000 (17:24 -0400)]
Bump version to 0.0.6

6 years agoAdd very basic test of ChannelManager serialization round-trip 2018-10-chanmanager-serialize
Matt Corallo [Fri, 26 Oct 2018 18:39:14 +0000 (14:39 -0400)]
Add very basic test of ChannelManager serialization round-trip

6 years agofix broken state comparison (thanks @yuntai!)
Matt Corallo [Sat, 27 Oct 2018 05:45:15 +0000 (01:45 -0400)]
fix broken state comparison (thanks @yuntai!)

6 years agoImplement and document Channel/ChannelManager (de)serialization
Matt Corallo [Fri, 26 Oct 2018 18:35:50 +0000 (14:35 -0400)]
Implement and document Channel/ChannelManager (de)serialization

6 years agoFix + test disconnect/reconnect prior to FundingLocked
Matt Corallo [Fri, 26 Oct 2018 20:46:46 +0000 (16:46 -0400)]
Fix + test disconnect/reconnect prior to FundingLocked

6 years agoFix and test update_add_htlc but disconnect pre-commitment_signed 2018-10-pre-commit-disconnect
Matt Corallo [Sat, 20 Oct 2018 22:48:14 +0000 (18:48 -0400)]
Fix and test update_add_htlc but disconnect pre-commitment_signed

6 years agoAvoid reentrancy of send_data from PeerHandler::read_bytes. 2018-10-msg-resp-overhaul
Matt Corallo [Sat, 20 Oct 2018 22:17:19 +0000 (18:17 -0400)]
Avoid reentrancy of send_data from PeerHandler::read_bytes.

This greatly simplifies clients of PeerHandler, and because almost
all response messages have already been moved to process_events
this doesn't change much effeciency-wise.

6 years agoIntegrate destination_script from KeysInterface in ChannelManager/Channel 2018-10-214-redo
Antoine Riard [Fri, 26 Oct 2018 17:41:07 +0000 (13:41 -0400)]
Integrate destination_script from KeysInterface in ChannelManager/Channel

Drop channel_monitor_claim_key from ChannelKeys

6 years agoStore+expose bits of Channel[Monitor] to figure out local state
Matt Corallo [Thu, 25 Oct 2018 16:56:02 +0000 (12:56 -0400)]
Store+expose bits of Channel[Monitor] to figure out local state

6 years agoSend channel_reestablish out-of-band to ensure ordered deliver
Matt Corallo [Sat, 20 Oct 2018 21:50:34 +0000 (17:50 -0400)]
Send channel_reestablish out-of-band to ensure ordered deliver

6 years agoIntegrate shutdown_pubkey from KeysInterface in ChannelManager/Channel
Antoine Riard [Fri, 26 Oct 2018 17:35:57 +0000 (13:35 -0400)]
Integrate shutdown_pubkey from KeysInterface in ChannelManager/Channel

Drop channel_close_key from ChannelKeys

6 years agoTrack ChannelMonitor-watched-outpoints (+ remove now-uesless Mutex)
Matt Corallo [Wed, 24 Oct 2018 17:59:03 +0000 (13:59 -0400)]
Track ChannelMonitor-watched-outpoints (+ remove now-uesless Mutex)

6 years agoRespond to channel_reestablish out-of-band for ordered delivery
Matt Corallo [Sat, 20 Oct 2018 21:18:53 +0000 (17:18 -0400)]
Respond to channel_reestablish out-of-band for ordered delivery

6 years agoIntegrate KeysInterface to ChannelManager with Arc
Antoine Riard [Fri, 26 Oct 2018 15:40:01 +0000 (11:40 -0400)]
Integrate KeysInterface to ChannelManager with Arc

6 years agoTrack last_block_hash in ChannelMonitor and expose it on deser
Matt Corallo [Wed, 24 Oct 2018 15:14:12 +0000 (11:14 -0400)]
Track last_block_hash in ChannelMonitor and expose it on deser

Also make block_connected take a &mut self to ensure serialized
state will always be self-consistent.

6 years agoSend RAA/CS messages out-of-band to ensure ordered delivery
Matt Corallo [Sat, 20 Oct 2018 16:56:42 +0000 (12:56 -0400)]
Send RAA/CS messages out-of-band to ensure ordered delivery

6 years agoImplement KeysInterface for KeysManager util
Antoine Riard [Fri, 26 Oct 2018 15:21:33 +0000 (11:21 -0400)]
Implement KeysInterface for KeysManager util

6 years agoRedo ChannelMonitor deserialization to avoid read_to_end()
Matt Corallo [Wed, 24 Oct 2018 14:34:16 +0000 (10:34 -0400)]
Redo ChannelMonitor deserialization to avoid read_to_end()

This slightly changes the serialization format, but we're still
early enough that that's OK.

6 years agoSend shutdown/closing_signed msgs out-of-band for ordered delivery
Matt Corallo [Sat, 20 Oct 2018 01:50:16 +0000 (21:50 -0400)]
Send shutdown/closing_signed msgs out-of-band for ordered delivery

6 years agoimpl some additional (de)serializers, including a u48 wrapper type
Matt Corallo [Wed, 24 Oct 2018 14:33:42 +0000 (10:33 -0400)]
impl some additional (de)serializers, including a u48 wrapper type

6 years agoSend announcement_signatures msgs out-of-band for ordered delivery
Matt Corallo [Fri, 19 Oct 2018 21:30:52 +0000 (17:30 -0400)]
Send announcement_signatures msgs out-of-band for ordered delivery

6 years agoimpl Readable/Writable for Route
Matt Corallo [Fri, 19 Oct 2018 01:34:41 +0000 (21:34 -0400)]
impl Readable/Writable for Route

6 years agoSend funding_signed messages out-of-band to ensure ordered delivery
Matt Corallo [Fri, 19 Oct 2018 21:06:40 +0000 (17:06 -0400)]
Send funding_signed messages out-of-band to ensure ordered delivery

6 years agoAdd a BIG lock to ChannelManager
Matt Corallo [Sat, 20 Oct 2018 22:46:03 +0000 (18:46 -0400)]
Add a BIG lock to ChannelManager

During normal operation we should never need to take this, so we
use a RwLock that allows normal parallelism until we want to
serialize out our ChannelManager, at which point we can take the
write-mode lock.