import { PublicKey, SecretKey } from "@chainsafe/lodestar-z/blst"; import { BeaconConfig } from "@lodestar/config"; import { Slot, electra, phase0 } from "@lodestar/types"; import { BeaconStateAltair, BeaconStateElectra, CachedBeaconStateAllForks, CachedBeaconStateAltair, CachedBeaconStateElectra, CachedBeaconStatePhase0 } from "../types.js"; /** * Number of validators in prater is 210000 as of May 2021 */ export declare const numValidators = 250000; export declare const keypairsMod = 100; /** * As of Jul 07 2021, the performance state has * out.prevEpochUnslashedStake.targetStake 7750000000000000n * out.currEpochUnslashedTargetStake 7750000000000000n * This prefix represent the total stake in Peta Wei */ export declare const perfStateId = "250000 vs - 7PWei"; export declare const perfStateEpoch = 23638; export declare function getPubkeys(vc?: number): { pubkeysMod: Uint8Array[]; pubkeysModObj: PublicKey[]; pubkeys: Uint8Array[]; }; /** Get secret key of a validatorIndex, if the pubkeys are generated with `getPubkeys()` */ export declare function getSecretKeyFromIndex(validatorIndex: number): SecretKey; /** Get secret key of a validatorIndex, if the pubkeys are generated with `getPubkeys()` */ export declare function getSecretKeyFromIndexCached(validatorIndex: number): SecretKey; export declare function generatePerfTestCachedStatePhase0(opts?: { goBackOneSlot: boolean; }): CachedBeaconStatePhase0; export declare function cachedStateAltairPopulateCaches(state: CachedBeaconStateAltair): void; /** * Warning: This function has side effects on the cached state * The order in which the caches are populated is important and can cause stable tests to fail. */ export declare function generatePerfTestCachedStateAltair(opts?: { goBackOneSlot: boolean; vc?: number; }): CachedBeaconStateAltair; /** * Warning: This function has side effects on the cached state * The order in which the caches are populated is important and can cause stable tests to fail. */ export declare function generatePerfTestCachedStateElectra(opts?: { goBackOneSlot: boolean; vc?: number; }): CachedBeaconStateElectra; /** * This is generated from Medalla state 756416 */ export declare function generatePerformanceStateAltair(pubkeysArg?: Uint8Array[]): BeaconStateAltair; /** * This is generated from the same performance state as Altair, upgraded to Electra fields. */ export declare function generatePerformanceStateElectra(pubkeysArg?: Uint8Array[]): BeaconStateElectra; /** * This is generated from Medalla block 756417 */ export declare function generatePerformanceBlockPhase0(): phase0.SignedBeaconBlock; export declare function generateTestCachedBeaconStateOnlyValidators({ vc, slot, }: { vc: number; slot: Slot; }): CachedBeaconStateAllForks; /** * Generate `count` validly-signed builder pending deposits with distinct interop pubkeys * [startIndex, startIndex + count). Withdrawal credentials carry the BUILDER_WITHDRAWAL_PREFIX so * `isBuilderWithdrawalCredential` recognizes them. Used to exercise the pre-Gloas builder-deposit * pre-verify scanner and the fork-transition onboarding path. */ export declare function generateBuilderPendingDeposits(config: BeaconConfig, count: number, startIndex: number): electra.PendingDeposit[]; /** * Generate a validly-signed *validator* (0x00-prefix) pending deposit for interop key `keyIndex`. * Shares its pubkey with `generateBuilderPendingDeposits(config, 1, keyIndex)`, so it stands in for a * validator deposit competing with a builder deposit for the same pubkey (the `hasPendingValidator` * path). `amount` lets callers build otherwise-identical-but-distinct deposit value objects. */ export declare function generateValidatorPendingDeposit(config: BeaconConfig, keyIndex: number, amount?: number): electra.PendingDeposit; //# sourceMappingURL=util.d.ts.map