Antoine Riard
a6cd7def35
Add bolt2 msgs serialization tests
2019-02-13 20:23:25 -05:00
Antoine Riard
d8c2cc2cc4
Add bolt7 msgs serialization tests
2019-02-13 20:23:25 -05:00
Matt Corallo
fd26091d96
Merge pull request #309 from TheBlueMatt/2019-02-306-nits
...
Explicit tests for update_*_htlc message BOLT2 requirements
2019-02-11 15:17:52 -05:00
Matt Corallo
e354dc28bc
Fix uneccessary mut found by 1.22
2019-02-11 12:09:11 -05:00
Philip Robinson
1de117eb2a
Explicit tests for update_*_htlc message BOLT2 requirements
2019-02-11 12:09:07 -05:00
Matt Corallo
5764634568
Merge pull request #304 from TheBlueMatt/2019-01-bump-08
...
Bump version to 0.0.8
2019-01-25 13:09:38 -05:00
Matt Corallo
2950ffe54e
Merge pull request #303 from TheBlueMatt/2019-01-log-more
...
Add a bunch of additional logging
2019-01-25 13:09:05 -05:00
Matt Corallo
cfcecdbf11
Bump version to 0.0.8
2019-01-25 12:07:16 -05:00
Matt Corallo
5f4bb593b8
Log information about channel freeze/restore from monitor updates
2019-01-25 12:04:39 -05:00
Matt Corallo
e5fa4f270a
log_trace HTLC changes in Channel::get_update_fulfill_htlc
2019-01-25 12:04:39 -05:00
Matt Corallo
f0bcb7dba0
log_trace HTLC transitions in RAA handling (best reviewed with -b)
2019-01-25 12:04:39 -05:00
Matt Corallo
b2252fb1e4
log_trace information about commitment txn as they're being built
2019-01-25 12:04:39 -05:00
Matt Corallo
8845d53b33
Merge pull request #302 from TheBlueMatt/2019-01-hashes03
...
Bump bitcoin_hashes to 0.3
2019-01-25 12:02:02 -05:00
Matt Corallo
f99acc6d35
Merge pull request #297 from TheBlueMatt/2019-01-back-fail-privacy
...
Send back the actual received amount, not expected on HTLC fails
2019-01-25 12:01:44 -05:00
Matt Corallo
4ccb1e4932
Merge pull request #290 from TheBlueMatt/2019-01-monitor-update-handle-fuzz
...
Handle monitor update failures in two more places + new fuzz test
2019-01-25 12:01:19 -05:00
Matt Corallo
db07d6e30e
Bump bitcoin_hashes to 0.3
2019-01-24 22:29:10 -05:00
Matt Corallo
3117e1812b
Merge pull request #295 from TheBlueMatt/2019-01-holding-cell-limits
...
Fix holding cell freeing in case we fail to add some HTLC
2019-01-24 22:27:52 -05:00
Matt Corallo
bf26056c8a
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.
2019-01-24 21:53:49 -05:00
Matt Corallo
74588b2519
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 .
2019-01-24 16:55:01 -05:00
Matt Corallo
49d63302c3
Add a fuzz target to test monitor update failure handling
...
Sadly this requires reducing the honggfuzz iterations to fit within
Travis' runtime limits.
2019-01-24 13:17:00 -05:00
Matt Corallo
aa9a848f79
Take the logger from test_utils into fuzz::test_utils
2019-01-24 13:16:59 -05:00
Matt Corallo
9a72207a16
Expose CommitmentUpdate contents
...
This is an oversight as the MessageSendEvent is otherwise entirely
useless.
2019-01-24 13:16:59 -05:00
Matt Corallo
1bc190c760
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.
2019-01-24 13:16:59 -05:00
Matt Corallo
a138a9af01
Handle monitor update failures in two more places
...
Best reviewed with -b
2019-01-24 13:16:59 -05:00
Matt Corallo
a6f0281017
Merge pull request #288 from TheBlueMatt/2019-01-test-split-raa-flag-fix
...
Fix several more monitor-update-failed cases
2019-01-24 13:16:33 -05:00
Matt Corallo
d7ac68701f
Merge pull request #301 from rex4539/fix-typos
...
Fix typos
2019-01-24 13:12:28 -05:00
Dimitris Apostolou
ab10b05075
Fix typos
2019-01-24 19:07:08 +02:00
Matt Corallo
658e558fd0
Fix responding to RAAs when monitor updating had already failed
2019-01-23 17:51:46 -05:00
Matt Corallo
98f264372e
Remove incorrect debug_assert!() from reestablish handling and test
2019-01-23 17:43:45 -05:00
Matt Corallo
3e3b2a3be7
Add a test for the ordering setting in channel_reestablish handling
2019-01-23 17:43:45 -05:00
Matt Corallo
985688852b
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.
2019-01-23 17:43:45 -05:00
Matt Corallo
e79b98ddda
Merge pull request #300 from TheBlueMatt/2019-01-tests-split
...
Split up functional_tests into three separate files
2019-01-23 17:43:13 -05:00
Matt Corallo
d69fb5f58d
Fix indentation in a few new tests
2019-01-23 17:06:38 -05:00
Matt Corallo
baa7433504
Fix spelling in do_test_monitor_temporary_update_fail comment
2019-01-23 16:54:53 -05:00
Matt Corallo
aa8ecfed7b
Split up monitor-update-failed tests and other functional tests
2019-01-23 16:54:01 -05:00
Matt Corallo
8d9eb973cc
Split up functional_tests into utils and the tests themselves
2019-01-23 16:46:44 -05:00
Matt Corallo
efcfb93ebe
Merge pull request #299 from TheBlueMatt/2019-01-262-redux
...
Added tests to check the bolt 2 specs for open_channel (Sending Node)
2019-01-23 16:15:09 -05:00
Yuko Roodt
4d77e9d752
Added tests to check the bolt 2 specs for Sending Node Channel
2019-01-23 14:54:10 -05:00
Matt Corallo
7a77c9f1d2
Merge pull request #298 from TheBlueMatt/2019-01-271-cleanup
...
Implement serialize/deserialize for Router
2019-01-23 14:48:13 -05:00
Antoine Riard
c7b8c312ce
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
2019-01-23 11:31:37 -05:00
Antoine Riard
70d06b4610
Implement Writeable/Readable for Option<T>
...
Add OptionalField in OpenChannel, AcceptChannel
ChannelReestablish to avoid serialization implementation
conflicts
2019-01-23 11:31:26 -05:00
Matt Corallo
4a4cdc1f2a
Merge pull request #286 from TheBlueMatt/2019-01-monitor-update-fixes
...
Fix a few monitor-update failure bugs found by new fuzzer
2019-01-22 15:27:23 -05:00
Matt Corallo
be8213b244
Fix handling RAA when a monitor update previously failed
2019-01-22 14:38:56 -05:00
Matt Corallo
4cceb58f91
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.
2019-01-22 14:34:18 -05:00
Matt Corallo
1633c1f8f8
Remove unused argument from handle_error!
2019-01-22 14:34:18 -05:00
Matt Corallo
4cc7d5d527
Merge pull request #294 from TheBlueMatt/2019-01-deps-bump
...
Upgrade to secp256k1 v12, bitcoin v16, and crates bitcoin_hashes
2019-01-22 14:32:24 -05:00
Matt Corallo
8678bda576
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.
2019-01-22 13:49:15 -05:00
Matt Corallo
f109d13e22
Drop verification context from keys manager
2019-01-22 13:49:15 -05:00
Matt Corallo
12d25576c1
Upgrade to secp256k1 v12, bitcoin v16, and crates bitcoin_hashes
2019-01-22 13:49:15 -05:00
Matt Corallo
8ce8fbe925
Merge pull request #203 from TheBlueMatt/2018-10-router-htlc-min
...
Fix Router min HTLC comparison
2019-01-22 13:48:31 -05:00