Skip to content

fix: ignore PTC attestations for empty assigned slots#9427

Open
nflaig wants to merge 5 commits into
unstablefrom
nflaig/ptc-slot-check
Open

fix: ignore PTC attestations for empty assigned slots#9427
nflaig wants to merge 5 commits into
unstablefrom
nflaig/ptc-slot-check

Conversation

@nflaig
Copy link
Copy Markdown
Member

@nflaig nflaig commented May 30, 2026

@nflaig nflaig requested a review from a team as a code owner May 30, 2026 15:21
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 a new error code INVALID_BLOCK_SLOT and adds validation to ensure that the block referenced by a payload attestation matches the attestation's slot. The reviewer pointed out a potential runtime TypeError because getBlockHexDefaultStatus can return undefined (which would bypass the block === null check), and suggested caching the redundant toRootHex calls to optimize performance.

Comment thread packages/beacon-node/src/chain/validation/payloadAttestationMessage.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 30, 2026

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 2c450b9 Previous: 1070262 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 853.24 us/op 855.97 us/op 1.00
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.576 us/op 38.686 us/op 1.02
BLS verify - blst 732.15 us/op 638.17 us/op 1.15
BLS verifyMultipleSignatures 3 - blst 1.3658 ms/op 1.3511 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst 2.1796 ms/op 2.1505 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst 6.9011 ms/op 6.8197 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst 13.172 ms/op 13.024 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst 25.541 ms/op 25.370 ms/op 1.01
BLS deserializing 10000 signatures 641.92 ms/op 627.11 ms/op 1.02
BLS deserializing 100000 signatures 6.3505 s/op 6.2937 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst 700.63 us/op 774.51 us/op 0.90
BLS verifyMultipleSignatures - same message - 8 - blst 839.58 us/op 917.97 us/op 0.91
BLS verifyMultipleSignatures - same message - 32 - blst 1.5007 ms/op 1.4295 ms/op 1.05
BLS verifyMultipleSignatures - same message - 64 - blst 2.3339 ms/op 2.2241 ms/op 1.05
BLS verifyMultipleSignatures - same message - 128 - blst 4.0961 ms/op 4.0063 ms/op 1.02
BLS aggregatePubkeys 32 - blst 17.572 us/op 17.442 us/op 1.01
BLS aggregatePubkeys 128 - blst 62.730 us/op 62.249 us/op 1.01
getSlashingsAndExits - default max 47.504 us/op 46.783 us/op 1.02
getSlashingsAndExits - 2k 323.93 us/op 320.96 us/op 1.01
proposeBlockBody type=full, size=empty 657.64 us/op 730.34 us/op 0.90
isKnown best case - 1 super set check 156.00 ns/op 175.00 ns/op 0.89
isKnown normal case - 2 super set checks 156.00 ns/op 173.00 ns/op 0.90
isKnown worse case - 16 super set checks 156.00 ns/op 173.00 ns/op 0.90
validate api signedAggregateAndProof - struct 1.5171 ms/op 1.5096 ms/op 1.00
validate gossip signedAggregateAndProof - struct 1.5189 ms/op 1.5045 ms/op 1.01
batch validate gossip attestation - vc 640000 - chunk 32 104.65 us/op 103.38 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 92.898 us/op 91.493 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 84.726 us/op 84.622 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 256 82.429 us/op 80.863 us/op 1.02
bytes32 toHexString 304.00 ns/op 292.00 ns/op 1.04
bytes32 Buffer.toString(hex) 159.00 ns/op 164.00 ns/op 0.97
bytes32 Buffer.toString(hex) from Uint8Array 222.00 ns/op 223.00 ns/op 1.00
bytes32 Buffer.toString(hex) + 0x 159.00 ns/op 164.00 ns/op 0.97
Return object 10000 times 0.20900 ns/op 0.20870 ns/op 1.00
Throw Error 10000 times 3.3987 us/op 3.4541 us/op 0.98
toHex 95.897 ns/op 100.17 ns/op 0.96
Buffer.from 88.691 ns/op 84.341 ns/op 1.05
shared Buffer 56.648 ns/op 55.559 ns/op 1.02
fastMsgIdFn sha256 / 200 bytes 1.4630 us/op 1.4550 us/op 1.01
fastMsgIdFn h32 xxhash / 200 bytes 150.00 ns/op 155.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 200 bytes 196.00 ns/op 203.00 ns/op 0.97
fastMsgIdFn sha256 / 1000 bytes 4.8200 us/op 4.6750 us/op 1.03
fastMsgIdFn h32 xxhash / 1000 bytes 242.00 ns/op 245.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 1000 bytes 242.00 ns/op 258.00 ns/op 0.94
fastMsgIdFn sha256 / 10000 bytes 42.368 us/op 41.337 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 1.2620 us/op 1.2630 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 821.00 ns/op 823.00 ns/op 1.00
send data - 1000 256B messages 4.1828 ms/op 3.9719 ms/op 1.05
send data - 1000 512B messages 4.2703 ms/op 4.0015 ms/op 1.07
send data - 1000 1024B messages 4.1599 ms/op 4.1590 ms/op 1.00
send data - 1000 1200B messages 4.5034 ms/op 4.3741 ms/op 1.03
send data - 1000 2048B messages 4.5163 ms/op 4.5065 ms/op 1.00
send data - 1000 4096B messages 5.4177 ms/op 5.4266 ms/op 1.00
send data - 1000 16384B messages 13.440 ms/op 13.113 ms/op 1.02
send data - 1000 65536B messages 138.43 ms/op 143.76 ms/op 0.96
enrSubnets - fastDeserialize 64 bits 736.00 ns/op 756.00 ns/op 0.97
enrSubnets - ssz BitVector 64 bits 260.00 ns/op 264.00 ns/op 0.98
enrSubnets - fastDeserialize 4 bits 103.00 ns/op 105.00 ns/op 0.98
enrSubnets - ssz BitVector 4 bits 267.00 ns/op 254.00 ns/op 1.05
prioritizePeers score -10:0 att 32-0.1 sync 2-0 209.07 us/op 205.35 us/op 1.02
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 247.99 us/op 231.98 us/op 1.07
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 347.04 us/op 341.37 us/op 1.02
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 605.31 us/op 587.06 us/op 1.03
prioritizePeers score 0:0 att 64-1 sync 4-1 708.47 us/op 690.63 us/op 1.03
array of 16000 items push then shift 1.2888 us/op 1.2853 us/op 1.00
LinkedList of 16000 items push then shift 6.8210 ns/op 6.6580 ns/op 1.02
array of 16000 items push then pop 69.469 ns/op 63.841 ns/op 1.09
LinkedList of 16000 items push then pop 5.9620 ns/op 5.9390 ns/op 1.00
array of 24000 items push then shift 1.9072 us/op 1.8971 us/op 1.01
LinkedList of 24000 items push then shift 6.3420 ns/op 6.2370 ns/op 1.02
array of 24000 items push then pop 94.025 ns/op 88.702 ns/op 1.06
LinkedList of 24000 items push then pop 6.0100 ns/op 5.9170 ns/op 1.02
intersect bitArray bitLen 8 4.7390 ns/op 4.6890 ns/op 1.01
intersect array and set length 8 29.981 ns/op 29.609 ns/op 1.01
intersect bitArray bitLen 128 23.894 ns/op 23.804 ns/op 1.00
intersect array and set length 128 500.92 ns/op 500.61 ns/op 1.00
bitArray.getTrueBitIndexes() bitLen 128 987.00 ns/op 1.0870 us/op 0.91
bitArray.getTrueBitIndexes() bitLen 248 1.7780 us/op 1.7450 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 512 3.6610 us/op 3.4960 us/op 1.05
Full columns - reconstruct all 6 blobs 114.04 us/op 273.07 us/op 0.42
Full columns - reconstruct half of the blobs out of 6 64.801 us/op 65.356 us/op 0.99
Full columns - reconstruct single blob out of 6 33.056 us/op 30.613 us/op 1.08
Half columns - reconstruct all 6 blobs 383.48 ms/op 376.65 ms/op 1.02
Half columns - reconstruct half of the blobs out of 6 188.88 ms/op 189.56 ms/op 1.00
Half columns - reconstruct single blob out of 6 66.762 ms/op 66.152 ms/op 1.01
Full columns - reconstruct all 10 blobs 181.88 us/op 281.41 us/op 0.65
Full columns - reconstruct half of the blobs out of 10 91.775 us/op 112.85 us/op 0.81
Full columns - reconstruct single blob out of 10 32.114 us/op 34.032 us/op 0.94
Half columns - reconstruct all 10 blobs 626.67 ms/op 624.19 ms/op 1.00
Half columns - reconstruct half of the blobs out of 10 314.83 ms/op 314.16 ms/op 1.00
Half columns - reconstruct single blob out of 10 66.395 ms/op 66.087 ms/op 1.00
Full columns - reconstruct all 20 blobs 1.5547 ms/op 523.13 us/op 2.97
Full columns - reconstruct half of the blobs out of 20 182.90 us/op 151.40 us/op 1.21
Full columns - reconstruct single blob out of 20 28.096 us/op 29.527 us/op 0.95
Half columns - reconstruct all 20 blobs 1.2435 s/op 1.2470 s/op 1.00
Half columns - reconstruct half of the blobs out of 20 626.76 ms/op 625.10 ms/op 1.00
Half columns - reconstruct single blob out of 20 66.840 ms/op 65.782 ms/op 1.02
Set add up to 64 items then delete first 2.6373 us/op 2.1638 us/op 1.22
OrderedSet add up to 64 items then delete first 3.3802 us/op 3.3562 us/op 1.01
Set add up to 64 items then delete last 2.4291 us/op 2.4077 us/op 1.01
OrderedSet add up to 64 items then delete last 3.3297 us/op 3.4023 us/op 0.98
Set add up to 64 items then delete middle 2.1746 us/op 2.2409 us/op 0.97
OrderedSet add up to 64 items then delete middle 4.7916 us/op 4.8464 us/op 0.99
Set add up to 128 items then delete first 4.3984 us/op 4.2293 us/op 1.04
OrderedSet add up to 128 items then delete first 6.6951 us/op 6.2963 us/op 1.06
Set add up to 128 items then delete last 4.0935 us/op 4.0664 us/op 1.01
OrderedSet add up to 128 items then delete last 5.9443 us/op 6.0502 us/op 0.98
Set add up to 128 items then delete middle 3.9791 us/op 4.0059 us/op 0.99
OrderedSet add up to 128 items then delete middle 11.716 us/op 12.010 us/op 0.98
Set add up to 256 items then delete first 8.1163 us/op 7.8568 us/op 1.03
OrderedSet add up to 256 items then delete first 12.337 us/op 11.631 us/op 1.06
Set add up to 256 items then delete last 7.8245 us/op 7.8923 us/op 0.99
OrderedSet add up to 256 items then delete last 11.625 us/op 11.988 us/op 0.97
Set add up to 256 items then delete middle 7.7464 us/op 7.8637 us/op 0.99
OrderedSet add up to 256 items then delete middle 35.454 us/op 35.369 us/op 1.00
pass gossip attestations to forkchoice per slot 2.5164 ms/op 2.4990 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 445.75 us/op 438.71 us/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 0 2.7253 ms/op 2.6336 ms/op 1.03
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7387 ms/op 4.3849 ms/op 1.08
forkChoice updateHead vc 600000 bc 320 eq 0 2.7133 ms/op 2.6386 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7879 ms/op 2.6871 ms/op 1.04
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1451 ms/op 2.9454 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 1000 3.4162 ms/op 3.1708 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 10000 3.6351 ms/op 3.2581 ms/op 1.12
forkChoice updateHead vc 600000 bc 64 eq 300000 7.8790 ms/op 7.2105 ms/op 1.09
computeDeltas 1400000 validators 0% inactive 14.489 ms/op 13.415 ms/op 1.08
computeDeltas 1400000 validators 10% inactive 12.816 ms/op 12.652 ms/op 1.01
computeDeltas 1400000 validators 20% inactive 11.896 ms/op 11.867 ms/op 1.00
computeDeltas 1400000 validators 50% inactive 9.1895 ms/op 8.8851 ms/op 1.03
computeDeltas 2100000 validators 0% inactive 20.418 ms/op 20.126 ms/op 1.01
computeDeltas 2100000 validators 10% inactive 19.177 ms/op 18.865 ms/op 1.02
computeDeltas 2100000 validators 20% inactive 18.043 ms/op 17.611 ms/op 1.02
computeDeltas 2100000 validators 50% inactive 13.667 ms/op 13.350 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei normalcase 1.6322 ms/op 1.6810 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei worstcase 2.3773 ms/op 2.4150 ms/op 0.98
altair processAttestation - setStatus - 1/6 committees join 103.55 us/op 105.77 us/op 0.98
altair processAttestation - setStatus - 1/3 committees join 202.87 us/op 204.62 us/op 0.99
altair processAttestation - setStatus - 1/2 committees join 290.20 us/op 282.20 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 370.46 us/op 372.68 us/op 0.99
altair processAttestation - setStatus - 4/5 committees join 520.67 us/op 505.57 us/op 1.03
altair processAttestation - setStatus - 100% committees join 621.61 us/op 603.96 us/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase 2.8283 ms/op 2.7862 ms/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase hashState 14.193 ms/op 14.440 ms/op 0.98
altair processBlock - 250000 vs - 7PWei worstcase 19.603 ms/op 19.048 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 39.887 ms/op 38.563 ms/op 1.03
phase0 processBlock - 250000 vs - 7PWei normalcase 1.2898 ms/op 1.2773 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei worstcase 16.879 ms/op 17.296 ms/op 0.98
altair processEth1Data - 250000 vs - 7PWei normalcase 317.72 us/op 302.65 us/op 1.05
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.2040 us/op 5.6640 us/op 0.57
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 19.950 us/op 23.603 us/op 0.85
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.9800 us/op 5.8910 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.8990 us/op 3.7330 us/op 1.04
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 100.76 us/op 91.532 us/op 1.10
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3930 ms/op 1.3595 ms/op 1.02
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8279 ms/op 1.7871 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8283 ms/op 1.7901 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6831 ms/op 3.6192 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0598 ms/op 2.0565 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0182 ms/op 3.9534 ms/op 1.02
Tree 40 250000 create 332.27 ms/op 311.31 ms/op 1.07
Tree 40 250000 get(125000) 108.72 ns/op 102.15 ns/op 1.06
Tree 40 250000 set(125000) 1.0758 us/op 1.0605 us/op 1.01
Tree 40 250000 toArray() 9.5360 ms/op 10.536 ms/op 0.91
Tree 40 250000 iterate all - toArray() + loop 9.9236 ms/op 9.6017 ms/op 1.03
Tree 40 250000 iterate all - get(i) 35.033 ms/op 38.063 ms/op 0.92
Array 250000 create 2.3128 ms/op 2.1040 ms/op 1.10
Array 250000 clone - spread 730.92 us/op 653.39 us/op 1.12
Array 250000 get(125000) 0.29000 ns/op 0.29300 ns/op 0.99
Array 250000 set(125000) 0.29300 ns/op 0.29600 ns/op 0.99
Array 250000 iterate all - loop 55.932 us/op 56.322 us/op 0.99
phase0 afterProcessEpoch - 250000 vs - 7PWei 46.547 ms/op 49.507 ms/op 0.94
Array.fill - length 1000000 2.2332 ms/op 2.2088 ms/op 1.01
Array push - length 1000000 8.0313 ms/op 8.6653 ms/op 0.93
Array.get 0.20169 ns/op 0.20841 ns/op 0.97
Uint8Array.get 0.25802 ns/op 0.26702 ns/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.329 ms/op 14.232 ms/op 0.94
altair processEpoch - mainnet_e81889 222.56 ms/op 249.05 ms/op 0.89
mainnet_e81889 - altair beforeProcessEpoch 13.784 ms/op 14.301 ms/op 0.96
mainnet_e81889 - altair processJustificationAndFinalization 4.5840 us/op 5.1470 us/op 0.89
mainnet_e81889 - altair processInactivityUpdates 3.6168 ms/op 3.4620 ms/op 1.04
mainnet_e81889 - altair processRewardsAndPenalties 17.214 ms/op 17.260 ms/op 1.00
mainnet_e81889 - altair processRegistryUpdates 513.00 ns/op 525.00 ns/op 0.98
mainnet_e81889 - altair processSlashings 126.00 ns/op 131.00 ns/op 0.96
mainnet_e81889 - altair processEth1DataReset 123.00 ns/op 125.00 ns/op 0.98
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7119 ms/op 1.3180 ms/op 1.30
mainnet_e81889 - altair processSlashingsReset 693.00 ns/op 692.00 ns/op 1.00
mainnet_e81889 - altair processRandaoMixesReset 987.00 ns/op 1.1290 us/op 0.87
mainnet_e81889 - altair processHistoricalRootsUpdate 124.00 ns/op 127.00 ns/op 0.98
mainnet_e81889 - altair processParticipationFlagUpdates 422.00 ns/op 428.00 ns/op 0.99
mainnet_e81889 - altair processSyncCommitteeUpdates 106.00 ns/op 104.00 ns/op 1.02
mainnet_e81889 - altair afterProcessEpoch 39.819 ms/op 41.786 ms/op 0.95
capella processEpoch - mainnet_e217614 722.08 ms/op 785.12 ms/op 0.92
mainnet_e217614 - capella beforeProcessEpoch 61.682 ms/op 72.919 ms/op 0.85
mainnet_e217614 - capella processJustificationAndFinalization 4.7170 us/op 6.2760 us/op 0.75
mainnet_e217614 - capella processInactivityUpdates 12.859 ms/op 14.289 ms/op 0.90
mainnet_e217614 - capella processRewardsAndPenalties 87.125 ms/op 97.778 ms/op 0.89
mainnet_e217614 - capella processRegistryUpdates 4.5160 us/op 4.6570 us/op 0.97
mainnet_e217614 - capella processSlashings 132.00 ns/op 134.00 ns/op 0.99
mainnet_e217614 - capella processEth1DataReset 129.00 ns/op 128.00 ns/op 1.01
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.1828 ms/op 14.200 ms/op 0.36
mainnet_e217614 - capella processSlashingsReset 704.00 ns/op 707.00 ns/op 1.00
mainnet_e217614 - capella processRandaoMixesReset 1.0160 us/op 2.2950 us/op 0.44
mainnet_e217614 - capella processHistoricalRootsUpdate 132.00 ns/op 132.00 ns/op 1.00
mainnet_e217614 - capella processParticipationFlagUpdates 432.00 ns/op 477.00 ns/op 0.91
mainnet_e217614 - capella afterProcessEpoch 107.96 ms/op 111.50 ms/op 0.97
phase0 processEpoch - mainnet_e58758 249.44 ms/op 308.10 ms/op 0.81
mainnet_e58758 - phase0 beforeProcessEpoch 49.358 ms/op 64.960 ms/op 0.76
mainnet_e58758 - phase0 processJustificationAndFinalization 4.8350 us/op 6.2830 us/op 0.77
mainnet_e58758 - phase0 processRewardsAndPenalties 15.312 ms/op 16.773 ms/op 0.91
mainnet_e58758 - phase0 processRegistryUpdates 2.2690 us/op 2.3360 us/op 0.97
mainnet_e58758 - phase0 processSlashings 142.00 ns/op 130.00 ns/op 1.09
mainnet_e58758 - phase0 processEth1DataReset 214.00 ns/op 130.00 ns/op 1.65
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 859.86 us/op 826.11 us/op 1.04
mainnet_e58758 - phase0 processSlashingsReset 847.00 ns/op 842.00 ns/op 1.01
mainnet_e58758 - phase0 processRandaoMixesReset 1.0460 us/op 1.0220 us/op 1.02
mainnet_e58758 - phase0 processHistoricalRootsUpdate 150.00 ns/op 133.00 ns/op 1.13
mainnet_e58758 - phase0 processParticipationRecordUpdates 982.00 ns/op 1.0310 us/op 0.95
mainnet_e58758 - phase0 afterProcessEpoch 34.112 ms/op 34.030 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0048 ms/op 1.0093 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5668 ms/op 1.5889 ms/op 0.99
altair processInactivityUpdates - 250000 normalcase 10.511 ms/op 10.624 ms/op 0.99
altair processInactivityUpdates - 250000 worstcase 10.947 ms/op 10.593 ms/op 1.03
phase0 processRegistryUpdates - 250000 normalcase 2.2170 us/op 2.2140 us/op 1.00
phase0 processRegistryUpdates - 250000 badcase_full_deposits 150.43 us/op 146.13 us/op 1.03
phase0 processRegistryUpdates - 250000 worstcase 0.5 62.107 ms/op 54.420 ms/op 1.14
altair processRewardsAndPenalties - 250000 normalcase 13.304 ms/op 14.725 ms/op 0.90
altair processRewardsAndPenalties - 250000 worstcase 12.859 ms/op 13.693 ms/op 0.94
phase0 getAttestationDeltas - 250000 normalcase 5.2980 ms/op 5.4034 ms/op 0.98
phase0 getAttestationDeltas - 250000 worstcase 19.145 ms/op 9.0637 ms/op 2.11
phase0 processSlashings - 250000 worstcase 61.634 us/op 58.846 us/op 1.05
altair processSyncCommitteeUpdates - 250000 9.9294 ms/op 10.015 ms/op 0.99
BeaconState.hashTreeRoot - No change 177.00 ns/op 162.00 ns/op 1.09
BeaconState.hashTreeRoot - 1 full validator 58.095 us/op 64.440 us/op 0.90
BeaconState.hashTreeRoot - 32 full validator 638.12 us/op 654.12 us/op 0.98
BeaconState.hashTreeRoot - 512 full validator 6.1602 ms/op 7.3289 ms/op 0.84
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 71.982 us/op 77.066 us/op 0.93
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.0458 ms/op 1.1187 ms/op 0.93
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 12.610 ms/op 15.037 ms/op 0.84
BeaconState.hashTreeRoot - 1 balances 57.452 us/op 61.971 us/op 0.93
BeaconState.hashTreeRoot - 32 balances 571.82 us/op 571.43 us/op 1.00
BeaconState.hashTreeRoot - 512 balances 4.8356 ms/op 5.8503 ms/op 0.83
BeaconState.hashTreeRoot - 250000 balances 107.15 ms/op 111.63 ms/op 0.96
aggregationBits - 2048 els - zipIndexesInBitList 19.959 us/op 19.118 us/op 1.04
regular array get 100000 times 22.593 us/op 22.681 us/op 1.00
wrappedArray get 100000 times 22.778 us/op 22.674 us/op 1.00
arrayWithProxy get 100000 times 19.254 ms/op 13.451 ms/op 1.43
ssz.Root.equals 21.386 ns/op 21.595 ns/op 0.99
byteArrayEquals 21.077 ns/op 21.374 ns/op 0.99
Buffer.compare 9.4150 ns/op 8.8820 ns/op 1.06
processSlot - 1 slots 7.9890 us/op 8.4640 us/op 0.94
processSlot - 32 slots 1.5711 ms/op 1.5070 ms/op 1.04
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.4421 ms/op 2.1653 ms/op 1.13
getCommitteeAssignments - req 1 vs - 250000 vc 1.6586 ms/op 1.6625 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.3661 ms/op 3.3845 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6151 ms/op 3.6263 ms/op 1.00
findModifiedValidators - 10000 modified validators 677.16 ms/op 720.52 ms/op 0.94
findModifiedValidators - 1000 modified validators 399.81 ms/op 415.84 ms/op 0.96
findModifiedValidators - 100 modified validators 314.75 ms/op 320.10 ms/op 0.98
findModifiedValidators - 10 modified validators 150.18 ms/op 268.94 ms/op 0.56
findModifiedValidators - 1 modified validators 191.41 ms/op 162.23 ms/op 1.18
findModifiedValidators - no difference 169.75 ms/op 161.00 ms/op 1.05
migrate state 1500000 validators, 3400 modified, 2000 new 2.6462 s/op 2.5775 s/op 1.03
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.7600 ns/op 3.7000 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 292.27 ns/op 263.38 ns/op 1.11
computeProposerIndex 100000 validators 1.3156 ms/op 1.4681 ms/op 0.90
getNextSyncCommitteeIndices 1000 validators 2.8315 ms/op 2.8193 ms/op 1.00
getNextSyncCommitteeIndices 10000 validators 24.915 ms/op 24.814 ms/op 1.00
getNextSyncCommitteeIndices 100000 validators 86.444 ms/op 82.106 ms/op 1.05
computeProposers - vc 250000 545.63 us/op 539.61 us/op 1.01
computeEpochShuffling - vc 250000 39.223 ms/op 38.674 ms/op 1.01
getNextSyncCommittee - vc 250000 9.3416 ms/op 9.2610 ms/op 1.01
nodejs block root to RootHex using toHex 98.714 ns/op 97.772 ns/op 1.01
nodejs block root to RootHex using toRootHex 59.502 ns/op 57.546 ns/op 1.03
nodejs fromHex(blob) 775.23 us/op 744.59 us/op 1.04
nodejs fromHexInto(blob) 666.51 us/op 660.71 us/op 1.01
nodejs block root to RootHex using the deprecated toHexString 486.72 ns/op 490.43 ns/op 0.99
nodejs byteArrayEquals 32 bytes (block root) 25.688 ns/op 25.585 ns/op 1.00
nodejs byteArrayEquals 48 bytes (pubkey) 36.910 ns/op 36.879 ns/op 1.00
nodejs byteArrayEquals 96 bytes (signature) 40.207 ns/op 38.673 ns/op 1.04
nodejs byteArrayEquals 1024 bytes 42.839 ns/op 42.649 ns/op 1.00
nodejs byteArrayEquals 131072 bytes (blob) 1.7635 us/op 1.7342 us/op 1.02
browser block root to RootHex using toHex 145.77 ns/op 144.98 ns/op 1.01
browser block root to RootHex using toRootHex 130.18 ns/op 129.56 ns/op 1.00
browser fromHex(blob) 1.5648 ms/op 1.5532 ms/op 1.01
browser fromHexInto(blob) 657.64 us/op 659.04 us/op 1.00
browser block root to RootHex using the deprecated toHexString 342.55 ns/op 340.90 ns/op 1.00
browser byteArrayEquals 32 bytes (block root) 27.868 ns/op 27.553 ns/op 1.01
browser byteArrayEquals 48 bytes (pubkey) 39.015 ns/op 38.808 ns/op 1.01
browser byteArrayEquals 96 bytes (signature) 73.067 ns/op 72.614 ns/op 1.01
browser byteArrayEquals 1024 bytes 745.95 ns/op 742.01 ns/op 1.01
browser byteArrayEquals 131072 bytes (blob) 95.882 us/op 93.379 us/op 1.03

by benchmarkbot/action

wemeetagain
wemeetagain previously approved these changes May 30, 2026
Comment thread packages/beacon-node/src/chain/validation/payloadAttestationMessage.ts Outdated
blockSlot: block.slot,
slot: data.slot,
});
}
Copy link
Copy Markdown
Member Author

@nflaig nflaig May 30, 2026

Choose a reason for hiding this comment

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

it's bit strange that this ignore is above the reject on L84 (anyways not relevant) but that's how the spec orders the checks, but pretty sure having "The message's block data.beacon_block_root passes validation." before slot check against that block is correct, @ensi321 is the spec ordering intended?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants