idena-go

command module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2023 License: LGPL-3.0 Imports: 10 Imported by: 0

README

Idena Go

Golang implementation of the Idena network node

Build Status

Building the source

Building idena-go required a Go (version 1.16 or later) and a C compiler. idena-go uses Go modules as a dependency manager. Once the dependencies are installed, run

go build

Running idena-go

To connect to idena experimental mainnet network run executable without parameters. idena-go uses go-ipfs and private ipfs network to store data.

CLI parameters

  • --config Use custom configuration file
  • --datadir Node data directory (default datadir)
  • --rpcaddr RPC listening address (default localhost)
  • --rpcport RPC listening port (default 9009)
  • --ipfsport IPFS P2P port (default 40405)
  • --ipfsportstatic Prevent changing IPFS port (default false)
  • --ipfsbootnode Set custom bootstrap node
  • --fast Use fast sync (default true)
  • --verbosity Log verbosity (default 3 - Info)
  • --nodiscovery Do not discover another nodes (default false)
  • --profile=lowpower Reduce bandwidth usage
  • --apikey Set RPC API key
  • --logfilesize Set maximum log file size in KB (default 10240)

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
  }
}

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 console Coinbase 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, any uint32 number
  • Ipfs bootnodes - array of bootstrap nodes in case of running multiple local nodes

For more detailed configuration please see config structure

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
fee
cmd
Package common contains various helper functions.
Package common contains various helper functions.
bitutil
Package bitutil implements fast bitwise operations.
Package bitutil implements fast bitwise operations.
hexutil
Package hexutil implements hex encoding with 0x prefix.
Package hexutil implements hex encoding with 0x prefix.
math
Package math provides integer math utilities.
Package math provides integer math utilities.
mclock
Package mclock is a wrapper for a monotonic clock source
Package mclock is a wrapper for a monotonic clock source
core
bn256
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
bn256/cloudflare
Package bn256 implements a particular bilinear group at the 128-bit security level.
Package bn256 implements a particular bilinear group at the 128-bit security level.
bn256/google
Package bn256 implements a particular bilinear group.
Package bn256 implements a particular bilinear group.
secp256k1
Package secp256k1 wraps the bitcoin secp256k1 C library.
Package secp256k1 wraps the bitcoin secp256k1 C library.
sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
vrf
Package vrf defines the interface to a verifiable random function.
Package vrf defines the interface to a verifiable random function.
Package keystore implements encrypted storage of secp256k1 private keys.
Package keystore implements encrypted storage of secp256k1 private keys.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.
rpc
Package rpc provides access to the exported methods of an object across a network or other I/O connection.
Package rpc provides access to the exported methods of an object across a network or other I/O connection.
stats
vm
env

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL