Skip to content

fix: process fulu data columns without waiting for block - #9166

Closed
nflaig wants to merge 2 commits into
unstablefrom
nflaig/fix-fulu-data-column-block-wait
Closed

fix: process fulu data columns without waiting for block#9166
nflaig wants to merge 2 commits into
unstablefrom
nflaig/fix-fulu-data-column-block-wait

Conversation

@nflaig

@nflaig nflaig commented Apr 3, 2026

Copy link
Copy Markdown
Member

@nflaig
nflaig requested a review from a team as a code owner April 3, 2026 09:47

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces the getBeaconBlockRootFromFuluDataColumnSidecarSerialized utility to extract beacon block roots from serialized Fulu data column sidecars. It also updates the network processor to handle these sidecars by queuing them for validation without requiring the full block immediately, and includes corresponding unit tests. I have no feedback to provide as the existing review comment was purely explanatory.

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

Copy link
Copy Markdown

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: ea28fb780c

鈩癸笍 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 on lines +560 to +564
const blockHeader = ssz.phase0.BeaconBlockHeader.deserialize(
data.subarray(
SLOT_BYTES_POSITION_IN_SIGNED_DATA_COLUMN_SIDECAR_PRE_GLOAS,
SLOT_BYTES_POSITION_IN_SIGNED_DATA_COLUMN_SIDECAR_PRE_GLOAS + BEACON_BLOCK_HEADER_SIZE
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Guard Fulu header parsing against malformed gossip bytes

getBeaconBlockRootFromFuluDataColumnSidecarSerialized() now calls ssz.phase0.BeaconBlockHeader.deserialize(...) directly during the network pre-processing path, but this helper is expected to be non-throwing (all other extractors return null for invalid input). A malformed sidecar with valid length but invalid header encoding can make this deserialize call throw, and onPendingGossipsubMessage does not catch extractor errors, so untrusted gossip can abort processing instead of being handled as invalid gossip. Please wrap this deserialize in a try/catch and return null on parse failure.

Useful? React with 馃憤聽/ 馃憥.

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.

I guess this is valid, also calling hashTreeRoot() here might be a concern in general since we wanna avoid expensive work

@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Performance Report

鉁旓笍 no performance regression detected

Full benchmark results
Benchmark suite Current: 2551235 Previous: bc0be71 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0245 ms/op 859.10 us/op 1.19
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 41.589 us/op 39.117 us/op 1.06
BLS verify - blst 748.12 us/op 704.84 us/op 1.06
BLS verifyMultipleSignatures 3 - blst 1.3484 ms/op 1.3615 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst 2.1391 ms/op 2.1370 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst 6.7968 ms/op 6.7501 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst 13.100 ms/op 13.062 ms/op 1.00
BLS verifyMultipleSignatures 128 - blst 25.598 ms/op 25.230 ms/op 1.01
BLS deserializing 10000 signatures 647.39 ms/op 646.81 ms/op 1.00
BLS deserializing 100000 signatures 6.4284 s/op 6.2954 s/op 1.02
BLS verifyMultipleSignatures - same message - 3 - blst 808.85 us/op 731.02 us/op 1.11
BLS verifyMultipleSignatures - same message - 8 - blst 941.00 us/op 896.51 us/op 1.05
BLS verifyMultipleSignatures - same message - 32 - blst 1.5435 ms/op 1.4221 ms/op 1.09
BLS verifyMultipleSignatures - same message - 64 - blst 2.4098 ms/op 2.3926 ms/op 1.01
BLS verifyMultipleSignatures - same message - 128 - blst 4.0800 ms/op 4.0022 ms/op 1.02
BLS aggregatePubkeys 32 - blst 17.876 us/op 17.012 us/op 1.05
BLS aggregatePubkeys 128 - blst 63.483 us/op 61.250 us/op 1.04
getSlashingsAndExits - default max 47.835 us/op 45.885 us/op 1.04
getSlashingsAndExits - 2k 322.94 us/op 349.43 us/op 0.92
proposeBlockBody type=full, size=empty 633.81 us/op 613.30 us/op 1.03
isKnown best case - 1 super set check 157.00 ns/op 178.00 ns/op 0.88
isKnown normal case - 2 super set checks 157.00 ns/op 172.00 ns/op 0.91
isKnown worse case - 16 super set checks 159.00 ns/op 173.00 ns/op 0.92
validate api signedAggregateAndProof - struct 1.4158 ms/op 1.4548 ms/op 0.97
validate gossip signedAggregateAndProof - struct 1.3990 ms/op 1.4690 ms/op 0.95
batch validate gossip attestation - vc 640000 - chunk 32 100.15 us/op 110.61 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 64 88.044 us/op 96.693 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 128 82.142 us/op 90.318 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 256 79.523 us/op 87.155 us/op 0.91
bytes32 toHexString 271.00 ns/op 288.00 ns/op 0.94
bytes32 Buffer.toString(hex) 166.00 ns/op 179.00 ns/op 0.93
bytes32 Buffer.toString(hex) from Uint8Array 246.00 ns/op 252.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 170.00 ns/op 178.00 ns/op 0.96
Return object 10000 times 0.20360 ns/op 0.21000 ns/op 0.97
Throw Error 10000 times 3.1570 us/op 3.2771 us/op 0.96
toHex 93.167 ns/op 96.716 ns/op 0.96
Buffer.from 85.271 ns/op 86.997 ns/op 0.98
shared Buffer 59.012 ns/op 59.058 ns/op 1.00
fastMsgIdFn sha256 / 200 bytes 1.4180 us/op 1.4560 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 142.00 ns/op 154.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 200 bytes 188.00 ns/op 197.00 ns/op 0.95
fastMsgIdFn sha256 / 1000 bytes 4.4460 us/op 4.6760 us/op 0.95
fastMsgIdFn h32 xxhash / 1000 bytes 225.00 ns/op 245.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 1000 bytes 229.00 ns/op 254.00 ns/op 0.90
fastMsgIdFn sha256 / 10000 bytes 39.168 us/op 40.999 us/op 0.96
fastMsgIdFn h32 xxhash / 10000 bytes 1.1920 us/op 1.2790 us/op 0.93
fastMsgIdFn h64 xxhash / 10000 bytes 760.00 ns/op 836.00 ns/op 0.91
send data - 1000 256B messages 4.0742 ms/op 5.1352 ms/op 0.79
send data - 1000 512B messages 4.1190 ms/op 6.3696 ms/op 0.65
send data - 1000 1024B messages 4.2912 ms/op 4.9542 ms/op 0.87
send data - 1000 1200B messages 4.5759 ms/op 6.0796 ms/op 0.75
send data - 1000 2048B messages 4.7756 ms/op 5.7172 ms/op 0.84
send data - 1000 4096B messages 5.5504 ms/op 7.0498 ms/op 0.79
send data - 1000 16384B messages 30.780 ms/op 66.361 ms/op 0.46
send data - 1000 65536B messages 126.18 ms/op 167.57 ms/op 0.75
enrSubnets - fastDeserialize 64 bits 695.00 ns/op 768.00 ns/op 0.90
enrSubnets - ssz BitVector 64 bits 244.00 ns/op 277.00 ns/op 0.88
enrSubnets - fastDeserialize 4 bits 96.000 ns/op 105.00 ns/op 0.91
enrSubnets - ssz BitVector 4 bits 255.00 ns/op 284.00 ns/op 0.90
prioritizePeers score -10:0 att 32-0.1 sync 2-0 194.00 us/op 200.94 us/op 0.97
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 220.00 us/op 227.85 us/op 0.97
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 318.91 us/op 333.75 us/op 0.96
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 569.12 us/op 595.68 us/op 0.96
prioritizePeers score 0:0 att 64-1 sync 4-1 665.24 us/op 687.17 us/op 0.97
array of 16000 items push then shift 1.1899 us/op 1.2409 us/op 0.96
LinkedList of 16000 items push then shift 7.0870 ns/op 7.3350 ns/op 0.97
array of 16000 items push then pop 63.510 ns/op 65.871 ns/op 0.96
LinkedList of 16000 items push then pop 5.6440 ns/op 5.8090 ns/op 0.97
array of 24000 items push then shift 1.7507 us/op 1.8196 us/op 0.96
LinkedList of 24000 items push then shift 6.6600 ns/op 7.4040 ns/op 0.90
array of 24000 items push then pop 89.118 ns/op 92.877 ns/op 0.96
LinkedList of 24000 items push then pop 5.6440 ns/op 5.8430 ns/op 0.97
intersect bitArray bitLen 8 4.5060 ns/op 4.6570 ns/op 0.97
intersect array and set length 8 27.417 ns/op 28.473 ns/op 0.96
intersect bitArray bitLen 128 22.934 ns/op 23.454 ns/op 0.98
intersect array and set length 128 464.11 ns/op 480.23 ns/op 0.97
bitArray.getTrueBitIndexes() bitLen 128 917.00 ns/op 966.00 ns/op 0.95
bitArray.getTrueBitIndexes() bitLen 248 1.6370 us/op 1.7030 us/op 0.96
bitArray.getTrueBitIndexes() bitLen 512 3.3950 us/op 3.4800 us/op 0.98
Full columns - reconstruct all 6 blobs 109.20 us/op 227.68 us/op 0.48
Full columns - reconstruct half of the blobs out of 6 73.559 us/op 95.667 us/op 0.77
Full columns - reconstruct single blob out of 6 27.602 us/op 31.736 us/op 0.87
Half columns - reconstruct all 6 blobs 360.45 ms/op 378.30 ms/op 0.95
Half columns - reconstruct half of the blobs out of 6 182.45 ms/op 190.51 ms/op 0.96
Half columns - reconstruct single blob out of 6 64.479 ms/op 68.214 ms/op 0.95
Full columns - reconstruct all 10 blobs 204.56 us/op 205.26 us/op 1.00
Full columns - reconstruct half of the blobs out of 10 213.14 us/op 135.01 us/op 1.58
Full columns - reconstruct single blob out of 10 29.693 us/op 29.102 us/op 1.02
Half columns - reconstruct all 10 blobs 600.71 ms/op 621.02 ms/op 0.97
Half columns - reconstruct half of the blobs out of 10 304.28 ms/op 313.16 ms/op 0.97
Half columns - reconstruct single blob out of 10 64.759 ms/op 67.903 ms/op 0.95
Full columns - reconstruct all 20 blobs 961.54 us/op 571.29 us/op 1.68
Full columns - reconstruct half of the blobs out of 20 269.95 us/op 245.58 us/op 1.10
Full columns - reconstruct single blob out of 20 29.192 us/op 29.877 us/op 0.98
Half columns - reconstruct all 20 blobs 1.2089 s/op 1.2441 s/op 0.97
Half columns - reconstruct half of the blobs out of 20 611.94 ms/op 625.53 ms/op 0.98
Half columns - reconstruct single blob out of 20 64.342 ms/op 67.502 ms/op 0.95
Set add up to 64 items then delete first 1.9775 us/op 2.4842 us/op 0.80
OrderedSet add up to 64 items then delete first 3.1151 us/op 3.2182 us/op 0.97
Set add up to 64 items then delete last 1.9789 us/op 2.2527 us/op 0.88
OrderedSet add up to 64 items then delete last 3.0595 us/op 3.1032 us/op 0.99
Set add up to 64 items then delete middle 1.9770 us/op 2.1004 us/op 0.94
OrderedSet add up to 64 items then delete middle 4.4403 us/op 4.6538 us/op 0.95
Set add up to 128 items then delete first 3.9644 us/op 4.0471 us/op 0.98
OrderedSet add up to 128 items then delete first 5.8814 us/op 6.3568 us/op 0.93
Set add up to 128 items then delete last 3.5894 us/op 3.7232 us/op 0.96
OrderedSet add up to 128 items then delete last 5.4573 us/op 5.6484 us/op 0.97
Set add up to 128 items then delete middle 3.5930 us/op 3.6895 us/op 0.97
OrderedSet add up to 128 items then delete middle 11.135 us/op 11.444 us/op 0.97
Set add up to 256 items then delete first 7.4348 us/op 7.3987 us/op 1.00
OrderedSet add up to 256 items then delete first 11.433 us/op 11.659 us/op 0.98
Set add up to 256 items then delete last 7.1897 us/op 7.2154 us/op 1.00
OrderedSet add up to 256 items then delete last 10.882 us/op 10.987 us/op 0.99
Set add up to 256 items then delete middle 7.1155 us/op 7.3077 us/op 0.97
OrderedSet add up to 256 items then delete middle 33.046 us/op 34.003 us/op 0.97
pass gossip attestations to forkchoice per slot 2.4880 ms/op 2.4586 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 373.49 us/op 372.84 us/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 0 2.2503 ms/op 2.2578 ms/op 1.00
forkChoice updateHead vc 1000000 bc 64 eq 0 3.7335 ms/op 3.7416 ms/op 1.00
forkChoice updateHead vc 600000 bc 320 eq 0 2.2926 ms/op 2.2368 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 2.2381 ms/op 2.2520 ms/op 0.99
forkChoice updateHead vc 600000 bc 7200 eq 0 2.5377 ms/op 2.6622 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 1000 2.7475 ms/op 2.8187 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 10000 2.8566 ms/op 2.9330 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 300000 6.6316 ms/op 6.5922 ms/op 1.01
computeDeltas 1400000 validators 0% inactive 11.933 ms/op 12.270 ms/op 0.97
computeDeltas 1400000 validators 10% inactive 11.302 ms/op 11.529 ms/op 0.98
computeDeltas 1400000 validators 20% inactive 10.230 ms/op 10.522 ms/op 0.97
computeDeltas 1400000 validators 50% inactive 7.9290 ms/op 8.0703 ms/op 0.98
computeDeltas 2100000 validators 0% inactive 17.919 ms/op 18.844 ms/op 0.95
computeDeltas 2100000 validators 10% inactive 16.755 ms/op 17.205 ms/op 0.97
computeDeltas 2100000 validators 20% inactive 15.232 ms/op 15.620 ms/op 0.98
computeDeltas 2100000 validators 50% inactive 9.0228 ms/op 9.1996 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei normalcase 1.8201 ms/op 2.2477 ms/op 0.81
altair processAttestation - 250000 vs - 7PWei worstcase 2.4941 ms/op 3.3268 ms/op 0.75
altair processAttestation - setStatus - 1/6 committees join 96.379 us/op 103.39 us/op 0.93
altair processAttestation - setStatus - 1/3 committees join 192.78 us/op 208.45 us/op 0.92
altair processAttestation - setStatus - 1/2 committees join 279.54 us/op 295.48 us/op 0.95
altair processAttestation - setStatus - 2/3 committees join 352.78 us/op 380.79 us/op 0.93
altair processAttestation - setStatus - 4/5 committees join 512.75 us/op 521.38 us/op 0.98
altair processAttestation - setStatus - 100% committees join 625.07 us/op 623.81 us/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase 4.3899 ms/op 4.2087 ms/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase hashState 18.375 ms/op 15.374 ms/op 1.20
altair processBlock - 250000 vs - 7PWei worstcase 22.651 ms/op 20.418 ms/op 1.11
altair processBlock - 250000 vs - 7PWei worstcase hashState 45.388 ms/op 41.531 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6207 ms/op 1.3879 ms/op 1.17
phase0 processBlock - 250000 vs - 7PWei worstcase 18.357 ms/op 16.249 ms/op 1.13
altair processEth1Data - 250000 vs - 7PWei normalcase 288.87 us/op 290.45 us/op 0.99
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 6.4550 us/op 4.3440 us/op 1.49
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 21.625 us/op 18.970 us/op 1.14
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.6260 us/op 5.3560 us/op 1.05
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.6220 us/op 3.4390 us/op 1.05
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 93.212 us/op 86.716 us/op 1.07
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.4549 ms/op 1.3005 ms/op 1.12
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8645 ms/op 1.9009 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9149 ms/op 1.7192 ms/op 1.11
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 6.6936 ms/op 3.7178 ms/op 1.80
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.8075 ms/op 2.2304 ms/op 1.26
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.1301 ms/op 4.4411 ms/op 0.93
Tree 40 250000 create 359.05 ms/op 372.55 ms/op 0.96
Tree 40 250000 get(125000) 93.977 ns/op 86.750 ns/op 1.08
Tree 40 250000 set(125000) 1.0164 us/op 1.1599 us/op 0.88
Tree 40 250000 toArray() 17.443 ms/op 15.032 ms/op 1.16
Tree 40 250000 iterate all - toArray() + loop 16.299 ms/op 15.098 ms/op 1.08
Tree 40 250000 iterate all - get(i) 40.609 ms/op 38.629 ms/op 1.05
Array 250000 create 2.2797 ms/op 2.0825 ms/op 1.09
Array 250000 clone - spread 696.15 us/op 660.48 us/op 1.05
Array 250000 get(125000) 0.29700 ns/op 0.29400 ns/op 1.01
Array 250000 set(125000) 0.29800 ns/op 0.29400 ns/op 1.01
Array 250000 iterate all - loop 58.105 us/op 58.231 us/op 1.00
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.317 ms/op 40.269 ms/op 1.05
Array.fill - length 1000000 2.2368 ms/op 2.0390 ms/op 1.10
Array push - length 1000000 9.8259 ms/op 8.4972 ms/op 1.16
Array.get 0.21074 ns/op 0.20886 ns/op 1.01
Uint8Array.get 0.24962 ns/op 0.22575 ns/op 1.11
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.932 ms/op 14.371 ms/op 1.18
altair processEpoch - mainnet_e81889 272.18 ms/op 272.86 ms/op 1.00
mainnet_e81889 - altair beforeProcessEpoch 18.193 ms/op 15.578 ms/op 1.17
mainnet_e81889 - altair processJustificationAndFinalization 6.3660 us/op 6.4190 us/op 0.99
mainnet_e81889 - altair processInactivityUpdates 3.3994 ms/op 3.6357 ms/op 0.94
mainnet_e81889 - altair processRewardsAndPenalties 21.878 ms/op 21.011 ms/op 1.04
mainnet_e81889 - altair processRegistryUpdates 547.00 ns/op 541.00 ns/op 1.01
mainnet_e81889 - altair processSlashings 144.00 ns/op 134.00 ns/op 1.07
mainnet_e81889 - altair processEth1DataReset 134.00 ns/op 133.00 ns/op 1.01
mainnet_e81889 - altair processEffectiveBalanceUpdates 8.1966 ms/op 1.3525 ms/op 6.06
mainnet_e81889 - altair processSlashingsReset 716.00 ns/op 715.00 ns/op 1.00
mainnet_e81889 - altair processRandaoMixesReset 1.3440 us/op 1.3350 us/op 1.01
mainnet_e81889 - altair processHistoricalRootsUpdate 134.00 ns/op 136.00 ns/op 0.99
mainnet_e81889 - altair processParticipationFlagUpdates 449.00 ns/op 441.00 ns/op 1.02
mainnet_e81889 - altair processSyncCommitteeUpdates 111.00 ns/op 116.00 ns/op 0.96
mainnet_e81889 - altair afterProcessEpoch 41.688 ms/op 42.035 ms/op 0.99
capella processEpoch - mainnet_e217614 791.54 ms/op 843.13 ms/op 0.94
mainnet_e217614 - capella beforeProcessEpoch 88.801 ms/op 72.645 ms/op 1.22
mainnet_e217614 - capella processJustificationAndFinalization 6.3890 us/op 36.765 ms/op 0.00
mainnet_e217614 - capella processInactivityUpdates 15.474 ms/op 18.787 ms/op 0.82
mainnet_e217614 - capella processRewardsAndPenalties 89.741 ms/op 107.61 ms/op 0.83
mainnet_e217614 - capella processRegistryUpdates 4.4990 us/op 4.5140 us/op 1.00
mainnet_e217614 - capella processSlashings 142.00 ns/op 136.00 ns/op 1.04
mainnet_e217614 - capella processEth1DataReset 129.00 ns/op 140.00 ns/op 0.92
mainnet_e217614 - capella processEffectiveBalanceUpdates 14.800 ms/op 21.573 ms/op 0.69
mainnet_e217614 - capella processSlashingsReset 676.00 ns/op 706.00 ns/op 0.96
mainnet_e217614 - capella processRandaoMixesReset 1.1690 us/op 1.8410 us/op 0.63
mainnet_e217614 - capella processHistoricalRootsUpdate 129.00 ns/op 137.00 ns/op 0.94
mainnet_e217614 - capella processParticipationFlagUpdates 422.00 ns/op 447.00 ns/op 0.94
mainnet_e217614 - capella afterProcessEpoch 151.00 ms/op 110.69 ms/op 1.36
phase0 processEpoch - mainnet_e58758 267.15 ms/op 337.09 ms/op 0.79
mainnet_e58758 - phase0 beforeProcessEpoch 69.708 ms/op 81.154 ms/op 0.86
mainnet_e58758 - phase0 processJustificationAndFinalization 6.1620 us/op 6.8240 us/op 0.90
mainnet_e58758 - phase0 processRewardsAndPenalties 16.818 ms/op 17.375 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 2.2350 us/op 2.2960 us/op 0.97
mainnet_e58758 - phase0 processSlashings 140.00 ns/op 141.00 ns/op 0.99
mainnet_e58758 - phase0 processEth1DataReset 133.00 ns/op 144.00 ns/op 0.92
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 829.37 us/op 3.0033 ms/op 0.28
mainnet_e58758 - phase0 processSlashingsReset 1.0080 us/op 959.00 ns/op 1.05
mainnet_e58758 - phase0 processRandaoMixesReset 1.3500 us/op 1.4810 us/op 0.91
mainnet_e58758 - phase0 processHistoricalRootsUpdate 135.00 ns/op 137.00 ns/op 0.99
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.1500 us/op 1.2460 us/op 0.92
mainnet_e58758 - phase0 afterProcessEpoch 33.077 ms/op 33.544 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 998.98 us/op 1.1292 ms/op 0.88
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5862 ms/op 4.3301 ms/op 0.37
altair processInactivityUpdates - 250000 normalcase 13.915 ms/op 12.499 ms/op 1.11
altair processInactivityUpdates - 250000 worstcase 12.270 ms/op 12.536 ms/op 0.98
phase0 processRegistryUpdates - 250000 normalcase 2.3410 us/op 2.1750 us/op 1.08
phase0 processRegistryUpdates - 250000 badcase_full_deposits 147.27 us/op 143.89 us/op 1.02
phase0 processRegistryUpdates - 250000 worstcase 0.5 62.346 ms/op 62.437 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 15.111 ms/op 16.195 ms/op 0.93
altair processRewardsAndPenalties - 250000 worstcase 15.047 ms/op 16.636 ms/op 0.90
phase0 getAttestationDeltas - 250000 normalcase 5.2449 ms/op 5.3073 ms/op 0.99
phase0 getAttestationDeltas - 250000 worstcase 5.2214 ms/op 5.3405 ms/op 0.98
phase0 processSlashings - 250000 worstcase 59.587 us/op 62.858 us/op 0.95
altair processSyncCommitteeUpdates - 250000 10.205 ms/op 12.267 ms/op 0.83
BeaconState.hashTreeRoot - No change 167.00 ns/op 178.00 ns/op 0.94
BeaconState.hashTreeRoot - 1 full validator 73.270 us/op 90.915 us/op 0.81
BeaconState.hashTreeRoot - 32 full validator 826.14 us/op 853.96 us/op 0.97
BeaconState.hashTreeRoot - 512 full validator 7.3512 ms/op 9.5259 ms/op 0.77
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 89.347 us/op 109.52 us/op 0.82
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3739 ms/op 1.4374 ms/op 0.96
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 16.278 ms/op 22.531 ms/op 0.72
BeaconState.hashTreeRoot - 1 balances 73.735 us/op 88.636 us/op 0.83
BeaconState.hashTreeRoot - 32 balances 713.22 us/op 806.61 us/op 0.88
BeaconState.hashTreeRoot - 512 balances 5.8127 ms/op 7.3159 ms/op 0.79
BeaconState.hashTreeRoot - 250000 balances 128.55 ms/op 138.32 ms/op 0.93
aggregationBits - 2048 els - zipIndexesInBitList 18.997 us/op 20.290 us/op 0.94
regular array get 100000 times 22.497 us/op 22.920 us/op 0.98
wrappedArray get 100000 times 22.429 us/op 22.812 us/op 0.98
arrayWithProxy get 100000 times 11.479 ms/op 9.5666 ms/op 1.20
ssz.Root.equals 20.844 ns/op 21.519 ns/op 0.97
byteArrayEquals 20.910 ns/op 21.098 ns/op 0.99
Buffer.compare 8.6440 ns/op 8.8810 ns/op 0.97
processSlot - 1 slots 8.9590 us/op 10.335 us/op 0.87
processSlot - 32 slots 1.9416 ms/op 2.2454 ms/op 0.86
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 5.0805 ms/op 5.3257 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 1.6565 ms/op 1.6465 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 3.3093 ms/op 3.4141 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 3.5594 ms/op 3.6622 ms/op 0.97
findModifiedValidators - 10000 modified validators 719.60 ms/op 609.28 ms/op 1.18
findModifiedValidators - 1000 modified validators 442.31 ms/op 479.22 ms/op 0.92
findModifiedValidators - 100 modified validators 278.03 ms/op 311.50 ms/op 0.89
findModifiedValidators - 10 modified validators 217.58 ms/op 238.49 ms/op 0.91
findModifiedValidators - 1 modified validators 135.52 ms/op 166.19 ms/op 0.82
findModifiedValidators - no difference 159.97 ms/op 161.04 ms/op 0.99
migrate state 1500000 validators, 3400 modified, 2000 new 3.1028 s/op 2.7550 s/op 1.13
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.5400 ns/op 3.5800 ns/op 0.99
state getBlockRootAtSlot - 250000 vs - 7PWei 391.76 ns/op 398.10 ns/op 0.98
computeProposerIndex 100000 validators 1.2875 ms/op 1.3118 ms/op 0.98
getNextSyncCommitteeIndices 1000 validators 2.7441 ms/op 2.7964 ms/op 0.98
getNextSyncCommitteeIndices 10000 validators 24.212 ms/op 24.365 ms/op 0.99
getNextSyncCommitteeIndices 100000 validators 84.559 ms/op 87.169 ms/op 0.97
computeProposers - vc 250000 530.12 us/op 581.46 us/op 0.91
computeEpochShuffling - vc 250000 37.956 ms/op 39.018 ms/op 0.97
getNextSyncCommittee - vc 250000 9.3376 ms/op 9.3511 ms/op 1.00
nodejs block root to RootHex using toHex 99.513 ns/op 103.43 ns/op 0.96
nodejs block root to RootHex using toRootHex 64.983 ns/op 66.403 ns/op 0.98
nodejs fromHex(blob) 751.81 us/op 744.66 us/op 1.01
nodejs fromHexInto(blob) 610.01 us/op 603.32 us/op 1.01
nodejs block root to RootHex using the deprecated toHexString 461.49 ns/op 447.93 ns/op 1.03
nodejs byteArrayEquals 32 bytes (block root) 25.412 ns/op 25.065 ns/op 1.01
nodejs byteArrayEquals 48 bytes (pubkey) 36.864 ns/op 36.036 ns/op 1.02
nodejs byteArrayEquals 96 bytes (signature) 32.065 ns/op 31.567 ns/op 1.02
nodejs byteArrayEquals 1024 bytes 37.134 ns/op 37.547 ns/op 0.99
nodejs byteArrayEquals 131072 bytes (blob) 1.7119 us/op 1.7080 us/op 1.00
browser block root to RootHex using toHex 140.16 ns/op 137.40 ns/op 1.02
browser block root to RootHex using toRootHex 126.21 ns/op 132.34 ns/op 0.95
browser fromHex(blob) 1.4946 ms/op 1.4827 ms/op 1.01
browser fromHexInto(blob) 602.35 us/op 614.16 us/op 0.98
browser block root to RootHex using the deprecated toHexString 448.31 ns/op 454.16 ns/op 0.99
browser byteArrayEquals 32 bytes (block root) 26.788 ns/op 27.309 ns/op 0.98
browser byteArrayEquals 48 bytes (pubkey) 37.910 ns/op 38.907 ns/op 0.97
browser byteArrayEquals 96 bytes (signature) 71.179 ns/op 73.054 ns/op 0.97
browser byteArrayEquals 1024 bytes 725.07 ns/op 737.09 ns/op 0.98
browser byteArrayEquals 131072 bytes (blob) 91.322 us/op 92.540 us/op 0.99

by benchmarkbot/action

SLOT_BYTES_POSITION_IN_SIGNED_DATA_COLUMN_SIDECAR_PRE_GLOAS + BEACON_BLOCK_HEADER_SIZE
)
);
const blockRoot = ssz.phase0.BeaconBlockHeader.hashTreeRoot(blockHeader);

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.

so now we have to do a hashTreeRoot() here which is not cheap

@nflaig nflaig Apr 3, 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.

yep same concern I had here #9166 (comment), do we just want the change in network process index file?

I guess this becomes unnecessary if we do not extract the root since it's skipped anyways here

if (root && !this.chain.forkChoice.hasBlockHexUnsafe(root)) {

if there is no root extracted

@twoeths twoeths left a comment

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.

now I've just noticed that for fulu DataColumnSidecar, we even don't have a block root there
so it will not reach this https://github.com/ChainSafe/lodestar/pull/9166/changes#diff-d2cbc467ecd1859e4b52649025596463a04f60a06c850c1007a77827f773a903R345
meaning it will not await for block
seems like the current implementation is already as designed

@nflaig

nflaig commented Apr 3, 2026

Copy link
Copy Markdown
Member Author

we already don't wait for block if there is no extracted root and hashTreeRoot() is too expensive, we don't want to do that for hot path like network processor

closing

@nflaig nflaig closed this Apr 3, 2026
@nflaig
nflaig deleted the nflaig/fix-fulu-data-column-block-wait branch April 3, 2026 10:36
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