Skip to content

feat: add getNodeVersionV2 endpoint#8772

Draft
nflaig wants to merge 4 commits intounstablefrom
nflaig/node-version-v2
Draft

feat: add getNodeVersionV2 endpoint#8772
nflaig wants to merge 4 commits intounstablefrom
nflaig/node-version-v2

Conversation

@nflaig
Copy link
Member

@nflaig nflaig commented Jan 21, 2026

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @nflaig, 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 enhances the API by adding a new endpoint that provides detailed, structured version information for both the beacon node and its associated execution client. This standardization aligns with the Ethereum Engine API, making it easier to identify the specific client implementations and their versions, which is crucial for network diagnostics and compatibility checks.

Highlights

  • New API Endpoint: Introduced a new endpoint /eth/v2/node/version (getNodeVersionV2) to retrieve structured version information for both the beacon node and its connected execution client.
  • Client Identification Types: Added ClientCode enum, ClientVersion type, and NodeVersionV2 type to standardize client identification, mirroring the Ethereum Engine API specification.
  • Centralized Type Definitions: Refactored ClientCode and ClientVersion definitions to be centralized within packages/api/src/beacon/routes/node.ts and re-exported where needed, removing duplication from packages/beacon-node/src/execution/engine/interface.ts.

🧠 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.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces a new getNodeVersionV2 endpoint, providing structured version information for both the beacon node and its execution client. This change centralizes the ClientCode enum and ClientVersion type definitions in packages/api/src/beacon/routes/node.ts, which are then re-exported and used across the codebase. The implementation correctly retrieves client versions and includes a robust fallback for unknown execution clients. Test data for the new endpoint has also been added, ensuring proper functionality. The changes are well-structured and improve consistency by consolidating type definitions.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: aa2cf84 Previous: 45b0426 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.4524 ms/op 888.72 us/op 1.63
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 37.415 us/op 34.559 us/op 1.08
BLS verify - blst 751.83 us/op 862.37 us/op 0.87
BLS verifyMultipleSignatures 3 - blst 1.1283 ms/op 1.2847 ms/op 0.88
BLS verifyMultipleSignatures 8 - blst 1.5955 ms/op 2.1370 ms/op 0.75
BLS verifyMultipleSignatures 32 - blst 4.6823 ms/op 4.5584 ms/op 1.03
BLS verifyMultipleSignatures 64 - blst 8.7631 ms/op 8.6243 ms/op 1.02
BLS verifyMultipleSignatures 128 - blst 17.171 ms/op 16.488 ms/op 1.04
BLS deserializing 10000 signatures 659.90 ms/op 640.21 ms/op 1.03
BLS deserializing 100000 signatures 6.7536 s/op 6.1574 s/op 1.10
BLS verifyMultipleSignatures - same message - 3 - blst 864.51 us/op 932.23 us/op 0.93
BLS verifyMultipleSignatures - same message - 8 - blst 1.0067 ms/op 1.0582 ms/op 0.95
BLS verifyMultipleSignatures - same message - 32 - blst 1.6954 ms/op 1.6434 ms/op 1.03
BLS verifyMultipleSignatures - same message - 64 - blst 2.5150 ms/op 2.4603 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.2161 ms/op 4.0066 ms/op 1.05
BLS aggregatePubkeys 32 - blst 18.686 us/op 17.041 us/op 1.10
BLS aggregatePubkeys 128 - blst 67.148 us/op 60.115 us/op 1.12
getSlashingsAndExits - default max 65.417 us/op 42.188 us/op 1.55
getSlashingsAndExits - 2k 304.06 us/op 331.49 us/op 0.92
isKnown best case - 1 super set check 188.00 ns/op 399.00 ns/op 0.47
isKnown normal case - 2 super set checks 185.00 ns/op 403.00 ns/op 0.46
isKnown worse case - 16 super set checks 185.00 ns/op 406.00 ns/op 0.46
validate api signedAggregateAndProof - struct 1.3034 ms/op 1.9981 ms/op 0.65
validate gossip signedAggregateAndProof - struct 1.3249 ms/op 1.9152 ms/op 0.69
batch validate gossip attestation - vc 640000 - chunk 32 111.59 us/op 110.14 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 97.801 us/op 109.76 us/op 0.89
batch validate gossip attestation - vc 640000 - chunk 128 92.261 us/op 86.393 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 256 88.111 us/op 82.160 us/op 1.07
bytes32 toHexString 349.00 ns/op 513.00 ns/op 0.68
bytes32 Buffer.toString(hex) 235.00 ns/op 410.00 ns/op 0.57
bytes32 Buffer.toString(hex) from Uint8Array 318.00 ns/op 498.00 ns/op 0.64
bytes32 Buffer.toString(hex) + 0x 234.00 ns/op 413.00 ns/op 0.57
Return object 10000 times 0.22120 ns/op 0.23030 ns/op 0.96
Throw Error 10000 times 3.8834 us/op 3.3913 us/op 1.15
toHex 149.28 ns/op 91.026 ns/op 1.64
Buffer.from 124.43 ns/op 85.905 ns/op 1.45
shared Buffer 74.757 ns/op 57.925 ns/op 1.29
fastMsgIdFn sha256 / 200 bytes 1.7560 us/op 1.6250 us/op 1.08
fastMsgIdFn h32 xxhash / 200 bytes 184.00 ns/op 369.00 ns/op 0.50
fastMsgIdFn h64 xxhash / 200 bytes 249.00 ns/op 453.00 ns/op 0.55
fastMsgIdFn sha256 / 1000 bytes 5.7650 us/op 5.0480 us/op 1.14
fastMsgIdFn h32 xxhash / 1000 bytes 278.00 ns/op 463.00 ns/op 0.60
fastMsgIdFn h64 xxhash / 1000 bytes 297.00 ns/op 524.00 ns/op 0.57
fastMsgIdFn sha256 / 10000 bytes 50.267 us/op 39.975 us/op 1.26
fastMsgIdFn h32 xxhash / 10000 bytes 1.3280 us/op 1.4600 us/op 0.91
fastMsgIdFn h64 xxhash / 10000 bytes 881.00 ns/op 1.1050 us/op 0.80
send data - 1000 256B messages 13.414 ms/op 11.360 ms/op 1.18
send data - 1000 512B messages 15.771 ms/op 14.157 ms/op 1.11
send data - 1000 1024B messages 20.847 ms/op 16.975 ms/op 1.23
send data - 1000 1200B messages 19.785 ms/op 14.723 ms/op 1.34
send data - 1000 2048B messages 21.704 ms/op 16.212 ms/op 1.34
send data - 1000 4096B messages 24.720 ms/op 15.522 ms/op 1.59
send data - 1000 16384B messages 120.70 ms/op 103.41 ms/op 1.17
send data - 1000 65536B messages 278.89 ms/op 208.57 ms/op 1.34
enrSubnets - fastDeserialize 64 bits 868.00 ns/op 968.00 ns/op 0.90
enrSubnets - ssz BitVector 64 bits 329.00 ns/op 525.00 ns/op 0.63
enrSubnets - fastDeserialize 4 bits 120.00 ns/op 331.00 ns/op 0.36
enrSubnets - ssz BitVector 4 bits 325.00 ns/op 512.00 ns/op 0.63
prioritizePeers score -10:0 att 32-0.1 sync 2-0 222.29 us/op 253.27 us/op 0.88
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 251.38 us/op 288.97 us/op 0.87
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 360.06 us/op 341.18 us/op 1.06
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 665.98 us/op 604.66 us/op 1.10
prioritizePeers score 0:0 att 64-1 sync 4-1 808.30 us/op 1.0145 ms/op 0.80
array of 16000 items push then shift 1.5285 us/op 1.1757 us/op 1.30
LinkedList of 16000 items push then shift 6.9660 ns/op 7.3690 ns/op 0.95
array of 16000 items push then pop 73.668 ns/op 62.529 ns/op 1.18
LinkedList of 16000 items push then pop 6.9160 ns/op 6.0270 ns/op 1.15
array of 24000 items push then shift 2.3009 us/op 1.7619 us/op 1.31
LinkedList of 24000 items push then shift 7.2250 ns/op 7.0310 ns/op 1.03
array of 24000 items push then pop 102.06 ns/op 88.270 ns/op 1.16
LinkedList of 24000 items push then pop 7.0260 ns/op 6.0430 ns/op 1.16
intersect bitArray bitLen 8 5.4870 ns/op 4.6380 ns/op 1.18
intersect array and set length 8 31.847 ns/op 28.145 ns/op 1.13
intersect bitArray bitLen 128 26.456 ns/op 25.046 ns/op 1.06
intersect array and set length 128 533.52 ns/op 469.30 ns/op 1.14
bitArray.getTrueBitIndexes() bitLen 128 992.00 ns/op 1.1470 us/op 0.86
bitArray.getTrueBitIndexes() bitLen 248 1.7440 us/op 1.9490 us/op 0.89
bitArray.getTrueBitIndexes() bitLen 512 3.5940 us/op 3.7820 us/op 0.95
Full columns - reconstruct all 6 blobs 356.75 us/op 305.72 us/op 1.17
Full columns - reconstruct half of the blobs out of 6 105.04 us/op 93.762 us/op 1.12
Full columns - reconstruct single blob out of 6 30.600 us/op 30.040 us/op 1.02
Half columns - reconstruct all 6 blobs 255.00 ms/op 235.52 ms/op 1.08
Half columns - reconstruct half of the blobs out of 6 129.66 ms/op 119.02 ms/op 1.09
Half columns - reconstruct single blob out of 6 47.038 ms/op 44.629 ms/op 1.05
Full columns - reconstruct all 10 blobs 294.81 us/op 350.53 us/op 0.84
Full columns - reconstruct half of the blobs out of 10 156.11 us/op 202.27 us/op 0.77
Full columns - reconstruct single blob out of 10 30.770 us/op 35.998 us/op 0.85
Half columns - reconstruct all 10 blobs 423.64 ms/op 390.04 ms/op 1.09
Half columns - reconstruct half of the blobs out of 10 214.07 ms/op 198.50 ms/op 1.08
Half columns - reconstruct single blob out of 10 47.820 ms/op 44.291 ms/op 1.08
Full columns - reconstruct all 20 blobs 709.11 us/op 657.74 us/op 1.08
Full columns - reconstruct half of the blobs out of 20 252.49 us/op 316.49 us/op 0.80
Full columns - reconstruct single blob out of 20 29.721 us/op 39.331 us/op 0.76
Half columns - reconstruct all 20 blobs 845.55 ms/op 779.82 ms/op 1.08
Half columns - reconstruct half of the blobs out of 20 424.41 ms/op 427.59 ms/op 0.99
Half columns - reconstruct single blob out of 20 47.394 ms/op 44.501 ms/op 1.07
Set add up to 64 items then delete first 2.0071 us/op 1.6665 us/op 1.20
OrderedSet add up to 64 items then delete first 2.9450 us/op 2.5391 us/op 1.16
Set add up to 64 items then delete last 2.2344 us/op 1.7757 us/op 1.26
OrderedSet add up to 64 items then delete last 3.1770 us/op 2.5973 us/op 1.22
Set add up to 64 items then delete middle 2.2485 us/op 1.7872 us/op 1.26
OrderedSet add up to 64 items then delete middle 4.7435 us/op 4.3565 us/op 1.09
Set add up to 128 items then delete first 4.7667 us/op 3.4357 us/op 1.39
OrderedSet add up to 128 items then delete first 6.9826 us/op 5.4183 us/op 1.29
Set add up to 128 items then delete last 4.5209 us/op 3.3265 us/op 1.36
OrderedSet add up to 128 items then delete last 6.4313 us/op 4.9802 us/op 1.29
Set add up to 128 items then delete middle 4.3850 us/op 3.3237 us/op 1.32
OrderedSet add up to 128 items then delete middle 12.681 us/op 10.675 us/op 1.19
Set add up to 256 items then delete first 9.5753 us/op 6.7248 us/op 1.42
OrderedSet add up to 256 items then delete first 14.422 us/op 10.807 us/op 1.33
Set add up to 256 items then delete last 9.0516 us/op 6.7073 us/op 1.35
OrderedSet add up to 256 items then delete last 13.156 us/op 10.289 us/op 1.28
Set add up to 256 items then delete middle 8.8554 us/op 6.6128 us/op 1.34
OrderedSet add up to 256 items then delete middle 38.865 us/op 33.268 us/op 1.17
pass gossip attestations to forkchoice per slot 2.4475 ms/op 2.0377 ms/op 1.20
forkChoice updateHead vc 100000 bc 64 eq 0 480.85 us/op 366.75 us/op 1.31
forkChoice updateHead vc 600000 bc 64 eq 0 2.8694 ms/op 2.1864 ms/op 1.31
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7831 ms/op 3.6375 ms/op 1.31
forkChoice updateHead vc 600000 bc 320 eq 0 2.8457 ms/op 2.1948 ms/op 1.30
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8839 ms/op 2.2232 ms/op 1.30
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2025 ms/op 2.8417 ms/op 1.13
forkChoice updateHead vc 600000 bc 64 eq 1000 3.3175 ms/op 3.0663 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 10000 3.5278 ms/op 4.3265 ms/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 300000 8.2474 ms/op 7.5716 ms/op 1.09
computeDeltas 1400000 validators 0% inactive 13.908 ms/op 13.056 ms/op 1.07
computeDeltas 1400000 validators 10% inactive 13.065 ms/op 12.305 ms/op 1.06
computeDeltas 1400000 validators 20% inactive 12.166 ms/op 11.850 ms/op 1.03
computeDeltas 1400000 validators 50% inactive 9.5409 ms/op 8.4943 ms/op 1.12
computeDeltas 2100000 validators 0% inactive 20.931 ms/op 19.244 ms/op 1.09
computeDeltas 2100000 validators 10% inactive 19.585 ms/op 18.988 ms/op 1.03
computeDeltas 2100000 validators 20% inactive 18.274 ms/op 17.995 ms/op 1.02
computeDeltas 2100000 validators 50% inactive 14.334 ms/op 12.725 ms/op 1.13
altair processAttestation - 250000 vs - 7PWei normalcase 1.8323 ms/op 1.5922 ms/op 1.15
altair processAttestation - 250000 vs - 7PWei worstcase 2.6945 ms/op 2.2843 ms/op 1.18
altair processAttestation - setStatus - 1/6 committees join 115.07 us/op 95.170 us/op 1.21
altair processAttestation - setStatus - 1/3 committees join 229.38 us/op 172.88 us/op 1.33
altair processAttestation - setStatus - 1/2 committees join 318.95 us/op 235.34 us/op 1.36
altair processAttestation - setStatus - 2/3 committees join 414.80 us/op 311.39 us/op 1.33
altair processAttestation - setStatus - 4/5 committees join 574.73 us/op 488.35 us/op 1.18
altair processAttestation - setStatus - 100% committees join 663.15 us/op 568.92 us/op 1.17
altair processBlock - 250000 vs - 7PWei normalcase 3.5766 ms/op 3.0419 ms/op 1.18
altair processBlock - 250000 vs - 7PWei normalcase hashState 16.221 ms/op 14.028 ms/op 1.16
altair processBlock - 250000 vs - 7PWei worstcase 22.536 ms/op 22.491 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase hashState 57.009 ms/op 53.369 ms/op 1.07
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5523 ms/op 1.5764 ms/op 0.98
phase0 processBlock - 250000 vs - 7PWei worstcase 18.856 ms/op 19.693 ms/op 0.96
altair processEth1Data - 250000 vs - 7PWei normalcase 358.80 us/op 295.61 us/op 1.21
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 5.8680 us/op 5.4370 us/op 1.08
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 33.630 us/op 42.736 us/op 0.79
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 9.9440 us/op 13.245 us/op 0.75
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 6.6890 us/op 3.8980 us/op 1.72
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 137.88 us/op 148.38 us/op 0.93
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.7649 ms/op 1.2957 ms/op 1.36
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.1477 ms/op 1.7034 ms/op 1.26
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.1874 ms/op 1.8220 ms/op 1.20
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.4125 ms/op 3.8822 ms/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5202 ms/op 2.1550 ms/op 1.17
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.8571 ms/op 4.2066 ms/op 1.15
Tree 40 250000 create 346.51 ms/op 326.49 ms/op 1.06
Tree 40 250000 get(125000) 119.14 ns/op 87.878 ns/op 1.36
Tree 40 250000 set(125000) 1.1551 us/op 939.27 ns/op 1.23
Tree 40 250000 toArray() 17.037 ms/op 10.760 ms/op 1.58
Tree 40 250000 iterate all - toArray() + loop 12.564 ms/op 10.692 ms/op 1.18
Tree 40 250000 iterate all - get(i) 41.788 ms/op 32.107 ms/op 1.30
Array 250000 create 2.3907 ms/op 1.9959 ms/op 1.20
Array 250000 clone - spread 780.91 us/op 615.17 us/op 1.27
Array 250000 get(125000) 0.33400 ns/op 0.51800 ns/op 0.64
Array 250000 set(125000) 0.33500 ns/op 0.52400 ns/op 0.64
Array 250000 iterate all - loop 59.744 us/op 56.656 us/op 1.05
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.347 ms/op 38.487 ms/op 1.05
Array.fill - length 1000000 5.3763 ms/op 1.8497 ms/op 2.91
Array push - length 1000000 12.085 ms/op 6.7931 ms/op 1.78
Array.get 0.20697 ns/op 0.19625 ns/op 1.05
Uint8Array.get 0.21584 ns/op 0.19954 ns/op 1.08
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.768 ms/op 11.055 ms/op 1.25
altair processEpoch - mainnet_e81889 261.93 ms/op 233.82 ms/op 1.12
mainnet_e81889 - altair beforeProcessEpoch 17.187 ms/op 13.749 ms/op 1.25
mainnet_e81889 - altair processJustificationAndFinalization 5.3510 us/op 5.3560 us/op 1.00
mainnet_e81889 - altair processInactivityUpdates 3.6335 ms/op 3.3345 ms/op 1.09
mainnet_e81889 - altair processRewardsAndPenalties 17.135 ms/op 21.215 ms/op 0.81
mainnet_e81889 - altair processRegistryUpdates 597.00 ns/op 785.00 ns/op 0.76
mainnet_e81889 - altair processSlashings 157.00 ns/op 359.00 ns/op 0.44
mainnet_e81889 - altair processEth1DataReset 152.00 ns/op 356.00 ns/op 0.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9945 ms/op 1.6296 ms/op 1.22
mainnet_e81889 - altair processSlashingsReset 752.00 ns/op 946.00 ns/op 0.79
mainnet_e81889 - altair processRandaoMixesReset 1.0040 us/op 1.3000 us/op 0.77
mainnet_e81889 - altair processHistoricalRootsUpdate 154.00 ns/op 365.00 ns/op 0.42
mainnet_e81889 - altair processParticipationFlagUpdates 474.00 ns/op 694.00 ns/op 0.68
mainnet_e81889 - altair processSyncCommitteeUpdates 126.00 ns/op 337.00 ns/op 0.37
mainnet_e81889 - altair afterProcessEpoch 42.597 ms/op 41.612 ms/op 1.02
capella processEpoch - mainnet_e217614 791.29 ms/op 742.60 ms/op 1.07
mainnet_e217614 - capella beforeProcessEpoch 61.970 ms/op 53.538 ms/op 1.16
mainnet_e217614 - capella processJustificationAndFinalization 5.3480 us/op 5.0310 us/op 1.06
mainnet_e217614 - capella processInactivityUpdates 18.167 ms/op 10.792 ms/op 1.68
mainnet_e217614 - capella processRewardsAndPenalties 101.39 ms/op 97.502 ms/op 1.04
mainnet_e217614 - capella processRegistryUpdates 5.6650 us/op 4.8390 us/op 1.17
mainnet_e217614 - capella processSlashings 156.00 ns/op 383.00 ns/op 0.41
mainnet_e217614 - capella processEth1DataReset 157.00 ns/op 392.00 ns/op 0.40
mainnet_e217614 - capella processEffectiveBalanceUpdates 13.577 ms/op 5.4102 ms/op 2.51
mainnet_e217614 - capella processSlashingsReset 750.00 ns/op 1.1990 us/op 0.63
mainnet_e217614 - capella processRandaoMixesReset 1.0570 us/op 1.3360 us/op 0.79
mainnet_e217614 - capella processHistoricalRootsUpdate 158.00 ns/op 365.00 ns/op 0.43
mainnet_e217614 - capella processParticipationFlagUpdates 485.00 ns/op 680.00 ns/op 0.71
mainnet_e217614 - capella afterProcessEpoch 111.48 ms/op 106.39 ms/op 1.05
phase0 processEpoch - mainnet_e58758 230.81 ms/op 231.79 ms/op 1.00
mainnet_e58758 - phase0 beforeProcessEpoch 46.446 ms/op 48.574 ms/op 0.96
mainnet_e58758 - phase0 processJustificationAndFinalization 5.3970 us/op 5.0540 us/op 1.07
mainnet_e58758 - phase0 processRewardsAndPenalties 16.310 ms/op 17.978 ms/op 0.91
mainnet_e58758 - phase0 processRegistryUpdates 2.6490 us/op 2.4710 us/op 1.07
mainnet_e58758 - phase0 processSlashings 212.00 ns/op 379.00 ns/op 0.56
mainnet_e58758 - phase0 processEth1DataReset 157.00 ns/op 381.00 ns/op 0.41
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 901.38 us/op 879.92 us/op 1.02
mainnet_e58758 - phase0 processSlashingsReset 872.00 ns/op 1.0980 us/op 0.79
mainnet_e58758 - phase0 processRandaoMixesReset 1.0420 us/op 1.2010 us/op 0.87
mainnet_e58758 - phase0 processHistoricalRootsUpdate 157.00 ns/op 443.00 ns/op 0.35
mainnet_e58758 - phase0 processParticipationRecordUpdates 825.00 ns/op 1.4440 us/op 0.57
mainnet_e58758 - phase0 afterProcessEpoch 34.492 ms/op 31.875 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4521 ms/op 1.4895 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9280 ms/op 1.5946 ms/op 1.21
altair processInactivityUpdates - 250000 normalcase 12.349 ms/op 10.400 ms/op 1.19
altair processInactivityUpdates - 250000 worstcase 12.332 ms/op 9.6307 ms/op 1.28
phase0 processRegistryUpdates - 250000 normalcase 4.4970 us/op 4.1790 us/op 1.08
phase0 processRegistryUpdates - 250000 badcase_full_deposits 208.54 us/op 243.01 us/op 0.86
phase0 processRegistryUpdates - 250000 worstcase 0.5 62.702 ms/op 63.454 ms/op 0.99
altair processRewardsAndPenalties - 250000 normalcase 15.462 ms/op 13.135 ms/op 1.18
altair processRewardsAndPenalties - 250000 worstcase 14.986 ms/op 18.518 ms/op 0.81
phase0 getAttestationDeltas - 250000 normalcase 6.5750 ms/op 5.5053 ms/op 1.19
phase0 getAttestationDeltas - 250000 worstcase 6.5986 ms/op 5.0546 ms/op 1.31
phase0 processSlashings - 250000 worstcase 76.366 us/op 92.116 us/op 0.83
altair processSyncCommitteeUpdates - 250000 10.422 ms/op 9.2651 ms/op 1.12
BeaconState.hashTreeRoot - No change 194.00 ns/op 415.00 ns/op 0.47
BeaconState.hashTreeRoot - 1 full validator 89.424 us/op 87.306 us/op 1.02
BeaconState.hashTreeRoot - 32 full validator 1.0324 ms/op 980.96 us/op 1.05
BeaconState.hashTreeRoot - 512 full validator 7.1692 ms/op 6.5908 ms/op 1.09
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 102.33 us/op 93.423 us/op 1.10
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5708 ms/op 1.5169 ms/op 1.04
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.302 ms/op 13.433 ms/op 1.36
BeaconState.hashTreeRoot - 1 balances 95.034 us/op 73.836 us/op 1.29
BeaconState.hashTreeRoot - 32 balances 778.51 us/op 801.90 us/op 0.97
BeaconState.hashTreeRoot - 512 balances 5.7462 ms/op 4.8058 ms/op 1.20
BeaconState.hashTreeRoot - 250000 balances 136.02 ms/op 131.01 ms/op 1.04
aggregationBits - 2048 els - zipIndexesInBitList 20.743 us/op 19.233 us/op 1.08
regular array get 100000 times 24.091 us/op 22.771 us/op 1.06
wrappedArray get 100000 times 24.064 us/op 22.746 us/op 1.06
arrayWithProxy get 100000 times 14.531 ms/op 10.347 ms/op 1.40
ssz.Root.equals 22.649 ns/op 21.803 ns/op 1.04
byteArrayEquals 22.283 ns/op 25.063 ns/op 0.89
Buffer.compare 9.4830 ns/op 9.1360 ns/op 1.04
processSlot - 1 slots 10.719 us/op 9.8770 us/op 1.09
processSlot - 32 slots 1.8360 ms/op 2.4299 ms/op 0.76
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.6640 ms/op 1.9564 ms/op 1.87
getCommitteeAssignments - req 1 vs - 250000 vc 1.8546 ms/op 1.6907 ms/op 1.10
getCommitteeAssignments - req 100 vs - 250000 vc 3.6142 ms/op 3.4355 ms/op 1.05
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8656 ms/op 3.6835 ms/op 1.05
findModifiedValidators - 10000 modified validators 446.43 ms/op 407.46 ms/op 1.10
findModifiedValidators - 1000 modified validators 449.32 ms/op 328.56 ms/op 1.37
findModifiedValidators - 100 modified validators 177.74 ms/op 240.79 ms/op 0.74
findModifiedValidators - 10 modified validators 184.44 ms/op 196.03 ms/op 0.94
findModifiedValidators - 1 modified validators 142.47 ms/op 129.23 ms/op 1.10
findModifiedValidators - no difference 142.89 ms/op 103.89 ms/op 1.38
migrate state 1500000 validators, 3400 modified, 2000 new 957.16 ms/op 903.43 ms/op 1.06
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1600 ns/op 5.8600 ns/op 0.71
state getBlockRootAtSlot - 250000 vs - 7PWei 622.40 ns/op 481.21 ns/op 1.29
computeProposerIndex 100000 validators 1.4872 ms/op 1.3262 ms/op 1.12
getNextSyncCommitteeIndices 1000 validators 113.65 ms/op 98.630 ms/op 1.15
getNextSyncCommitteeIndices 10000 validators 113.96 ms/op 98.913 ms/op 1.15
getNextSyncCommitteeIndices 100000 validators 113.19 ms/op 98.383 ms/op 1.15
computeProposers - vc 250000 647.38 us/op 545.56 us/op 1.19
computeEpochShuffling - vc 250000 40.209 ms/op 38.770 ms/op 1.04
getNextSyncCommittee - vc 250000 10.206 ms/op 9.2830 ms/op 1.10
nodejs block root to RootHex using toHex 128.13 ns/op 115.39 ns/op 1.11
nodejs block root to RootHex using toRootHex 79.360 ns/op 75.982 ns/op 1.04
nodejs fromHex(blob) 341.13 us/op 259.74 us/op 1.31
nodejs fromHexInto(blob) 673.35 us/op 702.04 us/op 0.96
nodejs block root to RootHex using the deprecated toHexString 505.14 ns/op 529.30 ns/op 0.95
nodejs byteArrayEquals 32 bytes (block root) 27.449 ns/op 28.045 ns/op 0.98
nodejs byteArrayEquals 48 bytes (pubkey) 39.149 ns/op 41.404 ns/op 0.95
nodejs byteArrayEquals 96 bytes (signature) 37.461 ns/op 37.858 ns/op 0.99
nodejs byteArrayEquals 1024 bytes 44.793 ns/op 42.172 ns/op 1.06
nodejs byteArrayEquals 131072 bytes (blob) 1.8042 us/op 1.7469 us/op 1.03
browser block root to RootHex using toHex 156.48 ns/op 148.43 ns/op 1.05
browser block root to RootHex using toRootHex 147.41 ns/op 135.66 ns/op 1.09
browser fromHex(blob) 1.0328 ms/op 982.52 us/op 1.05
browser fromHexInto(blob) 674.46 us/op 674.16 us/op 1.00
browser block root to RootHex using the deprecated toHexString 359.69 ns/op 367.13 ns/op 0.98
browser byteArrayEquals 32 bytes (block root) 36.912 ns/op 33.547 ns/op 1.10
browser byteArrayEquals 48 bytes (pubkey) 42.883 ns/op 39.941 ns/op 1.07
browser byteArrayEquals 96 bytes (signature) 81.791 ns/op 74.737 ns/op 1.09
browser byteArrayEquals 1024 bytes 767.43 ns/op 747.04 ns/op 1.03
browser byteArrayEquals 131072 bytes (blob) 97.253 us/op 93.351 us/op 1.04

