Skip to content

feat: allow multiple bids compatible with the head view - #9739

Open
nflaig wants to merge 8 commits into
unstablefrom
nflaig/validate-bids-against-head
Open

feat: allow multiple bids compatible with the head view#9739
nflaig wants to merge 8 commits into
unstablefrom
nflaig/validate-bids-against-head

Conversation

@nflaig

@nflaig nflaig commented Jul 31, 2026

Copy link
Copy Markdown
Member

implements ethereum/consensus-specs#5497

  • Restricts propagation to bids compatible with the local head view
  • Tracks seen bids per builder and parent tuple
  • Preserves recovery for bids received before their parent block
  • Prevents duplicate validation before regeneration and after signature verification

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: eb2e30e Previous: b3cb0f6 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 866.70 us/op 1.0484 ms/op 0.83
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 38.371 us/op 40.844 us/op 0.94
BLS verify - blst 650.88 us/op 662.34 us/op 0.98
BLS verifyMultipleSignatures 3 - blst 1.2757 ms/op 1.3852 ms/op 0.92
BLS verifyMultipleSignatures 8 - blst 2.0302 ms/op 2.2027 ms/op 0.92
BLS verifyMultipleSignatures 32 - blst 6.3794 ms/op 6.9396 ms/op 0.92
BLS verifyMultipleSignatures 64 - blst 12.515 ms/op 13.781 ms/op 0.91
BLS verifyMultipleSignatures 128 - blst 24.418 ms/op 26.020 ms/op 0.94
BLS deserializing 10000 signatures 609.87 ms/op 642.55 ms/op 0.95
BLS deserializing 100000 signatures 6.2107 s/op 6.4661 s/op 0.96
BLS verifyMultipleSignatures - same message - 3 - blst 756.83 us/op 798.28 us/op 0.95
BLS verifyMultipleSignatures - same message - 8 - blst 909.48 us/op 948.21 us/op 0.96
BLS verifyMultipleSignatures - same message - 32 - blst 1.4778 ms/op 1.4735 ms/op 1.00
BLS verifyMultipleSignatures - same message - 64 - blst 2.3065 ms/op 2.3872 ms/op 0.97
BLS verifyMultipleSignatures - same message - 128 - blst 3.8765 ms/op 4.1394 ms/op 0.94
BLS aggregatePubkeys 32 - blst 17.090 us/op 17.809 us/op 0.96
BLS aggregatePubkeys 128 - blst 60.581 us/op 63.908 us/op 0.95
getSlashingsAndExits - default max 46.224 us/op 49.481 us/op 0.93
getSlashingsAndExits - 2k 382.07 us/op 353.29 us/op 1.08
proposeBlockBody type=full, size=empty 767.56 us/op 640.40 us/op 1.20
isKnown best case - 1 super set check 186.00 ns/op 170.00 ns/op 1.09
isKnown normal case - 2 super set checks 157.00 ns/op 165.00 ns/op 0.95
isKnown worse case - 16 super set checks 157.00 ns/op 169.00 ns/op 0.93
validate api signedAggregateAndProof - struct 1.4344 ms/op 1.5601 ms/op 0.92
validate gossip signedAggregateAndProof - struct 1.4257 ms/op 1.5566 ms/op 0.92
batch validate gossip attestation - vc 640000 - chunk 32 102.73 us/op 111.02 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 64 92.060 us/op 95.224 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 128 85.870 us/op 89.225 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 83.969 us/op 84.843 us/op 0.99
bytes32 toHexString 282.00 ns/op 292.00 ns/op 0.97
bytes32 Buffer.toString(hex) 158.00 ns/op 165.00 ns/op 0.96
bytes32 Buffer.toString(hex) from Uint8Array 222.00 ns/op 235.00 ns/op 0.94
bytes32 Buffer.toString(hex) + 0x 157.00 ns/op 165.00 ns/op 0.95
Return object 10000 times 0.20530 ns/op 0.21320 ns/op 0.96
Throw Error 10000 times 3.1902 us/op 3.4972 us/op 0.91
toHex 89.884 ns/op 100.52 ns/op 0.89
Buffer.from 88.421 ns/op 93.044 ns/op 0.95
shared Buffer 57.912 ns/op 64.170 ns/op 0.90
fastMsgIdFn sha256 / 200 bytes 1.4170 us/op 1.4950 us/op 0.95
fastMsgIdFn h32 xxhash / 200 bytes 147.00 ns/op 150.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 200 bytes 185.00 ns/op 209.00 ns/op 0.89
fastMsgIdFn sha256 / 1000 bytes 4.5600 us/op 4.9010 us/op 0.93
fastMsgIdFn h32 xxhash / 1000 bytes 236.00 ns/op 240.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 1000 bytes 233.00 ns/op 257.00 ns/op 0.91
fastMsgIdFn sha256 / 10000 bytes 40.360 us/op 43.245 us/op 0.93
fastMsgIdFn h32 xxhash / 10000 bytes 1.2300 us/op 1.2670 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 797.00 ns/op 819.00 ns/op 0.97
send data - 1000 256B messages 4.3197 ms/op 4.1424 ms/op 1.04
send data - 1000 512B messages 5.2546 ms/op 4.9397 ms/op 1.06
send data - 1000 1024B messages 5.3259 ms/op 5.6226 ms/op 0.95
send data - 1000 1200B messages 6.1396 ms/op 6.0369 ms/op 1.02
send data - 1000 2048B messages 9.3814 ms/op 20.242 ms/op 0.46
send data - 1000 4096B messages 53.616 ms/op 47.211 ms/op 1.14
send data - 1000 16384B messages 295.57 ms/op 255.66 ms/op 1.16
send data - 1000 65536B messages 1.2458 s/op 1.2293 s/op 1.01
enrSubnets - fastDeserialize 64 bits 712.00 ns/op 784.00 ns/op 0.91
enrSubnets - ssz BitVector 64 bits 253.00 ns/op 266.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 94.000 ns/op 104.00 ns/op 0.90
enrSubnets - ssz BitVector 4 bits 247.00 ns/op 269.00 ns/op 0.92
prioritizePeers score -10:0 att 32-0.1 sync 2-0 192.32 us/op 212.78 us/op 0.90
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 217.59 us/op 243.12 us/op 0.89
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 315.82 us/op 353.36 us/op 0.89
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 560.09 us/op 621.30 us/op 0.90
prioritizePeers score 0:0 att 64-1 sync 4-1 654.85 us/op 727.66 us/op 0.90
array of 16000 items push then shift 1.1974 us/op 1.3198 us/op 0.91
LinkedList of 16000 items push then shift 7.2430 ns/op 6.9230 ns/op 1.05
array of 16000 items push then pop 62.425 ns/op 66.659 ns/op 0.94
LinkedList of 16000 items push then pop 5.7620 ns/op 6.1480 ns/op 0.94
array of 24000 items push then shift 1.7782 us/op 1.9636 us/op 0.91
LinkedList of 24000 items push then shift 6.8340 ns/op 6.4990 ns/op 1.05
array of 24000 items push then pop 88.147 ns/op 93.766 ns/op 0.94
LinkedList of 24000 items push then pop 5.8930 ns/op 6.1320 ns/op 0.96
intersect bitArray bitLen 8 3.6930 ns/op 3.9010 ns/op 0.95
intersect array and set length 8 27.827 ns/op 30.630 ns/op 0.91
intersect bitArray bitLen 128 22.231 ns/op 23.527 ns/op 0.94
intersect array and set length 128 472.94 ns/op 517.67 ns/op 0.91
bitArray.getTrueBitIndexes() bitLen 128 880.00 ns/op 931.00 ns/op 0.95
bitArray.getTrueBitIndexes() bitLen 248 1.5880 us/op 1.6660 us/op 0.95
bitArray.getTrueBitIndexes() bitLen 512 3.3540 us/op 3.4810 us/op 0.96
Full columns - reconstruct all 6 blobs 256.32 us/op 165.69 us/op 1.55
Full columns - reconstruct half of the blobs out of 6 101.38 us/op 68.287 us/op 1.48
Full columns - reconstruct single blob out of 6 31.161 us/op 33.919 us/op 0.92
Half columns - reconstruct all 6 blobs 380.11 ms/op 396.72 ms/op 0.96
Half columns - reconstruct half of the blobs out of 6 192.90 ms/op 203.65 ms/op 0.95
Half columns - reconstruct single blob out of 6 69.615 ms/op 70.710 ms/op 0.98
Set add up to 64 items then delete first 2.2107 us/op 1.6887 us/op 1.31
OrderedSet add up to 64 items then delete first 3.2898 us/op 2.5696 us/op 1.28
Set add up to 64 items then delete last 2.3245 us/op 1.9749 us/op 1.18
OrderedSet add up to 64 items then delete last 3.2305 us/op 3.0060 us/op 1.07
Set add up to 64 items then delete middle 2.3545 us/op 2.0226 us/op 1.16
OrderedSet add up to 64 items then delete middle 4.5263 us/op 4.5528 us/op 0.99
Set add up to 128 items then delete first 4.1932 us/op 3.9387 us/op 1.06
OrderedSet add up to 128 items then delete first 6.5893 us/op 5.8714 us/op 1.12
Set add up to 128 items then delete last 3.8792 us/op 3.8884 us/op 1.00
OrderedSet add up to 128 items then delete last 5.4593 us/op 5.9316 us/op 0.92
Set add up to 128 items then delete middle 3.8740 us/op 3.8388 us/op 1.01
OrderedSet add up to 128 items then delete middle 11.024 us/op 11.878 us/op 0.93
Set add up to 256 items then delete first 7.4818 us/op 7.9006 us/op 0.95
OrderedSet add up to 256 items then delete first 11.480 us/op 12.067 us/op 0.95
Set add up to 256 items then delete last 7.4044 us/op 7.7172 us/op 0.96
OrderedSet add up to 256 items then delete last 10.835 us/op 12.126 us/op 0.89
Set add up to 256 items then delete middle 7.4394 us/op 7.6175 us/op 0.98
OrderedSet add up to 256 items then delete middle 33.371 us/op 35.825 us/op 0.93
runFastConfirmationRules vc:100000 bc:96 eq:0 4.4334 ms/op 5.1926 ms/op 0.85
runFastConfirmationRules vc:600000 bc:96 eq:0 33.502 ms/op 35.686 ms/op 0.94
runFastConfirmationRules vc:1000000 bc:96 eq:0 54.979 ms/op 59.620 ms/op 0.92
runFastConfirmationRules vc:600000 bc:320 eq:0 33.333 ms/op 35.735 ms/op 0.93
runFastConfirmationRules vc:100000 bc:96 eq:1000 1.0504 s/op 1.1033 s/op 0.95
pass gossip attestations to forkchoice per slot 2.4835 ms/op 2.6199 ms/op 0.95
forkChoice updateHead vc 100000 bc 64 eq 0 395.72 us/op 478.91 us/op 0.83
forkChoice updateHead vc 600000 bc 64 eq 0 2.3654 ms/op 2.7665 ms/op 0.86
forkChoice updateHead vc 1000000 bc 64 eq 0 3.9228 ms/op 4.6805 ms/op 0.84
forkChoice updateHead vc 600000 bc 320 eq 0 2.3591 ms/op 2.8882 ms/op 0.82
forkChoice updateHead vc 600000 bc 1200 eq 0 2.3766 ms/op 2.9500 ms/op 0.81
forkChoice updateHead vc 600000 bc 7200 eq 0 2.7930 ms/op 3.2581 ms/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 1000 2.3641 ms/op 2.8826 ms/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 10000 2.4401 ms/op 2.8364 ms/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 300000 5.9872 ms/op 6.7289 ms/op 0.89
computeDeltas 1400000 validators 0% inactive 11.620 ms/op 13.518 ms/op 0.86
computeDeltas 1400000 validators 10% inactive 10.939 ms/op 12.777 ms/op 0.86
computeDeltas 1400000 validators 20% inactive 10.335 ms/op 12.095 ms/op 0.85
computeDeltas 1400000 validators 50% inactive 8.5120 ms/op 9.8352 ms/op 0.87
computeDeltas 2100000 validators 0% inactive 17.307 ms/op 20.162 ms/op 0.86
computeDeltas 2100000 validators 10% inactive 16.418 ms/op 19.316 ms/op 0.85
computeDeltas 2100000 validators 20% inactive 15.475 ms/op 17.943 ms/op 0.86
computeDeltas 2100000 validators 50% inactive 10.361 ms/op 14.621 ms/op 0.71
altair processAttestation - 250000 vs - 7PWei normalcase 1.7909 ms/op 1.6198 ms/op 1.11
altair processAttestation - 250000 vs - 7PWei worstcase 2.4886 ms/op 2.3987 ms/op 1.04
altair processAttestation - setStatus - 1/6 committees join 94.741 us/op 106.13 us/op 0.89
altair processAttestation - setStatus - 1/3 committees join 187.19 us/op 202.89 us/op 0.92
altair processAttestation - setStatus - 1/2 committees join 263.81 us/op 287.01 us/op 0.92
altair processAttestation - setStatus - 2/3 committees join 355.63 us/op 368.76 us/op 0.96
altair processAttestation - setStatus - 4/5 committees join 483.48 us/op 510.32 us/op 0.95
altair processAttestation - setStatus - 100% committees join 550.99 us/op 602.03 us/op 0.92
altair processBlock - 250000 vs - 7PWei normalcase 4.7739 ms/op 3.2142 ms/op 1.49
altair processBlock - 250000 vs - 7PWei normalcase hashState 15.611 ms/op 12.444 ms/op 1.25
altair processBlock - 250000 vs - 7PWei worstcase 19.683 ms/op 19.820 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase hashState 40.898 ms/op 38.508 ms/op 1.06
phase0 processBlock - 250000 vs - 7PWei normalcase 1.2656 ms/op 1.3453 ms/op 0.94
phase0 processBlock - 250000 vs - 7PWei worstcase 16.036 ms/op 17.320 ms/op 0.93
altair processEth1Data - 250000 vs - 7PWei normalcase 304.40 us/op 311.55 us/op 0.98
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 2.9940 us/op 3.7080 us/op 0.81
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 18.274 us/op 23.362 us/op 0.78
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.3270 us/op 6.5680 us/op 0.81
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.4520 us/op 5.2240 us/op 0.66
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 85.306 us/op 100.30 us/op 0.85
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.2756 ms/op 1.4170 ms/op 0.90
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.6740 ms/op 1.9115 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6804 ms/op 1.8619 ms/op 0.90
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.3876 ms/op 3.7932 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9059 ms/op 2.0805 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6717 ms/op 4.0441 ms/op 0.91
Tree 40 250000 create 287.96 ms/op 320.02 ms/op 0.90
Tree 40 250000 get(125000) 87.175 ns/op 103.87 ns/op 0.84
Tree 40 250000 set(125000) 925.16 ns/op 1.0979 us/op 0.84
Tree 40 250000 toArray() 10.537 ms/op 9.6388 ms/op 1.09
Tree 40 250000 iterate all - toArray() + loop 11.105 ms/op 9.7342 ms/op 1.14
Tree 40 250000 iterate all - get(i) 33.518 ms/op 37.194 ms/op 0.90
Array 250000 create 1.9715 ms/op 2.0605 ms/op 0.96
Array 250000 clone - spread 620.77 us/op 648.88 us/op 0.96
Array 250000 get(125000) 0.28500 ns/op 0.29800 ns/op 0.96
Array 250000 set(125000) 0.28600 ns/op 0.30300 ns/op 0.94
Array 250000 iterate all - loop 53.803 us/op 57.337 us/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 38.054 ms/op 39.436 ms/op 0.96
Array.fill - length 1000000 2.0015 ms/op 2.3815 ms/op 0.84
Array push - length 1000000 8.1165 ms/op 7.6183 ms/op 1.07
Array.get 0.19466 ns/op 0.20628 ns/op 0.94
Uint8Array.get 0.22062 ns/op 0.24774 ns/op 0.89
phase0 beforeProcessEpoch - 250000 vs - 7PWei 12.671 ms/op 12.241 ms/op 1.04
altair processEpoch - mainnet_e81889 260.24 ms/op 245.23 ms/op 1.06
mainnet_e81889 - altair beforeProcessEpoch 15.018 ms/op 19.548 ms/op 0.77
mainnet_e81889 - altair processJustificationAndFinalization 5.6670 us/op 5.1910 us/op 1.09
mainnet_e81889 - altair processInactivityUpdates 3.2572 ms/op 3.7644 ms/op 0.87
mainnet_e81889 - altair processRewardsAndPenalties 18.208 ms/op 17.382 ms/op 1.05
mainnet_e81889 - altair processRegistryUpdates 539.00 ns/op 587.00 ns/op 0.92
mainnet_e81889 - altair processSlashings 132.00 ns/op 160.00 ns/op 0.82
mainnet_e81889 - altair processEth1DataReset 128.00 ns/op 155.00 ns/op 0.83
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7227 ms/op 1.7260 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 645.00 ns/op 714.00 ns/op 0.90
mainnet_e81889 - altair processRandaoMixesReset 1.0220 us/op 1.0960 us/op 0.93
mainnet_e81889 - altair processHistoricalRootsUpdate 134.00 ns/op 155.00 ns/op 0.86
mainnet_e81889 - altair processParticipationFlagUpdates 423.00 ns/op 462.00 ns/op 0.92
mainnet_e81889 - altair processSyncCommitteeUpdates 106.00 ns/op 130.00 ns/op 0.82
mainnet_e81889 - altair afterProcessEpoch 38.771 ms/op 40.583 ms/op 0.96
capella processEpoch - mainnet_e217614 748.57 ms/op 817.04 ms/op 0.92
mainnet_e217614 - capella beforeProcessEpoch 59.848 ms/op 59.005 ms/op 1.01
mainnet_e217614 - capella processJustificationAndFinalization 6.0340 us/op 5.6370 us/op 1.07
mainnet_e217614 - capella processInactivityUpdates 14.886 ms/op 12.247 ms/op 1.22
mainnet_e217614 - capella processRewardsAndPenalties 82.343 ms/op 96.748 ms/op 0.85
mainnet_e217614 - capella processRegistryUpdates 4.1630 us/op 4.5700 us/op 0.91
mainnet_e217614 - capella processSlashings 134.00 ns/op 147.00 ns/op 0.91
mainnet_e217614 - capella processEth1DataReset 128.00 ns/op 146.00 ns/op 0.88
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.757 ms/op 5.9866 ms/op 1.96
mainnet_e217614 - capella processSlashingsReset 646.00 ns/op 694.00 ns/op 0.93
mainnet_e217614 - capella processRandaoMixesReset 1.1120 us/op 1.3210 us/op 0.84
mainnet_e217614 - capella processHistoricalRootsUpdate 132.00 ns/op 155.00 ns/op 0.85
mainnet_e217614 - capella processParticipationFlagUpdates 432.00 ns/op 467.00 ns/op 0.93
mainnet_e217614 - capella afterProcessEpoch 102.60 ms/op 109.96 ms/op 0.93
phase0 processEpoch - mainnet_e58758 286.70 ms/op 315.15 ms/op 0.91
mainnet_e58758 - phase0 beforeProcessEpoch 59.313 ms/op 71.026 ms/op 0.84
mainnet_e58758 - phase0 processJustificationAndFinalization 5.9170 us/op 6.5470 us/op 0.90
mainnet_e58758 - phase0 processRewardsAndPenalties 15.506 ms/op 16.802 ms/op 0.92
mainnet_e58758 - phase0 processRegistryUpdates 2.1750 us/op 2.3240 us/op 0.94
mainnet_e58758 - phase0 processSlashings 135.00 ns/op 157.00 ns/op 0.86
mainnet_e58758 - phase0 processEth1DataReset 130.00 ns/op 156.00 ns/op 0.83
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 774.53 us/op 1.3485 ms/op 0.57
mainnet_e58758 - phase0 processSlashingsReset 825.00 ns/op 931.00 ns/op 0.89
mainnet_e58758 - phase0 processRandaoMixesReset 1.0450 us/op 1.3170 us/op 0.79
mainnet_e58758 - phase0 processHistoricalRootsUpdate 132.00 ns/op 161.00 ns/op 0.82
mainnet_e58758 - phase0 processParticipationRecordUpdates 966.00 ns/op 1.1530 us/op 0.84
mainnet_e58758 - phase0 afterProcessEpoch 32.808 ms/op 34.029 ms/op 0.96
phase0 processEffectiveBalanceUpdates - 250000 normalcase 947.17 us/op 1.0407 ms/op 0.91
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5295 ms/op 1.6731 ms/op 0.91
altair processInactivityUpdates - 250000 normalcase 9.9010 ms/op 10.910 ms/op 0.91
altair processInactivityUpdates - 250000 worstcase 9.8703 ms/op 10.626 ms/op 0.93
phase0 processRegistryUpdates - 250000 normalcase 2.3570 us/op 2.4390 us/op 0.97
phase0 processRegistryUpdates - 250000 badcase_full_deposits 134.37 us/op 144.99 us/op 0.93
phase0 processRegistryUpdates - 250000 worstcase 0.5 58.046 ms/op 51.709 ms/op 1.12
altair processRewardsAndPenalties - 250000 normalcase 15.354 ms/op 15.201 ms/op 1.01
altair processRewardsAndPenalties - 250000 worstcase 14.334 ms/op 15.602 ms/op 0.92
phase0 getAttestationDeltas - 250000 normalcase 5.0379 ms/op 5.4159 ms/op 0.93
phase0 getAttestationDeltas - 250000 worstcase 5.0676 ms/op 5.5034 ms/op 0.92
phase0 processSlashings - 250000 worstcase 55.964 us/op 62.399 us/op 0.90
altair processSyncCommitteeUpdates - 250000 9.5380 ms/op 10.201 ms/op 0.94
BeaconState.hashTreeRoot - No change 164.00 ns/op 191.00 ns/op 0.86
BeaconState.hashTreeRoot - 1 full validator 73.030 us/op 57.076 us/op 1.28
BeaconState.hashTreeRoot - 32 full validator 765.38 us/op 719.35 us/op 1.06
BeaconState.hashTreeRoot - 512 full validator 7.4290 ms/op 5.9999 ms/op 1.24
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 90.131 us/op 70.494 us/op 1.28
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.2959 ms/op 1.0456 ms/op 1.24
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 14.687 ms/op 12.820 ms/op 1.15
BeaconState.hashTreeRoot - 1 balances 70.696 us/op 55.867 us/op 1.27
BeaconState.hashTreeRoot - 32 balances 674.06 us/op 540.14 us/op 1.25
BeaconState.hashTreeRoot - 512 balances 5.2541 ms/op 4.6233 ms/op 1.14
BeaconState.hashTreeRoot - 250000 balances 173.27 ms/op 89.826 ms/op 1.93
aggregationBits - 2048 els - zipIndexesInBitList 18.232 us/op 20.194 us/op 0.90
regular array get 100000 times 21.759 us/op 22.932 us/op 0.95
wrappedArray get 100000 times 21.862 us/op 22.929 us/op 0.95
arrayWithProxy get 100000 times 9.2827 ms/op 10.719 ms/op 0.87
ssz.Root.equals 20.348 ns/op 21.536 ns/op 0.94
byteArrayEquals 20.250 ns/op 21.362 ns/op 0.95
Buffer.compare 8.4140 ns/op 9.6450 ns/op 0.87
processSlot - 1 slots 10.048 us/op 8.2710 us/op 1.21
processSlot - 32 slots 1.8346 ms/op 1.8571 ms/op 0.99
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.4417 ms/op 2.8854 ms/op 1.19
getCommitteeAssignments - req 1 vs - 250000 vc 1.5800 ms/op 1.6924 ms/op 0.93
getCommitteeAssignments - req 100 vs - 250000 vc 3.2351 ms/op 3.4554 ms/op 0.94
getCommitteeAssignments - req 1000 vs - 250000 vc 3.4709 ms/op 3.7095 ms/op 0.94
findModifiedValidators - 10000 modified validators 607.24 ms/op 661.28 ms/op 0.92
findModifiedValidators - 1000 modified validators 494.34 ms/op 556.43 ms/op 0.89
findModifiedValidators - 100 modified validators 328.59 ms/op 323.50 ms/op 1.02
findModifiedValidators - 10 modified validators 241.37 ms/op 279.33 ms/op 0.86
findModifiedValidators - 1 modified validators 143.12 ms/op 241.05 ms/op 0.59
findModifiedValidators - no difference 179.13 ms/op 204.13 ms/op 0.88
migrate state 1500000 validators, 3400 modified, 2000 new 2.7435 s/op 2.6743 s/op 1.03
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.5500 ns/op 3.8700 ns/op 0.92
state getBlockRootAtSlot - 250000 vs - 7PWei 320.77 ns/op 287.05 ns/op 1.12
computeProposerIndex 100000 validators 1.2801 ms/op 1.3246 ms/op 0.97
getNextSyncCommitteeIndices 1000 validators 2.7794 ms/op 2.8825 ms/op 0.96
getNextSyncCommitteeIndices 10000 validators 24.814 ms/op 25.180 ms/op 0.99
getNextSyncCommitteeIndices 100000 validators 87.227 ms/op 83.309 ms/op 1.05
computeProposers - vc 250000 550.63 us/op 549.11 us/op 1.00
computeEpochShuffling - vc 250000 40.277 ms/op 40.507 ms/op 0.99
getNextSyncCommittee - vc 250000 9.2544 ms/op 9.4038 ms/op 0.98
nodejs block root to RootHex using toHex 92.421 ns/op 104.82 ns/op 0.88
nodejs block root to RootHex using toRootHex 67.910 ns/op 69.665 ns/op 0.97
nodejs fromHex(blob) 704.49 us/op 809.38 us/op 0.87
nodejs fromHexInto(blob) 602.28 us/op 668.08 us/op 0.90
nodejs block root to RootHex using the deprecated toHexString 338.53 ns/op 486.38 ns/op 0.70
nodejs byteArrayEquals 32 bytes (block root) 24.758 ns/op 25.866 ns/op 0.96
nodejs byteArrayEquals 48 bytes (pubkey) 35.726 ns/op 37.414 ns/op 0.95
nodejs byteArrayEquals 96 bytes (signature) 34.578 ns/op 41.037 ns/op 0.84
nodejs byteArrayEquals 1024 bytes 38.435 ns/op 43.658 ns/op 0.88
nodejs byteArrayEquals 131072 bytes (blob) 1.6688 us/op 1.7615 us/op 0.95
browser block root to RootHex using toHex 136.72 ns/op 147.46 ns/op 0.93
browser block root to RootHex using toRootHex 123.93 ns/op 135.79 ns/op 0.91
browser fromHex(blob) 1.4592 ms/op 1.5818 ms/op 0.92
browser fromHexInto(blob) 603.47 us/op 670.45 us/op 0.90
browser block root to RootHex using the deprecated toHexString 426.69 ns/op 346.46 ns/op 1.23
browser byteArrayEquals 32 bytes (block root) 26.617 ns/op 27.966 ns/op 0.95
browser byteArrayEquals 48 bytes (pubkey) 37.615 ns/op 39.443 ns/op 0.95
browser byteArrayEquals 96 bytes (signature) 70.491 ns/op 73.660 ns/op 0.96
browser byteArrayEquals 1024 bytes 729.91 ns/op 751.59 ns/op 0.97
browser byteArrayEquals 131072 bytes (blob) 91.629 us/op 94.753 us/op 0.97

