Skip to content

Commit 6eed32f

Browse files
cdeckercdecker
authored andcommitted
deps: upgrade VLS to 1.0.0-rc.1
Bump vls-core, vls-persist, vls-protocol and vls-protocol-signer to 1.0.0-rc.1 (bitcoin 0.32 / LDK 0.2 stack). - gl-client: ChannelEntry moved upstream into vls-core and is now re-exported from lightning_signer::persist::model instead of vls_persist::model. The record format is unchanged, so entries persisted by the old version still deserialize, and rollbacks stay possible. - gl-client: update expected error string in test_empty_message; vls-protocol errors now have per-variant Display impls, which renders ShortRead as "short read". - gl-sdk: bump lightning-invoice 0.33 -> 0.34 to match vls-core and replace the std-feature-gated timestamp() with duration_since_epoch(). Note this is externally breaking for gl-client consumers that use the re-exported bitcoin/lightning/lightning_invoice types (LDK 0.1 -> 0.2).
1 parent 08c004d commit 6eed32f

7 files changed

Lines changed: 53 additions & 43 deletions

File tree

‎Cargo.lock‎

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

‎Cargo.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cln-rpc = "0.4"
3333
cln-plugin = "0.4"
3434
tonic = "0.11"
3535

36-
vls-core = "^0.14"
37-
vls-persist = "^0.14"
38-
vls-protocol-signer = "^0.14"
39-
vls-protocol = "^0.14"
36+
vls-core = "^1.0.0-rc.1"
37+
vls-persist = "^1.0.0-rc.1"
38+
vls-protocol-signer = "^1.0.0-rc.1"
39+
vls-protocol = "^1.0.0-rc.1"

‎libs/gl-client/src/persist.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl State {
212212
fn insert_channel(
213213
&mut self,
214214
key: &str,
215-
channel_entry: vls_persist::model::ChannelEntry,
215+
channel_entry: lightning_signer::persist::model::ChannelEntry,
216216
) -> Result<(), Error> {
217217
let key = format!("{CHANNEL_PREFIX}/{key}");
218218
self.ensure_not_tombstone(&key)?;
@@ -232,7 +232,7 @@ impl State {
232232
fn update_channel(
233233
&mut self,
234234
key: &str,
235-
channel_entry: vls_persist::model::ChannelEntry,
235+
channel_entry: lightning_signer::persist::model::ChannelEntry,
236236
) -> Result<(), Error> {
237237
trace!("Updating channel {key}");
238238
let key = format!("{CHANNEL_PREFIX}/{key}");
@@ -273,7 +273,7 @@ impl State {
273273
.values
274274
.get(&key)
275275
.ok_or_else(|| Error::Internal(format!("missing channel state for key {}", key)))?;
276-
let entry: vls_persist::model::ChannelEntry =
276+
let entry: lightning_signer::persist::model::ChannelEntry =
277277
serde_json::from_value(value.value.clone()).unwrap();
278278
Ok(entry.into())
279279
}
@@ -299,7 +299,7 @@ impl State {
299299
let key = k.split('/').last().unwrap();
300300
let key = vls_persist::model::NodeChannelId(hex::decode(&key).unwrap());
301301

302-
let value: vls_persist::model::ChannelEntry =
302+
let value: lightning_signer::persist::model::ChannelEntry =
303303
serde_json::from_value(v.value.clone()).unwrap();
304304
(key.channel_id(), value.into())
305305
})
@@ -757,7 +757,7 @@ impl Persist for MemoryPersister {
757757
let id = vls_persist::model::NodeChannelId::new(node_id, &stub.id0);
758758
let channel_value_satoshis = 0;
759759
let enforcement_state = lightning_signer::policy::validator::EnforcementState::new(0);
760-
let entry = vls_persist::model::ChannelEntry {
760+
let entry = lightning_signer::persist::model::ChannelEntry {
761761
channel_value_satoshis,
762762
channel_setup: None,
763763
id: None,
@@ -778,7 +778,7 @@ impl Persist for MemoryPersister {
778778
let node_channel_id = vls_persist::model::NodeChannelId::new(node_id, &channel.id0);
779779
let id = hex::encode(node_channel_id.0);
780780
let channel_value_satoshis = channel.setup.channel_value_sat;
781-
let entry = vls_persist::model::ChannelEntry {
781+
let entry = lightning_signer::persist::model::ChannelEntry {
782782
channel_value_satoshis,
783783
channel_setup: Some(channel.setup.clone()),
784784
id: channel.id.clone(),

‎libs/gl-client/src/persist/splice.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ impl State {
404404
if !key.starts_with(&key_prefix) || self.is_tombstone(key) {
405405
continue;
406406
}
407-
let channel: vls_persist::model::ChannelEntry =
407+
let channel: lightning_signer::persist::model::ChannelEntry =
408408
serde_json::from_value(entry.value.clone()).map_err(|e| {
409409
anyhow!("failed to decode channel state value for key {key}: {e}")
410410
})?;
@@ -986,10 +986,10 @@ mod tests {
986986
}
987987
}
988988

989-
fn channel_entry(txid: &str, vout: u32) -> vls_persist::model::ChannelEntry {
989+
fn channel_entry(txid: &str, vout: u32) -> lightning_signer::persist::model::ChannelEntry {
990990
let secret = SecretKey::from_slice(&[1; 32]).unwrap();
991991
let pubkey = PublicKey::from_secret_key(&Secp256k1::signing_only(), &secret);
992-
vls_persist::model::ChannelEntry {
992+
lightning_signer::persist::model::ChannelEntry {
993993
channel_value_satoshis: 1_000_000,
994994
channel_setup: Some(ChannelSetup {
995995
is_outbound: true,

‎libs/gl-client/src/signer/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ mod tests {
18211821
.await
18221822
.unwrap_err()
18231823
.to_string(),
1824-
*"protocol error: ShortRead"
1824+
*"protocol error: short read"
18251825
)
18261826
}
18271827

‎libs/gl-sdk/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ bitcoin = { version = "0.32", features = ["base64"] }
2020
gl-client = { version = "0.7.0", path = "../gl-client" }
2121
hex = "0.4"
2222
log = "0.4"
23-
lightning-invoice = "0.33"
23+
lightning-invoice = "0.34"
2424
once_cell = "1.21.3"
2525
serde = { version = "1", features = ["derive"] }
2626
serde_json = "1"

‎libs/gl-sdk/src/input.rs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,7 @@ fn try_parse_bolt11(input: &str) -> Option<Result<ParsedInput, Error>> {
240240

241241
let amount_msat = parsed.amount_milli_satoshis();
242242
let expiry = parsed.expiry_time().as_secs();
243-
let timestamp = parsed
244-
.timestamp()
245-
.duration_since(std::time::SystemTime::UNIX_EPOCH)
246-
.unwrap_or_default()
247-
.as_secs();
243+
let timestamp = parsed.duration_since_epoch().as_secs();
248244

249245
Some(Ok(ParsedInput::Bolt11 {
250246
invoice: ParsedInvoice {

0 commit comments

Comments
 (0)