github.com/piotrnar/gocoin@v0.0.0-20240512203912-faa0448c5e96/website/gocoin_manual_config.html (about) 1 <html> 2 <head> 3 <link rel="stylesheet" href="style.css" type="text/css"> 4 </head> 5 <body> 6 <h1>Config file</h1> 7 The online node configuration file is named <b>gocoin.conf</b><br> 8 Client application looks for this file in the folder where it is being launched from.<br> 9 The config file is in JSON encoded format, so the order of the fields does not matter, but their types do.<br> 10 <br> 11 12 13 <table border="1" cellspacing="0" cellpadding="5"> 14 <tbody> 15 <tr style="color:blue"> 16 <td>Filed name</td> 17 <td> Type</td> 18 <td> Default value (if not specified)</td> 19 <td> Description</td> 20 </tr> 21 <tr> 22 <td class="cfg_name"> Testnet</td> 23 <td class="cfg_type"> bool</td> 24 <td> false</td> 25 <td class="cfg_info"> Use testnet3 if true</td> 26 </tr> 27 <tr> 28 <td class="cfg_name"> ConnectOnly</td> 29 <td class="cfg_type"> string</td> 30 <td> ""</td> 31 <td class="cfg_info"> Connect only to this host/IP (and nowhere else)</td> 32 </tr> 33 <tr> 34 <td class="cfg_name"> Datadir</td> 35 <td class="cfg_type"> string</td> 36 <td>"%APPDATA%\Bitcoin\gocoin"<br> 37 or "~/.bitcoin/gocoin"</td> 38 <td class="cfg_info"> The data folder for the gocoin client node.<br> 39 It contains the bock chain, UTXO and peers database, plus some other files used by the client. 40 </tr> 41 <tr> 42 <td class="cfg_name"> UserAgent</td> 43 <td class="cfg_type"> string</td> 44 <td> ""</td> 45 <td class="cfg_info"> Overwrite the string reported by the node as User-Agent in the version messages.<br> 46 When this value is empty, the defualt of <b>/Gocoin:x.y.z/</b> is used.</td> 47 </tr> 48 49 <tr><td class="cfg_name"> TextUI_Enabled</td> 50 <td class="cfg_type"> bool</td> 51 <td> true</td> 52 <td class="cfg_info"> Enable TextUI. You will want to disable text interface if you want to start the node as a daemon (with no stdin).<br> 53 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.</td> 54 </tr> 55 56 <tr> 57 <td class="cfg_name"> LastTrustedBlock</td> 58 <td class="cfg_type"> string</td> 59 <td> <i>updated regularly</i></td> 60 <td class="cfg_info"> Hash of the highest trused block (used to speed up initial chain sync).</td> 61 </tr> 62 63 <tr class="even"> 64 <td class="cfg_name"> WebUI.Interface</td> 65 <td class="cfg_type"> string</td> 66 <td> "127.0.0.1:8833"</td> 67 <td class="cfg_info"> Bind WebUI server to this interface. Change it to ":8833" in order to allow external connections.<br> 68 </td> 69 </tr> 70 <tr class="even"> 71 <td class="cfg_name"> WebUI.AllowedIP </td> 72 <td class="cfg_type"> string</td> 73 <td> "127.0.0.1"</td> 74 <td class="cfg_info"> List of IP addresses that are allowed to access WebUI. Use "0.0.0.0/0" to let everyone in.</td> 75 </tr> 76 <tr class="even"> 77 <td class="cfg_name"> WebUI.ShowBlocks</td> 78 <td class="cfg_type"> uint32</td> 79 <td> 144</td> 80 <td class="cfg_info"> How many recent blocks to show at the Blocks page.</td> 81 </tr> 82 <tr class="even"> 83 <td class="cfg_name"> WebUI.AddrListLen</td> 84 <td class="cfg_type"> uint32</td> 85 <td> 15</td> 86 <td class="cfg_info"> How many addresses to show (at the same time) in the address book that pops up at MakeTx page.</td> 87 </tr> 88 <tr class="even"> 89 <td class="cfg_name"> WebUI.Title </td> 90 <td class="cfg_type"> string</td> 91 <td> "Gocoin"</td> 92 <td class="cfg_info"> Title of the WebUI window as seen in the web browser.</td> 93 </tr> 94 <tr class="even"> 95 <td class="cfg_name"> WebUI.PayCmdName</td> 96 <td class="cfg_type"> string</td> 97 <td> "pay_cmd.txt"</td> 98 <td class="cfg_info"> The file name of the pay script command inside the payment.zip (created at MakeTx page).<br> 99 Prefering convenience over security, change .txt extension to .bat or .sh (depending on your platform).</td> 100 </tr> 101 <tr class="even"> 102 <td class="cfg_name"> WebUI.ServerMode </td> 103 <td class="cfg_type"> bool</td> 104 <td> false</td> 105 <td class="cfg_info"> Enable mode in which the WebUI operator cannot do certain things (e.g. change configuration).</td> 106 </tr> 107 <tr class="even"> 108 <td class="cfg_name"> WebUI.SSLPort </td> 109 <td class="cfg_type"> uint16</td> 110 <td> 0</td> 111 <td class="cfg_info"> TCP port number to be used for SSL server.<br> 112 Zero value means to use the default port, which is 4433 for main net and 14433 for test net.<br> 113 Note that SSL server needs valid <code>ca.crt</code>, <code>server.crt</code> and 114 <code>server.key</code> in the client's <code>ssl_cert/</code> dir.</td> 115 </tr> 116 117 <tr class="odd"> 118 <td class="cfg_name"> Net.ListenTCP</td> 119 <td class="cfg_type"> bool</td> 120 <td> true</td> 121 <td class="cfg_info"> Accept incoming TCP connections.</td> 122 </tr> 123 <tr class="odd"> 124 <td class="cfg_name"> Net.TCPPort</td> 125 <td class="cfg_type"> uint16</td> 126 <td> 0 </td> 127 <td class="cfg_info"> Use this TCP port for incomming connections.<br> 128 Zero value means to use the default port, which is 8333 for main net and 18333 for test net.<br> 129 Note that Bitcoin Core (before version 23.0) does not connect to TCP ports other than the default.</td> 130 </tr> 131 <tr class="odd"> 132 <td class="cfg_name"> Net.BindToIF</td> 133 <td class="cfg_type"> string</td> 134 <td> "0.0.0.0" </td> 135 <td class="cfg_info"> Network interface to bind to, for the incomming connections from bitcoin peers. "0.0.0.0" binds to all network interfaces.</td> 136 </tr> 137 <tr class="odd"> 138 <td class="cfg_name"> Net.MaxOutCons</td> 139 <td class="cfg_type"> uint32</td> 140 <td> 9</td> 141 <td class="cfg_info"> Maximum number of outgoing TCP connections.</td> 142 </tr> 143 <tr class="odd"> 144 <td class="cfg_name"> Net.MaxInCons</td> 145 <td class="cfg_type"> uint32</td> 146 <td> 10</td> 147 <td class="cfg_info"> Maximum number of incoming TCP connections.</td> 148 </tr> 149 <tr class="odd"> 150 <td class="cfg_name"> Net.MaxUpKBps</td> 151 <td class="cfg_type"> uint</td> 152 <td> 0</td> 153 <td class="cfg_info"> Maximum upload speed in kilobytes per second. 0 means unlimited.</td> 154 </tr> 155 <tr class="odd"> 156 <td class="cfg_name"> Net.MaxDownKBps</td> 157 <td class="cfg_type"> uint</td> 158 <td> 0</td> 159 <td class="cfg_info"> Maximum download speed in kilobytes per second. 0 means unlimited. </td> 160 </tr> 161 <tr class="odd"> 162 <td class="cfg_name"> Net.MaxBlockAtOnce</td> 163 <td class="cfg_type"> uint32</td> 164 <td> 3</td> 165 <td class="cfg_info"> When a new block appears, (up to) how many peers to ask for its data at the same time.</td> 166 </tr> 167 <tr class="odd"> 168 <td class="cfg_name"> Net.MinSegwitCons</td> 169 <td class="cfg_type"> uint32</td> 170 <td> 4</td> 171 <td class="cfg_info"> Maintain at least so many connections to nodes indicating support for Segregated Witness (via bit 0x8 in Services).</td> 172 <tr class="odd"> 173 <td class="cfg_name"> Net.ExternalIP</td> 174 <td class="cfg_type"> string</td> 175 <td> ""</td> 176 <td class="cfg_info"> If the string is a valid IP v4 address, it will be used as <code>addr_from</code> inside <code>version</code> messages.</td> 177 178 <tr class="even"> 179 <td class="cfg_name"> TXPool.Enabled</td> 180 <td class="cfg_type"> bool</td> 181 <td> true</td> 182 <td class="cfg_info"> Enable memory pool (for transactions).</td> 183 </tr> 184 <tr class="even"> 185 <td class="cfg_name"> TXPool.AllowMemInputs</td> 186 <td class="cfg_type"> bool</td> 187 <td> true</td> 188 <td class="cfg_info"> Accept transactions with unconfirmed inputs to the memory pool.</td> 189 </tr> 190 <tr class="even"> 191 <td class="cfg_name"> TXPool.FeePerByte</td> 192 <td class="cfg_type"> float64</td> 193 <td> 1.0</td> 194 <td class="cfg_info"> Required minimum fee per byte to accept a transaction to the memory pool.</td> 195 </tr> 196 <tr class="even"> 197 <td class="cfg_name"> TXPool.MaxTxSize</td> 198 <td class="cfg_type"> uint32</td> 199 <td> 100000</td> 200 <td class="cfg_info"> Maximum size of a transaction that would be accepted to the memory pool.</td> 201 </tr> 202 <tr class="even"> 203 <td class="cfg_name"> TXPool.MaxSizeMB</td> 204 <td class="cfg_type"> uint</td> 205 <td> 300</td> 206 <td class="cfg_info"> If not zero, the node will keep the mempool size below this value.</td> 207 </tr> 208 <tr class="even"> 209 <td class="cfg_name"> TXPool.MaxRejectMB</td> 210 <td class="cfg_type"> uint</td> 211 <td> 25</td> 212 <td class="cfg_info"> If not zero, the node will keep the cache of rejected transaction below this value.</td> 213 </tr> 214 <tr class="even"> 215 <td class="cfg_name"> TXPool.MaxRejectCnt</td> 216 <td class="cfg_type"> uint</td> 217 <td> 5000</td> 218 <td class="cfg_info"> If not zero, the node will not keep more than this many records of rejected transaction.</td> 219 </tr> 220 <tr class="even"> 221 <td class="cfg_name"> TXPool.SaveOnDisk</td> 222 <td class="cfg_type"> bool</td> 223 <td> true</td> 224 <td class="cfg_info"> Save content of memory pool to disk on closing and load it on startup.</td> 225 </tr> 226 227 <tr class="odd"> 228 <td class="cfg_name"> TXRoute.Enabled</td> 229 <td class="cfg_type"> bool</td> 230 <td> true</td> 231 <td class="cfg_info"> Enable routing of transactions (memory pool must be enabled as well).</td> 232 </tr> 233 <tr class="odd"> 234 <td class="cfg_name"> TXRoute.FeePerByte</td> 235 <td class="cfg_type"> float64</td> 236 <td> 0.0</td> 237 <td class="cfg_info"> Required minimum fee per byte to route accepted transactions.<br> 238 Note that transactions which do not meet "TXPool.FeePerByte" (see above) are not being accepted, 239 therefore setting it to 0.0 will route all the accepted transactions.</td> 240 </tr> 241 <tr class="odd"> 242 <td class="cfg_name"> TXRoute.MaxTxSize</td> 243 <td class="cfg_type"> uint32</td> 244 <td> 100000</td> 245 <td class="cfg_info"> Maximum size of a transaction that will be routed to other peers.</td> 246 </tr> 247 <tr class="odd"> 248 <td class="cfg_name"> TXRoute.MemInputs</td> 249 <td class="cfg_type"> bool</td> 250 <td> false</td> 251 <td class="cfg_info"> Route transactions which spend unconfirmed inputs.</td> 252 </tr> 253 254 <tr class="even"> 255 <td class="cfg_name"> Memory.GCPercTrshold</td> 256 <td class="cfg_type"> int </td> 257 <td> 30</td> 258 <td class="cfg_info"> A threshold (in percent) to trigger Go's garbage collector engine.<br> 259 The higher you set it, the better performance should be (at a cost of RAM).</td> 260 </tr> 261 <tr class="even"> 262 <td class="cfg_name"> Memory.UseGoHeap</td> 263 <td class="cfg_type"> bool</td> 264 <td> false</td> 265 <td class="cfg_info"> Use native Go heap with Garbage Collector for UTXO records.<br> 266 Using native heap makes the node a bit faster at a cost of using more RAM, although it is not always the case. 267 </td> 268 </tr> 269 <tr class="even"> 270 <td class="cfg_name"> Memory.MaxCachedBlks</td> 271 <td class="cfg_type"> uint</td> 272 <td> 200</td> 273 <td class="cfg_info"> How many (recently used) blocks shall be kept in RAM.</td> 274 </tr> 275 <tr class="even"> 276 <td class="cfg_name"> Memory.FreeAtStart</td> 277 <td class="cfg_type"> bool</td> 278 <td> false</td> 279 <td class="cfg_info"> After loading UTXO database from disk, free as much RAM as possible.</td> 280 </tr> 281 <tr class="even"> 282 <td class="cfg_name"> Memory.CacheOnDisk</td> 283 <td class="cfg_type"> bool</td> 284 <td> true</td> 285 <td class="cfg_info"> During chain sync, store bigger blocks on disk (in datadir's "tmpblk/") instead of holding them in RAM.<br> 286 Makes block chain sync process a bit slower, but saves RAM instead.</td> 287 </tr> 288 <tr class="even"> 289 <td class="cfg_name"> Memory.MaxSyncCacheMB</td> 290 <td class="cfg_type"> uint</td> 291 <td> 500</td> 292 <td class="cfg_info"> Set the size of a cached blocks buffer, used during chain sync.</td> 293 </tr> 294 <tr class="even"> 295 <td class="cfg_name"> Memory.MaxDataFileMB</td> 296 <td class="cfg_type"> uint</td> 297 <td> 1000</td> 298 <td class="cfg_info"> Maximum size of single data file in blocks database (0 for unlimited). Used for easy purging of old blocks.</td> 299 </tr> 300 <tr class="even"> 301 <td class="cfg_name"> Memory.DataFilesKeep</td> 302 <td class="cfg_type"> uint32</td> 303 <td> 0</td> 304 <td class="cfg_info"> If not zero, keep only such many complete data files of the blocks database (auto purging of the old blocks).</td> 305 </tr> 306 <tr class="even"> 307 <td class="cfg_name"> Memory.OldDataBackup</td> 308 <td class="cfg_type"> bool</td> 309 <td> false</td> 310 <td class="cfg_info"> Save data files to "oldat/" folder before deleting them from the blocks database.<br> 311 It is useful for automatic archiving old blocks on a different drive ("oldat/" shall be a link to a different drive, then).<br> 312 The blocks from "oldat/" folder will still be served by the node to its peers.</td> 313 </tr> 314 <tr class="even"> 315 <td class="cfg_name"> Memory.PurgeUnspendableUTXO</td> 316 <td class="cfg_type"> bool</td> 317 <td> true</td> 318 <td class="cfg_info"> When enabled, the node does not store unspendable outputs in its UTXO database.<br> 319 Having just enabling this option, execute TextUI command <code>purge</code> to purge all unspendable records kept from past transactions.<br> 320 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.<br> 321 </td> 322 </tr> 323 <tr class="even"> 324 <td class="cfg_name"> Memory.CompressBlockDB</td> 325 <td class="cfg_type"> bool</td> 326 <td> true</td> 327 <td class="cfg_info"> Compress blocks on disk.<br> 328 </td> 329 </tr> 330 331 <tr class="odd"> 332 <td class="cfg_name"> AllBalances.MinValue</td> 333 <td class="cfg_type"> uint</td> 334 <td> 10000</td> 335 <td class="cfg_info"> The addresses balance database does not include inputs carrying value lover than this many Satoshis.</td> 336 </tr> 337 338 <tr class="odd"> 339 <td class="cfg_name"> AllBalances.UseMapCnt</td> 340 <td class="cfg_type"> int</td> 341 <td> 5000</td> 342 <td class="cfg_info"> Use hashmap instead of list for addresses that have this many (or more) unspent outputs.</td> 343 </tr> 344 345 <tr class="odd"> 346 <td class="cfg_name"> AllBalances.AutoLoad</td> 347 <td class="cfg_type"> bool</td> 348 <td> true</td> 349 <td class="cfg_info"> Atomatically enable wallet functionality after the node is launched and synchronized.</td> 350 </tr> 351 352 <tr class="even"> 353 <td class="cfg_name"> DropPeers.DropEachMinutes</td> 354 <td class="cfg_type"> uint</td> 355 <td> 5</td> 356 <td class="cfg_info"> How many minutes between disconnecting the slowest peers. 0 - never drop peers.</td> 357 </tr> 358 <tr class="even"> 359 <td class="cfg_name"> DropPeers.BlckExpireHours</td> 360 <td class="cfg_type"> uint</td> 361 <td> 24</td> 362 <td class="cfg_info"> How many hours before blocks received from a peer "expire", in slowest peer calculation.</td> 363 </tr> 364 <tr class="even"> 365 <td class="cfg_name"> DropPeers.PingPeriodSec</td> 366 <td class="cfg_type"> uint</td> 367 <td> 15</td> 368 <td class="cfg_info"> How many seconds between sending ping comand to a peer. 0 - do not ping.</td> 369 </tr> 370 371 <tr class="odd"> 372 <td class="cfg_name"> Stat.HashrateHrs </td> 373 <td class="cfg_type"> uint</td> 374 <td> 12</td> 375 <td class="cfg_info"> How many hours to look back for the hashrate calculation (the one shown on the home page of WebUI)</td> 376 </tr> 377 <tr class="odd"> 378 <td class="cfg_name"> Stat.MiningHrs</td> 379 <td class="cfg_type"> uint</td> 380 <td> 24</td> 381 <td class="cfg_info"> How many hours the mining statistics (at WebUI's Miners page) should look back.</td> 382 </tr> 383 <tr class="odd"> 384 <td class="cfg_name"> Stat.FeesBlks</td> 385 <td class="cfg_type"> uint</td> 386 <td> 24</td> 387 <td class="cfg_info"> How many block down the chain to look for calculating the current average transaction fee.</td> 388 </tr> 389 <tr class="odd"> 390 <td class="cfg_name"> Stat.BSizeBlks</td> 391 <td class="cfg_type"> uint</td> 392 <td> 72</td> 393 <td class="cfg_info"> How many block down the chain to look for calculating the current average block size.</td> 394 </tr> 395 <tr class="odd"> 396 <td class="cfg_name"> Stat.NoCounters</td> 397 <td class="cfg_type"> bool</td> 398 <td> false</td> 399 <td class="cfg_info"> When set, it turns off node's internal counters to improve performance.</td> 400 </tr> 401 402 <tr class="even"> 403 <td class="cfg_name"> UTXOSave.BlocksToHold</td> 404 <td class="cfg_type"> uint</td> 405 <td> 6</td> 406 <td class="cfg_info"> Skip so many new blocks before auto saving a new UTXO.db to disk.<br> 407 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.</td> 408 </tr> 409 <tr class="even"> 410 <td class="cfg_name"> UTXOSave.SecondsToTake</td> 411 <td class="cfg_type"> uint</td> 412 <td> 300</td> 413 <td class="cfg_info"> While saving UTXO.db to disk, spread (delay) the process into at least so many seconds. 414 New block arriving within this period will abort and restart the saving process. 415 0 saves UTXO.db as fast as possible.<br> 416 Note that setting this value too low may make your system sluggish while the database is being written. 417 At the other hand, setting it too high may make the saving process unable to complete for long periods of time.</td> 418 </tr> 419 420 421 </tbody> 422 </table> 423 <br> 424 425 </body> 426 </html>