Skip to content

Commit 5a45889

Browse files
committed
multi: Update LDK to v0.0.111
1 parent 357ded4 commit 5a45889

File tree

10 files changed

+133
-65
lines changed

10 files changed

+133
-65
lines changed

Cargo.lock

Lines changed: 75 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ edition = "2021"
1313
[dependencies]
1414
# --- BITCOIN --- #
1515

16-
bitcoin = { version = "0.28.1", features = ["std", "use-serde"] }
16+
bitcoin = { version = "0.29", features = ["std", "serde"] }
1717
bitcoin-bech32 = "0.12"
1818
base64 = "0.13.0"
1919

2020
# --- LIGHTNING --- #
2121

22-
lightning = { version = "0.0.110", features = ["max_level_trace"] }
23-
# lightning-block-sync = { version = "0.0.110", features = [ "rpc-client" ] }
24-
lightning-invoice = { version = "0.18" }
25-
# lightning-net-tokio = { version = "0.0.110" }
22+
lightning = { version = "0.0.111", features = ["max_level_trace"] }
23+
# lightning-block-sync = { version = "0.0.111", features = [ "rpc-client" ] }
24+
lightning-invoice = { version = "0.19" }
25+
# lightning-net-tokio = { version = "0.0.111" }
2626

2727
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = ["max_level_trace"], branch = "main" }
2828
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", features = [ "rpc-client" ], branch = "main" }

common/src/root_seed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl RootSeed {
115115
.ckd_priv(&secp_ctx, child_number)
116116
.expect("should never fail")
117117
.private_key;
118-
KeyPair::from_secret_key(&secp_ctx, node_sk)
118+
KeyPair::from_secret_key(&secp_ctx, &node_sk)
119119
}
120120

121121
/// Derive the Lightning node pubkey.

lexe-ln/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ common = { path = "../common" }
1919

2020
# --- BITCOIN --- #
2121

22-
bitcoin = { version = "0.28.1", features = ["use-serde"] }
22+
bitcoin = { version = "0.29", features = ["serde"] }
2323
bitcoin-bech32 = "0.12"
2424
# bech32 = "0.8"
2525
base64 = "0.13.0"
2626

2727
# --- LIGHTNING --- #
2828

29-
lightning = { version = "0.0.110", features = ["max_level_trace"] }
30-
lightning-block-sync = { version = "0.0.110", features = [ "rpc-client" ] }
31-
lightning-invoice = { version = "0.18" }
32-
lightning-net-tokio = { version = "0.0.110" }
29+
lightning = { version = "0.0.111", features = ["max_level_trace"] }
30+
lightning-block-sync = { version = "0.0.111", features = [ "rpc-client" ] }
31+
lightning-invoice = { version = "0.19" }
32+
lightning-net-tokio = { version = "0.0.111" }
3333

3434
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = # ["max_level_trace"], branch = "main" }
3535
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", # features = [ "rpc-client" ], branch = "main" }

node/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ lexe-ln = { path = "../lexe-ln" }
2121

2222
# --- BITCOIN --- #
2323

24-
bitcoin = { version = "0.28.1", features = ["use-serde"] }
24+
bitcoin = { version = "0.29", features = ["serde"] }
2525
bitcoin-bech32 = "0.12"
2626
# bech32 = "0.8"
2727
base64 = "0.13.0"
2828

2929
# --- LIGHTNING --- #
3030

31-
lightning = { version = "0.0.110", features = ["max_level_trace"] }
32-
lightning-block-sync = { version = "0.0.110", features = [ "rpc-client" ] }
33-
lightning-invoice = { version = "0.18" }
34-
lightning-net-tokio = { version = "0.0.110" }
31+
lightning = { version = "0.0.111", features = ["max_level_trace"] }
32+
lightning-block-sync = { version = "0.0.111", features = [ "rpc-client" ] }
33+
lightning-invoice = { version = "0.19" }
34+
lightning-net-tokio = { version = "0.0.111" }
3535

3636
# lightning = { git = "https://github.com/lexe-tech/rust-lightning", features = # ["max_level_trace"], branch = "main" }
3737
# lightning-block-sync = { git = "https://github.com/lexe-tech/rust-lightning", # features = [ "rpc-client" ], branch = "main" }
@@ -122,7 +122,7 @@ tokio = { version = "=1.15.0", default-features = false, features = [
122122

123123
[target.'cfg(not(target_env = "sgx"))'.dev-dependencies]
124124
# Run bitcoin regtest for tests
125-
bitcoind = { version = "0.26", features = [ "22_0" ] }
125+
bitcoind = { version = "0.27", features = [ "22_0" ] }
126126
# Enable all default features outside SGX for better test convenience
127127
proptest = "1"
128128

node/src/init.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use lightning::chain;
2929
use lightning::chain::chainmonitor::ChainMonitor;
3030
use lightning::chain::keysinterface::KeysInterface;
3131
use lightning::chain::transaction::OutPoint;
32+
use lightning::onion_message::OnionMessenger;
3233
use lightning::routing::gossip::P2PGossipSync;
3334
use lightning_invoice::payment;
3435
use lightning_invoice::utils::DefaultRouter;
@@ -223,12 +224,17 @@ impl UserNode {
223224
scorer_res.context("Could not read probabilistic scorer")?;
224225
let scorer = Arc::new(Mutex::new(scorer));
225226

227+
// Init onion messenger
228+
let onion_messenger =
229+
Arc::new(OnionMessenger::new(keys_manager.clone(), logger.clone()));
230+
226231
// Initialize PeerManager
227232
let peer_manager = NodePeerManager::init(
228233
rng,
229234
&keys_manager,
230235
channel_manager.clone(),
231236
gossip_sync.clone(),
237+
onion_messenger,
232238
logger.clone(),
233239
);
234240

node/src/lexe/channel_manager/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ const CHANNEL_HANDSHAKE_CONFIG: ChannelHandshakeConfig =
8080
// so that it is possible to sweep all funds to an address
8181
// specified at the time of channel close.
8282
commit_upfront_shutdown_pubkey: false,
83+
// The counterparty must reserve 1% of the total channel value to be
84+
// claimable by us on-chain in the case of a channel breach.
85+
their_channel_reserve_proportional_millionths: 10_000,
8386
};
8487

8588
const CHANNEL_HANDSHAKE_LIMITS: ChannelHandshakeLimits =

0 commit comments

Comments
 (0)