Skip to content

Commit 7b2d015

Browse files
committed
Readme updates
1 parent 7f73f77 commit 7b2d015

File tree

4 files changed

+65
-11
lines changed

4 files changed

+65
-11
lines changed

.github/workflows/rust.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install latest nightly
1818
uses: actions-rs/toolchain@v1
1919
with:
20-
toolchain: nightly
20+
toolchain: nightly-2020-10-12
2121
override: true
2222
components: rustfmt
2323
- name: Dependencies

README.md

+64-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,77 @@
1-
# RGB Node & SDK
1+
# RGB Node
22

33
[![TravisCI](https://api.travis-ci.com/LNP-BP/rgb-node.svg?branch=master)](https://api.travis-ci.com/LNP-BP/rgb-node)
44

5+
This is source for daemon executables and library that can run RGB backend. For
6+
wallet and exchange integration please check an interface to it and demo
7+
projects from [RGB SDK](https://github.com/LNP-BP/RGB-SDK).
8+
59
This repository contains RGB node source code and SDK for wallet & server-side
610
development.
711

812
The node may run as a set of daemons (even in different docker containers);
913
a multi-threaded single process or as a set of managed threads within a
1014
wallet app.
1115

12-
## Build
16+
## Design
17+
18+
The node (as other nodes maitained by LNP/BP Standards Association and Pandora
19+
Core company subsidiaries) consists of multiple microservices, communicating
20+
with each other via LNP ZMQ RPC interface.
21+
22+
![Node architacture](doc/node_arch.jpeg)
23+
24+
The set of microservices representing node can run as either:
25+
1) single daemon process on desktop or a server;
26+
2) cloud of docker-based daemons, one per microservice, with instance
27+
scalability and in geo-distributed environment;
28+
3) inside a single mobile app as threads;
29+
4) and even different nodes can be combined in their services between themselves
30+
into a single executables/mobile apps;
31+
5) all P2P communications are end-to-end encrypted and work over Tor.
32+
33+
Other nodes, designed an maintained by LNP/BP Standards Association with the
34+
same architecture include:
35+
* [LNP Node](https://github.com/LNP-BP/lnp-node) for running Lightning Network
36+
Protocol (LNP) and Generalized Lightning Channels (GLC).
37+
* [BP Node](https://github.com/LNP-BP/bp-node) for indexing bitcoin blockchain
38+
(you may think of it as a more efficient Electrum server alternative)
39+
* Bifrost – node for storing/passing client-side-validated data with watchtower
40+
functionality and used for Storm/RGB/DEX infrastructure
41+
42+
Other third parties provide their own nodes:
43+
* [Keyring](https://github.com/pandoracore/keyring) for managing private key
44+
accounts, storage and signatures with support for miniscript and PSBTs
45+
* [MyCitadel](https://github.com/mycitadel/mycitadel-node) Bitcoin, LN & RGB
46+
enabled wallet service with support for other LNP/BP protocols
47+
48+
## Project organization & architecture
49+
50+
* [`src/api/`](src/api/) – LNP messages for all daemons used for message bus
51+
* [`src/bin/`](src/bin/) – binaries for daemons & CLI launching main process
52+
* [`src/cli/`](src/cli/) – CLAP-based command line API talking to message bus
53+
* [`src/i8n/`](src/i8n/) – functions exposed to FFI talking to message bus
54+
* `src/<name>/` – service/daemon-specific code:
55+
- [`src/stash/`](src/stash) – daemon managing RGB stash data and its storage;
56+
you may configure it (with either config file, environment vars or
57+
command-line arguments) to use different forms of storage drivers;
58+
- [`src/contracts`](src/contracts) – daemons supporting high-level APIs for
59+
working with different forms of RGB Schema: RGB-20 (fungible assets),
60+
RGB-21 (collectionables/NFTs) etc;
61+
- [`src/rgbd`](src/rgbd) – daemon orchestrating bootstrapping of stash and
62+
contracts daemons
63+
64+
Each daemon (more correctly "microservice", as it can run as a thread, not
65+
necessary a process) or other binary (like CLI tool) follows the same
66+
organization concept for module/file names:
67+
* `error.rs` – daemon-specific error types;
68+
* `config.rs` – CLAP arguments & daemon configuration data;
69+
* `runtime.rs` – singleton managing main daemon thread and keeping all ZMQ/P2P
70+
connections and sockets; receiving and processing messages through them;
71+
* `processor.rs` – business logic functions & internal state management which
72+
does not depend on external communications/RPC;
73+
* `index/`, `storage/`, `cache/` – storage interfaces and engines;
74+
* `db/` – SQL-specific schema and code, if needed.
1375

1476
### Local
1577

@@ -68,13 +130,6 @@ The receiving party must do the following:
68130
`rgb-cli -d <data_dir> -vvvv fungible accept <consignment_file> <utxo>:<vout> <blinding>`,
69131
where `utxo` and the `blinding` must be values used in invoice generation
70132

71-
## Language bindings
72-
73-
The following bindings are available:
74-
- [Android](/ffi/android)
75-
- [iOS](/ffi/ios)
76-
- [Node.js](/ffi/nodejs)
77-
78133
## Developer guidelines
79134

80135
In order to update the project dependencies, run `cargo update`.

doc/node_arch.jpeg

144 KB
Loading

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// along with this software.
1212
// If not, see <https://opensource.org/licenses/MIT>.
1313

14-
#![allow(dead_code)]
1514
#![feature(
1615
bool_to_option,
1716
in_band_lifetimes,

0 commit comments

Comments
 (0)