lbcd is a full node implementation of LBRY's blockchain written in Go (golang).
This project is currently under active development and is in a Beta state while we ensure it matches LBRYcrd's functionality. The intention is that it properly downloads, validates, and serves the block chain using the exact rules (including consensus bugs) for block acceptance as LBRYcrd. We have taken great care to avoid lbcd causing a fork to the blockchain.
Note: lbcd does NOT include wallet functionality. That functionality is provided by the
lbcwallet and the LBRY SDK.
We take security seriously. Please contact security regarding any security issues. Our PGP key is here if you need it.
We maintain a mailing list for notifications of upgrades, security issues, and soft/hard forks. To join, visit fork list
All common operating systems are supported. lbcd requires at least 8GB of RAM and at least 100GB of disk storage. Both RAM and disk requirements increase slowly over time. Using a fast NVMe disk is recommended.
lbcd is not immune to data loss. It expects a clean shutdown via SIGINT or
SIGTERM. SIGKILL, immediate VM kills, and sudden power loss can cause data
corruption, thus requiring chain resynchronization for recovery.
For compilation, Go 1.16 or newer is required.
Acquire binary files from releases
Install Go according to its installation instructions.
git clone https://github.com/lbryio/lbcd
cd lbcd
# Build lbcd
go build .
# Build lbcctl
go build ./cmd/lbcctlBoth GoLand and VS Code IDEs are supported.
By default, data and logs are stored in <LBCDDIR>:
- Linux:
~/.lbcd/ - MacOS:
/Users/<username>/Library/Application Support/Lbcd/
To enable RPC access a username and password is required. Example:
./lbcd --rpcuser=rpcuser --rpcpass=rpcpassInteract with lbcd via RPC using lbcctl
./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass getblockcount
./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass getblocktemplateBy default, the RPCs are served over TLS. lbcd generates (if not exists) rpc.cert and
rpc.key under <LBCDDIR> where lbcctl would search and use them.
The RPCs can also be served without TLS (on localhost only) using (--notls)
./lbcd --rpcuser=rpcuser --rpcpass=rpcpass --notls
./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass --notls getblockcountBy default, lbcd and lbcctl use the following ports for different networks respectively:
| Network | RPC Port | Network Port |
|---|---|---|
| mainnet | 9245 | 9246 |
| testnet | 19245 | 19246 |
| regtest | 29245 | 29246 |
Running lbcd and lbcctl with --testnet or --regtest would use different chain params as well as default RPC and Network ports.
./lbcd --rpcuser=rpcuser --rpcpass=rpcpass --regtest
./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass --regtest getblockcountThe default Network and RPC ports of lbcd can be overriden using --listen and --rpclisten
lbcctl can also connect to RPC server specified by --rpcserver
./lbcd --rpcuser=rpcuser --rpcpass=rpcpass --regtest --listen=127.0.0.1:29248 --rpclisten=127.0.0.1:29247
./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass --regtest --rpcserver=127.0.0.1:29247 getblockcountNote: Wallet related RPCs are provided by lbcwallet.
Contributions to this project are welcome, encouraged, and compensated. The integrated github issue tracker is used for this project. All pull requests will be considered.
lbcd is licensed under the copyfree ISC License.