Skip to content

Conversation

@nazarhussain
Copy link
Contributor

@nazarhussain nazarhussain commented Nov 3, 2025

Motivation

Update the vitest to avoid using third party test pool.

Description

  • Use latest vitest
  • Remove custom process pool which we developed to run our tests in Bun runtime
  • Migrate test configs to latest version
  • Update types
  • Switch to playwright from webdriverio for browser tests performance, which was due for long.

Steps to test or reproduce

  • Run all tests

Comment on lines 20 to 21
maxWorkers: 1,
isolate: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This combination will replace singleFork: true in from older version

if (process.env.TEST_COMPACT_OUTPUT) return ["basic", "hanging-process"];

return ["verbose", "hanging-process"];
return ["tree", "hanging-process"];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Newer verbose reporter print flat output, and tree replaces to old verbose formatter.

const isBun = "bun" in process.versions;

export function getReporters(): ViteUserConfig["test"]["reporters"] {
if (isBun) return [["default", {summary: false}]];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was hack to for older process pool, not needed now.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

⚠️ 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: 57df05d Previous: 983ef10 Ratio
toHexString serialized data 3.2576 us/op 914.54 ns/op 3.56
nodejs block root to RootHex using the deprecated toHexString 5.9697 us/op 184.35 ns/op 32.38
browser block root to RootHex using toHex 3.6931 us/op 149.54 ns/op 24.70
browser block root to RootHex using the deprecated toHexString 5.2780 us/op 498.88 ns/op 10.58
Full benchmark results
Benchmark suite Current: 57df05d Previous: 983ef10 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 990.55 us/op 784.53 us/op 1.26
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 40.339 us/op 30.842 us/op 1.31
BLS verify - blst 958.66 us/op 906.17 us/op 1.06
BLS verifyMultipleSignatures 3 - blst 1.3932 ms/op 1.3158 ms/op 1.06
BLS verifyMultipleSignatures 8 - blst 2.0411 ms/op 2.2527 ms/op 0.91
BLS verifyMultipleSignatures 32 - blst 6.0169 ms/op 4.4765 ms/op 1.34
BLS verifyMultipleSignatures 64 - blst 10.980 ms/op 8.3553 ms/op 1.31
BLS verifyMultipleSignatures 128 - blst 18.953 ms/op 15.873 ms/op 1.19
BLS deserializing 10000 signatures 731.54 ms/op 635.27 ms/op 1.15
BLS deserializing 100000 signatures 7.4826 s/op 6.6324 s/op 1.13
BLS verifyMultipleSignatures - same message - 3 - blst 1.0312 ms/op 824.19 us/op 1.25
BLS verifyMultipleSignatures - same message - 8 - blst 1.2835 ms/op 1.1139 ms/op 1.15
BLS verifyMultipleSignatures - same message - 32 - blst 1.9399 ms/op 1.7542 ms/op 1.11
BLS verifyMultipleSignatures - same message - 64 - blst 3.1888 ms/op 2.8471 ms/op 1.12
BLS verifyMultipleSignatures - same message - 128 - blst 5.2531 ms/op 4.6437 ms/op 1.13
BLS aggregatePubkeys 32 - blst 21.229 us/op 20.698 us/op 1.03
BLS aggregatePubkeys 128 - blst 76.194 us/op 63.539 us/op 1.20
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 59.157 ms/op 42.110 ms/op 1.40
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 60.089 ms/op 48.546 ms/op 1.24
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 46.083 ms/op 33.394 ms/op 1.38
getSlashingsAndExits - default max 94.748 us/op 50.425 us/op 1.88
getSlashingsAndExits - 2k 437.43 us/op 309.41 us/op 1.41
isKnown best case - 1 super set check 240.00 ns/op 425.00 ns/op 0.56
isKnown normal case - 2 super set checks 217.00 ns/op 416.00 ns/op 0.52
isKnown worse case - 16 super set checks 218.00 ns/op 425.00 ns/op 0.51
InMemoryCheckpointStateCache - add get delete 3.3230 us/op 2.8190 us/op 1.18
validate api signedAggregateAndProof - struct 1.5271 ms/op 1.6883 ms/op 0.90
validate gossip signedAggregateAndProof - struct 1.5372 ms/op 1.5099 ms/op 1.02
batch validate gossip attestation - vc 640000 - chunk 32 141.44 us/op 107.30 us/op 1.32
batch validate gossip attestation - vc 640000 - chunk 64 124.39 us/op 91.883 us/op 1.35
batch validate gossip attestation - vc 640000 - chunk 128 122.41 us/op 84.159 us/op 1.45
batch validate gossip attestation - vc 640000 - chunk 256 114.64 us/op 85.967 us/op 1.33
pickEth1Vote - no votes 1.0254 ms/op 800.36 us/op 1.28
pickEth1Vote - max votes 7.5882 ms/op 5.1930 ms/op 1.46
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.757 ms/op 8.9736 ms/op 1.76
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 33.161 ms/op 21.094 ms/op 1.57
pickEth1Vote - Eth1Data fastSerialize value x2048 488.61 us/op 323.55 us/op 1.51
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.2160 ms/op 2.5832 ms/op 1.24
bytes32 toHexString 397.00 ns/op 520.00 ns/op 0.76
bytes32 Buffer.toString(hex) 272.00 ns/op 403.00 ns/op 0.67
bytes32 Buffer.toString(hex) from Uint8Array 376.00 ns/op 473.00 ns/op 0.79
bytes32 Buffer.toString(hex) + 0x 273.00 ns/op 402.00 ns/op 0.68
Object access 1 prop 0.13500 ns/op 0.30100 ns/op 0.45
Map access 1 prop 0.14500 ns/op 0.30800 ns/op 0.47
Object get x1000 6.7750 ns/op 5.0130 ns/op 1.35
Map get x1000 6.7860 ns/op 5.8330 ns/op 1.16
Object set x1000 39.331 ns/op 18.722 ns/op 2.10
Map set x1000 24.568 ns/op 16.405 ns/op 1.50
Return object 10000 times 0.32780 ns/op 0.29610 ns/op 1.11
Throw Error 10000 times 4.8817 us/op 3.4613 us/op 1.41
toHex 141.83 ns/op 107.60 ns/op 1.32
Buffer.from 126.46 ns/op 88.279 ns/op 1.43
shared Buffer 93.127 ns/op 62.338 ns/op 1.49
fastMsgIdFn sha256 / 200 bytes 2.4110 us/op 1.9770 us/op 1.22
fastMsgIdFn h32 xxhash / 200 bytes 240.00 ns/op 376.00 ns/op 0.64
fastMsgIdFn h64 xxhash / 200 bytes 305.00 ns/op 829.00 ns/op 0.37
fastMsgIdFn sha256 / 1000 bytes 7.7140 us/op 8.0270 us/op 0.96
fastMsgIdFn h32 xxhash / 1000 bytes 350.00 ns/op 691.00 ns/op 0.51
fastMsgIdFn h64 xxhash / 1000 bytes 380.00 ns/op 787.00 ns/op 0.48
fastMsgIdFn sha256 / 10000 bytes 71.631 us/op 47.861 us/op 1.50
fastMsgIdFn h32 xxhash / 10000 bytes 2.0220 us/op 2.3410 us/op 0.86
fastMsgIdFn h64 xxhash / 10000 bytes 1.2770 us/op 1.6530 us/op 0.77
100 bytes - compress - snappyjs 1.4748 us/op 1.5596 us/op 0.95
100 bytes - compress - snappy 1.1148 us/op 963.63 ns/op 1.16
100 bytes - compress - #snappy 1.4847 us/op 1.6006 us/op 0.93
200 bytes - compress - snappyjs 1.9944 us/op 1.7983 us/op 1.11
200 bytes - compress - snappy 1.2469 us/op 977.32 ns/op 1.28
200 bytes - compress - #snappy 2.0824 us/op 1.9005 us/op 1.10
300 bytes - compress - snappyjs 2.7679 us/op 2.3685 us/op 1.17
300 bytes - compress - snappy 1.2632 us/op 989.70 ns/op 1.28
300 bytes - compress - #snappy 2.8200 us/op 2.2701 us/op 1.24
400 bytes - compress - snappyjs 3.0652 us/op 2.6242 us/op 1.17
400 bytes - compress - snappy 1.3253 us/op 997.60 ns/op 1.33
400 bytes - compress - #snappy 3.0267 us/op 2.0883 us/op 1.45
500 bytes - compress - snappyjs 2.9463 us/op 2.3871 us/op 1.23
500 bytes - compress - snappy 1.4848 us/op 1.0782 us/op 1.38
500 bytes - compress - #snappy 2.8278 us/op 2.3655 us/op 1.20
1000 bytes - compress - snappyjs 5.0948 us/op 3.6480 us/op 1.40
1000 bytes - compress - snappy 1.8680 us/op 1.3800 us/op 1.35
1000 bytes - compress - #snappy 4.7879 us/op 3.6287 us/op 1.32
10000 bytes - compress - snappyjs 33.575 us/op 24.815 us/op 1.35
10000 bytes - compress - snappy 34.511 us/op 22.300 us/op 1.55
10000 bytes - compress - #snappy 33.431 us/op 24.182 us/op 1.38
100 bytes - uncompress - snappyjs 1.2389 us/op 637.15 ns/op 1.94
100 bytes - uncompress - snappy 1.0636 us/op 786.98 ns/op 1.35
100 bytes - uncompress - #snappy 1.3169 us/op 551.39 ns/op 2.39
200 bytes - uncompress - snappyjs 1.2474 us/op 1.3370 us/op 0.93
200 bytes - uncompress - snappy 1.3349 us/op 844.25 ns/op 1.58
200 bytes - uncompress - #snappy 1.5592 us/op 1.4138 us/op 1.10
300 bytes - uncompress - snappyjs 1.5708 us/op 1.9097 us/op 0.82
300 bytes - uncompress - snappy 1.1137 us/op 837.94 ns/op 1.33
300 bytes - uncompress - #snappy 1.5030 us/op 1.4747 us/op 1.02
400 bytes - uncompress - snappyjs 1.4208 us/op 2.1608 us/op 0.66
400 bytes - uncompress - snappy 1.1676 us/op 910.55 ns/op 1.28
400 bytes - uncompress - #snappy 1.5255 us/op 1.4682 us/op 1.04
500 bytes - uncompress - snappyjs 1.7597 us/op 1.4887 us/op 1.18
500 bytes - uncompress - snappy 1.3351 us/op 947.59 ns/op 1.41
500 bytes - uncompress - #snappy 1.5412 us/op 1.6877 us/op 0.91
1000 bytes - uncompress - snappyjs 2.7783 us/op 2.0539 us/op 1.35
1000 bytes - uncompress - snappy 1.5214 us/op 1.2322 us/op 1.23
1000 bytes - uncompress - #snappy 1.9534 us/op 1.9317 us/op 1.01
10000 bytes - uncompress - snappyjs 14.999 us/op 11.274 us/op 1.33
10000 bytes - uncompress - snappy 30.819 us/op 34.700 us/op 0.89
10000 bytes - uncompress - #snappy 13.877 us/op 11.721 us/op 1.18
send data - 1000 256B messages 15.923 ms/op 11.910 ms/op 1.34
send data - 1000 512B messages 19.627 ms/op 16.760 ms/op 1.17
send data - 1000 1024B messages 28.517 ms/op 22.726 ms/op 1.25
send data - 1000 1200B messages 29.302 ms/op 20.251 ms/op 1.45
send data - 1000 2048B messages 30.778 ms/op 22.180 ms/op 1.39
send data - 1000 4096B messages 35.112 ms/op 23.551 ms/op 1.49
send data - 1000 16384B messages 51.064 ms/op 27.133 ms/op 1.88
send data - 1000 65536B messages 119.17 ms/op 64.929 ms/op 1.84
enrSubnets - fastDeserialize 64 bits 914.00 ns/op 947.00 ns/op 0.97
enrSubnets - ssz BitVector 64 bits 330.00 ns/op 469.00 ns/op 0.70
enrSubnets - fastDeserialize 4 bits 136.00 ns/op 324.00 ns/op 0.42
enrSubnets - ssz BitVector 4 bits 352.00 ns/op 501.00 ns/op 0.70
prioritizePeers score -10:0 att 32-0.1 sync 2-0 236.36 us/op 194.49 us/op 1.22
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 261.29 us/op 225.24 us/op 1.16
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 381.50 us/op 370.54 us/op 1.03
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 715.32 us/op 647.39 us/op 1.10
prioritizePeers score 0:0 att 64-1 sync 4-1 883.83 us/op 776.27 us/op 1.14
array of 16000 items push then shift 1.6515 us/op 1.2840 us/op 1.29
LinkedList of 16000 items push then shift 7.4430 ns/op 6.3540 ns/op 1.17
array of 16000 items push then pop 81.426 ns/op 60.900 ns/op 1.34
LinkedList of 16000 items push then pop 7.9930 ns/op 6.2450 ns/op 1.28
array of 24000 items push then shift 2.3814 us/op 1.9850 us/op 1.20
LinkedList of 24000 items push then shift 8.0540 ns/op 6.3630 ns/op 1.27
array of 24000 items push then pop 110.66 ns/op 85.407 ns/op 1.30
LinkedList of 24000 items push then pop 7.2590 ns/op 6.2810 ns/op 1.16
intersect bitArray bitLen 8 6.5330 ns/op 5.4210 ns/op 1.21
intersect array and set length 8 40.145 ns/op 32.462 ns/op 1.24
intersect bitArray bitLen 128 30.992 ns/op 26.762 ns/op 1.16
intersect array and set length 128 647.21 ns/op 542.99 ns/op 1.19
bitArray.getTrueBitIndexes() bitLen 128 1.0040 us/op 1.1180 us/op 0.90
bitArray.getTrueBitIndexes() bitLen 248 1.7740 us/op 1.7700 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 512 3.6490 us/op 3.2500 us/op 1.12
Full columns - reconstruct all 6 blobs 80.494 us/op 46.300 us/op 1.74
Full columns - reconstruct half of the blobs out of 6 40.724 us/op 25.948 us/op 1.57
Full columns - reconstruct single blob out of 6 17.893 us/op 12.336 us/op 1.45
Half columns - reconstruct all 6 blobs 286.65 ms/op 234.26 ms/op 1.22
Half columns - reconstruct half of the blobs out of 6 153.14 ms/op 117.94 ms/op 1.30
Half columns - reconstruct single blob out of 6 56.578 ms/op 44.331 ms/op 1.28
Full columns - reconstruct all 10 blobs 140.21 us/op 63.149 us/op 2.22
Full columns - reconstruct half of the blobs out of 10 76.225 us/op 35.335 us/op 2.16
Full columns - reconstruct single blob out of 10 21.440 us/op 12.233 us/op 1.75
Half columns - reconstruct all 10 blobs 477.11 ms/op 386.71 ms/op 1.23
Half columns - reconstruct half of the blobs out of 10 240.31 ms/op 201.65 ms/op 1.19
Half columns - reconstruct single blob out of 10 53.238 ms/op 45.168 ms/op 1.18
Full columns - reconstruct all 20 blobs 295.34 us/op 143.27 us/op 2.06
Full columns - reconstruct half of the blobs out of 20 149.40 us/op 66.822 us/op 2.24
Full columns - reconstruct single blob out of 20 21.485 us/op 11.962 us/op 1.80
Half columns - reconstruct all 20 blobs 956.43 ms/op 781.41 ms/op 1.22
Half columns - reconstruct half of the blobs out of 20 481.30 ms/op 396.04 ms/op 1.22
Half columns - reconstruct single blob out of 20 52.813 ms/op 44.902 ms/op 1.18
Buffer.concat 32 items 751.00 ns/op 774.00 ns/op 0.97
Uint8Array.set 32 items 1.2420 us/op 1.0630 us/op 1.17
Buffer.copy 2.1940 us/op 2.0260 us/op 1.08
Uint8Array.set - with subarray 1.8470 us/op 1.6310 us/op 1.13
Uint8Array.set - without subarray 1.0590 us/op 1.0800 us/op 0.98
getUint32 - dataview 210.00 ns/op 367.00 ns/op 0.57
getUint32 - manual 126.00 ns/op 294.00 ns/op 0.43
Set add up to 64 items then delete first 2.6777 us/op 1.6622 us/op 1.61
OrderedSet add up to 64 items then delete first 3.7025 us/op 2.8077 us/op 1.32
Set add up to 64 items then delete last 2.7990 us/op 1.8203 us/op 1.54
OrderedSet add up to 64 items then delete last 4.1737 us/op 3.0709 us/op 1.36
Set add up to 64 items then delete middle 2.9602 us/op 1.8991 us/op 1.56
OrderedSet add up to 64 items then delete middle 5.4202 us/op 4.6211 us/op 1.17
Set add up to 128 items then delete first 5.5103 us/op 4.0026 us/op 1.38
OrderedSet add up to 128 items then delete first 8.2386 us/op 6.5047 us/op 1.27
Set add up to 128 items then delete last 5.3190 us/op 3.8668 us/op 1.38
OrderedSet add up to 128 items then delete last 8.2297 us/op 6.1171 us/op 1.35
Set add up to 128 items then delete middle 5.4052 us/op 3.8766 us/op 1.39
OrderedSet add up to 128 items then delete middle 15.346 us/op 12.270 us/op 1.25
Set add up to 256 items then delete first 11.389 us/op 7.8841 us/op 1.44
OrderedSet add up to 256 items then delete first 18.110 us/op 12.036 us/op 1.50
Set add up to 256 items then delete last 11.642 us/op 7.3838 us/op 1.58
OrderedSet add up to 256 items then delete last 15.907 us/op 11.281 us/op 1.41
Set add up to 256 items then delete middle 11.517 us/op 7.6056 us/op 1.51
OrderedSet add up to 256 items then delete middle 46.605 us/op 35.599 us/op 1.31
transfer serialized Status (84 B) 2.3580 us/op 2.0440 us/op 1.15
copy serialized Status (84 B) 1.2920 us/op 1.2660 us/op 1.02
transfer serialized SignedVoluntaryExit (112 B) 2.3350 us/op 2.0990 us/op 1.11
copy serialized SignedVoluntaryExit (112 B) 1.3040 us/op 1.2810 us/op 1.02
transfer serialized ProposerSlashing (416 B) 3.5140 us/op 2.5200 us/op 1.39
copy serialized ProposerSlashing (416 B) 2.3190 us/op 1.7420 us/op 1.33
transfer serialized Attestation (485 B) 3.3330 us/op 2.2740 us/op 1.47
copy serialized Attestation (485 B) 2.6060 us/op 1.5430 us/op 1.69
transfer serialized AttesterSlashing (33232 B) 2.6080 us/op 2.2790 us/op 1.14
copy serialized AttesterSlashing (33232 B) 5.4250 us/op 3.9840 us/op 1.36
transfer serialized Small SignedBeaconBlock (128000 B) 4.5220 us/op 2.4380 us/op 1.85
copy serialized Small SignedBeaconBlock (128000 B) 16.464 us/op 8.4110 us/op 1.96
transfer serialized Avg SignedBeaconBlock (200000 B) 5.4750 us/op 4.3070 us/op 1.27
copy serialized Avg SignedBeaconBlock (200000 B) 20.803 us/op 10.977 us/op 1.90
transfer serialized BlobsSidecar (524380 B) 5.2710 us/op 5.3450 us/op 0.99
copy serialized BlobsSidecar (524380 B) 125.09 us/op 88.788 us/op 1.41
transfer serialized Big SignedBeaconBlock (1000000 B) 7.4470 us/op 5.3640 us/op 1.39
copy serialized Big SignedBeaconBlock (1000000 B) 126.05 us/op 108.71 us/op 1.16
pass gossip attestations to forkchoice per slot 2.8810 ms/op 2.3931 ms/op 1.20
forkChoice updateHead vc 100000 bc 64 eq 0 489.30 us/op 415.33 us/op 1.18
forkChoice updateHead vc 600000 bc 64 eq 0 2.9359 ms/op 2.4911 ms/op 1.18
forkChoice updateHead vc 1000000 bc 64 eq 0 4.8872 ms/op 4.1794 ms/op 1.17
forkChoice updateHead vc 600000 bc 320 eq 0 2.9677 ms/op 2.4890 ms/op 1.19
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0016 ms/op 2.3584 ms/op 1.27
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3662 ms/op 2.7391 ms/op 1.23
forkChoice updateHead vc 600000 bc 64 eq 1000 2.9025 ms/op 2.7255 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 10000 3.0722 ms/op 2.7186 ms/op 1.13
forkChoice updateHead vc 600000 bc 64 eq 300000 9.4764 ms/op 7.1185 ms/op 1.33
computeDeltas 1400000 validators 0% inactive 14.014 ms/op 11.771 ms/op 1.19
computeDeltas 1400000 validators 10% inactive 12.943 ms/op 11.296 ms/op 1.15
computeDeltas 1400000 validators 20% inactive 11.955 ms/op 9.5460 ms/op 1.25
computeDeltas 1400000 validators 50% inactive 9.0930 ms/op 6.9232 ms/op 1.31
computeDeltas 2100000 validators 0% inactive 21.288 ms/op 16.020 ms/op 1.33
computeDeltas 2100000 validators 10% inactive 19.620 ms/op 14.979 ms/op 1.31
computeDeltas 2100000 validators 20% inactive 17.836 ms/op 14.333 ms/op 1.24
computeDeltas 2100000 validators 50% inactive 13.552 ms/op 10.958 ms/op 1.24
altair processAttestation - 250000 vs - 7PWei normalcase 2.0976 ms/op 1.6624 ms/op 1.26
altair processAttestation - 250000 vs - 7PWei worstcase 3.0336 ms/op 2.5206 ms/op 1.20
altair processAttestation - setStatus - 1/6 committees join 136.22 us/op 94.893 us/op 1.44
altair processAttestation - setStatus - 1/3 committees join 242.82 us/op 182.96 us/op 1.33
altair processAttestation - setStatus - 1/2 committees join 369.01 us/op 295.00 us/op 1.25
altair processAttestation - setStatus - 2/3 committees join 443.33 us/op 360.11 us/op 1.23
altair processAttestation - setStatus - 4/5 committees join 611.61 us/op 497.08 us/op 1.23
altair processAttestation - setStatus - 100% committees join 714.40 us/op 587.86 us/op 1.22
altair processBlock - 250000 vs - 7PWei normalcase 4.7292 ms/op 3.4912 ms/op 1.35
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.914 ms/op 26.316 ms/op 1.17
altair processBlock - 250000 vs - 7PWei worstcase 39.375 ms/op 36.507 ms/op 1.08
altair processBlock - 250000 vs - 7PWei worstcase hashState 89.631 ms/op 83.071 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8780 ms/op 1.6912 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei worstcase 31.778 ms/op 22.596 ms/op 1.41
altair processEth1Data - 250000 vs - 7PWei normalcase 337.75 us/op 256.42 us/op 1.32
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.2680 us/op 5.2080 us/op 1.59
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 54.070 us/op 32.815 us/op 1.65
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 16.375 us/op 12.115 us/op 1.35
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.9240 us/op 6.9090 us/op 0.86
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 240.47 us/op 148.74 us/op 1.62
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.9312 ms/op 1.3617 ms/op 1.42
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.5014 ms/op 1.6350 ms/op 1.53
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.4222 ms/op 1.6774 ms/op 1.44
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.6917 ms/op 3.6714 ms/op 1.28
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5343 ms/op 1.8530 ms/op 1.37
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.7556 ms/op 3.2845 ms/op 1.45
Tree 40 250000 create 429.40 ms/op 329.95 ms/op 1.30
Tree 40 250000 get(125000) 140.33 ns/op 107.78 ns/op 1.30
Tree 40 250000 set(125000) 1.4319 us/op 1.1893 us/op 1.20
Tree 40 250000 toArray() 15.540 ms/op 9.5400 ms/op 1.63
Tree 40 250000 iterate all - toArray() + loop 15.606 ms/op 9.4948 ms/op 1.64
Tree 40 250000 iterate all - get(i) 49.906 ms/op 40.667 ms/op 1.23
Array 250000 create 2.9310 ms/op 2.3046 ms/op 1.27
Array 250000 clone - spread 811.09 us/op 626.86 us/op 1.29
Array 250000 get(125000) 0.41200 ns/op 0.56300 ns/op 0.73
Array 250000 set(125000) 0.43700 ns/op 0.58400 ns/op 0.75
Array 250000 iterate all - loop 106.26 us/op 76.887 us/op 1.38
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.897 ms/op 37.983 ms/op 1.13
Array.fill - length 1000000 3.4140 ms/op 2.3804 ms/op 1.43
Array push - length 1000000 12.943 ms/op 9.8893 ms/op 1.31
Array.get 0.26570 ns/op 0.24619 ns/op 1.08
Uint8Array.get 0.42762 ns/op 0.31500 ns/op 1.36
phase0 beforeProcessEpoch - 250000 vs - 7PWei 18.385 ms/op 12.687 ms/op 1.45
altair processEpoch - mainnet_e81889 292.24 ms/op 271.50 ms/op 1.08
mainnet_e81889 - altair beforeProcessEpoch 18.157 ms/op 14.982 ms/op 1.21
mainnet_e81889 - altair processJustificationAndFinalization 9.4160 us/op 4.5180 us/op 2.08
mainnet_e81889 - altair processInactivityUpdates 4.1681 ms/op 3.1548 ms/op 1.32
mainnet_e81889 - altair processRewardsAndPenalties 49.321 ms/op 42.799 ms/op 1.15
mainnet_e81889 - altair processRegistryUpdates 927.00 ns/op 789.00 ns/op 1.17
mainnet_e81889 - altair processSlashings 186.00 ns/op 395.00 ns/op 0.47
mainnet_e81889 - altair processEth1DataReset 181.00 ns/op 394.00 ns/op 0.46
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2126 ms/op 902.08 us/op 1.34
mainnet_e81889 - altair processSlashingsReset 1.1040 us/op 990.00 ns/op 1.12
mainnet_e81889 - altair processRandaoMixesReset 1.3720 us/op 1.1490 us/op 1.19
mainnet_e81889 - altair processHistoricalRootsUpdate 195.00 ns/op 373.00 ns/op 0.52
mainnet_e81889 - altair processParticipationFlagUpdates 536.00 ns/op 648.00 ns/op 0.83
mainnet_e81889 - altair processSyncCommitteeUpdates 150.00 ns/op 334.00 ns/op 0.45
mainnet_e81889 - altair afterProcessEpoch 46.734 ms/op 39.984 ms/op 1.17
capella processEpoch - mainnet_e217614 946.05 ms/op 897.64 ms/op 1.05
mainnet_e217614 - capella beforeProcessEpoch 67.970 ms/op 56.318 ms/op 1.21
mainnet_e217614 - capella processJustificationAndFinalization 5.9970 us/op 4.3850 us/op 1.37
mainnet_e217614 - capella processInactivityUpdates 15.952 ms/op 11.545 ms/op 1.38
mainnet_e217614 - capella processRewardsAndPenalties 187.43 ms/op 190.09 ms/op 0.99
mainnet_e217614 - capella processRegistryUpdates 7.8030 us/op 5.3000 us/op 1.47
mainnet_e217614 - capella processSlashings 195.00 ns/op 394.00 ns/op 0.49
mainnet_e217614 - capella processEth1DataReset 193.00 ns/op 390.00 ns/op 0.49
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.2874 ms/op 3.1142 ms/op 1.38
mainnet_e217614 - capella processSlashingsReset 1.0110 us/op 1.0680 us/op 0.95
mainnet_e217614 - capella processRandaoMixesReset 1.2900 us/op 1.2240 us/op 1.05
mainnet_e217614 - capella processHistoricalRootsUpdate 211.00 ns/op 399.00 ns/op 0.53
mainnet_e217614 - capella processParticipationFlagUpdates 551.00 ns/op 669.00 ns/op 0.82
mainnet_e217614 - capella afterProcessEpoch 121.20 ms/op 109.79 ms/op 1.10
phase0 processEpoch - mainnet_e58758 297.02 ms/op 279.41 ms/op 1.06
mainnet_e58758 - phase0 beforeProcessEpoch 81.369 ms/op 68.912 ms/op 1.18
mainnet_e58758 - phase0 processJustificationAndFinalization 6.7940 us/op 4.6360 us/op 1.47
mainnet_e58758 - phase0 processRewardsAndPenalties 36.709 ms/op 37.425 ms/op 0.98
mainnet_e58758 - phase0 processRegistryUpdates 3.2420 us/op 2.6600 us/op 1.22
mainnet_e58758 - phase0 processSlashings 207.00 ns/op 378.00 ns/op 0.55
mainnet_e58758 - phase0 processEth1DataReset 181.00 ns/op 392.00 ns/op 0.46
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.4066 ms/op 969.79 us/op 1.45
mainnet_e58758 - phase0 processSlashingsReset 1.0290 us/op 943.00 ns/op 1.09
mainnet_e58758 - phase0 processRandaoMixesReset 1.3340 us/op 1.4710 us/op 0.91
mainnet_e58758 - phase0 processHistoricalRootsUpdate 184.00 ns/op 394.00 ns/op 0.47
mainnet_e58758 - phase0 processParticipationRecordUpdates 913.00 ns/op 1.1470 us/op 0.80
mainnet_e58758 - phase0 afterProcessEpoch 35.872 ms/op 42.939 ms/op 0.84
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3913 ms/op 870.89 us/op 1.60
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.8711 ms/op 1.4338 ms/op 2.00
altair processInactivityUpdates - 250000 normalcase 20.750 ms/op 13.920 ms/op 1.49
altair processInactivityUpdates - 250000 worstcase 19.610 ms/op 15.880 ms/op 1.23
phase0 processRegistryUpdates - 250000 normalcase 6.8740 us/op 3.0940 us/op 2.22
phase0 processRegistryUpdates - 250000 badcase_full_deposits 311.67 us/op 285.96 us/op 1.09
phase0 processRegistryUpdates - 250000 worstcase 0.5 120.39 ms/op 96.831 ms/op 1.24
altair processRewardsAndPenalties - 250000 normalcase 25.709 ms/op 26.314 ms/op 0.98
altair processRewardsAndPenalties - 250000 worstcase 33.162 ms/op 25.177 ms/op 1.32
phase0 getAttestationDeltas - 250000 normalcase 7.4268 ms/op 5.2009 ms/op 1.43
phase0 getAttestationDeltas - 250000 worstcase 6.1510 ms/op 5.0238 ms/op 1.22
phase0 processSlashings - 250000 worstcase 81.559 us/op 81.458 us/op 1.00
altair processSyncCommitteeUpdates - 250000 11.112 ms/op 9.8594 ms/op 1.13
BeaconState.hashTreeRoot - No change 249.00 ns/op 425.00 ns/op 0.59
BeaconState.hashTreeRoot - 1 full validator 91.978 us/op 84.529 us/op 1.09
BeaconState.hashTreeRoot - 32 full validator 890.65 us/op 974.58 us/op 0.91
BeaconState.hashTreeRoot - 512 full validator 9.2771 ms/op 11.234 ms/op 0.83
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 93.024 us/op 101.37 us/op 0.92
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5977 ms/op 2.5860 ms/op 0.62
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.788 ms/op 30.589 ms/op 0.61
BeaconState.hashTreeRoot - 1 balances 91.490 us/op 80.044 us/op 1.14
BeaconState.hashTreeRoot - 32 balances 705.14 us/op 799.13 us/op 0.88
BeaconState.hashTreeRoot - 512 balances 7.2809 ms/op 6.2657 ms/op 1.16
BeaconState.hashTreeRoot - 250000 balances 163.09 ms/op 153.80 ms/op 1.06
aggregationBits - 2048 els - zipIndexesInBitList 23.611 us/op 16.806 us/op 1.40
byteArrayEquals 32 55.514 ns/op 48.164 ns/op 1.15
Buffer.compare 32 18.342 ns/op 15.503 ns/op 1.18
byteArrayEquals 1024 1.6102 us/op 1.2724 us/op 1.27
Buffer.compare 1024 26.401 ns/op 24.484 ns/op 1.08
byteArrayEquals 16384 25.608 us/op 20.276 us/op 1.26
Buffer.compare 16384 195.42 ns/op 172.88 ns/op 1.13
byteArrayEquals 123687377 198.63 ms/op 138.10 ms/op 1.44
Buffer.compare 123687377 8.1041 ms/op 5.2576 ms/op 1.54
byteArrayEquals 32 - diff last byte 54.352 ns/op 43.215 ns/op 1.26
Buffer.compare 32 - diff last byte 17.798 ns/op 14.480 ns/op 1.23
byteArrayEquals 1024 - diff last byte 1.6193 us/op 1.1532 us/op 1.40
Buffer.compare 1024 - diff last byte 26.819 ns/op 22.037 ns/op 1.22
byteArrayEquals 16384 - diff last byte 26.439 us/op 18.565 us/op 1.42
Buffer.compare 16384 - diff last byte 215.40 ns/op 154.71 ns/op 1.39
byteArrayEquals 123687377 - diff last byte 197.50 ms/op 139.35 ms/op 1.42
Buffer.compare 123687377 - diff last byte 7.6218 ms/op 4.8638 ms/op 1.57
byteArrayEquals 32 - random bytes 5.2570 ns/op 4.6650 ns/op 1.13
Buffer.compare 32 - random bytes 17.611 ns/op 14.811 ns/op 1.19
byteArrayEquals 1024 - random bytes 5.2710 ns/op 4.6310 ns/op 1.14
Buffer.compare 1024 - random bytes 17.602 ns/op 15.358 ns/op 1.15
byteArrayEquals 16384 - random bytes 5.3490 ns/op 4.9510 ns/op 1.08
Buffer.compare 16384 - random bytes 17.658 ns/op 15.695 ns/op 1.13
byteArrayEquals 123687377 - random bytes 6.5600 ns/op 7.5700 ns/op 0.87
Buffer.compare 123687377 - random bytes 21.200 ns/op 17.980 ns/op 1.18
regular array get 100000 times 34.004 us/op 31.123 us/op 1.09
wrappedArray get 100000 times 34.076 us/op 31.127 us/op 1.09
arrayWithProxy get 100000 times 13.173 ms/op 10.249 ms/op 1.29
ssz.Root.equals 47.493 ns/op 39.966 ns/op 1.19
byteArrayEquals 46.902 ns/op 41.016 ns/op 1.14
Buffer.compare 10.717 ns/op 8.4550 ns/op 1.27
processSlot - 1 slots 11.615 us/op 10.343 us/op 1.12
processSlot - 32 slots 2.3972 ms/op 2.5914 ms/op 0.93
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.1275 ms/op 2.0158 ms/op 1.55
getCommitteeAssignments - req 1 vs - 250000 vc 2.1744 ms/op 1.7298 ms/op 1.26
getCommitteeAssignments - req 100 vs - 250000 vc 4.2091 ms/op 3.3822 ms/op 1.24
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4851 ms/op 3.5951 ms/op 1.25
findModifiedValidators - 10000 modified validators 754.11 ms/op 749.15 ms/op 1.01
findModifiedValidators - 1000 modified validators 734.40 ms/op 659.46 ms/op 1.11
findModifiedValidators - 100 modified validators 277.23 ms/op 190.87 ms/op 1.45
findModifiedValidators - 10 modified validators 177.58 ms/op 118.42 ms/op 1.50
findModifiedValidators - 1 modified validators 295.48 ms/op 132.25 ms/op 2.23
findModifiedValidators - no difference 223.55 ms/op 164.91 ms/op 1.36
compare ViewDUs 6.9979 s/op 6.0472 s/op 1.16
compare each validator Uint8Array 1.8191 s/op 1.1546 s/op 1.58
compare ViewDU to Uint8Array 1.6309 s/op 781.98 ms/op 2.09
migrate state 1000000 validators, 24 modified, 0 new 1.0171 s/op 821.94 ms/op 1.24
migrate state 1000000 validators, 1700 modified, 1000 new 1.3047 s/op 1.1055 s/op 1.18
migrate state 1000000 validators, 3400 modified, 2000 new 1.4330 s/op 1.2082 s/op 1.19
migrate state 1500000 validators, 24 modified, 0 new 976.48 ms/op 867.36 ms/op 1.13
migrate state 1500000 validators, 1700 modified, 1000 new 1.2071 s/op 1.0508 s/op 1.15
migrate state 1500000 validators, 3400 modified, 2000 new 1.4399 s/op 1.3596 s/op 1.06
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.9500 ns/op 5.8500 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 585.63 ns/op 508.81 ns/op 1.15
naive computeProposerIndex 100000 validators 54.152 ms/op 45.089 ms/op 1.20
computeProposerIndex 100000 validators 1.6103 ms/op 1.2379 ms/op 1.30
naiveGetNextSyncCommitteeIndices 1000 validators 10.625 s/op 6.3343 s/op 1.68
getNextSyncCommitteeIndices 1000 validators 147.07 ms/op 101.12 ms/op 1.45
naiveGetNextSyncCommitteeIndices 10000 validators 10.712 s/op 6.4290 s/op 1.67
getNextSyncCommitteeIndices 10000 validators 143.67 ms/op 95.035 ms/op 1.51
naiveGetNextSyncCommitteeIndices 100000 validators 9.7234 s/op 5.9841 s/op 1.62
getNextSyncCommitteeIndices 100000 validators 124.87 ms/op 97.576 ms/op 1.28
naive computeShuffledIndex 100000 validators 31.082 s/op 18.858 s/op 1.65
cached computeShuffledIndex 100000 validators 655.07 ms/op 458.03 ms/op 1.43
naive computeShuffledIndex 2000000 validators 507.21 s/op 412.39 s/op 1.23
cached computeShuffledIndex 2000000 validators 53.314 s/op 23.157 s/op 2.30
computeProposers - vc 250000 668.05 us/op 515.57 us/op 1.30
computeEpochShuffling - vc 250000 47.143 ms/op 37.188 ms/op 1.27
getNextSyncCommittee - vc 250000 11.833 ms/op 9.2607 ms/op 1.28
computeSigningRoot for AttestationData 28.908 us/op 16.878 us/op 1.71
hash AttestationData serialized data then Buffer.toString(base64) 1.8824 us/op 1.1251 us/op 1.67
toHexString serialized data 3.2576 us/op 914.54 ns/op 3.56
Buffer.toString(base64) 207.01 ns/op 106.94 ns/op 1.94
nodejs block root to RootHex using toHex 183.62 ns/op 114.50 ns/op 1.60
nodejs block root to RootHex using toRootHex 148.73 ns/op 71.060 ns/op 2.09
nodejs fromHex(blob) 169.98 us/op 87.521 us/op 1.94
nodejs fromHexInto(blob) 1.0224 ms/op 708.56 us/op 1.44
nodejs block root to RootHex using the deprecated toHexString 5.9697 us/op 184.35 ns/op 32.38
browser block root to RootHex using toHex 3.6931 us/op 149.54 ns/op 24.70
browser block root to RootHex using toRootHex 343.01 ns/op 142.76 ns/op 2.40
browser fromHex(blob) 1.0396 ms/op 670.99 us/op 1.55
browser fromHexInto(blob) 1.1083 ms/op 704.73 us/op 1.57
browser block root to RootHex using the deprecated toHexString 5.2780 us/op 498.88 ns/op 10.58

by benchmarkbot/action

@nazarhussain nazarhussain marked this pull request as ready for review November 4, 2025 19:18
@nazarhussain nazarhussain requested a review from a team as a code owner November 4, 2025 19:18
.tool-versions Outdated
Comment on lines 1 to 2
nodejs 22.13.0
zig 0.14.1
Copy link
Member

Choose a reason for hiding this comment

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

did you mean to commit this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh I sometimes forget to skip that file in repos under ChainSafe.

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

generally lgtm

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.

3 participants