# Configuration
This section introduces how to manually configure a node on your machine. However, if you just want to develop locally, it's recommended you get Visual Studio Code Solidity++ Extension (opens new window) which includes a local development node.
# Node
When downloading the latest release of go-vite (opens new window) the following node_config.json
is included:
You can make your own config based on the example below but remember to remove the text comments following after "//". The purpose of the comments is to explain certain configuration settings but they are not part of the node config itself and should always be removed.
Other configuration options:
Single
: Indicates a single node (default: false)LedgerGc
: Enables the ledger garbage collector (default: true)PublicAddress
: The network address used by other nodes to connect (optional)FilePublicAddress
: The network address used by other nodes to connect (optional)DataDir
: The directory for storing p2p data, if empty, memory will be used as database (optional)PeerKey
: Key to encrypt messages, the corresponding public key for NodeID, MUST NOT be revealed (optional)BootNodes
: A list of bootstrap UDP node addresses (optional)StaticNodes
: A list of bootstrap TCP node addresses (optional)GenesisFile
: Sets the genesis block file path (optional)ForwardStrategy
: Picks peers to forward new blocks (default: cross)AccessControl
: Controls the access during the p2p handshake (default: any)AccessAllowKeys
: A list of NodeIDs or public keys to be allowed in the p2p handshake (optional)AccessDenyKeys
: A list of NodeIDs or public keys to be denied in the p2p handshake (optional)BlackBlockHashList
: A list of block hashes to be blacklisted (optional)WhiteBlockList
: A list of block hashes to be whitelisted (optional)VmLogWhiteList
: A list of contract addresses which are allowed to save VM logs (optional)
Important:
- Don't use same address for both SBP address and SBP registration address
- Don't use same mnemonics to generate both SBP address and SBP registration address
Default public modules
They are enabled by default whether or not added to the PublicModules
list.
ledger
: Block information, chain height, virtual machine logs, transactionsnet
: Network synchronization and node information, peers countcontract
: Smart contract information, call off-chain methods, stake, SBP, vote and token informationutil
: Calculate a PoW nonce based on the given difficultyhealth
: Chain and node health related information
Optional public modules
They can be added as needed to the PublicModules
list.
wallet
: Entropy files, mnemonic and entropy store, derive seeds and addresses, sign datapow
: Proof-of-work (PoW) nonce, cancel PoWregister
: Registration and reward related datavote
: Vote and cancel votesmintage
: Mint, issue and burn tokenspledge
: Retrieve and cancel quotadexfund
: ViteX account fund, trade pairs, dividend poolsdextrade
: ViteX trades and ordersdex
: ViteX account balance, token and market information, invitationsprivate_dex
: ViteX fees, operators, market miningtx
: Send raw transactions, calculate PoW difficulty and required quotadashboard
: Operating system, process and runtime information, full node statisticssubscribe
: Polling and callback subscriptionssbpstats
: Hour, period and day SBP statisticsdata
: Quota and ViteX paginated dataledgerdebug
: Debug ledger related methodsminer
: Manually mine a snapshot for debugging and testing purposes
Deprecated public modules
private_onroad
, public_onroad
, debug
, consensusGroup
You might find the node_config.json (opens new window) used by our VSCode Solidity++ Extension helpful.
# Genesis
The genesis block is the start of the blockchain, and the genesis.json
is the file that defines it. It is like the "settings" for the Vite blockchain and below you can find an example:
- Consensus group settings
- 1 snapshot block is produced per second
- 3 consecutive blocks are produced by the same producer in a round
- 1 snapshot block producer is selected in each round
- 2 initial block producers
- VITE token settings
- 2 initial staking accounts
- 3 initial accounts (including 2 built-in contracts)
You can make your own config based on the example below but remember to remove the text comments following after "//". The purpose of the comments is to explain certain configuration settings but they are not part of the genesis config itself and should always be removed.
You might find the default genesis.json (opens new window) of go-vite or the genesis.json (opens new window) used by our VSCode Solidity++ Extension helpful.