Skip to content

chore: follow up on #9390 on EIP-7688 changes - #9689

Merged
wemeetagain merged 7 commits into
unstablefrom
nc/eip-7688-followups
Aug 4, 2026
Merged

chore: follow up on #9390 on EIP-7688 changes#9689
wemeetagain merged 7 commits into
unstablefrom
nc/eip-7688-followups

Conversation

@ensi321

@ensi321 ensi321 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Follow up on unaddressed comments from #9390

ensi321 and others added 4 commits July 20, 2026 22:51
EIP-7688 replaces List with ProgressiveList for validators and inactivityScores
at gloas, changing the merkle tree shape. loadState() reused the seed state's
list nodes unconditionally, so loading state bytes from a seed state on the
other side of the gloas fork produced a state with a silently wrong
hashTreeRoot. Deserialize these fields from the state bytes instead when the
seed state cannot be reused.

Also make the empty inactivityScores fallback use the state's own field type
instead of the altair List type.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gloas progressive containers report a near-unbounded SSZ maxSize, and the
ssz-snappy decoder validates the length prefix only against type.maxSize.
Post-gloas this left beacon_blocks_by_*, execution_payload_envelopes_by_* and
data_column_sidecars_by_* responses effectively unbounded.

Clamp request and response size bounds to MAX_PAYLOAD_SIZE, and to
MAX_DATA_COLUMN_SIDECAR_SIZE for data column sidecar responses post-gloas, per
https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.12/specs/phase0/p2p-interface.md#encoding-strategies
https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.12/specs/gloas/p2p-interface.md#type-specific-ssz-bounds

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- deduplicate the nodesPopulated double-casts behind a single
  isViewDUNodesPopulated() helper
