UNPKG

@lodestar/config

Version:

Chain configuration required for lodestar

87 lines 3.56 kB
import { PresetName } from "@lodestar/params"; /** * Run-time chain configuration */ export type ChainConfig = { PRESET_BASE: PresetName; /** * Free-form short name of the network that this configuration applies to - known * canonical network names include: * * 'mainnet' - there can be only one * * 'holesky' - testnet * Must match the regex: [a-z0-9\-] */ CONFIG_NAME: string; TERMINAL_TOTAL_DIFFICULTY: bigint; TERMINAL_BLOCK_HASH: Uint8Array; TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: number; MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: number; MIN_GENESIS_TIME: number; GENESIS_FORK_VERSION: Uint8Array; GENESIS_DELAY: number; ALTAIR_FORK_VERSION: Uint8Array; ALTAIR_FORK_EPOCH: number; BELLATRIX_FORK_VERSION: Uint8Array; BELLATRIX_FORK_EPOCH: number; CAPELLA_FORK_VERSION: Uint8Array; CAPELLA_FORK_EPOCH: number; DENEB_FORK_VERSION: Uint8Array; DENEB_FORK_EPOCH: number; ELECTRA_FORK_VERSION: Uint8Array; ELECTRA_FORK_EPOCH: number; FULU_FORK_VERSION: Uint8Array; FULU_FORK_EPOCH: number; SECONDS_PER_SLOT: number; SECONDS_PER_ETH1_BLOCK: number; MIN_VALIDATOR_WITHDRAWABILITY_DELAY: number; SHARD_COMMITTEE_PERIOD: number; ETH1_FOLLOW_DISTANCE: number; INACTIVITY_SCORE_BIAS: number; INACTIVITY_SCORE_RECOVERY_RATE: number; EJECTION_BALANCE: number; MIN_PER_EPOCH_CHURN_LIMIT: number; MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: number; CHURN_LIMIT_QUOTIENT: number; MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: number; MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: number; PROPOSER_SCORE_BOOST: number; REORG_HEAD_WEIGHT_THRESHOLD: number; REORG_PARENT_WEIGHT_THRESHOLD: number; REORG_MAX_EPOCHS_SINCE_FINALIZATION: number; DEPOSIT_CHAIN_ID: number; DEPOSIT_NETWORK_ID: number; DEPOSIT_CONTRACT_ADDRESS: Uint8Array; MIN_EPOCHS_FOR_BLOCK_REQUESTS: number; MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: number; MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: number; BLOB_SIDECAR_SUBNET_COUNT: number; MAX_BLOBS_PER_BLOCK: number; MAX_REQUEST_BLOB_SIDECARS: number; BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: number; MAX_BLOBS_PER_BLOCK_ELECTRA: number; MAX_REQUEST_BLOB_SIDECARS_ELECTRA: number; SAMPLES_PER_SLOT: number; CUSTODY_REQUIREMENT: number; NODE_CUSTODY_REQUIREMENT: number; VALIDATOR_CUSTODY_REQUIREMENT: number; BALANCE_PER_ADDITIONAL_CUSTODY_GROUP: number; BLOB_SCHEDULE: BlobSchedule; }; export declare const chainConfigTypes: SpecTypes<ChainConfig>; export type BlobScheduleEntry = { EPOCH: number; MAX_BLOBS_PER_BLOCK: number; }; export type BlobSchedule = BlobScheduleEntry[]; export declare function isBlobSchedule(value: unknown): value is BlobSchedule; /** Allows values in a Spec file */ export type SpecValue = number | bigint | Uint8Array | string | BlobSchedule; /** Type value name of each spec field. Numbers are ignored since they are the most common */ export type SpecValueType<V extends SpecValue> = V extends number ? "number" : V extends bigint ? "bigint" : V extends Uint8Array ? "bytes" : V extends string ? "string" : V extends BlobSchedule ? "blob_schedule" : never; /** All possible type names for a SpecValue */ export type SpecValueTypeName = SpecValueType<SpecValue>; export type SpecTypes<Spec extends Record<string, SpecValue>> = { [K in keyof Spec]: SpecValueType<Spec[K]>; }; export type SpecJson = Record<string, string | Record<string, string>[]>; //# sourceMappingURL=types.d.ts.map