Skip to content

feat: report parent_block_hash for safe/finalized post-Gloas#9393

Open
wemeetagain wants to merge 1 commit into
unstablefrom
cayman/gloas-fcu-parent-hash
Open

feat: report parent_block_hash for safe/finalized post-Gloas#9393
wemeetagain wants to merge 1 commit into
unstablefrom
cayman/gloas-fcu-parent-hash

Conversation

@wemeetagain
Copy link
Copy Markdown
Member

Motivation

  • alpha.8

Description

Implements consensus-specs PR-5197. Post-Gloas, engine_forkchoiceUpdated must report the bid's parent_block_hash as both safeBlockHash and finalizedBlockHash rather than the block's own execution payload hash: under ePBS the safe/finalized block's own payload may not yet be confirmed canonical, but its parent EL block has been.

Adds getFinalizedExecutionBlockHash to mirror getSafeExecutionBlockHash and switches all five FCU callsites to the new fork-aware helpers.

AI Assistance Disclosure

  • claude assistance

Implements consensus-specs PR-5197. Post-Gloas, engine_forkchoiceUpdated
must report the bid's parent_block_hash as both safeBlockHash and
finalizedBlockHash rather than the block's own execution payload hash:
under ePBS the safe/finalized block's own payload may not yet be confirmed
canonical, but its parent EL block has been.

Adds getFinalizedExecutionBlockHash to mirror getSafeExecutionBlockHash and
switches all five FCU callsites to the new fork-aware helpers.
@wemeetagain wemeetagain requested a review from a team as a code owner May 21, 2026 16:12
Copy link
Copy Markdown
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 introduces logic to correctly handle execution block hashes for the engine_forkchoiceUpdated call in preparation for the Gloas fork. It adds a new utility function getFinalizedExecutionBlockHash and refactors getSafeExecutionBlockHash to return the parent_block_hash for Gloas blocks, ensuring compliance with the updated consensus specifications. These utilities are integrated across the beacon node's block import and production flows, and new unit tests have been added to verify the logic for both pre-Gloas and post-Gloas scenarios. I have no feedback to provide.

