From 7bcbaab24ff2d1ad0e8e51613a390047e167763a Mon Sep 17 00:00:00 2001 From: Francois Bojarski Date: Tue, 19 Dec 2023 13:00:16 +0100 Subject: [PATCH 1/4] style: update name of prec limits to avoid confusion with old geth name --- .../linea/zktracer/module/hub/Hub.java | 38 +++++++++---------- .../linea/zktracer/module/limits/Keccak.java | 4 +- .../{Blake2f.java => Blake2fNbRounds.java} | 4 +- .../{EcAdd.java => EcAddNbEffectiveCall.java} | 4 +- .../{EcMul.java => EcMulNbEffectiveCall.java} | 4 +- ...java => EcPairingCallNbEffectiveCall.java} | 4 +- ...edCall.java => EcPairingNbMillerLoop.java} | 8 ++-- ...ver.java => EcRecoverNbEffectiveCall.java} | 4 +- ...Modexp.java => ModexpNbEffectiveCall.java} | 4 +- .../{Rip160.java => Rip160NbBlocks.java} | 4 +- .../{Sha256.java => Sha256NbBlocks.java} | 4 +- 11 files changed, 41 insertions(+), 41 deletions(-) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{Blake2f.java => Blake2fNbRounds.java} (97%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcAdd.java => EcAddNbEffectiveCall.java} (95%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcMul.java => EcMulNbEffectiveCall.java} (95%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcPairingCall.java => EcPairingCallNbEffectiveCall.java} (96%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcPairingWeightedCall.java => EcPairingNbMillerLoop.java} (86%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcRecover.java => EcRecoverNbEffectiveCall.java} (97%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{Modexp.java => ModexpNbEffectiveCall.java} (98%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{Rip160.java => Rip160NbBlocks.java} (97%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{Sha256.java => Sha256NbBlocks.java} (97%) diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java index 89c515d05d..1864bfd32b 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java @@ -43,15 +43,15 @@ import net.consensys.linea.zktracer.module.limits.Keccak; import net.consensys.linea.zktracer.module.limits.L2Block; import net.consensys.linea.zktracer.module.limits.L2L1Logs; -import net.consensys.linea.zktracer.module.limits.precompiles.Blake2f; -import net.consensys.linea.zktracer.module.limits.precompiles.EcAdd; -import net.consensys.linea.zktracer.module.limits.precompiles.EcMul; -import net.consensys.linea.zktracer.module.limits.precompiles.EcPairingCall; -import net.consensys.linea.zktracer.module.limits.precompiles.EcPairingWeightedCall; -import net.consensys.linea.zktracer.module.limits.precompiles.EcRecover; -import net.consensys.linea.zktracer.module.limits.precompiles.Modexp; -import net.consensys.linea.zktracer.module.limits.precompiles.Rip160; -import net.consensys.linea.zktracer.module.limits.precompiles.Sha256; +import net.consensys.linea.zktracer.module.limits.precompiles.Blake2fNbRounds; +import net.consensys.linea.zktracer.module.limits.precompiles.EcAddNbEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.EcMulNbEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.EcPairingCallNbEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.EcPairingNbMillerLoop; +import net.consensys.linea.zktracer.module.limits.precompiles.EcRecoverNbEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.ModexpNbEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.Rip160NbBlocks; +import net.consensys.linea.zktracer.module.limits.precompiles.Sha256NbBlocks; import net.consensys.linea.zktracer.module.logData.LogData; import net.consensys.linea.zktracer.module.logInfo.LogInfo; import net.consensys.linea.zktracer.module.mmu.Mmu; @@ -181,7 +181,7 @@ public void addTraceSection(TraceSection section) { private final RomLex romLex; private final TxnData txnData; private final Trm trm = new Trm(); - private final Modexp modexp; + private final ModexpNbEffectiveCall modexp; private final Stp stp = new Stp(this, wcp, mod); private final L2Block l2Block = new L2Block(); @@ -199,20 +199,20 @@ public Hub() { this.txnData = new TxnData(this, this.romLex, this.wcp); this.ecData = new EcData(this, this.wcp, this.ext); - final EcRecover ecRec = new EcRecover(this); - this.modexp = new Modexp(this); - final EcPairingCall ecpairingCall = new EcPairingCall(this); + final EcRecoverNbEffectiveCall ecRec = new EcRecoverNbEffectiveCall(this); + this.modexp = new ModexpNbEffectiveCall(this); + final EcPairingCallNbEffectiveCall ecpairingCall = new EcPairingCallNbEffectiveCall(this); this.precompileLimitModules = List.of( - new Sha256(this), + new Sha256NbBlocks(this), ecRec, - new Rip160(this), + new Rip160NbBlocks(this), this.modexp, - new EcAdd(this), - new EcMul(this), + new EcAddNbEffectiveCall(this), + new EcMulNbEffectiveCall(this), ecpairingCall, - new EcPairingWeightedCall(ecpairingCall), - new Blake2f(this), + new EcPairingNbMillerLoop(ecpairingCall), + new Blake2fNbRounds(this), // Block level limits this.l2Block, new Keccak(this, ecRec, this.l2Block), diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/Keccak.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/Keccak.java index f2577b04b3..a178d59e97 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/Keccak.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/Keccak.java @@ -27,7 +27,7 @@ import net.consensys.linea.zktracer.ColumnHeader; import net.consensys.linea.zktracer.module.Module; import net.consensys.linea.zktracer.module.hub.Hub; -import net.consensys.linea.zktracer.module.limits.precompiles.EcRecover; +import net.consensys.linea.zktracer.module.limits.precompiles.EcRecoverNbEffectiveCall; import net.consensys.linea.zktracer.opcode.OpCode; import org.hyperledger.besu.evm.frame.MessageFrame; import org.hyperledger.besu.evm.internal.Words; @@ -41,7 +41,7 @@ public class Keccak implements Module { private static final int PUBKEY_BYTES = 64; private final Hub hub; - private final EcRecover ecRec; + private final EcRecoverNbEffectiveCall ecRec; private final L2Block l2Block; private final Deque> deployedCodesizes = new ArrayDeque<>(); diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2f.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fNbRounds.java similarity index 97% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2f.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fNbRounds.java index 5bb5752f7f..8d18007ea9 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2f.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fNbRounds.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class Blake2f implements Module { +public final class Blake2fNbRounds implements Module { final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_BLAKE2F"; + return "PRECOMPILE_BLAKE2F_NB_ROUNDS"; } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAdd.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddNbEffectiveCall.java similarity index 95% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAdd.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddNbEffectiveCall.java index fa9639d230..0d74045d20 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAdd.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddNbEffectiveCall.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class EcAdd implements Module { +public final class EcAddNbEffectiveCall implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_ECADD"; + return "PRECOMPILE_ECADD_NB_EFFECTIVE_CALL"; } private static final int PRECOMPILE_GAS_FEE = 150; // cf EIP-1108 diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMul.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulNbEffectiveCall.java similarity index 95% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMul.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulNbEffectiveCall.java index 6bd48907a5..cba6147fbd 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMul.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulNbEffectiveCall.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class EcMul implements Module { +public final class EcMulNbEffectiveCall implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_ECMUL"; + return "PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL"; } private static final int PRECOMPILE_GAS_FEE = 6000; // cf EIP-1108 diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCall.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallNbEffectiveCall.java similarity index 96% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCall.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallNbEffectiveCall.java index 8d6508edd3..e8c8d0d4db 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCall.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallNbEffectiveCall.java @@ -32,7 +32,7 @@ @Slf4j @RequiredArgsConstructor -public final class EcPairingCall implements Module { +public final class EcPairingCallNbEffectiveCall implements Module { private final Hub hub; @Getter private final Stack counts = new Stack<>(); private static final int PRECOMPILE_BASE_GAS_FEE = 45000; // cf EIP-1108 @@ -41,7 +41,7 @@ public final class EcPairingCall implements Module { @Override public String moduleKey() { - return "PRECOMPILE_ECPAIRING"; + return "PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL"; } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingWeightedCall.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingNbMillerLoop.java similarity index 86% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingWeightedCall.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingNbMillerLoop.java index c5b0fa410d..d0d3851181 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingWeightedCall.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingNbMillerLoop.java @@ -21,16 +21,16 @@ import net.consensys.linea.zktracer.ColumnHeader; import net.consensys.linea.zktracer.module.Module; -public final class EcPairingWeightedCall implements Module { - private final EcPairingCall ecpairingCall; +public final class EcPairingNbMillerLoop implements Module { + private final EcPairingCallNbEffectiveCall ecpairingCall; - public EcPairingWeightedCall(EcPairingCall ecpairingCall) { + public EcPairingNbMillerLoop(EcPairingCallNbEffectiveCall ecpairingCall) { this.ecpairingCall = ecpairingCall; } @Override public String moduleKey() { - return "PRECOMPILE_ECPAIRING_WEIGHTED"; + return "PRECOMPILE_ECPAIRING_NB_MILLER_LOOP"; } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecover.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverNbEffectiveCall.java similarity index 97% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecover.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverNbEffectiveCall.java index 65f82f9ee6..59973c4e8b 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecover.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverNbEffectiveCall.java @@ -33,13 +33,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class EcRecover implements Module { +public final class EcRecoverNbEffectiveCall implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_ECRECOVER"; + return "PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL"; } private static final int ECRECOVER_GAS_FEE = 3000; diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Modexp.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpNbEffectiveCall.java similarity index 98% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Modexp.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpNbEffectiveCall.java index 79c4672252..d11588819f 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Modexp.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpNbEffectiveCall.java @@ -35,7 +35,7 @@ @Slf4j @RequiredArgsConstructor -public class Modexp implements Module { +public class ModexpNbEffectiveCall implements Module { private final Hub hub; private final Stack counts = new Stack<>(); private static final BigInteger PROVER_MAX_INPUT_BIT_SIZE = BigInteger.valueOf(4096); @@ -43,7 +43,7 @@ public class Modexp implements Module { @Override public String moduleKey() { - return "PRECOMPILE_MODEXP"; + return "PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL"; } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160NbBlocks.java similarity index 97% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160NbBlocks.java index 5342198454..c262fde0a3 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160NbBlocks.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class Rip160 implements Module { +public final class Rip160NbBlocks implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_RIPEMD"; + return "PRECOMPILE_RIPEMD_NB_BLOCKS"; } private static final int PRECOMPILE_BASE_GAS_FEE = 600; diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256NbBlocks.java similarity index 97% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256NbBlocks.java index f945dad4dc..99e0be73f1 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256NbBlocks.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class Sha256 implements Module { +public final class Sha256NbBlocks implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_SHA2"; + return "PRECOMPILE_SHA2_NB_BLOCKS"; } private static final int PRECOMPILE_BASE_GAS_FEE = 60; From 946a65603378795b4f81ed70f61728f1e20d522d Mon Sep 17 00:00:00 2001 From: Francois Bojarski Date: Tue, 19 Dec 2023 13:20:53 +0100 Subject: [PATCH 2/4] style: update module name --- .../src/main/resources/spillings.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arithmetization/src/main/resources/spillings.toml b/arithmetization/src/main/resources/spillings.toml index 211b78fcbf..59c181eed5 100644 --- a/arithmetization/src/main/resources/spillings.toml +++ b/arithmetization/src/main/resources/spillings.toml @@ -24,16 +24,16 @@ STP = 4 TRM = 7 WCP = 16 -PRECOMPILE_ECRECOVER = 0 -PRECOMPILE_SHA2 = 0 -PRECOMPILE_RIPEMD = 0 +PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL = 0 +PRECOMPILE_SHA2_NB_BLOCKS = 0 +PRECOMPILE_RIPEMD_NB_BLOCKS = 0 PRECOMPILE_IDENTITY = 0 -PRECOMPILE_MODEXP = 0 -PRECOMPILE_ECADD = 0 -PRECOMPILE_ECMUL = 0 -PRECOMPILE_ECPAIRING = 0 -PRECOMPILE_ECPAIRING_WEIGHTED = 0 -PRECOMPILE_BLAKE2F = 0 +PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL = 0 +PRECOMPILE_ECADD_NB_EFFECTIVE_CALL = 0 +PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL = 0 +PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL = 0 +PRECOMPILE_ECPAIRING_NB_MILLER_LOOP = 0 +PRECOMPILE_BLAKE2F_NB_ROUNDS = 0 BLOCK_TX = 0 BLOCK_L2L1LOGS = 0 From ecab749808e6b446c666a157324f5fe0daf414b3 Mon Sep 17 00:00:00 2001 From: Francois Bojarski Date: Tue, 19 Dec 2023 13:24:53 +0100 Subject: [PATCH 3/4] style: update name in .toml files --- .../src/test/resources/moduleLimits.toml | 18 +++++++++--------- .../src/test/resources/noModuleLimits.toml | 18 +++++++++--------- .../test/resources/txOverflowModuleLimits.toml | 18 +++++++++--------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/acceptance-tests/src/test/resources/moduleLimits.toml b/acceptance-tests/src/test/resources/moduleLimits.toml index fdc9f434e7..391a57dec2 100644 --- a/acceptance-tests/src/test/resources/moduleLimits.toml +++ b/acceptance-tests/src/test/resources/moduleLimits.toml @@ -54,13 +54,13 @@ BLOCK_L1SIZE = 1000000 # # Precompiles limits # -PRECOMPILE_ECRECOVER = 10000 -PRECOMPILE_SHA2 = 10000 -PRECOMPILE_RIPEMD = 10000 +PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_SHA2_NB_BLOCKS = 10000 +PRECOMPILE_RIPEMD_NB_BLOCKS = 10000 PRECOMPILE_IDENTITY = 10000 -PRECOMPILE_MODEXP = 10000 -PRECOMPILE_ECADD = 10000 -PRECOMPILE_ECMUL = 10000 -PRECOMPILE_ECPAIRING = 10000 -PRECOMPILE_ECPAIRING_WEIGHTED = 10000 -PRECOMPILE_BLAKE2F = 512 \ No newline at end of file +PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECADD_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECPAIRING_NB_MILLER_LOOP = 10000 +PRECOMPILE_BLAKE2F_NB_ROUNDS = 512 \ No newline at end of file diff --git a/acceptance-tests/src/test/resources/noModuleLimits.toml b/acceptance-tests/src/test/resources/noModuleLimits.toml index 62eb00fb63..3969a1a591 100644 --- a/acceptance-tests/src/test/resources/noModuleLimits.toml +++ b/acceptance-tests/src/test/resources/noModuleLimits.toml @@ -54,13 +54,13 @@ BLOCK_L1SIZE = 1000000 # # Precompiles limits # -PRECOMPILE_ECRECOVER = 10000 -PRECOMPILE_SHA2 = 10000 -PRECOMPILE_RIPEMD = 10000 +PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_SHA2_NB_BLOCKS = 10000 +PRECOMPILE_RIPEMD_NB_BLOCKS = 10000 PRECOMPILE_IDENTITY = 10000 -PRECOMPILE_MODEXP = 10000 -PRECOMPILE_ECADD = 10000 -PRECOMPILE_ECMUL = 10000 -PRECOMPILE_ECPAIRING = 10000 -PRECOMPILE_ECPAIRING_WEIGHTED = 10000 -PRECOMPILE_BLAKE2F = 512 \ No newline at end of file +PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECADD_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECPAIRING_NB_MILLER_LOOP = 10000 +PRECOMPILE_BLAKE2F_NB_ROUNDS = 512 \ No newline at end of file diff --git a/acceptance-tests/src/test/resources/txOverflowModuleLimits.toml b/acceptance-tests/src/test/resources/txOverflowModuleLimits.toml index 3262c330c2..0642a56d8f 100644 --- a/acceptance-tests/src/test/resources/txOverflowModuleLimits.toml +++ b/acceptance-tests/src/test/resources/txOverflowModuleLimits.toml @@ -55,13 +55,13 @@ BLOCK_L1SIZE = 1000000 # # Precompiles limits # -PRECOMPILE_ECRECOVER = 10000 -PRECOMPILE_SHA2 = 10000 -PRECOMPILE_RIPEMD = 10000 +PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_SHA2_NB_BLOCKS = 10000 +PRECOMPILE_RIPEMD_NB_BLOCKS = 10000 PRECOMPILE_IDENTITY = 10000 -PRECOMPILE_MODEXP = 10000 -PRECOMPILE_ECADD = 10000 -PRECOMPILE_ECMUL = 10000 -PRECOMPILE_ECPAIRING = 10000 -PRECOMPILE_ECPAIRING_WEIGHTED = 10000 -PRECOMPILE_BLAKE2F = 512 \ No newline at end of file +PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECADD_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL = 10000 +PRECOMPILE_ECPAIRING_NB_MILLER_LOOP = 10000 +PRECOMPILE_BLAKE2F_NB_ROUNDS = 512 \ No newline at end of file From 28de281ca8bc018d3e5797b23c325bb6456e10d1 Mon Sep 17 00:00:00 2001 From: Francois Bojarski Date: Tue, 19 Dec 2023 13:33:28 +0100 Subject: [PATCH 4/4] style: remove NB --- .../src/test/resources/moduleLimits.toml | 18 ++++----- .../src/test/resources/noModuleLimits.toml | 18 ++++----- .../resources/txOverflowModuleLimits.toml | 18 ++++----- .../linea/zktracer/module/hub/Hub.java | 38 +++++++++---------- .../linea/zktracer/module/limits/Keccak.java | 4 +- ...lake2fNbRounds.java => Blake2fRounds.java} | 4 +- ...ctiveCall.java => EcAddEffectiveCall.java} | 4 +- ...ctiveCall.java => EcMulEffectiveCall.java} | 4 +- ...l.java => EcPairingCallEffectiveCall.java} | 4 +- ...llerLoop.java => EcPairingMillerLoop.java} | 8 ++-- ...eCall.java => EcRecoverEffectiveCall.java} | 4 +- ...tiveCall.java => ModexpEffectiveCall.java} | 4 +- ...{Rip160NbBlocks.java => Rip160Blocks.java} | 4 +- ...{Sha256NbBlocks.java => Sha256Blocks.java} | 4 +- .../src/main/resources/spillings.toml | 18 ++++----- 15 files changed, 77 insertions(+), 77 deletions(-) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{Blake2fNbRounds.java => Blake2fRounds.java} (97%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcAddNbEffectiveCall.java => EcAddEffectiveCall.java} (95%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcMulNbEffectiveCall.java => EcMulEffectiveCall.java} (95%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcPairingCallNbEffectiveCall.java => EcPairingCallEffectiveCall.java} (96%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcPairingNbMillerLoop.java => EcPairingMillerLoop.java} (86%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{EcRecoverNbEffectiveCall.java => EcRecoverEffectiveCall.java} (97%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{ModexpNbEffectiveCall.java => ModexpEffectiveCall.java} (98%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{Rip160NbBlocks.java => Rip160Blocks.java} (97%) rename arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/{Sha256NbBlocks.java => Sha256Blocks.java} (97%) diff --git a/acceptance-tests/src/test/resources/moduleLimits.toml b/acceptance-tests/src/test/resources/moduleLimits.toml index 391a57dec2..c5a6067f51 100644 --- a/acceptance-tests/src/test/resources/moduleLimits.toml +++ b/acceptance-tests/src/test/resources/moduleLimits.toml @@ -54,13 +54,13 @@ BLOCK_L1SIZE = 1000000 # # Precompiles limits # -PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_SHA2_NB_BLOCKS = 10000 -PRECOMPILE_RIPEMD_NB_BLOCKS = 10000 +PRECOMPILE_ECRECOVER_EFFECTIVE_CALL = 10000 +PRECOMPILE_SHA2_BLOCKS = 10000 +PRECOMPILE_RIPEMD_BLOCKS = 10000 PRECOMPILE_IDENTITY = 10000 -PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECADD_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECPAIRING_NB_MILLER_LOOP = 10000 -PRECOMPILE_BLAKE2F_NB_ROUNDS = 512 \ No newline at end of file +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 diff --git a/acceptance-tests/src/test/resources/noModuleLimits.toml b/acceptance-tests/src/test/resources/noModuleLimits.toml index 3969a1a591..aac211dc3b 100644 --- a/acceptance-tests/src/test/resources/noModuleLimits.toml +++ b/acceptance-tests/src/test/resources/noModuleLimits.toml @@ -54,13 +54,13 @@ BLOCK_L1SIZE = 1000000 # # Precompiles limits # -PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_SHA2_NB_BLOCKS = 10000 -PRECOMPILE_RIPEMD_NB_BLOCKS = 10000 +PRECOMPILE_ECRECOVER_EFFECTIVE_CALL = 10000 +PRECOMPILE_SHA2_BLOCKS = 10000 +PRECOMPILE_RIPEMD_BLOCKS = 10000 PRECOMPILE_IDENTITY = 10000 -PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECADD_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECPAIRING_NB_MILLER_LOOP = 10000 -PRECOMPILE_BLAKE2F_NB_ROUNDS = 512 \ No newline at end of file +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 diff --git a/acceptance-tests/src/test/resources/txOverflowModuleLimits.toml b/acceptance-tests/src/test/resources/txOverflowModuleLimits.toml index 0642a56d8f..a2db09056f 100644 --- a/acceptance-tests/src/test/resources/txOverflowModuleLimits.toml +++ b/acceptance-tests/src/test/resources/txOverflowModuleLimits.toml @@ -55,13 +55,13 @@ BLOCK_L1SIZE = 1000000 # # Precompiles limits # -PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_SHA2_NB_BLOCKS = 10000 -PRECOMPILE_RIPEMD_NB_BLOCKS = 10000 +PRECOMPILE_ECRECOVER_EFFECTIVE_CALL = 10000 +PRECOMPILE_SHA2_BLOCKS = 10000 +PRECOMPILE_RIPEMD_BLOCKS = 10000 PRECOMPILE_IDENTITY = 10000 -PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECADD_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL = 10000 -PRECOMPILE_ECPAIRING_NB_MILLER_LOOP = 10000 -PRECOMPILE_BLAKE2F_NB_ROUNDS = 512 \ No newline at end of file +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 diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java index 1864bfd32b..aeec9d35b0 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java @@ -43,15 +43,15 @@ import net.consensys.linea.zktracer.module.limits.Keccak; import net.consensys.linea.zktracer.module.limits.L2Block; import net.consensys.linea.zktracer.module.limits.L2L1Logs; -import net.consensys.linea.zktracer.module.limits.precompiles.Blake2fNbRounds; -import net.consensys.linea.zktracer.module.limits.precompiles.EcAddNbEffectiveCall; -import net.consensys.linea.zktracer.module.limits.precompiles.EcMulNbEffectiveCall; -import net.consensys.linea.zktracer.module.limits.precompiles.EcPairingCallNbEffectiveCall; -import net.consensys.linea.zktracer.module.limits.precompiles.EcPairingNbMillerLoop; -import net.consensys.linea.zktracer.module.limits.precompiles.EcRecoverNbEffectiveCall; -import net.consensys.linea.zktracer.module.limits.precompiles.ModexpNbEffectiveCall; -import net.consensys.linea.zktracer.module.limits.precompiles.Rip160NbBlocks; -import net.consensys.linea.zktracer.module.limits.precompiles.Sha256NbBlocks; +import net.consensys.linea.zktracer.module.limits.precompiles.Blake2fRounds; +import net.consensys.linea.zktracer.module.limits.precompiles.EcAddEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.EcMulEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.EcPairingCallEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.EcPairingMillerLoop; +import net.consensys.linea.zktracer.module.limits.precompiles.EcRecoverEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.ModexpEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.Rip160Blocks; +import net.consensys.linea.zktracer.module.limits.precompiles.Sha256Blocks; import net.consensys.linea.zktracer.module.logData.LogData; import net.consensys.linea.zktracer.module.logInfo.LogInfo; import net.consensys.linea.zktracer.module.mmu.Mmu; @@ -181,7 +181,7 @@ public void addTraceSection(TraceSection section) { private final RomLex romLex; private final TxnData txnData; private final Trm trm = new Trm(); - private final ModexpNbEffectiveCall modexp; + private final ModexpEffectiveCall modexp; private final Stp stp = new Stp(this, wcp, mod); private final L2Block l2Block = new L2Block(); @@ -199,20 +199,20 @@ public Hub() { this.txnData = new TxnData(this, this.romLex, this.wcp); this.ecData = new EcData(this, this.wcp, this.ext); - final EcRecoverNbEffectiveCall ecRec = new EcRecoverNbEffectiveCall(this); - this.modexp = new ModexpNbEffectiveCall(this); - final EcPairingCallNbEffectiveCall ecpairingCall = new EcPairingCallNbEffectiveCall(this); + final EcRecoverEffectiveCall ecRec = new EcRecoverEffectiveCall(this); + this.modexp = new ModexpEffectiveCall(this); + final EcPairingCallEffectiveCall ecpairingCall = new EcPairingCallEffectiveCall(this); this.precompileLimitModules = List.of( - new Sha256NbBlocks(this), + new Sha256Blocks(this), ecRec, - new Rip160NbBlocks(this), + new Rip160Blocks(this), this.modexp, - new EcAddNbEffectiveCall(this), - new EcMulNbEffectiveCall(this), + new EcAddEffectiveCall(this), + new EcMulEffectiveCall(this), ecpairingCall, - new EcPairingNbMillerLoop(ecpairingCall), - new Blake2fNbRounds(this), + new EcPairingMillerLoop(ecpairingCall), + new Blake2fRounds(this), // Block level limits this.l2Block, new Keccak(this, ecRec, this.l2Block), diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/Keccak.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/Keccak.java index a178d59e97..a9d5e405a2 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/Keccak.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/Keccak.java @@ -27,7 +27,7 @@ import net.consensys.linea.zktracer.ColumnHeader; import net.consensys.linea.zktracer.module.Module; import net.consensys.linea.zktracer.module.hub.Hub; -import net.consensys.linea.zktracer.module.limits.precompiles.EcRecoverNbEffectiveCall; +import net.consensys.linea.zktracer.module.limits.precompiles.EcRecoverEffectiveCall; import net.consensys.linea.zktracer.opcode.OpCode; import org.hyperledger.besu.evm.frame.MessageFrame; import org.hyperledger.besu.evm.internal.Words; @@ -41,7 +41,7 @@ public class Keccak implements Module { private static final int PUBKEY_BYTES = 64; private final Hub hub; - private final EcRecoverNbEffectiveCall ecRec; + private final EcRecoverEffectiveCall ecRec; private final L2Block l2Block; private final Deque> deployedCodesizes = new ArrayDeque<>(); diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fNbRounds.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fRounds.java similarity index 97% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fNbRounds.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fRounds.java index 8d18007ea9..035d748713 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fNbRounds.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Blake2fRounds.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class Blake2fNbRounds implements Module { +public final class Blake2fRounds implements Module { final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_BLAKE2F_NB_ROUNDS"; + return "PRECOMPILE_BLAKE2F_ROUNDS"; } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddNbEffectiveCall.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddEffectiveCall.java similarity index 95% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddNbEffectiveCall.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddEffectiveCall.java index 0d74045d20..8ddea82976 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddNbEffectiveCall.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcAddEffectiveCall.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class EcAddNbEffectiveCall implements Module { +public final class EcAddEffectiveCall implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_ECADD_NB_EFFECTIVE_CALL"; + return "PRECOMPILE_ECADD_EFFECTIVE_CALL"; } private static final int PRECOMPILE_GAS_FEE = 150; // cf EIP-1108 diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulNbEffectiveCall.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulEffectiveCall.java similarity index 95% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulNbEffectiveCall.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulEffectiveCall.java index cba6147fbd..ac45cedc1f 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulNbEffectiveCall.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcMulEffectiveCall.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class EcMulNbEffectiveCall implements Module { +public final class EcMulEffectiveCall implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL"; + return "PRECOMPILE_ECMUL_EFFECTIVE_CALL"; } private static final int PRECOMPILE_GAS_FEE = 6000; // cf EIP-1108 diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallNbEffectiveCall.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallEffectiveCall.java similarity index 96% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallNbEffectiveCall.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallEffectiveCall.java index e8c8d0d4db..71a8efca72 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallNbEffectiveCall.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingCallEffectiveCall.java @@ -32,7 +32,7 @@ @Slf4j @RequiredArgsConstructor -public final class EcPairingCallNbEffectiveCall implements Module { +public final class EcPairingCallEffectiveCall implements Module { private final Hub hub; @Getter private final Stack counts = new Stack<>(); private static final int PRECOMPILE_BASE_GAS_FEE = 45000; // cf EIP-1108 @@ -41,7 +41,7 @@ public final class EcPairingCallNbEffectiveCall implements Module { @Override public String moduleKey() { - return "PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL"; + return "PRECOMPILE_ECPAIRING_EFFECTIVE_CALL"; } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingNbMillerLoop.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingMillerLoop.java similarity index 86% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingNbMillerLoop.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingMillerLoop.java index d0d3851181..ff0fd622fd 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingNbMillerLoop.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcPairingMillerLoop.java @@ -21,16 +21,16 @@ import net.consensys.linea.zktracer.ColumnHeader; import net.consensys.linea.zktracer.module.Module; -public final class EcPairingNbMillerLoop implements Module { - private final EcPairingCallNbEffectiveCall ecpairingCall; +public final class EcPairingMillerLoop implements Module { + private final EcPairingCallEffectiveCall ecpairingCall; - public EcPairingNbMillerLoop(EcPairingCallNbEffectiveCall ecpairingCall) { + public EcPairingMillerLoop(EcPairingCallEffectiveCall ecpairingCall) { this.ecpairingCall = ecpairingCall; } @Override public String moduleKey() { - return "PRECOMPILE_ECPAIRING_NB_MILLER_LOOP"; + return "PRECOMPILE_ECPAIRING_MILLER_LOOP"; } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverNbEffectiveCall.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverEffectiveCall.java similarity index 97% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverNbEffectiveCall.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverEffectiveCall.java index 59973c4e8b..904880f120 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverNbEffectiveCall.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/EcRecoverEffectiveCall.java @@ -33,13 +33,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class EcRecoverNbEffectiveCall implements Module { +public final class EcRecoverEffectiveCall implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL"; + return "PRECOMPILE_ECRECOVER_EFFECTIVE_CALL"; } private static final int ECRECOVER_GAS_FEE = 3000; diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpNbEffectiveCall.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpEffectiveCall.java similarity index 98% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpNbEffectiveCall.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpEffectiveCall.java index d11588819f..50af40e1fc 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpNbEffectiveCall.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/ModexpEffectiveCall.java @@ -35,7 +35,7 @@ @Slf4j @RequiredArgsConstructor -public class ModexpNbEffectiveCall implements Module { +public class ModexpEffectiveCall implements Module { private final Hub hub; private final Stack counts = new Stack<>(); private static final BigInteger PROVER_MAX_INPUT_BIT_SIZE = BigInteger.valueOf(4096); @@ -43,7 +43,7 @@ public class ModexpNbEffectiveCall implements Module { @Override public String moduleKey() { - return "PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL"; + return "PRECOMPILE_MODEXP_EFFECTIVE_CALL"; } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160NbBlocks.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160Blocks.java similarity index 97% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160NbBlocks.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160Blocks.java index c262fde0a3..aa4b5c328a 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160NbBlocks.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Rip160Blocks.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class Rip160NbBlocks implements Module { +public final class Rip160Blocks implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_RIPEMD_NB_BLOCKS"; + return "PRECOMPILE_RIPEMD_BLOCKS"; } private static final int PRECOMPILE_BASE_GAS_FEE = 600; diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256NbBlocks.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256Blocks.java similarity index 97% rename from arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256NbBlocks.java rename to arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256Blocks.java index 99e0be73f1..4fba3b5089 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256NbBlocks.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/limits/precompiles/Sha256Blocks.java @@ -29,13 +29,13 @@ import org.hyperledger.besu.evm.internal.Words; @RequiredArgsConstructor -public final class Sha256NbBlocks implements Module { +public final class Sha256Blocks implements Module { private final Hub hub; private final Stack counts = new Stack<>(); @Override public String moduleKey() { - return "PRECOMPILE_SHA2_NB_BLOCKS"; + return "PRECOMPILE_SHA2_BLOCKS"; } private static final int PRECOMPILE_BASE_GAS_FEE = 60; diff --git a/arithmetization/src/main/resources/spillings.toml b/arithmetization/src/main/resources/spillings.toml index 59c181eed5..5d7fbb73cb 100644 --- a/arithmetization/src/main/resources/spillings.toml +++ b/arithmetization/src/main/resources/spillings.toml @@ -24,16 +24,16 @@ STP = 4 TRM = 7 WCP = 16 -PRECOMPILE_ECRECOVER_NB_EFFECTIVE_CALL = 0 -PRECOMPILE_SHA2_NB_BLOCKS = 0 -PRECOMPILE_RIPEMD_NB_BLOCKS = 0 +PRECOMPILE_ECRECOVER_EFFECTIVE_CALL = 0 +PRECOMPILE_SHA2_BLOCKS = 0 +PRECOMPILE_RIPEMD_BLOCKS = 0 PRECOMPILE_IDENTITY = 0 -PRECOMPILE_MODEXP_NB_EFFECTIVE_CALL = 0 -PRECOMPILE_ECADD_NB_EFFECTIVE_CALL = 0 -PRECOMPILE_ECMUL_NB_EFFECTIVE_CALL = 0 -PRECOMPILE_ECPAIRING_NB_EFFECTIVE_CALL = 0 -PRECOMPILE_ECPAIRING_NB_MILLER_LOOP = 0 -PRECOMPILE_BLAKE2F_NB_ROUNDS = 0 +PRECOMPILE_MODEXP_EFFECTIVE_CALL = 0 +PRECOMPILE_ECADD_EFFECTIVE_CALL = 0 +PRECOMPILE_ECMUL_EFFECTIVE_CALL = 0 +PRECOMPILE_ECPAIRING_EFFECTIVE_CALL = 0 +PRECOMPILE_ECPAIRING_MILLER_LOOP = 0 +PRECOMPILE_BLAKE2F_ROUNDS = 0 BLOCK_TX = 0 BLOCK_L2L1LOGS = 0