Config file

The online node configuration file is named gocoin.conf
Client application looks for this file in the folder where it is being launched from.
The config file is in JSON encoded format, so the order of the fields does not matter, but their types do.

Filed name Type Default value (if not specified) Description
Testnet bool false Use testnet3 if true
ConnectOnly string "" Connect only to this host/IP (and nowhere else)
Datadir string "%APPDATA%\Bitcoin\gocoin"
or "~/.bitcoin/gocoin"
The data folder for the gocoin client node.
It contains the bock chain, UTXO and peers database, plus some other files used by the client.
UserAgent string "" Overwrite the string reported by the node as User-Agent in the version messages.
When this value is empty, the defualt of /Gocoin:x.y.z/ is used.
TextUI_Enabled bool true Enable TextUI. You will want to disable text interface if you want to start the node as a daemon (with no stdin).
Note that on Linux based systems it is advised to run the node within the "screen" command, in which case you want to keep TextUI enabled.
LastTrustedBlock string updated regularly Hash of the highest trused block (used to speed up initial chain sync).
WebUI.Interface string "127.0.0.1:8833" Bind WebUI server to this interface. Change it to ":8833" in order to allow external connections.
WebUI.AllowedIP string "127.0.0.1" List of IP addresses that are allowed to access WebUI. Use "0.0.0.0/0" to let everyone in.
WebUI.ShowBlocks uint32 144 How many recent blocks to show at the Blocks page.
WebUI.AddrListLen uint32 15 How many addresses to show (at the same time) in the address book that pops up at MakeTx page.
WebUI.Title string "Gocoin" Title of the WebUI window as seen in the web browser.
WebUI.PayCmdName string "pay_cmd.txt" The file name of the pay script command inside the payment.zip (created at MakeTx page).
Prefering convenience over security, change .txt extension to .bat or .sh (depending on your platform).
WebUI.ServerMode bool false Enable mode in which the WebUI operator cannot do certain things (e.g. change configuration).
WebUI.SSLPort uint16 0 TCP port number to be used for SSL server.
Zero value means to use the default port, which is 4433 for main net and 14433 for test net.
Note that SSL server needs valid ca.crt, server.crt and server.key in the client's ssl_cert/ dir.
Net.ListenTCP bool true Accept incoming TCP connections.
Net.TCPPort uint16 0 Use this TCP port for incomming connections.
Zero value means to use the default port, which is 8333 for main net and 18333 for test net.
Note that Bitcoin Core (before version 23.0) does not connect to TCP ports other than the default.
Net.BindToIF string "0.0.0.0" Network interface to bind to, for the incomming connections from bitcoin peers. "0.0.0.0" binds to all network interfaces.
Net.MaxOutCons uint32 9 Maximum number of outgoing TCP connections.
Net.MaxInCons uint32 10 Maximum number of incoming TCP connections.
Net.MaxUpKBps uint 0 Maximum upload speed in kilobytes per second. 0 means unlimited.
Net.MaxDownKBps uint 0 Maximum download speed in kilobytes per second. 0 means unlimited.
Net.MaxBlockAtOnce uint32 3 When a new block appears, (up to) how many peers to ask for its data at the same time.
Net.MinSegwitCons uint32 4 Maintain at least so many connections to nodes indicating support for Segregated Witness (via bit 0x8 in Services).
Net.ExternalIP string "" If the string is a valid IP v4 address, it will be used as addr_from inside version messages.
TXPool.Enabled bool true Enable memory pool (for transactions).
TXPool.AllowMemInputs bool true Accept transactions with unconfirmed inputs to the memory pool.
TXPool.FeePerByte float64 1.0 Required minimum fee per byte to accept a transaction to the memory pool.
TXPool.MaxTxSize uint32 100000 Maximum size of a transaction that would be accepted to the memory pool.
TXPool.MaxSizeMB uint 300 If not zero, the node will keep the mempool size below this value.
TXPool.MaxRejectMB uint 25 If not zero, the node will keep the cache of rejected transaction below this value.
TXPool.MaxRejectCnt uint 5000 If not zero, the node will not keep more than this many records of rejected transaction.
TXPool.SaveOnDisk bool true Save content of memory pool to disk on closing and load it on startup.
TXRoute.Enabled bool true Enable routing of transactions (memory pool must be enabled as well).
TXRoute.FeePerByte float64 0.0 Required minimum fee per byte to route accepted transactions.
Note that transactions which do not meet "TXPool.FeePerByte" (see above) are not being accepted, therefore setting it to 0.0 will route all the accepted transactions.
TXRoute.MaxTxSize uint32 100000 Maximum size of a transaction that will be routed to other peers.
TXRoute.MemInputs bool false Route transactions which spend unconfirmed inputs.
Memory.GCPercTrshold int 30 A threshold (in percent) to trigger Go's garbage collector engine.
The higher you set it, the better performance should be (at a cost of RAM).
Memory.UseGoHeap bool false Use native Go heap with Garbage Collector for UTXO records.
Using native heap makes the node a bit faster at a cost of using more RAM, although it is not always the case.
Memory.MaxCachedBlks uint 200 How many (recently used) blocks shall be kept in RAM.
Memory.FreeAtStart bool false After loading UTXO database from disk, free as much RAM as possible.
Memory.CacheOnDisk bool true During chain sync, store bigger blocks on disk (in datadir's "tmpblk/") instead of holding them in RAM.
Makes block chain sync process a bit slower, but saves RAM instead.
Memory.MaxSyncCacheMB uint 500 Set the size of a cached blocks buffer, used during chain sync.
Memory.MaxDataFileMB uint 1000 Maximum size of single data file in blocks database (0 for unlimited). Used for easy purging of old blocks.
Memory.DataFilesKeep uint32 0 If not zero, keep only such many complete data files of the blocks database (auto purging of the old blocks).
Memory.OldDataBackup bool false Save data files to "oldat/" folder before deleting them from the blocks database.
It is useful for automatic archiving old blocks on a different drive ("oldat/" shall be a link to a different drive, then).
The blocks from "oldat/" folder will still be served by the node to its peers.
Memory.PurgeUnspendableUTXO bool true When enabled, the node does not store unspendable outputs in its UTXO database.
Having just enabling this option, execute TextUI command purge to purge all unspendable records kept from past transactions.
Disabling this will make your node to require more RAM, but may be necessary for certain applications that one may develop on top of Gocoin's UTXO database.
Memory.CompressBlockDB bool true Compress blocks on disk.
AllBalances.MinValue uint 10000 The addresses balance database does not include inputs carrying value lover than this many Satoshis.
AllBalances.UseMapCnt int 5000 Use hashmap instead of list for addresses that have this many (or more) unspent outputs.
AllBalances.AutoLoad bool true Atomatically enable wallet functionality after the node is launched and synchronized.
DropPeers.DropEachMinutes uint 5 How many minutes between disconnecting the slowest peers. 0 - never drop peers.
DropPeers.BlckExpireHours uint 24 How many hours before blocks received from a peer "expire", in slowest peer calculation.
DropPeers.PingPeriodSec uint 15 How many seconds between sending ping comand to a peer. 0 - do not ping.
Stat.HashrateHrs uint 12 How many hours to look back for the hashrate calculation (the one shown on the home page of WebUI)
Stat.MiningHrs uint 24 How many hours the mining statistics (at WebUI's Miners page) should look back.
Stat.FeesBlks uint 24 How many block down the chain to look for calculating the current average transaction fee.
Stat.BSizeBlks uint 72 How many block down the chain to look for calculating the current average block size.
Stat.NoCounters bool false When set, it turns off node's internal counters to improve performance.
UTXOSave.BlocksToHold uint 6 Skip so many new blocks before auto saving a new UTXO.db to disk.
Note that UTXO.db has a size of a few GB - saving it more often may cause a solid state drive (SSD) to deplete faster.
UTXOSave.SecondsToTake uint 300 While saving UTXO.db to disk, spread (delay) the process into at least so many seconds. New block arriving within this period will abort and restart the saving process. 0 saves UTXO.db as fast as possible.
Note that setting this value too low may make your system sluggish while the database is being written. At the other hand, setting it too high may make the saving process unable to complete for long periods of time.