@github-actions
Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: bdcb747 Previous: 6c85077 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.3183 ms/op 1.3166 ms/op 1.00
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 42.468 us/op 42.333 us/op 1.00
BLS verify - blst 737.58 us/op 711.16 us/op 1.04
BLS verifyMultipleSignatures 3 - blst 1.4154 ms/op 1.3581 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst 2.2546 ms/op 2.1719 ms/op 1.04
BLS verifyMultipleSignatures 32 - blst 7.2240 ms/op 6.9628 ms/op 1.04
BLS verifyMultipleSignatures 64 - blst 13.760 ms/op 13.266 ms/op 1.04
BLS verifyMultipleSignatures 128 - blst 26.858 ms/op 25.831 ms/op 1.04
BLS deserializing 10000 signatures 661.66 ms/op 636.33 ms/op 1.04
BLS deserializing 100000 signatures 6.6394 s/op 6.3870 s/op 1.04
BLS verifyMultipleSignatures - same message - 3 - blst 842.82 us/op 807.79 us/op 1.04
BLS verifyMultipleSignatures - same message - 8 - blst 846.71 us/op 894.05 us/op 0.95
BLS verifyMultipleSignatures - same message - 32 - blst 1.6425 ms/op 1.5540 ms/op 1.06
BLS verifyMultipleSignatures - same message - 64 - blst 2.5035 ms/op 2.4420 ms/op 1.03
BLS verifyMultipleSignatures - same message - 128 - blst 4.1377 ms/op 4.0683 ms/op 1.02
BLS aggregatePubkeys 32 - blst 18.287 us/op 17.498 us/op 1.05
BLS aggregatePubkeys 128 - blst 64.799 us/op 62.765 us/op 1.03
getSlashingsAndExits - default max 54.663 us/op 47.536 us/op 1.15
getSlashingsAndExits - 2k 398.10 us/op 359.26 us/op 1.11
proposeBlockBody type=full, size=empty 612.69 us/op 692.53 us/op 0.88
isKnown best case - 1 super set check 168.00 ns/op 171.00 ns/op 0.98
isKnown normal case - 2 super set checks 169.00 ns/op 163.00 ns/op 1.04
isKnown worse case - 16 super set checks 176.00 ns/op 162.00 ns/op 1.09
validate api signedAggregateAndProof - struct 1.5532 ms/op 1.5158 ms/op 1.02
validate gossip signedAggregateAndProof - struct 1.5526 ms/op 1.5113 ms/op 1.03
batch validate gossip attestation - vc 640000 - chunk 32 108.50 us/op 106.25 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 64 94.282 us/op 92.170 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 86.857 us/op 86.859 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 256 88.388 us/op 83.187 us/op 1.06
bytes32 toHexString 298.00 ns/op 285.00 ns/op 1.05
bytes32 Buffer.toString(hex) 177.00 ns/op 172.00 ns/op 1.03
bytes32 Buffer.toString(hex) from Uint8Array 256.00 ns/op 243.00 ns/op 1.05
bytes32 Buffer.toString(hex) + 0x 178.00 ns/op 172.00 ns/op 1.03
Return object 10000 times 0.21300 ns/op 0.21170 ns/op 1.01
Throw Error 10000 times 3.3528 us/op 3.2678 us/op 1.03
toHex 99.837 ns/op 101.58 ns/op 0.98
Buffer.from 93.065 ns/op 88.361 ns/op 1.05
shared Buffer 61.792 ns/op 61.700 ns/op 1.00
fastMsgIdFn sha256 / 200 bytes 1.5320 us/op 1.4730 us/op 1.04
fastMsgIdFn h32 xxhash / 200 bytes 154.00 ns/op 153.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 200 bytes 204.00 ns/op 211.00 ns/op 0.97
fastMsgIdFn sha256 / 1000 bytes 4.9120 us/op 4.7170 us/op 1.04
fastMsgIdFn h32 xxhash / 1000 bytes 245.00 ns/op 244.00 ns/op 1.00
fastMsgIdFn h64 xxhash / 1000 bytes 257.00 ns/op 257.00 ns/op 1.00
fastMsgIdFn sha256 / 10000 bytes 43.485 us/op 41.582 us/op 1.05
fastMsgIdFn h32 xxhash / 10000 bytes 1.2980 us/op 1.2760 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 847.00 ns/op 832.00 ns/op 1.02
send data - 1000 256B messages 4.6788 ms/op 4.1467 ms/op 1.13
send data - 1000 512B messages 4.4384 ms/op 4.2348 ms/op 1.05
send data - 1000 1024B messages 4.4962 ms/op 4.5559 ms/op 0.99
send data - 1000 1200B messages 4.5105 ms/op 4.6847 ms/op 0.96
send data - 1000 2048B messages 4.7739 ms/op 4.6401 ms/op 1.03
send data - 1000 4096B messages 5.3545 ms/op 5.5728 ms/op 0.96
send data - 1000 16384B messages 25.815 ms/op 19.935 ms/op 1.29
send data - 1000 65536B messages 126.69 ms/op 232.01 ms/op 0.55
enrSubnets - fastDeserialize 64 bits 771.00 ns/op 751.00 ns/op 1.03
enrSubnets - ssz BitVector 64 bits 262.00 ns/op 262.00 ns/op 1.00
enrSubnets - fastDeserialize 4 bits 102.00 ns/op 103.00 ns/op 0.99
enrSubnets - ssz BitVector 4 bits 267.00 ns/op 261.00 ns/op 1.02
prioritizePeers score -10:0 att 32-0.1 sync 2-0 214.62 us/op 208.44 us/op 1.03
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 243.33 us/op 234.34 us/op 1.04
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 356.32 us/op 361.49 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 626.40 us/op 603.29 us/op 1.04
prioritizePeers score 0:0 att 64-1 sync 4-1 723.85 us/op 700.91 us/op 1.03
array of 16000 items push then shift 1.3386 us/op 1.2996 us/op 1.03
LinkedList of 16000 items push then shift 7.0410 ns/op 6.8030 ns/op 1.03
array of 16000 items push then pop 71.999 ns/op 66.277 ns/op 1.09
LinkedList of 16000 items push then pop 6.2620 ns/op 5.9170 ns/op 1.06
array of 24000 items push then shift 1.9783 us/op 1.9304 us/op 1.02
LinkedList of 24000 items push then shift 7.1130 ns/op 6.5630 ns/op 1.08
array of 24000 items push then pop 97.874 ns/op 92.432 ns/op 1.06
LinkedList of 24000 items push then pop 6.1930 ns/op 5.9790 ns/op 1.04
intersect bitArray bitLen 8 5.1430 ns/op 4.7380 ns/op 1.09
intersect array and set length 8 30.665 ns/op 29.330 ns/op 1.05
intersect bitArray bitLen 128 24.600 ns/op 24.440 ns/op 1.01
intersect array and set length 128 516.15 ns/op 494.96 ns/op 1.04
bitArray.getTrueBitIndexes() bitLen 128 1.0540 us/op 1.0510 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 248 1.8320 us/op 1.7710 us/op 1.03
bitArray.getTrueBitIndexes() bitLen 512 3.7180 us/op 3.5990 us/op 1.03
Full columns - reconstruct all 6 blobs 115.96 us/op 167.31 us/op 0.69
Full columns - reconstruct half of the blobs out of 6 187.97 us/op 97.485 us/op 1.93
Full columns - reconstruct single blob out of 6 36.258 us/op 35.435 us/op 1.02
Half columns - reconstruct all 6 blobs 388.78 ms/op 377.07 ms/op 1.03
Half columns - reconstruct half of the blobs out of 6 193.64 ms/op 192.52 ms/op 1.01
Half columns - reconstruct single blob out of 6 68.592 ms/op 66.868 ms/op 1.03
Full columns - reconstruct all 10 blobs 217.04 us/op 193.46 us/op 1.12
Full columns - reconstruct half of the blobs out of 10 89.902 us/op 111.90 us/op 0.80
Full columns - reconstruct single blob out of 10 87.497 us/op 32.103 us/op 2.73
Half columns - reconstruct all 10 blobs 652.97 ms/op 678.12 ms/op 0.96
Half columns - reconstruct half of the blobs out of 10 341.65 ms/op 338.76 ms/op 1.01
Half columns - reconstruct single blob out of 10 69.789 ms/op 72.393 ms/op 0.96
Full columns - reconstruct all 20 blobs 1.0660 ms/op 1.5226 ms/op 0.70
Full columns - reconstruct half of the blobs out of 20 177.82 us/op 214.09 us/op 0.83
Full columns - reconstruct single blob out of 20 33.449 us/op 33.486 us/op 1.00
Half columns - reconstruct all 20 blobs 1.3174 s/op 1.3028 s/op 1.01
Half columns - reconstruct half of the blobs out of 20 665.80 ms/op 648.52 ms/op 1.03
Half columns - reconstruct single blob out of 20 71.666 ms/op 69.243 ms/op 1.03
Set add up to 64 items then delete first 2.7685 us/op 2.7689 us/op 1.00
OrderedSet add up to 64 items then delete first 3.5543 us/op 3.5728 us/op 0.99
Set add up to 64 items then delete last 2.5042 us/op 2.4902 us/op 1.01
OrderedSet add up to 64 items then delete last 3.4287 us/op 3.3930 us/op 1.01
Set add up to 64 items then delete middle 2.2172 us/op 2.1874 us/op 1.01
OrderedSet add up to 64 items then delete middle 4.9422 us/op 4.8976 us/op 1.01
Set add up to 128 items then delete first 4.4161 us/op 4.4085 us/op 1.00
OrderedSet add up to 128 items then delete first 6.8572 us/op 6.7932 us/op 1.01
Set add up to 128 items then delete last 4.3140 us/op 4.1837 us/op 1.03
OrderedSet add up to 128 items then delete last 6.0134 us/op 5.8703 us/op 1.02
Set add up to 128 items then delete middle 4.0078 us/op 3.9395 us/op 1.02
OrderedSet add up to 128 items then delete middle 11.921 us/op 12.008 us/op 0.99
Set add up to 256 items then delete first 8.1948 us/op 8.0746 us/op 1.01
OrderedSet add up to 256 items then delete first 12.476 us/op 12.612 us/op 0.99
Set add up to 256 items then delete last 7.9813 us/op 7.8338 us/op 1.02
OrderedSet add up to 256 items then delete last 12.032 us/op 11.780 us/op 1.02
Set add up to 256 items then delete middle 7.9049 us/op 7.8055 us/op 1.01
OrderedSet add up to 256 items then delete middle 36.407 us/op 36.215 us/op 1.01
pass gossip attestations to forkchoice per slot 2.6407 ms/op 2.6267 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 462.67 us/op 417.24 us/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 0 2.6149 ms/op 2.4301 ms/op 1.08
forkChoice updateHead vc 1000000 bc 64 eq 0 4.4763 ms/op 4.1039 ms/op 1.09
forkChoice updateHead vc 600000 bc 320 eq 0 2.6061 ms/op 2.4726 ms/op 1.05
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7798 ms/op 2.5552 ms/op 1.09
forkChoice updateHead vc 600000 bc 7200 eq 0 3.0769 ms/op 2.9114 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 1000 3.3103 ms/op 3.0449 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 10000 3.4854 ms/op 3.1539 ms/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 300000 7.9166 ms/op 7.0715 ms/op 1.12
computeDeltas 1400000 validators 0% inactive 14.421 ms/op 13.987 ms/op 1.03
computeDeltas 1400000 validators 10% inactive 13.722 ms/op 13.231 ms/op 1.04
computeDeltas 1400000 validators 20% inactive 12.917 ms/op 12.047 ms/op 1.07
computeDeltas 1400000 validators 50% inactive 9.5681 ms/op 8.9844 ms/op 1.06
computeDeltas 2100000 validators 0% inactive 21.285 ms/op 21.088 ms/op 1.01
computeDeltas 2100000 validators 10% inactive 20.020 ms/op 19.747 ms/op 1.01
computeDeltas 2100000 validators 20% inactive 18.502 ms/op 18.409 ms/op 1.01
computeDeltas 2100000 validators 50% inactive 14.284 ms/op 13.624 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei normalcase 1.7367 ms/op 1.6824 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei worstcase 3.1144 ms/op 2.4472 ms/op 1.27
altair processAttestation - setStatus - 1/6 committees join 110.15 us/op 103.00 us/op 1.07
altair processAttestation - setStatus - 1/3 committees join 218.30 us/op 210.03 us/op 1.04
altair processAttestation - setStatus - 1/2 committees join 299.18 us/op 299.83 us/op 1.00
altair processAttestation - setStatus - 2/3 committees join 389.80 us/op 379.87 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 533.32 us/op 510.79 us/op 1.04
altair processAttestation - setStatus - 100% committees join 635.13 us/op 598.49 us/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase 4.0963 ms/op 2.8368 ms/op 1.44
altair processBlock - 250000 vs - 7PWei normalcase hashState 16.540 ms/op 11.494 ms/op 1.44
altair processBlock - 250000 vs - 7PWei worstcase 22.266 ms/op 20.026 ms/op 1.11
altair processBlock - 250000 vs - 7PWei worstcase hashState 43.279 ms/op 43.768 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4993 ms/op 1.2916 ms/op 1.16
phase0 processBlock - 250000 vs - 7PWei worstcase 22.182 ms/op 17.320 ms/op 1.28
altair processEth1Data - 250000 vs - 7PWei normalcase 326.14 us/op 294.50 us/op 1.11
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 6.4050 us/op 3.4640 us/op 1.85
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 40.425 us/op 20.881 us/op 1.94
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 8.7970 us/op 6.1150 us/op 1.44
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 6.2310 us/op 3.7350 us/op 1.67
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 98.007 us/op 92.792 us/op 1.06
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.4999 ms/op 1.4351 ms/op 1.05
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9639 ms/op 1.8783 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9492 ms/op 1.8735 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.0569 ms/op 3.7199 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2656 ms/op 2.1064 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.2965 ms/op 3.9765 ms/op 1.08
Tree 40 250000 create 440.58 ms/op 328.76 ms/op 1.34
Tree 40 250000 get(125000) 107.97 ns/op 94.799 ns/op 1.14
Tree 40 250000 set(125000) 1.0931 us/op 1.0318 us/op 1.06
Tree 40 250000 toArray() 13.784 ms/op 10.088 ms/op 1.37
Tree 40 250000 iterate all - toArray() + loop 13.548 ms/op 9.8982 ms/op 1.37
Tree 40 250000 iterate all - get(i) 43.229 ms/op 38.560 ms/op 1.12
Array 250000 create 2.6974 ms/op 2.1680 ms/op 1.24
Array 250000 clone - spread 827.98 us/op 682.40 us/op 1.21
Array 250000 get(125000) 0.31300 ns/op 0.29600 ns/op 1.06
Array 250000 set(125000) 0.30700 ns/op 0.30500 ns/op 1.01
Array 250000 iterate all - loop 59.063 us/op 58.182 us/op 1.02
phase0 afterProcessEpoch - 250000 vs - 7PWei 41.581 ms/op 62.602 ms/op 0.66
Array.fill - length 1000000 2.6479 ms/op 2.3278 ms/op 1.14
Array push - length 1000000 11.024 ms/op 8.9185 ms/op 1.24
Array.get 0.21641 ns/op 0.20692 ns/op 1.05
Uint8Array.get 0.26889 ns/op 0.25511 ns/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.330 ms/op 13.992 ms/op 1.24
altair processEpoch - mainnet_e81889 289.24 ms/op 260.89 ms/op 1.11
mainnet_e81889 - altair beforeProcessEpoch 17.734 ms/op 13.478 ms/op 1.32
mainnet_e81889 - altair processJustificationAndFinalization 5.9910 us/op 5.5350 us/op 1.08
mainnet_e81889 - altair processInactivityUpdates 3.7978 ms/op 3.5020 ms/op 1.08
mainnet_e81889 - altair processRewardsAndPenalties 19.838 ms/op 19.541 ms/op 1.02
mainnet_e81889 - altair processRegistryUpdates 574.00 ns/op 521.00 ns/op 1.10
mainnet_e81889 - altair processSlashings 145.00 ns/op 131.00 ns/op 1.11
mainnet_e81889 - altair processEth1DataReset 134.00 ns/op 126.00 ns/op 1.06
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6492 ms/op 1.7641 ms/op 0.93
mainnet_e81889 - altair processSlashingsReset 731.00 ns/op 703.00 ns/op 1.04
mainnet_e81889 - altair processRandaoMixesReset 1.3460 us/op 1.1610 us/op 1.16
mainnet_e81889 - altair processHistoricalRootsUpdate 142.00 ns/op 129.00 ns/op 1.10
mainnet_e81889 - altair processParticipationFlagUpdates 497.00 ns/op 444.00 ns/op 1.12
mainnet_e81889 - altair processSyncCommitteeUpdates 113.00 ns/op 105.00 ns/op 1.08
mainnet_e81889 - altair afterProcessEpoch 42.344 ms/op 40.484 ms/op 1.05
capella processEpoch - mainnet_e217614 991.59 ms/op 896.44 ms/op 1.11
mainnet_e217614 - capella beforeProcessEpoch 84.219 ms/op 57.859 ms/op 1.46
mainnet_e217614 - capella processJustificationAndFinalization 6.2810 us/op 5.7200 us/op 1.10
mainnet_e217614 - capella processInactivityUpdates 18.136 ms/op 14.391 ms/op 1.26
mainnet_e217614 - capella processRewardsAndPenalties 114.62 ms/op 100.77 ms/op 1.14
mainnet_e217614 - capella processRegistryUpdates 4.7850 us/op 4.5930 us/op 1.04
mainnet_e217614 - capella processSlashings 144.00 ns/op 134.00 ns/op 1.07
mainnet_e217614 - capella processEth1DataReset 137.00 ns/op 130.00 ns/op 1.05
mainnet_e217614 - capella processEffectiveBalanceUpdates 24.042 ms/op 15.987 ms/op 1.50
mainnet_e217614 - capella processSlashingsReset 922.00 ns/op 698.00 ns/op 1.32
mainnet_e217614 - capella processRandaoMixesReset 1.7930 us/op 1.2880 us/op 1.39
mainnet_e217614 - capella processHistoricalRootsUpdate 138.00 ns/op 133.00 ns/op 1.04
mainnet_e217614 - capella processParticipationFlagUpdates 515.00 ns/op 438.00 ns/op 1.18
mainnet_e217614 - capella afterProcessEpoch 114.46 ms/op 109.54 ms/op 1.04
phase0 processEpoch - mainnet_e58758 346.16 ms/op 285.91 ms/op 1.21
mainnet_e58758 - phase0 beforeProcessEpoch 73.346 ms/op 55.317 ms/op 1.33
mainnet_e58758 - phase0 processJustificationAndFinalization 7.0170 us/op 5.5030 us/op 1.28
mainnet_e58758 - phase0 processRewardsAndPenalties 17.336 ms/op 15.420 ms/op 1.12
mainnet_e58758 - phase0 processRegistryUpdates 2.3760 us/op 2.2880 us/op 1.04
mainnet_e58758 - phase0 processSlashings 142.00 ns/op 389.00 ns/op 0.37
mainnet_e58758 - phase0 processEth1DataReset 139.00 ns/op 132.00 ns/op 1.05
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1949 ms/op 846.65 us/op 1.41
mainnet_e58758 - phase0 processSlashingsReset 1.0070 us/op 1.1100 us/op 0.91
mainnet_e58758 - phase0 processRandaoMixesReset 1.4700 us/op 1.5700 us/op 0.94
mainnet_e58758 - phase0 processHistoricalRootsUpdate 145.00 ns/op 134.00 ns/op 1.08
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.3050 us/op 1.3460 us/op 0.97
mainnet_e58758 - phase0 afterProcessEpoch 36.171 ms/op 35.047 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3259 ms/op 1.2484 ms/op 1.06
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.2823 ms/op 1.6070 ms/op 1.42
altair processInactivityUpdates - 250000 normalcase 13.079 ms/op 10.943 ms/op 1.20
altair processInactivityUpdates - 250000 worstcase 14.735 ms/op 10.775 ms/op 1.37
phase0 processRegistryUpdates - 250000 normalcase 2.5600 us/op 2.2420 us/op 1.14
phase0 processRegistryUpdates - 250000 badcase_full_deposits 177.20 us/op 154.18 us/op 1.15
phase0 processRegistryUpdates - 250000 worstcase 0.5 106.70 ms/op 63.253 ms/op 1.69
altair processRewardsAndPenalties - 250000 normalcase 20.234 ms/op 15.051 ms/op 1.34
altair processRewardsAndPenalties - 250000 worstcase 18.258 ms/op 13.986 ms/op 1.31
phase0 getAttestationDeltas - 250000 normalcase 5.8504 ms/op 5.4072 ms/op 1.08
phase0 getAttestationDeltas - 250000 worstcase 5.9529 ms/op 5.4884 ms/op 1.08
phase0 processSlashings - 250000 worstcase 65.020 us/op 60.186 us/op 1.08
altair processSyncCommitteeUpdates - 250000 11.956 ms/op 10.255 ms/op 1.17
BeaconState.hashTreeRoot - No change 178.00 ns/op 178.00 ns/op 1.00
BeaconState.hashTreeRoot - 1 full validator 81.101 us/op 74.601 us/op 1.09
BeaconState.hashTreeRoot - 32 full validator 926.42 us/op 820.90 us/op 1.13
BeaconState.hashTreeRoot - 512 full validator 8.5155 ms/op 6.7983 ms/op 1.25
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 113.50 us/op 76.535 us/op 1.48
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5781 ms/op 1.3131 ms/op 1.20
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.580 ms/op 14.181 ms/op 1.66
BeaconState.hashTreeRoot - 1 balances 84.575 us/op 67.310 us/op 1.26
BeaconState.hashTreeRoot - 32 balances 853.96 us/op 672.14 us/op 1.27
BeaconState.hashTreeRoot - 512 balances 6.7082 ms/op 5.5378 ms/op 1.21
BeaconState.hashTreeRoot - 250000 balances 125.69 ms/op 130.64 ms/op 0.96
aggregationBits - 2048 els - zipIndexesInBitList 21.304 us/op 19.977 us/op 1.07
regular array get 100000 times 24.212 us/op 22.903 us/op 1.06
wrappedArray get 100000 times 24.183 us/op 22.970 us/op 1.05
arrayWithProxy get 100000 times 10.350 ms/op 10.271 ms/op 1.01
ssz.Root.equals 22.519 ns/op 21.575 ns/op 1.04
byteArrayEquals 22.313 ns/op 21.390 ns/op 1.04
Buffer.compare 9.2240 ns/op 8.8850 ns/op 1.04
processSlot - 1 slots 9.6720 us/op 8.2300 us/op 1.18
processSlot - 32 slots 2.2667 ms/op 1.8109 ms/op 1.25
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 5.1162 ms/op 3.1413 ms/op 1.63
getCommitteeAssignments - req 1 vs - 250000 vc 1.7368 ms/op 1.6794 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 3.6029 ms/op 3.4233 ms/op 1.05
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8470 ms/op 3.6877 ms/op 1.04
findModifiedValidators - 10000 modified validators 781.72 ms/op 765.77 ms/op 1.02
findModifiedValidators - 1000 modified validators 579.19 ms/op 486.94 ms/op 1.19
findModifiedValidators - 100 modified validators 362.66 ms/op 298.54 ms/op 1.21
findModifiedValidators - 10 modified validators 289.28 ms/op 175.95 ms/op 1.64
findModifiedValidators - 1 modified validators 206.06 ms/op 187.54 ms/op 1.10
findModifiedValidators - no difference 181.96 ms/op 191.01 ms/op 0.95
migrate state 1500000 validators, 3400 modified, 2000 new 3.6581 s/op 2.7784 s/op 1.32
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.9300 ns/op 3.7400 ns/op 1.05
state getBlockRootAtSlot - 250000 vs - 7PWei 438.60 ns/op 279.08 ns/op 1.57
computeProposerIndex 100000 validators 1.4621 ms/op 1.3263 ms/op 1.10
getNextSyncCommitteeIndices 1000 validators 3.0794 ms/op 2.8801 ms/op 1.07
getNextSyncCommitteeIndices 10000 validators 27.720 ms/op 25.414 ms/op 1.09
getNextSyncCommitteeIndices 100000 validators 98.967 ms/op 87.248 ms/op 1.13
computeProposers - vc 250000 717.79 us/op 545.46 us/op 1.32
computeEpochShuffling - vc 250000 43.764 ms/op 39.257 ms/op 1.11
getNextSyncCommittee - vc 250000 11.503 ms/op 9.4190 ms/op 1.22
nodejs block root to RootHex using toHex 106.39 ns/op 97.349 ns/op 1.09
nodejs block root to RootHex using toRootHex 63.733 ns/op 60.717 ns/op 1.05
nodejs fromHex(blob) 1.2654 ms/op 768.49 us/op 1.65
nodejs fromHexInto(blob) 679.16 us/op 636.33 us/op 1.07
nodejs block root to RootHex using the deprecated toHexString 568.01 ns/op 548.86 ns/op 1.03
nodejs byteArrayEquals 32 bytes (block root) 27.359 ns/op 25.977 ns/op 1.05
nodejs byteArrayEquals 48 bytes (pubkey) 39.645 ns/op 37.579 ns/op 1.05
nodejs byteArrayEquals 96 bytes (signature) 40.479 ns/op 36.741 ns/op 1.10
nodejs byteArrayEquals 1024 bytes 47.537 ns/op 44.702 ns/op 1.06
nodejs byteArrayEquals 131072 bytes (blob) 1.8510 us/op 1.7526 us/op 1.06
browser block root to RootHex using toHex 152.81 ns/op 145.03 ns/op 1.05
browser block root to RootHex using toRootHex 137.98 ns/op 130.92 ns/op 1.05
browser fromHex(blob) 1.9559 ms/op 1.5678 ms/op 1.25
browser fromHexInto(blob) 674.76 us/op 645.98 us/op 1.04
browser block root to RootHex using the deprecated toHexString 405.30 ns/op 373.25 ns/op 1.09
browser byteArrayEquals 32 bytes (block root) 29.604 ns/op 28.278 ns/op 1.05
browser byteArrayEquals 48 bytes (pubkey) 41.601 ns/op 39.769 ns/op 1.05
browser byteArrayEquals 96 bytes (signature) 77.623 ns/op 74.276 ns/op 1.05
browser byteArrayEquals 1024 bytes 793.95 ns/op 760.09 ns/op 1.04
browser byteArrayEquals 131072 bytes (blob) 100.51 us/op 95.781 us/op 1.05

by benchmarkbot/action

if (isGloasBlock(block)) {
return block.parentBlockHash as RootHex;
}
return block.executionPayloadBlockHash ?? HEX_ZERO_HASH;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think doing ?? HEX_ZERO_HASH silences an issue in the event that something is wrong in our fork choice.

We probably need to add a log if we fall back to HEX_ZERO_HASH. I think prysm is having an issue like this https://discord.com/channels/595666850260713488/892088344438255616/1505929876136530021


function getExecutionBlockHashForFCU(block: ProtoBlock): RootHex {
if (isGloasBlock(block)) {
return block.parentBlockHash as RootHex;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't really like this cast

Can we do export function isGloasBlock(block: ProtoBlock): block is ProtoBlock & {parentBlockHash: RootHex}?

return getExecutionBlockHashForFCU(forkChoice.getFinalizedBlock());
}

function getExecutionBlockHashForFCU(block: ProtoBlock): RootHex {
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.

why is the "for fcu" part relevant?

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.

3 participants