diff --git a/src/pages/references/node-configuration.md b/src/pages/references/node-configuration.md index 88ce8dc2..c15e6d31 100644 --- a/src/pages/references/node-configuration.md +++ b/src/pages/references/node-configuration.md @@ -27,7 +27,9 @@ See this page for installation instructions. ## Usage -`stacks-node sub-command [--subcommand-option ]` +```bash +stacks-node sub-command [--subcommand-option ] +``` ## Subcommands @@ -35,19 +37,31 @@ See this page for installation instructions. Start a node based on a fast local setup emulating a burnchain. Ideal for smart contract development. -Example: `stacks-node mocknet` +Example: + +```bash +stacks-node mocknet +``` ### krypton (deprecated) Start a node that will join and stream blocks from the public krypton testnet, powered by Blockstack via (Proof of Transfer). -Example: `stacks-node krypton` +Example: + +```bash +stacks-node krypton +``` ### xenon Start a node that will join and stream blocks from the public xenon testnet, decentralized. -Example: `stacks-node xenon` +Example: + +```bash +stacks-node xenon +``` ### start @@ -57,7 +71,11 @@ Start a node with a config of your own. Can be used for joining a network, start **--config**: relative or absolute path to the TOML config file. Required. -Example: `stacks-node start --config=/path/to/config.toml` +Example: + +```bash +stacks-node start --config=/path/to/config.toml +``` See [Configuration File Options](#configuration-file-options) for more information. @@ -65,13 +83,21 @@ See [Configuration File Options](#configuration-file-options) for more informati Displays information about the current version and the release cycle. -Example: `stacks-node version` +Example: + +```bash +stacks-node version +``` #### help Displays a help message. -Example: `stacks-node help` +Example: + +```bash +stacks-node help +``` ## Configuration File Options @@ -99,43 +125,71 @@ miner = true Absolute path to the directory which the stacks-node will use for storing various data. -Example: `"/root/stacks-node"` +Example: + +```toml +working_dir = "/root/stacks-node" +``` #### rpc_bind Address and port stacks-node should bind to for RPC connections. -Example: `"0.0.0.0:20443"` +Example: + +```toml +rpc_bind = "0.0.0.0:20443" +``` #### p2p_bind Address and port stacks-node should bind to for P2P connections. -Example: `"0.0.0.0:20444"` +Example: + +```toml +p2p_bind = "0.0.0.0:20444" +``` #### data_url (optional) Address and port from which the stacks-node will be receiving incoming rpc connections. -Example: `"1.2.3.4:20443"` +Example: + +```toml +data_url = "1.2.3.4:20443" +``` #### p2p_address (optional) Address and port from which the stacks-node will be receiving incoming p2p connections. -Example: `"1.2.3.4:20444"` +Example: + +```toml +p2p_address = "1.2.3.4:20444" +``` #### bootstrap_node (optional) Public key, address, and port stacks-node should use to pull transaction data from when starting. -Example: `"048dd4f26101715853533dee005f0915375854fd5be73405f679c1917a5d4d16aaaf3c4c0d7a9c132a36b8c5fe1287f07dad8c910174d789eb24bdfb5ae26f5f27@krypton.blockstack.org:20444"` +Example: + +```toml +bootstrap_node = "048dd4f26101715853533dee005f0915375854fd5be73405f679c1917a5d4d16aaaf3c4c0d7a9c132a36b8c5fe1287f07dad8c910174d789eb24bdfb5ae26f5f27@krypton.blockstack.org:20444" +``` #### wait_time_for_microblocks (optional) Time to wait (in milliseconds) for microblocks. -Example: `15000` +Example: + +```toml +wait_time_for_microblocks = 15000 +``` #### seed (optional) @@ -143,7 +197,11 @@ The private key to use for mining. Only needed if `miner` is set to `true`. [See this page for information on how to generate a private key.](https://docs.blockstack.org/mining) -Example: `"replace-with-your-private-key"` +Example: + +```toml +seed = "replace-with-your-private-key" +``` #### local_peer_seed (optional) @@ -151,7 +209,11 @@ The private key to use for mining. [See this page for information on how to generate a private key.](https://docs.blockstack.org/mining) -Example: `"replace-with-your-private-key"` +Example: + +```toml +local_peer_seed = "replace-with-your-private-key" +``` #### miner (optional) @@ -159,13 +221,21 @@ Determines whether the stacks-node is running a follower (`false`) or a miner (` [See this page for information on how to run a miner.](https://docs.blockstack.org/mining) -Example: `true` +Example: + +```toml +miner = true +``` #### prometheus_bind (optional) Address and port stacks-node should open for Prometheus metrics collection. -Example: `"0.0.0.0:9153"` +Example: + +```toml +prometheus_bind = "0.0.0.0:9153" +``` ### Section: events_observer (optional) @@ -186,19 +256,31 @@ events_keys = ["*"] Address and port to a stacks-node-api to watch for events. -Example: `"address-to-my-local.stacks-node-api.com:3700"` +Example: + +```toml +endpoint = "address-to-my-local.stacks-node-api.com:3700" +``` #### retry_count Number of times to retry before failing. -Example: `255` +Example: + +```toml +retry_count = 255 +``` #### events_keys Event keys for which to watch. -Example: `["*"]` +Example: + +```toml +events_keys = ["*"] +``` ### Section: connection_options (optional) @@ -217,19 +299,31 @@ walk_interval = 30 The advertised public IP of this stacks-node. -Example: `"1.2.3.4:20444"` +Example: + +```toml +public_ip_address = "1.2.3.4:20444" +``` #### download_interval Time (in seconds) between attempts to download blocks. -Example: `10` +Example: + +```toml +download_interval = 10 +``` #### walk_interval Time (in seconds) between attempts to walk the Merkle tree. -Example: `30` +Example: + +```toml +walk_interval = 30 +``` ### Section: burnchain @@ -250,55 +344,91 @@ This section contains configuration options pertaining to the blockchain the sta The blockchain stacks-node binds to on the backend for proof-of-transfer. -Example: `"bitcoin"` +Example: + +```toml +chain = "bitcoin" +``` #### mode The profile of which to run stacks-node. -Example: `"krypton"` +Example: + +```toml +mode = "krypton" +``` #### peer_host Host running the BTC blockchain. -Example: `"bitcoind.krypton.blockstack.org"` +Example: + +```toml +peer_host = "bitcoind.krypton.blockstack.org" +``` #### rpc_port peer_host's port stacks-node will connect to for RPC connections. -Example: `18443` +Example: + +```toml +rpc_port = 18443 +``` #### peer_port peer_host's port stacks-node will connect to for P2P connections. -Example: `18444` +Example: + +```toml +peer_port = 18444 +``` #### process_exit_at_block_height (optional) Block height of the burnchain at which the stacks-node will self-terminate. Used during the testnet phases for various testing cycles. -Example: `5340` +Example: + +```toml +process_exit_at_block_height = 5340 +``` #### burnchain_op_tx_fee (optional) Transaction fee per burnchain operation. -Example: `5500` +Example: + +```toml +burnchain_op_tx_fee = 5500 +``` #### burn_fee_cap (optional) Max burn fee for a transaction. -Example: `30000` +Example: + +```toml +burn_fee_cap = 30000 +``` #### commit_anchor_block_within (optional) Sets the time period (in milliseconds) for commitments. Only used when `mode` is set to `"helium"`. -Example: `10000` +Example: + +```toml +commit_anchor_block_within = 10000 +``` ### Section: mstx_balance @@ -330,10 +460,18 @@ amount = 10000000000000000 Address which maintains a micro-STX balance. -Example: `"STB44HYPYAT2BB2QE513NSP81HTMYWBJP02HPGK6"` +Example: + +```toml +address = "STB44HYPYAT2BB2QE513NSP81HTMYWBJP02HPGK6" +``` #### amount The balance of micro-STX given to the address. -Example: `10000000000000000` +Example: + +```toml +amount = 10000000000000000 +```