Skip to content

feat: add unknown payload envelope sync flow#9241

Merged
nflaig merged 79 commits intounstablefrom
cayman/recover-pruned-payload-inputs
Apr 24, 2026
Merged

feat: add unknown payload envelope sync flow#9241
nflaig merged 79 commits intounstablefrom
cayman/recover-pruned-payload-inputs

Conversation

@wemeetagain
Copy link
Copy Markdown
Member

Motivation

  • we need unknown block sync (backwards sync near the head) to now work with payloads after gloas

Description

  • Update BlockInputSync pipeline to incorporate payloads, all different flavors
    • getting a root, needing a corresponding payload
    • getting a block input, needing a corresponding parent payload
    • getting a payload, needing a parent block

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 implements a synchronization and recovery mechanism for execution payload envelopes and data columns, specifically targeting post-Gloas fork requirements. The BlockInputSync service has been expanded to manage a pendingPayloads cache and a state machine that handles dependencies between blocks and their parent payloads. Feedback was provided regarding a potential crash in the dependency check logic when a block body is missing, suggesting a more graceful handling by returning a fetch dependency instead of throwing an error.

Comment thread packages/beacon-node/src/sync/unknownBlock.ts
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

⚠️ 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: 8c35bb1 Previous: 180030f Ratio
Full columns - reconstruct all 20 blobs 2.0117 ms/op 542.87 us/op 3.71
Full benchmark results
Benchmark suite Current: 8c35bb1 Previous: 180030f Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.6467 ms/op 865.17 us/op 1.90
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 44.615 us/op 40.540 us/op 1.10
BLS verify - blst 752.35 us/op 720.38 us/op 1.04
BLS verifyMultipleSignatures 3 - blst 1.3945 ms/op 1.3474 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst 2.2045 ms/op 2.1555 ms/op 1.02
BLS verifyMultipleSignatures 32 - blst 6.8974 ms/op 6.8877 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst 13.496 ms/op 13.032 ms/op 1.04
BLS verifyMultipleSignatures 128 - blst 25.793 ms/op 25.321 ms/op 1.02
BLS deserializing 10000 signatures 652.09 ms/op 632.57 ms/op 1.03
BLS deserializing 100000 signatures 6.4150 s/op 6.2957 s/op 1.02
BLS verifyMultipleSignatures - same message - 3 - blst 799.56 us/op 815.41 us/op 0.98
BLS verifyMultipleSignatures - same message - 8 - blst 923.93 us/op 931.33 us/op 0.99
BLS verifyMultipleSignatures - same message - 32 - blst 1.5130 ms/op 1.5619 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.2887 ms/op 2.3956 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst 4.0120 ms/op 3.9939 ms/op 1.00
BLS aggregatePubkeys 32 - blst 17.815 us/op 17.522 us/op 1.02
BLS aggregatePubkeys 128 - blst 63.158 us/op 62.827 us/op 1.01
getSlashingsAndExits - default max 54.765 us/op 47.663 us/op 1.15
getSlashingsAndExits - 2k 474.32 us/op 322.22 us/op 1.47
proposeBlockBody type=full, size=empty 722.59 us/op 742.33 us/op 0.97
isKnown best case - 1 super set check 178.00 ns/op 191.00 ns/op 0.93
isKnown normal case - 2 super set checks 164.00 ns/op 175.00 ns/op 0.94
isKnown worse case - 16 super set checks 165.00 ns/op 174.00 ns/op 0.95
validate api signedAggregateAndProof - struct 1.5057 ms/op 1.5171 ms/op 0.99
validate gossip signedAggregateAndProof - struct 1.5126 ms/op 1.5170 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 109.16 us/op 103.25 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 64 96.487 us/op 91.753 us/op 1.05
batch validate gossip attestation - vc 640000 - chunk 128 90.661 us/op 85.506 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 256 87.912 us/op 83.776 us/op 1.05
bytes32 toHexString 304.00 ns/op 306.00 ns/op 0.99
bytes32 Buffer.toString(hex) 182.00 ns/op 171.00 ns/op 1.06
bytes32 Buffer.toString(hex) from Uint8Array 238.00 ns/op 244.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 177.00 ns/op 175.00 ns/op 1.01
Return object 10000 times 0.21230 ns/op 0.21090 ns/op 1.01
Throw Error 10000 times 3.2366 us/op 3.4040 us/op 0.95
toHex 98.903 ns/op 98.758 ns/op 1.00
Buffer.from 83.239 ns/op 88.932 ns/op 0.94
shared Buffer 54.430 ns/op 59.653 ns/op 0.91
fastMsgIdFn sha256 / 200 bytes 1.4460 us/op 1.4840 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 156.00 ns/op 146.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 200 bytes 215.00 ns/op 203.00 ns/op 1.06
fastMsgIdFn sha256 / 1000 bytes 4.6060 us/op 4.7230 us/op 0.98
fastMsgIdFn h32 xxhash / 1000 bytes 238.00 ns/op 240.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 1000 bytes 258.00 ns/op 251.00 ns/op 1.03
fastMsgIdFn sha256 / 10000 bytes 40.621 us/op 41.361 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 1.2230 us/op 1.2490 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 789.00 ns/op 813.00 ns/op 0.97
send data - 1000 256B messages 4.7123 ms/op 4.4661 ms/op 1.06
send data - 1000 512B messages 4.8716 ms/op 4.2491 ms/op 1.15
send data - 1000 1024B messages 5.0712 ms/op 4.5578 ms/op 1.11
send data - 1000 1200B messages 5.5634 ms/op 4.7819 ms/op 1.16
send data - 1000 2048B messages 5.8753 ms/op 5.1846 ms/op 1.13
send data - 1000 4096B messages 6.7381 ms/op 5.8501 ms/op 1.15
send data - 1000 16384B messages 18.285 ms/op 32.412 ms/op 0.56
send data - 1000 65536B messages 214.63 ms/op 192.72 ms/op 1.11
enrSubnets - fastDeserialize 64 bits 759.00 ns/op 739.00 ns/op 1.03
enrSubnets - ssz BitVector 64 bits 276.00 ns/op 264.00 ns/op 1.05
enrSubnets - fastDeserialize 4 bits 103.00 ns/op 103.00 ns/op 1.00
enrSubnets - ssz BitVector 4 bits 271.00 ns/op 256.00 ns/op 1.06
prioritizePeers score -10:0 att 32-0.1 sync 2-0 212.30 us/op 204.25 us/op 1.04
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 236.59 us/op 231.75 us/op 1.02
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 343.44 us/op 343.21 us/op 1.00
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 612.62 us/op 601.78 us/op 1.02
prioritizePeers score 0:0 att 64-1 sync 4-1 712.12 us/op 714.91 us/op 1.00
array of 16000 items push then shift 1.2482 us/op 1.2924 us/op 0.97
LinkedList of 16000 items push then shift 8.3780 ns/op 6.9280 ns/op 1.21
array of 16000 items push then pop 75.636 ns/op 67.741 ns/op 1.12
LinkedList of 16000 items push then pop 6.3980 ns/op 6.0010 ns/op 1.07
array of 24000 items push then shift 1.8297 us/op 1.8957 us/op 0.97
LinkedList of 24000 items push then shift 7.7170 ns/op 6.4280 ns/op 1.20
array of 24000 items push then pop 103.44 ns/op 94.415 ns/op 1.10
LinkedList of 24000 items push then pop 6.2930 ns/op 6.0020 ns/op 1.05
intersect bitArray bitLen 8 4.7820 ns/op 4.7040 ns/op 1.02
intersect array and set length 8 30.347 ns/op 29.603 ns/op 1.03
intersect bitArray bitLen 128 24.382 ns/op 23.782 ns/op 1.03
intersect array and set length 128 520.81 ns/op 499.21 ns/op 1.04
bitArray.getTrueBitIndexes() bitLen 128 1.0610 us/op 1.0620 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 248 1.9200 us/op 1.7370 us/op 1.11
bitArray.getTrueBitIndexes() bitLen 512 4.0420 us/op 3.5290 us/op 1.15
Full columns - reconstruct all 6 blobs 201.91 us/op 156.84 us/op 1.29
Full columns - reconstruct half of the blobs out of 6 107.02 us/op 96.431 us/op 1.11
Full columns - reconstruct single blob out of 6 43.029 us/op 31.868 us/op 1.35
Half columns - reconstruct all 6 blobs 386.94 ms/op 391.42 ms/op 0.99
Half columns - reconstruct half of the blobs out of 6 194.70 ms/op 196.75 ms/op 0.99
Half columns - reconstruct single blob out of 6 70.541 ms/op 68.482 ms/op 1.03
Full columns - reconstruct all 10 blobs 313.22 us/op 201.72 us/op 1.55
Full columns - reconstruct half of the blobs out of 10 149.67 us/op 155.45 us/op 0.96
Full columns - reconstruct single blob out of 10 33.009 us/op 31.426 us/op 1.05
Half columns - reconstruct all 10 blobs 630.39 ms/op 643.93 ms/op 0.98
Half columns - reconstruct half of the blobs out of 10 320.63 ms/op 319.19 ms/op 1.00
Half columns - reconstruct single blob out of 10 67.782 ms/op 67.275 ms/op 1.01
Full columns - reconstruct all 20 blobs 2.0117 ms/op 542.87 us/op 3.71
Full columns - reconstruct half of the blobs out of 20 407.19 us/op 161.84 us/op 2.52
Full columns - reconstruct single blob out of 20 49.295 us/op 32.782 us/op 1.50
Half columns - reconstruct all 20 blobs 1.2498 s/op 1.2705 s/op 0.98
Half columns - reconstruct half of the blobs out of 20 628.24 ms/op 648.77 ms/op 0.97
Half columns - reconstruct single blob out of 20 67.921 ms/op 66.874 ms/op 1.02
Set add up to 64 items then delete first 2.1401 us/op 2.1170 us/op 1.01
OrderedSet add up to 64 items then delete first 3.3457 us/op 3.3263 us/op 1.01
Set add up to 64 items then delete last 2.2726 us/op 2.1527 us/op 1.06
OrderedSet add up to 64 items then delete last 3.2680 us/op 3.2654 us/op 1.00
Set add up to 64 items then delete middle 2.0757 us/op 2.1328 us/op 0.97
OrderedSet add up to 64 items then delete middle 4.7396 us/op 4.7324 us/op 1.00
Set add up to 128 items then delete first 4.1787 us/op 4.2855 us/op 0.98
OrderedSet add up to 128 items then delete first 6.4217 us/op 6.5532 us/op 0.98
Set add up to 128 items then delete last 3.8034 us/op 3.9158 us/op 0.97
OrderedSet add up to 128 items then delete last 5.6956 us/op 5.7665 us/op 0.99
Set add up to 128 items then delete middle 3.8803 us/op 3.9143 us/op 0.99
OrderedSet add up to 128 items then delete middle 11.704 us/op 11.465 us/op 1.02
Set add up to 256 items then delete first 7.8509 us/op 7.9283 us/op 0.99
OrderedSet add up to 256 items then delete first 12.182 us/op 12.140 us/op 1.00
Set add up to 256 items then delete last 7.6308 us/op 7.6871 us/op 0.99
OrderedSet add up to 256 items then delete last 11.364 us/op 11.454 us/op 0.99
Set add up to 256 items then delete middle 7.5609 us/op 7.6866 us/op 0.98
OrderedSet add up to 256 items then delete middle 34.904 us/op 34.268 us/op 1.02
pass gossip attestations to forkchoice per slot 2.5644 ms/op 2.5045 ms/op 1.02
forkChoice updateHead vc 100000 bc 64 eq 0 384.34 us/op 466.65 us/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 0 2.3046 ms/op 2.7421 ms/op 0.84
forkChoice updateHead vc 1000000 bc 64 eq 0 3.8975 ms/op 4.6417 ms/op 0.84
forkChoice updateHead vc 600000 bc 320 eq 0 2.3821 ms/op 2.7817 ms/op 0.86
forkChoice updateHead vc 600000 bc 1200 eq 0 2.3765 ms/op 2.7845 ms/op 0.85
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9254 ms/op 3.1339 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 1000 2.9003 ms/op 3.2128 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 10000 3.0698 ms/op 3.3774 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 300000 6.8375 ms/op 7.8097 ms/op 0.88
computeDeltas 1400000 validators 0% inactive 12.481 ms/op 12.984 ms/op 0.96
computeDeltas 1400000 validators 10% inactive 11.754 ms/op 12.311 ms/op 0.95
computeDeltas 1400000 validators 20% inactive 10.575 ms/op 11.550 ms/op 0.92
computeDeltas 1400000 validators 50% inactive 8.1932 ms/op 8.8327 ms/op 0.93
computeDeltas 2100000 validators 0% inactive 18.643 ms/op 20.272 ms/op 0.92
computeDeltas 2100000 validators 10% inactive 17.293 ms/op 18.582 ms/op 0.93
computeDeltas 2100000 validators 20% inactive 15.816 ms/op 17.581 ms/op 0.90
computeDeltas 2100000 validators 50% inactive 9.2545 ms/op 13.290 ms/op 0.70
altair processAttestation - 250000 vs - 7PWei normalcase 1.9354 ms/op 1.8007 ms/op 1.07
altair processAttestation - 250000 vs - 7PWei worstcase 2.7378 ms/op 2.4869 ms/op 1.10
altair processAttestation - setStatus - 1/6 committees join 106.61 us/op 106.82 us/op 1.00
altair processAttestation - setStatus - 1/3 committees join 216.19 us/op 208.10 us/op 1.04
altair processAttestation - setStatus - 1/2 committees join 295.27 us/op 291.25 us/op 1.01
altair processAttestation - setStatus - 2/3 committees join 391.84 us/op 376.71 us/op 1.04
altair processAttestation - setStatus - 4/5 committees join 531.15 us/op 539.34 us/op 0.98
altair processAttestation - setStatus - 100% committees join 630.00 us/op 600.13 us/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase 4.5386 ms/op 2.9600 ms/op 1.53
altair processBlock - 250000 vs - 7PWei normalcase hashState 13.665 ms/op 14.602 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase 20.954 ms/op 19.497 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase hashState 43.013 ms/op 40.535 ms/op 1.06
phase0 processBlock - 250000 vs - 7PWei normalcase 1.2472 ms/op 1.2804 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei worstcase 16.413 ms/op 17.094 ms/op 0.96
altair processEth1Data - 250000 vs - 7PWei normalcase 283.40 us/op 309.69 us/op 0.92
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.3580 us/op 8.3190 us/op 0.40
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 19.811 us/op 23.495 us/op 0.84
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.5960 us/op 6.6960 us/op 0.84
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.5390 us/op 5.4490 us/op 0.65
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 93.280 us/op 95.262 us/op 0.98
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3549 ms/op 1.3730 ms/op 0.99
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7881 ms/op 1.8215 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.7992 ms/op 1.8163 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6963 ms/op 3.9223 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0347 ms/op 2.0528 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0207 ms/op 4.2764 ms/op 0.94
Tree 40 250000 create 307.92 ms/op 310.40 ms/op 0.99
Tree 40 250000 get(125000) 88.237 ns/op 105.77 ns/op 0.83
Tree 40 250000 set(125000) 958.13 ns/op 1.0771 us/op 0.89
Tree 40 250000 toArray() 12.773 ms/op 9.1985 ms/op 1.39
Tree 40 250000 iterate all - toArray() + loop 12.677 ms/op 9.6214 ms/op 1.32
Tree 40 250000 iterate all - get(i) 35.039 ms/op 33.917 ms/op 1.03
Array 250000 create 2.1378 ms/op 2.0241 ms/op 1.06
Array 250000 clone - spread 656.81 us/op 644.95 us/op 1.02
Array 250000 get(125000) 0.28500 ns/op 0.28600 ns/op 1.00
Array 250000 set(125000) 0.28800 ns/op 0.29400 ns/op 0.98
Array 250000 iterate all - loop 55.926 us/op 55.424 us/op 1.01
phase0 afterProcessEpoch - 250000 vs - 7PWei 38.098 ms/op 38.503 ms/op 0.99
Array.fill - length 1000000 2.1018 ms/op 2.2292 ms/op 0.94
Array push - length 1000000 7.5071 ms/op 7.5981 ms/op 0.99
Array.get 0.19898 ns/op 0.20094 ns/op 0.99
Uint8Array.get 0.23398 ns/op 0.24594 ns/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 19.343 ms/op 12.359 ms/op 1.57
altair processEpoch - mainnet_e81889 265.02 ms/op 236.75 ms/op 1.12
mainnet_e81889 - altair beforeProcessEpoch 37.628 ms/op 15.167 ms/op 2.48
mainnet_e81889 - altair processJustificationAndFinalization 6.1260 us/op 4.6220 us/op 1.33
mainnet_e81889 - altair processInactivityUpdates 4.3081 ms/op 4.0855 ms/op 1.05
mainnet_e81889 - altair processRewardsAndPenalties 20.715 ms/op 18.124 ms/op 1.14
mainnet_e81889 - altair processRegistryUpdates 539.00 ns/op 517.00 ns/op 1.04
mainnet_e81889 - altair processSlashings 126.00 ns/op 132.00 ns/op 0.95
mainnet_e81889 - altair processEth1DataReset 120.00 ns/op 133.00 ns/op 0.90
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.1226 ms/op 1.6724 ms/op 1.27
mainnet_e81889 - altair processSlashingsReset 677.00 ns/op 682.00 ns/op 0.99
mainnet_e81889 - altair processRandaoMixesReset 1.0910 us/op 1.0170 us/op 1.07
mainnet_e81889 - altair processHistoricalRootsUpdate 124.00 ns/op 129.00 ns/op 0.96
mainnet_e81889 - altair processParticipationFlagUpdates 415.00 ns/op 415.00 ns/op 1.00
mainnet_e81889 - altair processSyncCommitteeUpdates 95.000 ns/op 106.00 ns/op 0.90
mainnet_e81889 - altair afterProcessEpoch 41.431 ms/op 39.553 ms/op 1.05
capella processEpoch - mainnet_e217614 825.01 ms/op 766.98 ms/op 1.08
mainnet_e217614 - capella beforeProcessEpoch 65.646 ms/op 59.957 ms/op 1.09
mainnet_e217614 - capella processJustificationAndFinalization 6.0280 us/op 4.8370 us/op 1.25
mainnet_e217614 - capella processInactivityUpdates 18.096 ms/op 13.272 ms/op 1.36
mainnet_e217614 - capella processRewardsAndPenalties 90.254 ms/op 90.727 ms/op 0.99
mainnet_e217614 - capella processRegistryUpdates 4.4380 us/op 4.4130 us/op 1.01
mainnet_e217614 - capella processSlashings 125.00 ns/op 135.00 ns/op 0.93
mainnet_e217614 - capella processEth1DataReset 125.00 ns/op 126.00 ns/op 0.99
mainnet_e217614 - capella processEffectiveBalanceUpdates 14.505 ms/op 5.6688 ms/op 2.56
mainnet_e217614 - capella processSlashingsReset 671.00 ns/op 663.00 ns/op 1.01
mainnet_e217614 - capella processRandaoMixesReset 1.2460 us/op 1.0240 us/op 1.22
mainnet_e217614 - capella processHistoricalRootsUpdate 129.00 ns/op 128.00 ns/op 1.01
mainnet_e217614 - capella processParticipationFlagUpdates 416.00 ns/op 419.00 ns/op 0.99
mainnet_e217614 - capella afterProcessEpoch 106.93 ms/op 106.89 ms/op 1.00
phase0 processEpoch - mainnet_e58758 298.73 ms/op 254.93 ms/op 1.17
mainnet_e58758 - phase0 beforeProcessEpoch 60.217 ms/op 47.925 ms/op 1.26
mainnet_e58758 - phase0 processJustificationAndFinalization 5.7540 us/op 5.1260 us/op 1.12
mainnet_e58758 - phase0 processRewardsAndPenalties 17.315 ms/op 16.139 ms/op 1.07
mainnet_e58758 - phase0 processRegistryUpdates 2.1810 us/op 2.2280 us/op 0.98
mainnet_e58758 - phase0 processSlashings 125.00 ns/op 135.00 ns/op 0.93
mainnet_e58758 - phase0 processEth1DataReset 122.00 ns/op 128.00 ns/op 0.95
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 933.60 us/op 881.07 us/op 1.06
mainnet_e58758 - phase0 processSlashingsReset 854.00 ns/op 802.00 ns/op 1.06
mainnet_e58758 - phase0 processRandaoMixesReset 1.1040 us/op 1.1380 us/op 0.97
mainnet_e58758 - phase0 processHistoricalRootsUpdate 124.00 ns/op 135.00 ns/op 0.92
mainnet_e58758 - phase0 processParticipationRecordUpdates 998.00 ns/op 1.0150 us/op 0.98
mainnet_e58758 - phase0 afterProcessEpoch 31.844 ms/op 33.061 ms/op 0.96
phase0 processEffectiveBalanceUpdates - 250000 normalcase 984.12 us/op 1.0362 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4842 ms/op 1.5594 ms/op 0.95
altair processInactivityUpdates - 250000 normalcase 11.880 ms/op 10.836 ms/op 1.10
altair processInactivityUpdates - 250000 worstcase 12.041 ms/op 10.816 ms/op 1.11
phase0 processRegistryUpdates - 250000 normalcase 2.2370 us/op 2.5220 us/op 0.89
phase0 processRegistryUpdates - 250000 badcase_full_deposits 140.19 us/op 156.28 us/op 0.90
phase0 processRegistryUpdates - 250000 worstcase 0.5 58.439 ms/op 56.327 ms/op 1.04
altair processRewardsAndPenalties - 250000 normalcase 15.661 ms/op 14.476 ms/op 1.08
altair processRewardsAndPenalties - 250000 worstcase 15.502 ms/op 13.844 ms/op 1.12
phase0 getAttestationDeltas - 250000 normalcase 5.1440 ms/op 5.2871 ms/op 0.97
phase0 getAttestationDeltas - 250000 worstcase 5.2168 ms/op 5.2899 ms/op 0.99
phase0 processSlashings - 250000 worstcase 57.556 us/op 63.076 us/op 0.91
altair processSyncCommitteeUpdates - 250000 9.6758 ms/op 9.9064 ms/op 0.98
BeaconState.hashTreeRoot - No change 181.00 ns/op 193.00 ns/op 0.94
BeaconState.hashTreeRoot - 1 full validator 63.000 us/op 76.077 us/op 0.83
BeaconState.hashTreeRoot - 32 full validator 803.19 us/op 713.76 us/op 1.13
BeaconState.hashTreeRoot - 512 full validator 7.2392 ms/op 8.0861 ms/op 0.90
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 87.012 us/op 85.147 us/op 1.02
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3047 ms/op 1.5673 ms/op 0.83
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.963 ms/op 17.607 ms/op 0.79
BeaconState.hashTreeRoot - 1 balances 65.065 us/op 79.445 us/op 0.82
BeaconState.hashTreeRoot - 32 balances 688.84 us/op 703.05 us/op 0.98
BeaconState.hashTreeRoot - 512 balances 5.2493 ms/op 6.4009 ms/op 0.82
BeaconState.hashTreeRoot - 250000 balances 121.11 ms/op 127.29 ms/op 0.95
aggregationBits - 2048 els - zipIndexesInBitList 18.795 us/op 159.65 us/op 0.12
regular array get 100000 times 22.271 us/op 22.849 us/op 0.97
wrappedArray get 100000 times 22.264 us/op 22.298 us/op 1.00
arrayWithProxy get 100000 times 9.3608 ms/op 10.028 ms/op 0.93
ssz.Root.equals 20.719 ns/op 21.030 ns/op 0.99
byteArrayEquals 20.607 ns/op 20.863 ns/op 0.99
Buffer.compare 8.5500 ns/op 9.0720 ns/op 0.94
processSlot - 1 slots 8.2880 us/op 9.4260 us/op 0.88
processSlot - 32 slots 1.8028 ms/op 1.6638 ms/op 1.08
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 6.2739 ms/op 2.5770 ms/op 2.43
getCommitteeAssignments - req 1 vs - 250000 vc 1.6372 ms/op 1.6569 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 3.3115 ms/op 3.4088 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 3.5530 ms/op 3.6693 ms/op 0.97
findModifiedValidators - 10000 modified validators 701.96 ms/op 774.77 ms/op 0.91
findModifiedValidators - 1000 modified validators 402.92 ms/op 470.67 ms/op 0.86
findModifiedValidators - 100 modified validators 270.48 ms/op 283.95 ms/op 0.95
findModifiedValidators - 10 modified validators 201.33 ms/op 219.05 ms/op 0.92
findModifiedValidators - 1 modified validators 166.26 ms/op 211.38 ms/op 0.79
findModifiedValidators - no difference 153.03 ms/op 155.36 ms/op 0.98
migrate state 1500000 validators, 3400 modified, 2000 new 2.9392 s/op 3.5633 s/op 0.82
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.5700 ns/op 3.6700 ns/op 0.97
state getBlockRootAtSlot - 250000 vs - 7PWei 348.14 ns/op 356.79 ns/op 0.98
computeProposerIndex 100000 validators 1.3358 ms/op 1.3604 ms/op 0.98
getNextSyncCommitteeIndices 1000 validators 2.8805 ms/op 2.8841 ms/op 1.00
getNextSyncCommitteeIndices 10000 validators 25.148 ms/op 25.626 ms/op 0.98
getNextSyncCommitteeIndices 100000 validators 88.875 ms/op 90.132 ms/op 0.99
computeProposers - vc 250000 544.17 us/op 548.18 us/op 0.99
computeEpochShuffling - vc 250000 38.634 ms/op 38.600 ms/op 1.00
getNextSyncCommittee - vc 250000 9.4379 ms/op 9.4042 ms/op 1.00
nodejs block root to RootHex using toHex 90.304 ns/op 97.384 ns/op 0.93
nodejs block root to RootHex using toRootHex 55.609 ns/op 58.916 ns/op 0.94
nodejs fromHex(blob) 738.09 us/op 730.54 us/op 1.01
nodejs fromHexInto(blob) 633.50 us/op 653.29 us/op 0.97
nodejs block root to RootHex using the deprecated toHexString 508.95 ns/op 489.97 ns/op 1.04
nodejs byteArrayEquals 32 bytes (block root) 26.437 ns/op 25.321 ns/op 1.04
nodejs byteArrayEquals 48 bytes (pubkey) 37.738 ns/op 36.762 ns/op 1.03
nodejs byteArrayEquals 96 bytes (signature) 34.095 ns/op 40.589 ns/op 0.84
nodejs byteArrayEquals 1024 bytes 40.194 ns/op 42.622 ns/op 0.94
nodejs byteArrayEquals 131072 bytes (blob) 1.7666 us/op 1.7192 us/op 1.03
browser block root to RootHex using toHex 144.28 ns/op 144.01 ns/op 1.00
browser block root to RootHex using toRootHex 130.80 ns/op 128.61 ns/op 1.02
browser fromHex(blob) 1.5056 ms/op 1.5820 ms/op 0.95
browser fromHexInto(blob) 613.79 us/op 656.58 us/op 0.93
browser block root to RootHex using the deprecated toHexString 334.55 ns/op 496.43 ns/op 0.67
browser byteArrayEquals 32 bytes (block root) 27.313 ns/op 27.732 ns/op 0.98
browser byteArrayEquals 48 bytes (pubkey) 38.754 ns/op 39.168 ns/op 0.99
browser byteArrayEquals 96 bytes (signature) 72.649 ns/op 73.375 ns/op 0.99
browser byteArrayEquals 1024 bytes 740.91 ns/op 746.91 ns/op 0.99
browser byteArrayEquals 131072 bytes (blob) 94.112 us/op 94.309 us/op 1.00

