Skip to content

Conversation

@twoeths
Copy link
Contributor

@twoeths twoeths commented Aug 28, 2025

Motivation

Description

  • call getBlobsV2 once per slot, triggered by the first seen beacon_block or data_column_sidecar gossip message
  • preallocate buffers for getBlobsV2, consume the new fromHexInto() api in feat: fromHexInto() api #8275
    • only do it for gossip messages at the current clock slot to make it safe
  • enhance results of getDataColumnsFromExecution() and track in metrics

Closes #8281
Closes #8271

Test on fusaka-devnet-3

  • testing in progress as it takes time for a node to be synced

throw Error("Promise Constructor was not executed immediately");
}

const gotColumnsFromExecution = await getDataColumnsFromExecution(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the only change in this file is to remove getDataColumnsFromExecution call, but it caused a lot of diffs due to indentation

@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 32.23684% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.84%. Comparing base (083b7cc) to head (6b2140c).
⚠️ Report is 27 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8282      +/-   ##
============================================
- Coverage     54.07%   53.84%   -0.24%     
============================================
  Files           849      849              
  Lines         64121    64195      +74     
  Branches       4853     4825      -28     
============================================
- Hits          34674    34566     -108     
- Misses        29370    29554     +184     
+ Partials         77       75       -2     
🚀 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.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 28, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 66577f5 Previous: 97ad684 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 930.73 us/op 961.66 us/op 0.97
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 33.989 us/op 35.050 us/op 0.97
BLS verify - blst 1.4344 ms/op 1.5123 ms/op 0.95
BLS verifyMultipleSignatures 3 - blst 2.2366 ms/op 2.2399 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst 2.5006 ms/op 2.9721 ms/op 0.84
BLS verifyMultipleSignatures 32 - blst 7.3158 ms/op 6.6385 ms/op 1.10
BLS verifyMultipleSignatures 64 - blst 10.794 ms/op 11.130 ms/op 0.97
BLS verifyMultipleSignatures 128 - blst 17.027 ms/op 16.999 ms/op 1.00
BLS deserializing 10000 signatures 679.30 ms/op 676.83 ms/op 1.00
BLS deserializing 100000 signatures 6.7097 s/op 6.7640 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst 874.33 us/op 870.22 us/op 1.00
BLS verifyMultipleSignatures - same message - 8 - blst 951.96 us/op 1.3399 ms/op 0.71
BLS verifyMultipleSignatures - same message - 32 - blst 1.6642 ms/op 1.6528 ms/op 1.01
BLS verifyMultipleSignatures - same message - 64 - blst 2.5470 ms/op 2.5373 ms/op 1.00
BLS verifyMultipleSignatures - same message - 128 - blst 4.2809 ms/op 4.2332 ms/op 1.01
BLS aggregatePubkeys 32 - blst 18.911 us/op 18.874 us/op 1.00
BLS aggregatePubkeys 128 - blst 67.925 us/op 67.686 us/op 1.00
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 58.270 ms/op 53.811 ms/op 1.08
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 49.384 ms/op 49.590 ms/op 1.00
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 49.700 ms/op 38.438 ms/op 1.29
getSlashingsAndExits - default max 70.954 us/op 71.238 us/op 1.00
getSlashingsAndExits - 2k 319.27 us/op 281.07 us/op 1.14
proposeBlockBody type=full, size=empty 5.4972 ms/op 5.3612 ms/op 1.03
isKnown best case - 1 super set check 205.00 ns/op 218.00 ns/op 0.94
isKnown normal case - 2 super set checks 200.00 ns/op 211.00 ns/op 0.95
isKnown worse case - 16 super set checks 200.00 ns/op 209.00 ns/op 0.96
InMemoryCheckpointStateCache - add get delete 2.3930 us/op 2.3230 us/op 1.03
validate api signedAggregateAndProof - struct 2.1450 ms/op 1.5226 ms/op 1.41
validate gossip signedAggregateAndProof - struct 1.5438 ms/op 2.6015 ms/op 0.59
batch validate gossip attestation - vc 640000 - chunk 32 113.65 us/op 115.19 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 64 99.754 us/op 100.86 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 128 93.100 us/op 95.183 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 256 94.079 us/op 95.941 us/op 0.98
pickEth1Vote - no votes 933.20 us/op 930.80 us/op 1.00
pickEth1Vote - max votes 5.5179 ms/op 8.5116 ms/op 0.65
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.303 ms/op 10.692 ms/op 0.96
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.527 ms/op 24.344 ms/op 0.84
pickEth1Vote - Eth1Data fastSerialize value x2048 433.55 us/op 436.55 us/op 0.99
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.3227 ms/op 2.8679 ms/op 1.16
bytes32 toHexString 352.00 ns/op 355.00 ns/op 0.99
bytes32 Buffer.toString(hex) 241.00 ns/op 249.00 ns/op 0.97
bytes32 Buffer.toString(hex) from Uint8Array 323.00 ns/op 334.00 ns/op 0.97
bytes32 Buffer.toString(hex) + 0x 242.00 ns/op 244.00 ns/op 0.99
Object access 1 prop 0.12000 ns/op 0.11700 ns/op 1.03
Map access 1 prop 0.12300 ns/op 0.12200 ns/op 1.01
Object get x1000 5.6280 ns/op 5.7460 ns/op 0.98
Map get x1000 6.1430 ns/op 6.3770 ns/op 0.96
Object set x1000 26.998 ns/op 27.041 ns/op 1.00
Map set x1000 18.949 ns/op 19.119 ns/op 0.99
Return object 10000 times 0.27530 ns/op 0.28140 ns/op 0.98
Throw Error 10000 times 4.1935 us/op 4.1900 us/op 1.00
toHex 133.71 ns/op 132.50 ns/op 1.01
Buffer.from 117.81 ns/op 127.42 ns/op 0.92
shared Buffer 82.495 ns/op 84.655 ns/op 0.97
fastMsgIdFn sha256 / 200 bytes 2.1050 us/op 2.1210 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 196.00 ns/op 212.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 200 bytes 250.00 ns/op 271.00 ns/op 0.92
fastMsgIdFn sha256 / 1000 bytes 6.9760 us/op 6.9620 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 322.00 ns/op 337.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 1000 bytes 323.00 ns/op 334.00 ns/op 0.97
fastMsgIdFn sha256 / 10000 bytes 62.074 us/op 63.843 us/op 0.97
fastMsgIdFn h32 xxhash / 10000 bytes 1.7280 us/op 1.8450 us/op 0.94
fastMsgIdFn h64 xxhash / 10000 bytes 1.1450 us/op 1.2300 us/op 0.93
send data - 1000 256B messages 14.912 ms/op 15.938 ms/op 0.94
send data - 1000 512B messages 18.562 ms/op 18.257 ms/op 1.02
send data - 1000 1024B messages 26.122 ms/op 25.494 ms/op 1.02
send data - 1000 1200B messages 24.419 ms/op 22.813 ms/op 1.07
send data - 1000 2048B messages 25.151 ms/op 24.056 ms/op 1.05
send data - 1000 4096B messages 27.503 ms/op 27.203 ms/op 1.01
send data - 1000 16384B messages 43.121 ms/op 45.120 ms/op 0.96
send data - 1000 65536B messages 108.88 ms/op 112.65 ms/op 0.97
enrSubnets - fastDeserialize 64 bits 917.00 ns/op 885.00 ns/op 1.04
enrSubnets - ssz BitVector 64 bits 310.00 ns/op 330.00 ns/op 0.94
enrSubnets - fastDeserialize 4 bits 123.00 ns/op 137.00 ns/op 0.90
enrSubnets - ssz BitVector 4 bits 303.00 ns/op 323.00 ns/op 0.94
prioritizePeers score -10:0 att 32-0.1 sync 2-0 231.43 us/op 227.65 us/op 1.02
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 256.29 us/op 253.10 us/op 1.01
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 361.12 us/op 360.99 us/op 1.00
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 678.04 us/op 679.98 us/op 1.00
prioritizePeers score 0:0 att 64-1 sync 4-1 821.61 us/op 825.03 us/op 1.00
array of 16000 items push then shift 1.5877 us/op 1.5551 us/op 1.02
LinkedList of 16000 items push then shift 7.1380 ns/op 6.8220 ns/op 1.05
array of 16000 items push then pop 75.364 ns/op 74.074 ns/op 1.02
LinkedList of 16000 items push then pop 7.0190 ns/op 6.6620 ns/op 1.05
array of 24000 items push then shift 2.3309 us/op 2.3051 us/op 1.01
LinkedList of 24000 items push then shift 6.8130 ns/op 7.0120 ns/op 0.97
array of 24000 items push then pop 104.38 ns/op 106.01 ns/op 0.98
LinkedList of 24000 items push then pop 6.8500 ns/op 6.9600 ns/op 0.98
intersect bitArray bitLen 8 6.2530 ns/op 6.3360 ns/op 0.99
intersect array and set length 8 38.036 ns/op 41.752 ns/op 0.91
intersect bitArray bitLen 128 29.187 ns/op 29.939 ns/op 0.97
intersect array and set length 128 613.21 ns/op 728.78 ns/op 0.84
bitArray.getTrueBitIndexes() bitLen 128 1.0080 us/op 1.0120 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 248 1.7780 us/op 1.7460 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 512 3.6200 us/op 3.5660 us/op 1.02
Buffer.concat 32 items 767.00 ns/op 604.00 ns/op 1.27
Uint8Array.set 32 items 1.0680 us/op 1.0330 us/op 1.03
Buffer.copy 2.8400 us/op 2.3000 us/op 1.23
Uint8Array.set - with subarray 1.6160 us/op 1.5190 us/op 1.06
Uint8Array.set - without subarray 1.0140 us/op 851.00 ns/op 1.19
getUint32 - dataview 202.00 ns/op 249.00 ns/op 0.81
getUint32 - manual 122.00 ns/op 129.00 ns/op 0.95
Set add up to 64 items then delete first 2.1781 us/op 2.1094 us/op 1.03
OrderedSet add up to 64 items then delete first 3.7238 us/op 3.1537 us/op 1.18
Set add up to 64 items then delete last 2.4758 us/op 2.5078 us/op 0.99
OrderedSet add up to 64 items then delete last 3.8617 us/op 3.6183 us/op 1.07
Set add up to 64 items then delete middle 2.3617 us/op 2.3448 us/op 1.01
OrderedSet add up to 64 items then delete middle 5.2659 us/op 5.1694 us/op 1.02
Set add up to 128 items then delete first 4.9093 us/op 5.1268 us/op 0.96
OrderedSet add up to 128 items then delete first 7.5150 us/op 7.9365 us/op 0.95
Set add up to 128 items then delete last 4.9553 us/op 4.7747 us/op 1.04
OrderedSet add up to 128 items then delete last 7.7474 us/op 7.2670 us/op 1.07
Set add up to 128 items then delete middle 5.1934 us/op 4.8210 us/op 1.08
OrderedSet add up to 128 items then delete middle 13.740 us/op 13.683 us/op 1.00
Set add up to 256 items then delete first 10.093 us/op 10.061 us/op 1.00
OrderedSet add up to 256 items then delete first 14.858 us/op 15.751 us/op 0.94
Set add up to 256 items then delete last 10.097 us/op 9.6796 us/op 1.04
OrderedSet add up to 256 items then delete last 15.131 us/op 14.626 us/op 1.03
Set add up to 256 items then delete middle 9.7253 us/op 9.4486 us/op 1.03
OrderedSet add up to 256 items then delete middle 40.341 us/op 40.627 us/op 0.99
transfer serialized Status (84 B) 2.1980 us/op 2.1270 us/op 1.03
copy serialized Status (84 B) 1.1360 us/op 1.0880 us/op 1.04
transfer serialized SignedVoluntaryExit (112 B) 2.2200 us/op 2.1870 us/op 1.02
copy serialized SignedVoluntaryExit (112 B) 1.4620 us/op 1.1240 us/op 1.30
transfer serialized ProposerSlashing (416 B) 2.2630 us/op 2.2170 us/op 1.02
copy serialized ProposerSlashing (416 B) 1.5530 us/op 1.1820 us/op 1.31
transfer serialized Attestation (485 B) 2.2910 us/op 2.2350 us/op 1.03
copy serialized Attestation (485 B) 1.3410 us/op 1.1680 us/op 1.15
transfer serialized AttesterSlashing (33232 B) 2.5280 us/op 2.4010 us/op 1.05
copy serialized AttesterSlashing (33232 B) 3.2890 us/op 3.2850 us/op 1.00
transfer serialized Small SignedBeaconBlock (128000 B) 3.0160 us/op 2.7650 us/op 1.09
copy serialized Small SignedBeaconBlock (128000 B) 8.8580 us/op 8.2630 us/op 1.07
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5190 us/op 3.0770 us/op 1.14
copy serialized Avg SignedBeaconBlock (200000 B) 13.021 us/op 12.127 us/op 1.07
transfer serialized BlobsSidecar (524380 B) 3.3520 us/op 3.2260 us/op 1.04
copy serialized BlobsSidecar (524380 B) 85.794 us/op 59.258 us/op 1.45
transfer serialized Big SignedBeaconBlock (1000000 B) 3.7280 us/op 3.4730 us/op 1.07
copy serialized Big SignedBeaconBlock (1000000 B) 142.44 us/op 108.27 us/op 1.32
pass gossip attestations to forkchoice per slot 2.7856 ms/op 2.7807 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 448.86 us/op 460.00 us/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 0 2.9204 ms/op 3.1039 ms/op 0.94
forkChoice updateHead vc 1000000 bc 64 eq 0 4.8277 ms/op 4.9741 ms/op 0.97
forkChoice updateHead vc 600000 bc 320 eq 0 2.8445 ms/op 2.8438 ms/op 1.00
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9552 ms/op 2.9288 ms/op 1.01
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3450 ms/op 3.1313 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 1000 10.332 ms/op 10.400 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 10000 10.243 ms/op 10.211 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 13.569 ms/op 13.448 ms/op 1.01
computeDeltas 500000 validators 300 proto nodes 4.0654 ms/op 3.9894 ms/op 1.02
computeDeltas 500000 validators 1200 proto nodes 4.1934 ms/op 4.1277 ms/op 1.02
computeDeltas 500000 validators 7200 proto nodes 4.4994 ms/op 4.2987 ms/op 1.05
computeDeltas 750000 validators 300 proto nodes 6.4659 ms/op 5.9631 ms/op 1.08
computeDeltas 750000 validators 1200 proto nodes 6.1663 ms/op 6.0941 ms/op 1.01
computeDeltas 750000 validators 7200 proto nodes 6.1215 ms/op 6.1082 ms/op 1.00
computeDeltas 1400000 validators 300 proto nodes 10.877 ms/op 11.890 ms/op 0.91
computeDeltas 1400000 validators 1200 proto nodes 11.110 ms/op 12.210 ms/op 0.91
computeDeltas 1400000 validators 7200 proto nodes 10.805 ms/op 12.282 ms/op 0.88
computeDeltas 2100000 validators 300 proto nodes 16.522 ms/op 18.912 ms/op 0.87
computeDeltas 2100000 validators 1200 proto nodes 16.586 ms/op 20.068 ms/op 0.83
computeDeltas 2100000 validators 7200 proto nodes 16.318 ms/op 18.956 ms/op 0.86
altair processAttestation - 250000 vs - 7PWei normalcase 2.0565 ms/op 3.1038 ms/op 0.66
altair processAttestation - 250000 vs - 7PWei worstcase 2.8709 ms/op 4.2110 ms/op 0.68
altair processAttestation - setStatus - 1/6 committees join 130.46 us/op 145.49 us/op 0.90
altair processAttestation - setStatus - 1/3 committees join 258.90 us/op 289.01 us/op 0.90
altair processAttestation - setStatus - 1/2 committees join 361.75 us/op 408.86 us/op 0.88
altair processAttestation - setStatus - 2/3 committees join 466.13 us/op 515.40 us/op 0.90
altair processAttestation - setStatus - 4/5 committees join 635.60 us/op 690.61 us/op 0.92
altair processAttestation - setStatus - 100% committees join 747.93 us/op 838.57 us/op 0.89
altair processBlock - 250000 vs - 7PWei normalcase 6.8164 ms/op 12.266 ms/op 0.56
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.176 ms/op 38.218 ms/op 0.68
altair processBlock - 250000 vs - 7PWei worstcase 42.192 ms/op 45.178 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 89.402 ms/op 88.329 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2565 ms/op 2.0319 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei worstcase 28.076 ms/op 25.627 ms/op 1.10
altair processEth1Data - 250000 vs - 7PWei normalcase 328.79 us/op 391.14 us/op 0.84
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.3910 us/op 6.2600 us/op 1.50
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 76.413 us/op 58.595 us/op 1.30
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.346 us/op 16.055 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.8560 us/op 9.0150 us/op 1.09
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 245.34 us/op 219.82 us/op 1.12
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.7622 ms/op 1.9558 ms/op 1.41
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3633 ms/op 2.4462 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.3697 ms/op 2.4058 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.5075 ms/op 5.1287 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4387 ms/op 2.5459 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.5526 ms/op 5.2900 ms/op 0.86
Tree 40 250000 create 411.25 ms/op 615.91 ms/op 0.67
Tree 40 250000 get(125000) 142.90 ns/op 154.04 ns/op 0.93
Tree 40 250000 set(125000) 1.4927 us/op 2.5077 us/op 0.60
Tree 40 250000 toArray() 16.022 ms/op 25.241 ms/op 0.63
Tree 40 250000 iterate all - toArray() + loop 15.729 ms/op 21.779 ms/op 0.72
Tree 40 250000 iterate all - get(i) 51.417 ms/op 62.094 ms/op 0.83
Array 250000 create 3.0626 ms/op 2.9070 ms/op 1.05
Array 250000 clone - spread 803.03 us/op 1.7430 ms/op 0.46
Array 250000 get(125000) 0.41800 ns/op 0.42400 ns/op 0.99
Array 250000 set(125000) 0.44000 ns/op 0.44800 ns/op 0.98
Array 250000 iterate all - loop 110.96 us/op 106.91 us/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.993 ms/op 44.103 ms/op 0.93
Array.fill - length 1000000 3.4286 ms/op 3.6423 ms/op 0.94
Array push - length 1000000 12.672 ms/op 21.184 ms/op 0.60
Array.get 0.26782 ns/op 0.30482 ns/op 0.88
Uint8Array.get 0.43237 ns/op 0.45156 ns/op 0.96
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.111 ms/op 23.233 ms/op 0.69
altair processEpoch - mainnet_e81889 298.05 ms/op 322.48 ms/op 0.92
mainnet_e81889 - altair beforeProcessEpoch 19.104 ms/op 18.542 ms/op 1.03
mainnet_e81889 - altair processJustificationAndFinalization 7.9960 us/op 7.6870 us/op 1.04
mainnet_e81889 - altair processInactivityUpdates 4.0081 ms/op 5.5875 ms/op 0.72
mainnet_e81889 - altair processRewardsAndPenalties 50.574 ms/op 41.802 ms/op 1.21
mainnet_e81889 - altair processRegistryUpdates 671.00 ns/op 789.00 ns/op 0.85
mainnet_e81889 - altair processSlashings 176.00 ns/op 196.00 ns/op 0.90
mainnet_e81889 - altair processEth1DataReset 183.00 ns/op 181.00 ns/op 1.01
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1858 ms/op 1.2356 ms/op 0.96
mainnet_e81889 - altair processSlashingsReset 907.00 ns/op 1.0840 us/op 0.84
mainnet_e81889 - altair processRandaoMixesReset 1.1890 us/op 1.5570 us/op 0.76
mainnet_e81889 - altair processHistoricalRootsUpdate 177.00 ns/op 208.00 ns/op 0.85
mainnet_e81889 - altair processParticipationFlagUpdates 518.00 ns/op 657.00 ns/op 0.79
mainnet_e81889 - altair processSyncCommitteeUpdates 133.00 ns/op 140.00 ns/op 0.95
mainnet_e81889 - altair afterProcessEpoch 43.179 ms/op 46.590 ms/op 0.93
capella processEpoch - mainnet_e217614 934.39 ms/op 924.63 ms/op 1.01
mainnet_e217614 - capella beforeProcessEpoch 67.064 ms/op 79.151 ms/op 0.85
mainnet_e217614 - capella processJustificationAndFinalization 5.7540 us/op 5.9060 us/op 0.97
mainnet_e217614 - capella processInactivityUpdates 14.626 ms/op 15.464 ms/op 0.95
mainnet_e217614 - capella processRewardsAndPenalties 183.61 ms/op 223.12 ms/op 0.82
mainnet_e217614 - capella processRegistryUpdates 8.1430 us/op 7.4630 us/op 1.09
mainnet_e217614 - capella processSlashings 189.00 ns/op 188.00 ns/op 1.01
mainnet_e217614 - capella processEth1DataReset 218.00 ns/op 189.00 ns/op 1.15
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.1423 ms/op 4.3615 ms/op 0.95
mainnet_e217614 - capella processSlashingsReset 1.0340 us/op 1.1600 us/op 0.89
mainnet_e217614 - capella processRandaoMixesReset 1.4180 us/op 1.3060 us/op 1.09
mainnet_e217614 - capella processHistoricalRootsUpdate 191.00 ns/op 178.00 ns/op 1.07
mainnet_e217614 - capella processParticipationFlagUpdates 544.00 ns/op 601.00 ns/op 0.91
mainnet_e217614 - capella afterProcessEpoch 121.43 ms/op 120.72 ms/op 1.01
phase0 processEpoch - mainnet_e58758 335.33 ms/op 354.30 ms/op 0.95
mainnet_e58758 - phase0 beforeProcessEpoch 89.932 ms/op 94.002 ms/op 0.96
mainnet_e58758 - phase0 processJustificationAndFinalization 6.7360 us/op 6.8810 us/op 0.98
mainnet_e58758 - phase0 processRewardsAndPenalties 40.652 ms/op 42.959 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 3.5850 us/op 3.5880 us/op 1.00
mainnet_e58758 - phase0 processSlashings 200.00 ns/op 191.00 ns/op 1.05
mainnet_e58758 - phase0 processEth1DataReset 193.00 ns/op 202.00 ns/op 0.96
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.4197 ms/op 1.3633 ms/op 1.04
mainnet_e58758 - phase0 processSlashingsReset 1.1090 us/op 1.1010 us/op 1.01
mainnet_e58758 - phase0 processRandaoMixesReset 1.4120 us/op 1.3650 us/op 1.03
mainnet_e58758 - phase0 processHistoricalRootsUpdate 194.00 ns/op 198.00 ns/op 0.98
mainnet_e58758 - phase0 processParticipationRecordUpdates 938.00 ns/op 1.1240 us/op 0.83
mainnet_e58758 - phase0 afterProcessEpoch 37.858 ms/op 36.058 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.5953 ms/op 1.6103 ms/op 1.61
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5467 ms/op 2.7784 ms/op 0.92
altair processInactivityUpdates - 250000 normalcase 18.842 ms/op 19.343 ms/op 0.97
altair processInactivityUpdates - 250000 worstcase 19.087 ms/op 22.142 ms/op 0.86
phase0 processRegistryUpdates - 250000 normalcase 6.5660 us/op 8.9690 us/op 0.73
phase0 processRegistryUpdates - 250000 badcase_full_deposits 328.57 us/op 313.66 us/op 1.05
phase0 processRegistryUpdates - 250000 worstcase 0.5 100.40 ms/op 110.75 ms/op 0.91
altair processRewardsAndPenalties - 250000 normalcase 26.558 ms/op 30.815 ms/op 0.86
altair processRewardsAndPenalties - 250000 worstcase 27.931 ms/op 30.663 ms/op 0.91
phase0 getAttestationDeltas - 250000 normalcase 7.3188 ms/op 8.3230 ms/op 0.88
phase0 getAttestationDeltas - 250000 worstcase 5.9330 ms/op 8.8447 ms/op 0.67
phase0 processSlashings - 250000 worstcase 87.139 us/op 102.64 us/op 0.85
altair processSyncCommitteeUpdates - 250000 10.937 ms/op 12.544 ms/op 0.87
BeaconState.hashTreeRoot - No change 239.00 ns/op 243.00 ns/op 0.98
BeaconState.hashTreeRoot - 1 full validator 91.933 us/op 85.833 us/op 1.07
BeaconState.hashTreeRoot - 32 full validator 1.4511 ms/op 1.0755 ms/op 1.35
BeaconState.hashTreeRoot - 512 full validator 12.974 ms/op 12.892 ms/op 1.01
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 125.84 us/op 122.16 us/op 1.03
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4922 ms/op 1.5136 ms/op 0.99
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 26.914 ms/op 27.763 ms/op 0.97
BeaconState.hashTreeRoot - 1 balances 88.194 us/op 93.290 us/op 0.95
BeaconState.hashTreeRoot - 32 balances 1.1553 ms/op 686.35 us/op 1.68
BeaconState.hashTreeRoot - 512 balances 7.4976 ms/op 7.4445 ms/op 1.01
BeaconState.hashTreeRoot - 250000 balances 153.78 ms/op 187.22 ms/op 0.82
aggregationBits - 2048 els - zipIndexesInBitList 21.333 us/op 23.053 us/op 0.93
byteArrayEquals 32 52.389 ns/op 68.850 ns/op 0.76
Buffer.compare 32 16.759 ns/op 18.195 ns/op 0.92
byteArrayEquals 1024 1.5533 us/op 1.7130 us/op 0.91
Buffer.compare 1024 24.977 ns/op 25.467 ns/op 0.98
byteArrayEquals 16384 24.705 us/op 27.171 us/op 0.91
Buffer.compare 16384 183.26 ns/op 215.46 ns/op 0.85
byteArrayEquals 123687377 195.01 ms/op 202.76 ms/op 0.96
Buffer.compare 123687377 9.4906 ms/op 8.9593 ms/op 1.06
byteArrayEquals 32 - diff last byte 54.504 ns/op 55.620 ns/op 0.98
Buffer.compare 32 - diff last byte 17.522 ns/op 19.737 ns/op 0.89
byteArrayEquals 1024 - diff last byte 1.6326 us/op 1.6414 us/op 0.99
Buffer.compare 1024 - diff last byte 26.115 ns/op 26.561 ns/op 0.98
byteArrayEquals 16384 - diff last byte 26.601 us/op 27.175 us/op 0.98
Buffer.compare 16384 - diff last byte 208.29 ns/op 187.82 ns/op 1.11
byteArrayEquals 123687377 - diff last byte 191.51 ms/op 190.14 ms/op 1.01
Buffer.compare 123687377 - diff last byte 6.8574 ms/op 6.3709 ms/op 1.08
byteArrayEquals 32 - random bytes 5.3420 ns/op 5.0650 ns/op 1.05
Buffer.compare 32 - random bytes 17.436 ns/op 19.454 ns/op 0.90
byteArrayEquals 1024 - random bytes 5.1130 ns/op 5.0100 ns/op 1.02
Buffer.compare 1024 - random bytes 17.330 ns/op 16.942 ns/op 1.02
byteArrayEquals 16384 - random bytes 5.1040 ns/op 5.5190 ns/op 0.92
Buffer.compare 16384 - random bytes 17.423 ns/op 16.870 ns/op 1.03
byteArrayEquals 123687377 - random bytes 6.4400 ns/op 6.2300 ns/op 1.03
Buffer.compare 123687377 - random bytes 17.970 ns/op 17.990 ns/op 1.00
regular array get 100000 times 32.019 us/op 37.229 us/op 0.86
wrappedArray get 100000 times 32.017 us/op 32.875 us/op 0.97
arrayWithProxy get 100000 times 11.768 ms/op 12.292 ms/op 0.96
ssz.Root.equals 45.037 ns/op 45.865 ns/op 0.98
byteArrayEquals 44.094 ns/op 44.987 ns/op 0.98
Buffer.compare 10.381 ns/op 10.121 ns/op 1.03
processSlot - 1 slots 10.129 us/op 10.101 us/op 1.00
processSlot - 32 slots 3.0908 ms/op 2.7992 ms/op 1.10
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.8817 ms/op 2.8639 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 2.0962 ms/op 2.0571 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 4.0914 ms/op 4.3149 ms/op 0.95
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3312 ms/op 4.8172 ms/op 0.90
findModifiedValidators - 10000 modified validators 743.86 ms/op 1.0952 s/op 0.68
findModifiedValidators - 1000 modified validators 688.57 ms/op 813.56 ms/op 0.85
findModifiedValidators - 100 modified validators 225.58 ms/op 321.52 ms/op 0.70
findModifiedValidators - 10 modified validators 169.12 ms/op 292.98 ms/op 0.58
findModifiedValidators - 1 modified validators 144.40 ms/op 190.43 ms/op 0.76
findModifiedValidators - no difference 141.53 ms/op 265.15 ms/op 0.53
compare ViewDUs 6.2678 s/op 8.3454 s/op 0.75
compare each validator Uint8Array 1.6508 s/op 1.8968 s/op 0.87
compare ViewDU to Uint8Array 1.1883 s/op 1.6719 s/op 0.71
migrate state 1000000 validators, 24 modified, 0 new 860.00 ms/op 1.1095 s/op 0.78
migrate state 1000000 validators, 1700 modified, 1000 new 1.2973 s/op 1.2135 s/op 1.07
migrate state 1000000 validators, 3400 modified, 2000 new 1.5309 s/op 1.4050 s/op 1.09
migrate state 1500000 validators, 24 modified, 0 new 960.00 ms/op 912.71 ms/op 1.05
migrate state 1500000 validators, 1700 modified, 1000 new 1.2038 s/op 1.1919 s/op 1.01
migrate state 1500000 validators, 3400 modified, 2000 new 1.4670 s/op 1.2973 s/op 1.13
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2900 ns/op 4.1400 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 903.47 ns/op 519.55 ns/op 1.74
naive computeProposerIndex 100000 validators 62.007 ms/op 55.438 ms/op 1.12
computeProposerIndex 100000 validators 1.5302 ms/op 1.4937 ms/op 1.02
naiveGetNextSyncCommitteeIndices 1000 validators 8.9928 s/op 7.6330 s/op 1.18
getNextSyncCommitteeIndices 1000 validators 115.22 ms/op 113.80 ms/op 1.01
naiveGetNextSyncCommitteeIndices 10000 validators 7.8790 s/op 8.0805 s/op 0.98
getNextSyncCommitteeIndices 10000 validators 124.47 ms/op 107.41 ms/op 1.16
naiveGetNextSyncCommitteeIndices 100000 validators 9.5566 s/op 7.5513 s/op 1.27
getNextSyncCommitteeIndices 100000 validators 129.48 ms/op 107.14 ms/op 1.21
naive computeShuffledIndex 100000 validators 32.551 s/op 23.249 s/op 1.40
cached computeShuffledIndex 100000 validators 598.13 ms/op 551.01 ms/op 1.09
naive computeShuffledIndex 2000000 validators 493.44 s/op 563.93 s/op 0.88
cached computeShuffledIndex 2000000 validators 32.920 s/op 51.012 s/op 0.65
computeProposers - vc 250000 594.67 us/op 625.45 us/op 0.95
computeEpochShuffling - vc 250000 41.526 ms/op 44.182 ms/op 0.94
getNextSyncCommittee - vc 250000 10.372 ms/op 12.145 ms/op 0.85
computeSigningRoot for AttestationData 18.009 us/op 22.128 us/op 0.81
hash AttestationData serialized data then Buffer.toString(base64) 1.5317 us/op 1.6718 us/op 0.92
toHexString serialized data 1.0690 us/op 1.2968 us/op 0.82
Buffer.toString(base64) 146.42 ns/op 158.90 ns/op 0.92
nodejs block root to RootHex using toHex 137.90 ns/op 158.61 ns/op 0.87
nodejs block root to RootHex using toRootHex 86.071 ns/op 95.789 ns/op 0.90
nodejs fromhex(blob) 106.18 ms/op 118.85 ms/op 0.89
nodejs fromHexInto(blob) 93.276 ms/op 100.82 ms/op 0.93
browser block root to RootHex using the deprecated toHexString 206.98 ns/op 233.65 ns/op 0.89
browser block root to RootHex using toHex 174.21 ns/op 211.30 ns/op 0.82
browser block root to RootHex using toRootHex 155.56 ns/op 163.75 ns/op 0.95
browser fromHexInto(blob) 788.50 us/op 842.01 us/op 0.94
browser fromHex(blob) 754.44 ms/op 813.63 ms/op 0.93

by benchmarkbot/action

@twoeths
Copy link
Contributor Author

twoeths commented Aug 28, 2025

  • memory and gc was decreased significantly
Screenshot 2025-08-28 at 20 22 25
  • all getBlobsV2 calls use the preallocated buffer
Screenshot 2025-08-28 at 20 23 38
  • getBlobsV2 result - need to investigate why there are failed calls later:
Screenshot 2025-08-28 at 20 25 21
  • getBlobsV2 time was improved, I think we don't see a lot of improvements because most of it is traffic time
Screenshot 2025-08-28 at 20 32 50

@twoeths twoeths marked this pull request as ready for review August 28, 2025 13:34
@twoeths twoeths requested a review from a team as a code owner August 28, 2025 13:34
Copy link
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.

call getBlobsV2 once per slot, triggered by the first seen beacon_block or data_column_sidecar gossip message

agree with this, the effectiveness of getBlobsV2 will be questionable anyways on mainnet due to private blob transactions and once we increase blob count further it seems likely that columns disseminate faster through the network than blobs on the EL side

@wemeetagain
Copy link
Member

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.

[getBlobsV2] Review getBlobsV2 usage [fulu] getBlobsV2 causes gc performance issue

4 participants