0.0.107
API Updates
- Channels larger than 16777215 sats (Wumbo!) are now supported and can be
enabled for inbound channels using
ChannelHandshakeLimits::max_funding_satoshis(#1425). - Support for feature
option_zeroconf, allowing immediate forwarding of
payments after channel opening. This is configured for outbound channels
usingChannelHandshakeLimits::trust_own_funding_0confwhereas
ChannelManager::accept_inbound_channel_from_trusted_peer_0confhas to be
used for accepting inbound channels (#1401, #1505). ChannelManager::claim_fundsno longer returns aboolto indicate success.
Instead, anEvent::PaymentClaimedis generated if the claim was successful.
Likewise,ChannelManager::fail_htlc_backwardsno longer has a return value
(#1434).lightning-rapid-gossip-syncis a new crate for syncing gossip data from a
server, primarily aimed at mobile devices (#1155).RapidGossipSynccan be passed toBackgroundProcessorin order to persist
theNetworkGraphand handleNetworkUpdates during event handling (#1433,
#1517).NetGraphMsgHandlerhas been renamed toP2PGossipSync, thenetwork_graph
module has been renamed togossip, andNetworkUpdate::ChannelClosedhas
been renamedNetworkUpdate::ChannelFailure(#1159).- Added a
filtered_block_connectedmethod tochain::Listenand a default
implementation ofblock_connectedfor those fetching filtered instead of
full blocks (#1453). - The
lightning-block-synccrate'sBlockSourcetrait methods now take
&selfinstead of&mut self(#1307). inbound_paymentmodule is now public to allow for creating invoices without
aChannelManager(#1384).lightning-block-sync'sinitandpollmodules support&dyn BlockSource
which can be determined at runtime (#1423).lightning-invoicecrate'sutilsnow accept an expiration time (#1422,
#1474).Event::PaymentForwardedincludesprev_channel_idandnext_channel_id
(#1419, #1475).chain::Watch::release_pending_monitor_events' return type now associates
MonitorEvents with fundingOutPoints(#1475).lightning-background-processorcrate'sPersistertrait has been moved to
lightningcrate'sutil::persistmodule, which now has a general
KVStorePersistertrait. Blanket implementations ofPersisterand
chainmonitor::Persistare given for types implementingKVStorePersister.
lightning-persister'sFilesystemPersisterimplementsKVStorePersister
(#1417).ChannelDetailsandChannelCounterpartyinclude fields for HTLC minimum
and maximum values (#1378).- Added a
max_inbound_htlc_value_in_flight_percent_of_channelfield to
ChannelHandshakeConfig, capping the total value of outstanding inbound
HTLCs for a channel (#1444). ProbabilisticScoreris parameterized by aLogger, which it uses to log
channel liquidity updates or lack thereof (#1405).ChannelDetailshas anoutbound_htlc_limit_msatfield, which should be
used in routing instead ofoutbound_capacity_msat(#1435).ProbabilisticScorer's channel liquidities can be logged via
debug_log_liquidity_stats(#1460).BackgroundProcessornow takes an optionalWriteableScorewhich it will
persist using thePersistertrait's newpersist_scorermethod (#1416).- Upgraded to
bitcoincrate version 0.28.1 (#1389). ShutdownScript::new_witness_programnow takes aWitnessVersioninstead of
aNonZeroU8(#1389).- Channels will no longer be automatically force closed when the counterparty
is disconnected due to incompatibility (#1429). ChannelManagermethods for funding, accepting, and closing channels now
take acounterparty_node_idparameter, which has also been added as a field
toEvent::FundingGenerationReady(#1479, #1485).InvoicePayer::newnow takes aRetryenum (replacing theRetryAttempts
struct), which supports both attempt- and timeout-based retrying (#1418).Score::channel_penalty_msattakes aChannelUsagestruct, which contains
the capacity as anEffectiveCapacityenum and any potential in-flight HTLC
value, rather than a singleu64. Used byProbabilisticScorerfor more
accurate penalties (#1456).build_route_from_hopsis a new function useful for constructing aRoute
given a specific list of public keys (#1491).FundingLockedmessage has been renamedChannelReady, and related
identifiers have been renamed accordingly (#1506).core2::ioorstd::io(depending on feature flagsno-stdorstd) is
exported as alightning::iomodule (#1504).- The deprecated
Scorerhas been removed in favor orProbabilisticScorer
(#1512).
Performance Improvements
lightning-persistercrate'sFilesystemPersisteris faster by 15x (#1404).- Log gossip query messages at
GOSSIPinstead ofTRACEto avoid
overwhelming default logging (#1421). PeerManagersupports processing messages from different peers in parallel,
and this is taken advantage of in gossip processing (#1023).- Greatly reduced per-channel and per-node memory usage due to upgrade of
secp256k1crate to 0.22.1 andbitcoincrate to 0.28.1 - Reduced per-peer memory usage in
PeerManager(#1472).
Spec Compliance
find_routenow assumes variable-length onions by default for nodes where
support for the feature is unknown (#1414).- A
warnmessage is now sent when receiving achannel_reestablishwith an
old commitment transaction number rather than immediately force-closing the
channel (#1430). - When a
channel_updatemessage is included in an onion error'sfailuremsg,
its message type is now encoded. Reading such messages is also supported
(#1465).
Bug Fixes
- Fixed a bug where crashing while persisting a
ChannelMonitorUpdatefor a
part of a multi-path payment could cause loss of funds due to a partial
payment claim on restart (#1434). BackgroundProcessorhas been fixed to improve serialization reliability on
slow systems which can avoid force-closes (#1436).gossip_timestamp_filterfilters are now honored when sending gossip to
peers (#1452).- During a reorg, only force-close a channel if its funding transaction is
unconfirmed rather than as it loses confirmations (#1461). - Fixed a rare panic in
lightning-net-tokiowhen fetching a peer's socket
address after the connection has been closed caused by a race condition
(#1449). find_routewill no longer return routes that would cause onion construction
to fail in some cases (#1476).ProbabilisticScoreruses more precision when approximatinglog10(#1406).
Serialization Compatibility
- All above new events/fields are ignored by prior clients. All above new
events/fields are not present when reading objects serialized by prior
versions of the library. ChannelManagerserialization is no longer compatible with versions prior to
0.0.99 (#1401).- Channels with
option_zeroconffeature enabled (not required for 0-conf
channel use) will be unreadable by versions prior to 0.0.107 (#1401, #1505).
In total, this release features 96 files changed, 9304 insertions, 4503
deletions in 153 commits from 18 authors, in alphabetical order:
- Arik Sosman
- Devrandom
- Duncan Dean
- Elias Rohrer
- Jeffrey Czyz
- John Cantrell
- John Corser
- Jurvis Tan
- Justin Moon
- KaFai Choi
- Mateusz Faltyn
- Matt Corallo
- Valentine Wallace
- Viktor Tigerström
- Vincenzo Palazzo
- atalw
- dependabot[bot]
- shamardy