An alternative full node implementation of LBRY's blockchain written in Go (golang)
Find a file
2022-02-06 21:31:31 -08:00
.github/workflows switch to syndtr, golang 1.17.5 2021-12-24 15:15:13 -05:00
addrmgr [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2021-12-14 14:01:09 -08:00
blockchain [lbry] work around existing bug with block validation flags 2021-12-30 09:50:16 -05:00
btcec [lbry] ci: fixups lint warnings 2021-12-15 08:27:58 -08:00
btcjson [lbry] rpc: update getrawtransaction to take verbose as boolean 2022-01-23 23:23:18 -08:00
chaincfg [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2021-12-14 14:01:09 -08:00
claimtrie [lbry] removed dependency on text/norm, fixed NFD normalization 2021-12-30 09:36:59 -05:00
cmd [lbry] bump the version number 2021-12-30 09:36:59 -05:00
connmgr [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2021-12-14 14:01:09 -08:00
contrib/linode [lbry] contrib: add linode deployment using docker 2021-12-15 08:27:58 -08:00
database switch to syndtr, golang 1.17.5 2021-12-24 15:15:13 -05:00
docs [lbry] rpc: update getrawtransaction to take verbose as boolean 2022-01-23 23:23:18 -08:00
fees [lbry] fees: port estimatesmartfee from DCRD 2022-02-02 00:14:27 -08:00
integration [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
limits [lbry] ci: fixups lint warnings 2021-12-15 08:27:58 -08:00
mempool [lbry] fees: replace estimatefee with esimatesmartfee 2022-02-02 00:14:27 -08:00
mining [lbry] blockchain, mining: don't flush on each new block in regtest 2021-12-15 08:27:58 -08:00
netsync [lbry] fees: replace estimatefee with esimatesmartfee 2022-02-02 00:14:27 -08:00
peer [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2021-12-14 14:01:09 -08:00
rpcclient [lbry] rpc: update getrawtransaction to take verbose as boolean 2022-01-23 23:23:18 -08:00
txscript [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
wire [lbry] Increase wire.MaxBlockPayload to 8MB 2022-02-06 21:31:31 -08:00
.gitignore [lbry] ci: gitignore IDE stuff 2021-12-14 14:01:09 -08:00
.golangci.yml [lbry] ci: Update Go toolchain to 1.17.3 2021-12-15 08:27:58 -08:00
.goreleaser.yml [lbry] ci: setup goreleaser 2021-12-15 08:27:58 -08:00
config.go [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2021-12-14 14:01:09 -08:00
config_test.go [lbry] rename btcd to lbcd 2021-12-14 14:00:59 -08:00
doc.go [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
Dockerfile [lbry] ci: Update Go toolchain to 1.17.3 2021-12-15 08:27:58 -08:00
go.mod [lbry] removed dependency on text/norm, fixed NFD normalization 2021-12-30 09:36:59 -05:00
go.sum switch to syndtr, golang 1.17.5 2021-12-24 15:15:13 -05:00
goclean.sh [lbry] ci: Update Go toolchain to 1.17.3 2021-12-15 08:27:58 -08:00
lbcd.go [lbry] test: don't remove old regression DB 2021-12-14 14:00:59 -08:00
LICENSE [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
log.go [lbry] fees: port estimatesmartfee from DCRD 2022-02-02 00:14:27 -08:00
params.go [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2021-12-14 14:01:09 -08:00
README.md [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
resourceLogging.go [lbry] print out memory usage periodically 2021-12-14 14:00:59 -08:00
rpcadapters.go [lbry] rename btcd to lbcd 2021-12-14 14:00:59 -08:00
rpcclaimtrie.go [lbry] rpc: support claim related methods 2021-12-14 14:00:59 -08:00
rpcserver.go [lbry] fees: replace estimatefee with esimatesmartfee 2022-02-02 00:14:27 -08:00
rpcserverhelp.go [lbry] rpc: made estimatesmartfee call estimatefee (for now) 2021-12-14 14:00:59 -08:00
rpcserverhelp_test.go Relicense to the btcsuite developers. 2015-05-01 12:00:56 -05:00
rpcwebsocket.go [lbry] rename btcd to lbcd 2021-12-14 14:00:59 -08:00
sample-lbcd.conf [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2021-12-14 14:01:09 -08:00
server.go [lbry] fees: replace estimatefee with esimatesmartfee 2022-02-02 00:14:27 -08:00
service_windows.go config+service_windows: add flag to disable win service 2020-07-22 12:57:09 +02:00
signal.go btcd: Simplify shutdown signal handling logic. (#733) 2016-08-11 13:39:23 -05:00
signalsigterm.go [lbry] ci: fixups lint warnings 2021-12-15 08:27:58 -08:00
upgrade.go [lbry] rename btcd to lbcd 2021-12-14 14:00:59 -08:00
upnp.go [lbry] ci: fixups lint warnings 2021-12-15 08:27:58 -08:00
version.go [lbry] bump the version number 2021-12-30 09:36:59 -05:00

lbcd

Build Status Coverage Status ISC License

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.

Security

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

Requirements

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.

Installation

Acquire binary files from releases

To build from Source on Linux/BSD/MacOSX/POSIX

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/lbcctl

Both GoLand and VS Code IDEs are supported.

Usage

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 --txindex --rpcuser=rpcuser --rpcpass=rpcpass

Interact with lbcd via RPC using lbcctl

./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass getblockcount
./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass getblocktemplate

By 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 --txindex --rpcuser=rpcuser --rpcpass=rpcpass --notls
./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass --notls getblockcount

Working with Different Networks

By 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 --txindex --rpcuser=rpcuser --rpcpass=rpcpass --regtest
./lbcctl --rpcuser=rpcuser --rpcpass=rpcpass --regtest getblockcount

The 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 --txindex --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 getblockcount

Note: Wallet related RPCs are provided by lbcwallet.

Contributing

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.

License

lbcd is licensed under the copyfree ISC License.