by benchmarkbot/action

@nflaig
Copy link
Member Author

nflaig commented Feb 3, 2026

@lodekeeper please verify the changes in this PR and make sure it's up to date with ethereum/beacon-APIs#568

@nflaig nflaig marked this pull request as ready for review February 3, 2026 20:50
@nflaig nflaig requested a review from a team as a code owner February 3, 2026 20:50
Copy link
Contributor

@lodekeeper lodekeeper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Verified implementation matches beacon-APIs PR #568:

  • ✅ ClientCode enum has all 14 codes per spec (BU, EJ, EG, GE, GR, LH, LS, NM, NB, TE, TK, PM, RH, XX)
  • ✅ ClientVersion type has required fields (code, name, version, commit)
  • ✅ Response structure correct with snake_case conversion via JsonOnlyResponseCodec
  • ✅ Falls back to XX/Unknown when EL client version unavailable

@nflaig nflaig marked this pull request as draft February 7, 2026 12:00
@nflaig
Copy link
Member Author

nflaig commented Feb 7, 2026

waiting for spec discussions to resolve

@nflaig
Copy link
Member Author

nflaig commented Feb 8, 2026

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully introduces the getNodeVersionV2 endpoint, aligning with the updated Ethereum beacon-APIs specification. The changes are well-structured, including the necessary type definitions, endpoint registration, and implementation. A notable improvement is the refactoring that centralizes the ClientVersion and ClientCode definitions, which enhances maintainability by reducing code duplication. The overall implementation is solid, and I have just one minor suggestion to improve code conciseness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants