From d2ee6a3d5be91db5193ef4881c69ff42ae491ee0 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 13 Nov 2024 09:44:34 -0500 Subject: [PATCH] Subnet-EVM config table (#1932) * initial table * l1 vs subnet calloit * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update content/docs/nodes/chain-configs/subnet-evm.mdx Co-authored-by: Ceyhun Onur Signed-off-by: Owen * Update subnet-evm.mdx Signed-off-by: Owen --------- Signed-off-by: Owen Co-authored-by: Ceyhun Onur --- content/docs/nodes/chain-configs/meta.json | 1 + .../docs/nodes/chain-configs/subnet-evm.mdx | 203 ++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 content/docs/nodes/chain-configs/subnet-evm.mdx diff --git a/content/docs/nodes/chain-configs/meta.json b/content/docs/nodes/chain-configs/meta.json index 2fd652553a4..69651c178b5 100644 --- a/content/docs/nodes/chain-configs/meta.json +++ b/content/docs/nodes/chain-configs/meta.json @@ -2,6 +2,7 @@ "title": "Chain Configs", "pages": [ "overview", + "subnet-evm", "p-chain", "x-chain", "c-chain" diff --git a/content/docs/nodes/chain-configs/subnet-evm.mdx b/content/docs/nodes/chain-configs/subnet-evm.mdx new file mode 100644 index 00000000000..9311e7f8ec1 --- /dev/null +++ b/content/docs/nodes/chain-configs/subnet-evm.mdx @@ -0,0 +1,203 @@ +--- +title: Subnet-EVM +description: Configuration options available in the Subnet EVM codebase. +--- + + +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//config.json`. + +For the AvalancheGo node configuration options, see the [AvalancheGo Configuration](/nodes/configure/avalanche-l1-configs) page. + + +## Airdrop + +| Option | Type | Description | Default | +|-----------|----------|----------------------------|---------| +| `airdrop` | `string` | Path to the airdrop file. | | + +## Subnet EVM APIs + +| Option | Type | Description | Default | +|-----------------------|----------|------------------------------|---------| +| `snowman-api-enabled` | `bool` | Enables the Snowman API. | `false` | +| `admin-api-enabled` | `bool` | Enables the Admin API. | `false` | +| `admin-api-dir` | `string` | Directory for the performance profiling in Admin API. | | +| `warp-api-enabled` | `bool` | Enables the Warp API. | `false` | + +## Enabled Ethereum APIs + +| Option | Type | Description | Default | +|-------------|------------|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| +| `eth-apis` | `[]string` | A list of Ethereum APIs to enable. If none is specified, the default list is used. | `"eth"`, `"eth-filter"`, `"net"`, `"web3"`, `"internal-eth"`, `"internal-blockchain"`, `"internal-transaction"` | + +## Continuous Profiler + +| Option | Type | Description | Default | +|---------------------------------|------------|--------------------------------------------------------------------------------|--------------| +| `continuous-profiler-dir` | `string` | Directory to store profiler data. If set, creates a continuous profiler. | `""` (empty) | +| `continuous-profiler-frequency` | `Duration` | Frequency to run the continuous profiler if enabled. | `15m` | +| `continuous-profiler-max-files` | `int` | Maximum number of profiler files to maintain. | `5` | + +## API Gas/Price Caps + +| Option | Type | Description | Default | +|------------------|-----------|--------------------------------------------------------|------------| +| `rpc-gas-cap` | `uint64` | Maximum gas allowed in a transaction via the API. | `50000000` | +| `rpc-tx-fee-cap` | `float64` | Maximum transaction fee (in AVAX) allowed via the API. | `100.0` | + +## Cache Settings + +| Option | Type | Description | Default | +|-------------------------------|-------|--------------------------------------------------------------------|---------| +| `trie-clean-cache` | `int` | Size of the trie clean cache in MB. | `512` | +| `trie-dirty-cache` | `int` | Size of the trie dirty cache in MB. | `512` | +| `trie-dirty-commit-target` | `int` | Memory limit target in the dirty cache before performing a commit (MB). | `20` | +| `trie-prefetcher-parallelism` | `int` | Max concurrent disk reads the trie prefetcher should perform at once. | `16` | +| `snapshot-cache` | `int` | Size of the snapshot disk layer clean cache in MB. | `256` | + +## Ethereum Settings + +| Option | Type | Description | Default | +|---------------------------------|--------|-----------------------------------------------------|---------| +| `preimages-enabled` | `bool` | Enables preimage storage. | `false` | +| `snapshot-wait` | `bool` | Waits for snapshot generation before starting node. | `false` | +| `snapshot-verification-enabled` | `bool` | Enables snapshot verification. | `false` | + +## Pruning Settings + +| Option | Type | Description | Default | +|-----------------------------------|------------|----------------------------------------------------------------------------|---------| +| `pruning-enabled` | `bool` | If enabled, trie roots are only persisted every N blocks. | `true` | +| `accepted-queue-limit` | `int` | Maximum blocks to queue before blocking during acceptance. | `64` | +| `commit-interval` | `uint64` | Commit interval at which to persist EVM and atomic tries. | `4096` | +| `allow-missing-tries` | `bool` | Suppresses warnings for incomplete trie index if enabled. | `false` | +| `populate-missing-tries` | `*uint64` | Starting point for re-populating missing tries; disables if `nil`. | `nil` | +| `populate-missing-tries-parallelism` | `int` | Concurrent readers when re-populating missing tries on startup. | `1024` | +| `prune-warp-db-enabled` | `bool` | Determines if the warpDB should be cleared on startup. | `false` | + +## Metric Settings + +| Option | Type | Description | Default | +|----------------------------|--------|----------------------------------------------------------------------|---------| +| `metrics-expensive-enabled` | `bool` | Enables debug-level metrics that may impact performance. | `true` | + + +### Transaction Pool Settings + +| Option | Type | Description | Default | +|----------------------------|-----------|--------------------------------------------------------------------|-----------------------------------------------------| +| `tx-pool-price-limit` | `uint64` | Minimum gas price (in wei) for the transaction pool. | 1 | +| `tx-pool-price-bump` | `uint64` | Minimum price bump percentage to replace an existing transaction. | 10 | +| `tx-pool-account-slots` | `uint64` | Max executable transaction slots per account. | 16 | +| `tx-pool-global-slots` | `uint64` | Max executable transaction slots for all accounts. | From `legacypool.DefaultConfig.GlobalSlots` | +| `tx-pool-account-queue` | `uint64` | Max non-executable transaction slots per account. | From `legacypool.DefaultConfig.AccountQueue` | +| `tx-pool-global-queue` | `uint64` | Max non-executable transaction slots for all accounts. | 1024 | +| `tx-pool-lifetime` | `Duration`| Maximum time a transaction can remain in the pool. | 10 Minutes | +| `local-txs-enabled` | `bool` | Enables local transactions. | `false` | + + +### API Resource Limiting Settings + +| Option | Type | Description | Default | +|------------------------------|------------------|-----------------------------------------------------|------------------| +| `api-max-duration` | `Duration` | Maximum API call duration. | `0` (no limit) | +| `ws-cpu-refill-rate` | `Duration` | CPU time refill rate for WebSocket connections. | `0` (no limit) | +| `ws-cpu-max-stored` | `Duration` | Max CPU time stored for WebSocket connections. | `0` (no limit) | +| `api-max-blocks-per-request` | `int64` | Max blocks per `getLogs` request. | `0` (no limit) | +| `allow-unfinalized-queries` | `bool` | Allows queries on unfinalized blocks. | `false` | +| `allow-unprotected-txs` | `bool` | Allows unprotected (non-EIP-155) transactions. | `false` | +| `allow-unprotected-tx-hashes`| `[]common.Hash` | List of unprotected transaction hashes allowed. | Includes EIP-1820 | + +## Keystore Settings + +| Option | Type | Description | Default | +|----------------------------------|----------|---------------------------------------------------------|--------------| +| `keystore-directory` | `string` | Directory for keystore files. | `""` (empty) | +| `keystore-external-signer` | `string` | External signer for keystore. | `""` (empty) | +| `keystore-insecure-unlock-allowed` | `bool` | Allows insecure unlock of the keystore. | `false` | + +## Gossip Settings + +| Option | Type | Description | Default | +|-------------------------------|-------------------|----------------------------------------------|------------------| +| `push-gossip-percent-stake` | `float64` | Percentage of stake to target when gossiping.| `0.9` | +| `push-gossip-num-validators` | `int` | Number of validators to gossip to. | `100` | +| `push-gossip-num-peers` | `int` | Number of peers to gossip to. | `0` | +| `push-regossip-num-validators`| `int` | Number of validators to re-gossip to. | `10` | +| `push-regossip-num-peers` | `int` | Number of peers to re-gossip to. | `0` | +| `push-gossip-frequency` | `Duration` | Frequency of gossiping. | `100ms` | +| `pull-gossip-frequency` | `Duration` | Frequency of pulling gossip. | `1s` | +| `regossip-frequency` | `Duration` | Frequency of re-gossiping. | `30s` | +| `priority-regossip-addresses` | `[]common.Address`| Addresses with priority for re-gossiping. | `[]` (empty) | + +## Logging + +| Option | Type | Description | Default | +|-------------------|----------|----------------------------------|----------| +| `log-level` | `string` | Logging level. | `"info"` | +| `log-json-format` | `bool` | If `true`, logs are in JSON format. | `false` | + +## Fee Recipient + +| Option | Type | Description | Default | +|-----------------|----------|--------------------------------------------------------------|--------------| +| `feeRecipient` | `string` | Address to receive transaction fees; must be empty if unsupported. | `""` (empty) | + +## Offline Pruning Settings + +| Option | Type | Description | Default | +|---------------------------------|----------|--------------------------------------------------|--------------| +| `offline-pruning-enabled` | `bool` | Enables offline pruning. | `false` | +| `offline-pruning-bloom-filter-size` | `uint64` | Bloom filter size for offline pruning in MB. | `512` | +| `offline-pruning-data-directory`| `string` | Data directory for offline pruning. | `""` (empty) | + +## VM2VM Network + +| Option | Type | Description | Default | +|--------------------------------|---------|--------------------------------------------|---------| +| `max-outbound-active-requests` | `int64` | Max number of outbound active requests. | `16` | + +## Sync Settings + +| Option | Type | Description | Default | +|------------------------------|-----------|------------------------------------------------------------------|---------------------------| +| `state-sync-enabled` | `bool` | Enables state synchronization. | `false` | +| `state-sync-skip-resume` | `bool` | Forces state sync to use highest available summary block. | `false` | +| `state-sync-server-trie-cache` | `int` | Cache size for state sync server trie in MB. | `64` | +| `state-sync-ids` | `string` | Node IDs for state sync. | `""` (empty) | +| `state-sync-commit-interval` | `uint64` | Commit interval for state sync. | `16384` (CommitInterval*4)| +| `state-sync-min-blocks` | `uint64` | Min blocks ahead of local last accepted to perform state sync. | `300000` | +| `state-sync-request-size` | `uint16` | Key/values per request during state sync. | `1024` | + +## Database Settings + +| Option | Type | Description | Default | +|----------------------------|-------------------|------------------------------------------------------------|--------------------| +| `inspect-database` | `bool` | Inspects the database on startup if enabled. | `false` | +| `skip-upgrade-check` | `bool` | Disables checking that upgrades occur before last accepted block. | `false` | +| `accepted-cache-size` | `int` | Depth to keep in the accepted headers and logs cache. | `32` | +| `transaction-history` | `uint64` | Max blocks from head whose transaction indices are reserved. | `0` (no limit) | +| `tx-lookup-limit` | `uint64` | **Deprecated**, use `transaction-history` instead. | | +| `skip-tx-indexing` | `bool` | Skips indexing transactions; useful for non-indexing nodes.| `false` | +| `warp-off-chain-messages` | `[]hexutil.Bytes` | Encoded off-chain messages to sign. | `[]` (empty list) | + +## RPC Settings + +| Option | Type | Description | Default | +|-------------------|----------|------------------------------------|----------------| +| `http-body-limit` | `uint64` | Limit for HTTP request body size. | Not specified | + +## Standalone Database Configuration + +| Option | Type | Description | Default | +|----------------------------|-----------|-------------------------------------------|----------------| +| `use-standalone-database` | `*PBool` | Use a standalone database. By default Subnet-EVM uses a standalone database if no block was accepted. | `nil` | +| `database-config` | `string` | Content of the database configuration. | `""` (empty) | +| `database-config-file` | `string` | Path to the database configuration file. | `""` (empty) | +| `database-type` | `string` | Type of database to use. | `"pebbledb"` | +| `database-path` | `string` | Path to the database. | `""` (empty) | +| `database-read-only` | `bool` | Opens the database in read-only mode. | `false` | + +--- + +**Note**: Durations can be specified using time units, e.g., `15m` for 15 minutes, `100ms` for 100 milliseconds.