Skip to content

fix: upgrade attestations to gloas types during block production - #9709

Closed
ensi321 wants to merge 3 commits into
unstablefrom
nc/gloas-attestation-upgrade
Closed

fix: upgrade attestations to gloas types during block production#9709
ensi321 wants to merge 3 commits into
unstablefrom
nc/gloas-attestation-upgrade

Conversation

@ensi321

@ensi321 ensi321 commented Jul 25, 2026

Copy link
Copy Markdown
Member

Motivation

Port of two outstanding fixes from the glamsterdam-devnet-7 branch (#9587) that never landed on unstable (see discussion in #9689 (comment)).

The aggregated attestation pool and op pool hold electra-typed attestations and attester slashings. When producing the first gloas blocks after the fork, these were packed into the gloas block body without upgrading them to gloas types (EIP-7688 progressive containers). This also implements the upgrade_attestation_to_gloas, upgrade_indexed_attestation_to_gloas and upgrade_attester_slashing_to_gloas spec functions, which were tracked as unimplemented in specrefs/functions.yml (sources: []).

Description

  • Add upgradeAttestationToGloas, upgradeIndexedAttestationToGloas (with bigint overload) and upgradeAttesterSlashingToGloas helpers to upgradeStateToGloas.ts, per https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.12/specs/gloas/fork.md
  • Map op-pool attestations and attester slashings through the upgrade helpers in produceCommonBlockBody when producing post-gloas blocks
  • Type AggregatedAttestationPool.getAttestationsForBlock return as electra.Attestation[] to make the pre-fork typing explicit
  • Wire the three spec functions in specrefs/functions.yml (verified stable against ethspecify process)

Cherry-picked from glamsterdam-devnet-7 (eeb1c13, a8c50ce, original author @nflaig); only conflict resolution was keeping unstable's optimized list-migration internals in upgradeStateToGloas.ts.

AI Assistance Disclosure

Cherry-pick selection, conflict resolution and verification done with AI assistance (Claude Code); original commits authored by @nflaig on the devnet-7 branch.

🤖 Generated with Claude Code

@ensi321
ensi321 requested a review from a team as a code owner July 25, 2026 02:14
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: 417d369 Previous: 4001398 Ratio
enrSubnets - fastDeserialize 64 bits 2.7320 us/op 786.00 ns/op 3.48
Full benchmark results
Benchmark suite Current: 417d369 Previous: 4001398 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 833.87 us/op 892.51 us/op 0.93
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 46.773 us/op 39.707 us/op 1.18
BLS verify - blst 650.38 us/op 712.85 us/op 0.91
BLS verifyMultipleSignatures 3 - blst 1.3829 ms/op 1.3668 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst 2.2066 ms/op 2.1764 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst 6.8758 ms/op 6.8732 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst 13.310 ms/op 13.605 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst 25.812 ms/op 25.973 ms/op 0.99
BLS deserializing 10000 signatures 632.97 ms/op 645.65 ms/op 0.98
BLS deserializing 100000 signatures 6.3539 s/op 6.6012 s/op 0.96
BLS verifyMultipleSignatures - same message - 3 - blst 816.88 us/op 789.92 us/op 1.03
BLS verifyMultipleSignatures - same message - 8 - blst 899.83 us/op 948.19 us/op 0.95
BLS verifyMultipleSignatures - same message - 32 - blst 1.4477 ms/op 1.5389 ms/op 0.94
BLS verifyMultipleSignatures - same message - 64 - blst 2.4056 ms/op 2.4690 ms/op 0.97
BLS verifyMultipleSignatures - same message - 128 - blst 4.0412 ms/op 4.1134 ms/op 0.98
BLS aggregatePubkeys 32 - blst 17.743 us/op 17.859 us/op 0.99
BLS aggregatePubkeys 128 - blst 63.273 us/op 63.461 us/op 1.00
getSlashingsAndExits - default max 47.534 us/op 46.159 us/op 1.03
getSlashingsAndExits - 2k 321.01 us/op 330.92 us/op 0.97
proposeBlockBody type=full, size=empty 707.78 us/op 659.29 us/op 1.07
isKnown best case - 1 super set check 161.00 ns/op 182.00 ns/op 0.88
isKnown normal case - 2 super set checks 164.00 ns/op 166.00 ns/op 0.99
isKnown worse case - 16 super set checks 163.00 ns/op 184.00 ns/op 0.89
validate api signedAggregateAndProof - struct 1.5397 ms/op 1.5395 ms/op 1.00
validate gossip signedAggregateAndProof - struct 1.5357 ms/op 1.5358 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 107.70 us/op 111.93 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 64 93.973 us/op 97.778 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 128 87.692 us/op 91.163 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 84.360 us/op 87.106 us/op 0.97
bytes32 toHexString 298.00 ns/op 294.00 ns/op 1.01
bytes32 Buffer.toString(hex) 172.00 ns/op 179.00 ns/op 0.96
bytes32 Buffer.toString(hex) from Uint8Array 242.00 ns/op 246.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 175.00 ns/op 181.00 ns/op 0.97
Return object 10000 times 0.21120 ns/op 0.21660 ns/op 0.98
Throw Error 10000 times 3.4377 us/op 3.4863 us/op 0.99
toHex 100.74 ns/op 101.27 ns/op 0.99
Buffer.from 90.483 ns/op 95.288 ns/op 0.95
shared Buffer 61.731 ns/op 60.527 ns/op 1.02
fastMsgIdFn sha256 / 200 bytes 1.4850 us/op 1.5070 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 154.00 ns/op 162.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 200 bytes 205.00 ns/op 218.00 ns/op 0.94
fastMsgIdFn sha256 / 1000 bytes 4.8650 us/op 4.8890 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 249.00 ns/op 244.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 257.00 ns/op 265.00 ns/op 0.97
fastMsgIdFn sha256 / 10000 bytes 43.266 us/op 43.176 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 1.2680 us/op 1.2870 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 822.00 ns/op 834.00 ns/op 0.99
send data - 1000 256B messages 3.9433 ms/op 5.1457 ms/op 0.77
send data - 1000 512B messages 4.9349 ms/op 5.9728 ms/op 0.83
send data - 1000 1024B messages 5.4816 ms/op 6.2512 ms/op 0.88
send data - 1000 1200B messages 6.2415 ms/op 8.5089 ms/op 0.73
send data - 1000 2048B messages 13.517 ms/op 17.122 ms/op 0.79
send data - 1000 4096B messages 84.953 ms/op 112.62 ms/op 0.75
send data - 1000 16384B messages 286.34 ms/op 375.64 ms/op 0.76
send data - 1000 65536B messages 1.2121 s/op 1.7644 s/op 0.69
enrSubnets - fastDeserialize 64 bits 2.7320 us/op 786.00 ns/op 3.48
enrSubnets - ssz BitVector 64 bits 258.00 ns/op 272.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 111.00 ns/op 105.00 ns/op 1.06
enrSubnets - ssz BitVector 4 bits 259.00 ns/op 274.00 ns/op 0.95
prioritizePeers score -10:0 att 32-0.1 sync 2-0 210.78 us/op 213.18 us/op 0.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 234.72 us/op 241.41 us/op 0.97
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 338.63 us/op 355.15 us/op 0.95
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 599.92 us/op 638.56 us/op 0.94
prioritizePeers score 0:0 att 64-1 sync 4-1 700.30 us/op 721.89 us/op 0.97
array of 16000 items push then shift 1.3141 us/op 1.3181 us/op 1.00
LinkedList of 16000 items push then shift 6.9050 ns/op 7.6070 ns/op 0.91
array of 16000 items push then pop 66.945 ns/op 76.460 ns/op 0.88
LinkedList of 16000 items push then pop 6.1720 ns/op 6.2120 ns/op 0.99
array of 24000 items push then shift 1.9374 us/op 1.9740 us/op 0.98
LinkedList of 24000 items push then shift 6.3980 ns/op 7.2490 ns/op 0.88
array of 24000 items push then pop 93.046 ns/op 111.78 ns/op 0.83
LinkedList of 24000 items push then pop 6.0750 ns/op 6.2740 ns/op 0.97
intersect bitArray bitLen 8 3.8870 ns/op 4.0250 ns/op 0.97
intersect array and set length 8 31.576 ns/op 30.477 ns/op 1.04
intersect bitArray bitLen 128 23.438 ns/op 24.098 ns/op 0.97
intersect array and set length 128 514.60 ns/op 513.07 ns/op 1.00
bitArray.getTrueBitIndexes() bitLen 128 908.00 ns/op 967.00 ns/op 0.94
bitArray.getTrueBitIndexes() bitLen 248 1.6520 us/op 1.7410 us/op 0.95
bitArray.getTrueBitIndexes() bitLen 512 3.4470 us/op 3.6740 us/op 0.94
Full columns - reconstruct all 6 blobs 190.13 us/op 156.33 us/op 1.22
Full columns - reconstruct half of the blobs out of 6 87.459 us/op 85.463 us/op 1.02
Full columns - reconstruct single blob out of 6 33.737 us/op 35.587 us/op 0.95
Half columns - reconstruct all 6 blobs 386.07 ms/op 408.72 ms/op 0.94
Half columns - reconstruct half of the blobs out of 6 192.17 ms/op 203.88 ms/op 0.94
Half columns - reconstruct single blob out of 6 68.636 ms/op 71.196 ms/op 0.96
Set add up to 64 items then delete first 2.0440 us/op 1.7187 us/op 1.19
OrderedSet add up to 64 items then delete first 2.5875 us/op 2.6213 us/op 0.99
Set add up to 64 items then delete last 1.9428 us/op 1.9439 us/op 1.00
OrderedSet add up to 64 items then delete last 2.8561 us/op 2.8931 us/op 0.99
Set add up to 64 items then delete middle 2.0243 us/op 1.9262 us/op 1.05
OrderedSet add up to 64 items then delete middle 4.5161 us/op 4.3902 us/op 1.03
Set add up to 128 items then delete first 3.8267 us/op 3.8600 us/op 0.99
OrderedSet add up to 128 items then delete first 5.8274 us/op 5.9104 us/op 0.99
Set add up to 128 items then delete last 3.6743 us/op 3.7490 us/op 0.98
OrderedSet add up to 128 items then delete last 5.4768 us/op 5.6032 us/op 0.98
Set add up to 128 items then delete middle 3.9094 us/op 3.7668 us/op 1.04
OrderedSet add up to 128 items then delete middle 11.798 us/op 11.597 us/op 1.02
Set add up to 256 items then delete first 7.5726 us/op 7.6673 us/op 0.99
OrderedSet add up to 256 items then delete first 11.852 us/op 12.095 us/op 0.98
Set add up to 256 items then delete last 7.4875 us/op 7.2314 us/op 1.04
OrderedSet add up to 256 items then delete last 11.447 us/op 11.588 us/op 0.99
Set add up to 256 items then delete middle 7.7070 us/op 7.2067 us/op 1.07
OrderedSet add up to 256 items then delete middle 35.138 us/op 35.470 us/op 0.99
runFastConfirmationRules vc:100000 bc:96 eq:0 5.1546 ms/op 4.5352 ms/op 1.14
runFastConfirmationRules vc:600000 bc:96 eq:0 36.445 ms/op 34.787 ms/op 1.05
runFastConfirmationRules vc:1000000 bc:96 eq:0 59.940 ms/op 57.986 ms/op 1.03
runFastConfirmationRules vc:600000 bc:320 eq:0 36.138 ms/op 35.322 ms/op 1.02
runFastConfirmationRules vc:100000 bc:96 eq:1000 1.0948 s/op 1.1136 s/op 0.98
pass gossip attestations to forkchoice per slot 2.5831 ms/op 2.6281 ms/op 0.98
forkChoice updateHead vc 100000 bc 64 eq 0 470.79 us/op 412.66 us/op 1.14
forkChoice updateHead vc 600000 bc 64 eq 0 2.8125 ms/op 2.4515 ms/op 1.15
forkChoice updateHead vc 1000000 bc 64 eq 0 4.8008 ms/op 4.0830 ms/op 1.18
forkChoice updateHead vc 600000 bc 320 eq 0 2.8842 ms/op 2.4786 ms/op 1.16
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8499 ms/op 2.6070 ms/op 1.09
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2525 ms/op 2.8684 ms/op 1.13
forkChoice updateHead vc 600000 bc 64 eq 1000 2.8730 ms/op 2.4628 ms/op 1.17
forkChoice updateHead vc 600000 bc 64 eq 10000 2.9783 ms/op 2.5672 ms/op 1.16
forkChoice updateHead vc 600000 bc 64 eq 300000 6.8283 ms/op 6.5621 ms/op 1.04
computeDeltas 1400000 validators 0% inactive 14.051 ms/op 12.303 ms/op 1.14
computeDeltas 1400000 validators 10% inactive 12.780 ms/op 11.626 ms/op 1.10
computeDeltas 1400000 validators 20% inactive 12.044 ms/op 10.963 ms/op 1.10
computeDeltas 1400000 validators 50% inactive 9.8149 ms/op 8.9129 ms/op 1.10
computeDeltas 2100000 validators 0% inactive 20.285 ms/op 18.412 ms/op 1.10
computeDeltas 2100000 validators 10% inactive 19.231 ms/op 17.531 ms/op 1.10
computeDeltas 2100000 validators 20% inactive 18.090 ms/op 16.351 ms/op 1.11
computeDeltas 2100000 validators 50% inactive 14.687 ms/op 10.910 ms/op 1.35
altair processAttestation - 250000 vs - 7PWei normalcase 1.7153 ms/op 1.8797 ms/op 0.91
altair processAttestation - 250000 vs - 7PWei worstcase 2.4890 ms/op 2.4435 ms/op 1.02
altair processAttestation - setStatus - 1/6 committees join 111.92 us/op 102.05 us/op 1.10
altair processAttestation - setStatus - 1/3 committees join 201.95 us/op 209.59 us/op 0.96
altair processAttestation - setStatus - 1/2 committees join 304.66 us/op 291.33 us/op 1.05
altair processAttestation - setStatus - 2/3 committees join 384.93 us/op 380.88 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 530.29 us/op 536.85 us/op 0.99
altair processAttestation - setStatus - 100% committees join 621.24 us/op 625.88 us/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase 2.8547 ms/op 3.5830 ms/op 0.80
altair processBlock - 250000 vs - 7PWei normalcase hashState 11.780 ms/op 15.421 ms/op 0.76
altair processBlock - 250000 vs - 7PWei worstcase 19.816 ms/op 20.872 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase hashState 39.317 ms/op 41.282 ms/op 0.95
phase0 processBlock - 250000 vs - 7PWei normalcase 1.3198 ms/op 1.3561 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei worstcase 17.826 ms/op 16.414 ms/op 1.09
altair processEth1Data - 250000 vs - 7PWei normalcase 318.55 us/op 316.43 us/op 1.01
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 9.5840 us/op 3.4460 us/op 2.78
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 43.753 us/op 21.942 us/op 1.99
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 7.0480 us/op 5.9890 us/op 1.18
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.8330 us/op 4.8150 us/op 0.80
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 97.191 us/op 90.481 us/op 1.07
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.4071 ms/op 1.4215 ms/op 0.99
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8473 ms/op 1.8590 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8534 ms/op 1.8706 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6859 ms/op 3.7336 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.1069 ms/op 2.1087 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9494 ms/op 4.2521 ms/op 0.93
Tree 40 250000 create 325.62 ms/op 312.19 ms/op 1.04
Tree 40 250000 get(125000) 105.12 ns/op 95.075 ns/op 1.11
Tree 40 250000 set(125000) 1.1104 us/op 1.0274 us/op 1.08
Tree 40 250000 toArray() 9.4027 ms/op 10.225 ms/op 0.92
Tree 40 250000 iterate all - toArray() + loop 9.5977 ms/op 10.086 ms/op 0.95
Tree 40 250000 iterate all - get(i) 42.018 ms/op 39.272 ms/op 1.07
Array 250000 create 2.1215 ms/op 2.4119 ms/op 0.88
Array 250000 clone - spread 666.29 us/op 760.03 us/op 0.88
Array 250000 get(125000) 0.29800 ns/op 0.29700 ns/op 1.00
Array 250000 set(125000) 0.30400 ns/op 0.30200 ns/op 1.01
Array 250000 iterate all - loop 57.658 us/op 58.595 us/op 0.98
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.789 ms/op 62.389 ms/op 0.65
Array.fill - length 1000000 2.2403 ms/op 2.2139 ms/op 1.01
Array push - length 1000000 7.9019 ms/op 8.4684 ms/op 0.93
Array.get 0.20758 ns/op 0.20966 ns/op 0.99
Uint8Array.get 0.25382 ns/op 0.24103 ns/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.020 ms/op 13.246 ms/op 1.13
altair processEpoch - mainnet_e81889 258.56 ms/op 268.93 ms/op 0.96
mainnet_e81889 - altair beforeProcessEpoch 38.723 ms/op 37.041 ms/op 1.05
mainnet_e81889 - altair processJustificationAndFinalization 6.4610 us/op 5.3900 us/op 1.20
mainnet_e81889 - altair processInactivityUpdates 3.7614 ms/op 3.6947 ms/op 1.02
mainnet_e81889 - altair processRewardsAndPenalties 19.973 ms/op 17.392 ms/op 1.15
mainnet_e81889 - altair processRegistryUpdates 582.00 ns/op 583.00 ns/op 1.00
mainnet_e81889 - altair processSlashings 149.00 ns/op 147.00 ns/op 1.01
mainnet_e81889 - altair processEth1DataReset 144.00 ns/op 147.00 ns/op 0.98
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6799 ms/op 1.3027 ms/op 1.29
mainnet_e81889 - altair processSlashingsReset 717.00 ns/op 713.00 ns/op 1.01
mainnet_e81889 - altair processRandaoMixesReset 1.2180 us/op 1.0840 us/op 1.12
mainnet_e81889 - altair processHistoricalRootsUpdate 146.00 ns/op 143.00 ns/op 1.02
mainnet_e81889 - altair processParticipationFlagUpdates 451.00 ns/op 459.00 ns/op 0.98
mainnet_e81889 - altair processSyncCommitteeUpdates 114.00 ns/op 122.00 ns/op 0.93
mainnet_e81889 - altair afterProcessEpoch 41.919 ms/op 41.501 ms/op 1.01
capella processEpoch - mainnet_e217614 742.64 ms/op 761.08 ms/op 0.98
mainnet_e217614 - capella beforeProcessEpoch 80.305 ms/op 56.640 ms/op 1.42
mainnet_e217614 - capella processJustificationAndFinalization 5.0480 us/op 5.5380 us/op 0.91
mainnet_e217614 - capella processInactivityUpdates 12.117 ms/op 13.196 ms/op 0.92
mainnet_e217614 - capella processRewardsAndPenalties 93.663 ms/op 90.285 ms/op 1.04
mainnet_e217614 - capella processRegistryUpdates 4.5260 us/op 4.5780 us/op 0.99
mainnet_e217614 - capella processSlashings 143.00 ns/op 140.00 ns/op 1.02
mainnet_e217614 - capella processEth1DataReset 137.00 ns/op 136.00 ns/op 1.01
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.8591 ms/op 12.265 ms/op 0.48
mainnet_e217614 - capella processSlashingsReset 671.00 ns/op 692.00 ns/op 0.97
mainnet_e217614 - capella processRandaoMixesReset 1.1390 us/op 1.1920 us/op 0.96
mainnet_e217614 - capella processHistoricalRootsUpdate 139.00 ns/op 139.00 ns/op 1.00
mainnet_e217614 - capella processParticipationFlagUpdates 449.00 ns/op 460.00 ns/op 0.98
mainnet_e217614 - capella afterProcessEpoch 108.94 ms/op 109.82 ms/op 0.99
phase0 processEpoch - mainnet_e58758 285.95 ms/op 292.29 ms/op 0.98
mainnet_e58758 - phase0 beforeProcessEpoch 63.706 ms/op 61.189 ms/op 1.04
mainnet_e58758 - phase0 processJustificationAndFinalization 5.5910 us/op 5.9150 us/op 0.95
mainnet_e58758 - phase0 processRewardsAndPenalties 15.713 ms/op 15.279 ms/op 1.03
mainnet_e58758 - phase0 processRegistryUpdates 2.2890 us/op 2.2790 us/op 1.00
mainnet_e58758 - phase0 processSlashings 149.00 ns/op 155.00 ns/op 0.96
mainnet_e58758 - phase0 processEth1DataReset 148.00 ns/op 140.00 ns/op 1.06
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 840.65 us/op 826.91 us/op 1.02
mainnet_e58758 - phase0 processSlashingsReset 885.00 ns/op 839.00 ns/op 1.05
mainnet_e58758 - phase0 processRandaoMixesReset 1.1430 us/op 1.6210 us/op 0.71
mainnet_e58758 - phase0 processHistoricalRootsUpdate 144.00 ns/op 142.00 ns/op 1.01
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.0760 us/op 1.0550 us/op 1.02
mainnet_e58758 - phase0 afterProcessEpoch 34.840 ms/op 33.903 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0271 ms/op 1.0199 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6542 ms/op 1.2445 ms/op 1.33
altair processInactivityUpdates - 250000 normalcase 10.701 ms/op 10.738 ms/op 1.00
altair processInactivityUpdates - 250000 worstcase 10.716 ms/op 10.763 ms/op 1.00
phase0 processRegistryUpdates - 250000 normalcase 2.3040 us/op 3.4130 us/op 0.68
phase0 processRegistryUpdates - 250000 badcase_full_deposits 144.34 us/op 145.05 us/op 1.00
phase0 processRegistryUpdates - 250000 worstcase 0.5 61.952 ms/op 61.481 ms/op 1.01
altair processRewardsAndPenalties - 250000 normalcase 14.605 ms/op 13.971 ms/op 1.05
altair processRewardsAndPenalties - 250000 worstcase 14.752 ms/op 14.063 ms/op 1.05
phase0 getAttestationDeltas - 250000 normalcase 5.4000 ms/op 5.6743 ms/op 0.95
phase0 getAttestationDeltas - 250000 worstcase 8.3824 ms/op 5.7361 ms/op 1.46
phase0 processSlashings - 250000 worstcase 59.187 us/op 62.054 us/op 0.95
altair processSyncCommitteeUpdates - 250000 10.150 ms/op 10.186 ms/op 1.00
BeaconState.hashTreeRoot - No change 179.00 ns/op 193.00 ns/op 0.93
BeaconState.hashTreeRoot - 1 full validator 67.288 us/op 59.750 us/op 1.13
BeaconState.hashTreeRoot - 32 full validator 698.54 us/op 655.24 us/op 1.07
BeaconState.hashTreeRoot - 512 full validator 7.3343 ms/op 5.8810 ms/op 1.25
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 77.142 us/op 78.784 us/op 0.98
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1066 ms/op 1.2407 ms/op 0.89
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 14.433 ms/op 14.032 ms/op 1.03
BeaconState.hashTreeRoot - 1 balances 64.712 us/op 59.438 us/op 1.09
BeaconState.hashTreeRoot - 32 balances 567.99 us/op 576.20 us/op 0.99
BeaconState.hashTreeRoot - 512 balances 5.8423 ms/op 4.5820 ms/op 1.28
BeaconState.hashTreeRoot - 250000 balances 114.15 ms/op 105.28 ms/op 1.08
aggregationBits - 2048 els - zipIndexesInBitList 20.055 us/op 19.585 us/op 1.02
regular array get 100000 times 23.022 us/op 23.167 us/op 0.99
wrappedArray get 100000 times 23.027 us/op 23.137 us/op 1.00
arrayWithProxy get 100000 times 19.667 ms/op 10.379 ms/op 1.89
ssz.Root.equals 86.098 ns/op 21.742 ns/op 3.96
byteArrayEquals 21.518 ns/op 21.541 ns/op 1.00
Buffer.compare 9.4160 ns/op 8.9510 ns/op 1.05
processSlot - 1 slots 8.5200 us/op 9.3890 us/op 0.91
processSlot - 32 slots 1.5112 ms/op 1.9757 ms/op 0.76
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.4068 ms/op 2.1699 ms/op 1.11
getCommitteeAssignments - req 1 vs - 250000 vc 1.6747 ms/op 1.7141 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 3.4198 ms/op 3.4900 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6696 ms/op 3.7213 ms/op 0.99
findModifiedValidators - 10000 modified validators 773.88 ms/op 788.58 ms/op 0.98
findModifiedValidators - 1000 modified validators 406.03 ms/op 518.42 ms/op 0.78
findModifiedValidators - 100 modified validators 364.68 ms/op 301.30 ms/op 1.21
findModifiedValidators - 10 modified validators 176.94 ms/op 260.45 ms/op 0.68
findModifiedValidators - 1 modified validators 190.25 ms/op 145.37 ms/op 1.31
findModifiedValidators - no difference 148.89 ms/op 146.62 ms/op 1.02
migrate state 1500000 validators, 3400 modified, 2000 new 2.6199 s/op 2.5361 s/op 1.03
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.7500 ns/op 3.7700 ns/op 0.99
state getBlockRootAtSlot - 250000 vs - 7PWei 283.70 ns/op 280.53 ns/op 1.01
computeProposerIndex 100000 validators 1.3230 ms/op 1.3457 ms/op 0.98
getNextSyncCommitteeIndices 1000 validators 2.8417 ms/op 2.8965 ms/op 0.98
getNextSyncCommitteeIndices 10000 validators 25.104 ms/op 25.473 ms/op 0.99
getNextSyncCommitteeIndices 100000 validators 87.739 ms/op 87.952 ms/op 1.00
computeProposers - vc 250000 552.62 us/op 553.08 us/op 1.00
computeEpochShuffling - vc 250000 38.260 ms/op 39.342 ms/op 0.97
getNextSyncCommittee - vc 250000 9.3793 ms/op 9.4688 ms/op 0.99
nodejs block root to RootHex using toHex 108.50 ns/op 97.077 ns/op 1.12
nodejs block root to RootHex using toRootHex 65.288 ns/op 62.602 ns/op 1.04
nodejs fromHex(blob) 750.06 us/op 729.84 us/op 1.03
nodejs fromHexInto(blob) 668.70 us/op 633.81 us/op 1.06
nodejs block root to RootHex using the deprecated toHexString 473.55 ns/op 378.50 ns/op 1.25
nodejs byteArrayEquals 32 bytes (block root) 25.853 ns/op 26.053 ns/op 0.99
nodejs byteArrayEquals 48 bytes (pubkey) 37.304 ns/op 37.733 ns/op 0.99
nodejs byteArrayEquals 96 bytes (signature) 40.542 ns/op 35.905 ns/op 1.13
nodejs byteArrayEquals 1024 bytes 43.472 ns/op 43.048 ns/op 1.01
nodejs byteArrayEquals 131072 bytes (blob) 1.7620 us/op 1.7574 us/op 1.00
browser block root to RootHex using toHex 147.19 ns/op 145.43 ns/op 1.01
browser block root to RootHex using toRootHex 131.65 ns/op 129.97 ns/op 1.01
browser fromHex(blob) 1.5816 ms/op 1.6342 ms/op 0.97
browser fromHexInto(blob) 673.76 us/op 634.64 us/op 1.06
browser block root to RootHex using the deprecated toHexString 333.64 ns/op 482.15 ns/op 0.69
browser byteArrayEquals 32 bytes (block root) 27.890 ns/op 28.082 ns/op 0.99
browser byteArrayEquals 48 bytes (pubkey) 39.254 ns/op 39.625 ns/op 0.99
browser byteArrayEquals 96 bytes (signature) 73.373 ns/op 74.525 ns/op 0.98
browser byteArrayEquals 1024 bytes 750.48 ns/op 758.09 ns/op 0.99
browser byteArrayEquals 131072 bytes (blob) 94.550 us/op 95.555 us/op 0.99

by benchmarkbot/action

… helpers

The helpers are now implemented with specrefs in functions.yml, so the
exception entries conflict. Also disambiguate the
upgradeIndexedAttestationToGloas search anchor — the function has two
overload signatures plus the implementation, tripping ethspecify's
unique-match requirement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment on lines +1025 to +1028
const attestations = isForkPostGloas(fork) ? opPoolAttestations.map(upgradeAttestationToGloas) : opPoolAttestations;
const attesterSlashings = isForkPostGloas(fork)
? opPoolAttesterSlashings.map(upgradeAttesterSlashingToGloas)
: opPoolAttesterSlashings;

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.

@twoeths pointed out this shouldn't be needed in discord, I haven't really checked if that is true or not, but easy to verify on kurtosis

but if it's needed, the code here is not ideal, so for attestation we only need to do this for 1 epoch since we can only include prev. and current epoch attestations

for attester slashings is seems tricky, there is no expiry on the message

ideally we don't need this at all

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.

yeah I don't see these apis are needed
eip-7688 does not change typical object shape like AttesterSlashing. We can prove by having unit tests, make sure the final SignedBeaconBlock has the same root + serialized bytes
if it's not needed we should not introduce it to avoid the confusion later
unless kurtosis/unit test proves I'm wrong

Comment on lines +120 to +126
export function upgradeAttestationToGloas(pre: electra.Attestation): gloas.Attestation {
return {
aggregationBits: cloneBitArray(pre.aggregationBits),
data: pre.data,
signature: pre.signature,
committeeBits: cloneBitArray(pre.committeeBits),
};

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 wonder if this is a no-op 😅

@ensi321

ensi321 commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

Changes in this PR is not needed. Closing

@ensi321 ensi321 closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants