Matt Corallo
38584e3efe
Avoid double-panic in full_stack_target to assist debugging
2018-11-02 10:54:25 -04:00
Schalk van Heerden
a0be4d1758
Added config interface to allow users to specify channel limits
2018-10-31 15:45:30 -04:00
Matt Corallo
9189d0e61d
Require at least 1k sat for outbound channels and meet BTC's dust
2018-10-31 15:45:30 -04:00
Matt Corallo
46f573b787
[full_stack_target] don't allow double-confirming txn
2018-10-29 17:16:29 -04:00
Matt Corallo
64bd2eaa7f
Give ManyChannelMonitor a logger and trace add_update events
2018-10-29 14:26:05 -04:00
Matt Corallo
4342114345
Send RAA/CS messages out-of-band to ensure ordered delivery
2018-10-27 09:42:04 -04:00
Matt Corallo
c962a27156
Send funding_signed messages out-of-band to ensure ordered delivery
2018-10-27 09:42:04 -04:00
Matt Corallo
608d517f92
Send AcceptChannel responses out-of-band to ensure ordered delivery
2018-10-27 09:42:04 -04:00
Matt Corallo
e397cb9960
Split Event, move MessageSendEvent push() inside channel_state lock
2018-10-27 09:42:04 -04:00
Antoine Riard
5180686b1d
Integrate destination_script from KeysInterface in ChannelManager/Channel
...
Drop channel_monitor_claim_key from ChannelKeys
2018-10-27 09:42:04 -04:00
Antoine Riard
32a9378909
Integrate shutdown_pubkey from KeysInterface in ChannelManager/Channel
...
Drop channel_close_key from ChannelKeys
2018-10-27 09:42:04 -04:00
Antoine Riard
e361fed0f1
Integrate KeysInterface to ChannelManager with Arc
2018-10-27 09:42:04 -04:00
Yuntai Kyong
f133554697
Add PaymentFailReason for fail_htlc_backwards
...
to indicate fail reason after a PaymentReceived event
2018-10-25 21:24:53 +09:00
Matt Corallo
aa17defa04
Tweak + extend full_stack_target sample to incl HTLC tx broadcasts
2018-09-14 15:27:54 -04:00
Matt Corallo
673912e769
Add force_close_channel call command to full_stack_target
2018-09-09 11:36:00 -04:00
Antoine Riard
2079fe4ad2
Add ChainWatchInterface in Router
2018-09-03 17:40:05 -04:00
Matt Corallo
ab00e4ccff
Merge HTLC-update events, remove FailHTLC ErrorAction
...
UpdateFailHTLC isn't really an error anymore now that its handled
async after channel commitment (as required by BOLT 2), and since
its unused this is free. To resolve the TODO which intended to use
it for HTLC failure when trying to route forwards, we instead opt
to merge all the HTLC update events into one UpdateHTLCs event
which just contains a CommitmentUpdate object.
2018-08-23 16:11:20 -04:00
Matt Corallo
0647cf4bf1
Restore push_msat in full_stack_target
2018-08-23 16:11:20 -04:00
Matt Corallo
a1bd563456
Restore full_stack_target fuzzer
2018-08-23 16:11:12 -04:00
Matt Corallo
11e5975523
Update to rust-secp256k1 v0.11 and rust-bitcoin v0.14
2018-08-23 14:52:43 -04:00
Antoine Riard
05552c0988
Check amt_to_forward and outgoing_cltv_value in add_update_htlc
2018-08-23 14:52:36 -04:00
Matt Corallo
06d3b4babe
Add a full_stack_target sample test to avoid unintentional breakage
2018-08-20 13:58:31 -04:00
Matt Corallo
87aabff8ab
Disable push_msat in full_stack_target temporarily
2018-08-20 13:58:31 -04:00
Matt Corallo
1b8f4acb27
Upgrade AFL to 0.4 with persistent mode fuzzing
2018-08-20 13:58:31 -04:00
Matt Corallo
9f2c67ae60
Expand full_stack_target somewhat
2018-08-20 13:58:31 -04:00
Matt Corallo
0f24a67c82
Merge pull request #118 from TheBlueMatt/2018-08-103-rebased
...
Rebase of #103
2018-08-17 14:00:50 -04:00
Yuntai Kyong
ada2154b40
Add push_msat to new outbound API
...
Also add APIMisuseError to be thrown to the API client
2018-08-17 13:18:28 -04:00
Matt Corallo
faf9864d9d
Don't HTLC claim with no-possible-preimage in full_stack_target
2018-08-17 12:34:09 -04:00
Matt Corallo
ebd3bbba0f
Remove some dead Logger code
2018-08-16 23:11:15 -04:00
Matt Corallo
09583f3116
Fix PaymentReceived/sha256 handling in full_stack_target
...
Sha256 in fuzztarget was updated some time ago to use XOR instead
of the first byte of a real SHA256 run and somehow received and
sent payments got crossed in full_stack_target.
2018-08-16 22:37:44 -04:00
Matt Corallo
609054eae0
Handle duplicate funding transaction gracefully.
...
This can otherwise cause strange behavior, including a panic on
force_close_all_channels found by full_stack_target fuzzing.
2018-08-16 22:37:44 -04:00
Antoine Riard
0029f04fce
Logging interface
...
Implement error, warn, info, debug and trace macros, internally calling
an instance of Logger, and passing it to every main structures
Build-time or client-side filtering.
Issue #54
2018-08-17 00:01:15 +00:00
Savil Srivastava
4c44b787f1
use hex::decode instead of extend_vec_from_hex
2018-07-28 10:09:29 -07:00
Matt Corallo
af5c6e8186
PendingHTLCsForwardable really should just be upstreamed.
...
This is just a comment/docs/function rename change
2018-07-24 22:33:10 -04:00
Matt Corallo
b8b7cb238d
Convert fee API to per_kw instead of per_vb
...
This (a) cuts down a bit on some conversions, reducing chances for
bugsand (b) provides greater accuracy for clients.
2018-07-24 20:34:56 -04:00
Antoine Riard
20fa9d331d
Add DisconnectPeer events
...
Add test for DisconnectPeer event
Update DisconnectPeer with optional ErrorMessage
Manage error for funding_transaction_generated
Add disconnect_socket to SocketDescriptor trait
2018-07-23 14:31:44 -04:00
Matt Corallo
667cd66ede
Add arg to get_route to specify our local channels explicitly
...
(and a new getter in ChannelManager to get the thing to pass in)
2018-07-23 13:33:00 -04:00
Matt Corallo
e93c9fbeaf
Migrate all Uint256s used for channel_ids to [u8; 32]
2018-07-22 18:55:20 -04:00
Jean Pierre Dudey
d0e9137bc5
Add the OutPoint
type for the ChannelMonitor
's funding_txo field.
...
This structure replaces the (Sha256dHash, u16) tuple that was being used
for the funding output.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-06-29 12:12:17 -04:00
Matt Corallo
2d8afeccdb
Rewrite channelmonitor framework and implement a bunch of it
2018-04-24 20:42:24 -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
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