-
Notifications
You must be signed in to change notification settings - Fork 130
Add probing service #815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add probing service #815
Changes from all commits
7f3ce11
6574bf9
c22e05e
2bd1c7c
7fb74e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ use bitcoin::Network; | |
| use lightning::ln::msgs::SocketAddress; | ||
| use lightning::routing::gossip::NodeAlias; | ||
| use lightning::routing::router::RouteParametersConfig; | ||
| use lightning::routing::scoring::ProbabilisticScoringFeeParameters; | ||
| use lightning::util::config::{ | ||
| ChannelConfig as LdkChannelConfig, MaxDustHTLCExposure as LdkMaxDustHTLCExposure, UserConfig, | ||
| }; | ||
|
|
@@ -27,6 +28,10 @@ const DEFAULT_BDK_WALLET_SYNC_INTERVAL_SECS: u64 = 80; | |
| const DEFAULT_LDK_WALLET_SYNC_INTERVAL_SECS: u64 = 30; | ||
| const DEFAULT_FEE_RATE_CACHE_UPDATE_INTERVAL_SECS: u64 = 60 * 10; | ||
| const DEFAULT_PROBING_LIQUIDITY_LIMIT_MULTIPLIER: u64 = 3; | ||
| pub(crate) const DEFAULT_PROBING_INTERVAL_SECS: u64 = 10; | ||
| pub(crate) const DEFAULT_MAX_PROBE_LOCKED_MSAT: u64 = 100_000_000; // 100k sats | ||
| pub(crate) const MIN_PROBE_AMOUNT_MSAT: u64 = 1_000_000; // 1k sats | ||
| pub(crate) const DEFAULT_MAX_PROBE_AMOUNT_MSAT: u64 = 10_000_000; // 10k sats | ||
| const DEFAULT_ANCHOR_PER_CHANNEL_RESERVE_SATS: u64 = 25_000; | ||
|
|
||
| // The default timeout after which we abort a wallet syncing operation. | ||
|
|
@@ -128,9 +133,11 @@ pub(crate) const HRN_RESOLUTION_TIMEOUT_SECS: u64 = 5; | |
| /// | `log_level` | Debug | | ||
| /// | `anchor_channels_config` | Some(..) | | ||
| /// | `route_parameters` | None | | ||
| /// | `scoring_fee_params` | See [`ProbabilisticScoringFeeParameters`] | | ||
| /// | ||
| /// See [`AnchorChannelsConfig`] and [`RouteParametersConfig`] for more information regarding their | ||
| /// respective default values. | ||
| /// See [`AnchorChannelsConfig`], [`RouteParametersConfig`], and | ||
| /// [`ProbabilisticScoringFeeParameters`] for more information regarding their respective default | ||
| /// values. | ||
| /// | ||
| /// [`Node`]: crate::Node | ||
| pub struct Config { | ||
|
|
@@ -192,6 +199,12 @@ pub struct Config { | |
| /// **Note:** If unset, default parameters will be used, and you will be able to override the | ||
| /// parameters on a per-payment basis in the corresponding method calls. | ||
| pub route_parameters: Option<RouteParametersConfig>, | ||
| /// Parameters for the probabilistic scorer used when computing payment routes. | ||
| /// | ||
| /// These correspond to [`ProbabilisticScoringFeeParameters`] in LDK. If unset, LDK defaults | ||
| /// are used. Notably, [`ProbabilisticScoringFeeParameters::probing_diversity_penalty_msat`] | ||
| /// should be set to a non-zero value for some of the probing strategies. | ||
| pub scoring_fee_params: ProbabilisticScoringFeeParameters, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think I agree with this addition of
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We only need it for There are two options:
The question is will anything else try to set this value: Thoughts:
Still I stick to the second, as it in the end it is a router setting. |
||
| } | ||
|
|
||
| impl Default for Config { | ||
|
|
@@ -206,6 +219,7 @@ impl Default for Config { | |
| anchor_channels_config: Some(AnchorChannelsConfig::default()), | ||
| route_parameters: None, | ||
| node_alias: None, | ||
| scoring_fee_params: ProbabilisticScoringFeeParameters::default(), | ||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.