Skip to content

Commit 1cbcd6a

Browse files
authored
evm: upgrade noble curves to 1.9.0 (#4018)
1 parent 8e0caec commit 1cbcd6a

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/evm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@ethereumjs/statemanager": "^10.0.0-rc.1",
6060
"@ethereumjs/util": "^10.0.0-rc.1",
6161
"@ethereumjs/verkle": "^10.0.0-dev-rc.1",
62-
"@noble/curves": "^1.8.2",
62+
"@noble/curves": "^1.9.0",
6363
"@types/debug": "^4.1.12",
6464
"debug": "^4.4.0",
6565
"ethereum-cryptography": "^3.1.0",

packages/evm/src/precompiles/10-bls12-map-fp-to-g1.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,6 @@ export async function precompile10(opts: PrecompileInput): Promise<ExecResult> {
4444
if (opts._debug !== undefined) {
4545
opts._debug(`${pName} failed: ${e.message}`)
4646
}
47-
// noble‑curves throws this for inputs that map to the point at infinity
48-
if (e.message === 'bad point: ZERO') {
49-
// return two zeroed field elements (x & y), each the same length as the input
50-
const zeroPoint = new Uint8Array(opts.data.length * 2)
51-
if (opts._debug !== undefined) {
52-
opts._debug(`${pName} mapping to ZERO point, returning zero-filled output`)
53-
}
54-
return {
55-
executionGasUsed: gasUsed,
56-
returnValue: zeroPoint,
57-
}
58-
}
5947
return EVMErrorResult(e, opts.gasLimit)
6048
}
6149

0 commit comments

Comments
 (0)