diff --git hyperledger/besu/ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java optimism-java/op-besu/ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java
+
index 3fa80f1dd0ae2d38f069df2c5aa776024581a3bb..116e836b85b2b7c8c2abffc643f347d41647dd54 100644
--- hyperledger/besu/ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java
+++ optimism-java/op-besu/ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java
@@ -16,6 +16,7 @@ package org.hyperledger.besu.ethereum.blockcreation;
@@ -2319,7 +2319,7 @@
import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.datatypes.BlobGas;
import org.hyperledger.besu.datatypes.Hash;
-
@@ -37,6 +38,7 @@ import org.hyperledger.besu.ethereum.core.SealableBlockHeader;
+
@@ -37,9 +38,11 @@ import org.hyperledger.besu.ethereum.core.SealableBlockHeader;
import org.hyperledger.besu.ethereum.core.Transaction;
import org.hyperledger.besu.ethereum.core.Withdrawal;
import org.hyperledger.besu.ethereum.core.encoding.DepositDecoder;
@@ -2327,7 +2327,11 @@
import org.hyperledger.besu.ethereum.eth.transactions.TransactionPool;
import org.hyperledger.besu.ethereum.mainnet.AbstractBlockProcessor;
import org.hyperledger.besu.ethereum.mainnet.BodyValidation;
-
@@ -57,8 +59,10 @@ import org.hyperledger.besu.plugin.services.exception.StorageException;
+
+import org.hyperledger.besu.ethereum.mainnet.Create2DeployerFunction;
+ import org.hyperledger.besu.ethereum.mainnet.DepositsValidator;
+ import org.hyperledger.besu.ethereum.mainnet.DifficultyCalculator;
+ import org.hyperledger.besu.ethereum.mainnet.MainnetTransactionProcessor;
+
@@ -57,8 +60,10 @@ import org.hyperledger.besu.plugin.services.exception.StorageException;
import org.hyperledger.besu.plugin.services.securitymodule.SecurityModuleException;
import java.math.BigInteger;
@@ -2338,7 +2342,7 @@
import java.util.concurrent.CancellationException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Supplier;
-
@@ -92,6 +96,7 @@ private final Wei minTransactionGasPrice;
+
@@ -92,6 +97,7 @@ private final Wei minTransactionGasPrice;
private final Double minBlockOccupancyRatio;
protected final BlockHeader parentHeader;
private final Optional<Address> depositContractAddress;
@@ -2346,7 +2350,7 @@
private final AtomicBoolean isCancelled = new AtomicBoolean(false);
-
@@ -107,6 +112,34 @@ final Wei minTransactionGasPrice,
+
@@ -107,6 +113,34 @@ final Wei minTransactionGasPrice,
final Double minBlockOccupancyRatio,
final BlockHeader parentHeader,
final Optional<Address> depositContractAddress) {
@@ -2381,7 +2385,7 @@
this.coinbase = coinbase;
this.miningBeneficiaryCalculator = miningBeneficiaryCalculator;
this.targetGasLimitSupplier = targetGasLimitSupplier;
-
@@ -119,6 +152,7 @@ this.minBlockOccupancyRatio = minBlockOccupancyRatio;
+
@@ -119,6 +153,7 @@ this.minBlockOccupancyRatio = minBlockOccupancyRatio;
this.parentHeader = parentHeader;
this.depositContractAddress = depositContractAddress;
blockHeaderFunctions = ScheduleBasedBlockHeaderFunctions.create(protocolSchedule);
@@ -2389,7 +2393,7 @@
}
/**
-
@@ -161,7 +195,9 @@ Optional.empty(),
+
@@ -161,7 +196,9 @@ Optional.empty(),
Optional.empty(),
Optional.empty(),
timestamp,
@@ -2400,7 +2404,7 @@
}
protected BlockCreationResult createBlock(
-
@@ -171,7 +207,9 @@ final Optional<List<Withdrawal>> maybeWithdrawals,
+
@@ -171,7 +208,9 @@ final Optional<List<Withdrawal>> maybeWithdrawals,
final Optional<Bytes32> maybePrevRandao,
final Optional<Bytes32> maybeParentBeaconBlockRoot,
final long timestamp,
@@ -2411,7 +2415,7 @@
try (final MutableWorldState disposableWorldState = duplicateWorldStateAtParent()) {
final ProtocolSpec newProtocolSpec =
-
@@ -179,7 +217,7 @@ protocolSchedule.getForNextBlockHeader(parentHeader, timestamp);
+
@@ -179,7 +218,7 @@ protocolSchedule.getForNextBlockHeader(parentHeader, timestamp);
final ProcessableBlockHeader processableBlockHeader =
createPendingBlockHeader(
@@ -2420,7 +2424,7 @@
final Address miningBeneficiary =
miningBeneficiaryCalculator.getMiningBeneficiary(processableBlockHeader.getNumber());
Wei blobGasPrice =
-
@@ -204,7 +242,8 @@ disposableWorldState,
+
@@ -204,7 +243,8 @@ disposableWorldState,
maybeTransactions,
miningBeneficiary,
blobGasPrice,
@@ -2430,7 +2434,7 @@
transactionResults.logSelectionStats();
-
@@ -332,7 +371,8 @@ final MutableWorldState disposableWorldState,
+
@@ -332,7 +372,8 @@ final MutableWorldState disposableWorldState,
final Optional<List<Transaction>> transactions,
final Address miningBeneficiary,
final Wei blobGasPrice,
@@ -2440,13 +2444,18 @@
throws RuntimeException {
final MainnetTransactionProcessor transactionProcessor = protocolSpec.getTransactionProcessor();
-
@@ -355,11 +395,35 @@ blobGasPrice,
+
@@ -355,11 +396,40 @@ blobGasPrice,
protocolSpec.getFeeMarket(),
protocolSpec.getGasCalculator(),
protocolSpec.getGasLimitCalculator(),
- protocolContext.getTransactionSelectorFactory());
+ protocolContext.getTransactionSelectorFactory(),
+ genesisConfigOptions);
+
+
+
+ Create2DeployerFunction.ensureCreate2Deployer(
+
+ genesisConfigOptions,
+
+ processableBlockHeader.getTimestamp(),
+
+ disposableWorldState.updater());
- if (transactions.isPresent()) {
- return selector.evaluateTransactions(transactions.get());
@@ -2479,7 +2488,7 @@
return selector.buildTransactionListForBlock();
}
}
-
@@ -388,15 +452,17 @@ private ProcessableBlockHeader createPendingBlockHeader(
+
@@ -388,15 +458,17 @@ private ProcessableBlockHeader createPendingBlockHeader(
final long timestamp,
final Optional<Bytes32> maybePrevRandao,
final Optional<Bytes32> maybeParentBeaconBlockRoot,
@@ -2503,7 +2512,7 @@
final DifficultyCalculator difficultyCalculator = protocolSpec.getDifficultyCalculator();
final BigInteger difficulty =
-
@@ -412,7 +478,8 @@ feeMarket.computeBaseFee(
+
@@ -412,7 +484,8 @@ feeMarket.computeBaseFee(
newBlockNumber,
parentHeader.getBaseFee().orElse(Wei.ZERO),
parentHeader.getGasUsed(),
@@ -2513,7 +2522,7 @@
.orElse(null);
final Bytes32 prevRandao = maybePrevRandao.orElse(null);
-
@@ -498,6 +565,7 @@ final SealableBlockHeader sealableBlockHeader);
+
@@ -498,6 +571,7 @@ final SealableBlockHeader sealableBlockHeader);
@FunctionalInterface
protected interface MiningBeneficiaryCalculator {
@@ -2526,8 +2535,8 @@