Skip to content

Commit

Permalink
fix benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Jul 30, 2024
1 parent beaa077 commit 3c605b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export class Common {
Math.min(Number(hf.timestamp ?? timestamp), acc),
Number(timestamp),
)
console.log(minTimeStamp, maxTimeStamp, timestamp, blockNumber)

if (BigInt(maxTimeStamp) < timestamp) {
throw Error(`Maximum HF determined by block number/ttd is lower than timestamp HF`)
}
Expand Down
10 changes: 5 additions & 5 deletions packages/vm/benchmarks/mainnetBlocks.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { readFileSync } from 'fs'
import Benchmark from 'benchmark'
import { Chain, Common, Hardfork } from '@ethereumjs/common'
import { Block, createBlockFromRPC } from '@ethereumjs/block'
import { Common, Hardfork, Mainnet } from '@ethereumjs/common'
import { runBlock as runBlockVM, VM } from '@ethereumjs/vm'
import { getPreState, getBlockchain, verifyResult } from './util.js'
import Benchmark from 'benchmark'
import { readFileSync } from 'fs'
import { getBlockchain, getPreState, verifyResult } from './util.js'

const BLOCK_FIXTURE = 'benchmarks/fixture/blocks-prestate.json'

Expand All @@ -25,7 +25,7 @@ export async function mainnetBlocks(suite?: Benchmark.Suite, numSamples?: number
console.log(`Number of blocks to sample: ${numSamples}`)
data = data.slice(0, numSamples)

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.MuirGlacier })
const common = new Common({ chain: Mainnet, hardfork: Hardfork.MuirGlacier })

for (const blockData of data) {
const block = createBlockFromRPC(blockData.block, [], { common })
Expand Down

0 comments on commit 3c605b4

Please sign in to comment.