Running Idena
To connect to Idena mainnet network run executable without parameters. idena-go uses go-ipfs and private ipfs network to store data.
CLI parameters
--configUse custom configuration file--datadirNode data directory (defaultdatadir)--rpcaddrRPC listening address (defaultlocalhost)--rpcportRPC listening port (default9009)--ipfsportIPFS P2P port (default40405)--ipfsportstaticPrevent changing IPFS port (defaultfalse)--ipfsbootnodeSet custom bootstrap node--fastUse fast sync (defaulttrue)--verbosityLog verbosity (default3-Info)--nodiscoveryDo not discover another nodes (defaultfalse)--profile=lowpowerReduce bandwidth usage--apikeySet RPC API key--logfilesizeSet maximum log file size in KB (default10240)
JSON config
Custom json configuration can be used if --config=<config file name> parameter is specified. Use server IPFS profile if you run idena-go on VPS to prevent local network scanning.
{
"DataDir": "datadir",
"P2P": {
"MaxInboundPeers": 12,
"MaxOutboundPeers": 6
},
"RPC": {
"HTTPHost": "localhost",
"HTTPPort": 9009
},
"IpfsConf": {
"Profile": "server",
"IpfsPort": 40405,
"BlockPinThreshold": 0.3,
"FlipPinThreshold": 0.5
},
"Sync": {
"FastSync": true
}
}
Full node
A full node verifies all blocks and states during synchronization. To run full synchronization:
idena-go --fast=false
By default, blocks and flips are pinned in local ipfs storage with 30% and 50% probability respectively.
If you want to pin (save) locally all blocks and flips, set 1 for BlockPinThreshold and FlipPinThreshold.
Local automine node
Config
For debug purposes you can run local automine node with this config.
{
"IpfsConf": {
"BootNodes": [],
"Profile": "server",
"IpfsPort": 60606
},
"RPC": {
"HTTPHost": "localhost",
"HTTPPort": 9111
},
"GenesisConf": {
"GodAddress": "0x0000000000000000000000000000000000000000",
"FirstCeremonyTime": 1700000000
},
"Consensus": {
"Automine": true
},
"Validation": {
"ValidationInterval": 300000000000,
"FlipLotteryDuration": 10000000000,
"ShortSessionDuration": 40000000000,
"LongSessionDuration": 40000000000,
"AfterLongSessionDuration": 10000000000
},
"Network": 3
}
Description
GodAddress- the address which refers to private key in nodekey file. So, when you are running automine node, you should see log in consoleCoinbase address addr=<addr>with this address. This address will mine coins if network has 0 valid identities;FirstCeremonyTime- timestamp of first validation ceremony;Validation section- duration of each validation period in nanoseconds;Network- should be different from 1 or 2, anyuint32numberIpfs bootnodes- array of bootstrap nodes in case of running multiple local nodes
For more detailed configuration please see config structure