An alternative full node implementation of LBRY's blockchain written in Go (golang)
Find a file
2022-05-24 02:35:27 -07:00
.github/workflows Included permissions for GitHub action 2021-10-26 10:00:04 -04:00
addrmgr [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2022-05-24 00:01:46 -07:00
blockchain [lbry] ci: fixed various lint errors 2022-05-24 00:39:44 -07:00
btcec [lbry] ci: fixed various lint errors 2022-05-24 00:39:44 -07:00
btcjson [lbry] mempool: update getrawmempool and implement getmempoolentry 2022-05-24 00:04:19 -07:00
chaincfg [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2022-05-24 00:01:46 -07:00
claimtrie [lbry] claimtrie: import current snapshot 2022-05-23 23:53:30 -07:00
cmd [lbry] version: update codebase to use version package 2022-05-24 00:04:19 -07:00
connmgr [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2022-05-24 00:01:46 -07:00
contrib/linode [lbry] contrib: add linode deployment using docker 2022-05-24 00:04:19 -07:00
database [lbry] ci: fixed various lint errors 2022-05-24 00:39:44 -07:00
docs [lbry] rpc: update getrawtransaction to take verbose as boolean 2022-05-24 00:04:19 -07:00
fees [lbry] fees: port estimatesmartfee from DCRD 2022-05-24 00:04:19 -07:00
integration [lbry] docs: update docs for LBRY 2022-05-24 00:01:46 -07:00
limits [lbry] ci: fixed various lint errors 2022-05-24 00:39:44 -07:00
mempool [lbry] mempool: update getrawmempool and implement getmempoolentry 2022-05-24 00:04:19 -07:00
mining [lbry] docs: update docs for LBRY 2022-05-24 00:01:46 -07:00
netsync [lbry] fees: replace estimatefee with esimatesmartfee 2022-05-24 00:04:19 -07:00
peer [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2022-05-24 00:01:46 -07:00
rpcclient [lbry] rpc: update getrawtransaction to take verbose as boolean 2022-05-24 00:04:19 -07:00
txscript [lbry] docs: update docs for LBRY 2022-05-24 00:01:46 -07:00
version [lbry] version: add version package 2022-05-24 00:04:19 -07:00
wire [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2022-05-24 00:01:46 -07:00
.gitignore [lbry] ci: update .gitignore 2022-05-24 00:39:44 -07:00
.golangci.yml [lbry] ci: add .golangci-lint.yml 2022-05-24 00:47:34 -07:00
.goreleaser.yml [lbry] ci: support GoReleaser 2022-05-24 02:35:27 -07:00
config.go [lbry] version: update codebase to use version package 2022-05-24 00:04:19 -07:00
config_test.go [lbry] config: Verify completeness of sample-lbcd.conf using reflection on config struct. 2022-05-24 00:01:46 -07:00
doc.go [lbry] docs: update docs for LBRY 2022-05-24 00:01:46 -07:00
Dockerfile [lbry] ci: update Dockerfile 2022-05-24 00:47:34 -07:00
Dockerfile.goreleaser [lbry] ci: support GoReleaser 2022-05-24 02:35:27 -07:00
go.mod [lbry] go mod: update go modules 2022-05-24 00:04:19 -07:00
go.sum [lbry] go mod: update go modules 2022-05-24 00:04:19 -07:00
goclean.sh [lbry] ci: update gocelan.sh 2022-05-24 00:41:56 -07:00
lbcd.go [lbry] version: update codebase to use version package 2022-05-24 00:04:19 -07:00
LICENSE [lbry] docs: update docs for LBRY 2022-05-24 00:01:46 -07:00
log.go [lbry] fees: port estimatesmartfee from DCRD 2022-05-24 00:04:19 -07:00
params.go [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2022-05-24 00:01:46 -07:00
README.md [lbry] docs: update docs for LBRY 2022-05-24 00:01:46 -07:00
resourceLogging.go [lbry] print out memory usage periodically 2022-05-23 23:53:30 -07:00
rpcadapters.go [lbry] rename btcd to lbcd 2022-05-23 23:53:30 -07:00
rpcclaimtrie.go [lbry] rpc: support claim related methods 2022-05-23 23:53:30 -07:00
rpcserver.go [lbry] version: update codebase to use version package 2022-05-24 00:04:19 -07:00
rpcserverhelp.go [lbry] mempool: update getrawmempool and implement getmempoolentry 2022-05-24 00:04:19 -07:00
rpcserverhelp_test.go Relicense to the btcsuite developers. 2015-05-01 12:00:56 -05:00
rpcwebsocket.go [lbry] rename btcd to lbcd 2022-05-23 23:53:30 -07:00
sample-lbcd.conf [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2022-05-24 00:01:46 -07:00
server.go [lbry] version: update codebase to use version package 2022-05-24 00:04:19 -07:00
service_windows.go [lbry] version: update codebase to use version package 2022-05-24 00:04:19 -07:00
signal.go btcd: Simplify shutdown signal handling logic. (#733) 2016-08-11 13:39:23 -05:00
signalsigterm.go [lbry] ci: fixed various lint errors 2022-05-24 00:39:44 -07:00
upgrade.go [lbry] rename btcd to lbcd 2022-05-23 23:53:30 -07:00
upnp.go [lbry] ci: fixed various lint errors 2022-05-24 00:39:44 -07: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 --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 --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 --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 --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.