Skip to content

Commit

Permalink
genesis: remove mpt devdep (#3752)
Browse files Browse the repository at this point in the history
* genesis: remove mpt devdep

* monorepo: package lock changes

---------

Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com>
  • Loading branch information
gabrocheleau and acolytec3 authored Oct 17, 2024
1 parent ac1c224 commit d14a5ed
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
3 changes: 0 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions packages/genesis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,5 @@
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@ethereumjs/mpt": "^6.2.2"
}
}
Empty file.
12 changes: 1 addition & 11 deletions packages/genesis/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Chain, ChainGenesis } from '@ethereumjs/common'
import { genesisMPTStateRoot } from '@ethereumjs/mpt'
import { bytesToHex, equalsBytes } from '@ethereumjs/util'
import { assert, describe, it } from 'vitest'

import { getGenesis } from '../src/index.js'
Expand All @@ -12,21 +10,13 @@ describe('genesis test', () => {
// Kaustinen can have an empty genesis state since verkle blocks contain their pre-state
if (Number(chainId) === Chain.Kaustinen6) continue

const { name, stateRoot: expectedRoot } = ChainGenesis[chainId as unknown as Chain]
const { name } = ChainGenesis[chainId as unknown as Chain]

const genesisState = getGenesis(Number(chainId))
assert.ok(
genesisState !== undefined,
`network=${name} chainId=${chainId} genesis should be found`,
)

const stateRoot = await genesisMPTStateRoot(genesisState!)
assert.ok(
equalsBytes(expectedRoot, stateRoot),
`network=${name} chainId=${chainId} stateRoot should match expected=${bytesToHex(
expectedRoot,
)} actual=${bytesToHex(stateRoot)}`,
)
}
})
})

0 comments on commit d14a5ed

Please sign in to comment.