fix: update getNodeVersionV2 execution_client to array per spec#8888
Conversation
Summary of ChangesHello @lodekeeper, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request modernizes the API for retrieving node version information by aligning it with an updated beacon-APIs specification. The core change involves transitioning the representation of execution client data from a single object to an array of objects, which is crucial for supporting scenarios with multiplexed execution layer connections. This ensures the system can accurately report all connected execution clients, enhancing compatibility and robustness. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly updates the getNodeVersionV2 endpoint to align with the latest beacon-APIs specification, changing execution_client to be an array of ClientVersion. The changes are consistently applied across type definitions, implementations, and tests. My review includes a suggestion to improve logging for better observability in scenarios with multiple execution clients.
The beacon-APIs spec (PR ChainSafe#568) changed execution_client from a single ClientVersionV1 to an array of ClientVersionV1 to support multiplexed EL connections where engine_getClientVersionV1 may return multiple entries. Changes: - NodeVersionV2.executionClient type is now ClientVersion[] (optional array) - API layer wraps single clientVersion in array for the response - Execution engine internals unchanged (still stores single clientVersion) - Test data updated to match new array type
a5b9895 to
e2c1d6c
Compare
Define ClientVersionType and NodeVersionV2Type SSZ containers for proper JSON serialization with eth2 case convention (camelCase <-> snake_case). Marked as JSON-only since string fields don't support SSZ binary encoding.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## nflaig/node-version-v2 #8888 +/- ##
=======================================================
Coverage 52.33% 52.33%
=======================================================
Files 848 848
Lines 63467 63467
Branches 4703 4703
=======================================================
Hits 33216 33216
Misses 30182 30182
Partials 69 69 🚀 New features to boost your workflow:
|
Description
Updates the
getNodeVersionV2endpoint to match the latest beacon-APIs spec (PR #568), which changedexecution_clientfrom a singleClientVersionV1to an array ofClientVersionV1.This supports multiplexed EL connections where
engine_getClientVersionV1may return multiple entries.Changes
NodeVersionV2.executionClient→ClientVersion[](optional array)IExecutionEngine.clientVersion→clientVersions(stores full array from Engine API)clientVersions?.[0]for the default graffiti stringSpec Reference
From
apis/node/version.v2.yaml:This PR was authored with AI assistance (Claude/Lodekeeper 🌟)