diff --git a/besu/src/main/java/org/hyperledger/besu/services/BlockSimulatorServiceImpl.java b/besu/src/main/java/org/hyperledger/besu/services/BlockSimulatorServiceImpl.java index 4673b9c3588..f6bda8aeee4 100644 --- a/besu/src/main/java/org/hyperledger/besu/services/BlockSimulatorServiceImpl.java +++ b/besu/src/main/java/org/hyperledger/besu/services/BlockSimulatorServiceImpl.java @@ -49,7 +49,7 @@ public BlockSimulatorServiceImpl( } /** - * Simulate the creation of a block given header, a list of transactions, and blockOverrides. + * Simulate the processing of a block given a header, a list of transactions, and blockOverrides. * * @param header the header * @param transactions the transactions to include in the block diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/BlockStateCallsParameter.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/BlockStateCallsParameter.java deleted file mode 100644 index 3d9493e84be..00000000000 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/BlockStateCallsParameter.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright contributors to Besu. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ -package org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters; - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class BlockStateCallsParameter { - @JsonProperty("blockStateCalls") - private final List blockStateCalls = new ArrayList<>(); - - @JsonProperty("validation") - private boolean validation; - - @JsonProperty("traceTransfers") - private boolean traceTransfers; - - public List getBlockStateCalls() { - return blockStateCalls; - } - - public boolean isValidation() { - return validation; - } - - public boolean isTraceTransfers() { - return traceTransfers; - } -} diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonBlockStateCall.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonBlockStateCall.java deleted file mode 100644 index e18178fba50..00000000000 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonBlockStateCall.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright contributors to Besu. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ -package org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters; - -import org.hyperledger.besu.datatypes.AccountOverrideMap; -import org.hyperledger.besu.datatypes.BlockOverrides; -import org.hyperledger.besu.ethereum.transaction.BlockStateCall; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class JsonBlockStateCall extends BlockStateCall { - @JsonCreator - public JsonBlockStateCall( - @JsonProperty("calls") final List calls, - @JsonProperty("blockOverrides") final BlockOverrides blockOverrides, - @JsonProperty("stateOverrides") final AccountOverrideMap stateOverrides, - @JsonProperty("validation") final boolean validation) { - super(calls, blockOverrides, stateOverrides, validation); - } -} diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResult.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResult.java index 238f82dc574..e74cf2f4e0a 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResult.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResult.java @@ -89,7 +89,7 @@ public class BlockResult implements JsonRpcResult { private final String excessBlobGas; private final String parentBeaconBlockRoot; private final String targetBlobsPerBlock; - private final List transactionProcessingResults; + private final List callProcessingResults; public BlockResult( final BlockHeader header, @@ -115,7 +115,7 @@ public BlockResult( final BlockHeader header, final List transactions, final List ommers, - final List transactionProcessingResults, + final List callProcessingResults, final Difficulty totalDifficulty, final int size, final boolean includeCoinbase, @@ -141,7 +141,7 @@ public BlockResult( this.timestamp = Quantity.create(header.getTimestamp()); this.ommers = ommers; this.transactions = transactions; - this.transactionProcessingResults = transactionProcessingResults; + this.callProcessingResults = callProcessingResults; this.coinbase = includeCoinbase ? header.getCoinbase().toString() : null; this.withdrawalsRoot = header.getWithdrawalsRoot().map(Hash::toString).orElse(null); this.withdrawals = @@ -298,7 +298,7 @@ public String getTargetBlobsPerBlock() { } @JsonGetter(value = "calls") - public List getTransactionProcessingResults() { - return transactionProcessingResults; + public List getTransactionProcessingResults() { + return callProcessingResults; } } diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionProcessingResult.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/CallProcessingResult.java similarity index 96% rename from ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionProcessingResult.java rename to ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/CallProcessingResult.java index b1473f3beef..9015a61c854 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionProcessingResult.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/CallProcessingResult.java @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.tuweni.bytes.Bytes; -public class TransactionProcessingResult { +public class CallProcessingResult { @JsonProperty("status") private final String status; @@ -36,7 +36,7 @@ public class TransactionProcessingResult { @JsonProperty("logs") private final List logs; - public TransactionProcessingResult( + public CallProcessingResult( @JsonProperty("status") final int status, @JsonProperty("returnData") final Bytes returnData, @JsonProperty("gasUsed") final long gasUsed, diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/BlockSimulatorTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/BlockSimulatorTest.java index a47018f57d5..313719c7890 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/BlockSimulatorTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/BlockSimulatorTest.java @@ -120,7 +120,8 @@ public void shouldNotProcessWithInvalidWorldState() { () -> blockSimulator.process(blockHeader, Collections.emptyList())); assertEquals( - String.format("Public world state not available for block %s", blockHeader.toLogString()), exception.getMessage()); + String.format("Public world state not available for block %s", blockHeader.toLogString()), + exception.getMessage()); } @Test diff --git a/plugin-api/src/main/java/org/hyperledger/besu/plugin/services/BlockSimulationService.java b/plugin-api/src/main/java/org/hyperledger/besu/plugin/services/BlockSimulationService.java index 7ecbd7deca2..4cf7285f3e5 100644 --- a/plugin-api/src/main/java/org/hyperledger/besu/plugin/services/BlockSimulationService.java +++ b/plugin-api/src/main/java/org/hyperledger/besu/plugin/services/BlockSimulationService.java @@ -24,7 +24,7 @@ public interface BlockSimulationService extends BesuService { /** - * Simulate the creation of a block given header, a list of transactions, and blockOverrides. + * Simulate the processing of a block given header, a list of transactions, and blockOverrides. * * @param header the header * @param transactions the transactions to include in the block