import { PubkeyIndexMap } from "@chainsafe/pubkey-index-map"; import { CompositeViewDU } from "@chainsafe/ssz"; import { ValidatorIndex, ssz } from "@lodestar/types"; type ValidatorSyncCommitteeIndexMap = Map; export type SyncCommitteeCache = { /** * Update freq: every ~ 27h. * Memory cost: 512 Number integers. */ validatorIndices: Uint32Array; /** * Update freq: every ~ 27h. * Memory cost: Map of Number -> Number with 512 entries. * Note: it stores the position indices in sync committee for each sync committee validator */ validatorIndexMap: ValidatorSyncCommitteeIndexMap; }; /** Placeholder object for pre-altair fork */ export declare class SyncCommitteeCacheEmpty implements SyncCommitteeCache { get validatorIndices(): Uint32Array; get validatorIndexMap(): ValidatorSyncCommitteeIndexMap; } export declare function getSyncCommitteeCache(validatorIndices: Uint32Array): SyncCommitteeCache; export declare function computeSyncCommitteeCache(syncCommittee: CompositeViewDU, pubkey2index: PubkeyIndexMap): SyncCommitteeCache; /** * Compute all position index in sync committee for all validatorIndexes in `syncCommitteeIndexes`. * Helps reduce work necessary to verify a validatorIndex belongs in a sync committee and which. * This is similar to compute_subnets_for_sync_committee in https://github.com/ethereum/eth2.0-specs/blob/v1.1.0-alpha.5/specs/altair/validator.md */ export declare function computeValidatorSyncCommitteeIndexMap(validatorIndices: ArrayLike): ValidatorSyncCommitteeIndexMap; export {}; //# sourceMappingURL=syncCommitteeCache.d.ts.map