@lodestar/beacon-node
Version:
A Typescript implementation of the beacon chain
30 lines • 1.56 kB
TypeScript
import { Slot, ValidatorIndex } from "@lodestar/types";
import { ContributionAndProof, SyncCommitteeContribution } from "@lodestar/types/altair";
import { Metrics } from "../../metrics/index.js";
/**
* Cache SyncCommitteeContribution and seen ContributionAndProof.
* This is used for SignedContributionAndProof validation and block factory.
* This stays in-memory and should be pruned per slot.
*/
export declare class SeenContributionAndProof {
private readonly metrics;
private readonly seenAggregatorBySlot;
private readonly seenContributionBySlot;
constructor(metrics: Metrics | null);
/**
* _[IGNORE]_ A valid sync committee contribution with equal `slot`, `beacon_block_root` and `subcommittee_index` whose
* `aggregation_bits` is non-strict superset has _not_ already been seen.
*/
participantsKnown(contribution: SyncCommitteeContribution): boolean;
/**
* Gossip validation requires to check:
* The sync committee contribution is the first valid contribution received for the aggregator with index
* contribution_and_proof.aggregator_index for the slot contribution.slot and subcommittee index contribution.subcommittee_index.
*/
isAggregatorKnown(slot: Slot, subcommitteeIndex: number, aggregatorIndex: ValidatorIndex): boolean;
/** Register item as seen in the cache */
add(contributionAndProof: ContributionAndProof, trueBitCount: number): void;
/** Prune per head slot */
prune(headSlot: Slot): void;
}
//# sourceMappingURL=seenCommitteeContribution.d.ts.map