UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

37 lines 2.15 kB
import { Eth2GossipsubOpts } from "./gossip/gossipsub.js"; import { PeerManagerOpts, PeerRpcScoreOpts } from "./peers/index.js"; import { NetworkProcessorOpts } from "./processor/index.js"; import { ReqRespBeaconNodeOpts } from "./reqresp/ReqRespBeaconNode.js"; import { SubnetsServiceOpts } from "./subnets/interface.js"; export interface NetworkOptions extends PeerManagerOpts, Omit<ReqRespBeaconNodeOpts, "getPeerLogMetadata" | "onRateLimit" | "disableLightClientServer">, NetworkProcessorOpts, PeerRpcScoreOpts, SubnetsServiceOpts, Omit<Eth2GossipsubOpts, "disableLightClientServer"> { localMultiaddrs: string[]; bootMultiaddrs?: string[]; subscribeAllSubnets?: boolean; mdns?: boolean; connectToDiscv5Bootnodes?: boolean; version?: string; private?: boolean; useWorker?: boolean; maxYoungGenerationSizeMb?: number; disableLightClientServer?: boolean; /** * During E2E tests observe a lot of following `missing stream`: * * > libp2p:mplex receiver stream with id 2 and protocol /eth2/beacon_chain/req/metadata/2/ssz_snappy ended * > libp2p:mplex initiator stream with id 4 and protocol /eth2/beacon_chain/req/metadata/2/ssz_snappy ended * > libp2p:mplex initiator stream with id 2 and protocol /eth2/beacon_chain/req/metadata/2/ssz_snappy ended * > libp2p:mplex missing stream 2 for message type CLOSE_INITIATOR * > libp2p:mplex missing stream 2 for message type CLOSE_RECEIVER * > libp2p:mplex missing stream 4 for message type CLOSE_INITIATOR * * which results in following rate-limit error and cause the connection to close and fail the e2e tests * > libp2p:mplex rate limit hit when receiving messages for streams that do not exist - closing remote connection * > libp2p:mplex:stream:initiator:3 abort with error Error: Too many messages for missing streams * * The default value for `disconnectThreshold` in libp2p is set to `5`. * We need to increase this only for the testing purpose */ disconnectThreshold?: number; } export declare const defaultNetworkOptions: NetworkOptions; //# sourceMappingURL=options.d.ts.map