Skip to content

Commit

Permalink
optimize check counter steps
Browse files Browse the repository at this point in the history
  • Loading branch information
krlosMata committed Nov 28, 2022
1 parent b28b62a commit 3e33af1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion main/process-tx.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,11 @@ callContract:
E :MSTORE(contractHashId)
E+1 :MSTORE(nextHashPId)

; check steps used by checkHashBytecodeLoop
; compute steps that will be consumed by 'checkHashBytecodeLoop'
%MAX_CNT_STEPS - STEP - 2 * B :JMPN(outOfCountersStep)

checkHashBytecodeLoop:
%MAX_CNT_STEPS - STEP - 10 :JMPN(outOfCountersStep)
B - 1 - HASHPOS :JMPN(checkHashBytecodeEnd) ; finish reading bytecode
${getBytecode(A, HASHPOS, 1)} :HASHP(E) ; hash contract bytecode
:JMP(checkHashBytecodeLoop)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"yargs": "^17.5.1"
},
"devDependencies": {
"@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#a99e77b070946c67c0ebdd296d1b5433a471df11",
"@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/benchmark",
"@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#cedc278e4fbc93b84e8ea4008d9fa4ab590ce08f",
"@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#develop",
"chai": "^4.3.6",
"chalk": "^3.0.0",
"eslint": "^8.25.0",
Expand Down

0 comments on commit 3e33af1

Please sign in to comment.