- link ChainSafe/ssz#542 in the progressive list utils TODO
- un-export gindex helpers only used within the light client spec utils

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ensi321
ensi321 requested a review from a team as a code owner July 22, 2026 04:11
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f63eff6a3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +40 to +41
for (let i = seedState.validators.length; i < migratedState.validators.length; i++) {
modifiedValidators.push(i);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve modified validator reporting across Gloas

When this fallback is used by loadCachedBeaconState() with a seed state that is not the target's ancestor, an overlapping validator can have different bytes or pubkey in the target. This branch reports only appended indices, unlike the normal loadValidators() path, so packages/state-transition/src/cache/stateCache.ts:183-188 will not refresh epochCtx.pubkeyCache for that index and signature verification for the loaded state can use the seed pubkey. Consider computing modified validator indices from the serialized validator bytes even though the tree nodes cannot be reused.

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 4518549 Previous: cdb6b1a Ratio
Full columns - reconstruct single blob out of 6 31.076 us/op 94.480 us/op 0.33
Full benchmark results
Benchmark suite Current: 4518549 Previous: cdb6b1a Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 965.93 us/op 924.76 us/op 1.04
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 38.668 us/op 39.520 us/op 0.98
BLS verify - blst 748.89 us/op 725.16 us/op 1.03
BLS verifyMultipleSignatures 3 - blst 1.3874 ms/op 1.3747 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst 2.2011 ms/op 2.1848 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst 6.9364 ms/op 6.9155 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst 13.551 ms/op 13.446 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst 26.134 ms/op 26.342 ms/op 0.99
BLS deserializing 10000 signatures 648.03 ms/op 614.20 ms/op 1.06
BLS deserializing 100000 signatures 6.4265 s/op 6.2686 s/op 1.03
BLS verifyMultipleSignatures - same message - 3 - blst 726.63 us/op 834.83 us/op 0.87
BLS verifyMultipleSignatures - same message - 8 - blst 949.88 us/op 942.96 us/op 1.01
BLS verifyMultipleSignatures - same message - 32 - blst 1.5913 ms/op 1.5583 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst 2.4066 ms/op 2.4365 ms/op 0.99
BLS verifyMultipleSignatures - same message - 128 - blst 4.0991 ms/op 4.1974 ms/op 0.98
BLS aggregatePubkeys 32 - blst 17.660 us/op 17.930 us/op 0.98
BLS aggregatePubkeys 128 - blst 63.530 us/op 64.259 us/op 0.99
getSlashingsAndExits - default max 55.053 us/op 48.070 us/op 1.15
getSlashingsAndExits - 2k 442.21 us/op 340.91 us/op 1.30
proposeBlockBody type=full, size=empty 646.50 us/op 608.43 us/op 1.06
isKnown best case - 1 super set check 189.00 ns/op 184.00 ns/op 1.03
isKnown normal case - 2 super set checks 156.00 ns/op 163.00 ns/op 0.96
isKnown worse case - 16 super set checks 161.00 ns/op 163.00 ns/op 0.99
validate api signedAggregateAndProof - struct 1.5681 ms/op 1.5591 ms/op 1.01
validate gossip signedAggregateAndProof - struct 1.5642 ms/op 1.5435 ms/op 1.01
batch validate gossip attestation - vc 640000 - chunk 32 112.70 us/op 108.19 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 64 100.15 us/op 99.270 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 128 92.012 us/op 92.192 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 256 90.316 us/op 85.069 us/op 1.06
bytes32 toHexString 283.00 ns/op 294.00 ns/op 0.96
bytes32 Buffer.toString(hex) 178.00 ns/op 168.00 ns/op 1.06
bytes32 Buffer.toString(hex) from Uint8Array 237.00 ns/op 245.00 ns/op 0.97
bytes32 Buffer.toString(hex) + 0x 178.00 ns/op 175.00 ns/op 1.02
Return object 10000 times 0.21550 ns/op 0.21590 ns/op 1.00
Throw Error 10000 times 3.4049 us/op 3.3982 us/op 1.00
toHex 97.805 ns/op 99.518 ns/op 0.98
Buffer.from 90.720 ns/op 87.891 ns/op 1.03
shared Buffer 61.748 ns/op 63.245 ns/op 0.98
fastMsgIdFn sha256 / 200 bytes 1.4870 us/op 1.5150 us/op 0.98
fastMsgIdFn h32 xxhash / 200 bytes 155.00 ns/op 160.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 200 bytes 206.00 ns/op 215.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 4.8010 us/op 4.8420 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 244.00 ns/op 250.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 1000 bytes 254.00 ns/op 258.00 ns/op 0.98
fastMsgIdFn sha256 / 10000 bytes 42.227 us/op 42.929 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 1.2940 us/op 1.2750 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 838.00 ns/op 834.00 ns/op 1.00
send data - 1000 256B messages 4.3431 ms/op 4.0998 ms/op 1.06
send data - 1000 512B messages 5.7808 ms/op 6.2720 ms/op 0.92
send data - 1000 1024B messages 5.5316 ms/op 6.2369 ms/op 0.89
send data - 1000 1200B messages 6.4594 ms/op 6.7072 ms/op 0.96
send data - 1000 2048B messages 7.5250 ms/op 11.335 ms/op 0.66
send data - 1000 4096B messages 65.998 ms/op 55.797 ms/op 1.18
send data - 1000 16384B messages 299.73 ms/op 441.05 ms/op 0.68
send data - 1000 65536B messages 1.2411 s/op 1.9526 s/op 0.64
enrSubnets - fastDeserialize 64 bits 733.00 ns/op 805.00 ns/op 0.91
enrSubnets - ssz BitVector 64 bits 263.00 ns/op 278.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 104.00 ns/op 102.00 ns/op 1.02
enrSubnets - ssz BitVector 4 bits 265.00 ns/op 264.00 ns/op 1.00
prioritizePeers score -10:0 att 32-0.1 sync 2-0 196.74 us/op 206.08 us/op 0.95
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 232.28 us/op 238.19 us/op 0.98
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 331.06 us/op 336.83 us/op 0.98
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 595.41 us/op 597.30 us/op 1.00
prioritizePeers score 0:0 att 64-1 sync 4-1 691.56 us/op 698.71 us/op 0.99
array of 16000 items push then shift 1.3017 us/op 1.3173 us/op 0.99
LinkedList of 16000 items push then shift 6.9270 ns/op 7.4160 ns/op 0.93
array of 16000 items push then pop 65.499 ns/op 69.181 ns/op 0.95
LinkedList of 16000 items push then pop 5.9750 ns/op 6.1640 ns/op 0.97
array of 24000 items push then shift 1.9363 us/op 1.9502 us/op 0.99
LinkedList of 24000 items push then shift 6.6830 ns/op 7.0480 ns/op 0.95
array of 24000 items push then pop 88.760 ns/op 100.16 ns/op 0.89
LinkedList of 24000 items push then pop 5.9990 ns/op 6.3200 ns/op 0.95
intersect bitArray bitLen 8 3.9020 ns/op 4.2620 ns/op 0.92
intersect array and set length 8 29.674 ns/op 30.639 ns/op 0.97
intersect bitArray bitLen 128 23.506 ns/op 24.100 ns/op 0.98
intersect array and set length 128 502.67 ns/op 519.79 ns/op 0.97
bitArray.getTrueBitIndexes() bitLen 128 929.00 ns/op 962.00 ns/op 0.97
bitArray.getTrueBitIndexes() bitLen 248 1.6620 us/op 1.7430 us/op 0.95
bitArray.getTrueBitIndexes() bitLen 512 3.4450 us/op 3.6070 us/op 0.96
Full columns - reconstruct all 6 blobs 178.12 us/op 183.94 us/op 0.97
Full columns - reconstruct half of the blobs out of 6 78.155 us/op 99.036 us/op 0.79
Full columns - reconstruct single blob out of 6 31.076 us/op 94.480 us/op 0.33
Half columns - reconstruct all 6 blobs 389.91 ms/op 397.61 ms/op 0.98
Half columns - reconstruct half of the blobs out of 6 195.64 ms/op 198.55 ms/op 0.99
Half columns - reconstruct single blob out of 6 69.723 ms/op 70.361 ms/op 0.99
Set add up to 64 items then delete first 2.0671 us/op 1.6651 us/op 1.24
OrderedSet add up to 64 items then delete first 3.2990 us/op 2.5310 us/op 1.30
Set add up to 64 items then delete last 2.3164 us/op 1.8929 us/op 1.22
OrderedSet add up to 64 items then delete last 3.2112 us/op 2.8609 us/op 1.12
Set add up to 64 items then delete middle 2.0407 us/op 1.8829 us/op 1.08
OrderedSet add up to 64 items then delete middle 4.8294 us/op 4.2998 us/op 1.12
Set add up to 128 items then delete first 4.3013 us/op 3.7318 us/op 1.15
OrderedSet add up to 128 items then delete first 6.6999 us/op 5.7643 us/op 1.16
Set add up to 128 items then delete last 3.8547 us/op 3.5802 us/op 1.08
OrderedSet add up to 128 items then delete last 5.8498 us/op 5.4962 us/op 1.06
Set add up to 128 items then delete middle 3.8930 us/op 3.9840 us/op 0.98
OrderedSet add up to 128 items then delete middle 11.702 us/op 11.361 us/op 1.03
Set add up to 256 items then delete first 7.9231 us/op 7.7412 us/op 1.02
OrderedSet add up to 256 items then delete first 12.241 us/op 11.965 us/op 1.02
Set add up to 256 items then delete last 7.6417 us/op 7.2182 us/op 1.06
OrderedSet add up to 256 items then delete last 11.543 us/op 11.141 us/op 1.04
Set add up to 256 items then delete middle 7.6594 us/op 7.2826 us/op 1.05
OrderedSet add up to 256 items then delete middle 35.126 us/op 35.326 us/op 0.99
runFastConfirmationRules vc:100000 bc:96 eq:0 4.7992 ms/op 4.5687 ms/op 1.05
runFastConfirmationRules vc:600000 bc:96 eq:0 34.985 ms/op 34.970 ms/op 1.00
runFastConfirmationRules vc:1000000 bc:96 eq:0 58.138 ms/op 58.777 ms/op 0.99
runFastConfirmationRules vc:600000 bc:320 eq:0 45.907 ms/op 35.148 ms/op 1.31
runFastConfirmationRules vc:100000 bc:96 eq:1000 1.0900 s/op 1.4523 s/op 0.75
pass gossip attestations to forkchoice per slot 2.6402 ms/op 2.6878 ms/op 0.98
forkChoice updateHead vc 100000 bc 64 eq 0 434.10 us/op 419.40 us/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 0 2.5468 ms/op 2.5031 ms/op 1.02
forkChoice updateHead vc 1000000 bc 64 eq 0 4.2423 ms/op 4.1650 ms/op 1.02
forkChoice updateHead vc 600000 bc 320 eq 0 2.5727 ms/op 2.5321 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 2.6086 ms/op 2.5861 ms/op 1.01
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9522 ms/op 2.8758 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 1000 2.6063 ms/op 2.5243 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 10000 2.7104 ms/op 2.6317 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 300000 6.7397 ms/op 7.2822 ms/op 0.93
computeDeltas 1400000 validators 0% inactive 12.949 ms/op 12.610 ms/op 1.03
computeDeltas 1400000 validators 10% inactive 12.444 ms/op 11.953 ms/op 1.04
computeDeltas 1400000 validators 20% inactive 11.797 ms/op 11.490 ms/op 1.03
computeDeltas 1400000 validators 50% inactive 9.5560 ms/op 9.1966 ms/op 1.04
computeDeltas 2100000 validators 0% inactive 19.723 ms/op 18.969 ms/op 1.04
computeDeltas 2100000 validators 10% inactive 18.894 ms/op 19.831 ms/op 0.95
computeDeltas 2100000 validators 20% inactive 17.533 ms/op 16.917 ms/op 1.04
computeDeltas 2100000 validators 50% inactive 14.219 ms/op 13.911 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei normalcase 1.9169 ms/op 3.3295 ms/op 0.58
altair processAttestation - 250000 vs - 7PWei worstcase 2.7260 ms/op 4.0682 ms/op 0.67
altair processAttestation - setStatus - 1/6 committees join 102.10 us/op 111.96 us/op 0.91
altair processAttestation - setStatus - 1/3 committees join 198.32 us/op 217.37 us/op 0.91
altair processAttestation - setStatus - 1/2 committees join 282.57 us/op 306.69 us/op 0.92
altair processAttestation - setStatus - 2/3 committees join 360.91 us/op 397.59 us/op 0.91
altair processAttestation - setStatus - 4/5 committees join 517.58 us/op 580.12 us/op 0.89
altair processAttestation - setStatus - 100% committees join 611.83 us/op 655.17 us/op 0.93
altair processBlock - 250000 vs - 7PWei normalcase 4.6875 ms/op 3.2648 ms/op 1.44
altair processBlock - 250000 vs - 7PWei normalcase hashState 20.157 ms/op 16.176 ms/op 1.25
altair processBlock - 250000 vs - 7PWei worstcase 23.007 ms/op 23.602 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase hashState 42.582 ms/op 52.670 ms/op 0.81
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4198 ms/op 1.5933 ms/op 0.89
phase0 processBlock - 250000 vs - 7PWei worstcase 17.763 ms/op 19.109 ms/op 0.93
altair processEth1Data - 250000 vs - 7PWei normalcase 288.82 us/op 301.39 us/op 0.96
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.4360 us/op 4.6710 us/op 0.74
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 20.223 us/op 22.374 us/op 0.90
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 6.5740 us/op 5.8760 us/op 1.12
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.5270 us/op 5.1790 us/op 0.68
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 93.875 us/op 93.841 us/op 1.00
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3617 ms/op 1.4327 ms/op 0.95
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7953 ms/op 1.9097 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.7115 ms/op 1.8747 ms/op 0.91
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6305 ms/op 5.0410 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0661 ms/op 2.1388 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8511 ms/op 4.1474 ms/op 0.93
Tree 40 250000 create 340.84 ms/op 364.87 ms/op 0.93
Tree 40 250000 get(125000) 92.807 ns/op 95.223 ns/op 0.97
Tree 40 250000 set(125000) 996.07 ns/op 1.1175 us/op 0.89
Tree 40 250000 toArray() 14.168 ms/op 15.955 ms/op 0.89
Tree 40 250000 iterate all - toArray() + loop 15.872 ms/op 17.025 ms/op 0.93
Tree 40 250000 iterate all - get(i) 38.843 ms/op 42.740 ms/op 0.91
Array 250000 create 2.1532 ms/op 2.3303 ms/op 0.92
Array 250000 clone - spread 664.68 us/op 732.02 us/op 0.91
Array 250000 get(125000) 0.28900 ns/op 0.30200 ns/op 0.96
Array 250000 set(125000) 0.29300 ns/op 0.30300 ns/op 0.97
Array 250000 iterate all - loop 57.641 us/op 58.863 us/op 0.98
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.438 ms/op 40.823 ms/op 0.99
Array.fill - length 1000000 2.2307 ms/op 2.2644 ms/op 0.99
Array push - length 1000000 9.2153 ms/op 11.799 ms/op 0.78
Array.get 0.20363 ns/op 0.21476 ns/op 0.95
Uint8Array.get 0.23912 ns/op 0.23997 ns/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.772 ms/op 17.226 ms/op 0.92
altair processEpoch - mainnet_e81889 342.60 ms/op 354.31 ms/op 0.97
mainnet_e81889 - altair beforeProcessEpoch 36.198 ms/op 37.605 ms/op 0.96
mainnet_e81889 - altair processJustificationAndFinalization 7.7660 us/op 9.0250 us/op 0.86
mainnet_e81889 - altair processInactivityUpdates 3.8976 ms/op 8.5138 ms/op 0.46
mainnet_e81889 - altair processRewardsAndPenalties 19.846 ms/op 21.815 ms/op 0.91
mainnet_e81889 - altair processRegistryUpdates 612.00 ns/op 604.00 ns/op 1.01
mainnet_e81889 - altair processSlashings 140.00 ns/op 147.00 ns/op 0.95
mainnet_e81889 - altair processEth1DataReset 137.00 ns/op 142.00 ns/op 0.96
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.8585 ms/op 1.7200 ms/op 1.08
mainnet_e81889 - altair processSlashingsReset 711.00 ns/op 723.00 ns/op 0.98
mainnet_e81889 - altair processRandaoMixesReset 1.4590 us/op 1.5200 us/op 0.96
mainnet_e81889 - altair processHistoricalRootsUpdate 140.00 ns/op 149.00 ns/op 0.94
mainnet_e81889 - altair processParticipationFlagUpdates 470.00 ns/op 462.00 ns/op 1.02
mainnet_e81889 - altair processSyncCommitteeUpdates 106.00 ns/op 117.00 ns/op 0.91
mainnet_e81889 - altair afterProcessEpoch 43.354 ms/op 42.644 ms/op 1.02
capella processEpoch - mainnet_e217614 1.1281 s/op 1.1009 s/op 1.02
mainnet_e217614 - capella beforeProcessEpoch 61.601 ms/op 72.482 ms/op 0.85
mainnet_e217614 - capella processJustificationAndFinalization 7.0320 us/op 8.4560 us/op 0.83
mainnet_e217614 - capella processInactivityUpdates 11.362 ms/op 11.855 ms/op 0.96
mainnet_e217614 - capella processRewardsAndPenalties 96.555 ms/op 103.47 ms/op 0.93
mainnet_e217614 - capella processRegistryUpdates 4.5240 us/op 4.5760 us/op 0.99
mainnet_e217614 - capella processSlashings 143.00 ns/op 144.00 ns/op 0.99
mainnet_e217614 - capella processEth1DataReset 137.00 ns/op 144.00 ns/op 0.95
mainnet_e217614 - capella processEffectiveBalanceUpdates 15.378 ms/op 4.4612 ms/op 3.45
mainnet_e217614 - capella processSlashingsReset 684.00 ns/op 788.00 ns/op 0.87
mainnet_e217614 - capella processRandaoMixesReset 1.4950 us/op 1.6320 us/op 0.92
mainnet_e217614 - capella processHistoricalRootsUpdate 138.00 ns/op 151.00 ns/op 0.91
mainnet_e217614 - capella processParticipationFlagUpdates 461.00 ns/op 480.00 ns/op 0.96
mainnet_e217614 - capella afterProcessEpoch 111.34 ms/op 113.05 ms/op 0.98
phase0 processEpoch - mainnet_e58758 340.04 ms/op 363.26 ms/op 0.94
mainnet_e58758 - phase0 beforeProcessEpoch 75.033 ms/op 74.602 ms/op 1.01
mainnet_e58758 - phase0 processJustificationAndFinalization 7.3220 us/op 6.3930 us/op 1.15
mainnet_e58758 - phase0 processRewardsAndPenalties 15.412 ms/op 15.824 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 2.2790 us/op 2.3710 us/op 0.96
mainnet_e58758 - phase0 processSlashings 142.00 ns/op 153.00 ns/op 0.93
mainnet_e58758 - phase0 processEth1DataReset 135.00 ns/op 146.00 ns/op 0.92
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 832.88 us/op 978.99 us/op 0.85
mainnet_e58758 - phase0 processSlashingsReset 857.00 ns/op 921.00 ns/op 0.93
mainnet_e58758 - phase0 processRandaoMixesReset 1.7840 us/op 1.4470 us/op 1.23
mainnet_e58758 - phase0 processHistoricalRootsUpdate 144.00 ns/op 150.00 ns/op 0.96
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.2240 us/op 1.3310 us/op 0.92
mainnet_e58758 - phase0 afterProcessEpoch 31.909 ms/op 34.519 ms/op 0.92
phase0 processEffectiveBalanceUpdates - 250000 normalcase 980.26 us/op 974.81 us/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.2431 ms/op 1.6242 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 10.760 ms/op 12.848 ms/op 0.84
altair processInactivityUpdates - 250000 worstcase 10.653 ms/op 12.893 ms/op 0.83
phase0 processRegistryUpdates - 250000 normalcase 2.1610 us/op 2.1420 us/op 1.01
phase0 processRegistryUpdates - 250000 badcase_full_deposits 134.52 us/op 138.10 us/op 0.97
phase0 processRegistryUpdates - 250000 worstcase 0.5 59.442 ms/op 56.370 ms/op 1.05
altair processRewardsAndPenalties - 250000 normalcase 14.482 ms/op 15.910 ms/op 0.91
altair processRewardsAndPenalties - 250000 worstcase 14.946 ms/op 15.916 ms/op 0.94
phase0 getAttestationDeltas - 250000 normalcase 5.2147 ms/op 5.3157 ms/op 0.98
phase0 getAttestationDeltas - 250000 worstcase 5.4683 ms/op 8.6565 ms/op 0.63
phase0 processSlashings - 250000 worstcase 59.569 us/op 56.230 us/op 1.06
altair processSyncCommitteeUpdates - 250000 10.128 ms/op 12.497 ms/op 0.81
BeaconState.hashTreeRoot - No change 170.00 ns/op 180.00 ns/op 0.94
BeaconState.hashTreeRoot - 1 full validator 78.871 us/op 102.61 us/op 0.77
BeaconState.hashTreeRoot - 32 full validator 902.26 us/op 1.2113 ms/op 0.74
BeaconState.hashTreeRoot - 512 full validator 6.4122 ms/op 11.805 ms/op 0.54
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 92.874 us/op 120.06 us/op 0.77
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3906 ms/op 1.8107 ms/op 0.77
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 16.065 ms/op 28.503 ms/op 0.56
BeaconState.hashTreeRoot - 1 balances 91.169 us/op 122.89 us/op 0.74
BeaconState.hashTreeRoot - 32 balances 544.40 us/op 1.0181 ms/op 0.53
BeaconState.hashTreeRoot - 512 balances 5.1493 ms/op 8.3472 ms/op 0.62
BeaconState.hashTreeRoot - 250000 balances 163.10 ms/op 174.29 ms/op 0.94
aggregationBits - 2048 els - zipIndexesInBitList 19.131 us/op 19.914 us/op 0.96
regular array get 100000 times 22.574 us/op 23.303 us/op 0.97
wrappedArray get 100000 times 22.376 us/op 23.343 us/op 0.96
arrayWithProxy get 100000 times 9.9197 ms/op 16.252 ms/op 0.61
ssz.Root.equals 21.391 ns/op 22.001 ns/op 0.97
byteArrayEquals 21.259 ns/op 21.800 ns/op 0.98
Buffer.compare 8.7360 ns/op 9.0870 ns/op 0.96
processSlot - 1 slots 9.8430 us/op 10.304 us/op 0.96
processSlot - 32 slots 2.1207 ms/op 2.1772 ms/op 0.97
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.7700 ms/op 4.9351 ms/op 0.56
getCommitteeAssignments - req 1 vs - 250000 vc 1.6865 ms/op 1.7170 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 3.4973 ms/op 3.5671 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8184 ms/op 3.8207 ms/op 1.00
findModifiedValidators - 10000 modified validators 838.10 ms/op 802.49 ms/op 1.04
findModifiedValidators - 1000 modified validators 508.82 ms/op 518.81 ms/op 0.98
findModifiedValidators - 100 modified validators 318.74 ms/op 279.22 ms/op 1.14
findModifiedValidators - 10 modified validators 190.35 ms/op 168.84 ms/op 1.13
findModifiedValidators - 1 modified validators 179.90 ms/op 164.81 ms/op 1.09
findModifiedValidators - no difference 214.48 ms/op 184.15 ms/op 1.16
migrate state 1500000 validators, 3400 modified, 2000 new 3.7409 s/op 3.9124 s/op 0.96
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.7500 ns/op 3.6900 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 472.73 ns/op 447.17 ns/op 1.06
computeProposerIndex 100000 validators 1.4336 ms/op 1.3789 ms/op 1.04
getNextSyncCommitteeIndices 1000 validators 2.9244 ms/op 2.9494 ms/op 0.99
getNextSyncCommitteeIndices 10000 validators 25.782 ms/op 26.424 ms/op 0.98
getNextSyncCommitteeIndices 100000 validators 91.856 ms/op 91.055 ms/op 1.01
computeProposers - vc 250000 568.86 us/op 600.12 us/op 0.95
computeEpochShuffling - vc 250000 39.715 ms/op 40.922 ms/op 0.97
getNextSyncCommittee - vc 250000 9.5819 ms/op 9.6388 ms/op 0.99
nodejs block root to RootHex using toHex 97.572 ns/op 98.469 ns/op 0.99
nodejs block root to RootHex using toRootHex 62.331 ns/op 64.359 ns/op 0.97
nodejs fromHex(blob) 832.34 us/op 1.0342 ms/op 0.80
nodejs fromHexInto(blob) 636.38 us/op 626.42 us/op 1.02
nodejs block root to RootHex using the deprecated toHexString 517.23 ns/op 469.82 ns/op 1.10
nodejs byteArrayEquals 32 bytes (block root) 26.638 ns/op 25.479 ns/op 1.05
nodejs byteArrayEquals 48 bytes (pubkey) 38.654 ns/op 37.249 ns/op 1.04
nodejs byteArrayEquals 96 bytes (signature) 34.929 ns/op 33.344 ns/op 1.05
nodejs byteArrayEquals 1024 bytes 41.152 ns/op 40.090 ns/op 1.03
nodejs byteArrayEquals 131072 bytes (blob) 1.8555 us/op 1.7780 us/op 1.04
browser block root to RootHex using toHex 148.25 ns/op 141.22 ns/op 1.05
browser block root to RootHex using toRootHex 134.76 ns/op 133.16 ns/op 1.01
browser fromHex(blob) 1.7156 ms/op 1.7781 ms/op 0.96
browser fromHexInto(blob) 636.43 us/op 646.46 us/op 0.98
browser block root to RootHex using the deprecated toHexString 353.22 ns/op 341.55 ns/op 1.03
browser byteArrayEquals 32 bytes (block root) 28.101 ns/op 28.608 ns/op 0.98
browser byteArrayEquals 48 bytes (pubkey) 39.912 ns/op 40.380 ns/op 0.99
browser byteArrayEquals 96 bytes (signature) 75.357 ns/op 75.489 ns/op 1.00
browser byteArrayEquals 1024 bytes 755.06 ns/op 770.85 ns/op 0.98
browser byteArrayEquals 131072 bytes (blob) 96.079 us/op 96.393 us/op 1.00

by benchmarkbot/action

ensi321 and others added 2 commits July 21, 2026 22:21
The seed state may not be an ancestor of the loaded state, so an overlapping
index can hold a different validator. Diff the serialized validator bytes in
the cross-fork path as well so that loadCachedBeaconState() refreshes the
pubkey cache for those indices, matching the loadValidators() behavior. Only
the tree-node reuse is skipped across the fork boundary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread packages/beacon-node/test/spec/presets/fast_confirmation.test.ts Outdated
* appended past the seed state's validator count. Unlike loadValidators() this only diffs
* bytes and does not share the seed state's tree.
*/
function findModifiedAndAppendedValidators(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I notice the modified validators are only consumed by loadCachedBeaconState() and noone uses it anymore, this is a dead code
so it's worth to leave a TODO and follow up in another cleanup PR or just change the signature of loadState() not to return modified validators

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems like this comment was not addressed @ensi321 can you follow up on it please

@nflaig nflaig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems fine to me, but probably something @wemeetagain should review

@wemeetagain
wemeetagain merged commit c50ba35 into unstable Aug 4, 2026
25 of 26 checks passed
@wemeetagain
wemeetagain deleted the nc/eip-7688-followups branch August 4, 2026 13:36
@wemeetagain

Copy link
Copy Markdown
Member

🎉 This PR is included in v1.46.0 🎉

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants