Skip to content

Latest commit

 

History

History
485 lines (269 loc) · 10.6 KB

ConfigOptions.md

File metadata and controls

485 lines (269 loc) · 10.6 KB

@ethereumjs/client / ConfigOptions

Interface: ConfigOptions

Table of contents

Properties

Properties

accounts

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

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

Default: []

Defined in

config.ts:221


bootnodes

Optional bootnodes: Multiaddr[]

Network bootnodes (e.g. [email protected] or /ip4/127.0.0.1/tcp/50505/p2p/QmABC)

Defined in

config.ts:98


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:34


datadir

Optional datadir: string

Root data directory for the blockchain

Defined in

config.ts:78


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:192


disableBeaconSync

Optional disableBeaconSync: boolean

Whether to disable beacon (optimistic) sync if CL provides blocks at the head of chain.

Default: false

Defined in

config.ts:49


discDns

Optional discDns: boolean

Query EIP-1459 DNS TXT records for peer discovery

Default: true for testnets, false for mainnet

Defined in

config.ts:199


discV4

Optional discV4: boolean

Use v4 ("findneighbour" node requests) for peer discovery

Default: false for testnets, true for mainnet

Defined in

config.ts:206


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:178


dnsNetworks

Optional dnsNetworks: string[]

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

Defined in

config.ts:183


extIP

Optional extIP: string

RLPx external IP

Defined in

config.ts:110


forceSnapSync

Optional forceSnapSync: boolean

Whether to test and run snapSync. When fully ready, this needs to be replaced by a more sophisticated condition based on how far back we are from the head, and how to run it in conjunction with the beacon sync blocks at the head of chain.

Default: false

Defined in

config.ts:59


key

Optional key: Buffer

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:85


lightserv

Optional lightserv: boolean

Serve light peer requests

Default: false

Defined in

config.ts:73


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:143


maxFetcherJobs

Optional maxFetcherJobs: number

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

Default: 100

Defined in

config.ts:157


maxPeers

Optional maxPeers: number

Maximum peers allowed

Default: 25

Defined in

config.ts:171


maxPerRequest

Optional maxPerRequest: number

Max items per block or header request

Default: `50``

Defined in

config.ts:150


minPeers

Optional minPeers: number

Number of peers needed before syncing

Default: 1

Defined in

config.ts:164


mine

Optional mine: boolean

Enable mining

Default: false

Defined in

config.ts:213


minerCoinbase

Optional minerCoinbase: Address

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

Defined in

config.ts:227


multiaddrs

Optional multiaddrs: Multiaddr[]

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

Defined in

config.ts:116


port

Optional port: number

RLPx listening port

Default: 30303

Defined in

config.ts:105


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:233


saveReceipts

Optional saveReceipts: boolean

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

Defined in

config.ts:129


servers

Optional servers: (Libp2pServer | RlpxServer)[]

Transport servers (RLPx or Libp2p) Use transports option, only used for testing purposes

Default: servers created from transports option

Defined in

config.ts:124


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:240


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:247


syncmode

Optional syncmode: SyncMode

Synchronization mode ('full' or 'light')

Default: 'full'

Defined in

config.ts:41


transports

Optional transports: string[]

Network transports ('rlpx' and/or 'libp2p')

Default: ['rlpx', 'libp2p']

Defined in

config.ts:92


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:135


vm

Optional vm: VM

Provide a custom VM instance to process blocks

Default: VM instance created by client

Defined in

config.ts:66