The config/options.conf file specifies network configuration options like the IP address on which the server runs and the ports it should open and the peers to which it should connect. The template file config/options.conf.template will run a server at http://localhost:12101 by default. You can rename or edit it as you'd like.
{
"server": {
"host": "localhost",
"port": 12101,
"protocol": "http",
"endpoint": {
"host": "localhost",
"port": 12101,
"protocol": "http"
},
// number of verification threads
"verification_threads": 4,
// size of a message buffer between threads
"channel_size": 10000,
// period the stat timer is executed
"stat_timer_in_ms": 5000,
"reconnection_wait_time": 10000,
// how long does a thread sleep if there's no work to do
"thread_sleep_time_in_ms": 10,
// count of blocks a node will fetch parallely from a peer any given time.
"block_fetch_batch_size": 10
},
"peers": [
{
"host": "127.0.0.1",
"port": 12101,
"protocol": "http",
"synctype": "full"
}
],
"spv_mode": false,
"consensus": {
"genesis_period": 80640,
"heartbeat_interval": 30000,
"prune_after_blocks": 99,
"max_staker_recursions": 3,
"default_social_stake": 100000000000000,
"default_social_stake_period": 100,
// for each block, how many on confirmation callbacks are called
"block_confirmation_limit": 5,
// recollect txs when a block reorged out of longest chain. 0 - recollect nothing, 1 - recollect txs with fees, 2 - recollect all
"recollect_discarded_txs_mode": 2,
"disable_block_production": false
},
"blockchain": {
"last_block_hash": "",
"last_block_id": 0,
"last_timestamp": 0,
"genesis_block_id": 0,
"genesis_timestamp": 0,
"lowest_acceptable_timestamp": 0,
"lowest_acceptable_block_hash": "",
"lowest_acceptable_block_id": 0,
"fork_id": "0",
"issuance_writing_block_interval": 10,
// confirmation counts for last few blocks. don't edit.
"confirmations": []
},
// related to congestion controls. Whole thing can be deleted, But entries are not to be modified manually.
"congestion": [],
"wallet": {
"publicKey":"",
"privateKey": "",
}
}
You do not need to provide information for most of these fields. The most important are the following:
"server": {
"host": "localhost",
"port": 12101,
"protocol": "http",
"endpoint": {
"host": "localhost",
"port": 12101,
"protocol": "http"
},
host and port indicate the address of the server as visible to the operating system and any local apps. If you are running Saito on a remote server you should provide the host and port that users will use to connect to the server as the endpoint.
host: IP address the server listens on. 127.0.0.1 for localhost.port: Port number for the server. Default is 12101.protocol: Network protocol, http in this case.endpoint: Specifies the endpoint details, mirroring the server's configuration for external access.verification_threads: Number of threads for processing verification tasks.channel_size: Maximum number of queued tasks or messages.stat_timer_in_ms: Interval for reporting stats or performing periodic checks.reconnection_wait_time: Wait time before attempting reconnection in ms. Default is 10000.thread_sleep_time_in_ms: Sleep time for background threads in msblock_fetch_batch_size: Number of blocks fetched per batch during sync.peers: An array of peer nodes the server will connect to.Note that each peer object includes host, port, protocol, and synctype. Since these connections will be made over-the-network, the host and port you provide for any peers should be the publicly-available information provided in their options.conf as an endpoint.