UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

31 lines 1.46 kB
import { ChainForkConfig } from "@lodestar/config"; import { IBeaconStateView } from "@lodestar/state-transition"; import { Logger } from "@lodestar/utils"; import { Metrics } from "../metrics/index.js"; import { IBeaconChain } from "./interface.js"; export declare const PREPARE_NEXT_SLOT_BPS = 6667; /** * At Bellatrix, if we are responsible for proposing in next slot, we want to prepare payload * 4s before the start of next slot at PREPARE_NEXT_SLOT_BPS of the current slot. * * For all forks, when clock reaches PREPARE_NEXT_SLOT_BPS of slot before an epoch, we want to prepare for the next epoch * transition from our head so that: * + validators vote for block head on time through attestation * + validators propose blocks on time * + For Bellatrix, to compute proposers of next epoch so that we can prepare new payloads * */ export declare class PrepareNextSlotScheduler { private readonly chain; private readonly config; private readonly metrics; private readonly logger; private readonly signal; constructor(chain: IBeaconChain, config: ChainForkConfig, metrics: Metrics | null, logger: Logger, signal: AbortSignal); /** * Use clockSlot instead of clockEpoch to schedule the task at more exact time. */ prepareForNextSlot: (clockSlot: number) => Promise<void>; computeStateHashTreeRoot(state: IBeaconStateView, isEpochTransition: boolean): void; } //# sourceMappingURL=prepareNextSlot.d.ts.map