change invalid block param error message (#8328)

* change invalid block param error message

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
This commit is contained in:
Sally MacFarlane
2025-02-21 10:23:05 +10:00
committed by GitHub
parent 679e0dec1a
commit ecda0cdbb2
21 changed files with 22 additions and 20 deletions

View File

@@ -3,6 +3,7 @@
## Unreleased
### Breaking Changes
- k8s (KUBERNETES) Nat method is removed. Use docker or none instead. [#8289](https://github.com/hyperledger/besu/pull/8289)
- Change "Invalid block, unable to parse RLP" RPC error message to "Invalid block param (block not found)" [#8328](https://github.com/hyperledger/besu/pull/8328)
### Upcoming Breaking Changes
- `MetricSystem::createLabelledGauge` is deprecated and will be removed in a future release, replace it with `MetricSystem::createLabelledSuppliedGauge`
@@ -23,6 +24,7 @@
- Allow plugins to propose transactions during block creation [#8268](https://github.com/hyperledger/besu/pull/8268)
- Update `eth_getLogs` to return a `Block not found` error when the requested block is not found. [#8290](https://github.com/hyperledger/besu/pull/8290)
- Improve Conflict Detection in Parallelization by Considering Slots to Reduce False Positives. [#7923](https://github.com/hyperledger/besu/pull/7923)
- Change "Invalid block, unable to parse RLP" RPC error message to "Invalid block param (block not found)" [#8328](https://github.com/hyperledger/besu/pull/8328)
### Bug fixes
- Upgrade Netty to version 4.1.118 to fix CVE-2025-24970 [#8275](https://github.com/hyperledger/besu/pull/8275)
- Add missing RPC method `debug_accountRange` to `RpcMethod.java` and implemented its handler. [#8153](https://github.com/hyperledger/besu/issues/8153)

View File

@@ -36,7 +36,7 @@ public enum RpcErrorType implements RpcMethodError {
"Invalid blob count (blob transactions must have at least one blob)"),
INVALID_BLOB_GAS_USED_PARAMS(
INVALID_PARAMS_ERROR_CODE, "Invalid blob gas used param (missing or invalid)"),
INVALID_BLOCK_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid block, unable to parse RLP"),
INVALID_BLOCK_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid block param (block not found)"),
INVALID_BLOCK_COUNT_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid block count params"),
INVALID_BLOCK_HASH_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid block hash params"),
INVALID_BLOCK_INDEX_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid block index params"),

View File

@@ -208,6 +208,6 @@ public class DebugTraceBlockTest {
assertThat(jsonRpcResponse).isInstanceOf(JsonRpcErrorResponse.class);
final JsonRpcErrorResponse response = (JsonRpcErrorResponse) debugTraceBlock.response(request);
assertThat(response.getError().getMessage()).contains("Invalid block, unable to parse RLP");
assertThat(response.getError().getMessage()).contains("Invalid block param (block not found)");
}
}

View File

@@ -12,7 +12,7 @@
"id": 4,
"error":{
"code":-32602,
"message":"Invalid block, unable to parse RLP"
"message":"Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -17,7 +17,7 @@
"id": 3,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -13,7 +13,7 @@
"id": 28,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -10,7 +10,7 @@
"id": 32,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -12,7 +12,7 @@
"id": 300,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -12,7 +12,7 @@
"id": 301,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -10,7 +10,7 @@
"id": 248,
"error": {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -13,7 +13,7 @@
"id": 0,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -10,7 +10,7 @@
"id": 255,
"error": {
"code": -32602,
"message": "Invalid block, unable to parse RLP"
"message": "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -14,7 +14,7 @@
"id": 28,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -10,7 +10,7 @@
"id": 28,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -14,7 +14,7 @@
"id": 341,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -10,7 +10,7 @@
"id": 342,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -10,7 +10,7 @@
"id": 486,
"error": {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -13,7 +13,7 @@
"id": 487,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -13,7 +13,7 @@
"id": 487,
"error" : {
"code" : -32602,
"message" : "Invalid block, unable to parse RLP"
"message" : "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -10,7 +10,7 @@
"id": 489,
"error": {
"code": -32602,
"message": "Invalid block, unable to parse RLP"
"message": "Invalid block param (block not found)"
}
},
"statusCode": 200

View File

@@ -13,7 +13,7 @@
"id": 415,
"error": {
"code": -32602,
"message": "Invalid block, unable to parse RLP"
"message": "Invalid block param (block not found)"
}
},
"statusCode": 200