Subnet-EVM Configs

This page describes the configuration options available for the Subnet-EVM.

Note: These are the configuration options available in the Subnet-EVM codebase. To set these values, you need to create a configuration file at ~/.avalanchego/configs/chains/<blockchainID>/config.json.

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

This document describes all configuration options available for Subnet-EVM.

Example Configuration

{
  "eth-apis": ["eth", "eth-filter", "net", "web3"],
  "pruning-enabled": true,
  "commit-interval": 4096,
  "trie-clean-cache": 512,
  "trie-dirty-cache": 512,
  "snapshot-cache": 256,
  "rpc-gas-cap": 50000000,
  "log-level": "info",
  "metrics-expensive-enabled": true,
  "continuous-profiler-dir": "./profiles",
  "state-sync-enabled": false,
  "accepted-cache-size": 32
}

Configuration Format

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

API Configuration

Ethereum APIs

OptionTypeDescriptionDefault
eth-apisarray of stringsList of Ethereum services that should be enabled["eth", "eth-filter", "net", "web3", "internal-eth", "internal-blockchain", "internal-transaction"]

Subnet-EVM Specific APIs

OptionTypeDescriptionDefault
validators-api-enabledboolEnable the validators APItrue
admin-api-enabledboolEnable the admin API for administrative operationsfalse
admin-api-dirstringDirectory for admin API operations-
warp-api-enabledboolEnable the Warp API for cross-chain messagingfalse

API Limits and Security

OptionTypeDescriptionDefault
rpc-gas-capuint64Maximum gas limit for RPC calls50,000,000
rpc-tx-fee-capfloat64Maximum transaction fee cap in AVAX100
api-max-durationdurationMaximum duration for API calls (0 = no limit)0
api-max-blocks-per-requestint64Maximum number of blocks per getLogs request (0 = no limit)0
http-body-limituint64Maximum size of HTTP request bodies-
batch-request-limituint64Maximum number of requests that can be batched in an RPC call. For no limit, set either this or batch-response-max-size to 01000
batch-response-max-sizeuint64Maximum size (in bytes) of response that can be returned from a batched RPC call. For no limit, set either this or batch-request-limit to 0. Defaults to 25 MB1000

WebSocket Settings

OptionTypeDescriptionDefault
ws-cpu-refill-ratedurationRate at which WebSocket CPU usage quota is refilled (0 = no limit)0
ws-cpu-max-storeddurationMaximum stored WebSocket CPU usage quota (0 = no limit)0

Cache Configuration

Trie Caches

OptionTypeDescriptionDefault
trie-clean-cacheintSize of the trie clean cache in MB512
trie-dirty-cacheintSize of the trie dirty cache in MB512
trie-dirty-commit-targetintMemory limit to target in the dirty cache before performing a commit in MB20
trie-prefetcher-parallelismintMaximum concurrent disk reads trie prefetcher should perform16

Other Caches

OptionTypeDescriptionDefault
snapshot-cacheintSize of the snapshot disk layer clean cache in MB256
accepted-cache-sizeintDepth to keep in the accepted headers and logs cache (blocks)32
state-sync-server-trie-cacheintTrie cache size for state sync server in MB64

Ethereum Settings

Transaction Processing

OptionTypeDescriptionDefault
preimages-enabledboolEnable preimage recordingfalse
allow-unfinalized-queriesboolAllow queries for unfinalized blocksfalse
allow-unprotected-txsboolAllow unprotected transactions (without EIP-155)false
allow-unprotected-tx-hashesarrayList of specific transaction hashes allowed to be unprotectedEIP-1820 registry tx
local-txs-enabledboolEnable treatment of transactions from local accounts as localfalse

Snapshots

OptionTypeDescriptionDefault
snapshot-waitboolWait for snapshot generation on startupfalse
snapshot-verification-enabledboolEnable snapshot verificationfalse

Pruning and State Management

Basic Pruning

OptionTypeDescriptionDefault
pruning-enabledboolEnable state pruning to save disk spacetrue
commit-intervaluint64Interval at which to persist EVM and atomic tries (blocks)4096
accepted-queue-limitintMaximum blocks to queue before blocking during acceptance64

State Reconstruction

OptionTypeDescriptionDefault
allow-missing-triesboolSuppress warnings about incomplete trie indexfalse
populate-missing-triesuint64Starting block for re-populating missing tries (null = disabled)null
populate-missing-tries-parallelismintConcurrent readers for re-populating missing tries1024

Offline Pruning

OptionTypeDescriptionDefault
offline-pruning-enabledboolEnable offline pruningfalse
offline-pruning-bloom-filter-sizeuint64Bloom filter size for offline pruning in MB512
offline-pruning-data-directorystringDirectory for offline pruning data-

Historical Data

OptionTypeDescriptionDefault
historical-proof-query-windowuint64Number of blocks before last accepted for proof queries (archive mode only, ~24 hours)43200
state-historyuint64Number of most recent states that are accesible on disk (pruning mode only)32

Transaction Pool Configuration

OptionTypeDescriptionDefault
tx-pool-price-limituint64Minimum gas price for transaction acceptance-
tx-pool-price-bumpuint64Minimum price bump percentage for transaction replacement-
tx-pool-account-slotsuint64Maximum number of executable transaction slots per account-
tx-pool-global-slotsuint64Maximum number of executable transaction slots for all accounts-
tx-pool-account-queueuint64Maximum number of non-executable transaction slots per account-
tx-pool-global-queueuint64Maximum number of non-executable transaction slots for all accounts-
tx-pool-lifetimedurationMaximum time transactions can stay in the pool-

Gossip Configuration

Push Gossip Settings

OptionTypeDescriptionDefault
push-gossip-percent-stakefloat64Percentage of total stake to push gossip to (range: [0, 1])0.9
push-gossip-num-validatorsintNumber of validators to push gossip to100
push-gossip-num-peersintNumber of non-validator peers to push gossip to0

Regossip Settings

OptionTypeDescriptionDefault
push-regossip-num-validatorsintNumber of validators to regossip to10
push-regossip-num-peersintNumber of non-validator peers to regossip to0
priority-regossip-addressesarrayAddresses to prioritize for regossip-

Timing Configuration

OptionTypeDescriptionDefault
push-gossip-frequencydurationFrequency of push gossip100ms
pull-gossip-frequencydurationFrequency of pull gossip1s
regossip-frequencydurationFrequency of regossip30s

Logging and Monitoring

Logging

OptionTypeDescriptionDefault
log-levelstringLogging level (trace, debug, info, warn, error, crit)"info"
log-json-formatboolUse JSON format for logsfalse

Profiling

OptionTypeDescriptionDefault
continuous-profiler-dirstringDirectory for continuous profiler output (empty = disabled)-
continuous-profiler-frequencydurationFrequency to run continuous profiler15m
continuous-profiler-max-filesintMaximum number of profiler files to maintain5

Metrics

OptionTypeDescriptionDefault
metrics-expensive-enabledboolEnable expensive debug-level metrics; this includes Firewood metricstrue

Security and Access

Keystore

OptionTypeDescriptionDefault
keystore-directorystringDirectory for keystore files (absolute or relative path)-
keystore-external-signerstringExternal signer configuration-
keystore-insecure-unlock-allowedboolAllow insecure account unlockingfalse

Fee Configuration

OptionTypeDescriptionDefault
feeRecipientstringAddress to send transaction fees to (leave empty if not supported)-

Network and Sync

Network

OptionTypeDescriptionDefault
max-outbound-active-requestsint64Maximum number of outbound active requests for VM2VM network16

State Sync

OptionTypeDescriptionDefault
state-sync-enabledboolEnable state syncfalse
state-sync-skip-resumeboolForce state sync to use highest available summary blockfalse
state-sync-idsstringComma-separated list of state sync IDs-
state-sync-commit-intervaluint64Commit interval for state sync (blocks)16384
state-sync-min-blocksuint64Minimum blocks ahead required for state sync300000
state-sync-request-sizeuint16Number of key/values to request per state sync request1024

Database Configuration

OptionTypeDescriptionDefault
database-typestringType of database to use"pebbledb"
database-pathstringPath to database directory-
database-read-onlyboolOpen database in read-only modefalse
database-configstringInline database configuration-
database-config-filestringPath to database configuration file-
use-standalone-databaseboolUse standalone database instead of shared one-
inspect-databaseboolInspect database on startupfalse
state-schemestringEXPERIMENTAL: specifies the database scheme to store state data; can be one of hash or firewoodhash

Transaction Indexing

OptionTypeDescriptionDefault
transaction-historyuint64Maximum number of blocks from head whose transaction indices are reserved (0 = no limit)-
tx-lookup-limituint64Deprecated - use transaction-history instead-
skip-tx-indexingboolSkip indexing transactions entirelyfalse

Warp Configuration

OptionTypeDescriptionDefault
warp-off-chain-messagesarrayOff-chain messages the node should be willing to sign-
prune-warp-db-enabledboolClear warp database on startupfalse

Miscellaneous

OptionTypeDescriptionDefault
airdropstringPath to airdrop file-
skip-upgrade-checkboolSkip checking that upgrades occur before last accepted block ⚠️ Warning: Only use when you understand the implicationsfalse

Gossip Constants

The following constants are defined for transaction gossip behavior and cannot be configured without a custom build of Subnet-EVM:

ConstantTypeDescriptionValue
Bloom Filter Min Target ElementsintMinimum target elements for bloom filter8,192
Bloom Filter Target False Positive RatefloatTarget false positive rate1%
Bloom Filter Reset False Positive RatefloatReset false positive rate5%
Bloom Filter Churn MultiplierintChurn multiplier3
Push Gossip Discarded ElementsintNumber of discarded elements16,384
Tx Gossip Target Message SizesizeTarget message size for transaction gossip20 KiB
Tx Gossip Throttling PerioddurationThrottling period10s
Tx Gossip Throttling LimitintThrottling limit2
Tx Gossip Poll SizeintPoll size1

Validation Notes

  • Cannot enable populate-missing-tries while pruning or offline pruning is enabled
  • Cannot run offline pruning while pruning is disabled
  • Commit interval must be non-zero when pruning is enabled
  • push-gossip-percent-stake must be in range [0, 1]
  • Some settings may require node restart to take effect

Is this guide helpful?

Report Issue