Antoine Riard
d53f48e157
Add timer_chan_freshness_every_min
...
Latency/peer disconnection may trigger us to mark as disabled
some of our channels. After some time, if channels are still
disabled we need to broadcast ChannelUpdate to inform other network
peers about the uselessness of these channels.
2019-11-29 18:12:40 -05:00
Antoine Riard
f564df3892
Add UpdateStatus in Channel to track freshness of gossiped liveness.
...
Added enum and method are only used in next commit.
2019-11-29 18:12:38 -05:00
Matt Corallo
09b8c9e98b
Fix add_update_monitor check to unwrap() instead of an unused bool
2019-11-28 01:21:41 -05:00
Matt Corallo
a62e96bcd9
Move test profile to crate root, so it has effect again
2019-11-28 01:21:41 -05:00
Matt Corallo
c1349e82cd
Add dyn tags in fuzz_targets
...
We only support newish rust in fuzz_targets, so this is fine.
2019-11-28 01:21:41 -05:00
Matt Corallo
be7d3d17ac
Merge pull request #401 from ariard/2019-11-log-tx-broadcast
...
Add log for every tx broadcast
2019-11-25 22:39:48 +00:00
Antoine Riard
9df0250dbb
Add log for every tx broadcast
...
Added macro log_tx in macro_logger.rs
2019-11-25 16:55:14 -05:00
Matt Corallo
01ae452120
Merge pull request #399 from TheBlueMatt/2019-11-fuzz-top-level
...
Move fuzz to top level.
2019-11-25 21:19:23 +00:00
Matt Corallo
9501ecce49
Move fuzz to top level.
2019-11-25 15:42:07 -05:00
Matt Corallo
65f7c9f542
Merge pull request #389 from valentinewallace/split-chain-watch-interface
...
remove circular references in channelmanager and channelmonitor
2019-11-22 18:26:44 +00:00
Valentine Wallace
f71518365f
chaininterface+multi: add filter_block and reentered to ChainWatchInterface
...
Because filter_block takes a and returns a list of s , we must add a lifetime to the ChainWatchInterface, which bubbles up in a lot of places. These places include adding a lifetime to the Node struct, which causes a lot of rearranging tests so that variables don't go out of scope before the Node that owns them does.
2019-11-21 20:35:53 -05:00
Valentine Wallace
969f863013
chaininterface: add BlockNotifier struct
...
Adding this struct will allow us to remove the circular reference
between ChainListeners and the ChainWatchInterface, because it
separates out the responsibility of notifying listeners about new
blocks from the responsibility of storing and retrieving watched
transactions.
2019-11-21 20:34:00 -05:00
Valentine Wallace
1ec0c14fce
multi: remove listeners field and method from ChainWatchInterface
...
This includes the purpose of this PR, which is to remove the circular reference created by ChainListeners self-adding themselves to their ChainWatchInterface's `listeners` field.
2019-11-21 18:06:35 -05:00
Matt Corallo
8d2c4e7c96
Merge pull request #397 from ariard/2019-11-doc-announce-sigs
...
Doc announce_sigs
2019-11-21 03:11:46 +00:00
Antoine Riard
13e52426c7
Extend test for announcement_sigs
2019-11-19 18:03:05 -05:00
Antoine Riard
e938e592b2
Document our handling of announcement_sigs
...
We may have in the future to rebroadcast announcement_sigs at
peer reconnection if this a burning issue as spec lacks
a acknowledgement mechanism.
2019-11-19 17:48:22 -05:00
Matt Corallo
126b514168
Merge pull request #379 from rrybarczyk/use-workspaces
...
Use workspaces to separate crates
2019-11-19 01:52:13 +00:00
RJ Rybarczyk
06091cee0f
Merge branch 'master' of github.com:rust-bitcoin/rust-lightning into use-workspaces
2019-11-18 23:51:21 +00:00
RJ Rybarczyk
404081a755
Update travis file to accommodate workspaces
2019-11-18 23:50:15 +00:00
Matt Corallo
63c1fa6db5
Merge pull request #395 from ariard/2019-11-expected-amt-claim-funds
...
Avoid probing attacks with same hash lower amounts
2019-11-18 23:08:33 +00:00
Antoine Riard
5e047cc55e
Add test_check_htlc_underpaying
2019-11-18 17:25:36 -05:00
Antoine Riard
6493efe329
Check expected amount in claim_funds
...
Require to specify expected amount so that we can claim only
payment for thhe correct amount, and reject payments for incorrect
amounts (which are probably middle nodes probing to break our privacy).
Send back incorrect_or_unknown_payments_details (PERM|15) to avoid
the probe node learning that final node is waiting a payment with
the routed hash.
2019-11-18 17:25:34 -05:00
RJ Rybarczyk
5305223495
Merge branch 'master' of github.com:rust-bitcoin/rust-lightning into use-workspaces
2019-11-18 19:44:55 +00:00
Matt Corallo
ae0ad19db5
Merge pull request #394 from TheBlueMatt/2019-11-broken-build
...
Fix broken build
2019-11-15 22:47:34 +00:00
Matt Corallo
f08383edce
Drop needless mut
2019-11-15 17:20:03 -05:00
Matt Corallo
2118feb090
Fix build broken by silent merge conflicts
2019-11-15 17:20:03 -05:00
Matt Corallo
148c79719e
Merge pull request #393 from ariard/2019-11-send-cmt-error-handling
...
Fulfill error handling for send_commitment in processing htlcs forward
2019-11-15 21:58:37 +00:00
Matt Corallo
2e1b7ab86a
Merge pull request #390 from ariard/2019-11-consistent-errors
...
Make field error of ErrorPacket (former HandleError) mandatory
2019-11-15 21:57:36 +00:00
Matt Corallo
b9274328de
Merge pull request #392 from ariard/2019-11-manager-init-height
...
Add init height in ChannelManager constructor
2019-11-15 21:38:04 +00:00
Antoine Riard
ddbe53f836
Make field error of LightingError mandatory
...
We also fulfilled last empty ErrorAction:
- Router secp fail : IgnoreError
- processing error in Router : IgnoreError
- get_channel_update too early : IgnoreError
2019-11-15 16:24:42 -05:00
Antoine Riard
9a015236d0
Add init height in ChannelManager constructor
2019-11-15 16:11:47 -05:00
Matt Corallo
a30946b292
Merge pull request #391 from ariard/2019-11-fix-preimage-collision-onchain
...
Avoid claiming remote received HTLCs with side-learned preimage
2019-11-15 19:20:43 +00:00
RJ Rybarczyk
88fef649b1
Use workspaces to separate crates
2019-11-15 02:44:30 +00:00
Antoine Riard
6de175575b
Fulfill error handling for send_commitment in processing htlcs forward
2019-11-14 18:27:47 -05:00
Antoine Riard
945c399a35
Add test_duplicate_htlc_different_direction_onchain
2019-11-12 19:33:27 -05:00
Antoine Riard
543b0983f6
Avoid claiming remote received HTLCs with preimage
...
In case of duplicate HTLCs with same hash going in opposite
directions we may learn preimage of offered one, but we shouldn't
claim received one to avoid invalidation of combined claim.
The received HTLC is going to be claimed by a timeout tx at
timelock expiration.
Fix #337
2019-11-12 19:27:55 -05:00
Antoine Riard
7608483b0f
Rename HandleError to LightningError to stress already-processed error
2019-11-12 17:29:20 -05:00
Matt Corallo
2afd53148f
Merge pull request #386 from TheBlueMatt/2019-10-useless-lints
...
Disable some useless lints
2019-10-28 21:36:39 +00:00
Matt Corallo
58351200b6
Disable some useless lints
2019-10-28 15:21:57 -04:00
Matt Corallo
2cb5133aeb
Merge pull request #384 from ariard/2019-10-clean-warnings
...
Remove useless test framework warnings
2019-10-26 20:59:55 +00:00
Antoine Riard
230b0e1fb6
Remove useless test framework warnings
2019-10-25 20:20:41 -04:00
Matt Corallo
39b562e009
Merge pull request #377 from elichai/2019-08-update-deps
...
Updating dependencies
2019-08-24 23:06:26 +00:00
Elichai Turkel
20302064a8
Update the fuzz and net-tokio crates
2019-08-24 11:05:38 -04:00
Elichai Turkel
5bb7ba5b7d
Cast weights to u64 to support the new rust-bitcoin api
2019-08-24 11:04:41 -04:00
Elichai Turkel
f4e8974c16
Updated bitcoin, bitcoin_hashes and secp256k1 dependencies
2019-08-24 11:04:29 -04:00
Matt Corallo
ab8f5a8620
Merge pull request #374 from dongcarl/2019-08-channel-open-sanity
...
tests: Add sanity tests for ChannelOpens
2019-08-09 16:53:33 +00:00
Carl Dong
00410bfeab
tests: Add sanity tests for ChannelOpens
2019-08-09 10:17:32 -04:00
Matt Corallo
56f16eaa4d
Merge pull request #349 from ariard/2019-07-data_loss
...
Implement option_data_loss_protect on both sides
2019-08-06 21:12:57 +00:00
Antoine Riard
41def659c0
Add test_data_loss_protect
2019-08-05 16:19:49 -04:00
Antoine Riard
254af05c43
Cache to_remote_script if we are fallen-behind
...
Also, restrict commitment transaction filters in ChannelMonitor::
block_connected
2019-08-05 16:19:44 -04:00