Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated limits #35

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 62 additions & 51 deletions acceptance-tests/src/test/resources/moduleLimits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,63 +9,74 @@
#
# Arithmetization module limits
#
ADD = 7000
ADD = 524288
BIN = 262144
BIN_RT = 262144
EC_DATA = 4096
EUC = 16384 # can probably be lower
EXP = 32760
EXT = 32768
HUB = 2097152
INSTRUCTION_DECODER = 512 # Ugly hack, TODO: @franklin
MMIO = 1048576
MMU = 524288
MMU_ID = 256
MOD = 131072
MUL = 65536
MXP = 524288
PHONEY_RLP = 65536 # can probably get lower
PUB_HASH = 32768
PUB_HASH_INFO = 8192
PUB_LOG = 16384
PUB_LOG_INFO = 16384
RLP = 128
ROM = 1048576
ROM_LEX = 1048576
SHF = 65536
SHF_RT = 262144
TX_RLP = 131072
TRM = 131072
BLOCK_DATA = 16384
BLOCK_HASH = 1024
EC_DATA = 512
EUC = 262144
EXP = 65536
EXT = 8192
HUB = 65536
LOG_DATA = 65536
LOG_INFO = 2097152
MMIO = 65536
MMU = 4096
MOD = 4194304
MUL = 2097152
MXP = 131072
OOB = 65536
PUB_LOG = 524288
PUB_LOG_INFO = 262144
RLP_ADDR = 4096
RLP_TXN = 131072
RLP_TXRCPT = 32768
ROM = 8388608
ROM_LEX = 1024
SHF = 32768
STP = 65536
TRM = 32768
TXN_DATA = 8192
TX_RLP = 8192
WCP = 262144
LOG_DATA = 262144
LOG_INFO = 262144
RLP_ADDR = 262144
RLP_TXN = 262144
RLP_TXRCPT = 262144
TXN_DATA = 262144
STP = 262144
OOB = 262144

# NOTE: in the original file the limits were just shy of powers of 2, e.g. ADD = 524286
# Question: this seemed deliberate; it could be related to spillings; if so we may want
# to reduce all limits above by the corresponding spillings value (or 16 for simplicity)

#
# Block-specific limits
# Fixed size, static tables
#
BLOCK_TX = 200 # max number of tx in an L2 block
BLOCK_L2L1LOGS = 16
BLOCK_KECCAK = 8192
BLOCK_L1SIZE = 1000000
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

BLOCKDATA = 13
BLOCKHASH = 1
#
# 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

#
# Precompiles limits
# compare with https://github.com/Consensys/linea-arithmetization/issues/257
#
PRECOMPILE_ECRECOVER_EFFECTIVE_CALL = 10000
PRECOMPILE_SHA2_BLOCKS = 10000
PRECOMPILE_RIPEMD_BLOCKS = 10000
PRECOMPILE_IDENTITY = 10000
PRECOMPILE_MODEXP_EFFECTIVE_CALL = 10000
PRECOMPILE_ECADD_EFFECTIVE_CALL = 10000
PRECOMPILE_ECMUL_EFFECTIVE_CALL = 10000
PRECOMPILE_ECPAIRING_EFFECTIVE_CALL = 10000
PRECOMPILE_ECPAIRING_MILLER_LOOP = 10000
PRECOMPILE_BLAKE2F_ROUNDS = 512
PRECOMPILE_ECRECOVER_EFFECTIVE_CALLS = 128
PRECOMPILE_SHA2_BLOCKS = 671
PRECOMPILE_RIPEMD_BLOCKS = 671
PRECOMPILE_MODEXP_EFFECTIVE_CALLS = 4
PRECOMPILE_ECADD_EFFECTIVE_CALLS = 16384
PRECOMPILE_ECMUL_EFFECTIVE_CALLS = 32
PRECOMPILE_ECPAIRING_EFFECTIVE_CALLS = 16
PRECOMPILE_ECPAIRING_MILLER_LOOPS = 64
PRECOMPILE_BLAKE_EFFECTIVE_CALLS = 600
PRECOMPILE_BLAKE_ROUNDS = 600 # it is possible to call BLAKE2f with r = 0; this is a nontrivial operation ...
# # Notes:
# - there are no IDENTITY related limits
# - we used to have the following limits
# * PRECOMPILE_SHA2_EFFECTIVE_CALLS = 1000000
# * PRECOMPILE_RIPEMD_EFFECTIVE_CALLS = 1000000
# (the values are nonsensical);
# as per Alex they are not required by the prover;
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
releaseVersion=0.1.5-SNAPSHOT
besuVersion=24.6-develop-752aeff
arithmetizationVersion=0.1.5-rc3
arithmetizationVersion=0.1.5-rc4
besuArtifactGroup=io.consensys.linea-besu
distributionIdentifier=linea-sequencer
distributionBaseUrl=https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/
Expand Down
Loading