Matt Corallo [Thu, 27 May 2021 19:19:54 +0000 (19:19 +0000)]
Use TLV serialization for Commitment transaction structures
Matt Corallo [Wed, 26 May 2021 03:06:12 +0000 (03:06 +0000)]
Add TLV suffix to PackageTemplate
Matt Corallo [Tue, 25 May 2021 23:13:11 +0000 (23:13 +0000)]
Move NetworkGraph inner structs to TLV storage
Matt Corallo [Tue, 25 May 2021 21:20:02 +0000 (21:20 +0000)]
Move ChannelManager-inner structs to TLV storage
Note that enums are left alone as we can use the type byte already
present for future compatibility.
Matt Corallo [Tue, 25 May 2021 21:18:49 +0000 (21:18 +0000)]
Add dummy OutPoint constructor to be used when reading it in a TLV
Matt Corallo [Tue, 25 May 2021 21:18:30 +0000 (21:18 +0000)]
Add a macro which implements Readable/Writeable using TLVs only
This also includes a `VecWriteWrapper` and `VecReadWrapper` which
implements serialization for any `Readable`/`Writeable` type that is
in a Vec. We do this instead of implementing `Readable`/`Writeable`
directly as there isn't always a univerally-defined way to serialize
a Vec and this makes things more explicit.
Finally, this tweaks existing macros (and in the new macros) to
support a trailing `,` after a list, eg
`write_tlv_fields!(stream, {(0, a),}, {});` whereas previously the
trailing `,` after the `(0, a)` would be a compile-error.
Matt Corallo [Thu, 27 May 2021 19:08:00 +0000 (19:08 +0000)]
Merge pull request #924 from GeneFerneau/alloc
Use alloc for no_std builds
Gene Ferneau [Wed, 19 May 2021 04:21:39 +0000 (04:21 +0000)]
Use alloc for no_std builds
Replace std structs with alloc equivalents to support no_std builds
f use prelude::* credit @devrandom
Jeffrey Czyz [Thu, 27 May 2021 15:53:14 +0000 (08:53 -0700)]
Cache socket address in HttpClient for reconnect
If the HttpClient attempts to reconnect to bitcoind that is no longer
running, the client fails to get the address from the stream. Cache the
address when connecting to prevent this.
Matt Corallo [Tue, 25 May 2021 20:29:09 +0000 (20:29 +0000)]
Fix compile warnings reading type-0 TLVs
Matt Corallo [Thu, 27 May 2021 00:20:08 +0000 (00:20 +0000)]
Merge pull request #929 from jkczyz/2021-05-json-rpc-error
Parse RPC errors as JSON content
Jeffrey Czyz [Wed, 26 May 2021 17:57:39 +0000 (10:57 -0700)]
Parse RPC errors as JSON content
Bitcoin Core's JSON RPC server returns errors as HTTP error responses
with JSON content in the body. Parse this content as JSON to give a more
meaningful error. Otherwise, "binary" is given because the content
contains ASCII control characters.
Jeffrey Czyz [Wed, 26 May 2021 17:51:16 +0000 (10:51 -0700)]
Define an HttpError for returning error contents
Return an HTTP error response as a status code and contents. This allows
clients to interpret the response as desired (e.g., the contents as a
JSON-formatted error).
Matt Corallo [Wed, 26 May 2021 15:50:25 +0000 (15:50 +0000)]
Merge pull request #642 from ariard/2020-06-anchor-backend-refacto
Anchor-outputs (1/3): Refactoring chain backend to extract PackageTemplate
Antoine Riard [Mon, 26 Apr 2021 23:23:43 +0000 (19:23 -0400)]
Add package template unit tests
Antoine Riard [Tue, 18 May 2021 18:09:02 +0000 (14:09 -0400)]
Move compute_output_value as part of package member functions
Antoine Riard [Mon, 26 Apr 2021 22:22:53 +0000 (18:22 -0400)]
Move get_height_timer out of OnchainTxHandler
Antoine Riard [Sun, 18 Apr 2021 23:18:30 +0000 (19:18 -0400)]
Move onchain* to chain/
Antoine Riard [Thu, 20 May 2021 16:44:41 +0000 (12:44 -0400)]
Integrate PackageTemplate
This commit replaces InputMaterial in both ChannelMonitor/
OnchainTxHandler.
This doesn't change behavior.
Antoine Riard [Fri, 7 May 2021 23:51:40 +0000 (19:51 -0400)]
Duplicate fee computation utilities out of OnchainTxHandler
Duplicated code in onchain.rs is removed in next commits.
Antoine Riard [Fri, 7 May 2021 23:36:50 +0000 (19:36 -0400)]
Introduce PackageTemplae, a replacement of InputMaterial
PackageTemplate aims to replace InputMaterial, introducing a clean
interface to manipulate a wide range of claim types without
OnchainTxHandler aware of special content of each.
This is used in next commits.
Antoine Riard [Tue, 16 Jun 2020 00:11:01 +0000 (20:11 -0400)]
Add package.rs file
Package.rs aims to gather interfaces to communicate between
onchain channel transactions parser (ChannelMonitor) and outputs
claiming logic (OnchainTxHandler). These interfaces are data
structures, generated per-case by ChannelMonitor and consumed
blindly by OnchainTxHandler.
Matt Corallo [Tue, 25 May 2021 20:07:07 +0000 (20:07 +0000)]
Merge pull request #920 from TheBlueMatt/2021-05-tlv-ser
Rebroadcast channel_announcements when we broadcast a node_announce
Matt Corallo [Thu, 20 May 2021 20:09:29 +0000 (20:09 +0000)]
Add note in CONTRIBUTING.md that some structs need prefix/suffixes
Matt Corallo [Thu, 6 May 2021 01:31:39 +0000 (01:31 +0000)]
Rebroadcast channel_announcements when we broadcast a node_announce
Matt Corallo [Thu, 6 May 2021 01:15:35 +0000 (01:15 +0000)]
Process announcement_signatures messages in Channel and store sigs
Previously we handled most of the logic of announcement_signatures
in ChannelManager, rather than Channel. This is somewhat unique as
far as our message processing goes, but it also avoided having to
pass the node_secret in to the Channel.
Eventually, we'll move the node_secret behind the signer anyway, so
there isn't much reason for this, and storing the
announcement_signatures-provided signatures in the Channel allows
us to recreate the channel_announcement later for rebroadcast,
which may be useful.
Matt Corallo [Sat, 22 May 2021 01:10:27 +0000 (01:10 +0000)]
Update net graph copy used in tests and bench for new format
Matt Corallo [Fri, 7 May 2021 22:36:45 +0000 (22:36 +0000)]
Add version and TLV suffix for more user-facing "major" structs
Matt Corallo [Thu, 6 May 2021 00:23:08 +0000 (00:23 +0000)]
Support serializing TLV fields which may or may not be present
Matt Corallo [Wed, 5 May 2021 22:56:42 +0000 (22:56 +0000)]
Append backwards-compat TLVs to serialization of larger structs
Currently our serialization is very compact, and contains version
numbers to indicate which versions the code can read a given
serialized struct. However, if you want to add a new field without
needlessly breaking the ability of previous versions of the code to
read the struct, there is not a good way to do so.
This adds dummy, currently empty, TLVs to the major structs we
serialize out for users, providing an easy place to put new
optional fields without breaking previous versions.
Matt Corallo [Tue, 25 May 2021 15:55:50 +0000 (15:55 +0000)]
Merge pull request #920 from jkczyz/2021-05-event-processing
Background processing of ChannelManager and ChannelMonitor events
Jeffrey Czyz [Tue, 18 May 2021 23:06:13 +0000 (16:06 -0700)]
Remove event channel from lightning-net-tokio
It is unnecessary since ChannelManager has a notification interface as
of
12c735ab3af8f09dc402f8147594afcc4569be61.
Jeffrey Czyz [Tue, 11 May 2021 15:34:57 +0000 (08:34 -0700)]
Process ChainMonitor events in the background
Jeffrey Czyz [Tue, 11 May 2021 15:07:54 +0000 (08:07 -0700)]
Process ChannelManager events in the background
Jeffrey Czyz [Tue, 25 May 2021 07:27:28 +0000 (00:27 -0700)]
f - Persist when check_free_holding_cells has updates
Jeffrey Czyz [Wed, 19 May 2021 19:26:55 +0000 (12:26 -0700)]
Guard get_and_clear_pending_msg_events
Jeffrey Czyz [Fri, 21 May 2021 18:59:54 +0000 (11:59 -0700)]
Remove unnecessary scope from ChannelManager
Jeffrey Czyz [Wed, 12 May 2021 07:34:30 +0000 (00:34 -0700)]
Refactor EventsProvider to take an EventHandler
Matt Corallo [Mon, 24 May 2021 21:02:50 +0000 (21:02 +0000)]
Merge pull request #851 from TheBlueMatt/2021-03-holding-cell-clear-msg-get
Clean up and more liberally free holding cell HTLCs (without re-entrancy)
Matt Corallo [Mon, 24 May 2021 17:49:54 +0000 (17:49 +0000)]
Merge pull request #926 from GeneFerneau/core
Use core replacements for std members
Gene Ferneau [Sun, 23 May 2021 23:22:46 +0000 (23:22 +0000)]
Use core replacements for std members
In preparation for no_std build support, replace std structs and
functions with core equivalents
Matt Corallo [Wed, 21 Apr 2021 22:24:36 +0000 (22:24 +0000)]
Add trace to ci-fuzz.sh to make debugging CI issues easier
Matt Corallo [Tue, 20 Apr 2021 21:35:11 +0000 (21:35 +0000)]
Log info about HTLC failures when we fail them back
Matt Corallo [Tue, 9 Feb 2021 20:22:44 +0000 (15:22 -0500)]
Read monitors from our KeysInterface in chanmon_consistency_fuzz
If the fuzz target is failing due to a channel force-close, the
immediately-visible error is that we're signing a stale state. This
is because the ChannelMonitorUpdateStep::ChannelForceClosed event
results in a signature in the test clone which was deserialized
using a OnlyReadsKeysInterface. Instead, we need to deserialize
using the full KeysInterface instance.
Matt Corallo [Mon, 1 Mar 2021 02:00:46 +0000 (21:00 -0500)]
Add a test for HTLC freeing on monitor update restoration
Matt Corallo [Fri, 20 Nov 2020 20:49:53 +0000 (15:49 -0500)]
Stop failing back HTLCs on peer disconnection
Previously, if we got disconnected from a peer while there were
HTLCs pending forwarding in the holding cell, we'd clear them and
fail them all backwards. This is largely fine, but since we now
have support for handling such HTLCs on reconnect, we might as
well not, instead relying on our timeout logic to fail them
backwards if it takes too long to forward them.
Matt Corallo [Wed, 21 Apr 2021 02:37:02 +0000 (02:37 +0000)]
[fuzz] Handle monitor updates during get_and_clear_pending_msg_events
Because we may now generate a monitor update during
get_and_clear_pending_msg_events calls, we need to ensure we
re-serialize the relevant ChannelManager before attempting to
reload it, if such a monitor update occurred.
Matt Corallo [Thu, 18 Mar 2021 22:03:30 +0000 (18:03 -0400)]
Free holding cell on monitor-updating-restored when there's no upd
If there is no pending channel update messages when monitor updating
is restored (though there may be an RAA to send), and we're
connected to our peer and not awaiting a remote RAA, we need to
free anything in our holding cell.
However, we don't want to immediately free the holding cell during
channel_monitor_updated as it presents a somewhat bug-prone case of
reentrancy:
a) it would re-enter user code around a monitor update while being
called from user code notifying us of the same monitor being
updated, making deadlocs very likely (in fact, our fuzzers
would have a bug here!),
b) the re-entrancy only occurs in a very rare case, making it
likely users will not hit it in testing, only deadlocking in
production.
Thus, we add a holding-cell-free pass over each channel in
get_and_clear_pending_msg_events. This fits up nicely with the
anticipated bug - users almost certainly need to process new
network messages immediately after monitor updating has been
restored to send messages which were not sent originally when the
monitor updating was paused.
Without this, chanmon_fail_consistency was able to find a stuck
condition where we sit on an HTLC failure in our holding cell and
don't ever handle it (at least until we have other actions to take
which empty the holding cell).
Matt Corallo [Thu, 18 Mar 2021 22:23:05 +0000 (18:23 -0400)]
DRY ChannelError conversion macros
Both break_chan_entry and try_chan_entry do almost identical work,
only differing on if they `break` or `return` in response to an
error. Because we will now also need an option to do neither, we
break out the common code into a shared `convert_chan_err` macro.
Matt Corallo [Thu, 18 Mar 2021 16:44:31 +0000 (12:44 -0400)]
Use new chan_restoration macros in channel_reestablish handling.
This merges the code for restoring channel functionality between
channel monitor updating restored and peer reconnection, reducing
redundant code.
Matt Corallo [Tue, 24 Nov 2020 00:12:31 +0000 (19:12 -0500)]
[fuzz] Allow SendAnnouncementSigs events in chanmon_consistency
Because of the merge between peer reconnection and channel monitor
updating channel restoration code, we now sometimes generate
(somewhat spurious) announcement signatures when restoring channel
monitor updating. This should not result in a fuzzing failure.
Matt Corallo [Tue, 24 Nov 2020 00:12:19 +0000 (19:12 -0500)]
[fuzz] Be more strict about msg events in chanmon_consistency
This fails chanmon_consistency on IgnoreError error events and on
messages left over to be sent to a just-disconnected peer, which
should have been drained.
These should never appear, so consider them a fuzzer fail case.
Matt Corallo [Tue, 15 Dec 2020 02:52:10 +0000 (21:52 -0500)]
Clean up channel updating macro somewhat
This mostly swaps some Vecs that can only ever contain one element
for Options.
Matt Corallo [Fri, 20 Nov 2020 19:29:33 +0000 (14:29 -0500)]
Move channel restoration after monitor update to a two-part macro
The channel restoration code in channel monitor updating and peer
reconnection both do incredibly similar things, and there is
little reason to have them be separate. Sadly because they require
holding a lock with a reference to elements in the lock, its not
practical to make them utility functions, so instead we introduce
a two-step macro here which will eventually be used for both.
Because we still support pre-NLL Rust, the macro has to be in two
parts - one which runs with the channel_state lock, and one which
does not.
Matt Corallo [Fri, 20 Nov 2020 19:06:17 +0000 (14:06 -0500)]
Drop unused variable and loop in channel_monitor_updated
Matt Corallo [Mon, 23 Nov 2020 23:22:29 +0000 (18:22 -0500)]
[fuzz] Print the output of all failed test cases, not one test.
Our fuzz tests previously only printed the log output of the first
fuzz test case to fail. This commit changes that (with lots of
auto-generated updates) to ensure we print all log outputs.
Matt Corallo [Thu, 20 May 2021 17:10:52 +0000 (17:10 +0000)]
Merge pull request #918 from TheBlueMatt/2021-05-dup-claims
Make payments not duplicatively fail/succeed on reload/reconnect
Matt Corallo [Thu, 20 May 2021 16:38:18 +0000 (16:38 +0000)]
[fuzz] Make get_secure_random_bytes in chanmon_consistency unique
Matt Corallo [Sun, 9 May 2021 17:53:55 +0000 (17:53 +0000)]
Test pending payments when resolved duplicatively via reconnect
Matt Corallo [Sat, 8 May 2021 22:54:26 +0000 (22:54 +0000)]
Test pending payments when duplicatively resolved on chain
Matt Corallo [Sun, 9 May 2021 19:19:11 +0000 (19:19 +0000)]
Make payments not duplicatively fail/succeed on reload/reconnect
We currently generate duplicative PaymentFailed/PaymentSent events
in two cases:
a) If we receive a update_fulfill_htlc message, followed by a
disconnect, then a resend of the same update_fulfill_htlc
message, we will generate a PaymentSent event for each message.
b) When a Channel is closed, any outbound HTLCs which were relayed
through it are simply dropped when the Channel is. From there,
the ChannelManager relies on the ChannelMonitor having a copy of
the relevant fail-/claim-back data and processes the HTLC
fail/claim when the ChannelMonitor tells it to.
If, due to an on-chain event, an HTLC is failed/claimed, and
then we serialize the ChannelManager, but do not re-serialize
the relevant ChannelMonitor, we may end up getting a duplicative
event.
In order to provide the expected consistency, we add explicit
tracking of pending outbound payments using their unique
session_priv field which is generated when the payment is sent.
Then, before generating PaymentFailed/PaymentSent events, we check
that the session_priv for the payment is still pending.
Thix fixes #209.
Matt Corallo [Thu, 20 May 2021 16:26:49 +0000 (16:26 +0000)]
Merge pull request #925 from valentinewallace/ignore-zlib-compressed-msgs
Ignore messages with zlib-compressed fields
Valentine Wallace [Wed, 19 May 2021 19:15:41 +0000 (15:15 -0400)]
Return new DecodeError::UnsupportedCompression
if we receive a message with zlib-compressed values.
Valentine Wallace [Wed, 19 May 2021 18:05:03 +0000 (14:05 -0400)]
Add new DecodeError for messages that include zlib-compressed values
No need to disconnect peers if this error is encountered. It just means
we can't use some of their gossip messages.
Matt Corallo [Tue, 18 May 2021 15:24:57 +0000 (15:24 +0000)]
Merge pull request #923 from ariard/2021-05-split-sign-justice
Split `sign_justice_transaction` in two halves
Antoine Riard [Mon, 17 May 2021 18:22:12 +0000 (14:22 -0400)]
keysinterface: replace Result match with map_err
Antoine Riard [Sat, 15 May 2021 21:20:10 +0000 (17:20 -0400)]
Split `sign_justice_transaction` in two halves
To avoid caller data struct storing HTLC-related information when
a revokeable output is claimed on top of a commitment/second-stage
HTLC transactions, we split `keysinterface::sign_justice_transaction`
in two new halves `keysinterfaces::sign_justice_revoked_output` and
`keysinterfaces::sign_justice_revoked_htlc`.
Further, this split offers more flexibility to signer policy as a
commitment revokeable output might be of a value far more significant
than HTLC ones.
Matt Corallo [Sat, 15 May 2021 00:44:40 +0000 (00:44 +0000)]
Merge pull request #916 from TheBlueMatt/2021-05-fix-disabled-announcements
Avoid persisting a ChannelManager after each timer tick and send update_channel re-enable messages
Matt Corallo [Thu, 13 May 2021 15:41:05 +0000 (15:41 +0000)]
Simplify+expand per-channel check in test_announce_disable_channels
Matt Corallo [Thu, 13 May 2021 15:33:54 +0000 (15:33 +0000)]
Rename Channel::UpdateStatus to be more descriptive and update docs
Matt Corallo [Fri, 7 May 2021 22:17:29 +0000 (22:17 +0000)]
Do not wait in PersistenceNotifier when the persist flag is set
When we had a event which caused us to set the persist flag in a
PersistenceNotifier in between wait calls, we will still wait,
potentially not persisting a ChannelManager when we should.
Worse, for wait_timeout, this caused us to always wait up to the
timeout, but then always return true that a persistence is needed.
Instead, we simply check the persist flag before waiting, returning
immediately if it is set.
Matt Corallo [Fri, 7 May 2021 22:16:47 +0000 (22:16 +0000)]
Avoid persisting a ChannelManager update after each timer tick
Currently, when a user calls `ChannelManager::timer_tick_occurred`
we always set the persister's update flag to true. This results in
a ChannelManager persistence after each timer tick, even when
nothing happened.
Instead, we add a new flag to `PersistenceNotifierGuard` to
indicate if we should skip setting the update flag.
Matt Corallo [Sat, 8 May 2021 21:20:02 +0000 (21:20 +0000)]
Test new channel_update re-enabled announcements
Matt Corallo [Fri, 14 May 2021 22:31:34 +0000 (22:31 +0000)]
Merge pull request #922 from valentinewallace/update-default-expiry
Correct default invoice expiry
Valentine Wallace [Fri, 14 May 2021 14:06:17 +0000 (10:06 -0400)]
Correct default expiry.
We previously stated in the codebase that the default invoice expiry
stated in the spec is 2 hours. It's actually 1 hour.
Matt Corallo [Fri, 14 May 2021 01:44:07 +0000 (01:44 +0000)]
Merge pull request #921 from TheBlueMatt/2021-05-no-control-chars
Don't return ASCII control characters in HTTP error messages
Matt Corallo [Thu, 13 May 2021 19:34:17 +0000 (19:34 +0000)]
Don't return ASCII control characters in HTTP error messages
Matt Corallo [Fri, 7 May 2021 20:56:10 +0000 (20:56 +0000)]
Send update_channel messages to re-enable a disabled channel
Currently, we only send an update_channel message after
disconnecting a peer and waiting some time. We do not send a
followup when the peer has been reconnected for some time.
This changes that behavior to make the disconnect and reconnect
channel updates symmetric, and also simplifies the state machine
somewhat to make it more clear.
Finally, it serializes the current announcement state so that we
usually know when we need to send a new update_channel.
Matt Corallo [Thu, 13 May 2021 19:25:47 +0000 (19:25 +0000)]
Merge pull request #919 from valentinewallace/http-error-msgs
Return more error details on http's read_response
Valentine Wallace [Tue, 11 May 2021 23:59:55 +0000 (19:59 -0400)]
Return more error details on http's read_response
Otherwise helpful error information gets swallowed
Matt Corallo [Mon, 10 May 2021 18:04:28 +0000 (18:04 +0000)]
Merge pull request #915 from TheBlueMatt/2021-05-bump-rpc-timeout
Increase the timeout for RPC responses from Bitcoin Core
Matt Corallo [Thu, 6 May 2021 20:42:02 +0000 (20:42 +0000)]
Increase the timeout for RPC responses from Bitcoin Core
Early sample testing showed multiple users hitting
EWOULDBLOCK/EAGAIN waiting for an initial response from Bitcoin
Core while it was doing some long operation (eg UTXO cache
flushing). Instead of only waiting 5 seconds for each attempt, we
now wait a full two minutes, but only for the first header
response, not each byte.
Matt Corallo [Fri, 7 May 2021 22:40:22 +0000 (22:40 +0000)]
Allow retrying HTTP requests if we hit a socket timeout
Matt Corallo [Fri, 7 May 2021 15:19:44 +0000 (15:19 +0000)]
Merge pull request #912 from TheBlueMatt/2021-05-more-chan-info
Add flags for if a channel is pub and funding txo in ChannelDetails
Matt Corallo [Thu, 6 May 2021 21:49:24 +0000 (21:49 +0000)]
Merge pull request #911 from TheBlueMatt/2021-05-fix-cltv-diff
Matt Corallo [Thu, 6 May 2021 21:08:08 +0000 (21:08 +0000)]
Merge pull request #914 from TheBlueMatt/2021-05-log-txids
Always log_info when we broadcast a transaction, including the txid
Matt Corallo [Thu, 6 May 2021 20:26:39 +0000 (20:26 +0000)]
Rename ChannelDetails::is_live to is_usable
This matches is_usable_channels and slightly better captures the
meaning.
Matt Corallo [Wed, 5 May 2021 16:15:11 +0000 (16:15 +0000)]
Indiciate if a channel is outbound/confirmed in ChannelDetails
Matt Corallo [Wed, 5 May 2021 02:33:29 +0000 (02:33 +0000)]
Add flags for if a channel is pub and funding txo in ChannelDetails
Matt Corallo [Thu, 6 May 2021 16:21:44 +0000 (16:21 +0000)]
Always log_info when we broadcast a transaction, including the txid
Matt Corallo [Thu, 6 May 2021 15:34:51 +0000 (15:34 +0000)]
Clarify comment on CHECK_CLTV_EXPIRE_SANITY_2 somewhat
Matt Corallo [Thu, 6 May 2021 01:25:44 +0000 (01:25 +0000)]
Merge pull request #910 from TheBlueMatt/2021-05-sort-addrs
By default sort network addrs before inclusion in node_announcements
Matt Corallo [Wed, 5 May 2021 02:17:02 +0000 (02:17 +0000)]
Correct MIN_FINAL_CLTV_EXPIRY to match our enforced requirements
Our enforced requirements for HTLC acceptance is that we have at
least HTLC_FAIL_BACK_BUFFER blocks before the HTLC expires. When we
receive an HTLC, the HTLC would be "already expired" if its
`cltv_expiry` is current-block + 1 (ie the next block could
broadcast the commitment transaction and time out the HTLC). From
there, we want an extra HTLC_FAIL_BACK_BUFFER in blocks, plus an
extra block or two to account for any differences in the view of
the current height before send or while the HTLC is transiting the
network.
Matt Corallo [Wed, 5 May 2021 02:04:58 +0000 (02:04 +0000)]
Increase the CLTV delay required on payments and forwards
This increases the CLTV_CLAIM_BUFFER constant to 18, much better
capturing how long it takes to go on chain to claim payments.
This is also more in line with other clients, and the spec, which
sets the default CLTV delay in invoices to 18.
As a side effect, we have to increase MIN_CLTV_EXPIRY_DELTA as
otherwise as are subject to an attack where someone can hold an
HTLC being forwarded long enough that we *also* close the channel
on which we received the HTLC.
Matt Corallo [Wed, 5 May 2021 00:19:11 +0000 (00:19 +0000)]
By default sort network addrs before inclusion in node_announcements
In #797, we stopped enforcing that read/sent node_announcements
had their addresses sorted. While this is fine in practice, we
should still make a best-effort to sort them to comply with the
spec's forward-compatibility requirements, which we do here in the
ChannelManager.
Matt Corallo [Tue, 4 May 2021 02:14:03 +0000 (02:14 +0000)]
Merge pull request #909 from TheBlueMatt/2021-04-0.0.14
Bump versions to 0.0.14, lightning-invoice 0.5
Matt Corallo [Tue, 4 May 2021 02:00:52 +0000 (02:00 +0000)]
Merge pull request #901 from jkczyz/2021-04-invoice-feature-semantics
Hide InvoiceFeatures behind InvoiceBuilder API
Matt Corallo [Tue, 4 May 2021 01:44:18 +0000 (01:44 +0000)]
Merge pull request #845 from ariard/2021-03-hardcode-dust
Switch to a max counterparty's `dust_limit_satoshis` constant
Jeffrey Czyz [Fri, 30 Apr 2021 21:30:58 +0000 (14:30 -0700)]
Test feature bit semantics in Invoice::from_signed
Jeffrey Czyz [Fri, 30 Apr 2021 20:11:34 +0000 (13:11 -0700)]
Test feature bits in InvoiceBuilder