-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sequencer-3d-pricing-metrics-ade
- Loading branch information
Showing
5 changed files
with
156 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
acceptance-tests/src/test/resources/moduleLimits_sendRawTx.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
|
||
## | ||
# This file specifies prover limit by each EVM module | ||
# WARN: The prover/arithmetization team has the owneship of this. | ||
# Changing this values may compromise the system. | ||
# issue: https://github.com/Consensys/zkevm-monorepo/issues/525 | ||
## | ||
|
||
[traces-limits] | ||
# | ||
# Arithmetization module limits | ||
# | ||
ADD = 70 | ||
BIN = 262144 | ||
BLAKE_MODEXP_DATA = 262144 | ||
BLOCK_DATA = 13 | ||
BLOCK_HASH = 1 | ||
EC_DATA = 4096 | ||
EUC = 16384 # can probably be lower | ||
EXP = 32760 | ||
EXT = 20 | ||
GAS = 262144 | ||
HUB = 174 | ||
MMIO = 1048576 | ||
MMU = 524288 | ||
MOD = 20 | ||
MUL = 20 | ||
MXP = 35 | ||
PHONEY_RLP = 65536 # can probably get lower | ||
ROM = 2402 | ||
ROM_LEX = 20 | ||
SHF = 63 | ||
TX_RLP = 131072 | ||
TRM = 120 | ||
WCP = 149 | ||
LOG_DATA = 20 | ||
LOG_INFO = 20 | ||
RLP_ADDR = 20 | ||
RLP_TXN = 1300 | ||
RLP_TXN_RCPT = 100 | ||
TXN_DATA = 30 | ||
SHAKIRA_DATA = 262144 | ||
STP = 20 | ||
OOB = 262144 | ||
|
||
# | ||
# Block-specific limits | ||
# | ||
BLOCK_KECCAK = 8192 | ||
BLOCK_L1_SIZE = 1000000 | ||
BLOCK_L2_L1_LOGS = 16 | ||
BLOCK_TRANSACTIONS = 200 # max number of tx in an L2 block | ||
|
||
# | ||
# Fixed size, static tables | ||
# | ||
BIN_REFERENCE_TABLE = 262144 # contains 3 * 256^2 + 256 data rows + 1 padding row | ||
SHF_REFERENCE_TABLE = 4096 # contains 9 * 256 data rows + 1 padding row | ||
INSTRUCTION_DECODER = 512 # contains 256 data rows + 1 padding row | ||
|
||
# | ||
# Precompiles limits | ||
# | ||
PRECOMPILE_ECRECOVER_EFFECTIVE_CALLS = 10000 | ||
PRECOMPILE_SHA2_BLOCKS = 10000 | ||
PRECOMPILE_RIPEMD_BLOCKS = 10000 | ||
PRECOMPILE_ECPAIRING_MILLER_LOOPS = 10000 | ||
PRECOMPILE_MODEXP_EFFECTIVE_CALLS = 10000 | ||
PRECOMPILE_ECADD_EFFECTIVE_CALLS = 10000 | ||
PRECOMPILE_ECMUL_EFFECTIVE_CALLS = 10000 | ||
PRECOMPILE_ECPAIRING_FINAL_EXPONENTIATIONS = 10000 | ||
PRECOMPILE_ECPAIRING_G2_MEMBERSHIP_CALLS = 10000 | ||
PRECOMPILE_ECPAIRING_MILLER_LOOPS = 10000 | ||
PRECOMPILE_BLAKE_EFFECTIVE_CALLS = 10000 | ||
PRECOMPILE_BLAKE_ROUNDS = 512 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright Consensys Software Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
pragma solidity >=0.7.0 <0.9.0; | ||
|
||
contract RevertExample { | ||
uint256 public value; | ||
|
||
function setValue(uint256 _newValue) public { | ||
require(_newValue != 0, "Value cannot be zero"); | ||
value = _newValue; | ||
} | ||
|
||
function forceRevert() public pure { | ||
revert("This function always reverts"); | ||
} | ||
|
||
function conditionalRevert(uint256 _input) public pure returns (uint256) { | ||
if (_input < 10) { | ||
revert("Input must be 10 or greater"); | ||
} | ||
return _input * 2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters