Skip to content

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Sep 25, 2025

Based on #633.

We recently implemented persistence for the lightning-liquidity service
state. Here we make corresponding changes in LDK Node to have our
service state persisted.

@tnull tnull added this to the 0.7 milestone Sep 25, 2025
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Sep 25, 2025

👋 I see @jkczyz was un-assigned.
If you'd like another reviewer assignment, please click here.

@tnull tnull marked this pull request as draft September 25, 2025 14:27
@tnull tnull removed the request for review from jkczyz September 25, 2025 14:28
@tnull tnull force-pushed the 2025-09-liq-persistence branch from dad5932 to 53d4f0a Compare September 30, 2025 08:12
@tnull tnull changed the base branch from develop to main October 7, 2025 08:52
@tnull
Copy link
Collaborator Author

tnull commented Oct 7, 2025

We decided to make the develop behavior (tracking more-recent LDK main) the default behavior. With #655 we merged develop into main and now deleted the develop branch. Hence the base branch is changed to main here, too.

We recently implemented persistence for the `lightning-liquidity` service
state. Here we make corresponding changes in LDK Node to have our
service state persisted.
@tnull tnull force-pushed the 2025-09-liq-persistence branch from 53d4f0a to a404a94 Compare October 8, 2025 08:51
@tnull
Copy link
Collaborator Author

tnull commented Oct 8, 2025

Ready for review now that #633 landed.

@tnull tnull marked this pull request as ready for review October 8, 2025 08:53
@ldk-reviews-bot ldk-reviews-bot requested a review from jkczyz October 8, 2025 08:54
@tnull tnull requested review from joostjager and removed request for jkczyz October 8, 2025 08:54
liquidity_client_config,
)
.await
.map_err(|_| BuildError::ReadFailed)?,
Copy link
Contributor

Choose a reason for hiding this comment

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

Reading data in new, isn't that an undesirable pattern?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe, yes. We did it over at lightningdevkit/rust-lightning#4059 since the individual service states are persisted under different locations and the LiquidityManager is the singular interface on which you can decide which services to enable. So allowing an API that allows to enable some services but not reading all the service states seemed complicated and error-prone (i.e., worse than reading them all in new.


let liquidity_source = Arc::new(liquidity_source_builder.build());
let liquidity_source = runtime
.block_on(async move { liquidity_source_builder.build().await.map(Arc::new) })?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming this is temporary until async building?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we'll remove this when we move building to Node::start and make it async.

@tnull tnull merged commit e4bb615 into lightningdevkit:main Oct 8, 2025
14 of 15 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