import { Epoch, SignedBeaconBlock, SignedBlindedBeaconBlock, Slot } from "@lodestar/types"; import { BlockExternalData } from "./block/externalData.js"; import { ProcessBlockOpts } from "./block/types.js"; import { EpochTransitionCacheOpts } from "./cache/epochTransitionCache.js"; import { BeaconStateTransitionMetrics } from "./metrics.js"; import { CachedBeaconStateAllForks } from "./types.js"; export type StateTransitionOpts = BlockExternalData & EpochTransitionCacheOpts & ProcessBlockOpts & { verifyStateRoot?: boolean; verifyProposer?: boolean; verifySignatures?: boolean; dontTransferCache?: boolean; }; export type StateTransitionModules = { metrics?: BeaconStateTransitionMetrics | null; validatorMonitor?: ValidatorMonitor | null; }; interface ValidatorMonitor { registerValidatorStatuses(currentEpoch: Epoch, inclusionDelays: number[], flags: number[], isActiveCurrEpoch: boolean[], isActivePrevEpoch: boolean[], balances?: number[]): void; } /** * `state.clone()` invocation source tracked in metrics */ export declare enum StateCloneSource { stateTransition = "stateTransition", processSlots = "processSlots" } /** * `state.hashTreeRoot()` invocation source tracked in metrics */ export declare enum StateHashTreeRootSource { stateTransition = "state_transition", blockTransition = "block_transition", prepareNextSlot = "prepare_next_slot", prepareNextEpoch = "prepare_next_epoch", regenState = "regen_state", computeNewStateRoot = "compute_new_state_root" } /** * Implementation Note: follows the optimizations in protolambda's eth2fastspec (https://github.com/protolambda/eth2fastspec) */ export declare function stateTransition(state: CachedBeaconStateAllForks, signedBlock: SignedBeaconBlock | SignedBlindedBeaconBlock, options?: StateTransitionOpts, { metrics, validatorMonitor }?: StateTransitionModules): CachedBeaconStateAllForks; /** * Like `processSlots` from the spec but additionally handles fork upgrades * * Implementation Note: follows the optimizations in protolambda's eth2fastspec (https://github.com/protolambda/eth2fastspec) */ export declare function processSlots(state: CachedBeaconStateAllForks, slot: Slot, epochTransitionCacheOpts?: EpochTransitionCacheOpts & { dontTransferCache?: boolean; }, { metrics, validatorMonitor }?: StateTransitionModules): CachedBeaconStateAllForks; export {}; //# sourceMappingURL=stateTransition.d.ts.map