import { BeaconConfig } from "@lodestar/config"; import { Epoch, RootHex, ValidatorIndex } from "@lodestar/types"; import { BeaconStateAllForks } from "../types.js"; /** * Readonly interface for EpochShuffling. */ export type ReadonlyEpochShuffling = { readonly epoch: Epoch; readonly committees: Readonly; }; export type EpochShuffling = { /** * Epoch being shuffled */ epoch: Epoch; /** * Non-shuffled active validator indices */ activeIndices: Uint32Array; /** * The active validator indices, shuffled into their committee */ shuffling: Uint32Array; /** * List of list of committees Committees * * Committees by index, by slot * * Note: With a high amount of shards, or low amount of validators, * some shards may not have a committee this epoch */ committees: Uint32Array[][]; /** * Committees per slot, for fast attestation verification */ committeesPerSlot: number; }; export declare function computeCommitteeCount(activeValidatorCount: number): number; export declare function computeEpochShuffling(state: BeaconStateAllForks, activeIndices: Uint32Array, epoch: Epoch): EpochShuffling; export declare function computeEpochShufflingAsync(state: BeaconStateAllForks, activeIndices: Uint32Array, epoch: Epoch): Promise; export declare function calculateDecisionRoot(state: BeaconStateAllForks, epoch: Epoch): RootHex; /** * Get the shuffling decision block root for the given epoch of given state * - Special case close to genesis block, return the genesis block root * - This is similar to forkchoice.getDependentRoot() function, otherwise we cannot get cached shuffing in attestation verification when syncing from genesis. */ export declare function calculateShufflingDecisionRoot(config: BeaconConfig, state: BeaconStateAllForks, epoch: Epoch): RootHex; //# sourceMappingURL=epochShuffling.d.ts.map