From a6cbfacfbc092fd76a955e621a58bd6ba9a715e2 Mon Sep 17 00:00:00 2001 From: Laia Soler Date: Wed, 9 Oct 2024 11:13:08 +0200 Subject: [PATCH] fixes pre-p256verify --- main/precompiled/pre-p256verify.zkasm | 1 + main/touched.zkasm | 2 ++ package.json | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main/precompiled/pre-p256verify.zkasm b/main/precompiled/pre-p256verify.zkasm index e3107e29..92948dbf 100644 --- a/main/precompiled/pre-p256verify.zkasm +++ b/main/precompiled/pre-p256verify.zkasm @@ -38,6 +38,7 @@ funcP256VERIFY: E + 32 => E :MSTORE(readXFromCalldataOffset), CALL(readFromCalldataOffset); in: [readXFromCalldataOffset: offset value, readXFromCalldataLength: length value], out: [readXFromCalldataResult: result value] $ => E :MLOAD(readXFromCalldataResult), CALL(p256verify) ;in: [A: hash, B: r, C: s, D: x, E: y], out: [A: result, B: result_code] B :JMPNZ(endP256VERIFYFail) + A :JMPZ(preEndP256VERIFY) ; write result p256verify into memory 0 => E diff --git a/main/touched.zkasm b/main/touched.zkasm index 32b82c67..b7c42794 100644 --- a/main/touched.zkasm +++ b/main/touched.zkasm @@ -36,6 +36,8 @@ isColdAddress: ; if address is a precompiled considered as warm address 10 => B $ :LT, JMPC(finishColdPrecompiled) + 0x100 => B + $ :EQ, JMPC(finishColdPrecompiled) checkWarmed: ; save current state root & load touched root diff --git a/package.json b/package.json index 555f51f9..87f83a2c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "test:zkasm": "node tools/run-tests-zkasm.js ./test --helpers ../main/helper.js", "eslint": "npx eslint tools/**.js && npx eslint counters/counters-executor.js", "eslint:fix": "npx eslint tools/**.js --fix && npx eslint counters/counters-executor.js --fix", - "test:gen": "node tools/parallel-testing/gen-parallel-tests.js", + "test:gen": "node tools/parallel-testing/gen-parallel-tests.js --skipVCounters", "test:start": "npx mocha --jobs $NUM_CPUS --timeout 0 --max-old-space-size=8192 --parallel \"tools/parallel-testing/parallel-tests/*.test.js\"", "report:free-inputs": "node tools/audit-tools/free-inputs-checker.js", "report:registry-op": "node tools/audit-tools/registry-op-checker.js" @@ -44,7 +44,7 @@ }, "devDependencies": { "@0xpolygonhermez/zkevm-commonjs": "github:0xPolygonHermez/zkevm-commonjs#v8.0.0-fork.12", - "@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#develop-durian", + "@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#fix/secp256r1-dbl", "@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/add-rip7212", "chai": "^4.3.6", "chalk": "^3.0.0",