Commit graph

2125 commits

Author SHA1 Message Date
Matt Corallo
00c6f42452 Use libbitcoinconsensus to check tx validity in some tests 2018-04-16 20:35:19 -04:00
Matt Corallo
8b1a7ede27 Test that channel monitors get updated appropriately 2018-04-16 20:35:03 -04:00
Matt Corallo
021b3643cc Hand payment preimages into channel monitors when claimed 2018-04-16 20:35:03 -04:00
Matt Corallo
1ae603cc3d Switch back to crates.io rust-bitcoin for 0.13 release 2018-04-16 20:35:03 -04:00
Matt Corallo
69eb59b24d
Merge pull request #19 from TheBlueMatt/2018-04-error-handling-framework
Clean up peer_handler error handling a bit, clean up channel error handling a ton
2018-04-02 19:43:46 -04:00
Matt Corallo
9ccfb358b4 Fix travis-fuzz upgrade-handling 2018-04-02 18:42:41 -04:00
Matt Corallo
644119201d Remove useless htlc_redeemscript argument 2018-04-02 18:31:23 -04:00
Matt Corallo
e79e61f595 Clean up channel error handling a ton 2018-04-02 18:31:23 -04:00
Matt Corallo
91b964ae1f Basic error handling framework in peer_handler 2018-04-02 18:31:23 -04:00
Matt Corallo
4fbc0b3768 Require Init as first message, send our own Init for outbound 2018-04-02 18:31:23 -04:00
Matt Corallo
df9367adaf Rename ErrorMessage 2018-04-02 18:31:23 -04:00
Matt Corallo
24fd566567
Merge pull request #18 from TheBlueMatt/2018-04-fuzzing-expansion
Expand full_stack_target from uselessly-large to laughably-large
2018-04-02 18:27:23 -04:00
Matt Corallo
f7dd69240a
Merge pull request #17 from TheBlueMatt/2017-04-channel-close
Add support for channel closure (based on new upstream rust-bitcoin)
2018-04-02 18:14:24 -04:00
Matt Corallo
b21048a1ce Check funding txout format when transaction is confirmed in channel 2018-04-02 18:07:03 -04:00
Matt Corallo
187ca8c0c8 Make Channel non-public except in fuzztarget mode, bump version 2018-04-02 18:07:03 -04:00
Matt Corallo
f452403a3f Fix a small bug in peer_handler 2018-04-02 18:07:03 -04:00
Matt Corallo
cf6308a5ae Expose event-processing loop from peer_handler. 2018-04-02 18:07:03 -04:00
Matt Corallo
7b0a25bdce Fix message decoding for features, build some encoding 2018-04-02 18:07:03 -04:00
Matt Corallo
8e79c05a20 Add support for initiating channel closure to Channel{,Manager} 2018-04-02 18:07:03 -04:00
Matt Corallo
eb354a89db Update TODOs in README 2018-04-02 18:07:03 -04:00
Matt Corallo
8938cd7d78 Expand full_stack_target from uselessly-large to laughably-large 2018-04-02 18:07:03 -04:00
Matt Corallo
c528ff3650 Handle incoming shutdown messages 2018-04-02 18:07:02 -04:00
Matt Corallo
890e3cb165 Update for new rust-bitcoin API, avoid some duplicate hashing 2018-04-02 18:06:59 -04:00
Matt Corallo
2018782d11
Merge pull request #16 from TheBlueMatt/2018-03-fixups
Assorted fixes/cleanups
2018-03-27 12:54:54 -04:00
Matt Corallo
93f47f5421 Fix double-locking in channelmanager 2018-03-25 17:02:28 -04:00
Matt Corallo
7bb290fe3a Stop allowing new commitments without updates/revoke 2018-03-25 17:02:28 -04:00
Matt Corallo
9606f94caf Stop freeing holding cell in updates, fix freeing in revoke 2018-03-25 17:02:28 -04:00
Matt Corallo
89d9f8fb0e Fix update_fee handling, add TODOs 2018-03-25 17:02:28 -04:00
Matt Corallo
942d760b83 impl more message decoders 2018-03-25 17:02:28 -04:00
Matt Corallo
d923717216 Expand fake_network_test a bit with multiple in-flight rebalances 2018-03-25 17:02:28 -04:00
Matt Corallo
0795b34e10 Fail payments backwards in delayed processing as well 2018-03-25 13:21:32 -04:00
Matt Corallo
729f02d2dd Hold channel_state lock into fail_htlc_backwards_internal 2018-03-23 16:57:22 -04:00
Matt Corallo
d8fc9ffde9 DRY up update_add_htlc a bit with macros 2018-03-23 16:56:45 -04:00
Matt Corallo
397b6f90e1 Fix new "uneccessary mut" warning 2018-03-23 15:30:18 -04:00
Matt Corallo
511c5319f1
Merge pull request #15 from TheBlueMatt/master
Add fuzz targets, bump bitcoin/secp256k1 deps
2018-03-23 13:35:35 -04:00
Matt Corallo
2188192efa Set travis to run honggfuzz for a while 2018-03-23 13:16:24 -04:00
Matt Corallo
1d2774dd64 Add some fuzz targets.
Sadly none of them are really any good without some hand-holding to
generate good input data, and unless sha256 gets stubbed out I'm
not sure they're gonna get good without a symbolic execution fuzzer
2018-03-23 13:16:24 -04:00
Matt Corallo
02b92f5d5c Add dummy creator for PendingForwardHTLCInfo 2018-03-23 13:16:24 -04:00
Matt Corallo
ab56b81acd Stub out Sha256 calls when fuzzing 2018-03-23 13:16:24 -04:00
Matt Corallo
d0a3d0f728 Stub out ChaCha20Poly1305RFC when fuzzing 2018-03-23 13:16:24 -04:00
Matt Corallo
d18e54bd90 Stub out RNG when fuzzing 2018-03-23 13:16:24 -04:00
Matt Corallo
c65bffe568 Add fuzztarget feature, bump bitcoin/secp256k1 2018-03-23 13:16:24 -04:00
Matt Corallo
bceb952b12
Merge pull request #14 from TheBlueMatt/2018-03-fuzz-fixes-1
Impl some message deserialization, initial fuzzing-found bug fixes
2018-03-23 13:15:47 -04:00
Matt Corallo
e9b1af277f Check validity of dust_limit_satoshis in remote messages 2018-03-22 17:43:31 -04:00
Matt Corallo
1bb4f44bd6 Fix reserve check on HTLC receive/send 2018-03-22 17:43:31 -04:00
Matt Corallo
298557c891 impl a bunch of additional messages, remove some useless mut 2018-03-22 17:43:20 -04:00
Matt Corallo
d14e31f512 Remove useless Sha256 copies 2018-03-22 17:42:12 -04:00
Matt Corallo
f47ba769f5
Merge pull request #13 from TheBlueMatt/2018-03-htlc-failures
Clarify roles in failing HTLCs, implement most of it
2018-03-22 17:40:07 -04:00
Matt Corallo
40ab09f627 Clarify roles in failing HTLCs, impl it, support rebalances 2018-03-22 17:35:30 -04:00
Matt Corallo
ac3bf5b71d Fix length requirement in peer_handler msg decode 2018-03-20 16:42:04 -04:00