Skip to content

Conversation

@tnull
Copy link
Collaborator

@tnull tnull commented Dec 4, 2025

Previously, VssStore was a private object that could only be constructed internally via the Builder object. However, some users might want to use VssStore independently of/before the Node is constructed.

To this end, we here expose a new VssStoreBuilder that allows to independently construct a VssStore instance that then can be handed to Builder::build_with_store.

For now we keep the previous VSS-related methods on Builder around, but have them reuse the VssStoreBuilder internally. This also allows us to not change anything related to bindings. For bindings, we still have to explore if/how we can expose VssStore in the future.

FWIW, after this PR lands it might also be a good time to finally upstream VssStore to the lightning-persister crate, which was the original plan ever since we added VssStore.

@tnull tnull added this to the 0.8 milestone Dec 4, 2025
@tnull tnull requested a review from benthecarman December 4, 2025 14:26
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Dec 4, 2025

👋 Thanks for assigning @benthecarman 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.

@tnull tnull mentioned this pull request Dec 4, 2025
@tnull tnull moved this to Goal: Merge in Weekly Goals Dec 4, 2025
@tnull tnull self-assigned this Dec 4, 2025
/// [VSS]: https://github.com/lightningdevkit/vss-server/blob/main/README.md
/// [LNURL-auth]: https://github.com/lnurl/luds/blob/luds/04.md
pub fn build(
&self, lnurl_auth_server_url: String, fixed_headers: HashMap<String, String>,
Copy link
Contributor

@benthecarman benthecarman Dec 4, 2025

Choose a reason for hiding this comment

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

Is there a reason for these we using &self instead of consuming it with self? I see we do the same for the node builder but typically builders consume themselves when done, it would allow you to remove some clones

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, for the Builder we do that to be able to reuse it in the bindings variant ArcedNodeBuilder (as bindings don't support move semantics, only reference-counted Arcs). Here, we go the same route as we will at least attempt to expose VssStore/VssStoreBuilder in bidnings, though with the new async KVStore trait that could prove difficult, we'll see.

@tnull tnull requested a review from benthecarman December 5, 2025 07:38
@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @benthecarman! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

Copy link
Contributor

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

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

lgtm on squash

Previously, `VssStore` was a private object that could only be
constructed internally via the `Builder` object. However, some users
might want to use `VssStore` independently of/before the `Node` is
constructed.

To this end, we here expose a new `VssStoreBuilder` that
allows to independently construct a `VssStore` instance that then can be
handed to `Builder::build_with_store`.

For now we keep the previous VSS-related methods on `Builder` around,
but have them reuse the `VssStoreBuilder` internally. This also allows
us to not change anything related to bindings. For bindings, we still have
to explore if/how we can expose `VssStore` in the future.
@tnull tnull force-pushed the 2025-11-allow-vss-store-access branch from 3e78125 to fe7e39f Compare December 8, 2025 08:23
@tnull
Copy link
Collaborator Author

tnull commented Dec 8, 2025

lgtm on squash

Squashed the fixup without further changes. Landing.

@tnull tnull merged commit f81dc65 into lightningdevkit:main Dec 8, 2025
18 checks passed
@github-project-automation github-project-automation bot moved this from Goal: Merge to Done in Weekly Goals Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants