Skip to content

Commit

Permalink
v0.1.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Oct 26, 2020
1 parent e973d3f commit 16255d7
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 46 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Change Log
==========

v0.1.0-alpha.1
--------------

Initial pre-release:
- Multithreaded concurrent architecture
- Connection daemon
- Command-line tool
- LN peer connectivity
- ZMQ RPC command buses: for LN messages and control

15 changes: 9 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 7 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lnp_node"
description = "LNP node"
version = "0.1.0-alpha.2"
version = "0.1.0-alpha.1"
authors = ["Dr. Maxim Orlovsky <[email protected]>"]
license = "MIT"
keywords = ["bitcoin", "node", "lightning-network", "smart-contracts", "rgb"]
Expand All @@ -21,6 +21,9 @@ required-features = ["cli"]
# Rust language
amplify = "~2.0.6"
amplify_derive = "~2.0.6"
lnpbp = { version = "~0.2.0-alpha.1", features = ["lnp", "url", "websockets"] }
lnpbp_derive = "~0.2.0-alpha.1"
lnpbp_services = "~0.2.0-alpha.1"
lazy_static = "~1.4.0"
nix = { version = "~0.19.0", optional = true }
# Bitcoin
Expand All @@ -47,23 +50,10 @@ async-trait = { version = "~0.1.35", optional = true }
tokio = { version = "~0.2.21", features = ["full"], optional = true }
zmq = { version = "~0.9.2", optional = true }

[dependencies.lnpbp]
git = "https://github.com/LNP-BP/rust-lnpbp"
branch = "master"
features = ["lnp", "keygen", "tokio", "serde", "url", "websockets"]

[dependencies.lnpbp_derive]
git = "https://github.com/LNP-BP/rust-lnpbp"
branch = "master"

[dependencies.lnpbp_services]
git = "https://github.com/LNP-BP/rust-lnpbp"
branch = "master"

[build-dependencies]
amplify = "~1.2.0"
lnpbp = { git = "https://github.com/LNP-BP/rust-lnpbp", branch = "master", features = ["lnp", "keygen", "tokio", "serde", "tor", "url", "websockets"] }
lnpbp_services = { git = "https://github.com/LNP-BP/rust-lnpbp", branch = "master", features = ["shell"] }
lnpbp = { version = "~0.2.0-alpha.1", features = ["lnp", "url", "websockets"] }
lnpbp_services = "~0.2.0-alpha.1"
clap = "=3.0.0-beta.2"
clap_generate = "=3.0.0-beta.2"
log = { version = "~0.4.8", features = ["max_level_trace", "release_max_level_debug"] }
Expand Down Expand Up @@ -100,7 +90,7 @@ shell = [
# Besides server node can be run as a part of mobile app
# and other types of clients; thus `server` != `node`.
# This feature results in building with features not required for CLI
node = ["serde", "lnpbp/keygen", "tokio", "zmq", "lnpbp_services/node"]
node = ["serde", "lnpbp/keygen", "tokio", "lnpbp/tokio", "zmq", "lnpbp_services/node"]
serde = ["serde_crate", "serde_with", "toml", "amplify/serde", "lnpbp/serde",
"lnpbp_services/serde"]

Expand Down
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ The node must maintain simple/modular upgradability for:

## Design

### Approach

The node (as other nodes maitained by LNP/BP Standards Association and Pandora
Core company subsidiaries) consists of multiple microservices, communicating
with each other via LNP ZMQ RPC interface.
Expand Down Expand Up @@ -119,21 +121,27 @@ Other third parties provide their own nodes:
* [MyCitadel](https://github.com/mycitadel/mycitadel-node) Bitcoin, LN & RGB
enabled wallet service with support for other LNP/BP protocols

### LNP Node Architecture Specifics

The overall architecture of LNP Node is the following:

![Node architacture](doc/lnp_node_arch.jpeg)

## Project organization & architecture

* [`src/api/`](src/api/) – LNP messages for all daemons used for message bus
* [`src/bin/`](src/bin/) – binaries for daemons & CLI launching main process
* [`src/cli/`](src/cli/) – CLAP-based command line API talking to message bus
* [`src/rpc/`](src/rpc/) – RPC commands for all daemons used for message bus
* [`src/i8n/`](src/i8n/) – functions exposed to FFI talking to message bus
* `src/<name>/` – service/daemon-specific code:
- [`src/wired/`](src/wired) – daemon managing peer connections within
Lightning peer network using LNP (Lightning network protocol). Specific
supported message types are defined as a part of
- [`src/connectiond/`](src/connectiond) – daemon managing peer connections
within Lightning peer network using LNP (Lightning network protocol).
Specific supported message types are defined as a part of
[LNP/BP Core Library](https://github.com/LNP-BP/rust-lnpbp)
- [`src/channeld`](src/channeld) – daemon managing generalized Lightning
channels with their extensions
- [`src/lightningd`](src/lightningd) – daemon initializing creation of new
channels
- [`src/lnpd`](src/lnpd) – daemon initializing creation of new channels and
connections
- [`src/routed`](src/routed) – daemon managing routing information
- [`src/gossip`](src/gossip) – daemon managing gossip data
- [`src/keyd`](src/keyd) - key managing daemon
Expand All @@ -142,11 +150,9 @@ Each daemon (more correctly "microservice", as it can run as a thread, not
necessary a process) or other binary (like CLI tool) follows the same
organization concept for module/file names:
* `error.rs` – daemon-specific error types;
* `config.rs` – CLAP arguments & daemon configuration data;
* `opts.rs` – CLAP arguments & daemon configuration data;
* `runtime.rs` – singleton managing main daemon thread and keeping all ZMQ/P2P
connections and sockets; receiving and processing messages through them;
* `processor.rs` – business logic functions & internal state management which
does not depend on external communications/RPC;
* `index/`, `storage/`, `cache/` – storage interfaces and engines;
* `db/` – SQL-specific schema and code, if needed.

Expand Down
Binary file added doc/lnp_node_arch.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/connectiond/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#[cfg(feature = "shell")]
mod opts;
mod peer;
mod runtime;

#[cfg(feature = "shell")]
Expand Down
13 changes: 0 additions & 13 deletions src/connectiond/peer.rs

This file was deleted.

0 comments on commit 16255d7

Please sign in to comment.