Skip to content

Commit

Permalink
working local build with kaunstinen v2 geth build
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Sep 6, 2023
1 parent a8df0e4 commit e44ca0c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/config/src/forkConfig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function createForkConfig(config: ChainConfig): ForkConfig {

/** Forks in order order of occurence, `phase0` first */
// Note: Downstream code relies on proper ordering.
const forks = {phase0, altair, bellatrix, capella, deneb, verge};
const forks = {phase0, altair, bellatrix, capella, verge, deneb};

// Prevents allocating an array on every getForkInfo() call
const forksAscendingEpochOrder = Object.values(forks);
Expand Down
2 changes: 1 addition & 1 deletion packages/params/src/forkName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ export function isForkVerge(fork: ForkName): fork is ForkBlobs {

export type ForkBlobs = Exclude<ForkWithdrawals, ForkName.capella>;
export function isForkBlobs(fork: ForkName): fork is ForkBlobs {
return isForkWithdrawals(fork) && fork !== ForkName.capella;
return isForkWithdrawals(fork) && fork !== ForkName.verge;
}
9 changes: 9 additions & 0 deletions packages/state-transition/src/util/genesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,15 @@ export function initializeBeaconStateFromEth1(
ssz.deneb.ExecutionPayloadHeader.defaultViewDU();
}

if (GENESIS_SLOT >= config.VERGE_FORK_EPOCH) {
const stateVerge = state as CompositeViewDU<typeof ssz.verge.BeaconState>;
stateVerge.fork.previousVersion = config.VERGE_FORK_VERSION;
stateVerge.fork.currentVersion = config.VERGE_FORK_VERSION;
stateVerge.latestExecutionPayloadHeader =
(executionPayloadHeader as CompositeViewDU<typeof ssz.verge.ExecutionPayloadHeader>) ??
ssz.verge.ExecutionPayloadHeader.defaultViewDU();
}

state.commit();

return state;
Expand Down
1 change: 1 addition & 0 deletions packages/validator/src/services/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ export class BlockProposingService {
}

// All subsequent forks are expected to use v2 too
case ForkName.verge:
case ForkName.altair:
case ForkName.bellatrix:
case ForkName.capella: {
Expand Down

0 comments on commit e44ca0c

Please sign in to comment.