Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultCacheSize is calculated as memory consumption in a worst case scenario with default configuration // Average memory consumption might be 3-5 times lower than the maximum DefaultCacheSize = 3600 ConstantCacheSize = 1024 )
View Source
const ( DefaultP2PPort = 5050 // Default p2p port for listening DefaultHTTPPort = 18545 // Default TCP port for the HTTP RPC server DefaultWSPort = 18546 // Default TCP port for the websocket RPC server )
Variables ¶
View Source
var ( // DataDirFlag defines directory to store Lachesis state and user's wallets DataDirFlag = utils.DirectoryFlag{ Name: "datadir", Usage: "Data directory for the databases and keystore", Value: utils.DirectoryString(DefaultDataDir()), } CacheFlag = cli.IntFlag{ Name: "cache", Usage: "Megabytes of memory allocated to internal caching", Value: DefaultCacheSize, } // GenesisFlag specifies network genesis configuration GenesisFlag = cli.StringFlag{ Name: "genesis", Usage: "'path to genesis file' - sets the network genesis configuration.", } ExperimentalGenesisFlag = cli.BoolFlag{ Name: "genesis.allowExperimental", Usage: "Allow to use experimental genesis file.", } RPCGlobalGasCapFlag = cli.Uint64Flag{ Name: "rpc.gascap", Usage: "Sets a cap on gas that can be used in volary_call/estimateGas (0=infinite)", Value: gossip.DefaultConfig(cachescale.Identity).RPCGasCap, } RPCGlobalTxFeeCapFlag = cli.Float64Flag{ Name: "rpc.txfeecap", Usage: "Sets a cap on transaction fee (in volary) that can be sent via the RPC APIs (0 = no cap)", Value: gossip.DefaultConfig(cachescale.Identity).RPCTxFeeCap, } SyncModeFlag = cli.StringFlag{ Name: "syncmode", Usage: `Blockchain sync mode ("full" or "snap")`, Value: "full", } ExitWhenAgeFlag = cli.DurationFlag{ Name: "exitwhensynced.age", Usage: "Exits after synchronisation reaches the required age", } ExitWhenEpochFlag = cli.Uint64Flag{ Name: "exitwhensynced.epoch", Usage: "Exits after synchronisation reaches the required epoch", } )
View Source
var ( Bootnodes = map[string][]string{ "main": { "enode://93228a8ab5dc93ad9847a63dcacee69f3474fbc6541ebebb01ec8781c104818721d9a9ba7be74c79d07528285e703f9dc694ca6f5a43ac51898881525a98d2e2@24.199.103.202:5050", "enode://410e899899f2241160275c6b9a2b11ade173ac837a2bb9880cd591afb586add4333f55fefee3340519cbbca3e94208cf2fa462062f3857a732fd80ac5bd48a8c@206.189.114.32:5050", "enode://a8a8a94654c9762a7091606e49ed28f042c61c26c015727039b60e5086abe7fff8011e1e58fcd95327610317ce031e26b2325d045c63810f31fbe3161e6560a4@143.244.179.149:5050", "enode://c19eb328c146a32f15125343302f70e65a2b127b1042a01ab87d5996eef034f849f720dc985d4d8710b997a22b7111323be2f2f7622366606ba621a015eb7ae9@172.105.154.248:5050", }, "test": {}, } AllowedOperaGenesis = []GenesisTemplate{ { Name: "Mainnet-8888 with pruned MPT", Header: mainnetHeader, Hashes: genesis.Hashes{ genesisstore.EpochsSection: hash.HexToHash("0x01c45fe3343344c852ae54e4492d9fe1ea6f912830469949459b310928a73be3"), genesisstore.BlocksSection: hash.HexToHash("0xea083affb4f2a0a9018f7f1832f16d6276c6e09aba482f6b3c061d7e9cc00d42"), genesisstore.EvmSection: hash.HexToHash("0xa7c16548e78eddc20dfad091604aad04913726ae2f5bb14b916bf1a9ea1e9f25"), }, }, } )
TODO: put enodes here
View Source
var ( PruneExactCommand = cli.BoolFlag{ Name: "prune.exact", Usage: `full pruning without usage of bloom filter (false by default)`, } PruneGenesisCommand = cli.BoolTFlag{ Name: "prune.genesis", Usage: `prune genesis state (true by default)`, } )
View Source
var AppHelpFlagGroups = calcAppHelpFlagGroups()
AppHelpFlagGroups is the application flags, grouped by functionality.
View Source
var (
EvmExportMode = cli.StringFlag{
Name: "export.evm.mode",
Usage: `EVM export mode ("full" or "ext-mpt" or "mpt" or "none")`,
Value: "mpt",
}
)
View Source
var FakeNetFlag = cli.StringFlag{
Name: "fakenet",
Usage: "'n/N' - sets coinbase as fake n-th key from genesis of N validators.",
}
FakeNetFlag enables special testnet, where validators are automatically created
View Source
var NodeDefaultConfig = node.Config{ DataDir: DefaultDataDir(), HTTPPort: DefaultHTTPPort, HTTPModules: []string{}, HTTPVirtualHosts: []string{"localhost"}, HTTPTimeouts: rpc.DefaultHTTPTimeouts, WSPort: DefaultWSPort, WSModules: []string{}, GraphQLVirtualHosts: []string{"localhost"}, P2P: p2p.Config{ NoDiscovery: false, DiscoveryV5: true, ListenAddr: fmt.Sprintf(":%d", DefaultP2PPort), MaxPeers: 50, NAT: nat.Any(), }, }
NodeDefaultConfig contains reasonable default settings.
Functions ¶
func DefaultDataDir ¶
func DefaultDataDir() string
DefaultDataDir is the default data directory to use for the databases and other persistence requirements.
func FindAccountKeypath ¶
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.