From 2dc24229b5240b1d885018368c8b7a5b6c121149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20B=C3=A9gassat?= Date: Sun, 30 Jun 2024 14:31:25 +0200 Subject: [PATCH 1/4] updated limits Unclear at the moment: the previous limits were often shy of clean powers of 2. Question: was this deliberate and related to spillings ? If so we may want to reduce all limits by the relevant spilling (or e.g. 16 to simplify things) --- .../src/test/resources/moduleLimits.toml | 114 ++++++++++-------- 1 file changed, 63 insertions(+), 51 deletions(-) diff --git a/acceptance-tests/src/test/resources/moduleLimits.toml b/acceptance-tests/src/test/resources/moduleLimits.toml index 8ce66c1a..e796e09f 100644 --- a/acceptance-tests/src/test/resources/moduleLimits.toml +++ b/acceptance-tests/src/test/resources/moduleLimits.toml @@ -9,63 +9,75 @@ # # 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 \ No newline at end of file +PRECOMPILE_ECRECOVER_EFFECTIVE_CALL = 128 +PRECOMPILE_SHA2_BLOCKS = 671 +PRECOMPILE_RIPEMD_BLOCKS = 671 +PRECOMPILE_MODEXP_EFFECTIVE_CALL = 4 +PRECOMPILE_ECADD = 16384 +PRECOMPILE_ECMUL = 32 +PRECOMPILE_ECPAIRING = 100 # should be 16 #another limit is missing, is it ECPAIRING WEIGHTED? +PRECOMPILE_ECPAIRING_EFFECTIVE_CALL = 16 +PRECOMPILE_ECPAIRING_MILLER_LOOP = 64 +PRECOMPILE_BLAKE = 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_CALL = 1000000 +# * PRECOMPILE_RIPEMD_EFFECTIVE_CALL = 1000000 +# (the values are nonsensical); +# as per Alex they are not required by the prover; \ No newline at end of file From 20bef758f32964efb2e08aca1ccae752baa319d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20B=C3=A9gassat?= <38285177+OlivierBBB@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:58:39 +0200 Subject: [PATCH 2/4] Update moduleLimits.toml --- .../src/test/resources/moduleLimits.toml | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/acceptance-tests/src/test/resources/moduleLimits.toml b/acceptance-tests/src/test/resources/moduleLimits.toml index e796e09f..d6d4509b 100644 --- a/acceptance-tests/src/test/resources/moduleLimits.toml +++ b/acceptance-tests/src/test/resources/moduleLimits.toml @@ -63,21 +63,20 @@ 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 = 128 -PRECOMPILE_SHA2_BLOCKS = 671 -PRECOMPILE_RIPEMD_BLOCKS = 671 -PRECOMPILE_MODEXP_EFFECTIVE_CALL = 4 -PRECOMPILE_ECADD = 16384 -PRECOMPILE_ECMUL = 32 -PRECOMPILE_ECPAIRING = 100 # should be 16 #another limit is missing, is it ECPAIRING WEIGHTED? -PRECOMPILE_ECPAIRING_EFFECTIVE_CALL = 16 -PRECOMPILE_ECPAIRING_MILLER_LOOP = 64 -PRECOMPILE_BLAKE = 600 -PRECOMPILE_BLAKE_ROUNDS = 600 # it is possible to call BLAKE2f with r = 0; this is a nontrivial operation ... +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_LOOP = 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_CALL = 1000000 -# * PRECOMPILE_RIPEMD_EFFECTIVE_CALL = 1000000 +# * PRECOMPILE_SHA2_EFFECTIVE_CALLS = 1000000 +# * PRECOMPILE_RIPEMD_EFFECTIVE_CALLS = 1000000 # (the values are nonsensical); -# as per Alex they are not required by the prover; \ No newline at end of file +# as per Alex they are not required by the prover; From a76ad5ccf9d1c6720fbcd20724b729cabfc79d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20B=C3=A9gassat?= <38285177+OlivierBBB@users.noreply.github.com> Date: Mon, 1 Jul 2024 17:30:33 +0200 Subject: [PATCH 3/4] Update moduleLimits.toml --- acceptance-tests/src/test/resources/moduleLimits.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance-tests/src/test/resources/moduleLimits.toml b/acceptance-tests/src/test/resources/moduleLimits.toml index d6d4509b..c98e6100 100644 --- a/acceptance-tests/src/test/resources/moduleLimits.toml +++ b/acceptance-tests/src/test/resources/moduleLimits.toml @@ -70,7 +70,7 @@ PRECOMPILE_MODEXP_EFFECTIVE_CALLS = 4 PRECOMPILE_ECADD_EFFECTIVE_CALLS = 16384 PRECOMPILE_ECMUL_EFFECTIVE_CALLS = 32 PRECOMPILE_ECPAIRING_EFFECTIVE_CALLS = 16 -PRECOMPILE_ECPAIRING_MILLER_LOOP = 64 +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: From 8ba672bdf42614a6d5c7d312840e9e50cbc9e411 Mon Sep 17 00:00:00 2001 From: Tsvetan Dimitrov Date: Mon, 1 Jul 2024 22:04:31 +0300 Subject: [PATCH 4/4] feat: update arithmetizationVersion to 0.1.5-rc4 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0863e57a..d59bdbdc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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/