Skip to content

Commit

Permalink
change invalid block param error message (#8328)
Browse files Browse the repository at this point in the history
* change invalid block param error message

Signed-off-by: Sally MacFarlane <[email protected]>

---------

Signed-off-by: Sally MacFarlane <[email protected]>
  • Loading branch information
macfarla authored Feb 21, 2025
1 parent 679e0de commit ecda0cd
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 20 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,6 @@ public void shouldHandleInvalidParametersGracefully() {
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)");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ecda0cd

Please sign in to comment.