Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ethereum-cryptography / Remove Direct EVM @noble/curves Usage #3668

Merged
merged 8 commits into from
Sep 16, 2024
123 changes: 58 additions & 65 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@ethereumjs/trie": "^6.2.1",
"@ethereumjs/tx": "^5.4.0",
"@ethereumjs/util": "^9.1.0",
"ethereum-cryptography": "^2.2.1"
"ethereum-cryptography": "^3.0.0"
},
"devDependencies": {
"kzg-wasm": "^0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@ethereumjs/tx": "^5.4.0",
"@ethereumjs/util": "^9.1.0",
"debug": "^4.3.3",
"ethereum-cryptography": "^2.2.1",
"ethereum-cryptography": "^3.0.0",
"lru-cache": "10.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"connect": "^3.7.0",
"cors": "^2.8.5",
"debug": "^4.3.3",
"ethereum-cryptography": "^2.2.1",
"ethereum-cryptography": "^3.0.0",
"it-pipe": "^1.1.0",
"jayson": "^4.0.0",
"kzg-wasm": "^0.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
"dependencies": {
"@ethereumjs/util": "^9.1.0",
"ethereum-cryptography": "^2.2.1"
"ethereum-cryptography": "^3.0.0"
},
"devDependencies": {
"@polkadot/util": "^12.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/devp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@ethereumjs/util": "^9.1.0",
"@scure/base": "^1.1.7",
"debug": "^4.3.3",
"ethereum-cryptography": "^2.2.1",
"ethereum-cryptography": "^3.0.0",
"lru-cache": "10.1.0",
"scanf": "1.1.2",
"snappyjs": "^0.6.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/ethash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@ethereumjs/rlp": "^5.0.2",
"@ethereumjs/util": "^9.1.0",
"bigint-crypto-utils": "^3.2.2",
"ethereum-cryptography": "^2.2.1"
"ethereum-cryptography": "^3.0.0"
},
"devDependencies": {
"@ethereumjs/common": "^4.4.0"
Expand Down
3 changes: 1 addition & 2 deletions packages/evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@
"@ethereumjs/statemanager": "^2.4.0",
"@ethereumjs/tx": "^5.4.0",
"@ethereumjs/util": "^9.1.0",
"@noble/curves": "^1.5.0",
"@types/debug": "^4.1.9",
"debug": "^4.3.3",
"ethereum-cryptography": "^2.2.1"
"ethereum-cryptography": "^3.0.0"
},
"devDependencies": {
"@ethersproject/abi": "^5.0.12",
Expand Down
4 changes: 2 additions & 2 deletions packages/evm/src/opcodes/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import {
bytesToHex,
bytesToInt,
concatBytes,
equalsBytes,
getVerkleTreeIndicesForStorageSlot,
setLengthLeft,
} from '@ethereumjs/util'
import { equalBytes } from '@noble/curves/abstract/utils'
import { keccak256 } from 'ethereum-cryptography/keccak.js'

import { EOFContainer, EOFContainerMode } from '../eof/container.js'
Expand Down Expand Up @@ -62,7 +62,7 @@ export interface AsyncOpHandler {
export type OpHandler = SyncOpHandler | AsyncOpHandler

function getEIP7702DelegatedAddress(code: Uint8Array) {
if (equalBytes(code.slice(0, 3), DELEGATION_7702_FLAG)) {
if (equalsBytes(code.slice(0, 3), DELEGATION_7702_FLAG)) {
return new Address(code.slice(3, 24))
}
}
Expand Down
Loading
Loading