Skip to content

Commit

Permalink
fixes pre-p256verify
Browse files Browse the repository at this point in the history
  • Loading branch information
laisolizq committed Oct 10, 2024
1 parent 88be1e9 commit a6cbfac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions main/precompiled/pre-p256verify.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions main/touched.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand Down

0 comments on commit a6cbfac

Please sign in to comment.