Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change invalid block param error message #8328

Merged
merged 6 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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