Skip to content

Commit fd22c86

Browse files
committed
add some presets
1 parent e0c252c commit fd22c86

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

packages/params/src/presets/mainnet.ts

+7
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,11 @@ export const mainnetPreset: BeaconPreset = {
118118
MAX_BLOB_COMMITMENTS_PER_BLOCK: 4096,
119119
MAX_BLOBS_PER_BLOCK: 6,
120120
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 17,
121+
122+
// ELECTRA
123+
///////////
124+
FIELD_ELEMENTS_PER_CELL: 64,
125+
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: 4,
126+
NUMBER_OF_COLUMNS: 128,
127+
121128
};

packages/params/src/presets/minimal.ts

+6
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,10 @@ export const minimalPreset: BeaconPreset = {
119119
MAX_BLOB_COMMITMENTS_PER_BLOCK: 16,
120120
MAX_BLOBS_PER_BLOCK: 6,
121121
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 9,
122+
123+
// ELECTRA
124+
///////////
125+
FIELD_ELEMENTS_PER_CELL: 64,
126+
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: 4,
127+
NUMBER_OF_COLUMNS: 128,
122128
};

packages/params/src/types.ts

+12
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ export type BeaconPreset = {
8282
MAX_BLOB_COMMITMENTS_PER_BLOCK: number;
8383
MAX_BLOBS_PER_BLOCK: number;
8484
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: number;
85+
86+
// ELECTRA
87+
///////////
88+
FIELD_ELEMENTS_PER_CELL: number,
89+
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: number,
90+
NUMBER_OF_COLUMNS: number,
8591
};
8692

8793
/**
@@ -167,6 +173,12 @@ export const beaconPresetTypes: BeaconPresetTypes = {
167173
MAX_BLOB_COMMITMENTS_PER_BLOCK: "number",
168174
MAX_BLOBS_PER_BLOCK: "number",
169175
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: "number",
176+
177+
// ELECTRA
178+
///////////
179+
FIELD_ELEMENTS_PER_CELL: "number",
180+
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: "number",
181+
NUMBER_OF_COLUMNS: "number",
170182
};
171183

172184
type BeaconPresetTypes = {

packages/validator/src/util/params.ts

+6
Original file line numberDiff line numberDiff line change
@@ -222,5 +222,11 @@ function getSpecCriticalParams(localConfig: ChainConfig): Record<keyof ConfigWit
222222
MAX_BLOBS_PER_BLOCK: denebForkRelevant,
223223
MAX_BLOB_COMMITMENTS_PER_BLOCK: denebForkRelevant,
224224
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: denebForkRelevant,
225+
226+
// # ElectraPreset
227+
/////////////////
228+
FIELD_ELEMENTS_PER_CELL: electraForkRelevant,
229+
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: electraForkRelevant,
230+
NUMBER_OF_COLUMNS: electraForkRelevant,
225231
};
226232
}

0 commit comments

Comments
 (0)