Skip to content

Commit

Permalink
Set besuVersion=24.8-develop-915fcb01 and arithmetizationVersion=0.5.…
Browse files Browse the repository at this point in the history
…2-beta

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
  • Loading branch information
fab-10 committed Sep 4, 2024
1 parent e534f35 commit 0fa7f90
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 10 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
releaseVersion=0.4.0-SNAPSHOT
besuVersion=24.8-develop-74a56f5
arithmetizationVersion=0.4.0-rc1
releaseVersion=0.5.2-SNAPSHOT
besuVersion=24.8-develop-915fcb01
arithmetizationVersion=0.5.2-beta
besuArtifactGroup=io.consensys.linea-besu
distributionIdentifier=linea-sequencer
distributionBaseUrl=https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import net.consensys.linea.sequencer.modulelimit.ModuleLimitsValidationResult;
import net.consensys.linea.sequencer.modulelimit.ModuleLineCountValidator;
import net.consensys.linea.zktracer.ZkTracer;
import net.consensys.linea.zktracer.module.Module;
import net.consensys.linea.zktracer.container.module.Module;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.PendingTransaction;
import org.hyperledger.besu.datatypes.Transaction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.tuweni.bytes.Bytes;
import org.hyperledger.besu.datatypes.PendingTransaction;
import org.hyperledger.besu.datatypes.Transaction;
import org.hyperledger.besu.plugin.data.ProcessableBlockHeader;
import org.hyperledger.besu.plugin.data.TransactionProcessingResult;
import org.hyperledger.besu.plugin.data.TransactionSelectionResult;
import org.hyperledger.besu.plugin.services.txselection.PluginTransactionSelector;
Expand Down Expand Up @@ -101,6 +102,7 @@ private TestTransactionEvaluationContext mockTransactionOfCallDataSize(final int
Transaction transaction = mock(Transaction.class);
when(pendingTransaction.getTransaction()).thenReturn(transaction);
when(transaction.getPayload()).thenReturn(Bytes.repeat((byte) 1, size));
return new TestTransactionEvaluationContext(pendingTransaction);
return new TestTransactionEvaluationContext(
mock(ProcessableBlockHeader.class), pendingTransaction);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import org.hyperledger.besu.datatypes.PendingTransaction;
import org.hyperledger.besu.datatypes.Transaction;
import org.hyperledger.besu.plugin.data.ProcessableBlockHeader;
import org.hyperledger.besu.plugin.data.TransactionProcessingResult;
import org.hyperledger.besu.plugin.data.TransactionSelectionResult;
import org.hyperledger.besu.plugin.services.txselection.PluginTransactionSelector;
Expand Down Expand Up @@ -104,7 +105,8 @@ private TestTransactionEvaluationContext mockEvaluationContext() {
PendingTransaction pendingTransaction = mock(PendingTransaction.class);
Transaction transaction = mock(Transaction.class);
when(pendingTransaction.getTransaction()).thenReturn(transaction);
return new TestTransactionEvaluationContext(pendingTransaction);
return new TestTransactionEvaluationContext(
mock(ProcessableBlockHeader.class), pendingTransaction);
}

private TransactionProcessingResult mockTransactionProcessingResult(long gasUsedByTransaction) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.hyperledger.besu.datatypes.PendingTransaction;
import org.hyperledger.besu.datatypes.Transaction;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.plugin.data.ProcessableBlockHeader;
import org.hyperledger.besu.plugin.data.TransactionProcessingResult;
import org.hyperledger.besu.plugin.data.TransactionSelectionResult;
import org.hyperledger.besu.plugin.services.BlockchainService;
Expand Down Expand Up @@ -361,7 +362,8 @@ private TestTransactionEvaluationContext mockEvaluationContext(
when(transaction.encoded()).thenReturn(Bytes.wrap(pseudoRandomBytes(size)));
when(pendingTransaction.getTransaction()).thenReturn(transaction);
when(pendingTransaction.hasPriority()).thenReturn(hasPriority);
return new TestTransactionEvaluationContext(pendingTransaction, effectiveGasPrice, minGasPrice);
return new TestTransactionEvaluationContext(
mock(ProcessableBlockHeader.class), pendingTransaction, effectiveGasPrice, minGasPrice);
}

private byte[] pseudoRandomBytes(int size) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,35 @@
import com.google.common.base.Stopwatch;
import org.hyperledger.besu.datatypes.PendingTransaction;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.plugin.data.ProcessableBlockHeader;
import org.hyperledger.besu.plugin.services.txselection.TransactionEvaluationContext;

class TestTransactionEvaluationContext implements TransactionEvaluationContext<PendingTransaction> {
private ProcessableBlockHeader processableBlockHeader;
private PendingTransaction pendingTransaction;
private Wei transactionGasPrice;
private Wei minGasPrice;

public TestTransactionEvaluationContext(
final ProcessableBlockHeader processableBlockHeader,
final PendingTransaction pendingTransaction,
final Wei transactionGasPrice,
final Wei minGasPrice) {
this.processableBlockHeader = processableBlockHeader;
this.pendingTransaction = pendingTransaction;
this.transactionGasPrice = transactionGasPrice;
this.minGasPrice = minGasPrice;
}

public TestTransactionEvaluationContext(final PendingTransaction pendingTransaction) {
this(pendingTransaction, Wei.ONE, Wei.ONE);
public TestTransactionEvaluationContext(
final ProcessableBlockHeader processableBlockHeader,
final PendingTransaction pendingTransaction) {
this(processableBlockHeader, pendingTransaction, Wei.ONE, Wei.ONE);
}

@Override
public ProcessableBlockHeader getPendingBlockHeader() {
return processableBlockHeader;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.hyperledger.besu.datatypes.PendingTransaction;
import org.hyperledger.besu.datatypes.Transaction;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.plugin.data.ProcessableBlockHeader;
import org.hyperledger.besu.plugin.data.TransactionProcessingResult;
import org.hyperledger.besu.plugin.data.TransactionSelectionResult;
import org.hyperledger.besu.plugin.services.txselection.PluginTransactionSelector;
Expand Down Expand Up @@ -238,7 +239,8 @@ private TestTransactionEvaluationContext mockEvaluationContext(
when(transaction.getGasLimit()).thenReturn(gasLimit);
when(pendingTransaction.getTransaction()).thenReturn(transaction);
when(pendingTransaction.hasPriority()).thenReturn(hasPriority);
return new TestTransactionEvaluationContext(pendingTransaction, effectiveGasPrice, minGasPrice);
return new TestTransactionEvaluationContext(
mock(ProcessableBlockHeader.class), pendingTransaction, effectiveGasPrice, minGasPrice);
}

private class TestableTraceLineLimitTransactionSelector
Expand Down

0 comments on commit 0fa7f90

Please sign in to comment.