diff --git a/CHANGELOG.md b/CHANGELOG.md index 64abc1e28c9..f884e15811a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,10 @@ - Remove `--Xsnapsync-server-enabled` deprecated since 25.7.0. Use `--snapsync-server-enabled` instead. - Remove `--Xsnapsync-synchronizer-pre-merge-headers-only-enabled` deprecated since 25.7.0. Use `--snapsync-synchronizer-pre-checkpoint-headers-only-enabled` instead. - Remove `--Xhistory-expiry-prune` deprecated since 25.7.0. Use `--history-expiry-prune` instead. -- Use error code 3 for execution reverted [#9365](https://github.com/hyperledger/besu/pull/9365) -- eth_createAccessList now returns success result if execution reverted [#9358](https://github.com/hyperledger/besu/pull/9358) +- RPC changes to enhance compatibility with other ELs + - Use error code 3 for execution reverted [#9365](https://github.com/hyperledger/besu/pull/9365) + - eth_createAccessList now returns success result if execution reverted [#9358](https://github.com/hyperledger/besu/pull/9358) + - Return null result if block not found for `debug_accountAt`, `debug_setHead`, `eth_call`, `eth_getBlockReceipts`, `eth_getProof`, `eth_simulateV1`, `eth_getBalance`, `eth_getCode`, `eth_getStorageAt`, `eth_getTransactionCount` [#9303](https://github.com/hyperledger/besu/pull/9303) - Remove PoW specific RPCs: `eth_getMinerDataByBlockHash`, `eth_getMinerDataByBlockNumber`, `miner_setCoinbase`, `miner_setEtherbase` [#9481](https://github.com/hyperledger/besu/pull/9481) ### Upcoming Breaking Changes @@ -23,12 +25,9 @@ ### Additions and Improvements - Update to vertx 4.5.22 [#9375](https://github.com/hyperledger/besu/pull/9375) - Add `opcodes` optional parameter to RPC methods: `debug_standardTraceBlockToFile`, `debug_standardTraceBadBlockToFile`, `debug_traceBlockByNumber`, `debug_traceBlockByHash`, `debug_traceTransaction`, `debug_traceBlock`, `debug_traceCall` for tracing specified opcodes [#9335](https://github.com/hyperledger/besu/pull/9335) -- Use error code 3 for execution reverted [#9365](https://github.com/hyperledger/besu/pull/9365) -- eth_createAccessList now returns success result if execution reverted [#9358](https://github.com/hyperledger/besu/pull/9358) - Use Eclipse Temurin OpenJDK JRE in Besu docker image [#9392](https://github.com/hyperledger/besu/pull/9392) - Performance: 5-6x faster toFastHex calculation for engine_getBlobsV2 [#9426](https://github.com/hyperledger/besu/pull/9426) - Add Linea named networks for mainnet and sepolia on Linea network [#9436](https://github.com/hyperledger/besu/pull/9436) -- Remove PoW specific RPCs: `eth_getMinerDataByBlockHash`, `eth_getMinerDataByBlockNumber`, `miner_setCoinbase`, `miner_setEtherbase` [#9481](https://github.com/hyperledger/besu/pull/9481) ### Bug fixes - Fix loss of colored output in terminal when using `--color-enabled=true` option [#8908](https://github.com/hyperledger/besu/issues/8908) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AbstractBlockParameterOrBlockHashMethod.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AbstractBlockParameterOrBlockHashMethod.java index ba3bcd69c63..5987605c9cd 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AbstractBlockParameterOrBlockHashMethod.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AbstractBlockParameterOrBlockHashMethod.java @@ -105,11 +105,12 @@ protected Object handleParamTypes(final JsonRpcRequestContext requestContext) { } else if (blockParameterOrBlockHash.isNumeric() || blockParameterOrBlockHash.isEarliest()) { final OptionalLong blockNumber = blockParameterOrBlockHash.getNumber(); if (blockNumber.isEmpty() || blockNumber.getAsLong() < 0) { + // TODO should this be null result or invalid params? return new JsonRpcErrorResponse( requestContext.getRequest().getId(), RpcErrorType.INVALID_BLOCK_NUMBER_PARAMS); } else if (blockNumber.getAsLong() > getBlockchainQueries().headBlockNumber()) { - return new JsonRpcErrorResponse( - requestContext.getRequest().getId(), RpcErrorType.BLOCK_NOT_FOUND); + // return null if a future block is requested + return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), null); } result = @@ -122,19 +123,17 @@ protected Object handleParamTypes(final JsonRpcRequestContext requestContext) { } else { Optional blockHash = blockParameterOrBlockHash.getHash(); if (blockHash.isEmpty()) { - return new JsonRpcErrorResponse( - requestContext.getRequest().getId(), RpcErrorType.INVALID_BLOCK_HASH_PARAMS); + return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), null); } - // return error if block hash does not find a block + // return null if block hash does not find a block Optional maybeBlockHeader = getBlockchainQueries().getBlockHeaderByHash(blockHash.get()); if (maybeBlockHeader.isEmpty()) { - return new JsonRpcErrorResponse( - requestContext.getRequest().getId(), RpcErrorType.BLOCK_NOT_FOUND); + return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), null); } - if (Boolean.TRUE.equals(blockParameterOrBlockHash.getRequireCanonical()) + if (blockParameterOrBlockHash.getRequireCanonical() && !getBlockchainQueries().blockIsOnCanonicalChain(blockHash.get())) { return new JsonRpcErrorResponse( requestContext.getRequest().getId(), RpcErrorType.JSON_RPC_NOT_CANONICAL_ERROR); @@ -150,7 +149,7 @@ protected Object handleParamTypes(final JsonRpcRequestContext requestContext) { public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { Object response = handleParamTypes(requestContext); - if (response instanceof JsonRpcErrorResponse) { + if (response instanceof JsonRpcResponse) { return (JsonRpcResponse) response; } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugAccountAtTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugAccountAtTest.java index 5695d9b8e92..fa930b3c9eb 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugAccountAtTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugAccountAtTest.java @@ -88,7 +88,7 @@ void nameShouldBeDebugAccountAt() { } @Test - void testBlockNotFoundResponse() { + void shouldReturnNullWhenBlockNotFound() { Mockito.when(blockchainQueries.getBlockHeaderByHash(any())).thenReturn(Optional.empty()); final Object[] params = new Object[] {Hash.ZERO.toHexString(), 0, Address.ZERO.toHexString()}; @@ -96,9 +96,8 @@ void testBlockNotFoundResponse() { new JsonRpcRequestContext(new JsonRpcRequest("2.0", "debug_accountAt", params)); final JsonRpcResponse response = debugAccountAt.response(request); - Assertions.assertThat(response).isInstanceOf(JsonRpcErrorResponse.class); - Assertions.assertThat(((JsonRpcErrorResponse) response).getErrorType()) - .isEqualByComparingTo(RpcErrorType.BLOCK_NOT_FOUND); + Assertions.assertThat(response).isInstanceOf(JsonRpcSuccessResponse.class); + Assertions.assertThat(((JsonRpcSuccessResponse) response).getResult()).isNull(); } @Test diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugSetHeadTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugSetHeadTest.java index 62e33218d25..7a0ebd2ac01 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugSetHeadTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugSetHeadTest.java @@ -24,6 +24,7 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.BlockParameterOrBlockHash; +import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse; import org.hyperledger.besu.ethereum.api.query.BlockchainQueries; import org.hyperledger.besu.ethereum.chain.Blockchain; import org.hyperledger.besu.ethereum.core.BlockHeader; @@ -146,13 +147,15 @@ public void assertBothChainHeadAndWorldStatByNumber(final String blockParam) { } @Test - public void assertNotFound() { + public void assertNullWhenBlockNotFound() { var chainTip = blockchain.getChainHead().getBlockHeader(); // move the head to number just after chain head var resp = debugSetHead.response(debugSetHead("" + chainTip.getNumber() + 1, Optional.of(TRUE))); - assertThat(resp.getType()).isEqualTo(RpcResponseType.ERROR); + // success with null result if block not found + assertThat(resp.getType()).isEqualTo(RpcResponseType.SUCCESS); + assertThat(((JsonRpcSuccessResponse) resp).getResult()).isNull(); // move the head to some arbitrary hash var resp2 = @@ -160,7 +163,10 @@ public void assertNotFound() { debugSetHead( Hash.keccak256(Bytes.fromHexString("0xdeadbeef")).toHexString(), Optional.of(TRUE))); - assertThat(resp2.getType()).isEqualTo(RpcResponseType.ERROR); + + // success with null result if block not found + assertThat(resp2.getType()).isEqualTo(RpcResponseType.SUCCESS); + assertThat(((JsonRpcSuccessResponse) resp2).getResult()).isNull(); // get the new chainTip: var newChainTip = blockchain.getChainHead().getBlockHeader(); diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthCallTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthCallTest.java index 0226de9ce0d..e802de2ca26 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthCallTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthCallTest.java @@ -15,7 +15,6 @@ package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods; import static org.assertj.core.api.Assertions.assertThat; -import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType.BLOCK_NOT_FOUND; import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType.INTERNAL_ERROR; import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType.REVERT_ERROR; import static org.mockito.ArgumentMatchers.any; @@ -64,6 +63,7 @@ import java.util.OptionalLong; import org.apache.tuweni.bytes.Bytes; +import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -486,13 +486,14 @@ public void shouldUseCorrectBlockNumberWhenSpecified() { } @Test - public void shouldReturnBlockNotFoundWhenInvalidBlockNumberSpecified() { + public void shouldReturnNullWhenInvalidBlockNumberSpecified() { final JsonRpcRequestContext request = ethCallRequest(callParameter(), Quantity.create(33L)); when(blockchainQueries.headBlockNumber()).thenReturn(14L); - final JsonRpcResponse expectedResponse = new JsonRpcErrorResponse(null, BLOCK_NOT_FOUND); final JsonRpcResponse response = method.response(request); - assertThat(response).usingRecursiveComparison().isEqualTo(expectedResponse); + + Assertions.assertThat(response).isInstanceOf(JsonRpcSuccessResponse.class); + Assertions.assertThat(((JsonRpcSuccessResponse) response).getResult()).isNull(); verify(blockchainQueries).headBlockNumber(); } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetBlockReceiptsTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetBlockReceiptsTest.java index f25407c86e6..fea579d9724 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetBlockReceiptsTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetBlockReceiptsTest.java @@ -25,10 +25,8 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters; -import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse; -import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.BlockReceiptsResult; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.TransactionReceiptResult; import org.hyperledger.besu.ethereum.api.query.BlockchainQueries; @@ -65,8 +63,7 @@ public class EthGetBlockReceiptsTest { private static final BlockDataGenerator blockDataGenerator = new BlockDataGenerator(); private EthGetBlockReceipts method; private ProtocolSchedule protocolSchedule; - final JsonRpcResponse blockNotFoundResponse = - new JsonRpcErrorResponse(null, RpcErrorType.BLOCK_NOT_FOUND); + final JsonRpcResponse blockNotFoundResponse = new JsonRpcSuccessResponse(null, null); @BeforeEach public void setUp() { diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetProofTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetProofTest.java index 557eb48145f..45dfc9c22fc 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetProofTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetProofTest.java @@ -22,9 +22,8 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters; -import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse; +import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse; -import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.proof.GetProofResult; import org.hyperledger.besu.ethereum.api.query.BlockchainQueries; import org.hyperledger.besu.ethereum.chain.MutableBlockchain; @@ -121,10 +120,7 @@ void errorWhenNoBlockNumberSupplied() { } @Test - void errorWhenWorldStateUnavailable() { - - final JsonRpcErrorResponse expectedResponse = - new JsonRpcErrorResponse(null, RpcErrorType.BLOCK_NOT_FOUND); + void shouldReturnNullWhenWorldStateUnavailable() { final JsonRpcRequestContext request = requestWithParams( @@ -132,9 +128,10 @@ void errorWhenWorldStateUnavailable() { new String[] {storageKey.toString()}, String.valueOf(501)); - final JsonRpcErrorResponse response = (JsonRpcErrorResponse) method.response(request); + final JsonRpcResponse response = method.response(request); - assertThat(response).usingRecursiveComparison().isEqualTo(expectedResponse); + Assertions.assertThat(response).isInstanceOf(JsonRpcSuccessResponse.class); + Assertions.assertThat(((JsonRpcSuccessResponse) response).getResult()).isNull(); } @Test diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1Test.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1Test.java index 52d6f05de6d..94b12b52128 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1Test.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1Test.java @@ -15,7 +15,6 @@ package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods; import static org.assertj.core.api.Assertions.assertThat; -import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType.BLOCK_NOT_FOUND; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -23,8 +22,8 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.SimulateV1Parameter; -import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse; +import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.Quantity; import org.hyperledger.besu.ethereum.api.query.BlockchainQueries; import org.hyperledger.besu.ethereum.core.MiningConfiguration; @@ -35,6 +34,7 @@ import java.util.List; import java.util.Optional; +import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -76,14 +76,16 @@ public void shouldReturnCorrectMethodName() { } @Test - public void shouldReturnBlockNotFoundWhenInvalidBlockNumberSpecified() { + public void shouldReturnNullWhenInvalidBlockNumberSpecified() { final JsonRpcRequestContext request = ethSimulateV1Request(simulateParameter(), Quantity.create(33L)); when(blockchainQueries.headBlockNumber()).thenReturn(14L); - final JsonRpcResponse expectedResponse = new JsonRpcErrorResponse(null, BLOCK_NOT_FOUND); final JsonRpcResponse response = method.response(request); - assertThat(response).usingRecursiveComparison().isEqualTo(expectedResponse); + + Assertions.assertThat(response).isInstanceOf(JsonRpcSuccessResponse.class); + Assertions.assertThat(((JsonRpcSuccessResponse) response).getResult()).isNull(); + verify(blockchainQueries).headBlockNumber(); } diff --git a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBalance_illegalRangeGreaterThan.json b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBalance_illegalRangeGreaterThan.json index e295e3fdc42..8bf3d139651 100644 --- a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBalance_illegalRangeGreaterThan.json +++ b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBalance_illegalRangeGreaterThan.json @@ -11,10 +11,7 @@ "response": { "jsonrpc": "2.0", "id": 28, - "error": { - "code": -32000, - "message": "Block not found" - } + "result": null }, "statusCode": 200 } \ No newline at end of file diff --git a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBlockReceiptsByHash_NotFound.json b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBlockReceiptsByHash_NotFound.json index 32d19394a48..e6be755ca17 100644 --- a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBlockReceiptsByHash_NotFound.json +++ b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBlockReceiptsByHash_NotFound.json @@ -8,12 +8,9 @@ ] }, "response": { - "jsonrpc": "2.0", - "id": 303, - "error" : { - "code" : -32000, - "message" : "Block not found" - } -}, + "jsonrpc": "2.0", + "id": 303, + "result": null + }, "statusCode": 200 } \ No newline at end of file diff --git a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBlockReceiptsByNumber_NotFound.json b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBlockReceiptsByNumber_NotFound.json index 37453eadb42..1a2d69c007d 100644 --- a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBlockReceiptsByNumber_NotFound.json +++ b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBlockReceiptsByNumber_NotFound.json @@ -8,12 +8,9 @@ ] }, "response": { - "jsonrpc": "2.0", - "id": 306, - "error" : { - "code" : -32000, - "message" : "Block not found" - } -}, + "jsonrpc": "2.0", + "id": 306, + "result": null + }, "statusCode": 200 } \ No newline at end of file diff --git a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getCode_blockHashNotExist.json b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getCode_blockHashNotExist.json index 4dd50c50ae6..b61b56db956 100644 --- a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getCode_blockHashNotExist.json +++ b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getCode_blockHashNotExist.json @@ -11,10 +11,7 @@ "response": { "jsonrpc": "2.0", "id": 250, - "error" : { - "code" : -32000, - "message" : "Block not found" - } + "result": null }, "statusCode": 200 } \ No newline at end of file diff --git a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getCode_illegalRangeGreaterThan.json b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getCode_illegalRangeGreaterThan.json index dda543cef5b..7b1bbbf61c6 100644 --- a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getCode_illegalRangeGreaterThan.json +++ b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getCode_illegalRangeGreaterThan.json @@ -11,10 +11,7 @@ "response": { "jsonrpc": "2.0", "id": 13, - "error": { - "code": -32000, - "message": "Block not found" - } + "result": null }, "statusCode": 200 } \ No newline at end of file diff --git a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_illegalRangeGreaterThan.json b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_illegalRangeGreaterThan.json index d588ddf8287..8ea210e4528 100644 --- a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_illegalRangeGreaterThan.json +++ b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_illegalRangeGreaterThan.json @@ -12,10 +12,7 @@ "response": { "jsonrpc": "2.0", "id": 28, - "error": { - "code": -32000, - "message": "Block not found" - } + "result": null }, "statusCode": 200 } \ No newline at end of file diff --git a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getStorageAt_illegalRangeGreaterThan.json b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getStorageAt_illegalRangeGreaterThan.json index 22fb546847d..31127104b7b 100644 --- a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getStorageAt_illegalRangeGreaterThan.json +++ b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getStorageAt_illegalRangeGreaterThan.json @@ -12,10 +12,7 @@ "response": { "jsonrpc": "2.0", "id": 337, - "error": { - "code": -32000, - "message": "Block not found" - } + "result": null }, "statusCode": 200 } \ No newline at end of file diff --git a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getTransactionCount_illegalRange.json b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getTransactionCount_illegalRange.json index 462e8354c39..9ceb071d9f5 100644 --- a/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getTransactionCount_illegalRange.json +++ b/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getTransactionCount_illegalRange.json @@ -11,10 +11,7 @@ "response": { "jsonrpc": "2.0", "id": 487, - "error": { - "code": -32000, - "message": "Block not found" - } + "result": null }, "statusCode": 200 }