]>
git.bitcoin.ninja Git - rust-lightning/log
Matt Corallo [Fri, 22 Mar 2019 21:16:08 +0000 (17:16 -0400)]
Merge pull request #314 from TheBlueMatt/2019-03-chan-cleanup
Two simple Channel cleanups
Matt Corallo [Thu, 7 Mar 2019 18:31:02 +0000 (13:31 -0500)]
Merge pull request #318 from tamasblummer/rbitcoin017
migration to rust-bitcoin 0.17
Tamas Blummer [Mon, 4 Mar 2019 17:02:02 +0000 (18:02 +0100)]
migration to rust-bitcoin 0.17
typedef Sha256dHash with bitcoin_hashes::sha256d::Hash
SecretKey -> PrivateKey.key
assume compressed public keys
Matt Corallo [Sun, 3 Mar 2019 18:01:55 +0000 (13:01 -0500)]
Add a useful log_trace before we release holding cell.
Matt Corallo [Sun, 3 Mar 2019 19:02:51 +0000 (14:02 -0500)]
Move fail_reason into OutboundHTLCState states
This should probably have happened when we moved most state into
the state enums themselves, but specifically forcing awareness of
the removed/not removed state would have prevented me from
introducing a bug in the first version of an upcoming reserve-value
patch.
Matt Corallo [Fri, 1 Mar 2019 22:38:23 +0000 (17:38 -0500)]
Merge pull request #313 from ariard/2019-02-clarify-test-full-stack-target
Clarify a bit full_stack_target test_no_existing_test_breakage
Matt Corallo [Fri, 1 Mar 2019 22:37:17 +0000 (17:37 -0500)]
Merge pull request #292 from ariard/2019-12-serialization-test
[Ready for Review] Add msgs serialization tests
Antoine Riard [Thu, 28 Feb 2019 01:05:18 +0000 (20:05 -0500)]
Clarify a bit full_stack_target test_no_existing_test_breakage
Matt Corallo [Sun, 24 Feb 2019 19:27:19 +0000 (14:27 -0500)]
Merge pull request #308 from dongcarl/2019-02-reformulate-unknown-bits-calculation
msgs: Reformulate unknown bits calculation w/ any
Matt Corallo [Sun, 24 Feb 2019 19:25:58 +0000 (14:25 -0500)]
Merge pull request #307 from dongcarl/2019-02-derive-partialeq
util: Derive PartialEq for Level
Antoine Riard [Sun, 27 Jan 2019 02:52:38 +0000 (21:52 -0500)]
Add bolt1 msgs serialization tests
Antoine Riard [Thu, 14 Feb 2019 01:13:03 +0000 (20:13 -0500)]
Add bolt2 msgs serialization tests
Antoine Riard [Sun, 20 Jan 2019 03:39:29 +0000 (22:39 -0500)]
Add bolt7 msgs serialization tests
Matt Corallo [Mon, 11 Feb 2019 20:17:52 +0000 (15:17 -0500)]
Merge pull request #309 from TheBlueMatt/2019-02-306-nits
Explicit tests for update_*_htlc message BOLT2 requirements
Matt Corallo [Mon, 11 Feb 2019 17:07:37 +0000 (12:07 -0500)]
Fix uneccessary mut found by 1.22
Philip Robinson [Wed, 23 Jan 2019 12:52:10 +0000 (14:52 +0200)]
Explicit tests for update_*_htlc message BOLT2 requirements
Carl Dong [Thu, 7 Feb 2019 18:16:17 +0000 (13:16 -0500)]
msgs: Reformulate unknown bits calculation w/ any
Carl Dong [Thu, 7 Feb 2019 18:08:21 +0000 (13:08 -0500)]
util: Derive PartialEq for Level
PartialEq, Eq, and Hash should all be derived together wherever possible
to not violate Hash invariants. See the documentation for
std::hash::Hash for more details.
Matt Corallo [Fri, 25 Jan 2019 18:09:38 +0000 (13:09 -0500)]
Merge pull request #304 from TheBlueMatt/2019-01-bump-08
Bump version to 0.0.8
Matt Corallo [Fri, 25 Jan 2019 18:09:05 +0000 (13:09 -0500)]
Merge pull request #303 from TheBlueMatt/2019-01-log-more
Add a bunch of additional logging
Matt Corallo [Fri, 25 Jan 2019 17:04:58 +0000 (12:04 -0500)]
Bump version to 0.0.8
Matt Corallo [Tue, 15 Jan 2019 01:37:06 +0000 (20:37 -0500)]
Log information about channel freeze/restore from monitor updates
Matt Corallo [Tue, 15 Jan 2019 01:36:45 +0000 (20:36 -0500)]
log_trace HTLC changes in Channel::get_update_fulfill_htlc
Matt Corallo [Mon, 14 Jan 2019 22:33:43 +0000 (17:33 -0500)]
log_trace HTLC transitions in RAA handling (best reviewed with -b)
Matt Corallo [Tue, 8 Jan 2019 21:20:24 +0000 (16:20 -0500)]
log_trace information about commitment txn as they're being built
Matt Corallo [Fri, 25 Jan 2019 17:02:02 +0000 (12:02 -0500)]
Merge pull request #302 from TheBlueMatt/2019-01-hashes03
Bump bitcoin_hashes to 0.3
Matt Corallo [Fri, 25 Jan 2019 17:01:44 +0000 (12:01 -0500)]
Merge pull request #297 from TheBlueMatt/2019-01-back-fail-privacy
Send back the actual received amount, not expected on HTLC fails
Matt Corallo [Fri, 25 Jan 2019 17:01:19 +0000 (12:01 -0500)]
Merge pull request #290 from TheBlueMatt/2019-01-monitor-update-handle-fuzz
Handle monitor update failures in two more places + new fuzz test
Matt Corallo [Fri, 25 Jan 2019 03:28:17 +0000 (22:28 -0500)]
Bump bitcoin_hashes to 0.3
Matt Corallo [Fri, 25 Jan 2019 03:27:52 +0000 (22:27 -0500)]
Merge pull request #295 from TheBlueMatt/2019-01-holding-cell-limits
Fix holding cell freeing in case we fail to add some HTLC
Matt Corallo [Mon, 21 Jan 2019 16:44:59 +0000 (11:44 -0500)]
Fix holding cell freeing in case we fail to add some HTLC
Previously, if we went to free the holding cell HTLC updates, and
adding one failed as we hit our outbound HTLC limit (or in-flight
value limit), we would not send a commitment_signed, leaving us in
an invalid state. We first fix that bug, and then refuse to add
things to our holding cell once we reach our limits considering the
holding cell, as we shouldn't have multiple commitment dance rounds
worth of HTLCs in the holding cell anyway.
Matt Corallo [Tue, 22 Jan 2019 20:49:29 +0000 (15:49 -0500)]
Send back the actual received amount, not expected on HTLC fails
This resolves an incorrect implementation of the spec and fixes a
major privacy leak.
Fixes GH #289.
Matt Corallo [Mon, 7 Jan 2019 22:17:36 +0000 (17:17 -0500)]
Add a fuzz target to test monitor update failure handling
Sadly this requires reducing the honggfuzz iterations to fit within
Travis' runtime limits.
Matt Corallo [Tue, 8 Jan 2019 20:06:43 +0000 (15:06 -0500)]
Take the logger from test_utils into fuzz::test_utils
Matt Corallo [Tue, 8 Jan 2019 04:13:11 +0000 (23:13 -0500)]
Expose CommitmentUpdate contents
This is an oversight as the MessageSendEvent is otherwise entirely
useless.
Matt Corallo [Tue, 8 Jan 2019 04:11:37 +0000 (23:11 -0500)]
Drop pending outbound messages on peer disconnection
This shouldn't be required, but it may help prevent some downstream
race conditions due to clients not sending message events quickly
enough and trying to send stale messages before new
channel_reestablish messages.
Matt Corallo [Tue, 15 Jan 2019 01:35:56 +0000 (20:35 -0500)]
Handle monitor update failures in two more places
Best reviewed with -b
Matt Corallo [Thu, 24 Jan 2019 18:16:33 +0000 (13:16 -0500)]
Merge pull request #288 from TheBlueMatt/2019-01-test-split-raa-flag-fix
Fix several more monitor-update-failed cases
Matt Corallo [Thu, 24 Jan 2019 18:12:28 +0000 (13:12 -0500)]
Merge pull request #301 from rex4539/fix-typos
Fix typos
Dimitris Apostolou [Thu, 24 Jan 2019 14:41:51 +0000 (16:41 +0200)]
Fix typos
Matt Corallo [Mon, 14 Jan 2019 22:24:52 +0000 (17:24 -0500)]
Fix responding to RAAs when monitor updating had already failed
Matt Corallo [Fri, 18 Jan 2019 16:54:19 +0000 (11:54 -0500)]
Remove incorrect debug_assert!() from reestablish handling and test
Matt Corallo [Thu, 17 Jan 2019 22:10:58 +0000 (17:10 -0500)]
Add a test for the ordering setting in channel_reestablish handling
Matt Corallo [Fri, 11 Jan 2019 18:08:56 +0000 (13:08 -0500)]
Fix AwaitingRAA on RAA receipt when monitor updating had failed
This fixes a rather subtle case handling RAAs when we don't
generate a response due to a previous monitor update failure, but
would otherwise send a CS response. We need to still set
AwaitingRemoteRevoke on the channl in question, but previously did
not. Found by chanmon_fail_consistency fuzz test with the failing
test converted and added manually.
Matt Corallo [Wed, 23 Jan 2019 22:43:13 +0000 (17:43 -0500)]
Merge pull request #300 from TheBlueMatt/2019-01-tests-split
Split up functional_tests into three separate files
Matt Corallo [Wed, 23 Jan 2019 22:06:38 +0000 (17:06 -0500)]
Fix indentation in a few new tests
Matt Corallo [Mon, 21 Jan 2019 17:25:57 +0000 (12:25 -0500)]
Fix spelling in do_test_monitor_temporary_update_fail comment
Matt Corallo [Wed, 23 Jan 2019 21:54:01 +0000 (16:54 -0500)]
Split up monitor-update-failed tests and other functional tests
Matt Corallo [Wed, 23 Jan 2019 21:46:44 +0000 (16:46 -0500)]
Split up functional_tests into utils and the tests themselves
Matt Corallo [Wed, 23 Jan 2019 21:15:09 +0000 (16:15 -0500)]
Merge pull request #299 from TheBlueMatt/2019-01-262-redux
Added tests to check the bolt 2 specs for open_channel (Sending Node)
Yuko Roodt [Fri, 30 Nov 2018 09:51:37 +0000 (11:51 +0200)]
Added tests to check the bolt 2 specs for Sending Node Channel
Matt Corallo [Wed, 23 Jan 2019 19:48:13 +0000 (14:48 -0500)]
Merge pull request #298 from TheBlueMatt/2019-01-271-cleanup
Implement serialize/deserialize for Router
Antoine Riard [Sun, 16 Dec 2018 03:10:47 +0000 (22:10 -0500)]
Implement serialize/deserialize for Router.
Extend route_test to check if serialize/deserialize of
NetworkMap works.
Add PartialEq traits on some Router's structs.
Modify also UnsignedNodeAnnouncement serialization
Antoine Riard [Wed, 23 Jan 2019 16:26:32 +0000 (11:26 -0500)]
Implement Writeable/Readable for Option<T>
Add OptionalField in OpenChannel, AcceptChannel
ChannelReestablish to avoid serialization implementation
conflicts
Matt Corallo [Tue, 22 Jan 2019 20:27:23 +0000 (15:27 -0500)]
Merge pull request #286 from TheBlueMatt/2019-01-monitor-update-fixes
Fix a few monitor-update failure bugs found by new fuzzer
Matt Corallo [Wed, 9 Jan 2019 16:05:53 +0000 (11:05 -0500)]
Fix handling RAA when a monitor update previously failed
Matt Corallo [Tue, 8 Jan 2019 04:10:51 +0000 (23:10 -0500)]
Rewrite monitor_update_failed as it didn't capture all the options
Primarily this fixes the case where we receive an RAA which does
not require a response, allowing us to call monitor_update_failed
without generating pending messages.
Matt Corallo [Tue, 8 Jan 2019 16:32:17 +0000 (11:32 -0500)]
Remove unused argument from handle_error!
Matt Corallo [Tue, 22 Jan 2019 19:32:24 +0000 (14:32 -0500)]
Merge pull request #294 from TheBlueMatt/2019-01-deps-bump
Upgrade to secp256k1 v12, bitcoin v16, and crates bitcoin_hashes
Matt Corallo [Thu, 17 Jan 2019 22:36:49 +0000 (17:36 -0500)]
Ensure Message always unwraps in fuzztarget
Hashes cant be all-0s, so we can normally unwrap, but fuzztarget
can generate all-0 hashes, so we have to handle it and swap for
something else.
Matt Corallo [Wed, 16 Jan 2019 20:45:28 +0000 (15:45 -0500)]
Drop verification context from keys manager
Matt Corallo [Wed, 16 Jan 2019 20:45:05 +0000 (15:45 -0500)]
Upgrade to secp256k1 v12, bitcoin v16, and crates bitcoin_hashes
Matt Corallo [Tue, 22 Jan 2019 18:48:31 +0000 (13:48 -0500)]
Merge pull request #203 from TheBlueMatt/2018-10-router-htlc-min
Fix Router min HTLC comparison
Matt Corallo [Tue, 22 Jan 2019 18:16:45 +0000 (13:16 -0500)]
Merge pull request #296 from TheBlueMatt/2019-01-291-rebased
Wrote test to explicitly test BOLT 2 requirements for update_add_htlc
Matt Corallo [Tue, 2 Oct 2018 17:46:03 +0000 (13:46 -0400)]
Fix Router min HTLC comparison
Philip Robinson [Tue, 15 Jan 2019 09:52:02 +0000 (11:52 +0200)]
Wrote test to explicitly test BOLT 2 requirements for update_add_htlc
(minor tweaks by @TheBlueMatt)
Matt Corallo [Wed, 16 Jan 2019 15:11:32 +0000 (10:11 -0500)]
Merge pull request #285 from TheBlueMatt/2019-01-fuzz-cleanups
Trivial cleanups in full_stack_target/fuzztarget
Matt Corallo [Sun, 13 Jan 2019 18:55:26 +0000 (13:55 -0500)]
Merge pull request #284 from TheBlueMatt/2019-01-remote-htlc-timeout-broadcast
Check for timing-out HTLCs in remote unrevoked commitments
Matt Corallo [Fri, 11 Jan 2019 21:31:30 +0000 (16:31 -0500)]
Fix comment spelling and clarify algebra a bit.
Matt Corallo [Fri, 4 Jan 2019 19:38:05 +0000 (14:38 -0500)]
Check for timing-out HTLCs in remote unrevoked commitments
This resolves a TODO/issue in would_broadcast_at_height where we
will not fail a channel with HTLCs which time out in remote
broadcastable transactions.
Matt Corallo [Mon, 7 Jan 2019 04:00:56 +0000 (23:00 -0500)]
Test for failing channel after local commitment dust HTLC timeout
Matt Corallo [Fri, 4 Jan 2019 19:37:48 +0000 (14:37 -0500)]
Merge tracking of HTLCs-in-commitment with outbound-HTLCs
This simplifies a few things, deduplicates a some small memory
overhead, and, most importantly, is a first step to fixing
would_broadcast_at_height.
Matt Corallo [Sun, 6 Jan 2019 22:02:53 +0000 (17:02 -0500)]
Make HTLCOutputInCommitment::transaction_output_index an Option
We really shouldn't have split out the with-source HTLCs from the
in-transaction HTLCs when we added back-failing, and will need
almost all of the info in HTLCOutputInCommitment for each HTLC to
fix would_broadcast_at_height, so this is a first step at
recombining them.
Matt Corallo [Wed, 9 Jan 2019 04:38:38 +0000 (23:38 -0500)]
Merge pull request #283 from TheBlueMatt/2019-01-htlc-resolution-log
Simplify and expand logging in is_resolving_htlc_output
Matt Corallo [Wed, 9 Jan 2019 04:17:37 +0000 (23:17 -0500)]
Merge pull request #282 from TheBlueMatt/2019-01-multi-htlc-claims
Fix multi-remote-HTLC-claim preimage learning
Matt Corallo [Sun, 6 Jan 2019 22:01:29 +0000 (17:01 -0500)]
Simplify and expand logging in is_resolving_htlc_output
This clarifies all the conditions we can hit and also ensures they
are all logged in a clear and consistent manner.
Matt Corallo [Sun, 6 Jan 2019 20:14:43 +0000 (15:14 -0500)]
Fix multi-remote-HTLC-claim preimage learning
When our counterparty claims multiple HTLCs from offered outputs in
one transaction we should still be able to learn the preimages.
Sadly, due to two bugs we were not previously doing so.
Matt Corallo [Mon, 7 Jan 2019 17:58:36 +0000 (12:58 -0500)]
Fix source name in is_resolving_htlc_output
Matt Corallo [Tue, 8 Jan 2019 04:13:44 +0000 (23:13 -0500)]
Fix dead_code warnings in fuzztarget builds
Matt Corallo [Mon, 7 Jan 2019 21:08:08 +0000 (16:08 -0500)]
Switch to bitcoin_hashes Hash160 in full_stack_target
Matt Corallo [Tue, 8 Jan 2019 17:53:12 +0000 (12:53 -0500)]
Add doc to full_stack_target
Matt Corallo [Mon, 3 Dec 2018 18:56:44 +0000 (13:56 -0500)]
Add option to use libfuzzer sys in full_stack_target
Note that there doesn't appear to be a way to conditionally set
#[no_main] so that has to happen manually at compile-time.
Matt Corallo [Sat, 5 Jan 2019 22:07:40 +0000 (17:07 -0500)]
Merge pull request #280 from TheBlueMatt/2018-12-no-to-remote-revoked-htlcs
Move fail-backwards up for no to-remote output claims
Matt Corallo [Sat, 5 Jan 2019 21:18:09 +0000 (16:18 -0500)]
Fix stale comment in functional_tests after failing back async
Matt Corallo [Thu, 27 Dec 2018 19:12:11 +0000 (14:12 -0500)]
Macro-DRY HTLC back-fails for revoked remote transaction broadcast
Matt Corallo [Thu, 27 Dec 2018 18:55:40 +0000 (13:55 -0500)]
Add test_commitment_revoked_fail_backward_exhaustive no_to_remote
This tests a case we previously didn't handle correctly where we
returned early if there was no to_remote output to claim and thus
failed to fail-backwards HTLCs which were present.
Matt Corallo [Thu, 27 Dec 2018 18:53:58 +0000 (13:53 -0500)]
Add dust mode to test_commitment_revoked_fail_backward_exhaustive
This tests that we fail back HTLCs that don't make it into
commitment transactions the same as we test ones that do.
Matt Corallo [Sat, 5 Jan 2019 04:07:29 +0000 (23:07 -0500)]
Merge pull request #281 from ariard/harden-inbound-htlc-resolved
Harden test for logging of inbound htlc being resolved
Antoine Riard [Sun, 30 Dec 2018 19:21:58 +0000 (14:21 -0500)]
Log resolution of offered HTLC by HTLC-timeout tx
Matt Corallo [Fri, 21 Dec 2018 19:32:44 +0000 (14:32 -0500)]
Move fail-backwards up for no to-remote output claims
This fixes HTLC fail-backwards in case we haven't yet sent enough
to have a to_remote output to claim, plus some edge cases where it
could be removed due to a fee update, though hopefully that goes
away with simplified_commitment.
Matt Corallo [Tue, 1 Jan 2019 01:25:44 +0000 (20:25 -0500)]
Merge pull request #278 from TheBlueMatt/2018-12-fail-on-unrevoked-remote
Fail HTLC backwards on unrevoked remote commitment tx broadcast
Antoine Riard [Sun, 30 Dec 2018 19:10:01 +0000 (14:10 -0500)]
More comments/hardening test_fail_backwards_unrevoked_remote_announce
Matt Corallo [Fri, 21 Dec 2018 20:16:46 +0000 (15:16 -0500)]
Fail HTLC backwards on unrevoked remote commitment tx broadcast
Matt Corallo [Fri, 21 Dec 2018 20:15:56 +0000 (15:15 -0500)]
Macro-out BroadcastChannelUpdate-on-channel-close in func tests
Matt Corallo [Fri, 21 Dec 2018 18:40:51 +0000 (13:40 -0500)]
Log errors forwarding/failing HTLCs
Matt Corallo [Fri, 21 Dec 2018 03:51:06 +0000 (22:51 -0500)]
Remove long-stale TODO
Matt Corallo [Sat, 22 Dec 2018 12:02:41 +0000 (07:02 -0500)]
Merge pull request #276 from TheBlueMatt/2018-12-async-fail
Fail HTLCs backwards asynchronously
Matt Corallo [Fri, 21 Dec 2018 03:50:25 +0000 (22:50 -0500)]
Fail HTLCs backwards asynchronously
Matt Corallo [Thu, 20 Dec 2018 21:15:07 +0000 (16:15 -0500)]
Add an enum option to pending forwards to fail backwards
Matt Corallo [Thu, 20 Dec 2018 20:36:02 +0000 (15:36 -0500)]
Refactor HTLCForwardInfo into an enum in prep for delayed-fail