by benchmarkbot/action

Copy link
Copy Markdown
Contributor

@twoeths twoeths left a comment

Choose a reason for hiding this comment

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

need to make sure we pass unknownBlockSync.test.ts with this PR
may need to enhance test cases over there

@wemeetagain wemeetagain added the spec-gloas Issues targeting the Glamsterdam spec version label Apr 21, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.58%. Comparing base (180030f) to head (be00edb).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #9241      +/-   ##
============================================
+ Coverage     52.55%   52.58%   +0.02%     
============================================
  Files           848      848              
  Lines         61193    61136      -57     
  Branches       4508     4505       -3     
============================================
- Hits          32163    32147      -16     
+ Misses        28965    28925      -40     
+ Partials         65       64       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wemeetagain wemeetagain marked this pull request as ready for review April 21, 2026 15:58
@wemeetagain wemeetagain requested a review from a team as a code owner April 21, 2026 15:58
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06e9a8a69c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

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

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/beacon-node/src/sync/unknownBlock.ts Outdated
wemeetagain and others added 12 commits April 21, 2026 14:20
Move slot from ExecutionPayloadEnvelope to ExecutionPayload as
slotNumber (uint64) and add slotNumber to PayloadAttributes per
consensus-specs#4840. Updates all verification, gossip validation,
signing, serialization, and SSZ byte extraction accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread packages/beacon-node/src/network/processor/gossipHandlers.ts Outdated
Comment thread packages/beacon-node/src/chain/validation/executionPayloadEnvelope.ts Outdated
Base automatically changed from nc/defer-payload-processing to unstable April 23, 2026 16:17
wemeetagain and others added 4 commits April 24, 2026 10:45
# Conflicts:
#	packages/beacon-node/src/chain/produceBlock/produceBlockBody.ts
#	packages/beacon-node/src/chain/seenCache/seenPayloadEnvelopeInput.ts
#	packages/fork-choice/src/protoArray/protoArray.ts
#	packages/state-transition/src/stateView/beaconStateView.ts
#	packages/state-transition/src/stateView/interface.ts
Comment thread packages/fork-choice/src/protoArray/protoArray.ts Outdated
nflaig
nflaig previously approved these changes Apr 24, 2026
Copy link
Copy Markdown
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

