LightningPeach / lpd

Lightning Peach Node in rust
Apache License 2.0
24 stars 6 forks source link
bitcoin lightning-network off-chain rust

Lightning Peach Daemon

The Lightning Peach Daemon (lpd) - is a partial implementation of a Lightning Network node in Rust.

Work is still in early stages. Currently near 20% towards usable production ready system.

The goal is to provide a full-featured implementation of Lightning with enhanced security (due to a Rust usage) which potentially can be run on many platforms including WASM.

As a reference implementation [lnd] (https://github.com/lightningnetwork/lnd) was used.

Lightning Network Specification Compliance

lpd partially implements the Lightning Network specification (BOLTs). BOLT stands for: Basic of Lightning Technologies.

See rpc/interface/*.proto for rpc interface.

Bitcoin daemon and Electrum Server should be running before run lpd server.

Install electrs with:

git clone https://github.com/romanz/electrs &&
cd electrs &&
git checkout bb62df8793948b88cb2bc61580ca727cbbae9d31 &&
cargo install --debug --path .

Run bitcoind:

bitcoind -txindex -regtest -rpcport=18443 -rpcuser=devuser -rpcpassword=devpass -zmqpubrawblock=tcp://127.0.0.1:18501 -zmqpubrawtx=tcp://127.0.0.1:18502

Run electrs:

electrs --network=regtest --jsonrpc-import --cookie=devuser:devpass --daemon-rpc-addr=127.0.0.1:18443

Generate some blocks:

bitcoin-cli -rpcport=18443 -rpcuser=devuser -rpcpassword=devpass generate 1

The command for running the rpc server is:

cargo run --package server

or

cargo run --package server --release

for release configuration. Cli parameters are following:

CLI parameters are passed through --, for example

cargo run --package server -- --db-path=tmp/somedb --listen=1.2.3.4:1234

We firmly believe in the share early, share often approach. The basic premise of the approach is to announce your plans before you start work, and once you have started working share your work when any progress is made. Do not wait for a one large pull request.

Communication is done using github issues. If you have an idea, issue with code or want to contribute create an issue on github.