by benchmarkbot/action

Comment on lines 463 to 467
case GossipType.execution_payload_bid: {
// instead of searching for the message root, this searches for the parent root
// Search for the parent independently of current head compatibility. A bid may arrive
// before its parent block, so compatibility is checked later during gossip validation.
const parentBlockRoot = getParentBlockRootFromSignedExecutionPayloadBidSerialized(message.msg.data);
const parentBlockHash = getParentBlockHashFromSignedExecutionPayloadBidSerialized(message.msg.data);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@twoeths @wemeetagain curious what are your thoughts about queuing bids in the network processor, I think this could be a potential dos vector

@twoeths twoeths Aug 1, 2026

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.

the root cause is epoch transition when validating gossip bid
I guess it's not an issue once we have #9739
that would prevent the epoch transition when validating the bid

so we can still run epoch transition when validating bid with this PR
we can avoid that by also front-running epoch transition for parent as well
but that means 2 epoch transition per epoch which affects us heavily

@nflaig nflaig Aug 1, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

but that means 2 epoch transition per epoch which affects us heavily

we should disallow this to happen at the epoch boundary somehow, currently the proposer boost reorg spec also prevents this behavior via is_not_at_epoch_boundary, so if we are proposer or others following the spec as is will not use bids for the parent of our head

Comment thread packages/beacon-node/src/chain/validation/executionPayloadBid.ts Outdated
Comment thread packages/fork-choice/test/unit/protoArray/gloas.test.ts
forkChoice: IForkChoice,
head: ProtoBlock,
bidSlot: Slot,
parentBlockRoot: 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.

maybe bidParentBlockRoot and bidParentBlockHash would makes it easier to understand

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

applied that naming more broadly. I think it make sense to avoid confusing

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants