Skip to content

Commit

Permalink
Add 2935 back
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed May 3, 2024
1 parent 1aedb25 commit 16941c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/hardforks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ export const hardforks: HardforksDict = {
'Next feature hardfork after cancun, internally used for pectra testing/implementation (incomplete/experimental)',
url: 'https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/prague.md',
status: Status.Draft,
eips: [2537, 3074, 6110, 7002, 7685],
eips: [2537, 2935, 3074, 6110, 7002, 7685],
},
osaka: {
name: 'osaka',
Expand Down
7 changes: 2 additions & 5 deletions packages/vm/src/runBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,7 @@ export async function accumulateParentBlockHash(
)
const historyServeWindow = this.common.param('vm', 'historyServeWindow')

// Is this the fork block?
const forkTime = this.common.eipTimestamp(2935)
if (forkTime === null) {
throw new Error('EIP 2935 should be activated by timestamp')
}

// getAccount with historyAddress will throw error as witnesses are not bundeled
// but we need to put account so as to query later for slot
Expand Down Expand Up @@ -520,7 +516,8 @@ export async function accumulateParentBlockHash(
const parentBlock = await this.blockchain.getBlock(parentHash)

// If on the fork block, store the old block hashes as well
if (parentBlock.header.timestamp < forkTime) {
if (forkTime !== null && parentBlock.header.timestamp < forkTime) {
// forkTime could be null in test fixtures
let ancestor = parentBlock
for (let i = 0; i < Number(historyServeWindow) - 1; i++) {
if (ancestor.header.number === BIGINT_0) {
Expand Down

0 comments on commit 16941c9

Please sign in to comment.