Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VSS Support in ldk-node #158

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Conversation

G8XSU
Copy link
Contributor

@G8XSU G8XSU commented Aug 18, 2023

Note:
This PR does not add full support of VSS, there will be additional PR's for some of the changes.
Currently it introduces only VssKVStore which is major chunk of code.

We will call it full support only once we make changes to public api for ldk-node.

Note on testing:

  • Running a Java WAR file within a Rust test is not a straightforward process, as the execution of a Java WAR typically requires a Java runtime, which can not be natively managed by Rust.
  • Currently it is tested against a local instance of VSS. But we will be testing this as part of our CI pipeline as discussed in sync, currently working on it.
  • Alternative to env-var was feature-gate, but I didn't see much reason to introduce new feature for this test and it could be confusing. Setting env-var to any value will result in test-failure if vss doesn't work properly or it is not a correct endpoint. So we can easily verify this.

@G8XSU G8XSU changed the title Add VSS Store Implementation Add VSS Support in ldk-node Aug 18, 2023
@G8XSU
Copy link
Contributor Author

G8XSU commented Aug 18, 2023

@tnull for review.

Copy link
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Did a first pass, excuse the delay.

What is our current thinking about landing this in conjuction with follow-ups? Do we want to land this and hide the code behind a cfg until it's ready to be published, or should we keep this PR open until all follow-ups are ready? As the changes shouldn't overlap too much with the rest of the codebase, we could also do a feature-branch for this and merge it into main once it's ready?

src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Show resolved Hide resolved
src/io/vss_store.rs Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
@G8XSU
Copy link
Contributor Author

G8XSU commented Aug 31, 2023

Regarding landing this PR or related PR's to VSS.

I do want to merge them independently into main so that we close on things.
Since there was no public interface/code which is exposed, i did not feel the need to feature-gate it. I will feature-gate if pub interface is exposed.

Or expose public interface only once we are ready. Let me know if that works.

Cargo.toml Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Show resolved Hide resolved
@tnull
Copy link
Collaborator

tnull commented Sep 11, 2023

Regarding landing this PR or related PR's to VSS.

I do want to merge them independently into main so that we close on things. Since there was no public interface/code which is exposed, i did not feel the need to feature-gate it. I will feature-gate if pub interface is exposed.

Or expose public interface only once we are ready. Let me know if that works.

Yeah, that generally works for me, but let's feature-gate it (behind vss or vss-store?) and include respective CI checks so that we actually can test it going forward.

@G8XSU G8XSU force-pushed the add-vss-store branch 3 times, most recently from b4c76a6 to d10bf2e Compare September 26, 2023 03:40
@G8XSU
Copy link
Contributor Author

G8XSU commented Sep 26, 2023

Rebased to #151

@G8XSU G8XSU requested a review from tnull September 27, 2023 17:52
@G8XSU
Copy link
Contributor Author

G8XSU commented Oct 26, 2023

@tnull Can i get review on this ?
Thanks

@jkczyz jkczyz self-requested a review October 26, 2023 17:14
@tnull
Copy link
Collaborator

tnull commented Oct 26, 2023

@tnull Can i get review on this ? Thanks

Sure, could you rebase now that I landed the 0.0.117 PR?

Cargo.toml Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
@G8XSU
Copy link
Contributor Author

G8XSU commented Nov 1, 2023

Rebased after #151 landed

@G8XSU G8XSU requested a review from jkczyz November 1, 2023 23:44
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
@G8XSU G8XSU requested review from jkczyz and tnull November 2, 2023 18:51
@G8XSU
Copy link
Contributor Author

G8XSU commented Nov 2, 2023

Resolved all comments, ready for review again.

Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

Largely looks good. Don't have any other comments besides these.

src/io/vss_store.rs Show resolved Hide resolved
src/io/vss_store.rs Outdated Show resolved Hide resolved
src/builder.rs Outdated Show resolved Hide resolved
src/io/vss_store.rs Show resolved Hide resolved
src/io/vss_store.rs Show resolved Hide resolved
@tnull
Copy link
Collaborator

tnull commented Nov 3, 2023

Failing test is fixed in #184.

Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

I'm good with squashing the fixups and rebasing.

@G8XSU G8XSU requested a review from jkczyz November 3, 2023 16:44
jkczyz
jkczyz previously approved these changes Nov 3, 2023
Copy link
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

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

LGTM, should be ready to go, just two really minor nits.

src/builder.rs Outdated Show resolved Hide resolved
src/io/mod.rs Show resolved Hide resolved
A KVStore implementation that writes to and reads
from a [VSS](https://github.com/lightningdevkit/vss-server/blob/main/README.md)
backend.
Copy link
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Thanks! :)

@tnull tnull merged commit 7a4ecd0 into lightningdevkit:main Nov 7, 2023
7 of 9 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