@lodestar/beacon-node
Version:
A Typescript implementation of the beacon chain
32 lines • 1.27 kB
TypeScript
import { ChainForkConfig } from "@lodestar/config";
import { IForkChoice, ProtoBlock } from "@lodestar/fork-choice";
import { RootHex, Slot } from "@lodestar/types";
import { IClock } from "../../util/clock.js";
import { IChainOptions } from "../options.js";
import { IBlockInput } from "./blockInput/types.js";
import { PayloadEnvelopeInput } from "./payloadEnvelopeInput/payloadEnvelopeInput.js";
import { ImportBlockOpts } from "./types.js";
/**
* Verifies some early cheap sanity checks on the block before running the full state transition.
*
* - Parent is known to the fork-choice
* - Check skipped slots limit
* - check_block_relevancy()
* - Block not in the future
* - Not genesis block
* - Block's slot is < Infinity
* - Not finalized slot
* - Not already known
*/
export declare function verifyBlocksSanityChecks(chain: {
forkChoice: IForkChoice;
clock: IClock;
config: ChainForkConfig;
opts: IChainOptions;
blacklistedBlocks: Map<RootHex, Slot | null>;
}, blocks: IBlockInput[], payloadEnvelopes: Map<Slot, PayloadEnvelopeInput> | null, opts: ImportBlockOpts): {
relevantBlocks: IBlockInput[];
parentSlots: Slot[];
parentBlock: ProtoBlock | null;
};
//# sourceMappingURL=verifyBlocksSanityChecks.d.ts.map