C-Chain
In order to specify a config for the C-Chain, a JSON config file should be
placed at {chain-config-dir}/C/config.json
. This file does not exist by
default.
For example if chain-config-dir
has the default value which is
$HOME/.avalanchego/configs/chains
, then config.json
should be placed at
$HOME/.avalanchego/configs/chains/C/config.json
.
The C-Chain config is printed out in the log when a node starts. Default values for each config flag are specified below.
Default values are overridden only if specified in the given config file. It is recommended to only provide values which are different from the default, as that makes the config more resilient to future default changes. Otherwise, if defaults change, your node will remain with the old values, which might adversely affect your node operation.
State Syncβ
state-sync-enabled
β
Boolean
Set to true
to start the chain with state sync enabled. The peer will
download chain state from peers up to a recent block near tip, then proceed with
normal bootstrapping.
Defaults to perform state sync if starting a new node from scratch. However, if running with an existing database it will default to false and not perform state sync on subsequent runs.
Please note that if you need historical data, state sync isn't the right option. However, it is sufficient if you are just running a validator.
state-sync-skip-resume
β
Boolean
If set to true
, the chain will not resume a previously started state sync
operation that did not complete. Normally, the chain should be able to resume
state syncing without any issue. Defaults to false
.
state-sync-min-blocks
β
Integer
Minimum number of blocks the chain should be ahead of the local node to prefer
state syncing over bootstrapping. If the node's database is already close to the
chain's tip, bootstrapping is more efficient. Defaults to 300000
.
state-sync-ids
β
String
Comma separated list of node IDs (prefixed with NodeID-
) to fetch state sync
data from. An example setting of this field would be
--state-sync-ids="NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg,NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ"
.
If not specified (or empty), peers are selected at random. Defaults to empty
string (""
).
state-sync-server-trie-cache
β
Integer
Size of trie cache used for providing state sync data to peers in MBs. Should be
a multiple of 64
. Defaults to 64
.
Continuous Profilingβ
continuous-profiler-dir
β
String
Enables the continuous profiler (captures a CPU/Memory/Lock profile at a
specified interval). Defaults to ""
. If a non-empty string is provided, it
enables the continuous profiler and specifies the directory to place the
profiles in.
continuous-profiler-frequency
β
Duration
Specifies the frequency to run the continuous profiler. Defaults 900000000000
nano seconds which is 15 minutes.
continuous-profiler-max-files
β
Integer
Specifies the maximum number of profiles to keep before removing the oldest.
Defaults to 5
.
Enabling Avalanche Specific APIsβ
snowman-api-enabled
β
Boolean
Enables the Snowman API. Defaults to false
.
coreth-admin-api-enabled
β
Boolean
Deprecated as of v0.12.5
. Use admin-api-enabled
instead.
Enables the Admin API. Defaults to false
.
coreth-admin-api-dir
β
String
Deprecated as of v0.12.5
. Use admin-api-dir
instead.
Specifies the directory for the Admin API to use to store CPU/Mem/Lock Profiles.
Defaults to ""
.
Enabling EVM APIsβ
eth-apis
([]string)β
Use the eth-apis
field to specify the exact set of below services to enable on
your node. If this field is not set, then the default list will be:
["eth","eth-filter","net","web3","internal-eth","internal-blockchain","internal-transaction"]
.
The names used in this configuration flag have been updated in Coreth v0.8.14
.
The previous names containing public-
and private-
are deprecated. While
the current version continues to accept deprecated values, they may not be
supported in future updates and updating to the new values is recommended.
The mapping of deprecated values and their updated equivalent follows:
Deprecated | Use instead |
---|---|
public-eth | eth |
public-eth-filter | eth-filter |
private-admin | admin |
private-debug | debug |
public-debug | debug |
internal-public-eth | internal-eth |
internal-public-blockchain | internal-blockchain |
internal-public-transaction-pool | internal-transaction |
internal-public-tx-pool | internal-tx-pool |
internal-public-debug | internal-debug |
internal-private-debug | internal-debug |
internal-public-account | internal-account |
internal-private-personal | internal-personal |
If you populate this field, it will override the defaults so you must include every service you wish to enable.
eth
β
The API name public-eth
is deprecated as of v1.7.15, and the APIs previously
under this name have been migrated to eth
.
Adds the following RPC calls to the eth_*
namespace. Defaults to true
.
eth_coinbase
eth_etherbase
eth-filter
β
The API name public-eth-filter
is deprecated as of v1.7.15, and the APIs
previously under this name have been migrated to eth-filter
.
Enables the public filter API for the eth_*
namespace. Defaults to true
.
Adds the following RPC calls (see here for complete documentation):
eth_newPendingTransactionFilter
eth_newPendingTransactions
eth_newAcceptedTransactions
eth_newBlockFilter
eth_newHeads
eth_logs
eth_newFilter
eth_getLogs
eth_uninstallFilter
eth_getFilterLogs
eth_getFilterChanges
admin
β
The API name private-admin
is deprecated as of v1.7.15, and the APIs
previously under this name have been migrated to admin
.
Adds the following RPC calls to the admin_*
namespace. Defaults to false
.
admin_importChain
admin_exportChain
debug
β
The API names private-debug
and public-debug
are deprecated as of v1.7.15,
and the APIs previously under these names have been migrated to debug
.
Adds the following RPC calls to the debug_*
namespace. Defaults to false
.
debug_dumpBlock
debug_accountRange
debug_preimage
debug_getBadBlocks
debug_storageRangeAt
debug_getModifiedAccountsByNumber
debug_getModifiedAccountsByHash
debug_getAccessibleState
net
β
Adds the following RPC calls to the net_*
namespace. Defaults to true
.
net_listening
net_peerCount
net_version
Note: Coreth is a virtual machine and does not have direct access to the
networking layer, so net_listening
always returns true and net_peerCount
always returns 0. For accurate metrics on the network layer, users should use
the AvalancheGo APIs.
debug-tracer
β
Adds the following RPC calls to the debug_*
namespace. Defaults to false
.
debug_traceChain
debug_traceBlockByNumber
debug_traceBlockByHash
debug_traceBlock
debug_traceBadBlock
debug_intermediateRoots
debug_traceTransaction
debug_traceCall
web3
β
Adds the following RPC calls to the web3_*
namespace. Defaults to true
.
web3_clientVersion
web3_sha3
internal-eth
β
The API name internal-public-eth
is deprecated as of v1.7.15, and the APIs
previously under this name have been migrated to internal-eth
.
Adds the following RPC calls to the eth_*
namespace. Defaults to true
.
eth_gasPrice
eth_baseFee
eth_maxPriorityFeePerGas
eth_feeHistory
internal-blockchain
β
The API name internal-public-blockchain
is deprecated as of v1.7.15, and the
APIs previously under this name have been migrated to internal-blockchain
.
Adds the following RPC calls to the eth_*
namespace. Defaults to true
.
eth_chainId
eth_blockNumber
eth_getBalance
eth_getAssetBalance
eth_getProof
eth_getHeaderByNumber
eth_getHeaderByHash
eth_getBlockByNumber
eth_getBlockByHash
eth_getUncleBlockByNumberAndIndex
eth_getUncleBlockByBlockHashAndIndex
eth_getUncleCountByBlockNumber
eth_getUncleCountByBlockHash
eth_getCode
eth_getStorageAt
eth_call
eth_estimateGas
eth_createAccessList
internal-transaction
β
The API name internal-public-transaction-pool
is deprecated as of v1.7.15, and
the APIs previously under this name have been migrated to
internal-transaction
.
Adds the following RPC calls to the eth_*
namespace. Defaults to true
.
eth_getBlockTransactionCountByNumber
eth_getBlockTransactionCountByHash
eth_getTransactionByBlockNumberAndIndex
eth_getTransactionByBlockHashAndIndex
eth_getRawTransactionByBlockNumberAndIndex
eth_getRawTransactionByBlockHashAndIndex
eth_getTransactionCount
eth_getTransactionByHash
eth_getRawTransactionByHash
eth_getTransactionReceipt
eth_sendTransaction
eth_fillTransaction
eth_sendRawTransaction
eth_sign
eth_signTransaction
eth_pendingTransactions
eth_resend
internal-tx-pool
β
The API name internal-public-tx-pool
is deprecated as of v1.7.15, and the APIs
previously under this name have been migrated to internal-tx-pool
.
Adds the following RPC calls to the txpool_*
namespace. Defaults to false
.
txpool_content
txpool_contentFrom
txpool_status
txpool_inspect
internal-debug
β
The API names internal-private-debug
and internal-public-debug
are
deprecated as of v1.7.15, and the APIs previously under these names have been
migrated to internal-debug
.
Adds the following RPC calls to the debug_*
namespace. Defaults to false
.
debug_getHeaderRlp
debug_getBlockRlp
debug_printBlock
debug_chaindbProperty
debug_chaindbCompact
debug-handler
β
Adds the following RPC calls to the debug_*
namespace. Defaults to false
.
debug_verbosity
debug_vmodule
debug_backtraceAt
debug_memStats
debug_gcStats
debug_blockProfile
debug_setBlockProfileRate
debug_writeBlockProfile
debug_mutexProfile
debug_setMutexProfileFraction
debug_writeMutexProfile
debug_writeMemProfile
debug_stacks
debug_freeOSMemory
debug_setGCPercent
internal-account
β
The API name internal-public-account
is deprecated as of v1.7.15, and the APIs
previously under this name have been migrated to internal-account
.
Adds the following RPC calls to the eth_*
namespace. Defaults to true
.
eth_accounts
internal-personal
β
The API name internal-private-personal
is deprecated as of v1.7.15, and the
APIs previously under this name have been migrated to internal-personal
.
Adds the following RPC calls to the personal_*
namespace. Defaults to false
.
personal_listAccounts
personal_listWallets
personal_openWallet
personal_deriveAccount
personal_newAccount
personal_importRawKey
personal_unlockAccount
personal_lockAccount
personal_sendTransaction
personal_signTransaction
personal_sign
personal_ecRecover
personal_signAndSendTransaction
personal_initializeWallet
personal_unpair
API Configurationβ
rpc-gas-cap
β
Integer
The maximum gas to be consumed by an RPC Call (used in eth_estimateGas
and
eth_call
). Defaults to 50,000,000
.
rpc-tx-fee-cap
β
Integer
Global transaction fee (price * gaslimit
) cap (measured in AVAX) for
send-transaction variants. Defaults to 100
.
api-max-duration
β
Duration
Maximum API call duration. If API calls exceed this duration, they will time
out. Defaults to 0
(no maximum).
api-max-blocks-per-request
β
Integer
Maximum number of blocks to serve per getLogs
request. Defaults to 0
(no
maximum).
ws-cpu-refill-rate
β
Duration
The refill rate specifies the maximum amount of CPU time to allot a single
connection per second. Defaults to no maximum (0
).
ws-cpu-max-stored
β
Duration
Specifies the maximum amount of CPU time that can be stored for a single WS
connection. Defaults to no maximum (0
).
allow-unfinalized-queries
β
Allows queries for unfinalized (not yet accepted) blocks/transactions. Defaults
to false
.
accepted-cache-size
β
Integer
Specifies the depth to keep accepted headers and accepted logs in the cache. This
is particularly useful to improve the performance of eth_getLogs
for recent logs.
Transaction Poolβ
local-txs-enabled
β
Boolean
Enables local transaction handling (prioritizes transactions submitted through
this node). Defaults to false
.
allow-unprotected-txs
β
Boolean
If true
, the APIs will allow transactions that are not replay protected
(EIP-155) to be issued through this node. Defaults to false
.
allow-unprotected-tx-hashes
β
[]TxHash
Specifies an array of transaction hashes that should be allowed to bypass replay protection. This flag is intended for node operators that want to explicitly allow specific transactions to be issued through their API. Defaults to an empty list.
push-gossip-percent-stake
β
Float
Percentage of the total stake to send transactions received over the RPC. Defaults to 0.9.
push-gossip-num-validators
β
Integer
Number of validators to initially send transactions received over the RPC. Defaults to 100.
push-gossip-num-peers
β
Integer
Number of peers to initially send transactions received over the RPC. Defaults to 0.
push-regossip-num-validators
β
Integer
Number of validators to periodically send transactions received over the RPC. Defaults to 10.
push-regossip-num-peers
β
Integer
Number of peers to periodically send transactions received over the RPC. Defaults to 0.
push-gossip-frequency
β
Duration
Frequency to send transactions received over the RPC to peers. Defaults to 100000000
nano seconds which is
100 milliseconds.
pull-gossip-frequency
β
Duration
Frequency to request transactions from peers. Defaults to 1000000000
nano seconds which is
1 second.
tx-regossip-frequency
β
Duration
Deprecated as of v0.12.5
. Use regossip-frequency
instead.
Amount of time that should elapse before we attempt to re-gossip a transaction
that was already gossiped once. Defaults to 30000000000
nano seconds which is
30 seconds.
tx-pool-price-limit
β
Integer
Minimum gas price to enforce for acceptance into the pool. Defaults to 1 wei.
tx-pool-price-bump
β
Integer
Minimum price bump percentage to replace an already existing transaction (nonce). Defaults to 10%.
tx-pool-account-slots
β
Integer
Number of executable transaction slots guaranteed per account. Defaults to 16.
tx-pool-global-slots
β
Integer
Maximum number of executable transaction slots for all accounts. Defaults to 5120.
tx-pool-account-queue
β
Integer
Maximum number of non-executable transaction slots permitted per account. Defaults to 64.
tx-pool-global-queue
β
Integer
Maximum number of non-executable transaction slots for all accounts. Defaults to 1024.
tx-pool-lifetime
β
Duration
Maximum duration a non-executable transaction will be allowed in the poll. Defaults to 600000000000
nano seconds which is
10 minutes.
Metricsβ
metrics-enabled
β
Boolean
Enables metrics. Defaults to false
.
metrics-expensive-enabled
β
Boolean
Enables expensive metrics. Defaults to false
.
Snapshotsβ
snapshot-async
β
Boolean
If true
, allows snapshot generation to be executed asynchronously. Defaults to
true
.
snapshot-verification-enabled
β
Boolean
If true
, verifies the complete snapshot after it has been generated. Defaults
to false
.
Loggingβ
log-level
β
String
Defines the log level for the chain. Must be one of "trace"
, "debug"
, "info"
,
"warn"
, "error"
, "crit"
. Defaults to "info"
.
log-json-format
β
Boolean
If true
, changes logs to JSON format. Defaults to false
.
Keystore Settingsβ
keystore-directory
β
String
The directory that contains private keys. Can be given as a relative path. If
empty, uses a temporary directory at coreth-keystore
. Defaults to the empty
string (""
).