LGTM

}

if (isPendingPayloadEnvelope(payload)) {
this.reconcilePayloadEnvelope(payload).catch((e) => {
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.

Should we define a new status "reconciling" to prevent the same payload being reconciled concurrently?


this.logger.debug("Ignoring unknown payload root after failed download", logCtx, res.err);
if (!isPendingPayloadEnvelope(payload)) {
payload.status = PendingPayloadInputStatus.pending;
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.

Hmmm, if we try to download this payload, failed, set this to pending then we will try to download it again.
So we will keep trying to download it. I think we should do something similar like removeAndDownScoreAllDescendants in downloadBlock

} else {
this.metrics?.blockInputSync.downloadedBlocksError.inc();
this.logger.debug("Ignoring unknown block root after many failed downloads", logCtx, res.err);
this.removeAndDownScoreAllDescendants(block);
}

@ensi321 ensi321 enabled auto-merge (squash) April 24, 2026 21:43
@nflaig nflaig disabled auto-merge April 24, 2026 21:45
Copy link
Copy Markdown
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

LGTM

@nflaig nflaig enabled auto-merge (squash) April 24, 2026 21:47
@nflaig nflaig merged commit 1540a78 into unstable Apr 24, 2026
17 of 19 checks passed
@nflaig nflaig deleted the cayman/recover-pruned-payload-inputs branch April 24, 2026 21:54
nflaig added a commit that referenced this pull request Apr 25, 2026
We merged #9241 without
actually checking if e2e test passed.

---------

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spec-gloas Issues targeting the Glamsterdam spec version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants