Skip to content

Commit

Permalink
clean merge
Browse files Browse the repository at this point in the history
Signed-off-by: Karim Taam <[email protected]>
  • Loading branch information
matkt committed Oct 30, 2024
2 parents dbf6333 + f82bb7d commit 0866781
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public enum NetworkName {
*/
EPHEMERY("/ephemery.json", BigInteger.valueOf(39438135)),

/** Verkle testnet */
/** Verkle kaustinen testnet */
KAUSTINEN("/kaustinen.json", BigInteger.valueOf(69420)),

/** Dev network name. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1118,9 +1118,9 @@ yield new VerkleWorldStateProvider(
worldStateKeyValueStorage,
blockchain,
Optional.of(
dataStorageConfiguration
.getDiffBasedSubStorageConfiguration()
.getMaxLayersToLoad()),
dataStorageConfiguration
.getDiffBasedSubStorageConfiguration()
.getMaxLayersToLoad()),
besuComponent.map(BesuComponent::getBesuPluginContext).orElse(null),
evmConfiguration);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public String getName() {

@Override
protected ValidationResult<RpcErrorType> validateParameters(
final EnginePayloadParameter payloadParameter,
final Optional<List<String>> maybeVersionedHashParam,
final Optional<String> maybeBeaconBlockRootParam,
final Optional<List<String>> maybeRequestsParam) {
final EnginePayloadParameter payloadParameter,
final Optional<List<String>> maybeVersionedHashParam,
final Optional<String> maybeBeaconBlockRootParam,
final Optional<List<String>> maybeRequestsParam) {
if (payloadParameter.getBlobGasUsed() != null) {
return ValidationResult.invalid(
RpcErrorType.INVALID_PARAMS, "non-null BlobGasUsed pre-cancun");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public VerkleWorldStateKeyValueStorage(
List.of(
ACCOUNT_INFO_STATE, CODE_STORAGE, ACCOUNT_STORAGE_STORAGE, TRIE_BRANCH_STORAGE)),
provider.getStorageBySegmentIdentifier(KeyValueSegmentIdentifier.TRIE_LOG_STORAGE));
this.flatDbStrategy = new BonsaiFullFlatDbStrategy(metricsSystem, new CodeHashCodeStorageStrategy());
this.flatDbStrategy =
new BonsaiFullFlatDbStrategy(metricsSystem, new CodeHashCodeStorageStrategy());
}

public VerkleWorldStateKeyValueStorage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static VerkleWorldStateProvider createVerkleInMemoryWorldStateArchive(
final DataStorageConfiguration verkleDataStorageConfig =
ImmutableDataStorageConfiguration.builder()
.dataStorageFormat(DataStorageFormat.VERKLE)
.diffBasedSubStorageConfiguration(DiffBasedSubStorageConfiguration.DEFAULT)
.diffBasedSubStorageConfiguration(DiffBasedSubStorageConfiguration.DEFAULT)
.build();
return new VerkleWorldStateProvider(
(VerkleWorldStateKeyValueStorage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ public boolean isValid(final Block block) {
@Override
public boolean areAllTransactionsValid(final Block block) {
Optional<CandidateBlock> candidateBlock =
Arrays.stream(candidateBlocks)
.filter(cb -> Objects.equals(cb.getBlock(), block))
.findFirst();
Arrays.stream(candidateBlocks)
.filter(cb -> Objects.equals(cb.getBlock(), block))
.findFirst();
return candidateBlock.isPresent() && candidateBlock.get().areAllTransactionsValid();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static org.hyperledger.besu.ethereum.core.InMemoryKeyValueStorageProvider.createVerkleInMemoryWorldStateArchive;

import org.apache.commons.lang3.NotImplementedException;
import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.Wei;
Expand All @@ -31,7 +30,6 @@
import org.hyperledger.besu.ethereum.core.InMemoryKeyValueStorageProvider;
import org.hyperledger.besu.ethereum.core.MutableWorldState;
import org.hyperledger.besu.ethereum.core.ParsedExtraData;
import org.hyperledger.besu.ethereum.core.Request;
import org.hyperledger.besu.ethereum.core.Transaction;
import org.hyperledger.besu.ethereum.core.Withdrawal;
import org.hyperledger.besu.ethereum.mainnet.MainnetBlockHeaderFunctions;
Expand All @@ -50,6 +48,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.NotImplementedException;
import org.apache.tuweni.bytes.Bytes;

@JsonIgnoreProperties(ignoreUnknown = true)
Expand Down Expand Up @@ -300,12 +299,12 @@ public Block getBlock() {
final MainnetBlockHeaderFunctions blockHeaderFunctions = new MainnetBlockHeaderFunctions();
final BlockHeader header = BlockHeader.readFrom(input, blockHeaderFunctions);
final BlockBody body =
new BlockBody(
input.readList(Transaction::readFrom),
input.readList(inputData -> BlockHeader.readFrom(inputData, blockHeaderFunctions)),
input.isEndOfCurrentList()
? Optional.empty()
: Optional.of(input.readList(Withdrawal::readFrom)));
new BlockBody(
input.readList(Transaction::readFrom),
input.readList(inputData -> BlockHeader.readFrom(inputData, blockHeaderFunctions)),
input.isEndOfCurrentList()
? Optional.empty()
: Optional.of(input.readList(Withdrawal::readFrom)));
return new Block(header, body);
}
}
Expand Down

0 comments on commit 0866781

Please sign in to comment.