ethereumjs-monorepo

@ethereumjs/client / ConfigOptions

Interface: ConfigOptions

Table of contents

Properties

Properties

accountCache

Optional accountCache: number

Size for the account cache (max number of accounts)

Defined in

config.ts:199


accounts

Optional accounts: [address: Address, privKey: Uint8Array][]

Unlocked accounts of form [address, privateKey] Currently only the first account is used to seal mined PoA blocks

Default: []

Defined in

config.ts:269


bootnodes

Optional bootnodes: Multiaddr[]

Network bootnodes (e.g. abc@18.138.108.67 or /ip4/127.0.0.1/tcp/50505/p2p/QmABC)

Defined in

config.ts:96


codeCache

Optional codeCache: number

Size for the code cache (max number of contracts)

Defined in

config.ts:209


common

Optional common: Common

Specify the chain by providing a Common instance, the common instance will not be modified by client

Default: ‘mainnet’ Common

Defined in

config.ts:36


datadir

Optional datadir: string

Root data directory for the blockchain

Defined in

config.ts:83


debugCode

Optional debugCode: boolean

Generate code for local debugging, currently providing a code snippet which can be used to run blocks on the EthereumJS VM on execution errors

(meant to be used internally for the most part)

Defined in

config.ts:223


discDns

Optional discDns: boolean

Query EIP-1459 DNS TXT records for peer discovery

Default: true for testnets, false for mainnet

Defined in

config.ts:230


discV4

Optional discV4: boolean

Use v4 (“findneighbour” node requests) for peer discovery

Default: false for testnets, true for mainnet

Defined in

config.ts:237


dnsAddr

Optional dnsAddr: string

DNS server to query DNS TXT records from for peer discovery

Default 8.8.8.8 (Google)

Defined in

config.ts:179


dnsNetworks

Optional dnsNetworks: string[]

EIP-1459 ENR Tree urls to query via DNS for peer discovery

Defined in

config.ts:184


enableSnapSync

Optional enableSnapSync: boolean

Whether to enable and run snapSync, currently experimental

Default: false

Defined in

config.ts:50


engineNewpayloadMaxExecute

Optional engineNewpayloadMaxExecute: number

Max blocks including unexecuted parents to be executed in engine’s newPayload

Defined in

config.ts:313


engineNewpayloadMaxTxsExecute

Optional engineNewpayloadMaxTxsExecute: number

Limit max transactions per block to execute in engine’s newPayload for responsive engine api

Defined in

config.ts:318


engineParentLookupMaxDepth

Optional engineParentLookupMaxDepth: number

Max depth for parent lookups in engine’s newPayload and forkchoiceUpdated

Defined in

config.ts:308


execution

Optional execution: boolean

Start continuous VM execution (pre-Merge setting)

Defined in

config.ts:189


extIP

Optional extIP: string

RLPx external IP

Defined in

config.ts:108


isSingleNode

Optional isSingleNode: boolean

Is a single node and doesn’t need peers for synchronization

Default: false

Defined in

config.ts:251


key

Optional key: Uint8Array

Private key for the client. Use return value of getClientKey. If left blank, a random key will be generated and used.

Defined in

config.ts:90


lightserv

Optional lightserv: boolean

Serve light peer requests

Default: false

Defined in

config.ts:78


logger

Optional logger: Logger

A custom winston logger can be provided if setting logging verbosity is not sufficient

Default: Logger with loglevel ‘info’

Defined in

config.ts:139


maxAccountRange

Optional maxAccountRange: bigint

Defined in

config.ts:299


maxFetcherJobs

Optional maxFetcherJobs: number

Max jobs to be enqueued in the fetcher at any given time

Default: 100

Defined in

config.ts:153


maxFetcherRequests

Optional maxFetcherRequests: number

Max outgoing multi-peer requests by the fetcher at any given time

Defined in

config.ts:158


maxInvalidBlocksErrorCache

Optional maxInvalidBlocksErrorCache: number

Cache size of invalid block hashes and their errors

Defined in

config.ts:325


maxPeers

Optional maxPeers: number

Maximum peers allowed

Default: 25

Defined in

config.ts:172


maxPerRequest

