15191b7ede
* Add --memprofile option. Add memprofile to sample config. * Add --memprofile to doc.go. |
||
---|---|---|
.github/workflows | ||
addrmgr | ||
blockchain | ||
btcec | ||
btcjson | ||
chaincfg | ||
claimtrie | ||
cmd | ||
connmgr | ||
contrib | ||
database | ||
docs | ||
fees | ||
integration | ||
limits | ||
mempool | ||
mining | ||
netsync | ||
peer | ||
rpcclient | ||
txscript | ||
version | ||
wire | ||
.gitignore | ||
.golangci.yml | ||
.goreleaser.yml | ||
config.go | ||
config_test.go | ||
doc.go | ||
Dockerfile | ||
Dockerfile.goreleaser | ||
go.mod | ||
go.sum | ||
goclean.sh | ||
lbcd.go | ||
LICENSE | ||
log.go | ||
params.go | ||
README.md | ||
resourceLogging.go | ||
rpcadapters.go | ||
rpcclaimtrie.go | ||
rpcserver.go | ||
rpcserverhelp.go | ||
rpcserverhelp_test.go | ||
rpcwebsocket.go | ||
sample-lbcd.conf | ||
server.go | ||
service_windows.go | ||
signal.go | ||
signalsigterm.go | ||
upgrade.go | ||
upnp.go |
lbcd
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.