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

Bug in engine_getClientVersionV1 response #7661

Open
michaelsproul opened this issue Sep 23, 2024 · 2 comments · May be fixed by #7663
Open

Bug in engine_getClientVersionV1 response #7661

michaelsproul opened this issue Sep 23, 2024 · 2 comments · May be fixed by #7663
Labels
bug Something isn't working RPC

Comments

@michaelsproul
Copy link

Description

Besu seems to not be following the current spec for engine_getClientVersionV1:

@Override
public JsonRpcResponse syncResponse(final JsonRpcRequestContext request) {
return new JsonRpcSuccessResponse(
request.getRequest().getId(),
new EngineGetClientVersionResultV1(
ENGINE_CLIENT_CODE, ENGINE_CLIENT_NAME, clientVersion, commit.substring(0, 8)));
}

To me this looks like a single client version object will be returned, but the correct format is a list of versions (usually with 1 element). Spec:

https://github.com/ethereum/execution-apis/blob/main/src/engine/identification.md#engine_getclientversionv1

We had a bug report on Lighthouse that seems to match this interpretation:

Sep 21 19:05:11.003 WARN Execution engine call failed error: Json(Error("invalid type: map, expected a sequence", line: 0, column: 0)), service: exec
Sep 21 19:05:11.003 WARN Failed to populate engine version cache, error: ApiError(Json(Error("invalid type: map, expected a sequence", line: 0, column: 0))), service: beacon

Lighthouse is expecting a list (sequence) but received a map/JSON object.

Versions (Add all that apply)

User reported this issue with Besu version v24.9.1, which as far as I can tell is the first version where the endpoint is supported (according to the release notes).

I don't have any other details about their setup, but I don't think they're relevant for this issue.

@jframe
Copy link
Contributor

jframe commented Sep 23, 2024

You're right it is broken in Besu, we are just returning a single ClientVersion1 instead of an array of ClientVersion1.

@jframe jframe added bug Something isn't working RPC labels Sep 23, 2024
@michaelsproul
Copy link
Author

From memory there was a draft version of the spec where the response wasn't a list, so might have just been a hangover from that.

Thanks!

@7suyash7 7suyash7 linked a pull request Sep 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working RPC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants