This guide explains how to operate Vernachain nodes, including bootstrap nodes and regular nodes.
Before running a node, ensure you have:
requirements.txt
--host
: Node’s host address (default: localhost)--port
: Node’s port number (default: 5000/5001)--data-dir
: Directory for blockchain data--log-level
: Logging verbosity (debug/info/warning/error)python -m src.cli start-bootstrap [OPTIONS]
--host TEXT Host address (default: localhost)
--port INTEGER Port number (default: 5000)
--max-peers INTEGER Maximum number of peers (default: 50)
python -m src.cli start [OPTIONS]
--host TEXT Host address (default: localhost)
--port INTEGER Port number (default: 5001)
--bootstrap-host TEXT Bootstrap node host
--bootstrap-port INTEGER Bootstrap node port
--validator BOOLEAN Run as validator (requires stake)
The easiest way to run nodes is using the startup script:
./start.sh --dev
./start.sh --bootstrap
./start.sh --bootstrap \
--node-port 5001 \
--api-port 8000 \
--explorer-port 8001
python -m src.cli start-bootstrap --host localhost --port 5000
python -m src.cli start \
--host localhost \
--port 5001 \
--bootstrap-host localhost \
--bootstrap-port 5000
Check node status using the CLI:
python -m src.cli status
This shows:
Logs are stored in the data directory:
node.log
: General node operationsconsensus.log
: Consensus-related eventsnetwork.log
: P2P networking eventsMonitor node performance through the API:
GET /api/v1/node/stats
: Node statisticsGET /api/v1/node/peers
: Connected peersGET /api/v1/node/blocks
: Recent blocksGET /api/v1/node/transactions
: Pending transactionspython -m src.cli recover
python -m src.cli resync
python -m src.cli clear-peers
For additional support, check the troubleshooting guide or open an issue on GitHub.