@@ -11,66 +11,57 @@ it is runtime-agnostic, but users must implement basic networking logic, chain
11
11
interactions, and disk storage. More information is available in the ` About `
12
12
section.
13
13
14
- The ` lightning-net-tokio ` crate implements Lightning networking using the
15
- [ Tokio] ( https://github.com/tokio-rs/tokio ) async runtime.
16
-
17
- The ` lightning-persister ` crate implements persistence for channel data that
18
- is crucial to avoiding loss of channel funds. Sample modules for persistence of
19
- other Rust-Lightning data is coming soon.
20
-
21
14
Status
22
15
------
23
-
24
- The project implements all of the BOLT specifications in the 1.0 spec. The
25
- implementation has pretty good test coverage that is expected to continue to
26
- improve. It is also anticipated that as developers begin using the API, the
27
- lessons from that will result in changes to the API, so any developer using this
28
- API at this stage should be prepared to embrace that. The current state is
29
- sufficient for a developer or project to experiment with it. Recent increased
30
- contribution rate to the project is expected to lead to a high quality, stable,
31
- production-worthy implementation in 2021.
16
+ The project implements all of the [ BOLT specifications] ( https://github.com/lightning/bolts ) in the
17
+ 1.0 spec. The implementation has pretty good test coverage that is expected to continue to improve.
18
+ It is also anticipated that as developers begin using the API, the lessons from that will result in
19
+ changes to the API, so any developer using this API at this stage should be prepared to embrace
20
+ that. The current state is sufficient for a developer or project to experiment with it.
32
21
33
22
Communications for Rust-Lightning and Lightning Development Kit happens through our LDK
34
- [ slack ] ( https://join.slack.com/t/lightningdevkit/shared_invite/zt-tte36cb7-r5f41MDn3ObFtDu~N9dCrQ ) & [ discord ] ( https://discord.gg/5AcknnMfBw ) channels.
23
+ [ Discord ] ( https://discord.gg/5AcknnMfBw ) channels.
35
24
36
25
Crates
37
26
-----------
38
- 1 . [ lightning] ( ./lightning )
39
- The Core of the LDK library, implements the lightning protocol, channel state machine,
40
- and on-chain logic. Supports no-std and exposes on relatively low-level interfaces.
27
+ 1 . [ lightning] ( ./lightning )
28
+ The core of the LDK library, implements the Lightning protocol, channel state machine,
29
+ and on-chain logic. Supports ` no-std ` and exposes only relatively low-level interfaces.
41
30
2 . [ lightning-background-processor] ( ./lightning-background-processor )
42
31
Utilities to perform required background tasks for Rust Lightning.
43
32
3 . [ lightning-block-sync] ( ./lightning-block-sync )
44
33
Utilities to fetch the chain data from a block source and feed them into Rust Lightning.
45
34
4 . [ lightning-invoice] ( ./lightning-invoice )
46
- Data structures to parse and serialize BOLT11 lightning invoices.
35
+ Data structures to parse and serialize
36
+ [ BOLT #11 ] ( https://github.com/lightning/bolts/blob/master/11-payment-encoding.md ) Lightning invoices.
47
37
5 . [ lightning-net-tokio] ( ./lightning-net-tokio )
48
- Implementation of the rust-lightning network stack using Tokio.
38
+ Implementation of the rust-lightning network stack using the [ Tokio] ( https://github.com/tokio-rs/tokio ) ` async ` runtime .
49
39
For Rust-Lightning clients which wish to make direct connections to Lightning P2P nodes,
50
40
this is a simple alternative to implementing the required network stack, especially for those already using Tokio.
51
41
6 . [ lightning-persister] ( ./lightning-persister )
52
- Utilities to manage Rust-Lightning channel data persistence and retrieval.
42
+ Implements utilities to manage Rust-Lightning channel data persistence and retrieval.
43
+ Persisting channel data is crucial to avoiding loss of channel funds.
53
44
7 . [ lightning-rapid-gossip-sync] ( ./lightning-rapid-gossip-sync )
54
45
Client for rapid gossip graph syncing, aimed primarily at mobile clients.
55
46
56
47
About
57
48
-----------
58
- LDK/Rust-Lightning is a generic library which allows you to build a lightning
59
- node without needing to worry about getting all of the lightning state machine,
49
+ LDK/Rust-Lightning is a generic library which allows you to build a Lightning
50
+ node without needing to worry about getting all of the Lightning state machine,
60
51
routing, and on-chain punishment code (and other chain interactions) exactly
61
52
correct. Note that Rust-Lightning isn't, in itself, a node. There are various
62
53
working/in progress demos which could be used as a node today, but if you "just"
63
- want a generic lightning node, you're almost certainly better off with
64
- ` c-lightning ` /` lnd ` - if, on the other hand, you want to integrate lightning
65
- with custom features such as your own chain sync, your own key management, your
54
+ want a generic Lightning node, you're almost certainly better off with
55
+ [ Core Lightning] ( https://github.com/ElementsProject/lightning ) or
56
+ [ LND] ( https://github.com/lightningnetwork/lnd ) - if, on the other hand, you want to integrate
57
+ Lightning with custom features such as your own chain sync, your own key management, your
66
58
own data storage/backup logic, etc., LDK is likely your only option. Some
67
- Rust-Lightning utilities such as those in ` chan_utils ` are also suitable for use
68
- in non-LN Bitcoin applications such as DLCs and bulletin boards.
59
+ Rust-Lightning utilities such as those in [ ` chan_utils ` ] ( ./lightning/src/ln/chan_utils.rs ) are also
60
+ suitable for use in non-LN Bitcoin applications such as DLCs and bulletin boards.
69
61
70
- We are currently working on a demo node which fetches blockchain data and
71
- on-chain funds via Bitcoin Core RPC/REST. The individual pieces of that demo
72
- are/will be composable, so you can pick the off-the-shelf parts you want and
73
- replace the rest.
62
+ A sample node which fetches blockchain data and manages on-chain funds via the Bitcoin Core
63
+ RPC/REST interface is available [ here] ( ../ldk-sample ) . The individual pieces of that demo are be
64
+ composable, so you can pick the off-the-shelf parts you want and replace the rest.
74
65
75
66
In general, Rust-Lightning does not provide (but LDK has implementations of):
76
67
* on-disk storage - you can store the channel state any way you want - whether
@@ -84,21 +75,21 @@ In general, Rust-Lightning does not provide (but LDK has implementations of):
84
75
informed of, which is compatible with Electrum server requests/neutrino
85
76
filtering/etc.
86
77
* UTXO management - RL/LDK owns on-chain funds as long as they are claimable as
87
- a part of a lightning output which can be contested - once a channel is closed
78
+ a part of a Lightning output which can be contested - once a channel is closed
88
79
and all on-chain outputs are spendable only by the user, we provide users
89
80
notifications that a UTXO is "theirs" again and it is up to them to spend it
90
81
as they wish. Additionally, channel funding is accomplished with a generic API
91
82
which notifies users of the output which needs to appear on-chain, which they
92
83
can then create a transaction for. Once a transaction is created, we handle
93
84
the rest. This is a large part of our API's goals - making it easier to
94
- integrate lightning into existing on-chain wallets which have their own
85
+ integrate Lightning into existing on-chain wallets which have their own
95
86
on-chain logic - without needing to move funds in and out of a separate
96
- lightning wallet with on-chain transactions and a separate private key system.
97
- * networking - to enable a user to run a full lightning node on an embedded
87
+ Lightning wallet with on-chain transactions and a separate private key system.
88
+ * networking - to enable a user to run a full Lightning node on an embedded
98
89
machine, we don't specify exactly how to connect to another node at all! We
99
90
provide a default implementation which uses TCP sockets, but, e.g., if you
100
- wanted to run your full lightning node on a hardware wallet, you could, by
101
- piping the lightning network messages over USB/serial and then sending them in
91
+ wanted to run your full Lightning node on a hardware wallet, you could, by
92
+ piping the Lightning network messages over USB/serial and then sending them in
102
93
a TCP socket from another machine.
103
94
* private keys - again we have "default implementations", but users can chose to
104
95
provide private keys to RL/LDK in any way they wish following a simple API. We
@@ -111,8 +102,7 @@ https://vimeo.com/showcase/8372504/video/412818125
111
102
112
103
Design Goal
113
104
-----------
114
-
115
- The goal is to provide a full-featured but also incredibly flexible lightning
105
+ The goal is to provide a full-featured but also incredibly flexible Lightning
116
106
implementation, allowing the user to decide how they wish to use it. With that
117
107
in mind, everything should be exposed via simple, composable APIs. More
118
108
information about Rust-Lightning's flexibility is provided in the ` About `
@@ -129,7 +119,7 @@ Rust-Lightning refers to the core `lightning` crate within this repo, whereas
129
119
LDK encompasses Rust-Lightning and all of its sample modules and crates (e.g.
130
120
the ` lightning-persister ` crate), language bindings, sample node
131
121
implementation(s), and other tools built around using Rust-Lightning for
132
- lightning integration or building a lightning node.
122
+ Lightning integration or building a Lightning node.
133
123
134
124
Tagline
135
125
-------
0 commit comments