A Rust library that implements the main lightning logic of the lipa wallet app.

Overview

lipa-lightning-lib (3L)

Warning This library is not production ready yet.

Build

Test

Start Nigiri Bitcoin:

nigiri start --ln

The --ln flag is not strictly required, but it starts an LND and a CLN node which you are likely going to use to test the library.

Start the example node:

cargo run --example node

View logs in ./.ldk/logs.txt.

Comments
  • Shutdown node gracefully when LightningNode gets out of scope

    Shutdown node gracefully when LightningNode gets out of scope

    When the node is being stopped, we want do 2 things for a clean shutdown:

    • Disconnect all peers
    • Gracefully shutdown the BackgroundProcessor

    The background processor actually implements the Drop trait itself. This stops the thread in which the background processor is running (wrapped inside macro define_run_body!). So there's no need to do anything from 3L's side, it can just wait for the BackgroundProcessor to go out of scope.

    On the contrary, function peer_manager.disconnect_all_peers() is never being called. However, when I was running tests locally and I was checking on the connected LND node, the 3L example node was actually anyways being disconnected from LND as soon as the 3L example node stopped running. I couldn't figure out how this disconnecting was initiated, but maybe it was just the LND node that disconnected the peer, once the TCP connection disconnected.

    Anyhow, it feels kind of like the right thing to do to call peer_manager.disconnect_all_peers() when the node shuts down, and there doesn't seem to be any big drawback even if it would turn out that this step was actually not necessary.

    opened by gcomte 5
  • Fix Clippy warnings

    Fix Clippy warnings

    Due to our clippy check CI not working as intended, some clippy warnings are now being thrown on develop.

    This PR removes them, by mostly making the clippy rules less strict, which must be undone as soon as the different yet-to-be-developed parts of the project are finally integrated!

    opened by gcomte 4
  • Add StorageCallback interface

    Add StorageCallback interface

    Hi.

    Please have a look at the proposed interface for persistence callback. Seems that we do not need a full-featured file system access, so we can limit our API to a key-value storage. Mobile devs please check if you can easily implement such interface. Lightning devs please make sure that such interface would be enough for our needs.

    opened by andrei-21 3
  • Rapid gossip sync

    Rapid gossip sync

    ~~Just a draft. Shows the basic interface of RGS.~~

    When trying to deserialise a NetworkGraph of the entire mainnet LN, it can take a long while if it's a debug release.

    opened by danielgranhao 2
  • Update uniffi_bindgen requirement from 0.20.0 to 0.21.0

    Update uniffi_bindgen requirement from 0.20.0 to 0.21.0

    Updates the requirements on uniffi_bindgen to permit the latest version.

    Changelog

    Sourced from uniffi_bindgen's changelog.

    v0.21.0 - (2022-10-14)

    All changes in v0.21.0.

    ⚠️ Breaking Changes ⚠️

    • uniffi_bindgen: Renamed the throws() method of Function, Method, and Constructor to throws_str(). Added a new throws() method that returns a boolean.

    What's changed

    • Added support for exceptions in callback interface methods.
    • Improved error stringifying on Kotlin and Ruby (the message and to_s methods respectively).

    v0.20.0 - (2022-09-13)

    All changes in v0.20.0.

    ⚠️ Breaking Changes ⚠️

    • Renamed the uniffi_bindgen cydlib argument to lib_file, since it can also accept static libraries

    What's changed

    • The guess_crate_root function is now public

    What's changed

    • The UDL can contain identifiers which are also keywords in Swift, except in namespace functions.

    v0.19.6 - (2022-08-31)

    All changes in v0.19.6.

    • Fix callback interface init signature in Rust scaffolding
    • Drop unused dependencies
    • Update to MSRV 1.61.0

    v0.19.5 - (2022-08-29)

    All changes in v0.19.5.

    • Fixed a small bug in the 0.19.4 release, where the extraneous r# was present in the HashMap generated scaffolding.

    v0.19.4 - (2022-08-29)

    All changes in v0.19.4.

    • Implement Timestamp and Duration types in Ruby backend.
    • Fixed in a bug where callback interfaces with arguments that include underscores do not get converted to camelCase on Swift.

    ... (truncated)

    Commits
    • 846612a (cargo-release) version 0.21.0
    • 058eb83 Better stringify support for fielded errors
    • 5c8b45a Adding changelog entry for callback interface errors
    • 6cf76c2 proc-macro: Resolve unresolved types nested inside builtin generics
    • aca89ec Fix limition -> limitation typo (#1366)
    • c00230a Don't document UniFFI metadata
    • 30eb8b1 Update ui tests
    • 7424c2b Disable unused_qualifications lint for type assertions
    • 88d1f26 Fix clippy lint
    • 293766c Enable and fix extra lint
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update lightning-rapid-gossip-sync requirement from 0.0.110 to 0.0.111

    Update lightning-rapid-gossip-sync requirement from 0.0.110 to 0.0.111

    Updates the requirements on lightning-rapid-gossip-sync to permit the latest version.

    Release notes

    Sourced from lightning-rapid-gossip-sync's releases.

    v0.0.110

    API Updates

    • ChannelManager::send_probe and Score::probe_{failed,successful} have been added to make probing more explicit, as well as new Event::Probe{Failed,Successful} events (#1567).
    • ProbabilisticScoringParameters::banned_nodes has been renamed manual_node_penalties and changed to take msat penalties (#1592).
    • Per-payment tracking of failed paths was added to enable configuration of ProbabilisticScoringParameters::considered_impossible_penalty_msat (#1600)
    • ProbabilisticScoringParameters::base_penalty_amount_multiplier_msat was added to allow a penalty that is only amount-dependent (#1617).
    • ProbabilisticScoringParameters::amount_penalty_multiplier_msat was renamed liquidity_penalty_amount_multiplier_msat (#1617).
    • A new Event::HTLCHandlingFailed has been added which provides visibility into failures to forward/claim accepted HTLCs (#1403).
    • Support has been added for DNS hostnames in the NetAddress type, see [BOLT PR #911](lightning/bolts#911) (#1553).
    • GossipSync now has rapid, p2p, and none constructors (#1618).
    • lightning-net-tokio no longer requires types to be in Arcs (#1623).
    • The htlc_maximum_msat field is now required in ChannelUpdate gossip messages. In tests this rejects < 1% of channels (#1519).
    • ReadOnlyNetworkGraph::{channel,node} have been added to query for individual channel/node data, primarily for bindings users (#1543).
    • FeeEstimator implementations are now wrapped internally to ensure values below 253 sats/kW are never used (#1552).
    • Route selection no longer attempts to randomize path selection. This is unlikely to lead to a material change in the paths selected (#1610).

    Bug Fixes

    • Fixed a panic when deserializing ChannelDetails objects (#1588).
    • When routing, channels are no longer fully saturated before MPP splits are generated, instead a configuration knob was added as PaymentParameters::max_channel_saturation_power_of_half (#1605).
    • Fixed a panic which occurred in ProbabilisticScorer when wallclock time goes backwards across a restart (#1603).

    Serialization Compatibility

    • All new fields are ignored by prior versions of LDK. All new fields are not present when reading objects serialized by prior versions of LDK.
    • Channel information written in the NetworkGraph which is missing htlc_maximum_msat may be dropped on deserialization (#1519).
    • Similarly, node information written in the NetworkGraph which contains an invalid hostname may be dropped on deserialization (#1519).

    In total, this release features 79 files changed, 2935 insertions, 1363 deletions in 52 commits from 9 authors, in alphabetical order:

    • Duncan Dean
    • Elias Rohrer
    • Jeffrey Czyz
    • Matt Corallo

    ... (truncated)

    Changelog

    Sourced from lightning-rapid-gossip-sync's changelog.

    0.0.110 - 2022-07-26 - "Routing, With a Vengeance"

    API Updates

    • ChannelManager::send_probe and Score::probe_{failed,successful} have been added to make probing more explicit, as well as new Event::Probe{Failed,Successful} events (#1567).
    • ProbabilisticScoringParameters::banned_nodes has been renamed manual_node_penalties and changed to take msat penalties (#1592).
    • Per-payment tracking of failed paths was added to enable configuration of ProbabilisticScoringParameters::considered_impossible_penalty_msat (#1600)
    • ProbabilisticScoringParameters::base_penalty_amount_multiplier_msat was added to allow a penalty that is only amount-dependent (#1617).
    • ProbabilisticScoringParameters::amount_penalty_multiplier_msat was renamed liquidity_penalty_amount_multiplier_msat (#1617).
    • A new Event::HTLCHandlingFailed has been added which provides visibility into failures to forward/claim accepted HTLCs (#1403).
    • Support has been added for DNS hostnames in the NetAddress type, see [BOLT PR #911](lightning/bolts#911) (#1553).
    • GossipSync now has rapid, p2p, and none constructors (#1618).
    • lightning-net-tokio no longer requires types to be in Arcs (#1623).
    • The htlc_maximum_msat field is now required in ChannelUpdate gossip messages. In tests this rejects < 1% of channels (#1519).
    • ReadOnlyNetworkGraph::{channel,node} have been added to query for individual channel/node data, primarily for bindings users (#1543).
    • FeeEstimator implementations are now wrapped internally to ensure values below 253 sats/kW are never used (#1552).
    • Route selection no longer attempts to randomize path selection. This is unlikely to lead to a material change in the paths selected (#1610).

    Bug Fixes

    • Fixed a panic when deserializing ChannelDetails objects (#1588).
    • When routing, channels are no longer fully saturated before MPP splits are generated, instead a configuration knob was added as PaymentParameters::max_channel_saturation_power_of_half (#1605).
    • Fixed a panic which occurred in ProbabilisticScorer when wallclock time goes backwards across a restart (#1603).

    Serialization Compatibility

    • All new fields are ignored by prior versions of LDK. All new fields are not present when reading objects serialized by prior versions of LDK.
    • Channel information written in the NetworkGraph which is missing htlc_maximum_msat may be dropped on deserialization (#1519).
    • Similarly, node information written in the NetworkGraph which contains an invalid hostname may be dropped on deserialization (#1519).

    In total, this release features 79 files changed, 2935 insertions, 1363 deletions in 52 commits from 9 authors, in alphabetical order:

    • Duncan Dean
    • Elias Rohrer
    • Jeffrey Czyz

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update lightning-background-processor requirement from 0.0.110 to 0.0.111

    Update lightning-background-processor requirement from 0.0.110 to 0.0.111

    Updates the requirements on lightning-background-processor to permit the latest version.

    Release notes

    Sourced from lightning-background-processor's releases.

    v0.0.110

    API Updates

    • ChannelManager::send_probe and Score::probe_{failed,successful} have been added to make probing more explicit, as well as new Event::Probe{Failed,Successful} events (#1567).
    • ProbabilisticScoringParameters::banned_nodes has been renamed manual_node_penalties and changed to take msat penalties (#1592).
    • Per-payment tracking of failed paths was added to enable configuration of ProbabilisticScoringParameters::considered_impossible_penalty_msat (#1600)
    • ProbabilisticScoringParameters::base_penalty_amount_multiplier_msat was added to allow a penalty that is only amount-dependent (#1617).
    • ProbabilisticScoringParameters::amount_penalty_multiplier_msat was renamed liquidity_penalty_amount_multiplier_msat (#1617).
    • A new Event::HTLCHandlingFailed has been added which provides visibility into failures to forward/claim accepted HTLCs (#1403).
    • Support has been added for DNS hostnames in the NetAddress type, see [BOLT PR #911](lightning/bolts#911) (#1553).
    • GossipSync now has rapid, p2p, and none constructors (#1618).
    • lightning-net-tokio no longer requires types to be in Arcs (#1623).
    • The htlc_maximum_msat field is now required in ChannelUpdate gossip messages. In tests this rejects < 1% of channels (#1519).
    • ReadOnlyNetworkGraph::{channel,node} have been added to query for individual channel/node data, primarily for bindings users (#1543).
    • FeeEstimator implementations are now wrapped internally to ensure values below 253 sats/kW are never used (#1552).
    • Route selection no longer attempts to randomize path selection. This is unlikely to lead to a material change in the paths selected (#1610).

    Bug Fixes

    • Fixed a panic when deserializing ChannelDetails objects (#1588).
    • When routing, channels are no longer fully saturated before MPP splits are generated, instead a configuration knob was added as PaymentParameters::max_channel_saturation_power_of_half (#1605).
    • Fixed a panic which occurred in ProbabilisticScorer when wallclock time goes backwards across a restart (#1603).

    Serialization Compatibility

    • All new fields are ignored by prior versions of LDK. All new fields are not present when reading objects serialized by prior versions of LDK.
    • Channel information written in the NetworkGraph which is missing htlc_maximum_msat may be dropped on deserialization (#1519).
    • Similarly, node information written in the NetworkGraph which contains an invalid hostname may be dropped on deserialization (#1519).

    In total, this release features 79 files changed, 2935 insertions, 1363 deletions in 52 commits from 9 authors, in alphabetical order:

    • Duncan Dean
    • Elias Rohrer
    • Jeffrey Czyz
    • Matt Corallo

    ... (truncated)

    Changelog

    Sourced from lightning-background-processor's changelog.

    0.0.110 - 2022-07-26 - "Routing, With a Vengeance"

    API Updates

    • ChannelManager::send_probe and Score::probe_{failed,successful} have been added to make probing more explicit, as well as new Event::Probe{Failed,Successful} events (#1567).
    • ProbabilisticScoringParameters::banned_nodes has been renamed manual_node_penalties and changed to take msat penalties (#1592).
    • Per-payment tracking of failed paths was added to enable configuration of ProbabilisticScoringParameters::considered_impossible_penalty_msat (#1600)
    • ProbabilisticScoringParameters::base_penalty_amount_multiplier_msat was added to allow a penalty that is only amount-dependent (#1617).
    • ProbabilisticScoringParameters::amount_penalty_multiplier_msat was renamed liquidity_penalty_amount_multiplier_msat (#1617).
    • A new Event::HTLCHandlingFailed has been added which provides visibility into failures to forward/claim accepted HTLCs (#1403).
    • Support has been added for DNS hostnames in the NetAddress type, see [BOLT PR #911](lightning/bolts#911) (#1553).
    • GossipSync now has rapid, p2p, and none constructors (#1618).
    • lightning-net-tokio no longer requires types to be in Arcs (#1623).
    • The htlc_maximum_msat field is now required in ChannelUpdate gossip messages. In tests this rejects < 1% of channels (#1519).
    • ReadOnlyNetworkGraph::{channel,node} have been added to query for individual channel/node data, primarily for bindings users (#1543).
    • FeeEstimator implementations are now wrapped internally to ensure values below 253 sats/kW are never used (#1552).
    • Route selection no longer attempts to randomize path selection. This is unlikely to lead to a material change in the paths selected (#1610).

    Bug Fixes

    • Fixed a panic when deserializing ChannelDetails objects (#1588).
    • When routing, channels are no longer fully saturated before MPP splits are generated, instead a configuration knob was added as PaymentParameters::max_channel_saturation_power_of_half (#1605).
    • Fixed a panic which occurred in ProbabilisticScorer when wallclock time goes backwards across a restart (#1603).

    Serialization Compatibility

    • All new fields are ignored by prior versions of LDK. All new fields are not present when reading objects serialized by prior versions of LDK.
    • Channel information written in the NetworkGraph which is missing htlc_maximum_msat may be dropped on deserialization (#1519).
    • Similarly, node information written in the NetworkGraph which contains an invalid hostname may be dropped on deserialization (#1519).

    In total, this release features 79 files changed, 2935 insertions, 1363 deletions in 52 commits from 9 authors, in alphabetical order:

    • Duncan Dean
    • Elias Rohrer
    • Jeffrey Czyz

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update lightning-net-tokio requirement from 0.0.110 to 0.0.111

    Update lightning-net-tokio requirement from 0.0.110 to 0.0.111

    Updates the requirements on lightning-net-tokio to permit the latest version.

    Release notes

    Sourced from lightning-net-tokio's releases.

    v0.0.110

    API Updates

    • ChannelManager::send_probe and Score::probe_{failed,successful} have been added to make probing more explicit, as well as new Event::Probe{Failed,Successful} events (#1567).
    • ProbabilisticScoringParameters::banned_nodes has been renamed manual_node_penalties and changed to take msat penalties (#1592).
    • Per-payment tracking of failed paths was added to enable configuration of ProbabilisticScoringParameters::considered_impossible_penalty_msat (#1600)
    • ProbabilisticScoringParameters::base_penalty_amount_multiplier_msat was added to allow a penalty that is only amount-dependent (#1617).
    • ProbabilisticScoringParameters::amount_penalty_multiplier_msat was renamed liquidity_penalty_amount_multiplier_msat (#1617).
    • A new Event::HTLCHandlingFailed has been added which provides visibility into failures to forward/claim accepted HTLCs (#1403).
    • Support has been added for DNS hostnames in the NetAddress type, see [BOLT PR #911](lightning/bolts#911) (#1553).
    • GossipSync now has rapid, p2p, and none constructors (#1618).
    • lightning-net-tokio no longer requires types to be in Arcs (#1623).
    • The htlc_maximum_msat field is now required in ChannelUpdate gossip messages. In tests this rejects < 1% of channels (#1519).
    • ReadOnlyNetworkGraph::{channel,node} have been added to query for individual channel/node data, primarily for bindings users (#1543).
    • FeeEstimator implementations are now wrapped internally to ensure values below 253 sats/kW are never used (#1552).
    • Route selection no longer attempts to randomize path selection. This is unlikely to lead to a material change in the paths selected (#1610).

    Bug Fixes

    • Fixed a panic when deserializing ChannelDetails objects (#1588).
    • When routing, channels are no longer fully saturated before MPP splits are generated, instead a configuration knob was added as PaymentParameters::max_channel_saturation_power_of_half (#1605).
    • Fixed a panic which occurred in ProbabilisticScorer when wallclock time goes backwards across a restart (#1603).

    Serialization Compatibility

    • All new fields are ignored by prior versions of LDK. All new fields are not present when reading objects serialized by prior versions of LDK.
    • Channel information written in the NetworkGraph which is missing htlc_maximum_msat may be dropped on deserialization (#1519).
    • Similarly, node information written in the NetworkGraph which contains an invalid hostname may be dropped on deserialization (#1519).

    In total, this release features 79 files changed, 2935 insertions, 1363 deletions in 52 commits from 9 authors, in alphabetical order:

    • Duncan Dean
    • Elias Rohrer
    • Jeffrey Czyz
    • Matt Corallo

    ... (truncated)

    Changelog

    Sourced from lightning-net-tokio's changelog.

    0.0.110 - 2022-07-26 - "Routing, With a Vengeance"

    API Updates

    • ChannelManager::send_probe and Score::probe_{failed,successful} have been added to make probing more explicit, as well as new Event::Probe{Failed,Successful} events (#1567).
    • ProbabilisticScoringParameters::banned_nodes has been renamed manual_node_penalties and changed to take msat penalties (#1592).
    • Per-payment tracking of failed paths was added to enable configuration of ProbabilisticScoringParameters::considered_impossible_penalty_msat (#1600)
    • ProbabilisticScoringParameters::base_penalty_amount_multiplier_msat was added to allow a penalty that is only amount-dependent (#1617).
    • ProbabilisticScoringParameters::amount_penalty_multiplier_msat was renamed liquidity_penalty_amount_multiplier_msat (#1617).
    • A new Event::HTLCHandlingFailed has been added which provides visibility into failures to forward/claim accepted HTLCs (#1403).
    • Support has been added for DNS hostnames in the NetAddress type, see [BOLT PR #911](lightning/bolts#911) (#1553).
    • GossipSync now has rapid, p2p, and none constructors (#1618).
    • lightning-net-tokio no longer requires types to be in Arcs (#1623).
    • The htlc_maximum_msat field is now required in ChannelUpdate gossip messages. In tests this rejects < 1% of channels (#1519).
    • ReadOnlyNetworkGraph::{channel,node} have been added to query for individual channel/node data, primarily for bindings users (#1543).
    • FeeEstimator implementations are now wrapped internally to ensure values below 253 sats/kW are never used (#1552).
    • Route selection no longer attempts to randomize path selection. This is unlikely to lead to a material change in the paths selected (#1610).

    Bug Fixes

    • Fixed a panic when deserializing ChannelDetails objects (#1588).
    • When routing, channels are no longer fully saturated before MPP splits are generated, instead a configuration knob was added as PaymentParameters::max_channel_saturation_power_of_half (#1605).
    • Fixed a panic which occurred in ProbabilisticScorer when wallclock time goes backwards across a restart (#1603).

    Serialization Compatibility

    • All new fields are ignored by prior versions of LDK. All new fields are not present when reading objects serialized by prior versions of LDK.
    • Channel information written in the NetworkGraph which is missing htlc_maximum_msat may be dropped on deserialization (#1519).
    • Similarly, node information written in the NetworkGraph which contains an invalid hostname may be dropped on deserialization (#1519).

    In total, this release features 79 files changed, 2935 insertions, 1363 deletions in 52 commits from 9 authors, in alphabetical order:

    • Duncan Dean
    • Elias Rohrer
    • Jeffrey Czyz

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update lightning requirement from 0.0.110 to 0.0.111

    Update lightning requirement from 0.0.110 to 0.0.111

    Updates the requirements on lightning to permit the latest version.

    Release notes

    Sourced from lightning's releases.

    v0.0.110

    API Updates

    • ChannelManager::send_probe and Score::probe_{failed,successful} have been added to make probing more explicit, as well as new Event::Probe{Failed,Successful} events (#1567).
    • ProbabilisticScoringParameters::banned_nodes has been renamed manual_node_penalties and changed to take msat penalties (#1592).
    • Per-payment tracking of failed paths was added to enable configuration of ProbabilisticScoringParameters::considered_impossible_penalty_msat (#1600)
    • ProbabilisticScoringParameters::base_penalty_amount_multiplier_msat was added to allow a penalty that is only amount-dependent (#1617).
    • ProbabilisticScoringParameters::amount_penalty_multiplier_msat was renamed liquidity_penalty_amount_multiplier_msat (#1617).
    • A new Event::HTLCHandlingFailed has been added which provides visibility into failures to forward/claim accepted HTLCs (#1403).
    • Support has been added for DNS hostnames in the NetAddress type, see [BOLT PR #911](lightning/bolts#911) (#1553).
    • GossipSync now has rapid, p2p, and none constructors (#1618).
    • lightning-net-tokio no longer requires types to be in Arcs (#1623).
    • The htlc_maximum_msat field is now required in ChannelUpdate gossip messages. In tests this rejects < 1% of channels (#1519).
    • ReadOnlyNetworkGraph::{channel,node} have been added to query for individual channel/node data, primarily for bindings users (#1543).
    • FeeEstimator implementations are now wrapped internally to ensure values below 253 sats/kW are never used (#1552).
    • Route selection no longer attempts to randomize path selection. This is unlikely to lead to a material change in the paths selected (#1610).

    Bug Fixes

    • Fixed a panic when deserializing ChannelDetails objects (#1588).
    • When routing, channels are no longer fully saturated before MPP splits are generated, instead a configuration knob was added as PaymentParameters::max_channel_saturation_power_of_half (#1605).
    • Fixed a panic which occurred in ProbabilisticScorer when wallclock time goes backwards across a restart (#1603).

    Serialization Compatibility

    • All new fields are ignored by prior versions of LDK. All new fields are not present when reading objects serialized by prior versions of LDK.
    • Channel information written in the NetworkGraph which is missing htlc_maximum_msat may be dropped on deserialization (#1519).
    • Similarly, node information written in the NetworkGraph which contains an invalid hostname may be dropped on deserialization (#1519).

    In total, this release features 79 files changed, 2935 insertions, 1363 deletions in 52 commits from 9 authors, in alphabetical order:

    • Duncan Dean
    • Elias Rohrer
    • Jeffrey Czyz
    • Matt Corallo

    ... (truncated)

    Changelog

    Sourced from lightning's changelog.

    0.0.110 - 2022-07-26 - "Routing, With a Vengeance"

    API Updates

    • ChannelManager::send_probe and Score::probe_{failed,successful} have been added to make probing more explicit, as well as new Event::Probe{Failed,Successful} events (#1567).
    • ProbabilisticScoringParameters::banned_nodes has been renamed manual_node_penalties and changed to take msat penalties (#1592).
    • Per-payment tracking of failed paths was added to enable configuration of ProbabilisticScoringParameters::considered_impossible_penalty_msat (#1600)
    • ProbabilisticScoringParameters::base_penalty_amount_multiplier_msat was added to allow a penalty that is only amount-dependent (#1617).
    • ProbabilisticScoringParameters::amount_penalty_multiplier_msat was renamed liquidity_penalty_amount_multiplier_msat (#1617).
    • A new Event::HTLCHandlingFailed has been added which provides visibility into failures to forward/claim accepted HTLCs (#1403).
    • Support has been added for DNS hostnames in the NetAddress type, see [BOLT PR #911](lightning/bolts#911) (#1553).
    • GossipSync now has rapid, p2p, and none constructors (#1618).
    • lightning-net-tokio no longer requires types to be in Arcs (#1623).
    • The htlc_maximum_msat field is now required in ChannelUpdate gossip messages. In tests this rejects < 1% of channels (#1519).
    • ReadOnlyNetworkGraph::{channel,node} have been added to query for individual channel/node data, primarily for bindings users (#1543).
    • FeeEstimator implementations are now wrapped internally to ensure values below 253 sats/kW are never used (#1552).
    • Route selection no longer attempts to randomize path selection. This is unlikely to lead to a material change in the paths selected (#1610).

    Bug Fixes

    • Fixed a panic when deserializing ChannelDetails objects (#1588).
    • When routing, channels are no longer fully saturated before MPP splits are generated, instead a configuration knob was added as PaymentParameters::max_channel_saturation_power_of_half (#1605).
    • Fixed a panic which occurred in ProbabilisticScorer when wallclock time goes backwards across a restart (#1603).

    Serialization Compatibility

    • All new fields are ignored by prior versions of LDK. All new fields are not present when reading objects serialized by prior versions of LDK.
    • Channel information written in the NetworkGraph which is missing htlc_maximum_msat may be dropped on deserialization (#1519).
    • Similarly, node information written in the NetworkGraph which contains an invalid hostname may be dropped on deserialization (#1519).

    In total, this release features 79 files changed, 2935 insertions, 1363 deletions in 52 commits from 9 authors, in alphabetical order:

    • Duncan Dean
    • Elias Rohrer
    • Jeffrey Czyz

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies blocked 
    opened by dependabot[bot] 2
  • Implement polling fee estimator

    Implement polling fee estimator

    Implemented the FeeEstimator using an approach very similar to the one in LDK-Sample and Sensei. Main difference is that it uses esplora as the backend instead of bitcoind.

    I've done basic manual testing to verify that it works.

    I'm not sure how to write automated tests for this estimator because:

    • Unit tests aren't a good fit due to external services being required
    • Integration tests aren't a good fit due to FeeEstimation not being exposed in 3L's interface

    Current unit tests confirm good behavior when an unavailable esplora is used.

    The new FeeEstimator implementation is being bypassed when running on test networks (testnet, regtest, etc) because otherwise, channels can't be opened between LDK and LND. LND defaults to a high fee when on test networks. So high (relative to LDK fee estimates) that LDK doesn't accept incoming channels with the error: Peer's feerate much too high. Actual: 12500. Our expected upper limit: 6250. Despite ignoring the fee estimates from esplora, I left the background task running so that testing scenarios remain realistic (network traffic + number of running tasks).

    opened by danielgranhao 1
  • Update lightning-rapid-gossip-sync requirement from 0.0.112 to 0.0.113

    Update lightning-rapid-gossip-sync requirement from 0.0.112 to 0.0.113

    Updates the requirements on lightning-rapid-gossip-sync to permit the latest version.

    Release notes

    Sourced from lightning-rapid-gossip-sync's releases.

    v0.0.113

    0.0.113 - Dec 16, 2022 - "Big Movement Intercepted"

    API Updates

    • ChannelManager::send_payment now takes an explicit PaymentId which is a loose idempotency token. See send_payment docs for more (#1761, #1826).
    • HTLCs bound for SCIDs from ChannelManager::get_intercept_scid are now intercepted and can be forwarded manually over any channel (#1835, #1893).
    • Confirm::get_relevant_txids now returns a BlockHash, expanding the set of cases where transaction_unconfirmed must be called, see docs (#1796).
    • Pending outbound payments are no longer automatically timed-out a few blocks after failure. Thus, in order to avoid leaking memory, you MUST call ChannelManager::abandon_payment when you no longer wish to retry (#1761).
    • ChannelManager::abandon_payment docs were updated to note that the payment may return to pending after a restart if no persistence occurs (#1907).
    • Event::PaymentReceived has been renamed Event::PaymentClaimable (#1891).
    • Event handling is now optionally async for Rust users (#1787).
    • user_channel_id is now a u128 and random for inbound channels (#1790).
    • A new ChannelReady event is generated whenever a channel becomes ready to be used, i.e., after both sides sent the channel_ready message (#1743).
    • NetworkGraph now prunes channels where either node is offline for 2 weeks and refuses to accept re-announcements of pruned channels (#1735).
    • Onion messages are now read in CustomOnionMessageHandler rather than via MaybeReadableArgs (#1809).
    • Added a new util to generate an invoice with a custom hash (#1894) - create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash
    • Signers are now by default re-derived using KeysInterface's new derive_channel_signer rather than read_chan_signer (#1867).
    • Confirm::transactions_confirmed is now idempotent (#1861).
    • ChannelManager::compute_inflight_htlcs has been added to fetch in-flight HTLCs for scoring. Note that InvoicePayer does this for you (#1830).
    • Added PaymentClaimable::via_channel_id (#1856).
    • Added the node_id (phantom or regular) to payment events (#1766).
    • Added the funding transaction confirmations to ChannelDetails (#1856).
    • BlindedRoute has been renamed BlindedPath (#1918).
    • Support for the BOLT 4 "legacy" onion format has been removed, in line with its removal in the spec and vanishingly rare use (#1413).
    • ChainMonitor::list_pending_monitor_updates was added (#1834).
    • Signing for non-zero-fee anchor commitments is supported again (#1828).
    • Several helpers for transaction matching and generation are now pub (#1839).

    Bug Fixes

    • Fixed a rare race where a crash may result in a pending HTLC not being failed backwards, leading to a force-closure by our counterparty (#1857).
    • Avoid incorrectly assigning a lower-bound on channel liquidity when routing fails due to a closed channel earlier in the path (#1817).
    • If a counterparty increases the channel fee, but not enough per our own fee estimator, we no longer force-close the channel (#1852).
    • Several bugs in the lightning-background-processor future feature were fixed, including requirements doc corrections (#1843, #1845, #1851).

    ... (truncated)

    Changelog

    Sourced from lightning-rapid-gossip-sync's changelog.

    0.0.113 - Dec 16, 2022 - "Big Movement Intercepted"

    API Updates

    • ChannelManager::send_payment now takes an explicit PaymentId which is a loose idempotency token. See send_payment docs for more (#1761, #1826).
    • HTLCs bound for SCIDs from ChannelManager::get_intercept_scid are now intercepted and can be forwarded manually over any channel (#1835, #1893).
    • Confirm::get_relevant_txids now returns a BlockHash, expanding the set of cases where transaction_unconfirmed must be called, see docs (#1796).
    • Pending outbound payments are no longer automatically timed-out a few blocks after failure. Thus, in order to avoid leaking memory, you MUST call ChannelManager::abandon_payment when you no longer wish to retry (#1761).
    • ChannelManager::abandon_payment docs were updated to note that the payment may return to pending after a restart if no persistence occurs (#1907).
    • Event::PaymentReceived has been renamed Event::PaymentClaimable (#1891).
    • Event handling is now optionally async for Rust users (#1787).
    • user_channel_id is now a u128 and random for inbound channels (#1790).
    • A new ChannelReady event is generated whenever a channel becomes ready to be used, i.e., after both sides sent the channel_ready message (#1743).
    • NetworkGraph now prunes channels where either node is offline for 2 weeks and refuses to accept re-announcements of pruned channels (#1735).
    • Onion messages are now read in CustomOnionMessageHandler rather than via MaybeReadableArgs (#1809).
    • Added a new util to generate an invoice with a custom hash (#1894) - create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash
    • Signers are now by default re-derived using KeysInterface's new derive_channel_signer rather than read_chan_signer (#1867).
    • Confirm::transactions_confirmed is now idempotent (#1861).
    • ChannelManager::compute_inflight_htlcs has been added to fetch in-flight HTLCs for scoring. Note that InvoicePayer does this for you (#1830).
    • Added PaymentClaimable::via_channel_id (#1856).
    • Added the node_id (phantom or regular) to payment events (#1766).
    • Added the funding transaction confirmations to ChannelDetails (#1856).
    • BlindedRoute has been renamed BlindedPath (#1918).
    • Support for the BOLT 4 "legacy" onion format has been removed, in line with its removal in the spec and vanishingly rare use (#1413).
    • ChainMonitor::list_pending_monitor_updates was added (#1834).
    • Signing for non-zero-fee anchor commitments is supported again (#1828).
    • Several helpers for transaction matching and generation are now pub (#1839).

    Bug Fixes

    • Fixed a rare race where a crash may result in a pending HTLC not being failed backwards, leading to a force-closure by our counterparty (#1857).
    • Avoid incorrectly assigning a lower-bound on channel liquidity when routing fails due to a closed channel earlier in the path (#1817).
    • If a counterparty increases the channel fee, but not enough per our own fee estimator, we no longer force-close the channel (#1852).
    • Several bugs in the lightning-background-processor future feature were fixed, including requirements doc corrections (#1843, #1845, #1851).
    • Some failure messages sent back when failing an HTLC were corrected (#1895).

    ... (truncated)

    Commits
    • f6a9382 Merge pull request #1917 from TheBlueMatt/2022-12-0.0.113
    • f96ac1d Bump crate versions to 0.0.113/invoice 0.21
    • 7658f15 Add release notes for 0.0.113
    • 26b1674 Only do backtrace builds on stable to fix MSRV break in CI
    • 40b78ea Merge pull request #1918 from TheBlueMatt/2022-12-one-blinded-path
    • 8dbf6db Update references to "blinded route" to "blinded path"
    • a0d38d7 Rename blinded_route variables and module to blinded_path
    • 9b6de78 Unify blinding nomenclature to call them "paths" not "routes".
    • d4dc05b Merge pull request #1915 from TheBlueMatt/2022-12-jit-reload-consistency
    • 2d68183 Drop forwarded HTLCs which were still pending at persist-time
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Set up lspd with CLN

    Set up lspd with CLN

    WIP/POC of using lspd with CLN.

    At the moment crashes when trying to pay a registered invoice.

    **BROKEN** lightningd: Plugin for htlc_accepted returned non-result response {"jsonrpc":"2.0","error":{"code":-32603,"message":"-32603: Expecting float64 input for Onion.uint64, but got string"},"id":74}
    
    opened by danielgranhao 0
Owner
lipa
lipa
A library in Rust for theorem proving with Intuitionistic Propositional Logic.

Prop Propositional logic with types in Rust. A library in Rust for theorem proving with Intuitionistic Propositional Logic. Supports theorem proving i

AdvancedResearch 48 Jan 3, 2023
Logimu: Circuit & logic gate simulator

Logimu: Circuit & logic gate simulator The main goal of Logimu is to simulate large circuits at a high speed. Features Live simulation Embed other cir

David Hoppenbrouwers 4 Nov 20, 2022
Soufflé is a variant of Datalog for tool designers crafting analyses in Horn clauses. Soufflé synthesizes a native parallel C++ program from a logic specification.

Welcome! This is the official repository for the Soufflé language project. The Soufflé language is similar to Datalog (but has terms known as records)

The Soufflé Project 672 Dec 29, 2022
Propositional logic evaluator and rule-based pattern matcher

Plogic Propositional logic evaluator and pattern transformer written in Rust. Plogic evaluates logic expressions in a REPL (Read, Execute, Print, Loop

Jan 17 Nov 25, 2022
μLA: Micro Logic Analyzer for RP2040

μLA: Micro Logic Analyzer SUMP/OLS compatible logic analyzer firmware for RP2040 based boards. Features 16 channels 100 MHz sampling rate, 1 sample pe

Vitaly Domnikov 197 Apr 19, 2023
A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator

tmux-thumbs A lightning fast version of tmux-fingers written in Rust for copy pasting with vimium/vimperator like hints. Usage Press ( prefix + Space

Ferran Basora 598 Jan 2, 2023
This crate implements an array_chunks method for iterators

This crate implements an array_chunks method for iterators. It behaves like [slice::array_chunks] but works with any [Iterator] type. Several nightly

kangalioo 1 Jan 24, 2022
A lightning fast state management module for Yew.

yewv A lightning fast state management module for Yew built with performance and simplicity as a first priority. Who is this for? If you wish to use a

null 7 Dec 8, 2022
Quad-rand implements pseudo-random generator

quad-rand quad-rand implements pseudo-random generator based on rust atomics. Compatible with wasm and any oth

Fedor Logachev 10 Feb 11, 2022
Fusion is a cross-platform App Dev ToolKit build on Rust . Fusion lets you create Beautiful and Fast apps for mobile and desktop platform.

Fusion is a cross-platform App Dev ToolKit build on Rust . Fusion lets you create Beautiful and Fast apps for mobile and desktop platform.

Fusion 1 Oct 19, 2021
How to use libtor in a Rust app

libtor example Uses libtor crate to run a Tor daemon in process. This example spawns the Tor daemon using Tokio's spawn_blocking, and then spawns othe

Byron Hambly 1 Nov 28, 2021
Reload Rust code without app restarts. For faster feedback cycles.

hot-lib-reloader hot-lib-reloader is a development tool that allows you to reload functions of a running Rust program. This allows to do "live program

Robert Krahn 274 Jan 1, 2023
An example app in Rust for CircleCI's Dynamic Config demo

circleci-dynamic-config-example An example app in Rust for CircleCI's dynamic config demo. Dynamic config allows you to dynamically generate CircleCI'

yujiosaka 2 Oct 6, 2022
OpenAI ChatGPT desktop app for Mac, Windows, & Linux menubar using Tauri & Rust

ChatGPT Desktop App Unofficial open source OpenAI ChatGPT desktop app for mac, windows, and linux menubar using tauri & rust. Downloads Windows (2.7 M

Sonny Lazuardi 732 Jan 5, 2023
Czkawka is a simple, fast and easy to use app to remove unnecessary files from your computer.

Multi functional app to find duplicates, empty folders, similar images etc.

Rafał Mikrut 9.2k Jan 4, 2023
Simple comparison app for iRacing car setups.

CarTunes Simple comparison app for iRacing car setups. About Export a setup in the iRacing garage and CarTunes will let you compare it with other setu

Jay Oster 31 Jan 7, 2023
A VtubeStudio plugin that allows iFacialMocap to stream data to the app, enabling full apple ARkit facial tracking to be used for 2D Vtuber models.

facelink_rs A VtubeStudio plugin that allows iFacialMocap to stream data to the app, enabling full apple ARkit facial tracking to be used for 2D Vtube

Slashscreen 2 May 6, 2022
Easily sync your clipboard between devices. This is a work in progress app.

Clipboard Sync Description Easily sync your clipboard between devices. This is a work in progress app. Stack Frontend: React Tauri isomorphic-ws TSX,

Steveplays 2 Mar 2, 2022
Extracting react native app source code from apk file.

extract-myreact Extracting React Native app source code from apk file.

Aan 3 Oct 5, 2022