Primary Network

C-Chain Configs

This page describes the configuration options available for the C-Chain.

Note: These are the configuration options available for the C-Chain. To set these values, you need to create a configuration file 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.

For the AvalancheGo node configuration options, see the AvalancheGo Configuration page.

This document describes the configuration options available for the C-Chain. Default values for each option 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.

Example Configuration

{
  "pruning-enabled": true,
  "commit-interval": 4096,
  "local-txs-enabled": false,
  "tx-pool-account-slots": 16,
  "tx-pool-global-slots": 5120,
  "warp-off-chain-messages": []
}

Configuration Format

Configuration is provided as a JSON object. All fields are optional unless otherwise specified.

Unrecognized options — a typo, or an option of the pre-SAE C-Chain that no longer exists — are ignored, and the node logs a warning naming them.

Block Building

OptionTypeDescriptionDefault
min-price-targetintegerThe target minimum gas price, in wei (aAVAX), that this node will attempt to use when creating blocks.Parent block's target
gas-targetintegerThe target gas per second that this node will attempt to use when creating blocks.Parent block's target
min-delay-targetintegerThe minimum delay between blocks (in milliseconds) that this node will attempt to use when creating blocks.Parent block's target

State and Trie

OptionTypeDescriptionDefault
pruning-enabledboolEnable state pruning to save disk space. If disabled, the node runs in archival mode and retains all historical state.true
commit-intervaluint64For HashDB, this sets the number of blocks between state-trie writes to disk. For Firewood, it sets the maximum number of revisions that may remain unpersisted at once. Omit this option to use the default; Mainnet and Fuji MUST use the default with HashDB. The node does not accept an explicit 0.4096
trie-clean-cacheintSize of the trie clean cache in MB.512
snapshot-cacheintSize of the snapshot disk layer clean cache in MB.256
allow-missing-triesboolSuppress warnings about an incomplete trie index.false
state-schemestringEXPERIMENTAL: specifies the database scheme used to store state data; either hash or firewood.hash
state-historyuint64Number of recently executed states to guarantee available in memory. The minimum possible value is the default.128

Transaction Pool

OptionTypeDescriptionDefault
local-txs-enabledboolEnable treatment of transactions from local accounts as local. Local transactions receive preferential admission and pricing in the mempool.false
tx-pool-account-slotsuint64Maximum number of executable transaction slots per account.16
tx-pool-global-slotsuint64Maximum number of executable transaction slots for all accounts.5120

APIs

OptionTypeDescriptionDefault
apisarray of stringsThe JSON-RPC APIs this node serves, see Available APIs. Methods of an API that is not listed, including APIs added in later releases, are not served, and calling one returns a the method ... does not exist/is not available error. An unrecognised name is a fatal configuration error.every API marked enabled in Available APIs
allow-unprotected-txsboolAllow unprotected transactions (without EIP-155 replay protection).false
batch-request-limituint64Maximum number of requests that can be batched in an RPC call (0 = no limit).1000
api-max-durationdurationMaximum duration of each call to the /rpc and /ws endpoints. A call that times out doesn't close its WebSocket connection. Accepts a Go duration string, such as "30s". Non-positive values result in no limit.0
api-max-blocks-per-requestuint64Maximum number of blocks per eth_getLogs request (0 = no limit).0
api-resolve-pending-to-last-executedboolRequests for the "pending" block return the last-executed instead of the last-accepted to allow compatibility with EVM-ecosystem tooling that expect the pending block to have post-execution artefacts.true

Available APIs

NameDefaultMethods
web3enabledweb3_clientVersion, web3_sha3
netenablednet_listening, net_peerCount, net_version
txpoolenabledtxpool_content, txpool_contentFrom, txpool_inspect, txpool_status
priceenabledeth_feeHistory, eth_gasPrice, eth_maxPriorityFeePerGas, eth_syncing
chainenabledBlock, header, and state reads, including state execution: eth_blockNumber, eth_call, eth_chainId, eth_createAccessList, eth_estimateGas, eth_getBalance, eth_getBlockBy{Hash,Number}, eth_getBlockReceipts, eth_getCode, eth_getHeaderBy{Hash,Number}, eth_getProof, eth_getStorageAt, eth_getUncle*
txenabledeth_fillTransaction, eth_getBlockTransactionCountBy*, eth_getRawTransactionBy*, eth_getTransactionBy*, eth_getTransactionCount, eth_getTransactionReceipt, eth_pendingTransactions, eth_resend, eth_sendRawTransaction, eth_sendTransaction, eth_sign, eth_signTransaction
subscriptionenabledeth_getFilterChanges, eth_getFilterLogs, eth_getLogs, eth_newBlockFilter, eth_newFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, and eth_subscribe for logs, newHeads, newPendingTransactions, and the Avalanche-specific newAcceptedTransactions
avalancheenabledAvalanche-specific extensions to the eth namespace: eth_baseFee, eth_callDetailed, eth_getChainConfig, eth_suggestPriceOptions
traceenableddebug_intermediateRoots, debug_standardTrace{BadBlock,Block}ToFile, debug_traceBadBlock, debug_traceBlock, debug_traceBlockBy{Hash,Number}, debug_traceBlockFromFile, debug_traceCall, debug_traceChain, debug_traceTransaction
dbdisabledRaw database access: debug_chaindbCompact, debug_chaindbProperty, debug_dbAncient, debug_dbAncients, debug_dbGet, debug_getRawBlock, debug_getRawHeader, debug_getRawReceipts, debug_getRawTransaction, debug_printBlock, debug_setHead
profiledisabledProcess introspection and profiling: debug_blockProfile, debug_cpuProfile, debug_freeOSMemory, debug_gcStats, debug_goTrace, debug_memStats, debug_mutexProfile, debug_setBlockProfileRate, debug_setGCPercent, debug_setMutexProfileFraction, debug_stacks, debug_start{CPUProfile,GoTrace}, debug_stop{CPUProfile,GoTrace}, debug_verbosity, debug_vmodule, debug_write{Block,Mem,Mutex}Profile

eth_subscribe is only available over the websocket endpoint (/ext/bc/C/ws).

State Sync

Note: If state sync is enabled, the peer will download chain state from peers up to a recent block near tip, then proceed with normal bootstrapping. If you need historical data, state sync isn't the right option; however, it is sufficient if you are just running a validator.

OptionTypeDescriptionDefault
state-sync-enabledboolEnable state sync.true

Warp

OptionTypeDescriptionDefault
warp-off-chain-messagesarray of stringsHex-encoded off-chain Warp messages the node should be willing to sign. These messages do not need to correspond to any on-chain event.empty array

Is this guide helpful?