Skip to content

Commit

Permalink
use eip754 names for the peerdas config
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Jul 15, 2024
1 parent 3186c20 commit 467c892
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/config/src/chainConfig/configs/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export const chainConfig: ChainConfig = {
// Electra
ELECTRA_FORK_VERSION: b("0x05000000"),
ELECTRA_FORK_EPOCH: Infinity,
EIP7594_FORK_VERSION: b("0x05000000"),
EIP7594_FORK_EPOCH: Infinity,

// Time parameters
// ---------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions packages/config/src/chainConfig/configs/minimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export const chainConfig: ChainConfig = {
// Electra
ELECTRA_FORK_VERSION: b("0x05000001"),
ELECTRA_FORK_EPOCH: Infinity,
EIP7594_FORK_VERSION: b("0x05000001"),
EIP7594_FORK_EPOCH: Infinity,

// Time parameters
// ---------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions packages/config/src/chainConfig/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export type ChainConfig = {
// ELECTRA
ELECTRA_FORK_VERSION: Uint8Array;
ELECTRA_FORK_EPOCH: number;
EIP7594_FORK_VERSION: Uint8Array;
EIP7594_FORK_EPOCH: number;

// Time parameters
SECONDS_PER_SLOT: number;
Expand Down Expand Up @@ -109,6 +111,8 @@ export const chainConfigTypes: SpecTypes<ChainConfig> = {
// ELECTRA
ELECTRA_FORK_VERSION: "bytes",
ELECTRA_FORK_EPOCH: "number",
EIP7594_FORK_VERSION: "bytes",
EIP7594_FORK_EPOCH: "number",

// Time parameters
SECONDS_PER_SLOT: "number",
Expand Down
4 changes: 2 additions & 2 deletions packages/config/src/forkConfig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export function createForkConfig(config: ChainConfig): ForkConfig {
const electra: ForkInfo = {
name: ForkName.electra,
seq: ForkSeq.electra,
epoch: config.ELECTRA_FORK_EPOCH,
version: config.ELECTRA_FORK_VERSION,
epoch: config.EIP7594_FORK_EPOCH,
version: config.EIP7594_FORK_VERSION,
prevVersion: config.DENEB_FORK_VERSION,
prevForkName: ForkName.deneb,
};
Expand Down
2 changes: 2 additions & 0 deletions packages/validator/src/util/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ function getSpecCriticalParams(localConfig: ChainConfig): Record<keyof ConfigWit
// electra
ELECTRA_FORK_VERSION: electraForkRelevant,
ELECTRA_FORK_EPOCH: electraForkRelevant,
EIP7594_FORK_VERSION: electraForkRelevant,
EIP7594_FORK_EPOCH: electraForkRelevant,

// Time parameters
SECONDS_PER_SLOT: true,
Expand Down

0 comments on commit 467c892

Please sign in to comment.