Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Karim Taam <[email protected]>
  • Loading branch information
matkt committed Jun 12, 2024
1 parent a4aff35 commit e2f541a
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public JsonRpcResponse response(
null, // ToDo 4844: set with the value of excess_blob_gas field
null, // TODO 4788: set with the value of the parent beacon block root field
requestsRoot,
null,
blockHeaderFunctions);

return new JsonRpcSuccessResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
import org.hyperledger.besu.ethereum.mainnet.requests.RequestUtil;
import org.hyperledger.besu.ethereum.rlp.RLPException;
import org.hyperledger.besu.ethereum.trie.MerkleTrieException;
import org.hyperledger.besu.ethereum.trie.verkle.ExecutionWitness;
import org.hyperledger.besu.ethereum.core.witness.ExecutionWitness;
import org.hyperledger.besu.plugin.services.exception.StorageException;

import java.security.InvalidParameterException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters;

import org.hyperledger.besu.ethereum.trie.verkle.ExecutionWitness;
import org.hyperledger.besu.ethereum.core.witness.ExecutionWitness;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonGetter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters;

import org.hyperledger.besu.ethereum.core.json.HexStringDeserializer;
import org.hyperledger.besu.ethereum.trie.verkle.IPAProof;
import org.hyperledger.besu.ethereum.core.witness.IPAProof;

import java.util.List;

Expand Down Expand Up @@ -52,7 +52,7 @@ public static IPAProofParameter fromIPAProof(final IPAProof ipaProof) {
}

public static IPAProof toIPAProof(final IPAProofParameter ipaProofParameter) {
return new org.hyperledger.besu.ethereum.trie.verkle.IPAProof(
return new IPAProof(
ipaProofParameter.getCl().stream().map(Bytes32::fromHexString).toList(),
ipaProofParameter.getCr().stream().map(Bytes32::fromHexString).toList(),
ipaProofParameter.getFinalEvaluation());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters;

import org.hyperledger.besu.ethereum.trie.verkle.StateDiff;
import org.hyperledger.besu.ethereum.core.witness.StateDiff;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters;

import org.hyperledger.besu.ethereum.core.json.HexStringDeserializer;
import org.hyperledger.besu.ethereum.trie.verkle.StemStateDiff;
import org.hyperledger.besu.ethereum.core.witness.StemStateDiff;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters;

import org.hyperledger.besu.ethereum.core.json.HexStringDeserializer;
import org.hyperledger.besu.ethereum.trie.verkle.SuffixStateDiff;
import org.hyperledger.besu.ethereum.core.witness.SuffixStateDiff;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters;

import org.hyperledger.besu.ethereum.core.json.HexStringDeserializer;
import org.hyperledger.besu.ethereum.trie.verkle.VerkleProof;
import org.hyperledger.besu.ethereum.core.witness.VerkleProof;

import java.util.List;

Expand Down Expand Up @@ -51,7 +51,7 @@ public VerkleProofParameter(
}

public static VerkleProofParameter fromVerkleProof(
final org.hyperledger.besu.ethereum.trie.verkle.VerkleProof verkleProof) {
final VerkleProof verkleProof) {
return new VerkleProofParameter(
verkleProof.otherStems().stream().map(Bytes::toHexString).toList(),
verkleProof.depthExtensionPresent(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import org.hyperledger.besu.datatypes.BlobGas;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.ethereum.core.witness.ExecutionWitness;
import org.hyperledger.besu.ethereum.rlp.RLPInput;
import org.hyperledger.besu.ethereum.rlp.RLPOutput;
import org.hyperledger.besu.ethereum.trie.verkle.ExecutionWitness;
import org.hyperledger.besu.evm.log.LogsBloomFilter;

import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.ethereum.mainnet.MainnetBlockHeaderFunctions;
import org.hyperledger.besu.ethereum.trie.verkle.ExecutionWitness;
import org.hyperledger.besu.ethereum.core.witness.ExecutionWitness;
import org.hyperledger.besu.evm.log.LogsBloomFilter;

import java.time.Instant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.hyperledger.besu.datatypes.BlobGas;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.ethereum.trie.verkle.ExecutionWitness;
import org.hyperledger.besu.ethereum.core.witness.ExecutionWitness;
import org.hyperledger.besu.evm.log.LogsBloomFilter;

import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.ethereum.trie.verkle;
package org.hyperledger.besu.ethereum.core.witness;

import org.hyperledger.besu.ethereum.rlp.RLPInput;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.ethereum.trie.verkle;
package org.hyperledger.besu.ethereum.core.witness;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.ethereum.trie.verkle;
package org.hyperledger.besu.ethereum.core.witness;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.ethereum.trie.verkle;
package org.hyperledger.besu.ethereum.core.witness;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.ethereum.trie.verkle;
package org.hyperledger.besu.ethereum.core.witness;

import org.apache.tuweni.bytes.Bytes32;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.ethereum.trie.verkle;
package org.hyperledger.besu.ethereum.core.witness;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.hyperledger.besu.ethereum.mainnet;

import org.hyperledger.besu.ethereum.trie.verkle.ExecutionWitness;
import org.hyperledger.besu.ethereum.core.witness.ExecutionWitness;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public TransactionProcessingResult processTransaction(

initialFrame.getSelfDestructs().forEach(worldState::deleteAccount);

clearEmptyAccountStrategy.process(worldUpdater);
clearEmptyAccountStrategy.process(worldState);

if (initialFrame.getState() == MessageFrame.State.COMPLETED_SUCCESS) {
return TransactionProcessingResult.successful(
Expand Down
2 changes: 1 addition & 1 deletion plugin-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Calculated : ${currentHash}
tasks.register('checkAPIChanges', FileStateChecker) {
description = "Checks that the API for the Plugin-API project does not change without deliberate thought"
files = sourceSets.main.allJava.files
knownHash = 'xU0LMvStiFihBKBxkfNHB7oIg0PUHWkPuv2yt1GVC94='
knownHash = 'pXUnzOxMq+cCmmaS39fa2nHlZWQm2wqYxU2nNSDdNfs='
}
check.dependsOn('checkAPIChanges')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private static int dataStorageFormatToV1(final DataStorageFormat dataStorageForm
return switch (dataStorageFormat) {
case FOREST -> 1;
case BONSAI -> 2;
case VERKLE -> 3;
};
}
}

0 comments on commit e2f541a

Please sign in to comment.