ethereumjs-monorepo

@ethereumjs/client / Config

Class: Config

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Config(options?)

Parameters

Name Type
options ConfigOptions

Defined in

config.ts:460

Properties

accountCache

Readonly accountCache: number

Defined in

config.ts:410


accounts

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

Defined in

config.ts:419


bootnodes

Optional Readonly bootnodes: Multiaddr[]

Defined in

config.ts:396


chainCommon

Readonly chainCommon: Common

Defined in

config.ts:455


codeCache

Readonly codeCache: number

Defined in

config.ts:412


datadir

Readonly datadir: string

Defined in

config.ts:394


debugCode

Readonly debugCode: boolean

Defined in

config.ts:414


discDns

Readonly discDns: boolean

Defined in

config.ts:415


discV4

Readonly discV4: boolean

Defined in

config.ts:416


dnsAddr

Readonly dnsAddr: string

Defined in

config.ts:407


enableSnapSync

Readonly enableSnapSync: boolean

Defined in

config.ts:440


engineNewpayloadMaxExecute

Readonly engineNewpayloadMaxExecute: number

Defined in

config.ts:433


engineNewpayloadMaxTxsExecute

Readonly engineNewpayloadMaxTxsExecute: number

Defined in

config.ts:434


engineParentLookupMaxDepth

Readonly engineParentLookupMaxDepth: number

Defined in

config.ts:432


events

Readonly events: EventBusType

Central event bus for events emitted by the different components of the client

Defined in

config.ts:346


execCommon

Readonly execCommon: Common

Defined in

config.ts:456


execution

Readonly execution: boolean

Defined in

config.ts:408


extIP

Optional Readonly extIP: string

Defined in

config.ts:398


isSingleNode

Readonly isSingleNode: boolean

Defined in

config.ts:418


key

Readonly key: Uint8Array

Defined in

config.ts:395


lastSyncDate

lastSyncDate: number

lastSyncDate in ms

Defined in

config.ts:449


lastsyncronized

Optional lastsyncronized: boolean

Defined in

config.ts:447


lightserv

Readonly lightserv: boolean

Defined in

config.ts:393


logger

Readonly logger: Logger

Defined in

config.ts:390


maxAccountRange

Readonly maxAccountRange: bigint

Defined in

config.ts:427


maxFetcherJobs

Readonly maxFetcherJobs: number

Defined in

config.ts:403


maxFetcherRequests

Readonly maxFetcherRequests: number

Defined in

config.ts:404


maxInvalidBlocksErrorCache

Readonly maxInvalidBlocksErrorCache: number

Defined in

config.ts:429


maxPeers

Readonly maxPeers: number

Defined in

config.ts:406


maxPerRequest

Readonly maxPerRequest: number

Defined in

config.ts:402


maxRangeBytes

Readonly maxRangeBytes: number

Defined in

config.ts:426


maxStorageRange

Readonly maxStorageRange: bigint

Defined in

config.ts:428


minPeers

Readonly minPeers: number

Defined in

config.ts:405


mine

Readonly mine: boolean

Defined in

config.ts:417


minerCoinbase

Optional Readonly minerCoinbase: Address

Defined in

config.ts:420


multiaddrs

Optional Readonly multiaddrs: Multiaddr[]

Defined in

config.ts:399


numBlocksPerIteration

Readonly numBlocksPerIteration: number

Defined in

config.ts:409


port

Optional Readonly port: number

Defined in

config.ts:397


prefixStorageTrieKeys

Readonly prefixStorageTrieKeys: boolean

Defined in

config.ts:438


pruneEngineCache

Readonly pruneEngineCache: boolean

Defined in

config.ts:430


safeReorgDistance

Readonly safeReorgDistance: number

Defined in

config.ts:423


savePreimages

Readonly savePreimages: boolean

Defined in

config.ts:442


saveReceipts

Readonly saveReceipts: boolean

Defined in

config.ts:400


server

Readonly server: undefined | RlpxServer = undefined

Defined in

config.ts:458


shutdown

shutdown: boolean = false

Client is in the process of shutting down

Defined in

config.ts:453


skeletonFillCanonicalBackStep

Readonly skeletonFillCanonicalBackStep: number

Defined in

config.ts:424


skeletonSubchainMergeMinimum

Readonly skeletonSubchainMergeMinimum: number

Defined in

config.ts:425


snapAvailabilityDepth

Readonly snapAvailabilityDepth: bigint

Defined in

config.ts:435


snapTransitionSafeDepth

Readonly snapTransitionSafeDepth: bigint

Defined in

config.ts:436


statelessVerkle

Readonly statelessVerkle: boolean

Defined in

config.ts:444


storageCache

Readonly storageCache: number

Defined in

config.ts:411


syncTargetHeight

Optional syncTargetHeight: bigint

Best known block height

Defined in

config.ts:451


syncedStateRemovalPeriod

Readonly syncedStateRemovalPeriod: number

Defined in

config.ts:431


synchronized

synchronized: boolean

Defined in

config.ts:446


syncmode

Readonly syncmode: SyncMode

Defined in

config.ts:391


trieCache

Readonly trieCache: number

Defined in

config.ts:413


txLookupLimit

Readonly txLookupLimit: number

Defined in

config.ts:401


useStringValueTrieDB

Readonly useStringValueTrieDB: boolean

Defined in

config.ts:441


vm

Optional Readonly vm: VM

Defined in

config.ts:392


vmProfilerOpts

Optional Readonly vmProfilerOpts: VMProfilerOpts

Defined in

config.ts:421


ACCOUNT_CACHE

Static Readonly ACCOUNT_CACHE: 400000

Defined in

config.ts:361


CHAIN_DEFAULT

Static Readonly CHAIN_DEFAULT: "mainnet"

Defined in

config.ts:348


CODE_CACHE

Static Readonly CODE_CACHE: 200000

Defined in

config.ts:363


DATADIR_DEFAULT

Static Readonly DATADIR_DEFAULT: "./datadir"

Defined in

config.ts:351


DEBUGCODE_DEFAULT

Static Readonly DEBUGCODE_DEFAULT: false

Defined in

config.ts:365


DNSADDR_DEFAULT

Static Readonly DNSADDR_DEFAULT: "8.8.8.8"

Defined in

config.ts:358


ENGINE_NEWPAYLOAD_MAX_EXECUTE

Static Readonly ENGINE_NEWPAYLOAD_MAX_EXECUTE: 2

Defined in

config.ts:382


ENGINE_NEWPAYLOAD_MAX_TXS_EXECUTE

Static Readonly ENGINE_NEWPAYLOAD_MAX_TXS_EXECUTE: 100

Defined in

config.ts:384


ENGINE_PARENTLOOKUP_MAX_DEPTH

Static Readonly ENGINE_PARENTLOOKUP_MAX_DEPTH: 128

Defined in

config.ts:381


EXECUTION

Static Readonly EXECUTION: true

Defined in

config.ts:359


LIGHTSERV_DEFAULT

Static Readonly LIGHTSERV_DEFAULT: false

Defined in

config.ts:350


MAXFETCHERJOBS_DEFAULT

Static Readonly MAXFETCHERJOBS_DEFAULT: 100

Defined in

config.ts:354


MAXFETCHERREQUESTS_DEFAULT

Static Readonly MAXFETCHERREQUESTS_DEFAULT: 5

Defined in

config.ts:355


MAXPEERS_DEFAULT

Static Readonly MAXPEERS_DEFAULT: 25

Defined in

config.ts:357


MAXPERREQUEST_DEFAULT

Static Readonly MAXPERREQUEST_DEFAULT: 100

Defined in

config.ts:353


MAX_ACCOUNT_RANGE

Static Readonly MAX_ACCOUNT_RANGE: bigint

Defined in

config.ts:372


MAX_INVALID_BLOCKS_ERROR_CACHE

Static Readonly MAX_INVALID_BLOCKS_ERROR_CACHE: 128

Defined in

config.ts:376


MAX_RANGE_BYTES

Static Readonly MAX_RANGE_BYTES: 50000

Defined in

config.ts:370


MAX_STORAGE_RANGE

Static Readonly MAX_STORAGE_RANGE: bigint

Defined in

config.ts:374


MINPEERS_DEFAULT

Static Readonly MINPEERS_DEFAULT: 1

Defined in

config.ts:356


NUM_BLOCKS_PER_ITERATION

Static Readonly NUM_BLOCKS_PER_ITERATION: 100

Defined in

config.ts:360


PORT_DEFAULT

Static Readonly PORT_DEFAULT: 30303

Defined in

config.ts:352


PRUNE_ENGINE_CACHE

Static Readonly PRUNE_ENGINE_CACHE: true

Defined in

config.ts:377


SAFE_REORG_DISTANCE

Static Readonly SAFE_REORG_DISTANCE: 100

Defined in

config.ts:366


SKELETON_FILL_CANONICAL_BACKSTEP

Static Readonly SKELETON_FILL_CANONICAL_BACKSTEP: 100

Defined in

config.ts:367


SKELETON_SUBCHAIN_MERGE_MINIMUM

Static Readonly SKELETON_SUBCHAIN_MERGE_MINIMUM: 1000

Defined in

config.ts:368


SNAP_AVAILABILITY_DEPTH

Static Readonly SNAP_AVAILABILITY_DEPTH: bigint

Defined in

config.ts:385


SNAP_TRANSITION_SAFE_DEPTH

Static Readonly SNAP_TRANSITION_SAFE_DEPTH: bigint

Defined in

config.ts:388


STORAGE_CACHE

Static Readonly STORAGE_CACHE: 200000

Defined in

config.ts:362


SYNCED_STATE_REMOVAL_PERIOD

Static Readonly SYNCED_STATE_REMOVAL_PERIOD: 60000

Defined in

config.ts:379


SYNCMODE_DEFAULT

Static Readonly SYNCMODE_DEFAULT: Full = SyncMode.Full

Defined in

config.ts:349


TRIE_CACHE

Static Readonly TRIE_CACHE: 200000

Defined in

config.ts:364

Methods

getDataDirectory

getDataDirectory(dir): string

Returns the location for each DataDirectory

Parameters

Name Type
dir DataDirectory

Returns

string

Defined in

config.ts:637


getDnsDiscovery

getDnsDiscovery(option): boolean

Returns specified option or the default setting for whether DNS-based peer discovery is enabled based on chainName. true for goerli

Parameters

Name Type
option undefined | boolean

Returns

boolean

Defined in

config.ts:698


getNetworkDirectory

getNetworkDirectory(): string

Returns the network directory for the chain.

Returns

string

Defined in

config.ts:629


superMsg

superMsg(msgs, meta?): void

Parameters

Name Type
msgs string | string[]
meta? any

Returns

void

Defined in

config.ts:679


updateSynchronizedState

updateSynchronizedState(latest?, emitSyncEvent?): void

Update the synchronized state of the chain

Emits

Event.SYNC_SYNCHRONIZED

Parameters

Name Type
latest? null | BlockHeader
emitSyncEvent? boolean

Returns

void

Defined in

config.ts:570


getClientKey

Static getClientKey(datadir, common): Promise<undefined | Uint8Array>

Gets the client private key from the config db.

Parameters

Name Type
datadir string
common Common

Returns

Promise<undefined | Uint8Array>

Defined in

config.ts:661


getConfigDB

Static getConfigDB(networkDir): Level<string | Uint8Array, Uint8Array>

Returns the config level db.

Parameters

Name Type
networkDir string

Returns

Level<string | Uint8Array, Uint8Array>

Defined in

config.ts:654