Skip to content

Commit af34eae

Browse files
committed
Merge branch 'master' of github.com:ethereumjs/ethereumjs-monorepo into evmmax-0
2 parents 135dceb + bea4425 commit af34eae

File tree

101 files changed

+512
-420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+512
-420
lines changed

.github/workflows/cspell.yml renamed to .github/workflows/spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
node-version: 18
2020
cache: 'npm'
2121

22-
- run: npm run cspell
22+
- run: npm run spellcheck

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ Detailed version can be seen on [Codecov.io][coverage-link]
7979
mpt --> blockchain
8080
mpt --> block
8181
mpt --> statemanager
82+
verkle --> vm
83+
verkle --> evm
84+
verkle --> statemanager
85+
binarytree --> vm
86+
binarytree --> statemanager
8287
util --> common
8388
common --> block
8489
common --> statemanager

config/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@ Use CLI commands above in your `package.json`:
132132
}
133133
```
134134

135+
### Doing cross-package development
136+
137+
All of our packages include a `typescript` entry in the `exports` map under the `esm` key. This allows `node`/`tsx`/`vitest` to use
138+
the typescript sources directly without requiring you to recompile packages when you make changes.
139+
140+
Vitest is already configured to use the `typescript` entry points so simply specify `npx vitest run-c ../../config/vitest.config.mts test/myTest.spec.ts`
141+
when running individual tests.
142+
143+
If running typescript scripts from the command line, you can use `tsx --conditions=typescript myScript.ts` to use the typescript sources.
144+
145+
When running code using a bash script, you can set an environment variable `NODE_OPTIONS='--conditions=typescript'` and this will get picked by `tsx`.
146+
135147
## Documentation
136148

137149
Add `typedoc.js` to a package that extends the generic TypeDoc configuration:

config/vitest.config.mts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { configDefaults, defineConfig, mergeConfig } from 'vitest/config'
2+
export default defineConfig({
3+
environments: {
4+
ssr: {
5+
resolve: {
6+
conditions: ['typescript'],
7+
},
8+
},
9+
},
10+
})

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
"biome:fix": "npx @biomejs/biome check --write",
88
"checkNpmVersion": "./scripts/check-npm-version.sh",
99
"clean": "./config/cli/clean-root.sh",
10-
"cspell": "npm run cspell:ts && npm run cspell:md",
11-
"cspell:ts": "npx cspell --gitignore -e \"./packages/ethereum-tests\" -e \"./packages/wallet/test\" -e \"./packages/client/archive\" -c ./config/cspell-ts.json \"./packages/**/*.ts\" --cache --show-suggestions --show-context",
12-
"cspell:md": "npx cspell --gitignore -e \"./packages/ethereum-tests\" -e \"./packages/client/withdrawals-testnet/**\" -e \"./packages/**/docs\" -c ./config/cspell-md.json \"**.md\" --cache --show-suggestions --show-context",
1310
"docs:build": "npm run docs:build --workspaces --if-present",
1411
"e2e:inject": "node ./scripts/e2e-inject-resolutions.js",
1512
"e2e:publish": "./scripts/e2e-publish.sh",
@@ -25,7 +22,11 @@
2522
"preinstall": "npm run checkNpmVersion",
2623
"postinstall": "npm run build --workspaces",
2724
"prepare": "git config --local core.hooksPath .githooks",
25+
"sc": "npm run spellcheck",
2826
"sort-package-json": "sort-package-json \"package.json\" \"packages/*/package.json\"",
27+
"spellcheck": "npm run spellcheck:ts && npm run spellcheck:md",
28+
"spellcheck:ts": "npx cspell --gitignore -e \"./packages/ethereum-tests\" -e \"./packages/wallet/test\" -e \"./packages/client/archive\" -c ./config/cspell-ts.json \"./packages/**/*.ts\" --cache --show-suggestions --show-context",
29+
"spellcheck:md": "npx cspell --gitignore -e \"./packages/ethereum-tests\" -e \"./packages/client/withdrawals-testnet/**\" -e \"./packages/**/docs\" -c ./config/cspell-md.json \"**.md\" --cache --show-suggestions --show-context",
2930
"install-browser-deps": "npm install [email protected] @vitest/[email protected]"
3031
},
3132
"devDependencies": {

packages/binarytree/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
88

99
## 10.0.0-dev-rc.1 - 2025-03-24
1010

11-
This is the first (and likely the last) round of `RC` releases for the upcoming breaking releases, following the `alpha` releases from October 2024. The releases are somewhat delayed (sorry for that), but final releases can now be expected very very soon, to be released once the Ethereum [Pectra](https://eips.ethereum.org/EIPS/eip-7600) hardfork is scheduled for mainnet and all EIPs are fully finalized. Pectra will then also be the default hardfork setting for all EthereumJS libraries.
11+
This is the first (and likely the last) round of `RC` releases for the upcoming breaking releases, following the `alpha` releases from October 2024 (see `alpha` release release notes for full/main change description). The releases are somewhat delayed (sorry for that), but final releases can now be expected very very soon, to be released once the Ethereum [Pectra](https://eips.ethereum.org/EIPS/eip-7600) hardfork is scheduled for mainnet and all EIPs are fully finalized. Pectra will then also be the default hardfork setting for all EthereumJS libraries.
1212

1313
### New Versioning Scheme
1414

15-
This breaking release round will come with a new versioning scheme (thanks to @paulmillr for the [suggestion](https://github.com/ethereumjs/ethereumjs-monorepo/issues/3748)), aligning the package numbers on breaking releases for all EthereumJS packages. This will make it easier to report bugs ("bug happened on EthereumJS version 10 releases"), reason about release series and make library compatibility more transparent and easier to grasp.
15+
This breaking release round will come with a new versioning scheme (thanks to paulmillr for the [suggestion](https://github.com/ethereumjs/ethereumjs-monorepo/issues/3748)), aligning the package numbers on breaking releases for all EthereumJS packages. This will make it easier to report bugs ("bug happened on EthereumJS version 10 releases"), reason about release series and make library compatibility more transparent and easier to grasp.
1616

1717
As a start we bump all major release versions to version 10, these `RC` releases are the first to be released with the new versioning scheme.
1818

packages/binarytree/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
"module": "dist/esm/index.js",
2626
"exports": {
2727
".": {
28-
"import": "./dist/esm/index.js",
28+
"import": {
29+
"typescript": "./src/index.ts",
30+
"default": "./dist/esm/index.js"
31+
},
2932
"require": "./dist/cjs/index.js"
3033
}
3134
},
@@ -41,8 +44,12 @@
4144
"lint": "npm run biome && eslint --config ./eslint.config.mjs .",
4245
"lint:fix": "npm run biome:fix && eslint --fix --config ./eslint.config.mjs .",
4346
"prepublishOnly": "../../config/cli/prepublish.sh",
47+
"sc": "npm run spellcheck",
48+
"spellcheck": "npm run spellcheck:ts && npm run spellcheck:md",
49+
"spellcheck:ts": "npx cspell --gitignore -c ../../config/cspell-ts.json \"./**/*.ts\" --cache --show-suggestions --show-context",
50+
"spellcheck:md": "npx cspell --gitignore -c ../../config/cspell-md.json \"**.md\" --cache --show-suggestions --show-context",
4451
"test": "npm run test:node",
45-
"test:node": "npx vitest run",
52+
"test:node": "npx vitest run -c ../../config/vitest.config.mts",
4653
"test:browser": "npx vitest run --config=../../config/vitest.config.browser.mts",
4754
"tsc": "../../config/cli/ts-compile.sh"
4855
},

packages/binarytree/src/db/checkpoint.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export class CheckpointDB implements DB {
188188
} else {
189189
const valuePut =
190190
this.valueEncoding === ValueEncoding.Bytes ? value : bytesToUnprefixedHex(value)
191-
await this.db.put(keyHex, <any>valuePut, {
191+
await this.db.put(keyHex, valuePut, {
192192
keyEncoding: KeyEncoding.String,
193193
valueEncoding: this.valueEncoding,
194194
})
@@ -254,7 +254,7 @@ export class CheckpointDB implements DB {
254254
}
255255
return convertedOp
256256
})
257-
await this.db.batch(<any>convertedOps)
257+
await this.db.batch(convertedOps as any)
258258
}
259259
}
260260

packages/block/CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
88

99
## 10.0.0-rc.1 - 2025-03-24
1010

11-
This is the first (and likely the last) round of `RC` releases for the upcoming breaking releases, following the `alpha` releases from October 2024. The releases are somewhat delayed (sorry for that), but final releases can now be expected very very soon, to be released once the Ethereum [Pectra](https://eips.ethereum.org/EIPS/eip-7600) hardfork is scheduled for mainnet and all EIPs are fully finalized. Pectra will then also be the default hardfork setting for all EthereumJS libraries.
11+
This is the first (and likely the last) round of `RC` releases for the upcoming breaking releases, following the `alpha` releases from October 2024 (see `alpha` release release notes for full/main change description). The releases are somewhat delayed (sorry for that), but final releases can now be expected very very soon, to be released once the Ethereum [Pectra](https://eips.ethereum.org/EIPS/eip-7600) hardfork is scheduled for mainnet and all EIPs are fully finalized. Pectra will then also be the default hardfork setting for all EthereumJS libraries.
1212

1313
### New Versioning Scheme
1414

15-
This breaking release round will come with a new versioning scheme (thanks to @paulmillr for the [suggestion](https://github.com/ethereumjs/ethereumjs-monorepo/issues/3748)), aligning the package numbers on breaking releases for all EthereumJS packages. This will make it easier to report bugs ("bug happened on EthereumJS version 10 releases"), reason about release series and make library compatibility more transparent and easier to grasp.
15+
This breaking release round will come with a new versioning scheme (thanks to paulmillr for the [suggestion](https://github.com/ethereumjs/ethereumjs-monorepo/issues/3748)), aligning the package numbers on breaking releases for all EthereumJS packages. This will make it easier to report bugs ("bug happened on EthereumJS version 10 releases"), reason about release series and make library compatibility more transparent and easier to grasp.
1616

1717
As a start we bump all major release versions to version 10, these `RC` releases are the first to be released with the new versioning scheme.
1818

@@ -100,7 +100,7 @@ header.cliqueEpochTransitionSigners(), // old
100100

101101
### JavaScript KZG Support (no more WASM)
102102

103-
The WASM based KZG integration for 4844 support has been replaced with a pure JS-based solution ([micro-eth-singer](https://github.com/paulmillr/micro-eth-signer), thanks to @paulmillr for the cooperation and Andrew for the integration! ❤️), see PR [#3674](https://github.com/ethereumjs/ethereumjs-monorepo/pull/3674). This makes this library fully independent from Web Assembly code for all supported functionality! 🎉 The JS version is indeed even faster then the WASM one (we benchmarked), so we recommend to just switch over!
103+
The WASM based KZG integration for 4844 support has been replaced with a pure JS-based solution ([micro-eth-singer](https://github.com/paulmillr/micro-eth-signer), thanks to paulmillr for the cooperation and Andrew for the integration! ❤️), see PR [#3674](https://github.com/ethereumjs/ethereumjs-monorepo/pull/3674). This makes this library fully independent from Web Assembly code for all supported functionality! 🎉 The JS version is indeed even faster then the WASM one (we benchmarked), so we recommend to just switch over!
104104

105105
KZG is one-time initialized by providing to `Common`, in the updated version now like this:
106106

packages/block/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
"module": "dist/esm/index.js",
2020
"exports": {
2121
".": {
22-
"import": "./dist/esm/index.js",
22+
"import": {
23+
"typescript": "./src/index.ts",
24+
"default": "./dist/esm/index.js"
25+
},
2326
"require": "./dist/cjs/index.js"
2427
}
2528
},
@@ -37,9 +40,13 @@
3740
"lint": "npm run biome && eslint --config ./eslint.config.mjs .",
3841
"lint:fix": "npm run biome:fix && eslint --fix --config ./eslint.config.mjs .",
3942
"prepublishOnly": "../../config/cli/prepublish.sh",
43+
"sc": "npm run spellcheck",
44+
"spellcheck": "npm run spellcheck:ts && npm run spellcheck:md",
45+
"spellcheck:ts": "npx cspell --gitignore -c ../../config/cspell-ts.json \"./**/*.ts\" --cache --show-suggestions --show-context",
46+
"spellcheck:md": "npx cspell --gitignore -c ../../config/cspell-md.json \"**.md\" --cache --show-suggestions --show-context",
4047
"test": "npm run test:node && npm run test:browser",
4148
"test:browser": "npx vitest run --config=../../config/vitest.config.browser.mts",
42-
"test:node": "npx vitest run",
49+
"test:node": "npx vitest run -c ../../config/vitest.config.mts",
4350
"tsc": "../../config/cli/ts-compile.sh"
4451
},
4552
"dependencies": {

0 commit comments

Comments
 (0)