@ethereumjs/client / ConfigOptions
- accounts
- bootnodes
- common
- datadir
- debugCode
- disableBeaconSync
- discDns
- discV4
- dnsAddr
- dnsNetworks
- extIP
- forceSnapSync
- key
- lightserv
- logger
- maxFetcherJobs
- maxPeers
- maxPerRequest
- minPeers
- mine
- minerCoinbase
- multiaddrs
- port
- safeReorgDistance
- saveReceipts
- servers
- skeletonFillCanonicalBackStep
- skeletonSubchainMergeMinimum
- syncmode
- transports
- txLookupLimit
- vm
• 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: []
• Optional
bootnodes: Multiaddr
[]
Network bootnodes (e.g. [email protected] or /ip4/127.0.0.1/tcp/50505/p2p/QmABC)
• Optional
common: Common
Specify the chain by providing a Common instance, the common instance will not be modified by client
Default: 'mainnet' Common
• Optional
datadir: string
Root data directory for the blockchain
• 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)
• Optional
disableBeaconSync: boolean
Whether to disable beacon (optimistic) sync if CL provides blocks at the head of chain.
Default: false
• Optional
discDns: boolean
Query EIP-1459 DNS TXT records for peer discovery
Default: true
for testnets, false for mainnet
• Optional
discV4: boolean
Use v4 ("findneighbour" node requests) for peer discovery
Default: false
for testnets, true for mainnet
• Optional
dnsAddr: string
DNS server to query DNS TXT records from for peer discovery
Default 8.8.8.8
(Google)
• Optional
dnsNetworks: string
[]
EIP-1459 ENR Tree urls to query via DNS for peer discovery
• Optional
extIP: string
RLPx external IP
• 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
• Optional
key: Buffer
Private key for the client. Use return value of getClientKey. If left blank, a random key will be generated and used.
• Optional
lightserv: boolean
Serve light peer requests
Default: false
• Optional
logger: Logger
A custom winston logger can be provided if setting logging verbosity is not sufficient
Default: Logger with loglevel 'info'
• Optional
maxFetcherJobs: number
Max jobs to be enqueued in the fetcher at any given time
Default: 100
• Optional
maxPeers: number
Maximum peers allowed
Default: 25
• Optional
maxPerRequest: number
Max items per block or header request
Default: `50``
• Optional
minPeers: number
Number of peers needed before syncing
Default: 1
• Optional
mine: boolean
Enable mining
Default: false
• Optional
minerCoinbase: Address
Address for mining rewards (etherbase) If not provided, defaults to the primary account.
• Optional
multiaddrs: Multiaddr
[]
Network multiaddrs for libp2p (e.g. /ip4/127.0.0.1/tcp/50505/p2p/QmABC)
• Optional
port: number
RLPx listening port
Default: 30303
• Optional
safeReorgDistance: number
If there is a reorg, this is a safe distance from which to try to refetch and refeed the blocks.
• Optional
saveReceipts: boolean
Save tx receipts and logs in the meta db (default: false)
• Optional
servers: (Libp2pServer
| RlpxServer
)[]
Transport servers (RLPx or Libp2p)
Use transports
option, only used for testing purposes
Default: servers created from transports
option
• 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.
• Optional
skeletonSubchainMergeMinimum: number
If skeleton subchains can be merged, what is the minimum tail gain, as subchain merge will lead to the ReverseBlockFetcher reset
• Optional
syncmode: SyncMode
Synchronization mode ('full' or 'light')
Default: 'full'
• Optional
transports: string
[]
Network transports ('rlpx' and/or 'libp2p')
Default: ['rlpx', 'libp2p']
• Optional
txLookupLimit: number
Number of recent blocks to maintain transactions index for (default = 2350000 = about one year, 0 = entire chain)
• Optional
vm: VM
Provide a custom VM instance to process blocks
Default: VM instance created by client