Skip to content

Conversation

@tnull
Copy link
Collaborator

@tnull tnull commented Jan 8, 2026

In commit dd55d47 we started ignoring the legacy latest_channel_monitor_archival_height field of NodeMetrics. However, we erroneously started reading it as Option<u32>, though, given it's an optional field, it should have been read as a plain u32 that might or might not be present. Here we fix this error.

We also add a test case asserting serialization backwards compatibility for non-VSS backends.

In commit dd55d47 we started ignoring
the legacy `latest_channel_monitor_archival_height` field of
`NodeMetrics`. However, we erroneously started reading it as
`Option<u32>`, though, given it's an optional field, it should have been
read as a plain `u32` that might or might not be present. Here we fix this error.
@tnull tnull requested a review from TheBlueMatt January 8, 2026 20:20
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jan 8, 2026

👋 Thanks for assigning @TheBlueMatt as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

TheBlueMatt
TheBlueMatt previously approved these changes Jan 8, 2026
Copy link
Contributor

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops thanks

tnull added 2 commits January 8, 2026 21:25
We previously added a test asserting backwards compatibility for nodes
reinitializing from a VSS backend. However, given VSS tests are only
continously run in CI we here add the same test using the default SQLite
backend, ensuring backwards compatibility breakage is also checked when
running tests locally.
@tnull
Copy link
Collaborator Author

tnull commented Jan 8, 2026

Oops thanks

Sorry, force-pushed some minor fixups dropping VSS-specific comments from the testcase:

> git diff-tree -U2 e07e9f5c 93b6b425
diff --git a/tests/integration_tests_rust.rs b/tests/integration_tests_rust.rs
index 2855c425..4b82d1f4 100644
--- a/tests/integration_tests_rust.rs
+++ b/tests/integration_tests_rust.rs
@@ -41,5 +41,4 @@ use lightning_invoice::{Bolt11InvoiceDescription, Description};
 use lightning_types::payment::{PaymentHash, PaymentPreimage};
 use log::LevelFilter;
-use rand::{rng, Rng};

 #[tokio::test(flavor = "multi_thread", worker_threads = 1)]
@@ -2449,5 +2448,5 @@ async fn persistence_backwards_compatibility() {
 	let node_entropy = NodeEntropy::from_seed_bytes(seed_bytes);

-	// Setup a v0.6.2 `Node` persisted with the v0 scheme.
+	// Setup a v0.6.2 `Node`
 	let (old_balance, old_node_id) = {
 		let mut builder_old = ldk_node_062::Builder::new();
@@ -2473,9 +2472,5 @@ async fn persistence_backwards_compatibility() {
 		let node_id = node_old.node_id();

-		// Workaround necessary as v0.6.2's VSS runtime wasn't dropsafe in a tokio context.
-		tokio::task::block_in_place(move || {
-			node_old.stop().unwrap();
-			drop(node_old);
-		});
+		node_old.stop().unwrap();

 		(balance, node_id)

@tnull tnull requested a review from TheBlueMatt January 8, 2026 20:27
@TheBlueMatt
Copy link
Contributor

CI is still sad though.

@tnull
Copy link
Collaborator Author

tnull commented Jan 9, 2026

CI is still sad though.

Yeah, that seems really unrelated this time:

error: failed to build archive at `/home/runner/work/ldk-node/ldk-node/target/debug/deps/libldk_node.rlib`: No space left on device (os error 28)

@tnull tnull merged commit 861f6e3 into lightningdevkit:main Jan 9, 2026
25 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants