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

why 2 licenses? #1

Closed
nicolasburtey opened this issue Jun 28, 2021 · 4 comments
Closed

why 2 licenses? #1

nicolasburtey opened this issue Jun 28, 2021 · 4 comments

Comments

@nicolasburtey
Copy link

Apache + MIT? as opposed to just one? curious to understand the benefits of this. (this things comes to my mind. will have a look to the code and have question on this as well :))

@ulrichard
Copy link
Collaborator

I just used the same licenses as BDK itself. Since the goal is to make it part of the BDK ecosystem, I think it makes sense to use the same licenses.
But for the time being, I ran into a couple of problems with this approach of having proof-of-reserves in a separate repo. The approach with it being part of BDK as in bitcoindevkit/bdk#356 was much easier to get to work. Not only is it more difficult to write unit tests in this repo itself, but I also ran into problems later on e.g. in https://github.com/ulrichard/bdk-cli/tree/reserves-separate There again, https://github.com/ulrichard/bdk-cli/tree/reserves was much easier.

@notmandatory
Copy link
Member

@nicolasburtey The reason for two licenses with BDK is since it's a library project we want to be maximally permissive for other projects to adopt, whether they prefer MIT or Apache 2.0 licensing. Also Apache 2.0 provides some explicit permissions like patent use that MIT doesn't, but MIT is simpler and more common for Rust project. Another reason bdk took this approach is to make it easier to integrate with the LDK project (also dual licensed) in the future. For an end user app my understanding is that dual licensing isn't as important.

@notmandatory
Copy link
Member

@ulrichard what sort of testing problems did you run into separating into a new repo? is there something we could do on the bdk side to make it easier? I suspect there will be other optional and/or experimental features like reserves others will want to add so would like to make the process easier. Is the difficulty primarily setting up the CI test workflows?

@ulrichard
Copy link
Collaborator

ulrichard commented Jul 9, 2021

@notmandatory

  • For testing, I could not figure out how to generate a funded wallet with get_funded_wallet(). The current implementation fails because wallet.database is private. But I also tried to replicate more of the logic in this repo, and finally failed.
    If bdk could make a function available to generate funded test wallets to related projects, that would be great. I don't know it it is possible in rust to make this function only available in testing mode.
  • In bdk-cli I'm currently struggling at this: Why is the cast failing or even necessary at:
    https://github.com/ulrichard/bdk-cli/blob/reserves-separate/src/lib.rs#L933
    When the trait is in scope and implemented for the same constraints at:
    https://github.com/ulrichard/bdk-reserves/blob/main/src/reserves.rs#L99

I must admit, my experience with rust is still limited.

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

No branches or pull requests

3 participants