Hathor full node CLI
Usage
run_node [OPTIONS] [ARGS] --status [HTTP_API_PORT]
The command is callable from a docker
environment as well as through the hathor-cli
. The HTTP API port must be informed to --status
parameter.
Options
info
Wallet parameters bold-highlighted have been created for testing purposes. It is not recommended to use them in a production environment.
Text | Description |
---|---|
--cache | Use cache for storing transactions. |
--cache-size | Number of transactions to keep on cache. |
--cache-interval | Cache flush interval. |
--stratum [port] | Stratum server. Inform the stratum server port as an argument. |
--memory-storage | Store the full-node data in memory. |
--data [dir] | Directory where the full node will store all data (blocks and transactions) synchronized with the Hathor network. |
--testnet | Connect the full-node to the Hathor testnet. |
--test-mode-tx-weight | Reduces the transaction weight to 1 for testing purposes. |
--hostname [host] | Hostname used to be accessed by other peers. |
--auto-hostname | Try to discover the hostname automatically. |
--unsafe-mode | Enable unsafe parameters. It shouldn't be used in a production environment. |
--dns | DNS URL to search for peers to connect. It will extend what's in the configuration file, not substitute. |
--peer [file] | Json file with peer info. |
--listen [addr] | Address to listen for new connections (eg: tcp:8000). |
--bootstrap [addr] | Address to connect to (eg: tcp:127.0.0.1:8000). |
--status [port] | Port to run status server. |
--rocksdb-storage | Use RocksDB storage backend |
--old-rocksdb-storage | Use old RocksDB storage backend (deprecated) |
--json-storage | Use legacy JSON storage (not recommended). |
--rocksdb-cache | RocksDB block-table cache size (bytes). |
--wallet | Set wallet type. Options are 'hd' (Hierarchical Deterministic) or 'keypair'. |
--wallet-enable-api | Enable wallet API. Must be used with --wallet. |
--words | Words used to generate the seed for HD Wallet. |
--passphrase | Passphrase used to generate the seed for HD wallet. |
--unlock-wallet | Ask for password to unlock wallet. |
--wallet-index | Create an index of transactions by address and allow searching queries. |
--prometheus | Send metric data to Prometheus. |
--recursion-limit | Set python recursion limit. |
--allow-mining-without-peers | Allow mining without peers. |
--x-full-verification | Fully validate the local database. |
--x-fast-init-beta | Execute a fast initialization, which skip some transactions verification. This is a beta fetaure as it may cause issues when restarting the full node after a crash. |
--procname-prefix | Add a prefix to the process name |
--alow-non-standard-script | Accept non-standard scripts on /push-tx API. |
--max-output-script-size | Custom max accepted script size. |
--sentry-dsn | Optional sentry DSN number to send errors to Sentry. |
--enable-debug-api | Enable debug endpoints. |
--enable-crash-api | Enable crash endpoints. |
--x-localhost-only | Only connect to peers on localhost. |
Examples
To run the full node
- with RocksDB as storage;
- with a cache of 100.000 transactions (about 8GB of RAM);
- with
/data
as data directory; - with the peer id stored in a
peer_id.json
file; - connecting to the mainnet:
poetry run hathor-cli run_node --status 8080 --cache --cache-size 100000 --wallet-index --peer peer_id.json --data /data
To run the full node with memory as storage and connect to the testnet:
poetry run hathor-cli run_node --status 8080 --memory-storage --testnet