UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

33 lines 1.53 kB
import { Root, Slot, SubcommitteeIndex, SubnetID, altair } from "@lodestar/types"; import { IClock } from "../../util/clock.js"; import { InsertOutcome } from "./types.js"; /** * Preaggregate SyncCommitteeMessage into SyncCommitteeContribution * and cache seen SyncCommitteeMessage by slot + validator index. * This stays in-memory and should be pruned per slot. */ export declare class SyncCommitteeMessagePool { private readonly clock; private readonly cutOffSecFromSlot; private readonly preaggregateSlotDistance; /** * Each array item is respective to a subcommitteeIndex. * Preaggregate into SyncCommitteeContribution. * */ private readonly contributionsByRootBySubnetBySlot; private lowestPermissibleSlot; constructor(clock: IClock, cutOffSecFromSlot: number, preaggregateSlotDistance?: number); /** Returns current count of unique ContributionFast by block root and subnet */ get size(): number; add(subnet: SubnetID, signature: altair.SyncCommitteeMessage, indexInSubcommittee: number, priority?: boolean): InsertOutcome; /** * This is for the aggregator to produce ContributionAndProof. */ getContribution(subnet: SubcommitteeIndex, slot: Slot, prevBlockRoot: Root): altair.SyncCommitteeContribution | null; /** * Prune per clock slot. * SyncCommittee signatures are only useful during a single slot according to our peer's clocks */ prune(clockSlot: Slot): void; } //# sourceMappingURL=syncCommitteeMessagePool.d.ts.map