final_tac_network.conf
tac {
blockchain {
type: MAINNET
}
This first section of code defines the blockchain as TAC and tells your mining software that you are connecting to the blockchain mainnet. Note that the tac block opens but does not close. This is because we close this block further down in the configuration.
network {
bind-address = "0.0.0.0"
port = "6864"
node-name = "name for your node"
declared-address = "127.0.0.1:6864"
known-peers = ["198.23.213.66:6860","198.23.213.67:6864","192.227.210.138:6860","23.95.84.10:6860","192.227.210.142:6864"]
nonce = "2324"
enable-peers-exchange = "yes"
}
This second section of code is called the network block. This is where we setup details to connect to the network.
If you wish this to be a public node others can connect to, change your declared-address to your public IP. Being public is not required for mining nor node operation however it does help strengthen the network by allowing others to sync with your node.
A node-name can be anything. This is how the rest of the network identifies your specific node.
The known-peers are a list of other nodes you can connect to for syncing. A node must be synced and connected to other nodes in order to earn mining rewards.
The Nonce setting can be change to any random number. Keep this number over 1000 and under 10000 for optimal operations.
The max-inbound-connections and max-outbound-connections limit the number of nodes that can connect to your node as well as limit how many connections out from your computer you will allow. This is safe to leave at 100 but can be increased or decreased to adjust for machine specific performance.
The max-single-host-connections defines how many connections 1 single host can connect to your node. It is safe to keep this at 20 but if you see an attack taking place this can be reduced.
A standard for connection-timeout is 60 seconds. This means exactly what one would expect, a machine will terminate a connection after 60 seconds of inactivity.
If you run from localhost there is no need to change the enable-peers-exchange however if you wish to run from a public ip and still block access to your node, you can change this to setting to no.
rest-api {
enable = no
cors = no
bind-address = "127.0.0.1"
port = 6869
api-key-hash = ""
}
The rest api block can simply be disabled by changing enable to no. This is only needed if one wishes to interact with their node through command interface or provide others the ability to interact with the command interface.
All settings in this block other than enable should be left as default except the api-key-hash which password protects dangerous api features from the public.
To generate an api-key-hash you need to have curl installed on your computer or server. Simply issue the follwoing command on your command line.
curl -X POST "https://nodes.tactoken.io/utils/hash/fast" -H "accept: application/json" -H "Content-Type: text/plain" -d "your_secure_password" .
This will provide an output of your hashed password that can be used in this setting.
miner {
enable = yes
interval-after-last-block-then-generation-is-allowed = 1d
max-transactions-in-micro-block = 500
micro-block-interval = 10000ms
min-micro-block-age = 0s
quorum = 3
}
The miner block settings should rarely need to be changed. If one is running a node without mining the enable settings can be set to no.
Do not set last block interval lower than 1d. This setting is a security setting that ensures you are connected to the correct blockchain and does not allow you to mine if the blockchain has not updated in the past day. There is rarely a need to change this but it could be increased to a higher value for better security.
The microblock settings must not be changed and are required to exist in the block for proper connection for mining.
The quorum setting should always be a number of 1 or higher. This setting basically tells your nodes that other nodes must have a minimum of 1 active connection to mine. This prevents offline mining and splitting form the main TAC network.
wallet {
seed = "your wallet seed"
password = "a unique password"
}
Note that this section has en extra close tag in it to close the current opened tac block. This will be the last block in the file.
To create your mining wallet it is highly recommended that you generate a wallet address using our desktop wallet. After creating a wallet address, you will find your seed in the settings area listed under the Encoded backup phrase.
The password should be unique and different from the one used during your wallet creation.
Note that after starting your node and verifying it is running, it is highly recommended for security reasons to delete the wallet block from your node configuration. This makes it so in the event your computer or server is hacked, there is no ability for the hacker to gain access to your funds - however each time you restart your node, you must add the block back again.
If you wallet has less than 1000 TAC it will not mine but your node will stay synced and developers can still operate their api.
synchronization {
#increase the value below if your node stops earning or auto-forks
max-rollback: 1000
}
}
This last section helps prevent auto forking of nodes. This setting tells the chain to validate the node is not on a fork for up to 1,000 blocks.
|