Optional maxPerRequest: number

Max items per block or header request

Default: 100

Defined in

config.ts:146


maxRangeBytes

Optional maxRangeBytes: number

Defined in

config.ts:297


maxStorageRange

Optional maxStorageRange: bigint

Defined in

config.ts:320


minPeers

Optional minPeers: number

Number of peers needed before syncing

Default: 1

Defined in

config.ts:165


mine

Optional mine: boolean

Enable mining

Default: false

Defined in

config.ts:244


minerCoinbase

Optional minerCoinbase: Address

Address for mining rewards (etherbase) If not provided, defaults to the primary account.

Defined in

config.ts:275


multiaddrs

Optional multiaddrs: Multiaddr[]

Network multiaddrs for libp2p (e.g. /ip4/127.0.0.1/tcp/50505/p2p/QmABC)

Defined in

config.ts:114


numBlocksPerIteration

Optional numBlocksPerIteration: number

Number of blocks to execute in batch mode and logged to console

Defined in

config.ts:194


port

Optional port: number

RLPx listening port

Default: 30303

Defined in

config.ts:103


prefixStorageTrieKeys

Optional prefixStorageTrieKeys: boolean

A temporary option to offer backward compatibility with already-synced databases that are using non-prefixed keys for storage tries

Default: true

Defined in

config.ts:58


pruneEngineCache

Optional pruneEngineCache: boolean

Defined in

config.ts:326


safeReorgDistance

Optional safeReorgDistance: number

If there is a reorg, this is a safe distance from which to try to refetch and refeed the blocks.

Defined in

config.ts:281


savePreimages

Optional savePreimages: boolean

Save account keys preimages in the meta db (default: false)

Defined in

config.ts:333


saveReceipts

Optional saveReceipts: boolean

Save tx receipts and logs in the meta db (default: false)

Defined in

config.ts:125


server

Optional server: RlpxServer

Transport servers (RLPx) Only used for testing purposes

Defined in

config.ts:120


skeletonFillCanonicalBackStep

Optional skeletonFillCanonicalBackStep: number

If there is a skeleton fillCanonicalChain block lookup errors because of closing chain conditions, this allows skeleton to backstep and fill again using reverse block fetcher.

Defined in

config.ts:288


skeletonSubchainMergeMinimum

Optional skeletonSubchainMergeMinimum: number

If skeleton subchains can be merged, what is the minimum tail gain, as subchain merge will lead to the ReverseBlockFetcher reset

Defined in

config.ts:295


snapAvailabilityDepth

Optional snapAvailabilityDepth: bigint

Defined in

config.ts:327


snapTransitionSafeDepth

Optional snapTransitionSafeDepth: bigint

Defined in

config.ts:328


statelessVerkle

Optional statelessVerkle: boolean

Enables stateless verkle block execution (default: false)

Defined in

config.ts:338


storageCache

Optional storageCache: number

Size for the storage cache (max number of contracts)

Defined in

config.ts:204


syncedStateRemovalPeriod

Optional syncedStateRemovalPeriod: number

The time after which synced state is downgraded to unsynced

Defined in

config.ts:303


syncmode

Optional syncmode: SyncMode

Synchronization mode (‘full’, ‘light’, ‘none’)

Default: ‘full’

Defined in

config.ts:43


trieCache

Optional trieCache: number

Size for the trie cache (max number of trie nodes)

Defined in

config.ts:214


txLookupLimit

Optional txLookupLimit: number

Number of recent blocks to maintain transactions index for (default = 2350000 = about one year, 0 = entire chain)

Defined in

config.ts:131


useStringValueTrieDB

Optional useStringValueTrieDB: boolean

A temporary option to offer backward compatibility with already-synced databases that stores trie items as string, instead of the more performant Uint8Array

Defined in

config.ts:64


vm

Optional vm: VM

Provide a custom VM instance to process blocks

Default: VM instance created by client

Defined in

config.ts:71


vmProfileBlocks

Optional vmProfileBlocks: boolean

Whether to profile VM blocks

Defined in

config.ts:256


vmProfileTxs

Optional vmProfileTxs: boolean

Whether to profile VM txs

Defined in

config.ts:261