From 18eaeb47bf0251ae21d90f6f67dc8891b8fd6807 Mon Sep 17 00:00:00 2001 From: Fabio Di Fabio <fabio.difabio@consensys.net> Date: Wed, 22 Jan 2025 16:34:04 +0100 Subject: [PATCH] Update Linea Besu to 25.1-develop-448d1a9 (#1722) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update Linea Besu to 25.1-develop-448d1a9 Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * Use new version of `traceStartBlock` Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * update to reflect new interface of GasCalculator.transactionIntrinsicGasCost method * spotless fixes * Update Reaper.java * Update arithmetization/src/main/java/net/consensys/linea/blockcapture/reapers/Reaper.java Removing resolved comment --------- Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net> Co-authored-by: Olivier Bégassat <38285177+OlivierBBB@users.noreply.github.com> --- .../java/net/consensys/linea/blockcapture/BlockCapturer.java | 5 +++-- .../net/consensys/linea/blockcapture/reapers/Reaper.java | 5 +++-- .../linea/zktracer/types/TransactionProcessingMetadata.java | 4 +++- gradle.properties | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arithmetization/src/main/java/net/consensys/linea/blockcapture/BlockCapturer.java b/arithmetization/src/main/java/net/consensys/linea/blockcapture/BlockCapturer.java index 17548d9f6e..f3fde81725 100644 --- a/arithmetization/src/main/java/net/consensys/linea/blockcapture/BlockCapturer.java +++ b/arithmetization/src/main/java/net/consensys/linea/blockcapture/BlockCapturer.java @@ -69,8 +69,9 @@ public void traceStartConflation(long numBlocksInConflation) {} public void traceEndConflation(WorldView state) {} @Override - public void traceStartBlock(BlockHeader blockHeader, BlockBody blockBody) { - this.reaper.enterBlock(blockHeader, blockBody); + public void traceStartBlock( + BlockHeader blockHeader, BlockBody blockBody, Address miningBeneficiary) { + this.reaper.enterBlock(blockHeader, blockBody, miningBeneficiary); } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/blockcapture/reapers/Reaper.java b/arithmetization/src/main/java/net/consensys/linea/blockcapture/reapers/Reaper.java index ed70572375..50bdbb515a 100644 --- a/arithmetization/src/main/java/net/consensys/linea/blockcapture/reapers/Reaper.java +++ b/arithmetization/src/main/java/net/consensys/linea/blockcapture/reapers/Reaper.java @@ -69,10 +69,11 @@ public class Reaper { /** Collect the account address read / written by the current transaction */ private AddressReaper txAddresses = null; - public void enterBlock(final BlockHeader header, final BlockBody body) { + public void enterBlock( + final BlockHeader header, final BlockBody body, final Address miningBeneficiary) { this.blocks.add( BlockSnapshot.of((org.hyperledger.besu.ethereum.core.BlockHeader) header, body)); - this.conflationAddresses.touch(header.getCoinbase()); + this.conflationAddresses.touch(miningBeneficiary); txIndex = 0; // reset } diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/types/TransactionProcessingMetadata.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/types/TransactionProcessingMetadata.java index fa217365f7..5bf97d4096 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/types/TransactionProcessingMetadata.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/types/TransactionProcessingMetadata.java @@ -144,8 +144,10 @@ public TransactionProcessingMetadata( // Note: Besu's dataCost computation contains // - the 21_000 transaction cost (we deduce it) // - the contract creation cost in case of deployment (we set deployment to false to not add it) + // - the baseline gas (gas for access lists and 7702 authorizations) is set to zero, because we + // only consider the cost of the transaction payload dataCost = - ZkTracer.gasCalculator.transactionIntrinsicGasCost(besuTransaction.getPayload(), false) + ZkTracer.gasCalculator.transactionIntrinsicGasCost(besuTransaction.getPayload(), false, 0) - GAS_CONST_G_TRANSACTION; accessListCost = besuTransaction.getAccessList().map(ZkTracer.gasCalculator::accessListGasCost).orElse(0L); diff --git a/gradle.properties b/gradle.properties index 38bc4b7a25..8c7d78b9b5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ releaseVersion=beta-v1.2.0-rc0 -besuVersion=25.1-delivery42 +besuVersion=25.1-develop-448d1a9 besuArtifactGroup=io.consensys.linea-besu distributionIdentifier=linea-tracer distributionBaseUrl=https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/