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

Integrate More with rust-bitcoin ecosystem #2

Open
TheBlueMatt opened this issue Oct 28, 2018 · 8 comments
Open

Integrate More with rust-bitcoin ecosystem #2

TheBlueMatt opened this issue Oct 28, 2018 · 8 comments

Comments

@TheBlueMatt
Copy link

Should probably avoid needless effort duplication and see what code can be shared with https://github.com/rust-bitcoin/rust-lightning and other rust-bitcoin libraries since everyone having their own lightning implementation means more effort for no gain, and both look to be pretty early, so lots of room for collaboration.

Also, you may be interested in @sgeisler's excellent BOLT11 implementation at https://github.com/rust-bitcoin/rust-lightning-invoice since it seems y'all haven't started that work yet.

@mkl-
Copy link
Contributor

mkl- commented Oct 29, 2018

It is a good idea. We probably will use https://github.com/rust-bitcoin/rust-lightning-invoice
About https://github.com/rust-bitcoin/rust-lightning : is there any demo implementation of Lightning node to see how parts feet together?

@TheBlueMatt
Copy link
Author

I have a demo implementation of a lightning node using rust-lightning and rust-lightning-invoice at https://github.com/TheBlueMatt/rust-lightning-bitcoinrpc which connects to Bitcoin Core's RPC for its block data and on-chain wallet (rust-lightning does not act as a full wallet/node - it doesn't know how to download blocks, write to disk, etc - very much on purpose as it's goal is not to compete with lnd/c-lightning/eclair/etc but to provide a way for existing wallets to integrate lightning instead of being a standalone daemon).

Obviously rust-lightning, being only about a year old, is pretty early, but has made a lot of progress towards getting most of the BOLTs implemented, the structure of things is pretty much all there, but lots of pieces still need to be fleshed out fully. The demo app above can open/close channels, send/receive payments, etc but rust-lightning is still missing a few on-chain handling cases and the fee update story isn't quite there yet.

Also in the rust-bitcoin project umbrella, Tamas has been working on a full neutrino on-chain SPV wallet implementation which should be able to integrate rust-lightning at some point in the future, though that's a little less far along.

I'm curious where you think peach and rust-lightning/rust-bitcoin can collaborate more - definitely value in working together to make progress much faster, and both seem to be early enough that they're both good learning projects still in terms of learning lightning protocol by implementing it. What's the high-level set of goals for lpd, aside from just being yet another lightning node?

@mkl-
Copy link
Contributor

mkl- commented Oct 29, 2018

Thanks for the demo!

Objectives:

  • have own implementation with full source control due to security reasons
  • have an implementation in Rust:
    -- to ensure memory safety, performance, etc...
    -- possible compilation into new platforms such as WASM or SGX. Go can be compiled into WASM but not into SGX
    -- possible integration with Exonum which is written in RUST. Lightning over some token. Lightning over Bitcoin is a good first step to it.

We also work on SPV wallet to include into the node. Maybe we can cooperate there?

@TheBlueMatt
Copy link
Author

have own implementation with full source control due to security reasons

It looks like you're still depending on other rust-bitcoin projects, which means tighter integration/more working together only gets you more visibility into security-critical dependencies, not less =D. I'd be curious to see what parts of lpd you think are furthest along? Would love to steal some code and see where I can utilize more of y'all's effort to build rust-lightning :).

-Lightning over some token. Lightning over Bitcoin is a good first step to it.

I'm curious if you've started much work on this yet. Obviously the lightning protocol supports arbitrary assets, and there have been some work by others to implement it and move the spec forward to ensure interoperability there instead of folks going off on their own.

As for SPV wallet, you should reach out to @tamasblummer, who is primarily working on rust-bitcoin SPV stuff, and take a look at the various repositories in rust-bitcoin to see where you might be able to contribute!

@mkl-
Copy link
Contributor

mkl- commented Oct 29, 2018

Parts that a not highly coupled are routing(handling routing information), wire, encryption, key derivation. So they may be useful for rust-lightning.

Yes, we have done some preliminary work on Lightning over other blockchains. It seems there are https://github.com/rgb-org/spec and Raiden(for Ethereum). Could you suggest other projects?

@TheBlueMatt
Copy link
Author

TheBlueMatt commented Oct 29, 2018 via email

@mkl-
Copy link
Contributor

mkl- commented Oct 29, 2018 via email

@sgeisler
Copy link

It seems you give presentation about it on a recent conference. Is there any video of it?

There is a recording on youtube

Besides from that feel free to contact me regarding rust-lightning-invoice. It should be mostly stable by now, there are still some newtypes I want to introduce for time handling. Right now the development process is me pushing to master (since there is nobody else right now that's mostly ok), but that will change with the first 0.1 release which I hope to do soon(tm).

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