From 9840ddef4806057d74f3275482126fb96ef9f004 Mon Sep 17 00:00:00 2001 From: krlosMata Date: Thu, 9 Feb 2023 19:08:53 +0100 Subject: [PATCH 1/5] ger manager address L2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 28b70ebb..c59f46df 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#188654030742c3d09bac111c467869f08051a16b", - "@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#v0.7.0.0-rc.1", + "@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/update-get-info", "chai": "^4.3.6", "chalk": "^3.0.0", "eslint": "^8.25.0", From f2d0e0ed2f481266aef2b1de9cd3405951f45363 Mon Sep 17 00:00:00 2001 From: krlosMata Date: Tue, 14 Feb 2023 22:49:37 +0100 Subject: [PATCH 2/5] fix adding bytes to batchHashData --- main/end.zkasm | 2 +- main/load-tx-rlp.zkasm | 16 ++++++++-------- package.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/main/end.zkasm b/main/end.zkasm index 5ac75185..c10363de 100644 --- a/main/end.zkasm +++ b/main/end.zkasm @@ -1,4 +1,4 @@ finalWait: ${beforeLast()} :JMPN(finalWait) ; Set all registers to 0 except inputs: B (oldstateRoot), C (oldAccInputHash), SP (oldNumBatch), GAS (chainID) & CTX (forkID) - 0 => A, D, E, PC, MAXMEM, SR, HASHPOS, RR, RCX :JMP(start) \ No newline at end of file + 0 => A, D, E, PC, SR, HASHPOS, RR, RCX :JMP(start) \ No newline at end of file diff --git a/main/load-tx-rlp.zkasm b/main/load-tx-rlp.zkasm index 216e1400..0968987f 100644 --- a/main/load-tx-rlp.zkasm +++ b/main/load-tx-rlp.zkasm @@ -37,8 +37,8 @@ loadTx_rlp: longList: A - 0xf7 => D :CALL(addHashTx) - :CALL(checkLongRLP) :CALL(addBatchHashData) + :CALL(checkLongRLP) :JMP(endList) shortList: A - 0xc0 => A @@ -67,8 +67,8 @@ nonce0: shortNonce: A - 0x80 => D D :MSTORE(lengthNonce), CALL(addHashTx) - :CALL(checkShortRLP) :CALL(addBatchHashData) + :CALL(checkShortRLP) endNonce: A :MSTORE(txNonce) @@ -88,8 +88,8 @@ gasPrice0: shortGasPrice: A - 0x80 => D :CALL(addHashTx) - :CALL(checkShortRLP) :CALL(addBatchHashData) + :CALL(checkShortRLP) endGasPrice: A :MSTORE(txGasPriceRLP) @@ -109,8 +109,8 @@ gasLimit0: shortGasLimit: A - 0x80 => D :CALL(addHashTx) - :CALL(checkShortRLP) :CALL(addBatchHashData) + :CALL(checkShortRLP) endGasLimit: A :MSTORE(txGasLimit) @@ -150,8 +150,8 @@ value0: shortValue: A - 0x80 => D :CALL(addHashTx) - :CALL(checkShortRLP) :CALL(addBatchHashData) + :CALL(checkShortRLP) endValue: A :MSTORE(txValue) @@ -181,8 +181,8 @@ shortData: longData: A - 0xb7 => D :CALL(addHashTx) - :CALL(checkLongRLP) :CALL(addBatchHashData) + :CALL(checkLongRLP) $ => D :MLOAD(batchHashPos) D :MSTORE(dataStarts) A => B :MSTORE(txCalldataLen) @@ -197,10 +197,10 @@ readData: readDataFinal: B - 1 :JMPN(endData) B => D :CALL(addHashTx) - :CALL(checkShortDataRLP) 32 - D => D :CALL(SHLarith) A :MSTORE(SP) 32 - D => D :CALL(addBatchHashByteByByte) + :CALL(checkShortDataRLP) endData: ; Check all bytes read to detect pre EIP-155 tx @@ -223,8 +223,8 @@ chainId0: shortChainId: A - 0x80 => D :CALL(addHashTx) - :CALL(checkShortRLP) :CALL(addBatchHashData) + :CALL(checkShortRLP) endChainId: A :MSTORE(txChainId) diff --git a/package.json b/package.json index c59f46df..8eccbd92 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#188654030742c3d09bac111c467869f08051a16b", - "@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/update-get-info", + "@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/error-rlp", "chai": "^4.3.6", "chalk": "^3.0.0", "eslint": "^8.25.0", From fb251a04858f43de77cd1e7a29a67140dce5846f Mon Sep 17 00:00:00 2001 From: krlosMata Date: Thu, 16 Feb 2023 12:16:23 +0100 Subject: [PATCH 3/5] update pacjage remove MAXMEM --- counters/README.md | 2 +- counters/tests/MLOAD32.zkasm | 2 +- counters/tests/MLOADX.zkasm | 2 +- counters/tests/MSTORE32.zkasm | 2 +- counters/tests/MSTOREX.zkasm | 2 +- counters/tests/SHLarith.zkasm | 2 +- counters/tests/SHLarithBit.zkasm | 2 +- counters/tests/SHRarith.zkasm | 2 +- counters/tests/SHRarithBit.zkasm | 2 +- counters/tests/abs.zkasm | 2 +- counters/tests/addBatchHashByteByByte.zkasm | 2 +- counters/tests/computeGasSendCall.zkasm | 2 +- counters/tests/copySP.zkasm | 2 +- counters/tests/divArith.zkasm | 2 +- counters/tests/expAD.zkasm | 2 +- counters/tests/getLenBits.zkasm | 2 +- counters/tests/getLenBytes.zkasm | 2 +- counters/tests/isEmptyAccount.zkasm | 2 +- counters/tests/mulARITH.zkasm | 2 +- counters/tests/offsetUtil.zkasm | 2 +- counters/tests/opADDMOD.zkasm | 2 +- counters/tests/opAdd.zkasm | 2 +- counters/tests/opBLOCKHASH.zkasm | 2 +- counters/tests/opCALL.zkasm | 2 +- counters/tests/opCALLCODE.zkasm | 2 +- counters/tests/opCALLDATACOPY.zkasm | 2 +- counters/tests/opCALLDATALOAD.zkasm | 2 +- counters/tests/opCODECOPY.zkasm | 2 +- counters/tests/opCREATE.zkasm | 2 +- counters/tests/opCREATE2.zkasm | 2 +- counters/tests/opDELEGATECALL.zkasm | 2 +- counters/tests/opDIV.zkasm | 2 +- counters/tests/opEXP.zkasm | 2 +- counters/tests/opEXTCODECOPY.zkasm | 2 +- counters/tests/opMOD.zkasm | 2 +- counters/tests/opMUL.zkasm | 2 +- counters/tests/opMULMOD.zkasm | 2 +- counters/tests/opRETURN.zkasm | 2 +- counters/tests/opRETURNDATACOPY.zkasm | 2 +- counters/tests/opREVERT.zkasm | 2 +- counters/tests/opSDIV.zkasm | 2 +- counters/tests/opSHA3.zkasm | 2 +- counters/tests/opSIGNEXTEND.zkasm | 2 +- counters/tests/opSMOD.zkasm | 2 +- counters/tests/opSTATICCALL.zkasm | 2 +- counters/tests/opSUB.zkasm | 2 +- counters/tests/saveMem.zkasm | 2 +- package.json | 4 ++-- test/bitwise.zkasm | 2 +- test/comp.zkasm | 2 +- test/ecrecover.zkasm | 2 +- test/rotate.zkasm | 2 +- test/touched-assert.zkasm | 2 +- test/utils-expAD.zkasm | 2 +- test/utils-getLenBytes.zkasm | 2 +- 55 files changed, 56 insertions(+), 56 deletions(-) diff --git a/counters/README.md b/counters/README.md index 01f35ee7..850c5583 100644 --- a/counters/README.md +++ b/counters/README.md @@ -22,7 +22,7 @@ checkCounters: %OPADD_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPADD_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) // Finalize execution -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/MLOAD32.zkasm b/counters/tests/MLOAD32.zkasm index 826bb024..c908fc6b 100644 --- a/counters/tests/MLOAD32.zkasm +++ b/counters/tests/MLOAD32.zkasm @@ -15,7 +15,7 @@ operation: %MLOAD32_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %MLOAD32_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/MLOADX.zkasm b/counters/tests/MLOADX.zkasm index 293810b7..2b9f95c8 100644 --- a/counters/tests/MLOADX.zkasm +++ b/counters/tests/MLOADX.zkasm @@ -18,7 +18,7 @@ operation: %MLOADX_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %MLOADX_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/MSTORE32.zkasm b/counters/tests/MSTORE32.zkasm index d6a1a633..25bb2439 100644 --- a/counters/tests/MSTORE32.zkasm +++ b/counters/tests/MSTORE32.zkasm @@ -20,7 +20,7 @@ operation: %MSTORE32_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %MSTORE32_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/MSTOREX.zkasm b/counters/tests/MSTOREX.zkasm index 418cf1a8..32a1b843 100644 --- a/counters/tests/MSTOREX.zkasm +++ b/counters/tests/MSTOREX.zkasm @@ -24,7 +24,7 @@ operation: %MSTOREX_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %MSTOREX_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/SHLarith.zkasm b/counters/tests/SHLarith.zkasm index c6e807ad..88466dc0 100644 --- a/counters/tests/SHLarith.zkasm +++ b/counters/tests/SHLarith.zkasm @@ -16,7 +16,7 @@ operation: %SHLARITH_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %SHLARITH_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/SHLarithBit.zkasm b/counters/tests/SHLarithBit.zkasm index b5a69ce2..b1db3893 100644 --- a/counters/tests/SHLarithBit.zkasm +++ b/counters/tests/SHLarithBit.zkasm @@ -16,7 +16,7 @@ operation: %SHLARITHBIT_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %SHLARITHBIT_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/SHRarith.zkasm b/counters/tests/SHRarith.zkasm index 795299c9..5db4b10c 100644 --- a/counters/tests/SHRarith.zkasm +++ b/counters/tests/SHRarith.zkasm @@ -16,7 +16,7 @@ operation: %SHRARITH_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %SHRARITH_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/SHRarithBit.zkasm b/counters/tests/SHRarithBit.zkasm index 8a9203d4..4b776b96 100644 --- a/counters/tests/SHRarithBit.zkasm +++ b/counters/tests/SHRarithBit.zkasm @@ -16,7 +16,7 @@ operation: %SHRARITHBIT_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %SHRARITHBIT_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/abs.zkasm b/counters/tests/abs.zkasm index 85e0582e..c97f5b44 100644 --- a/counters/tests/abs.zkasm +++ b/counters/tests/abs.zkasm @@ -18,7 +18,7 @@ operation: %ABS_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %ABS_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) finalizeExecution: -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) readCode: :RETURN diff --git a/counters/tests/addBatchHashByteByByte.zkasm b/counters/tests/addBatchHashByteByByte.zkasm index 4b3e39cc..850b5c34 100644 --- a/counters/tests/addBatchHashByteByByte.zkasm +++ b/counters/tests/addBatchHashByteByByte.zkasm @@ -19,7 +19,7 @@ operation: %ADDBATCHHASH_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %ADDBATCHHASH_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/computeGasSendCall.zkasm b/counters/tests/computeGasSendCall.zkasm index 5155a10b..8307e888 100644 --- a/counters/tests/computeGasSendCall.zkasm +++ b/counters/tests/computeGasSendCall.zkasm @@ -18,7 +18,7 @@ operation: %COMPUTEGASSENDCALL_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %COMPUTEGASSENDCALL_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/copySP.zkasm b/counters/tests/copySP.zkasm index 1ff439bb..e89327a7 100644 --- a/counters/tests/copySP.zkasm +++ b/counters/tests/copySP.zkasm @@ -26,7 +26,7 @@ operation: %COPYSP_CNT_PADDING_PG + %MLOAD32_CNT_PADDING_PG*C - CNT_PADDING_PG :JMPNZ(failedCounters) %COPYSP_CNT_POSEIDON_G + %MLOAD32_CNT_POSEIDON_G*C - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/divArith.zkasm b/counters/tests/divArith.zkasm index 35269a4d..39cb6f06 100644 --- a/counters/tests/divArith.zkasm +++ b/counters/tests/divArith.zkasm @@ -16,7 +16,7 @@ operation: %DIVARITH_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %DIVARITH_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) finalizeExecution: -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) readCode: :RETURN diff --git a/counters/tests/expAD.zkasm b/counters/tests/expAD.zkasm index 78a0874c..3e6096f2 100644 --- a/counters/tests/expAD.zkasm +++ b/counters/tests/expAD.zkasm @@ -18,7 +18,7 @@ operation: %EXPAD_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %EXPAD_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/getLenBits.zkasm b/counters/tests/getLenBits.zkasm index e65363cf..fd461b24 100644 --- a/counters/tests/getLenBits.zkasm +++ b/counters/tests/getLenBits.zkasm @@ -18,7 +18,7 @@ operation: %GETLENBITS_CNT_PADDING_PG + %DIVARITH_CNT_PADDING_PG*C - CNT_PADDING_PG :JMPNZ(failedCounters) %GETLENBITS_CNT_POSEIDON_G + %DIVARITH_CNT_POSEIDON_G*C - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/getLenBytes.zkasm b/counters/tests/getLenBytes.zkasm index 2e6caf0f..bd755937 100644 --- a/counters/tests/getLenBytes.zkasm +++ b/counters/tests/getLenBytes.zkasm @@ -20,7 +20,7 @@ operation: %GETLENBYTES_CNT_PADDING_PG + %SHRARITH_CNT_PADDING_PG*C - CNT_PADDING_PG :JMPNZ(failedCounters) %GETLENBYTES_CNT_POSEIDON_G + %SHRARITH_CNT_POSEIDON_G*C - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/isEmptyAccount.zkasm b/counters/tests/isEmptyAccount.zkasm index fbb4999c..60a21155 100644 --- a/counters/tests/isEmptyAccount.zkasm +++ b/counters/tests/isEmptyAccount.zkasm @@ -18,7 +18,7 @@ operation: %ISEMPTYACCOUNT_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %ISEMPTYACCOUNT_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/mulARITH.zkasm b/counters/tests/mulARITH.zkasm index 2152e7a5..bd408ea1 100644 --- a/counters/tests/mulARITH.zkasm +++ b/counters/tests/mulARITH.zkasm @@ -17,7 +17,7 @@ operation: %MULARITH_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) finalizeExecution: -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) readCode: :RETURN diff --git a/counters/tests/offsetUtil.zkasm b/counters/tests/offsetUtil.zkasm index 9cc17812..b4ebf974 100644 --- a/counters/tests/offsetUtil.zkasm +++ b/counters/tests/offsetUtil.zkasm @@ -18,7 +18,7 @@ operation: %OFFSETUTIL_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OFFSETUTIL_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) finalizeExecution: -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) readCode: :RETURN diff --git a/counters/tests/opADDMOD.zkasm b/counters/tests/opADDMOD.zkasm index f270d6be..ba94aaef 100644 --- a/counters/tests/opADDMOD.zkasm +++ b/counters/tests/opADDMOD.zkasm @@ -17,7 +17,7 @@ checkCounters: %OPADDMOD_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPADDMOD_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opAdd.zkasm b/counters/tests/opAdd.zkasm index 1f055b3e..702fc8a5 100644 --- a/counters/tests/opAdd.zkasm +++ b/counters/tests/opAdd.zkasm @@ -16,7 +16,7 @@ checkCounters: %OPADD_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPADD_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opBLOCKHASH.zkasm b/counters/tests/opBLOCKHASH.zkasm index 48379303..f534d4e0 100644 --- a/counters/tests/opBLOCKHASH.zkasm +++ b/counters/tests/opBLOCKHASH.zkasm @@ -17,7 +17,7 @@ checkCounters: %OPBLOCKHASH_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPBLOCKHASH_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opCALL.zkasm b/counters/tests/opCALL.zkasm index 64cca73c..5f85bd63 100644 --- a/counters/tests/opCALL.zkasm +++ b/counters/tests/opCALL.zkasm @@ -29,7 +29,7 @@ checkCounters: %OPCALL_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPCALL_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opCALLCODE.zkasm b/counters/tests/opCALLCODE.zkasm index d6ba3110..8e352a49 100644 --- a/counters/tests/opCALLCODE.zkasm +++ b/counters/tests/opCALLCODE.zkasm @@ -29,7 +29,7 @@ checkCounters: %OPCALLCODE_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPCALLCODE_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opCALLDATACOPY.zkasm b/counters/tests/opCALLDATACOPY.zkasm index 8c4a8937..f7a287f8 100644 --- a/counters/tests/opCALLDATACOPY.zkasm +++ b/counters/tests/opCALLDATACOPY.zkasm @@ -17,7 +17,7 @@ checkCounters: %OPCALLDATACOPY_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPCALLDATACOPY_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opCALLDATALOAD.zkasm b/counters/tests/opCALLDATALOAD.zkasm index 2cf05441..3e0be014 100644 --- a/counters/tests/opCALLDATALOAD.zkasm +++ b/counters/tests/opCALLDATALOAD.zkasm @@ -16,7 +16,7 @@ checkCounters: %OPCALLDATALOAD_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPCALLDATALOAD_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opCODECOPY.zkasm b/counters/tests/opCODECOPY.zkasm index a8cf363b..f121dd1a 100644 --- a/counters/tests/opCODECOPY.zkasm +++ b/counters/tests/opCODECOPY.zkasm @@ -17,7 +17,7 @@ checkCounters: %OPCODECOPY_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPCODECOPY_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opCREATE.zkasm b/counters/tests/opCREATE.zkasm index b6d01b52..7fe3de3c 100644 --- a/counters/tests/opCREATE.zkasm +++ b/counters/tests/opCREATE.zkasm @@ -23,7 +23,7 @@ checkCounters: %OPCREATE_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPCREATE_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opCREATE2.zkasm b/counters/tests/opCREATE2.zkasm index d36934c6..84883453 100644 --- a/counters/tests/opCREATE2.zkasm +++ b/counters/tests/opCREATE2.zkasm @@ -23,7 +23,7 @@ checkCounters: %OPCREATE2_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPCREATE2_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opDELEGATECALL.zkasm b/counters/tests/opDELEGATECALL.zkasm index 1d7c3980..fcdbccbb 100644 --- a/counters/tests/opDELEGATECALL.zkasm +++ b/counters/tests/opDELEGATECALL.zkasm @@ -23,7 +23,7 @@ checkCounters: %OPDELEGATECALL_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPDELEGATECALL_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opDIV.zkasm b/counters/tests/opDIV.zkasm index e3a07a9e..76105dc8 100644 --- a/counters/tests/opDIV.zkasm +++ b/counters/tests/opDIV.zkasm @@ -16,7 +16,7 @@ checkCounters: %OPDIV_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPDIV_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opEXP.zkasm b/counters/tests/opEXP.zkasm index a2188947..98ab4143 100644 --- a/counters/tests/opEXP.zkasm +++ b/counters/tests/opEXP.zkasm @@ -18,7 +18,7 @@ checkCounters: %OPEXP_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPEXP_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opEXTCODECOPY.zkasm b/counters/tests/opEXTCODECOPY.zkasm index 17d4a72b..bd3d02ce 100644 --- a/counters/tests/opEXTCODECOPY.zkasm +++ b/counters/tests/opEXTCODECOPY.zkasm @@ -18,7 +18,7 @@ checkCounters: %OPEXTCODECOPY_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPEXTCODECOPY_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opMOD.zkasm b/counters/tests/opMOD.zkasm index 834ef195..fd67813b 100644 --- a/counters/tests/opMOD.zkasm +++ b/counters/tests/opMOD.zkasm @@ -16,7 +16,7 @@ checkCounters: %OPMOD_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPMOD_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opMUL.zkasm b/counters/tests/opMUL.zkasm index 6352c475..dad768d9 100644 --- a/counters/tests/opMUL.zkasm +++ b/counters/tests/opMUL.zkasm @@ -16,7 +16,7 @@ checkCounters: %OPMUL_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPMUL_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opMULMOD.zkasm b/counters/tests/opMULMOD.zkasm index fd87e66d..4363188d 100644 --- a/counters/tests/opMULMOD.zkasm +++ b/counters/tests/opMULMOD.zkasm @@ -17,7 +17,7 @@ checkCounters: %OPMULMOD_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPMULMOD_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opRETURN.zkasm b/counters/tests/opRETURN.zkasm index 820e6526..e35ca84d 100644 --- a/counters/tests/opRETURN.zkasm +++ b/counters/tests/opRETURN.zkasm @@ -20,7 +20,7 @@ checkCounters: %OPRETURN_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPRETURN_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opRETURNDATACOPY.zkasm b/counters/tests/opRETURNDATACOPY.zkasm index 7905c102..3be3e153 100644 --- a/counters/tests/opRETURNDATACOPY.zkasm +++ b/counters/tests/opRETURNDATACOPY.zkasm @@ -18,7 +18,7 @@ checkCounters: 1000 - STEP:JMPN(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opREVERT.zkasm b/counters/tests/opREVERT.zkasm index c8f387a7..9897405e 100644 --- a/counters/tests/opREVERT.zkasm +++ b/counters/tests/opREVERT.zkasm @@ -20,7 +20,7 @@ checkCounters: %OPREVERT_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPREVERT_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opSDIV.zkasm b/counters/tests/opSDIV.zkasm index e269b08f..c3be019f 100644 --- a/counters/tests/opSDIV.zkasm +++ b/counters/tests/opSDIV.zkasm @@ -17,7 +17,7 @@ checkCounters: %OPSDIV_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPSDIV_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opSHA3.zkasm b/counters/tests/opSHA3.zkasm index 741b452e..82719ca0 100644 --- a/counters/tests/opSHA3.zkasm +++ b/counters/tests/opSHA3.zkasm @@ -17,7 +17,7 @@ checkCounters: %OPSHA3_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPSHA3_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opSIGNEXTEND.zkasm b/counters/tests/opSIGNEXTEND.zkasm index 8622f698..5933e705 100644 --- a/counters/tests/opSIGNEXTEND.zkasm +++ b/counters/tests/opSIGNEXTEND.zkasm @@ -16,7 +16,7 @@ checkCounters: %OPSIGNEXTEND_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPSIGNEXTEND_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opSMOD.zkasm b/counters/tests/opSMOD.zkasm index 8f537785..7f3623df 100644 --- a/counters/tests/opSMOD.zkasm +++ b/counters/tests/opSMOD.zkasm @@ -17,7 +17,7 @@ checkCounters: %OPSMOD_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPSMOD_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opSTATICCALL.zkasm b/counters/tests/opSTATICCALL.zkasm index 49922d5a..35d1089e 100644 --- a/counters/tests/opSTATICCALL.zkasm +++ b/counters/tests/opSTATICCALL.zkasm @@ -23,7 +23,7 @@ checkCounters: %OPSTATICCALL_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPSTATICCALL_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/opSUB.zkasm b/counters/tests/opSUB.zkasm index 878c7d1b..bcfcfab3 100644 --- a/counters/tests/opSUB.zkasm +++ b/counters/tests/opSUB.zkasm @@ -16,7 +16,7 @@ checkCounters: %OPSUB_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %OPSUB_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/counters/tests/saveMem.zkasm b/counters/tests/saveMem.zkasm index 9f52f3c4..297643f1 100644 --- a/counters/tests/saveMem.zkasm +++ b/counters/tests/saveMem.zkasm @@ -19,7 +19,7 @@ operation: %SAVEMEM_CNT_PADDING_PG - CNT_PADDING_PG :JMPNZ(failedCounters) %SAVEMEM_CNT_POSEIDON_G - CNT_POSEIDON_G :JMPNZ(failedCounters) -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) readCode: diff --git a/package.json b/package.json index 8eccbd92..c0fb685d 100644 --- a/package.json +++ b/package.json @@ -33,11 +33,11 @@ "url": "https://github.com/0xPolygonHermez/zkevm-rom.git" }, "dependencies": { - "@0xpolygonhermez/zkasmcom": "https://github.com/0xPolygonHermez/zkasmcom.git#9ca44615518218f660dd8037676d2e3eee988038", + "@0xpolygonhermez/zkasmcom": "https://github.com/0xPolygonHermez/zkasmcom.git#fix/non-maxmem-reg", "yargs": "^17.5.1" }, "devDependencies": { - "@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#188654030742c3d09bac111c467869f08051a16b", + "@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#fix/non-maxmem-reg", "@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/error-rlp", "chai": "^4.3.6", "chalk": "^3.0.0", diff --git a/test/bitwise.zkasm b/test/bitwise.zkasm index e9a16a9b..bb9cf106 100644 --- a/test/bitwise.zkasm +++ b/test/bitwise.zkasm @@ -67,7 +67,7 @@ start: ${bitwise_not(B)} :ASSERT - 0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 + 0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) INCLUDE "../main/end.zkasm" \ No newline at end of file diff --git a/test/comp.zkasm b/test/comp.zkasm index 01e6042f..f09b6eeb 100644 --- a/test/comp.zkasm +++ b/test/comp.zkasm @@ -65,7 +65,7 @@ start: 0 => A ${comp_eq(B, C)} :ASSERT - 0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 + 0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) INCLUDE "../main/end.zkasm" \ No newline at end of file diff --git a/test/ecrecover.zkasm b/test/ecrecover.zkasm index 354cdf51..a16c980b 100644 --- a/test/ecrecover.zkasm +++ b/test/ecrecover.zkasm @@ -423,7 +423,7 @@ repeat_ecrecover_test: INCLUDE "../main/ecrecover/ecrecover.zkasm" end: - 0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR, RCX + 0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR, RCX finalizeExecution: finalWait: diff --git a/test/rotate.zkasm b/test/rotate.zkasm index bacdb7e6..9ec7ca49 100644 --- a/test/rotate.zkasm +++ b/test/rotate.zkasm @@ -114,7 +114,7 @@ endPushFinal: finalPush: -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) INCLUDE "../main/end.zkasm" diff --git a/test/touched-assert.zkasm b/test/touched-assert.zkasm index 0f13479e..bcfe29ce 100644 --- a/test/touched-assert.zkasm +++ b/test/touched-assert.zkasm @@ -54,7 +54,7 @@ start: D => A 0 :ASSERT - 0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 + 0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 finalizeExecution: :JMP(finalWait) diff --git a/test/utils-expAD.zkasm b/test/utils-expAD.zkasm index cfa8dc27..e0cf9052 100644 --- a/test/utils-expAD.zkasm +++ b/test/utils-expAD.zkasm @@ -42,7 +42,7 @@ start: 0xf2eda75a1e9624437a4f18c1316372866f14b6bf3f7ff7441996f65b747a0001n => A $ :MLOAD(test),ASSERT -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) INCLUDE "../main/main.zkasm" \ No newline at end of file diff --git a/test/utils-getLenBytes.zkasm b/test/utils-getLenBytes.zkasm index 56642394..8d8089f6 100644 --- a/test/utils-getLenBytes.zkasm +++ b/test/utils-getLenBytes.zkasm @@ -30,7 +30,7 @@ start: 6 => A $ :MLOAD(test),ASSERT -0 => A,B,C,D,E,CTX, SP, PC, GAS, MAXMEM, SR, HASHPOS, RR ; Set all registers to 0 +0 => A,B,C,D,E,CTX, SP, PC, GAS, SR, HASHPOS, RR ; Set all registers to 0 :JMP(finalWait) INCLUDE "../main/main.zkasm" \ No newline at end of file From c390711e1f52e3fb0c2f05d3e31c76e63e1fd761 Mon Sep 17 00:00:00 2001 From: krlosMata Date: Fri, 17 Feb 2023 09:15:55 +0100 Subject: [PATCH 4/5] add onUpdateStorage in SLOAD/SSTORE oopcodes --- main/opcodes/storage-memory.zkasm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/opcodes/storage-memory.zkasm b/main/opcodes/storage-memory.zkasm index dd74ceaf..245bf4a2 100644 --- a/main/opcodes/storage-memory.zkasm +++ b/main/opcodes/storage-memory.zkasm @@ -160,6 +160,7 @@ opSLOAD: $ => A :MLOAD(storageAddr) ; set key for smt storage query %SMT_KEY_SC_STORAGE => B + $${eventLog(onUpdateStorage)} $ => E :SLOAD ; set key(C) as warmed storage for address(A) E :MSTORE(SP++), CALL(isColdSlot); [value(E) => SP] @@ -305,4 +306,5 @@ opSSTOREsr: ; set key for smt storage query %SMT_KEY_SC_STORAGE => B $ => C :MLOAD(tmpVarCsstore); key => C + $${eventLog(onUpdateStorage)} $ => SR :SSTORE, JMP(readCode) From 9735552de6c4ad88cfc40fd972ed3bb188906152 Mon Sep 17 00:00:00 2001 From: krlosMata Date: Mon, 20 Feb 2023 11:37:42 +0100 Subject: [PATCH 5/5] update package versions --- main/opcodes/storage-memory.zkasm | 4 ++-- package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main/opcodes/storage-memory.zkasm b/main/opcodes/storage-memory.zkasm index 245bf4a2..49a7cf80 100644 --- a/main/opcodes/storage-memory.zkasm +++ b/main/opcodes/storage-memory.zkasm @@ -160,8 +160,8 @@ opSLOAD: $ => A :MLOAD(storageAddr) ; set key for smt storage query %SMT_KEY_SC_STORAGE => B - $${eventLog(onUpdateStorage)} $ => E :SLOAD + $${eventLog(onUpdateStorage(C, E))} ; set key(C) as warmed storage for address(A) E :MSTORE(SP++), CALL(isColdSlot); [value(E) => SP] ; check out-of-gas @@ -306,5 +306,5 @@ opSSTOREsr: ; set key for smt storage query %SMT_KEY_SC_STORAGE => B $ => C :MLOAD(tmpVarCsstore); key => C - $${eventLog(onUpdateStorage)} + $${eventLog(onUpdateStorage(C, D))} $ => SR :SSTORE, JMP(readCode) diff --git a/package.json b/package.json index c0fb685d..e1a0af5a 100644 --- a/package.json +++ b/package.json @@ -33,12 +33,12 @@ "url": "https://github.com/0xPolygonHermez/zkevm-rom.git" }, "dependencies": { - "@0xpolygonhermez/zkasmcom": "https://github.com/0xPolygonHermez/zkasmcom.git#fix/non-maxmem-reg", + "@0xpolygonhermez/zkasmcom": "https://github.com/0xPolygonHermez/zkasmcom.git#v0.7.0.0-rc.8-fork.1", "yargs": "^17.5.1" }, "devDependencies": { - "@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#fix/non-maxmem-reg", - "@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/error-rlp", + "@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#864399e9e78ac6a24601c0e620909e1be02110aa", + "@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#v0.7.0.0-rc.2", "chai": "^4.3.6", "chalk": "^3.0.0", "eslint": "^8.25.0",