Skip to content

Commit

Permalink
minor changes + last commit zkasmcom
Browse files Browse the repository at this point in the history
  • Loading branch information
krlosMata committed Nov 15, 2022
1 parent 2188585 commit 2a48a09
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion main/opcodes/arithmetic.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ opADDMOD:
$ => A :MLOAD(SP--)
$ => B :MLOAD(SP--)
; Add operation with Arith
${var _addMod = A + B} ; TODO $$
$${var _addMod = A + B}

1 => D
$ => A :ADD, JMPC(AddModJumpCarry) ; or arith
Expand Down
4 changes: 2 additions & 2 deletions main/precompiled/selector.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ INCLUDE "end.zkasm"

/**
* Selector precompiled contract to run
* Current precompiled supported: ECRECOVER, IDENTITY & MODEXP
* Current precompiled supported: ECRECOVER & IDENTITY
* @param {A} - Precompiled address
*/
selectorPrecompiled:
A - 2 :JMPN(funcECRECOVER)
A - 3 :JMPN(callContract) ;:JMPN(SHA256)
A - 4 :JMPN(callContract) ;:JMPN(RIPEMD160)
A - 5 :JMPN(IDENTITY)
A - 6 :JMPN(MODEXP)
A - 6 :JMPN(callContract) ;:JMPN(MODEXP)
A - 7 :JMPN(callContract) ;:JMPN(ECADD)
A - 8 :JMPN(callContract) ;:JMPN(ECMUL)
A - 9 :JMPN(callContract) ;:JMPN(ECPAIRING)
Expand Down
4 changes: 1 addition & 3 deletions main/utils.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,6 @@ handleError:
;revert all state changes
$ => SR :MLOAD(initSR)
:CALL(revertTouched)

handleInvalidStatic:
;remaining gas = 0
$ => A :MLOAD(originCTX)
0 => B
Expand Down Expand Up @@ -1103,7 +1101,7 @@ utilMULMOD:
;k.h * 2²⁵⁶ * N = D2 * 2²⁵⁶ --> k.h * N = D2

; Mul operation with Arith
${var _mulMod = A * B} ; TODO $$
$${var _mulMod = A * B}
A :MSTORE(arithA)
B :MSTORE(arithB)
; here we perform the: A * B + 0 = D*2^256 + E
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"url": "https://github.com/0xPolygonHermez/zkevm-rom.git"
},
"dependencies": {
"@0xpolygonhermez/zkasmcom": "https://github.com/0xPolygonHermez/zkasmcom.git#v0.4.0.0",
"@0xpolygonhermez/zkasmcom": "https://github.com/0xPolygonHermez/zkasmcom.git#eaa12f71d77c7acdf702f8caabc060d38bb5eb4e",
"yargs": "^17.5.1"
},
"devDependencies": {
"@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#feature/recursive-new",
"@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#develop",
"@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#develop",
"chai": "^4.3.6",
"chalk": "^3.0.0",
Expand Down

0 comments on commit 2a48a09

Please sign in to comment.