@lodestar/config 1.35.0-dev.b42a298a7c → 1.35.0-dev.ba92bd8a88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/lib/beaconConfig.d.ts.map +1 -0
  2. package/lib/chainConfig/configs/mainnet.d.ts.map +1 -0
  3. package/lib/chainConfig/configs/minimal.d.ts.map +1 -0
  4. package/lib/chainConfig/default.d.ts.map +1 -0
  5. package/lib/chainConfig/index.d.ts.map +1 -0
  6. package/lib/chainConfig/json.d.ts.map +1 -0
  7. package/lib/chainConfig/networks/chiado.d.ts.map +1 -0
  8. package/lib/chainConfig/networks/ephemery.d.ts.map +1 -0
  9. package/lib/chainConfig/networks/gnosis.d.ts.map +1 -0
  10. package/lib/chainConfig/networks/holesky.d.ts.map +1 -0
  11. package/lib/chainConfig/networks/hoodi.d.ts.map +1 -0
  12. package/lib/chainConfig/networks/mainnet.d.ts.map +1 -0
  13. package/lib/chainConfig/networks/sepolia.d.ts.map +1 -0
  14. package/lib/chainConfig/types.d.ts.map +1 -0
  15. package/lib/configs.d.ts.map +1 -0
  16. package/lib/default.d.ts +1 -1
  17. package/lib/default.d.ts.map +1 -0
  18. package/lib/forkConfig/index.d.ts.map +1 -0
  19. package/lib/forkConfig/types.d.ts.map +1 -0
  20. package/lib/genesisConfig/index.d.ts.map +1 -0
  21. package/lib/genesisConfig/types.d.ts.map +1 -0
  22. package/lib/index.d.ts.map +1 -0
  23. package/lib/networks.d.ts.map +1 -0
  24. package/lib/utils/validateBlobSchedule.d.ts.map +1 -0
  25. package/package.json +8 -10
  26. package/src/beaconConfig.ts +31 -0
  27. package/src/chainConfig/configs/mainnet.ts +158 -0
  28. package/src/chainConfig/configs/minimal.ts +153 -0
  29. package/src/chainConfig/default.ts +19 -0
  30. package/src/chainConfig/index.ts +27 -0
  31. package/src/chainConfig/json.ts +175 -0
  32. package/src/chainConfig/networks/chiado.ts +49 -0
  33. package/src/chainConfig/networks/ephemery.ts +71 -0
  34. package/src/chainConfig/networks/gnosis.ts +74 -0
  35. package/src/chainConfig/networks/holesky.ts +64 -0
  36. package/src/chainConfig/networks/hoodi.ts +64 -0
  37. package/src/chainConfig/networks/mainnet.ts +19 -0
  38. package/src/chainConfig/networks/sepolia.ts +61 -0
  39. package/src/chainConfig/types.ts +252 -0
  40. package/src/configs.ts +4 -0
  41. package/src/default.ts +6 -0
  42. package/src/forkConfig/index.ts +203 -0
  43. package/src/forkConfig/types.ts +59 -0
  44. package/src/genesisConfig/index.ts +180 -0
  45. package/src/genesisConfig/types.ts +29 -0
  46. package/src/index.ts +4 -0
  47. package/src/networks.ts +65 -0
  48. package/src/utils/validateBlobSchedule.ts +32 -0
@@ -0,0 +1,175 @@
1
+ import {fromHex, toHex} from "@lodestar/utils";
2
+ import {validateBlobSchedule} from "../utils/validateBlobSchedule.js";
3
+ import {
4
+ BlobSchedule,
5
+ BlobScheduleEntry,
6
+ ChainConfig,
7
+ SpecJson,
8
+ SpecValue,
9
+ SpecValueTypeName,
10
+ chainConfigTypes,
11
+ isBlobSchedule,
12
+ } from "./types.js";
13
+
14
+ const MAX_UINT64_JSON = "18446744073709551615";
15
+
16
+ export function chainConfigToJson(config: ChainConfig): SpecJson {
17
+ const json: SpecJson = {};
18
+
19
+ for (const key of Object.keys(chainConfigTypes) as (keyof ChainConfig)[]) {
20
+ const value = config[key];
21
+ if (value !== undefined) {
22
+ json[key] = serializeSpecValue(value, chainConfigTypes[key]);
23
+ }
24
+ }
25
+
26
+ return json;
27
+ }
28
+
29
+ export function chainConfigFromJson(json: Record<string, unknown>): ChainConfig {
30
+ const config = {} as ChainConfig;
31
+
32
+ for (const key of Object.keys(chainConfigTypes) as (keyof ChainConfig)[]) {
33
+ const value = json[key];
34
+ if (value !== undefined) {
35
+ config[key] = deserializeSpecValue(json[key], chainConfigTypes[key], key) as never;
36
+ }
37
+ }
38
+
39
+ return config;
40
+ }
41
+
42
+ export function specValuesToJson(spec: Record<string, SpecValue>): SpecJson {
43
+ const json: SpecJson = {};
44
+
45
+ for (const key of Object.keys(spec)) {
46
+ json[key] = serializeSpecValue(spec[key], toSpecValueTypeName(spec[key]));
47
+ }
48
+
49
+ return json;
50
+ }
51
+
52
+ /** Automatic inference of typeName. For critical variables define type names, else infer */
53
+ export function toSpecValueTypeName(value: SpecValue): SpecValueTypeName {
54
+ if (value instanceof Uint8Array) return "bytes";
55
+ if (typeof value === "number") return "number";
56
+ if (typeof value === "bigint") return "bigint";
57
+ if (typeof value === "string") return "string";
58
+ if (isBlobSchedule(value)) return "blob_schedule";
59
+ throw Error(`Unknown value type ${value}`);
60
+ }
61
+
62
+ export function serializeSpecValue(
63
+ value: SpecValue,
64
+ typeName: SpecValueTypeName
65
+ ): string | Record<keyof BlobScheduleEntry, string>[] {
66
+ switch (typeName) {
67
+ case "number":
68
+ if (typeof value !== "number") {
69
+ throw Error(`Invalid value ${value.toString()} expected number`);
70
+ }
71
+ if (value === Infinity) {
72
+ return MAX_UINT64_JSON;
73
+ }
74
+ return value.toString(10);
75
+
76
+ case "bigint":
77
+ if (typeof value !== "bigint") {
78
+ throw Error(`Invalid value ${value.toString()} expected bigint`);
79
+ }
80
+ return value.toString(10);
81
+
82
+ case "bytes":
83
+ if (!(value instanceof Uint8Array)) {
84
+ throw Error(`Invalid value ${value.toString()} expected Uint8Array`);
85
+ }
86
+ return toHex(value);
87
+
88
+ case "string":
89
+ if (typeof value !== "string") {
90
+ throw Error(`Invalid value ${value.toString()} expected string`);
91
+ }
92
+ return value;
93
+
94
+ case "blob_schedule":
95
+ if (!isBlobSchedule(value)) {
96
+ throw Error(`Invalid value ${value.toString()} expected BlobSchedule`);
97
+ }
98
+
99
+ return value.map(({EPOCH, MAX_BLOBS_PER_BLOCK}) => ({
100
+ EPOCH: EPOCH === Infinity ? MAX_UINT64_JSON : EPOCH.toString(10),
101
+ MAX_BLOBS_PER_BLOCK: MAX_BLOBS_PER_BLOCK === Infinity ? MAX_UINT64_JSON : MAX_BLOBS_PER_BLOCK.toString(10),
102
+ }));
103
+ }
104
+ }
105
+
106
+ export function deserializeSpecValue(valueStr: unknown, typeName: SpecValueTypeName, keyName: string): SpecValue {
107
+ if (typeName === "blob_schedule") {
108
+ return deserializeBlobSchedule(valueStr);
109
+ }
110
+
111
+ if (typeof valueStr !== "string") {
112
+ throw Error(`Invalid ${keyName} value ${valueStr} expected string`);
113
+ }
114
+
115
+ switch (typeName) {
116
+ case "number":
117
+ if (valueStr === MAX_UINT64_JSON) {
118
+ return Infinity;
119
+ }
120
+ return parseInt(valueStr, 10);
121
+
122
+ case "bigint":
123
+ return BigInt(valueStr);
124
+
125
+ case "bytes":
126
+ return fromHex(valueStr);
127
+
128
+ case "string":
129
+ return valueStr;
130
+ }
131
+ }
132
+
133
+ export function deserializeBlobSchedule(input: unknown): BlobSchedule {
134
+ if (!Array.isArray(input)) {
135
+ throw Error(`Invalid BLOB_SCHEDULE value ${input} expected array`);
136
+ }
137
+
138
+ const blobSchedule = input.map((entry, i) => {
139
+ if (typeof entry !== "object" || entry === null) {
140
+ throw Error(`Invalid BLOB_SCHEDULE[${i}] entry ${entry} expected object`);
141
+ }
142
+
143
+ const out = {} as BlobScheduleEntry;
144
+
145
+ for (const key of ["EPOCH", "MAX_BLOBS_PER_BLOCK"] as Array<keyof BlobScheduleEntry>) {
146
+ const value = entry[key];
147
+
148
+ if (value === undefined) {
149
+ throw Error(`Invalid BLOB_SCHEDULE[${i}] entry ${JSON.stringify(entry)} missing ${key}`);
150
+ }
151
+
152
+ if (typeof value !== "string") {
153
+ throw Error(`Invalid BLOB_SCHEDULE[${i}].${key} value ${value} expected string`);
154
+ }
155
+
156
+ if (value === MAX_UINT64_JSON) {
157
+ out[key] = Infinity;
158
+ } else {
159
+ const parsed = parseInt(value, 10);
160
+
161
+ if (Number.isNaN(parsed)) {
162
+ throw Error(`Invalid BLOB_SCHEDULE[${i}].${key} value ${value} expected number`);
163
+ }
164
+
165
+ out[key] = parsed;
166
+ }
167
+ }
168
+
169
+ return out;
170
+ });
171
+
172
+ validateBlobSchedule(blobSchedule);
173
+
174
+ return blobSchedule;
175
+ }
@@ -0,0 +1,49 @@
1
+ import {fromHex as b} from "@lodestar/utils";
2
+ import {ChainConfig} from "../types.js";
3
+ import {gnosisChainConfig as gnosis} from "./gnosis.js";
4
+
5
+ // Chiado beacon chain config:
6
+ // https://github.com/gnosischain/configs/blob/main/chiado/config.yaml
7
+
8
+ export const chiadoChainConfig: ChainConfig = {
9
+ ...gnosis,
10
+
11
+ // NOTE: Only add diff values
12
+ CONFIG_NAME: "chiado",
13
+
14
+ // Transition
15
+ TERMINAL_TOTAL_DIFFICULTY: BigInt("231707791542740786049188744689299064356246512"),
16
+
17
+ // Deposit contract
18
+ DEPOSIT_CHAIN_ID: 10200,
19
+ DEPOSIT_NETWORK_ID: 10200,
20
+ DEPOSIT_CONTRACT_ADDRESS: b("0xb97036A26259B7147018913bD58a774cf91acf25"),
21
+
22
+ // 10 October 2022 10:00:00 GMT+0000
23
+ MIN_GENESIS_TIME: 1665396000,
24
+ MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 6000,
25
+ GENESIS_FORK_VERSION: b("0x0000006f"),
26
+ GENESIS_DELAY: 300,
27
+
28
+ // Forking
29
+ ALTAIR_FORK_VERSION: b("0x0100006f"),
30
+ ALTAIR_FORK_EPOCH: 90,
31
+ // Bellatrix
32
+ BELLATRIX_FORK_VERSION: b("0x0200006f"),
33
+ BELLATRIX_FORK_EPOCH: 180,
34
+ // Capella
35
+ CAPELLA_FORK_VERSION: b("0x0300006f"),
36
+ CAPELLA_FORK_EPOCH: 244224, // Wed May 24 2023 13:12:00 GMT+0000
37
+ // Deneb
38
+ DENEB_FORK_VERSION: b("0x0400006f"),
39
+ DENEB_FORK_EPOCH: 516608, // Wed Jan 31 2024 18:15:40 GMT+0000
40
+ // Electra
41
+ ELECTRA_FORK_VERSION: b("0x0500006f"),
42
+ ELECTRA_FORK_EPOCH: 948224, // Thu Mar 06 2025 09:43:40 GMT+0000
43
+ // Fulu
44
+ FULU_FORK_VERSION: b("0x0600006f"),
45
+ FULU_FORK_EPOCH: Infinity,
46
+
47
+ // Blob Scheduling
48
+ BLOB_SCHEDULE: [],
49
+ };
@@ -0,0 +1,71 @@
1
+ import {fromHex as b} from "@lodestar/utils";
2
+ import {chainConfig as mainnet} from "../configs/mainnet.js";
3
+ import {ChainConfig} from "../types.js";
4
+
5
+ // Ephemery dynamic beacon chain config:
6
+ // https://github.com/ephemery-testnet/ephemery-genesis/blob/master/cl-config.yaml
7
+
8
+ // Ephemery specification:
9
+ // https://eips.ethereum.org/EIPS/eip-6916
10
+
11
+ // iteration 0, "base"-genesis
12
+ const baseChainConfig: ChainConfig = {
13
+ ...mainnet,
14
+
15
+ CONFIG_NAME: "ephemery",
16
+
17
+ // Genesis
18
+ // ---------------------------------------------------------------
19
+ MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 64,
20
+ // Thu Dec 02 2021 19:00:00 GMT+0000
21
+ MIN_GENESIS_TIME: 1638471600,
22
+ GENESIS_FORK_VERSION: b("0x1000101b"),
23
+ GENESIS_DELAY: 300,
24
+
25
+ // Forking
26
+ // ---------------------------------------------------------------
27
+ // Altair
28
+ ALTAIR_FORK_VERSION: b("0x2000101b"),
29
+ ALTAIR_FORK_EPOCH: 0,
30
+ // Merge
31
+ BELLATRIX_FORK_VERSION: b("0x3000101b"),
32
+ BELLATRIX_FORK_EPOCH: 0,
33
+ TERMINAL_TOTAL_DIFFICULTY: BigInt("0"),
34
+ // Capella
35
+ CAPELLA_FORK_VERSION: b("0x4000101b"),
36
+ CAPELLA_FORK_EPOCH: 0,
37
+ // Deneb
38
+ DENEB_FORK_VERSION: b("0x5000101b"),
39
+ DENEB_FORK_EPOCH: 0,
40
+ // Electra
41
+ ELECTRA_FORK_VERSION: b("0x6000101b"),
42
+ ELECTRA_FORK_EPOCH: 10,
43
+ // Fulu
44
+ FULU_FORK_VERSION: b("0x7000101b"),
45
+ FULU_FORK_EPOCH: Infinity,
46
+
47
+ // Deposit contract
48
+ // ---------------------------------------------------------------
49
+ DEPOSIT_CHAIN_ID: 39438000,
50
+ DEPOSIT_NETWORK_ID: 39438000,
51
+ DEPOSIT_CONTRACT_ADDRESS: b("0x4242424242424242424242424242424242424242"),
52
+
53
+ ETH1_FOLLOW_DISTANCE: 12,
54
+
55
+ // Blob Scheduling
56
+ // ---------------------------------------------------------------
57
+ BLOB_SCHEDULE: [],
58
+ };
59
+
60
+ // Reset interval (7 days) in milliseconds, based on ephemery-genesis values.env:
61
+ // https://github.com/ephemery-testnet/ephemery-genesis/blob/9a28fbef950c8547d78785f8a0ea49a95ce19a48/values.env#L5
62
+ const RESET_INTERVAL_MS = 604800000;
63
+ const iteration = Math.floor(Date.now() - baseChainConfig.MIN_GENESIS_TIME) / RESET_INTERVAL_MS;
64
+
65
+ export const ephemeryChainConfig: ChainConfig = {
66
+ ...baseChainConfig,
67
+
68
+ MIN_GENESIS_TIME: RESET_INTERVAL_MS * iteration + baseChainConfig.MIN_GENESIS_TIME,
69
+ DEPOSIT_CHAIN_ID: baseChainConfig.DEPOSIT_CHAIN_ID + iteration,
70
+ DEPOSIT_NETWORK_ID: baseChainConfig.DEPOSIT_NETWORK_ID + iteration,
71
+ };
@@ -0,0 +1,74 @@
1
+ import {PresetName} from "@lodestar/params";
2
+ import {fromHex as b} from "@lodestar/utils";
3
+ import {chainConfig as mainnet} from "../configs/mainnet.js";
4
+ import {ChainConfig} from "../types.js";
5
+
6
+ // Gnosis beacon chain config:
7
+ // https://github.com/gnosischain/configs/blob/main/mainnet/config.yaml
8
+
9
+ export const gnosisChainConfig: ChainConfig = {
10
+ ...mainnet,
11
+
12
+ // NOTE: Only add diff values
13
+ PRESET_BASE: PresetName.gnosis,
14
+ CONFIG_NAME: "gnosis",
15
+
16
+ // Transition
17
+ TERMINAL_TOTAL_DIFFICULTY: BigInt("8626000000000000000000058750000000000000000000"),
18
+
19
+ // Time parameters
20
+ SECONDS_PER_SLOT: 5,
21
+ SECONDS_PER_ETH1_BLOCK: 6,
22
+ ETH1_FOLLOW_DISTANCE: 1024,
23
+ CHURN_LIMIT_QUOTIENT: 4096,
24
+
25
+ // Validator cycle
26
+ MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 2,
27
+
28
+ // Deposit contract
29
+ DEPOSIT_CHAIN_ID: 100,
30
+ DEPOSIT_NETWORK_ID: 100,
31
+ DEPOSIT_CONTRACT_ADDRESS: b("0x0b98057ea310f4d31f2a452b414647007d1645d9"),
32
+
33
+ // Networking
34
+ MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 16384,
35
+
36
+ // Dec 8, 2021, 13:00 UTC
37
+ MIN_GENESIS_TIME: 1638968400,
38
+ MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 4096,
39
+ GENESIS_FORK_VERSION: b("0x00000064"),
40
+ GENESIS_DELAY: 6000,
41
+
42
+ // Forking
43
+ ALTAIR_FORK_VERSION: b("0x01000064"),
44
+ ALTAIR_FORK_EPOCH: 512,
45
+ // Bellatrix
46
+ BELLATRIX_FORK_VERSION: b("0x02000064"),
47
+ BELLATRIX_FORK_EPOCH: 385536,
48
+ // Capella
49
+ CAPELLA_FORK_VERSION: b("0x03000064"),
50
+ CAPELLA_FORK_EPOCH: 648704, // 2023-08-01T11:34:20.000Z
51
+ // Deneb
52
+ DENEB_FORK_VERSION: b("0x04000064"),
53
+ DENEB_FORK_EPOCH: 889856, // 2024-03-11T18:30:20.000Z
54
+ // Electra
55
+ ELECTRA_FORK_VERSION: b("0x05000064"),
56
+ ELECTRA_FORK_EPOCH: 1337856, // 2025-04-30T14:03:40.000Z
57
+ // Fulu
58
+ FULU_FORK_VERSION: b("0x06000064"),
59
+ FULU_FORK_EPOCH: Infinity,
60
+
61
+ // Deneb
62
+ MAX_BLOBS_PER_BLOCK: 2,
63
+
64
+ // Electra
65
+ // 2**6 * 10**9 (= 64,000,000,000)
66
+ MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 64000000000,
67
+ BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 2,
68
+ MAX_BLOBS_PER_BLOCK_ELECTRA: 2,
69
+ // MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_ELECTRA
70
+ MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 256,
71
+
72
+ // Blob Scheduling
73
+ BLOB_SCHEDULE: [],
74
+ };
@@ -0,0 +1,64 @@
1
+ import {fromHex as b} from "@lodestar/utils";
2
+ import {chainConfig as mainnet} from "../configs/mainnet.js";
3
+ import {ChainConfig} from "../types.js";
4
+
5
+ // Holesky beacon chain config:
6
+ // https://github.com/eth-clients/holesky/blob/main/metadata/config.yaml
7
+
8
+ export const holeskyChainConfig: ChainConfig = {
9
+ ...mainnet,
10
+
11
+ CONFIG_NAME: "holesky",
12
+
13
+ // Genesis
14
+ // ---------------------------------------------------------------
15
+ MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 16384,
16
+ // Sep-28-2023 11:55:00 +UTC
17
+ MIN_GENESIS_TIME: 1695902100,
18
+ GENESIS_DELAY: 300,
19
+ GENESIS_FORK_VERSION: b("0x01017000"),
20
+
21
+ // Forking
22
+ // ---------------------------------------------------------------
23
+ // # Altair
24
+ ALTAIR_FORK_VERSION: b("0x02017000"),
25
+ ALTAIR_FORK_EPOCH: 0,
26
+ // # Merge
27
+ BELLATRIX_FORK_VERSION: b("0x03017000"),
28
+ BELLATRIX_FORK_EPOCH: 0,
29
+ TERMINAL_TOTAL_DIFFICULTY: BigInt("0"),
30
+ // Capella
31
+ CAPELLA_FORK_VERSION: b("0x04017000"),
32
+ CAPELLA_FORK_EPOCH: 256,
33
+ // Deneb
34
+ DENEB_FORK_VERSION: b("0x05017000"),
35
+ DENEB_FORK_EPOCH: 29696,
36
+ // Electra
37
+ ELECTRA_FORK_VERSION: b("0x06017000"),
38
+ ELECTRA_FORK_EPOCH: 115968,
39
+ // Fulu
40
+ FULU_FORK_VERSION: b("0x07017000"),
41
+ FULU_FORK_EPOCH: 165120,
42
+
43
+ // # 28,000,000,000 Gwei to ensure quicker ejection
44
+ EJECTION_BALANCE: 28000000000,
45
+
46
+ // Deposit contract
47
+ // ---------------------------------------------------------------
48
+ DEPOSIT_CHAIN_ID: 17000,
49
+ DEPOSIT_NETWORK_ID: 17000,
50
+ DEPOSIT_CONTRACT_ADDRESS: b("0x4242424242424242424242424242424242424242"),
51
+
52
+ // Blob Scheduling
53
+ // ---------------------------------------------------------------
54
+ BLOB_SCHEDULE: [
55
+ {
56
+ EPOCH: 166400,
57
+ MAX_BLOBS_PER_BLOCK: 15,
58
+ },
59
+ {
60
+ EPOCH: 167936,
61
+ MAX_BLOBS_PER_BLOCK: 21,
62
+ },
63
+ ],
64
+ };
@@ -0,0 +1,64 @@
1
+ import {fromHex as b} from "@lodestar/utils";
2
+ import {chainConfig as mainnet} from "../configs/mainnet.js";
3
+ import {ChainConfig} from "../types.js";
4
+
5
+ // Hoodi beacon chain config:
6
+ // https://github.com/eth-clients/hoodi/blob/main/metadata/config.yaml
7
+
8
+ export const hoodiChainConfig: ChainConfig = {
9
+ ...mainnet,
10
+
11
+ CONFIG_NAME: "hoodi",
12
+
13
+ // Genesis
14
+ // ---------------------------------------------------------------
15
+ // 2025-Mar-17 12:00:00 PM UTC
16
+ MIN_GENESIS_TIME: 1742212800,
17
+ GENESIS_DELAY: 600,
18
+ GENESIS_FORK_VERSION: b("0x10000910"),
19
+
20
+ // Forking
21
+ // ---------------------------------------------------------------
22
+ // # Altair
23
+ ALTAIR_FORK_VERSION: b("0x20000910"),
24
+ ALTAIR_FORK_EPOCH: 0,
25
+ // # Merge
26
+ BELLATRIX_FORK_VERSION: b("0x30000910"),
27
+ BELLATRIX_FORK_EPOCH: 0,
28
+ TERMINAL_TOTAL_DIFFICULTY: BigInt("0"),
29
+ // Capella
30
+ CAPELLA_FORK_VERSION: b("0x40000910"),
31
+ CAPELLA_FORK_EPOCH: 0,
32
+ // Deneb
33
+ DENEB_FORK_VERSION: b("0x50000910"),
34
+ DENEB_FORK_EPOCH: 0,
35
+ // Electra
36
+ ELECTRA_FORK_VERSION: b("0x60000910"),
37
+ ELECTRA_FORK_EPOCH: 2048,
38
+ // Fulu
39
+ FULU_FORK_VERSION: b("0x70000910"),
40
+ FULU_FORK_EPOCH: 50688,
41
+
42
+ // Time parameters
43
+ // ---------------------------------------------------------------
44
+ // 12 (update from older mainnet default of 14)
45
+ SECONDS_PER_ETH1_BLOCK: 12,
46
+
47
+ // Deposit contract
48
+ // ---------------------------------------------------------------
49
+ DEPOSIT_CHAIN_ID: 560048,
50
+ DEPOSIT_NETWORK_ID: 560048,
51
+
52
+ // Blob Scheduling
53
+ // ---------------------------------------------------------------
54
+ BLOB_SCHEDULE: [
55
+ {
56
+ EPOCH: 52480,
57
+ MAX_BLOBS_PER_BLOCK: 15,
58
+ },
59
+ {
60
+ EPOCH: 54016,
61
+ MAX_BLOBS_PER_BLOCK: 21,
62
+ },
63
+ ],
64
+ };
@@ -0,0 +1,19 @@
1
+ import {fromHex as b} from "@lodestar/utils";
2
+ import {chainConfig as mainnet} from "../configs/mainnet.js";
3
+ import {ChainConfig} from "../types.js";
4
+
5
+ export const mainnetChainConfig: ChainConfig = {
6
+ ...mainnet,
7
+
8
+ CONFIG_NAME: "mainnet",
9
+
10
+ DEPOSIT_CONTRACT_ADDRESS: b("0x00000000219ab540356cBB839Cbe05303d7705Fa"),
11
+
12
+ DEPOSIT_CHAIN_ID: 1,
13
+ DEPOSIT_NETWORK_ID: 1,
14
+
15
+ MIN_GENESIS_TIME: 1606824000, // Tuesday, December 1, 2020 12:00:00 PM UTC
16
+ GENESIS_DELAY: 604800,
17
+ // MUST NOT use `GENESIS_FORK_VERSION` here so for `minimal` networks the preset value of 0x00000001 take prevalence
18
+ // GENESIS_FORK_VERSION: "0x00000000",
19
+ };
@@ -0,0 +1,61 @@
1
+ import {fromHex as b} from "@lodestar/utils";
2
+ import {chainConfig as mainnet} from "../configs/mainnet.js";
3
+ import {ChainConfig} from "../types.js";
4
+
5
+ // Sepolia beacon chain config:
6
+ // https://github.com/eth-clients/sepolia/blob/main/metadata/config.yaml
7
+
8
+ export const sepoliaChainConfig: ChainConfig = {
9
+ ...mainnet,
10
+
11
+ CONFIG_NAME: "sepolia",
12
+
13
+ // Genesis
14
+ // ---------------------------------------------------------------
15
+ MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 1300,
16
+ // # Sunday, June 19, 2022 2:00:00 PM +UTC
17
+ MIN_GENESIS_TIME: 1655647200,
18
+ GENESIS_FORK_VERSION: b("0x90000069"),
19
+ GENESIS_DELAY: 86400,
20
+
21
+ // Forking
22
+ // ---------------------------------------------------------------
23
+ // # Altair
24
+ ALTAIR_FORK_VERSION: b("0x90000070"),
25
+ ALTAIR_FORK_EPOCH: 50,
26
+ // # Merge
27
+ BELLATRIX_FORK_VERSION: b("0x90000071"),
28
+ BELLATRIX_FORK_EPOCH: 100,
29
+ TERMINAL_TOTAL_DIFFICULTY: BigInt("17000000000000000"),
30
+ // Capella
31
+ CAPELLA_FORK_VERSION: b("0x90000072"),
32
+ CAPELLA_FORK_EPOCH: 56832,
33
+ // Deneb
34
+ DENEB_FORK_VERSION: b("0x90000073"),
35
+ DENEB_FORK_EPOCH: 132608,
36
+ // Electra
37
+ ELECTRA_FORK_VERSION: b("0x90000074"),
38
+ ELECTRA_FORK_EPOCH: 222464,
39
+ // Fulu
40
+ FULU_FORK_VERSION: b("0x90000075"),
41
+ FULU_FORK_EPOCH: 272640,
42
+
43
+ // Deposit contract
44
+ // ---------------------------------------------------------------
45
+ DEPOSIT_CHAIN_ID: 11155111,
46
+ DEPOSIT_NETWORK_ID: 11155111,
47
+ DEPOSIT_CONTRACT_ADDRESS: b("0x7f02C3E3c98b133055B8B348B2Ac625669Ed295D"),
48
+
49
+ // Blob Scheduling
50
+ // ---------------------------------------------------------------
51
+ BLOB_SCHEDULE: [
52
+ {
53
+ EPOCH: 274176,
54
+ MAX_BLOBS_PER_BLOCK: 15,
55
+ },
56
+ {
57
+ EPOCH: 275712,
58
+ MAX_BLOBS_PER_BLOCK: 21,
59
+ },
60
+ ],
61
+ };