An alternative full node implementation of LBRY's blockchain written in Go (golang)
Find a file
2021-12-14 14:01:09 -08:00
.github/workflows Included permissions for GitHub action 2021-10-26 10:00:04 -04:00
addrmgr [lbry] rpc: import getnetworkinfo from bchd 2021-12-14 14:00:59 -08:00
blockchain [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
btcec [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
btcjson [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
chaincfg [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
claimtrie [lbry] claimtrie: import current snapshot 2021-12-14 14:00:59 -08:00
cmd [lbry] rename btcd to lbcd 2021-12-14 14:00:59 -08:00
connmgr [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
database [lbry] ffldb: increase open file limit and flush more often 2021-12-14 14:01:09 -08:00
docs [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
integration [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
limits [lbry] increase open file limit to 2048 2021-12-14 14:01:09 -08:00
mempool [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
mining [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
netsync [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
peer [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
release [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
rpcclient [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
txscript [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
wire [lbry] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
.gitignore GitHub Actions: Enable Go Race detector and code coverage 2020-09-08 10:19:55 -04:00
config.go [lbry] upnp: switched upnp param to its opposite 2021-12-14 14:00:59 -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 Upgraded the docker version to 1.16 2021-09-17 11:17:29 -04:00
go.mod go.mod, go.sum: Update goleveldb 2021-11-30 09:35:11 -05:00
go.sum go.mod, go.sum: Update goleveldb 2021-11-30 09:35:11 -05:00
goclean.sh GitHub Actions: Enable Go Race detector and code coverage 2020-09-08 10:19:55 -04: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] rename btcd to lbcd 2021-12-14 14:00:59 -08:00
params.go [lbry] rename btcd to lbcd 2021-12-14 14:00:59 -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] rpc: made estimatesmartfee call estimatefee (for now) 2021-12-14 14:00:59 -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] docs: update docs for LBRY 2021-12-14 14:01:09 -08:00
server.go [lbry] upnp: switched upnp param to its opposite 2021-12-14 14:00:59 -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 btcd: Simplify shutdown signal handling logic. (#733) 2016-08-11 13:39:23 -05:00
upgrade.go [lbry] rename btcd to lbcd 2021-12-14 14:00:59 -08:00
upnp.go [lbry] upnp: brought in upnp fix from dcrd 2021-12-14 14:00:59 -08:00
version.go [lbry] rpc: import getnetworkinfo from bchd 2021-12-14 14:00:59 -08: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.