lodestar icon indicating copy to clipboard operation
lodestar copied to clipboard

feat: transfer PendingGossipsubMessage data

Open twoeths opened this issue 1 month ago • 3 comments

Motivation

  • reduce gc time on the network thread

Description

  • an alternative to #8634

part of #8629

Testing

  • lg1k (vs 1% on stable lg1k)
Screenshot 2025-11-28 at 13 31 53
  • mainnet sas (vs 3.35% on stable mainnet sas)
Screenshot 2025-11-28 at 13 33 44

twoeths avatar Nov 28 '25 06:11 twoeths

gc on hoodi sas node is now surpassed unstable

Screenshot 2025-12-01 at 09 51 58

this is the same situation to #8634 where beacon_attestation mesh peers are 1.5x Screenshot 2025-12-01 at 09 53 27

this is on unstable Screenshot 2025-12-01 at 09 53 46

DataColumnSidecar Received time is the same to unstable in the end

Screenshot 2025-12-01 at 09 55 45

twoeths avatar Dec 01 '25 02:12 twoeths

:warning: Performance Alert :warning:

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: 273dfd28ec2b67e45880d63f69aebcd9470adb00 Previous: a8c0c7a156d0fe25962bcddc58eec268ca3a8b41 Ratio
phase0 processRegistryUpdates - 250000 badcase_full_deposits 11.868 ms/op 236.94 us/op 50.09
Full benchmark results
Benchmark suite Current: 273dfd28ec2b67e45880d63f69aebcd9470adb00 Previous: a8c0c7a156d0fe25962bcddc58eec268ca3a8b41 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 902.96 us/op 1.1228 ms/op 0.80
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 36.467 us/op 41.004 us/op 0.89
BLS verify - blst 1.1182 ms/op 880.71 us/op 1.27
BLS verifyMultipleSignatures 3 - blst 2.2360 ms/op 1.3369 ms/op 1.67
BLS verifyMultipleSignatures 8 - blst 2.5009 ms/op 2.0091 ms/op 1.24
BLS verifyMultipleSignatures 32 - blst 6.8452 ms/op 5.4125 ms/op 1.26
BLS verifyMultipleSignatures 64 - blst 11.237 ms/op 10.149 ms/op 1.11
BLS verifyMultipleSignatures 128 - blst 17.009 ms/op 20.293 ms/op 0.84
BLS deserializing 10000 signatures 679.71 ms/op 777.09 ms/op 0.87
BLS deserializing 100000 signatures 6.8180 s/op 8.2004 s/op 0.83
BLS verifyMultipleSignatures - same message - 3 - blst 993.69 us/op 1.0545 ms/op 0.94
BLS verifyMultipleSignatures - same message - 8 - blst 1.1974 ms/op 1.1794 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst 1.7014 ms/op 1.9990 ms/op 0.85
BLS verifyMultipleSignatures - same message - 64 - blst 2.7692 ms/op 3.1751 ms/op 0.87
BLS verifyMultipleSignatures - same message - 128 - blst 4.5289 ms/op 5.3434 ms/op 0.85
BLS aggregatePubkeys 32 - blst 19.666 us/op 27.687 us/op 0.71
BLS aggregatePubkeys 128 - blst 70.506 us/op 81.936 us/op 0.86
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 61.777 ms/op 91.128 ms/op 0.68
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 48.916 ms/op 67.047 ms/op 0.73
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 41.209 ms/op 50.853 ms/op 0.81
getSlashingsAndExits - default max 77.461 us/op 138.59 us/op 0.56
getSlashingsAndExits - 2k 334.24 us/op 517.09 us/op 0.65
isKnown best case - 1 super set check 202.00 ns/op 221.00 ns/op 0.91
isKnown normal case - 2 super set checks 197.00 ns/op 211.00 ns/op 0.93
isKnown worse case - 16 super set checks 197.00 ns/op 213.00 ns/op 0.92
InMemoryCheckpointStateCache - add get delete 2.3310 us/op 3.0180 us/op 0.77
validate api signedAggregateAndProof - struct 1.7415 ms/op 1.5776 ms/op 1.10
validate gossip signedAggregateAndProof - struct 1.7498 ms/op 1.4989 ms/op 1.17
batch validate gossip attestation - vc 640000 - chunk 32 116.34 us/op 120.70 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 64 103.20 us/op 104.97 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 128 97.301 us/op 98.736 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 256 99.851 us/op 99.364 us/op 1.00
pickEth1Vote - no votes 970.94 us/op 1.0322 ms/op 0.94
pickEth1Vote - max votes 7.5433 ms/op 7.4841 ms/op 1.01
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.588 ms/op 13.122 ms/op 0.96
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.241 ms/op 17.946 ms/op 1.02
pickEth1Vote - Eth1Data fastSerialize value x2048 457.50 us/op 456.80 us/op 1.00
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.7950 ms/op 2.2599 ms/op 1.24
bytes32 toHexString 391.00 ns/op 376.00 ns/op 1.04
bytes32 Buffer.toString(hex) 239.00 ns/op 267.00 ns/op 0.90
bytes32 Buffer.toString(hex) from Uint8Array 360.00 ns/op 349.00 ns/op 1.03
bytes32 Buffer.toString(hex) + 0x 243.00 ns/op 263.00 ns/op 0.92
Object access 1 prop 0.11500 ns/op 0.11800 ns/op 0.97
Map access 1 prop 0.12300 ns/op 0.12600 ns/op 0.98
Object get x1000 6.4590 ns/op 6.0280 ns/op 1.07
Map get x1000 6.3880 ns/op 6.4220 ns/op 0.99
Object set x1000 29.289 ns/op 31.273 ns/op 0.94
Map set x1000 19.770 ns/op 21.147 ns/op 0.93
Return object 10000 times 0.29030 ns/op 0.29790 ns/op 0.97
Throw Error 10000 times 4.4274 us/op 4.6267 us/op 0.96
toHex 153.47 ns/op 148.79 ns/op 1.03
Buffer.from 131.76 ns/op 138.08 ns/op 0.95
shared Buffer 84.912 ns/op 91.752 ns/op 0.93
fastMsgIdFn sha256 / 200 bytes 2.2230 us/op 2.3690 us/op 0.94
fastMsgIdFn h32 xxhash / 200 bytes 216.00 ns/op 215.00 ns/op 1.00
fastMsgIdFn h64 xxhash / 200 bytes 277.00 ns/op 283.00 ns/op 0.98
fastMsgIdFn sha256 / 1000 bytes 7.3080 us/op 7.6560 us/op 0.95
fastMsgIdFn h32 xxhash / 1000 bytes 467.00 ns/op 348.00 ns/op 1.34
fastMsgIdFn h64 xxhash / 1000 bytes 330.00 ns/op 356.00 ns/op 0.93
fastMsgIdFn sha256 / 10000 bytes 64.630 us/op 68.431 us/op 0.94
fastMsgIdFn h32 xxhash / 10000 bytes 1.8500 us/op 1.9440 us/op 0.95
fastMsgIdFn h64 xxhash / 10000 bytes 1.5330 us/op 1.2920 us/op 1.19
100 bytes - compress - snappyjs 1.2887 us/op 1.4626 us/op 0.88
100 bytes - compress - snappy 1.1353 us/op 1.3428 us/op 0.85
200 bytes - compress - snappyjs 1.7913 us/op 1.9890 us/op 0.90
200 bytes - compress - snappy 1.2640 us/op 1.5685 us/op 0.81
300 bytes - compress - snappyjs 2.7673 us/op 3.2225 us/op 0.86
300 bytes - compress - snappy 1.2564 us/op 1.5043 us/op 0.84
400 bytes - compress - snappyjs 2.5819 us/op 2.6940 us/op 0.96
400 bytes - compress - snappy 1.2972 us/op 1.5064 us/op 0.86
500 bytes - compress - snappyjs 2.7440 us/op 3.1042 us/op 0.88
500 bytes - compress - snappy 1.2944 us/op 1.4461 us/op 0.90
1000 bytes - compress - snappyjs 4.3478 us/op 5.2604 us/op 0.83
1000 bytes - compress - snappy 1.6799 us/op 1.7800 us/op 0.94
10000 bytes - compress - snappyjs 29.436 us/op 31.111 us/op 0.95
10000 bytes - compress - snappy 28.798 us/op 30.114 us/op 0.96
100 bytes - uncompress - snappyjs 1.0137 us/op 827.66 ns/op 1.22
100 bytes - uncompress - snappy 990.02 ns/op 1.2167 us/op 0.81
200 bytes - uncompress - snappyjs 1.3173 us/op 1.8655 us/op 0.71
200 bytes - uncompress - snappy 1.0237 us/op 1.3134 us/op 0.78
300 bytes - uncompress - snappyjs 1.3966 us/op 1.4360 us/op 0.97
300 bytes - uncompress - snappy 1.0886 us/op 1.4928 us/op 0.73
400 bytes - uncompress - snappyjs 1.5872 us/op 1.3743 us/op 1.15
400 bytes - uncompress - snappy 1.1442 us/op 1.6156 us/op 0.71
500 bytes - uncompress - snappyjs 2.0366 us/op 1.7311 us/op 1.18
500 bytes - uncompress - snappy 1.1483 us/op 1.4360 us/op 0.80
1000 bytes - uncompress - snappyjs 2.1678 us/op 2.1068 us/op 1.03
1000 bytes - uncompress - snappy 1.4782 us/op 1.9953 us/op 0.74
10000 bytes - uncompress - snappyjs 14.523 us/op 15.885 us/op 0.91
10000 bytes - uncompress - snappy 32.090 us/op 41.515 us/op 0.77
send data - 1000 256B messages 16.665 ms/op 21.267 ms/op 0.78
send data - 1000 512B messages 20.836 ms/op 25.882 ms/op 0.81
send data - 1000 1024B messages 29.463 ms/op 35.853 ms/op 0.82
send data - 1000 1200B messages 25.287 ms/op 37.510 ms/op 0.67
send data - 1000 2048B messages 26.695 ms/op 35.104 ms/op 0.76
send data - 1000 4096B messages 31.677 ms/op 38.208 ms/op 0.83
send data - 1000 16384B messages 47.113 ms/op 57.442 ms/op 0.82
send data - 1000 65536B messages 116.83 ms/op 156.44 ms/op 0.75
enrSubnets - fastDeserialize 64 bits 910.00 ns/op 1.0530 us/op 0.86
enrSubnets - ssz BitVector 64 bits 331.00 ns/op 373.00 ns/op 0.89
enrSubnets - fastDeserialize 4 bits 179.00 ns/op 135.00 ns/op 1.33
enrSubnets - ssz BitVector 4 bits 411.00 ns/op 368.00 ns/op 1.12
prioritizePeers score -10:0 att 32-0.1 sync 2-0 236.20 us/op 387.81 us/op 0.61
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 261.53 us/op 451.86 us/op 0.58
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 374.45 us/op 574.53 us/op 0.65
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 701.36 us/op 958.25 us/op 0.73
prioritizePeers score 0:0 att 64-1 sync 4-1 847.08 us/op 1.3402 ms/op 0.63
array of 16000 items push then shift 1.6342 us/op 1.8112 us/op 0.90
LinkedList of 16000 items push then shift 7.2880 ns/op 11.607 ns/op 0.63
array of 16000 items push then pop 75.321 ns/op 100.84 ns/op 0.75
LinkedList of 16000 items push then pop 7.3200 ns/op 9.9240 ns/op 0.74
array of 24000 items push then shift 2.4161 us/op 2.7383 us/op 0.88
LinkedList of 24000 items push then shift 7.1920 ns/op 12.766 ns/op 0.56
array of 24000 items push then pop 103.35 ns/op 146.98 ns/op 0.70
LinkedList of 24000 items push then pop 7.2310 ns/op 9.6460 ns/op 0.75
intersect bitArray bitLen 8 6.4200 ns/op 7.2150 ns/op 0.89
intersect array and set length 8 37.982 ns/op 45.994 ns/op 0.83
intersect bitArray bitLen 128 30.084 ns/op 33.652 ns/op 0.89
intersect array and set length 128 626.27 ns/op 700.68 ns/op 0.89
bitArray.getTrueBitIndexes() bitLen 128 1.0590 us/op 1.4750 us/op 0.72
bitArray.getTrueBitIndexes() bitLen 248 1.7850 us/op 2.5840 us/op 0.69
bitArray.getTrueBitIndexes() bitLen 512 3.6900 us/op 6.1570 us/op 0.60
Full columns - reconstruct all 6 blobs 72.347 us/op 168.28 us/op 0.43
Full columns - reconstruct half of the blobs out of 6 40.405 us/op 80.325 us/op 0.50
Full columns - reconstruct single blob out of 6 18.499 us/op 30.117 us/op 0.61
Half columns - reconstruct all 6 blobs 271.47 ms/op 337.79 ms/op 0.80
Half columns - reconstruct half of the blobs out of 6 140.28 ms/op 167.69 ms/op 0.84
Half columns - reconstruct single blob out of 6 52.977 ms/op 59.490 ms/op 0.89
Full columns - reconstruct all 10 blobs 110.02 us/op 340.65 us/op 0.32
Full columns - reconstruct half of the blobs out of 10 58.835 us/op 156.40 us/op 0.38
Full columns - reconstruct single blob out of 10 18.655 us/op 37.139 us/op 0.50
Half columns - reconstruct all 10 blobs 454.15 ms/op 531.27 ms/op 0.85
Half columns - reconstruct half of the blobs out of 10 229.57 ms/op 283.01 ms/op 0.81
Half columns - reconstruct single blob out of 10 51.148 ms/op 62.200 ms/op 0.82
Full columns - reconstruct all 20 blobs 211.17 us/op 1.1035 ms/op 0.19
Full columns - reconstruct half of the blobs out of 20 106.23 us/op 352.23 us/op 0.30
Full columns - reconstruct single blob out of 20 18.527 us/op 34.886 us/op 0.53
Half columns - reconstruct all 20 blobs 892.51 ms/op 1.0867 s/op 0.82
Half columns - reconstruct half of the blobs out of 20 450.54 ms/op 563.27 ms/op 0.80
Half columns - reconstruct single blob out of 20 50.744 ms/op 59.077 ms/op 0.86
Buffer.concat 32 items 625.00 ns/op 762.00 ns/op 0.82
Uint8Array.set 32 items 1.0170 us/op 2.3030 us/op 0.44
Buffer.copy 2.0200 us/op 3.1420 us/op 0.64
Uint8Array.set - with subarray 1.6180 us/op 3.0740 us/op 0.53
Uint8Array.set - without subarray 1.0110 us/op 1.6760 us/op 0.60
getUint32 - dataview 198.00 ns/op 212.00 ns/op 0.93
getUint32 - manual 128.00 ns/op 127.00 ns/op 1.01
Set add up to 64 items then delete first 2.2560 us/op 4.3758 us/op 0.52
OrderedSet add up to 64 items then delete first 3.3225 us/op 7.1362 us/op 0.47
Set add up to 64 items then delete last 2.5568 us/op 4.5868 us/op 0.56
OrderedSet add up to 64 items then delete last 3.6410 us/op 7.3214 us/op 0.50
Set add up to 64 items then delete middle 2.6078 us/op 2.6858 us/op 0.97
OrderedSet add up to 64 items then delete middle 5.4146 us/op 8.9729 us/op 0.60
Set add up to 128 items then delete first 5.2163 us/op 9.0970 us/op 0.57
OrderedSet add up to 128 items then delete first 8.1503 us/op 16.000 us/op 0.51
Set add up to 128 items then delete last 5.0790 us/op 9.7928 us/op 0.52
OrderedSet add up to 128 items then delete last 7.5941 us/op 16.541 us/op 0.46
Set add up to 128 items then delete middle 5.0467 us/op 8.8859 us/op 0.57
OrderedSet add up to 128 items then delete middle 14.246 us/op 22.261 us/op 0.64
Set add up to 256 items then delete first 11.857 us/op 19.154 us/op 0.62
OrderedSet add up to 256 items then delete first 16.569 us/op 31.960 us/op 0.52
Set add up to 256 items then delete last 10.096 us/op 18.188 us/op 0.56
OrderedSet add up to 256 items then delete last 16.942 us/op 30.690 us/op 0.55
Set add up to 256 items then delete middle 10.828 us/op 17.803 us/op 0.61
OrderedSet add up to 256 items then delete middle 45.986 us/op 61.018 us/op 0.75
transfer serialized Status (84 B) 2.3780 us/op 2.6850 us/op 0.89
copy serialized Status (84 B) 1.4100 us/op 1.5850 us/op 0.89
transfer serialized SignedVoluntaryExit (112 B) 2.4720 us/op 2.7270 us/op 0.91
copy serialized SignedVoluntaryExit (112 B) 1.4410 us/op 1.6620 us/op 0.87
transfer serialized ProposerSlashing (416 B) 3.5500 us/op 2.7230 us/op 1.30
copy serialized ProposerSlashing (416 B) 1.6150 us/op 2.5900 us/op 0.62
transfer serialized Attestation (485 B) 2.8200 us/op 3.1610 us/op 0.89
copy serialized Attestation (485 B) 1.4470 us/op 2.5650 us/op 0.56
transfer serialized AttesterSlashing (33232 B) 3.1020 us/op 4.3130 us/op 0.72
copy serialized AttesterSlashing (33232 B) 5.0390 us/op 7.5810 us/op 0.66
transfer serialized Small SignedBeaconBlock (128000 B) 3.5740 us/op 4.8420 us/op 0.74
copy serialized Small SignedBeaconBlock (128000 B) 16.165 us/op 24.400 us/op 0.66
transfer serialized Avg SignedBeaconBlock (200000 B) 5.8970 us/op 6.2150 us/op 0.95
copy serialized Avg SignedBeaconBlock (200000 B) 20.507 us/op 38.377 us/op 0.53
transfer serialized BlobsSidecar (524380 B) 5.4820 us/op 8.5520 us/op 0.64
copy serialized BlobsSidecar (524380 B) 65.191 us/op 124.63 us/op 0.52
transfer serialized Big SignedBeaconBlock (1000000 B) 6.6380 us/op 22.421 us/op 0.30
copy serialized Big SignedBeaconBlock (1000000 B) 133.17 us/op 199.67 us/op 0.67
pass gossip attestations to forkchoice per slot 2.8651 ms/op 3.2633 ms/op 0.88
forkChoice updateHead vc 100000 bc 64 eq 0 508.91 us/op 520.86 us/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 0 3.0375 ms/op 3.3625 ms/op 0.90
forkChoice updateHead vc 1000000 bc 64 eq 0 5.1027 ms/op 5.5277 ms/op 0.92
forkChoice updateHead vc 600000 bc 320 eq 0 3.0494 ms/op 4.9437 ms/op 0.62
forkChoice updateHead vc 600000 bc 1200 eq 0 3.1023 ms/op 3.4283 ms/op 0.90
forkChoice updateHead vc 600000 bc 7200 eq 0 3.6198 ms/op 3.9602 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 1000 3.0516 ms/op 3.2351 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 10000 3.1583 ms/op 3.3733 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 300000 10.405 ms/op 14.141 ms/op 0.74
computeDeltas 1400000 validators 0% inactive 14.498 ms/op 15.977 ms/op 0.91
computeDeltas 1400000 validators 10% inactive 13.520 ms/op 14.741 ms/op 0.92
computeDeltas 1400000 validators 20% inactive 12.251 ms/op 13.270 ms/op 0.92
computeDeltas 1400000 validators 50% inactive 9.2064 ms/op 9.9467 ms/op 0.93
computeDeltas 2100000 validators 0% inactive 21.844 ms/op 23.290 ms/op 0.94
computeDeltas 2100000 validators 10% inactive 20.412 ms/op 21.495 ms/op 0.95
computeDeltas 2100000 validators 20% inactive 18.415 ms/op 18.866 ms/op 0.98
computeDeltas 2100000 validators 50% inactive 13.937 ms/op 14.048 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei normalcase 2.4489 ms/op 2.1528 ms/op 1.14
altair processAttestation - 250000 vs - 7PWei worstcase 3.5324 ms/op 3.0822 ms/op 1.15
altair processAttestation - setStatus - 1/6 committees join 140.63 us/op 128.83 us/op 1.09
altair processAttestation - setStatus - 1/3 committees join 265.87 us/op 260.73 us/op 1.02
altair processAttestation - setStatus - 1/2 committees join 367.78 us/op 351.23 us/op 1.05
altair processAttestation - setStatus - 2/3 committees join 472.74 us/op 445.58 us/op 1.06
altair processAttestation - setStatus - 4/5 committees join 648.39 us/op 617.16 us/op 1.05
altair processAttestation - setStatus - 100% committees join 766.78 us/op 734.92 us/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase 5.1131 ms/op 5.9432 ms/op 0.86
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.049 ms/op 29.447 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase 41.972 ms/op 34.616 ms/op 1.21
altair processBlock - 250000 vs - 7PWei worstcase hashState 87.327 ms/op 83.613 ms/op 1.04
phase0 processBlock - 250000 vs - 7PWei normalcase 2.1540 ms/op 1.7313 ms/op 1.24
phase0 processBlock - 250000 vs - 7PWei worstcase 30.361 ms/op 23.011 ms/op 1.32
altair processEth1Data - 250000 vs - 7PWei normalcase 359.39 us/op 385.10 us/op 0.93
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.2220 us/op 5.9600 us/op 1.38
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 54.825 us/op 37.347 us/op 1.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 14.695 us/op 10.764 us/op 1.37
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.6370 us/op 6.4600 us/op 1.34
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 238.44 us/op 145.72 us/op 1.64
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.9112 ms/op 1.9349 ms/op 0.99
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.5224 ms/op 3.9096 ms/op 0.65
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.5502 ms/op 2.5110 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.8778 ms/op 6.3435 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5895 ms/op 2.5523 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.9697 ms/op 4.9461 ms/op 1.21
Tree 40 250000 create 507.58 ms/op 465.40 ms/op 1.09
Tree 40 250000 get(125000) 146.07 ns/op 137.98 ns/op 1.06
Tree 40 250000 set(125000) 1.8332 us/op 1.5163 us/op 1.21
Tree 40 250000 toArray() 22.386 ms/op 15.397 ms/op 1.45
Tree 40 250000 iterate all - toArray() + loop 22.382 ms/op 15.999 ms/op 1.40
Tree 40 250000 iterate all - get(i) 61.611 ms/op 51.247 ms/op 1.20
Array 250000 create 4.5569 ms/op 2.9425 ms/op 1.55
Array 250000 clone - spread 1.7602 ms/op 1.5403 ms/op 1.14
Array 250000 get(125000) 0.47000 ns/op 0.41100 ns/op 1.14
Array 250000 set(125000) 0.52400 ns/op 0.43000 ns/op 1.22
Array 250000 iterate all - loop 114.60 us/op 109.85 us/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 44.272 ms/op 41.841 ms/op 1.06
Array.fill - length 1000000 4.4826 ms/op 3.5742 ms/op 1.25
Array push - length 1000000 16.069 ms/op 13.645 ms/op 1.18
Array.get 0.29391 ns/op 0.28056 ns/op 1.05
Uint8Array.get 0.45854 ns/op 0.44168 ns/op 1.04
phase0 beforeProcessEpoch - 250000 vs - 7PWei 21.083 ms/op 16.140 ms/op 1.31
altair processEpoch - mainnet_e81889 320.02 ms/op 276.85 ms/op 1.16
mainnet_e81889 - altair beforeProcessEpoch 18.876 ms/op 18.205 ms/op 1.04
mainnet_e81889 - altair processJustificationAndFinalization 5.9920 us/op 5.5890 us/op 1.07
mainnet_e81889 - altair processInactivityUpdates 5.0040 ms/op 4.0919 ms/op 1.22
mainnet_e81889 - altair processRewardsAndPenalties 42.695 ms/op 39.635 ms/op 1.08
mainnet_e81889 - altair processRegistryUpdates 761.00 ns/op 732.00 ns/op 1.04
mainnet_e81889 - altair processSlashings 188.00 ns/op 178.00 ns/op 1.06
mainnet_e81889 - altair processEth1DataReset 188.00 ns/op 173.00 ns/op 1.09
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2678 ms/op 1.1990 ms/op 1.06
mainnet_e81889 - altair processSlashingsReset 1.0460 us/op 878.00 ns/op 1.19
mainnet_e81889 - altair processRandaoMixesReset 1.3390 us/op 1.1530 us/op 1.16
mainnet_e81889 - altair processHistoricalRootsUpdate 270.00 ns/op 176.00 ns/op 1.53
mainnet_e81889 - altair processParticipationFlagUpdates 722.00 ns/op 526.00 ns/op 1.37
mainnet_e81889 - altair processSyncCommitteeUpdates 152.00 ns/op 142.00 ns/op 1.07
mainnet_e81889 - altair afterProcessEpoch 47.019 ms/op 45.023 ms/op 1.04
capella processEpoch - mainnet_e217614 1.1449 s/op 930.24 ms/op 1.23
mainnet_e217614 - capella beforeProcessEpoch 67.454 ms/op 62.663 ms/op 1.08
mainnet_e217614 - capella processJustificationAndFinalization 5.8420 us/op 5.3480 us/op 1.09
mainnet_e217614 - capella processInactivityUpdates 15.913 ms/op 14.491 ms/op 1.10
mainnet_e217614 - capella processRewardsAndPenalties 197.99 ms/op 185.98 ms/op 1.06
mainnet_e217614 - capella processRegistryUpdates 7.4270 us/op 6.5130 us/op 1.14
mainnet_e217614 - capella processSlashings 195.00 ns/op 173.00 ns/op 1.13
mainnet_e217614 - capella processEth1DataReset 189.00 ns/op 172.00 ns/op 1.10
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.3226 ms/op 4.0836 ms/op 1.06
mainnet_e217614 - capella processSlashingsReset 1.0230 us/op 864.00 ns/op 1.18
mainnet_e217614 - capella processRandaoMixesReset 1.2600 us/op 1.1600 us/op 1.09
mainnet_e217614 - capella processHistoricalRootsUpdate 201.00 ns/op 174.00 ns/op 1.16
mainnet_e217614 - capella processParticipationFlagUpdates 638.00 ns/op 518.00 ns/op 1.23
mainnet_e217614 - capella afterProcessEpoch 120.86 ms/op 115.16 ms/op 1.05
phase0 processEpoch - mainnet_e58758 317.26 ms/op 292.31 ms/op 1.09
mainnet_e58758 - phase0 beforeProcessEpoch 88.751 ms/op 76.562 ms/op 1.16
mainnet_e58758 - phase0 processJustificationAndFinalization 6.8870 us/op 5.7660 us/op 1.19
mainnet_e58758 - phase0 processRewardsAndPenalties 39.505 ms/op 36.805 ms/op 1.07
mainnet_e58758 - phase0 processRegistryUpdates 3.5250 us/op 3.2070 us/op 1.10
mainnet_e58758 - phase0 processSlashings 189.00 ns/op 175.00 ns/op 1.08
mainnet_e58758 - phase0 processEth1DataReset 187.00 ns/op 174.00 ns/op 1.07
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3144 ms/op 1.1901 ms/op 1.10
mainnet_e58758 - phase0 processSlashingsReset 1.0780 us/op 921.00 ns/op 1.17
mainnet_e58758 - phase0 processRandaoMixesReset 1.2190 us/op 1.1970 us/op 1.02
mainnet_e58758 - phase0 processHistoricalRootsUpdate 186.00 ns/op 175.00 ns/op 1.06
mainnet_e58758 - phase0 processParticipationRecordUpdates 914.00 ns/op 858.00 ns/op 1.07
mainnet_e58758 - phase0 afterProcessEpoch 36.732 ms/op 35.488 ms/op 1.04
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6014 ms/op 1.3385 ms/op 1.20
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1884 ms/op 1.9552 ms/op 1.12
altair processInactivityUpdates - 250000 normalcase 18.950 ms/op 18.494 ms/op 1.02
altair processInactivityUpdates - 250000 worstcase 20.765 ms/op 18.007 ms/op 1.15
phase0 processRegistryUpdates - 250000 normalcase 5.4420 us/op 6.7050 us/op 0.81
phase0 processRegistryUpdates - 250000 badcase_full_deposits 11.868 ms/op 236.94 us/op 50.09
phase0 processRegistryUpdates - 250000 worstcase 0.5 112.15 ms/op 109.67 ms/op 1.02
altair processRewardsAndPenalties - 250000 normalcase 33.155 ms/op 28.052 ms/op 1.18
altair processRewardsAndPenalties - 250000 worstcase 27.122 ms/op 27.115 ms/op 1.00
phase0 getAttestationDeltas - 250000 normalcase 8.8651 ms/op 7.2430 ms/op 1.22
phase0 getAttestationDeltas - 250000 worstcase 6.2394 ms/op 15.095 ms/op 0.41
phase0 processSlashings - 250000 worstcase 94.438 us/op 81.821 us/op 1.15
altair processSyncCommitteeUpdates - 250000 12.111 ms/op 11.097 ms/op 1.09
BeaconState.hashTreeRoot - No change 239.00 ns/op 224.00 ns/op 1.07
BeaconState.hashTreeRoot - 1 full validator 89.376 us/op 79.487 us/op 1.12
BeaconState.hashTreeRoot - 32 full validator 1.1863 ms/op 1.5522 ms/op 0.76
BeaconState.hashTreeRoot - 512 full validator 12.794 ms/op 11.813 ms/op 1.08
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 105.35 us/op 95.235 us/op 1.11
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4290 ms/op 1.4758 ms/op 0.97
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.858 ms/op 24.815 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 72.076 us/op 75.277 us/op 0.96
BeaconState.hashTreeRoot - 32 balances 820.69 us/op 841.62 us/op 0.98
BeaconState.hashTreeRoot - 512 balances 9.0892 ms/op 8.5292 ms/op 1.07
BeaconState.hashTreeRoot - 250000 balances 162.11 ms/op 195.53 ms/op 0.83
aggregationBits - 2048 els - zipIndexesInBitList 22.132 us/op 22.270 us/op 0.99
byteArrayEquals 32 54.576 ns/op 56.130 ns/op 0.97
Buffer.compare 32 17.402 ns/op 17.264 ns/op 1.01
byteArrayEquals 1024 1.6163 us/op 1.5846 us/op 1.02
Buffer.compare 1024 24.889 ns/op 24.936 ns/op 1.00
byteArrayEquals 16384 25.816 us/op 25.342 us/op 1.02
Buffer.compare 16384 197.00 ns/op 208.73 ns/op 0.94
byteArrayEquals 123687377 191.42 ms/op 191.09 ms/op 1.00
Buffer.compare 123687377 6.1197 ms/op 7.7365 ms/op 0.79
byteArrayEquals 32 - diff last byte 52.311 ns/op 52.422 ns/op 1.00
Buffer.compare 32 - diff last byte 17.014 ns/op 17.135 ns/op 0.99
byteArrayEquals 1024 - diff last byte 1.5795 us/op 1.5889 us/op 0.99
Buffer.compare 1024 - diff last byte 26.326 ns/op 26.226 ns/op 1.00
byteArrayEquals 16384 - diff last byte 25.177 us/op 25.397 us/op 0.99
Buffer.compare 16384 - diff last byte 200.42 ns/op 203.35 ns/op 0.99
byteArrayEquals 123687377 - diff last byte 189.48 ms/op 194.43 ms/op 0.97
Buffer.compare 123687377 - diff last byte 6.1656 ms/op 7.7698 ms/op 0.79
byteArrayEquals 32 - random bytes 5.0920 ns/op 5.2760 ns/op 0.97
Buffer.compare 32 - random bytes 16.995 ns/op 17.845 ns/op 0.95
byteArrayEquals 1024 - random bytes 5.1000 ns/op 5.2810 ns/op 0.97
Buffer.compare 1024 - random bytes 17.031 ns/op 17.814 ns/op 0.96
byteArrayEquals 16384 - random bytes 5.0820 ns/op 5.6230 ns/op 0.90
Buffer.compare 16384 - random bytes 16.997 ns/op 17.801 ns/op 0.95
byteArrayEquals 123687377 - random bytes 6.2900 ns/op 6.4800 ns/op 0.97
Buffer.compare 123687377 - random bytes 18.210 ns/op 18.450 ns/op 0.99
regular array get 100000 times 32.132 us/op 38.286 us/op 0.84
wrappedArray get 100000 times 31.913 us/op 33.989 us/op 0.94
arrayWithProxy get 100000 times 12.338 ms/op 13.642 ms/op 0.90
ssz.Root.equals 44.953 ns/op 47.979 ns/op 0.94
byteArrayEquals 44.095 ns/op 46.881 ns/op 0.94
Buffer.compare 10.211 ns/op 10.727 ns/op 0.95
processSlot - 1 slots 10.436 us/op 11.159 us/op 0.94
processSlot - 32 slots 3.6554 ms/op 3.6316 ms/op 1.01
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.8628 ms/op 3.0949 ms/op 0.93
getCommitteeAssignments - req 1 vs - 250000 vc 2.1025 ms/op 2.1024 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 4.0793 ms/op 4.1098 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3504 ms/op 4.3719 ms/op 1.00
findModifiedValidators - 10000 modified validators 719.81 ms/op 796.09 ms/op 0.90
findModifiedValidators - 1000 modified validators 682.48 ms/op 735.30 ms/op 0.93
findModifiedValidators - 100 modified validators 266.35 ms/op 290.69 ms/op 0.92
findModifiedValidators - 10 modified validators 162.79 ms/op 233.26 ms/op 0.70
findModifiedValidators - 1 modified validators 135.03 ms/op 143.65 ms/op 0.94
findModifiedValidators - no difference 218.34 ms/op 196.31 ms/op 1.11
compare ViewDUs 6.1644 s/op 6.3635 s/op 0.97
compare each validator Uint8Array 2.1526 s/op 1.6205 s/op 1.33
compare ViewDU to Uint8Array 1.0018 s/op 1.2475 s/op 0.80
migrate state 1000000 validators, 24 modified, 0 new 932.28 ms/op 893.91 ms/op 1.04
migrate state 1000000 validators, 1700 modified, 1000 new 1.2209 s/op 1.4333 s/op 0.85
migrate state 1000000 validators, 3400 modified, 2000 new 1.4446 s/op 1.5174 s/op 0.95
migrate state 1500000 validators, 24 modified, 0 new 974.58 ms/op 1.1060 s/op 0.88
migrate state 1500000 validators, 1700 modified, 1000 new 1.2293 s/op 1.2443 s/op 0.99
migrate state 1500000 validators, 3400 modified, 2000 new 1.4542 s/op 1.3594 s/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1300 ns/op 4.4300 ns/op 0.93
state getBlockRootAtSlot - 250000 vs - 7PWei 956.79 ns/op 449.02 ns/op 2.13
naive computeProposerIndex 100000 validators 54.326 ms/op 57.816 ms/op 0.94
computeProposerIndex 100000 validators 1.4978 ms/op 1.6364 ms/op 0.92
naiveGetNextSyncCommitteeIndices 1000 validators 8.3795 s/op 8.5525 s/op 0.98
getNextSyncCommitteeIndices 1000 validators 117.59 ms/op 125.79 ms/op 0.93
naiveGetNextSyncCommitteeIndices 10000 validators 7.9655 s/op 7.9450 s/op 1.00
getNextSyncCommitteeIndices 10000 validators 117.13 ms/op 125.65 ms/op 0.93
naiveGetNextSyncCommitteeIndices 100000 validators 8.1845 s/op 8.8602 s/op 0.92
getNextSyncCommitteeIndices 100000 validators 118.07 ms/op 144.57 ms/op 0.82
naive computeShuffledIndex 100000 validators 27.937 s/op 27.673 s/op 1.01
cached computeShuffledIndex 100000 validators 553.79 ms/op 560.95 ms/op 0.99
naive computeShuffledIndex 2000000 validators 510.06 s/op 482.47 s/op 1.06
cached computeShuffledIndex 2000000 validators 30.810 s/op 35.022 s/op 0.88
computeProposers - vc 250000 637.04 us/op 635.73 us/op 1.00
computeEpochShuffling - vc 250000 42.238 ms/op 42.536 ms/op 0.99
getNextSyncCommittee - vc 250000 10.661 ms/op 10.733 ms/op 0.99
computeSigningRoot for AttestationData 20.787 us/op 21.736 us/op 0.96
hash AttestationData serialized data then Buffer.toString(base64) 1.5483 us/op 1.6191 us/op 0.96
toHexString serialized data 1.0880 us/op 1.3626 us/op 0.80
Buffer.toString(base64) 165.81 ns/op 157.25 ns/op 1.05
nodejs block root to RootHex using toHex 151.24 ns/op 165.31 ns/op 0.91
nodejs block root to RootHex using toRootHex 94.034 ns/op 87.553 ns/op 1.07
nodejs fromHex(blob) 104.10 us/op 118.67 us/op 0.88
nodejs fromHexInto(blob) 822.86 us/op 831.65 us/op 0.99
nodejs block root to RootHex using the deprecated toHexString 209.34 ns/op 214.98 ns/op 0.97
browser block root to RootHex using toHex 183.69 ns/op 177.66 ns/op 1.03
browser block root to RootHex using toRootHex 165.23 ns/op 170.50 ns/op 0.97
browser fromHex(blob) 780.95 us/op 801.79 us/op 0.97
browser fromHexInto(blob) 806.25 us/op 796.61 us/op 1.01
browser block root to RootHex using the deprecated toHexString 783.34 ns/op 1.0499 us/op 0.75

by benchmarkbot/action

github-actions[bot] avatar Dec 02 '25 02:12 github-actions[bot]

I redeployed gossipD=4, gossipDLow=3, gossipDHight=6 but gc was not any better, especially the MarkSweekCompact was even higher

Screenshot 2025-12-04 at 10 09 29

I can constraint beacon_attestation mesh peers, but it also caused fewer received messages on data_column_sidecar topic

Screenshot 2025-12-04 at 10 10 43

need to try again with nodejs 24 #8645

twoeths avatar Dec 04 '25 03:12 twoeths

closing this as it contains a lot of noises, we have some improvements recently, will open another PR instead

twoeths avatar Dec 12 '25 03:12 twoeths

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 52.04%. Comparing base (688d558) to head (2b47e87). :warning: Report is 7 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8638      +/-   ##
============================================
- Coverage     52.04%   52.04%   -0.01%     
============================================
  Files           848      848              
  Lines         65734    65727       -7     
  Branches       4807     4806       -1     
============================================
- Hits          34214    34208       -6     
+ Misses        31451    31450       -1     
  Partials         69       69              
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 12 '25 03:12 codecov[bot]

replaced by #8689

twoeths avatar Dec 12 '25 06:12 twoeths