Skip to content

Conversation

@nazarhussain
Copy link
Contributor

@nazarhussain nazarhussain commented Apr 29, 2025

Motivation

Make our tests more stable on CI.

Description

Fix following flaky tests

Partially Closes #6358

Steps to test or reproduce

  • Run all tests on CI

@nazarhussain nazarhussain self-assigned this Apr 29, 2025
@codecov
Copy link

codecov bot commented Apr 29, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 56.07%. Comparing base (0f6a8b1) to head (c742959).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7762   +/-   ##
=========================================
  Coverage     56.07%   56.07%           
=========================================
  Files           823      823           
  Lines         58017    58017           
  Branches       4465     4465           
=========================================
  Hits          32531    32531           
  Misses        25418    25418           
  Partials         68       68           
🚀 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 Apr 29, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 20b7115 Previous: 0f6a8b1 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0054 ms/op 1.0288 ms/op 0.98
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.021 us/op 38.713 us/op 1.01
BLS verify - blst 1.0226 ms/op 748.76 us/op 1.37
BLS verifyMultipleSignatures 3 - blst 1.4303 ms/op 1.1947 ms/op 1.20
BLS verifyMultipleSignatures 8 - blst 1.8298 ms/op 1.6715 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst 5.0173 ms/op 5.1476 ms/op 0.97
BLS verifyMultipleSignatures 64 - blst 9.3097 ms/op 9.0685 ms/op 1.03
BLS verifyMultipleSignatures 128 - blst 18.741 ms/op 17.493 ms/op 1.07
BLS deserializing 10000 signatures 715.64 ms/op 707.86 ms/op 1.01
BLS deserializing 100000 signatures 6.9315 s/op 7.0417 s/op 0.98
BLS verifyMultipleSignatures - same message - 3 - blst 966.18 us/op 922.22 us/op 1.05
BLS verifyMultipleSignatures - same message - 8 - blst 1.0848 ms/op 1.0065 ms/op 1.08
BLS verifyMultipleSignatures - same message - 32 - blst 1.7436 ms/op 1.7084 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst 2.6001 ms/op 2.5859 ms/op 1.01
BLS verifyMultipleSignatures - same message - 128 - blst 4.4511 ms/op 4.3711 ms/op 1.02
BLS aggregatePubkeys 32 - blst 19.465 us/op 19.667 us/op 0.99
BLS aggregatePubkeys 128 - blst 90.618 us/op 70.396 us/op 1.29
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 52.992 ms/op 49.880 ms/op 1.06
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 51.276 ms/op 48.342 ms/op 1.06
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 37.545 ms/op 34.006 ms/op 1.10
getSlashingsAndExits - default max 73.459 us/op 70.581 us/op 1.04
getSlashingsAndExits - 2k 305.31 us/op 331.96 us/op 0.92
proposeBlockBody type=full, size=empty 5.4549 ms/op 5.4559 ms/op 1.00
isKnown best case - 1 super set check 207.00 ns/op 212.00 ns/op 0.98
isKnown normal case - 2 super set checks 202.00 ns/op 212.00 ns/op 0.95
isKnown worse case - 16 super set checks 201.00 ns/op 211.00 ns/op 0.95
InMemoryCheckpointStateCache - add get delete 2.4130 us/op 2.4350 us/op 0.99
validate api signedAggregateAndProof - struct 1.3696 ms/op 1.3941 ms/op 0.98
validate gossip signedAggregateAndProof - struct 1.3617 ms/op 1.3613 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 116.93 us/op 116.26 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 102.43 us/op 104.81 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 128 95.044 us/op 97.361 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 256 101.87 us/op 101.51 us/op 1.00
pickEth1Vote - no votes 1.0060 ms/op 984.43 us/op 1.02
pickEth1Vote - max votes 6.8028 ms/op 6.1615 ms/op 1.10
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.782 ms/op 13.028 ms/op 0.98
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.014 ms/op 21.648 ms/op 0.88
pickEth1Vote - Eth1Data fastSerialize value x2048 475.67 us/op 472.87 us/op 1.01
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.1206 ms/op 3.7614 ms/op 1.10
bytes32 toHexString 366.00 ns/op 366.00 ns/op 1.00
bytes32 Buffer.toString(hex) 257.00 ns/op 256.00 ns/op 1.00
bytes32 Buffer.toString(hex) from Uint8Array 342.00 ns/op 346.00 ns/op 0.99
bytes32 Buffer.toString(hex) + 0x 262.00 ns/op 253.00 ns/op 1.04
Object access 1 prop 0.12500 ns/op 0.12500 ns/op 1.00
Map access 1 prop 0.13300 ns/op 0.13200 ns/op 1.01
Object get x1000 6.1690 ns/op 6.0710 ns/op 1.02
Map get x1000 6.4920 ns/op 6.2830 ns/op 1.03
Object set x1000 31.009 ns/op 29.276 ns/op 1.06
Map set x1000 21.340 ns/op 20.249 ns/op 1.05
Return object 10000 times 0.29080 ns/op 0.29110 ns/op 1.00
Throw Error 10000 times 4.4839 us/op 4.3275 us/op 1.04
toHex 146.19 ns/op 141.11 ns/op 1.04
Buffer.from 127.16 ns/op 131.94 ns/op 0.96
shared Buffer 88.665 ns/op 90.863 ns/op 0.98
fastMsgIdFn sha256 / 200 bytes 2.2690 us/op 2.1990 us/op 1.03
fastMsgIdFn h32 xxhash / 200 bytes 201.00 ns/op 219.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 200 bytes 264.00 ns/op 276.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 7.4620 us/op 7.3390 us/op 1.02
fastMsgIdFn h32 xxhash / 1000 bytes 334.00 ns/op 352.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 1000 bytes 336.00 ns/op 356.00 ns/op 0.94
fastMsgIdFn sha256 / 10000 bytes 64.749 us/op 64.096 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.8480 us/op 1.8560 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.2310 us/op 1.2510 us/op 0.98
send data - 1000 256B messages 14.273 ms/op 11.270 ms/op 1.27
send data - 1000 512B messages 17.839 ms/op 17.400 ms/op 1.03
send data - 1000 1024B messages 29.109 ms/op 25.331 ms/op 1.15
send data - 1000 1200B messages 22.332 ms/op 21.051 ms/op 1.06
send data - 1000 2048B messages 23.725 ms/op 20.627 ms/op 1.15
send data - 1000 4096B messages 32.261 ms/op 25.517 ms/op 1.26
send data - 1000 16384B messages 63.760 ms/op 68.979 ms/op 0.92
send data - 1000 65536B messages 245.04 ms/op 233.80 ms/op 1.05
enrSubnets - fastDeserialize 64 bits 941.00 ns/op 908.00 ns/op 1.04
enrSubnets - ssz BitVector 64 bits 330.00 ns/op 336.00 ns/op 0.98
enrSubnets - fastDeserialize 4 bits 135.00 ns/op 138.00 ns/op 0.98
enrSubnets - ssz BitVector 4 bits 331.00 ns/op 333.00 ns/op 0.99
prioritizePeers score -10:0 att 32-0.1 sync 2-0 123.83 us/op 122.28 us/op 1.01
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 149.06 us/op 145.98 us/op 1.02
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 208.47 us/op 210.23 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 403.64 us/op 391.71 us/op 1.03
prioritizePeers score 0:0 att 64-1 sync 4-1 469.77 us/op 473.69 us/op 0.99
array of 16000 items push then shift 1.6415 us/op 1.6306 us/op 1.01
LinkedList of 16000 items push then shift 9.0840 ns/op 7.4750 ns/op 1.22
array of 16000 items push then pop 85.317 ns/op 78.666 ns/op 1.08
LinkedList of 16000 items push then pop 7.8470 ns/op 7.2050 ns/op 1.09
array of 24000 items push then shift 2.4885 us/op 2.3943 us/op 1.04
LinkedList of 24000 items push then shift 7.7790 ns/op 7.4990 ns/op 1.04
array of 24000 items push then pop 110.87 ns/op 103.17 ns/op 1.07
LinkedList of 24000 items push then pop 7.4050 ns/op 7.6690 ns/op 0.97
intersect bitArray bitLen 8 6.5350 ns/op 6.5280 ns/op 1.00
intersect array and set length 8 39.143 ns/op 38.907 ns/op 1.01
intersect bitArray bitLen 128 30.113 ns/op 29.471 ns/op 1.02
intersect array and set length 128 637.37 ns/op 622.13 ns/op 1.02
bitArray.getTrueBitIndexes() bitLen 128 1.0810 us/op 1.0270 us/op 1.05
bitArray.getTrueBitIndexes() bitLen 248 1.8370 us/op 1.7900 us/op 1.03
bitArray.getTrueBitIndexes() bitLen 512 3.8700 us/op 3.7150 us/op 1.04
Buffer.concat 32 items 637.00 ns/op 635.00 ns/op 1.00
Uint8Array.set 32 items 1.1960 us/op 1.8350 us/op 0.65
Buffer.copy 2.6430 us/op 2.2220 us/op 1.19
Uint8Array.set - with subarray 2.3430 us/op 2.2750 us/op 1.03
Uint8Array.set - without subarray 1.6910 us/op 1.5170 us/op 1.11
getUint32 - dataview 197.00 ns/op 213.00 ns/op 0.92
getUint32 - manual 130.00 ns/op 135.00 ns/op 0.96
Set add up to 64 items then delete first 2.0873 us/op 2.3205 us/op 0.90
OrderedSet add up to 64 items then delete first 4.1561 us/op 3.5920 us/op 1.16
Set add up to 64 items then delete last 3.3433 us/op 2.5067 us/op 1.33
OrderedSet add up to 64 items then delete last 5.2156 us/op 4.1793 us/op 1.25
Set add up to 64 items then delete middle 3.5726 us/op 2.4616 us/op 1.45
OrderedSet add up to 64 items then delete middle 6.6314 us/op 6.4953 us/op 1.02
Set add up to 128 items then delete first 6.0213 us/op 6.5363 us/op 0.92
OrderedSet add up to 128 items then delete first 9.6291 us/op 8.9752 us/op 1.07
Set add up to 128 items then delete last 6.6770 us/op 6.2470 us/op 1.07
OrderedSet add up to 128 items then delete last 10.650 us/op 10.090 us/op 1.06
Set add up to 128 items then delete middle 6.5101 us/op 6.2678 us/op 1.04
OrderedSet add up to 128 items then delete middle 15.797 us/op 17.244 us/op 0.92
Set add up to 256 items then delete first 11.513 us/op 12.597 us/op 0.91
OrderedSet add up to 256 items then delete first 18.184 us/op 20.870 us/op 0.87
Set add up to 256 items then delete last 13.124 us/op 12.853 us/op 1.02
OrderedSet add up to 256 items then delete last 21.263 us/op 19.077 us/op 1.11
Set add up to 256 items then delete middle 13.807 us/op 12.702 us/op 1.09
OrderedSet add up to 256 items then delete middle 47.890 us/op 45.417 us/op 1.05
transfer serialized Status (84 B) 2.6400 us/op 2.3670 us/op 1.12
copy serialized Status (84 B) 1.4220 us/op 1.2700 us/op 1.12
transfer serialized SignedVoluntaryExit (112 B) 2.6130 us/op 2.3700 us/op 1.10
copy serialized SignedVoluntaryExit (112 B) 1.4360 us/op 2.7210 us/op 0.53
transfer serialized ProposerSlashing (416 B) 3.2520 us/op 2.6460 us/op 1.23
copy serialized ProposerSlashing (416 B) 1.4980 us/op 1.6970 us/op 0.88
transfer serialized Attestation (485 B) 2.4050 us/op 2.4690 us/op 0.97
copy serialized Attestation (485 B) 1.6130 us/op 1.8600 us/op 0.87
transfer serialized AttesterSlashing (33232 B) 2.5990 us/op 2.8110 us/op 0.92
copy serialized AttesterSlashing (33232 B) 4.4630 us/op 5.4140 us/op 0.82
transfer serialized Small SignedBeaconBlock (128000 B) 3.1680 us/op 5.0410 us/op 0.63
copy serialized Small SignedBeaconBlock (128000 B) 12.382 us/op 15.934 us/op 0.78
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5930 us/op 4.2150 us/op 0.85
copy serialized Avg SignedBeaconBlock (200000 B) 21.256 us/op 28.390 us/op 0.75
transfer serialized BlobsSidecar (524380 B) 4.6100 us/op 5.9600 us/op 0.77
copy serialized BlobsSidecar (524380 B) 85.704 us/op 115.81 us/op 0.74
transfer serialized Big SignedBeaconBlock (1000000 B) 4.9530 us/op 5.7410 us/op 0.86
copy serialized Big SignedBeaconBlock (1000000 B) 351.49 us/op 139.75 us/op 2.52
pass gossip attestations to forkchoice per slot 2.8294 ms/op 2.8248 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 458.21 us/op 472.49 us/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 0 2.9849 ms/op 4.3011 ms/op 0.69
forkChoice updateHead vc 1000000 bc 64 eq 0 5.2693 ms/op 5.8332 ms/op 0.90
forkChoice updateHead vc 600000 bc 320 eq 0 3.1334 ms/op 3.8115 ms/op 0.82
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9819 ms/op 4.2559 ms/op 0.70
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3342 ms/op 3.3636 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 1000 10.818 ms/op 10.769 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 11.026 ms/op 10.685 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 300000 15.506 ms/op 14.170 ms/op 1.09
computeDeltas 500000 validators 300 proto nodes 4.0271 ms/op 4.4096 ms/op 0.91
computeDeltas 500000 validators 1200 proto nodes 3.9771 ms/op 4.2949 ms/op 0.93
computeDeltas 500000 validators 7200 proto nodes 3.9879 ms/op 4.6284 ms/op 0.86
computeDeltas 750000 validators 300 proto nodes 5.8885 ms/op 7.0537 ms/op 0.83
computeDeltas 750000 validators 1200 proto nodes 5.9150 ms/op 6.7747 ms/op 0.87
computeDeltas 750000 validators 7200 proto nodes 6.1291 ms/op 6.0833 ms/op 1.01
computeDeltas 1400000 validators 300 proto nodes 11.433 ms/op 11.143 ms/op 1.03
computeDeltas 1400000 validators 1200 proto nodes 12.154 ms/op 10.991 ms/op 1.11
computeDeltas 1400000 validators 7200 proto nodes 11.318 ms/op 10.858 ms/op 1.04
computeDeltas 2100000 validators 300 proto nodes 16.998 ms/op 16.341 ms/op 1.04
computeDeltas 2100000 validators 1200 proto nodes 17.103 ms/op 16.459 ms/op 1.04
computeDeltas 2100000 validators 7200 proto nodes 17.600 ms/op 16.409 ms/op 1.07
altair processAttestation - 250000 vs - 7PWei normalcase 2.1575 ms/op 3.0936 ms/op 0.70
altair processAttestation - 250000 vs - 7PWei worstcase 4.4910 ms/op 3.1174 ms/op 1.44
altair processAttestation - setStatus - 1/6 committees join 171.05 us/op 116.75 us/op 1.47
altair processAttestation - setStatus - 1/3 committees join 361.35 us/op 230.31 us/op 1.57
altair processAttestation - setStatus - 1/2 committees join 419.87 us/op 318.22 us/op 1.32
altair processAttestation - setStatus - 2/3 committees join 531.26 us/op 412.68 us/op 1.29
altair processAttestation - setStatus - 4/5 committees join 768.14 us/op 583.72 us/op 1.32
altair processAttestation - setStatus - 100% committees join 804.68 us/op 668.26 us/op 1.20
altair processBlock - 250000 vs - 7PWei normalcase 5.2636 ms/op 4.6195 ms/op 1.14
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.203 ms/op 31.345 ms/op 1.22
altair processBlock - 250000 vs - 7PWei worstcase 39.387 ms/op 40.703 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase hashState 82.773 ms/op 83.628 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6846 ms/op 1.5995 ms/op 1.05
phase0 processBlock - 250000 vs - 7PWei worstcase 24.162 ms/op 21.560 ms/op 1.12
altair processEth1Data - 250000 vs - 7PWei normalcase 343.22 us/op 350.37 us/op 0.98
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 10.349 us/op 5.8840 us/op 1.76
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 52.735 us/op 40.740 us/op 1.29
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.748 us/op 10.716 us/op 1.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.5740 us/op 6.6310 us/op 1.29
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 180.12 us/op 180.18 us/op 1.00
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.9227 ms/op 1.9136 ms/op 1.00
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.4380 ms/op 2.4491 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.5974 ms/op 2.5166 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.4050 ms/op 4.7280 ms/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.7154 ms/op 2.4420 ms/op 1.11
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.4158 ms/op 4.6524 ms/op 1.16
Tree 40 250000 create 636.20 ms/op 425.66 ms/op 1.49
Tree 40 250000 get(125000) 144.54 ns/op 144.49 ns/op 1.00
Tree 40 250000 set(125000) 2.8733 us/op 1.4633 us/op 1.96
Tree 40 250000 toArray() 22.387 ms/op 20.064 ms/op 1.12
Tree 40 250000 iterate all - toArray() + loop 22.623 ms/op 20.351 ms/op 1.11
Tree 40 250000 iterate all - get(i) 62.642 ms/op 54.244 ms/op 1.15
Array 250000 create 3.8546 ms/op 2.5205 ms/op 1.53
Array 250000 clone - spread 1.7293 ms/op 836.82 us/op 2.07
Array 250000 get(125000) 0.41400 ns/op 0.42200 ns/op 0.98
Array 250000 set(125000) 0.43600 ns/op 0.44400 ns/op 0.98
Array 250000 iterate all - loop 83.704 us/op 83.158 us/op 1.01
phase0 afterProcessEpoch - 250000 vs - 7PWei 43.800 ms/op 42.720 ms/op 1.03
Array.fill - length 1000000 8.8859 ms/op 3.7353 ms/op 2.38
Array push - length 1000000 19.331 ms/op 14.529 ms/op 1.33
Array.get 0.27781 ns/op 0.28487 ns/op 0.98
Uint8Array.get 0.57093 ns/op 0.44067 ns/op 1.30
phase0 beforeProcessEpoch - 250000 vs - 7PWei 20.300 ms/op 18.014 ms/op 1.13
altair processEpoch - mainnet_e81889 327.75 ms/op 266.85 ms/op 1.23
mainnet_e81889 - altair beforeProcessEpoch 20.270 ms/op 23.581 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 5.8120 us/op 5.5450 us/op 1.05
mainnet_e81889 - altair processInactivityUpdates 6.3546 ms/op 5.0758 ms/op 1.25
mainnet_e81889 - altair processRewardsAndPenalties 44.095 ms/op 41.358 ms/op 1.07
mainnet_e81889 - altair processRegistryUpdates 773.00 ns/op 778.00 ns/op 0.99
mainnet_e81889 - altair processSlashings 200.00 ns/op 212.00 ns/op 0.94
mainnet_e81889 - altair processEth1DataReset 199.00 ns/op 279.00 ns/op 0.71
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4202 ms/op 1.3469 ms/op 1.05
mainnet_e81889 - altair processSlashingsReset 889.00 ns/op 954.00 ns/op 0.93
mainnet_e81889 - altair processRandaoMixesReset 1.1470 us/op 1.4340 us/op 0.80
mainnet_e81889 - altair processHistoricalRootsUpdate 192.00 ns/op 228.00 ns/op 0.84
mainnet_e81889 - altair processParticipationFlagUpdates 532.00 ns/op 583.00 ns/op 0.91
mainnet_e81889 - altair processSyncCommitteeUpdates 151.00 ns/op 166.00 ns/op 0.91
mainnet_e81889 - altair afterProcessEpoch 45.726 ms/op 46.816 ms/op 0.98
capella processEpoch - mainnet_e217614 947.60 ms/op 1.0817 s/op 0.88
mainnet_e217614 - capella beforeProcessEpoch 61.468 ms/op 67.280 ms/op 0.91
mainnet_e217614 - capella processJustificationAndFinalization 5.2950 us/op 5.4580 us/op 0.97
mainnet_e217614 - capella processInactivityUpdates 15.752 ms/op 15.432 ms/op 1.02
mainnet_e217614 - capella processRewardsAndPenalties 182.98 ms/op 188.47 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 6.5970 us/op 6.8440 us/op 0.96
mainnet_e217614 - capella processSlashings 193.00 ns/op 200.00 ns/op 0.96
mainnet_e217614 - capella processEth1DataReset 191.00 ns/op 198.00 ns/op 0.96
mainnet_e217614 - capella processEffectiveBalanceUpdates 6.4664 ms/op 4.3638 ms/op 1.48
mainnet_e217614 - capella processSlashingsReset 889.00 ns/op 930.00 ns/op 0.96
mainnet_e217614 - capella processRandaoMixesReset 1.1310 us/op 1.1920 us/op 0.95
mainnet_e217614 - capella processHistoricalRootsUpdate 191.00 ns/op 197.00 ns/op 0.97
mainnet_e217614 - capella processParticipationFlagUpdates 528.00 ns/op 595.00 ns/op 0.89
mainnet_e217614 - capella afterProcessEpoch 116.28 ms/op 119.35 ms/op 0.97
phase0 processEpoch - mainnet_e58758 303.04 ms/op 355.16 ms/op 0.85
mainnet_e58758 - phase0 beforeProcessEpoch 75.991 ms/op 85.029 ms/op 0.89
mainnet_e58758 - phase0 processJustificationAndFinalization 5.7900 us/op 6.0830 us/op 0.95
mainnet_e58758 - phase0 processRewardsAndPenalties 36.792 ms/op 36.188 ms/op 1.02
mainnet_e58758 - phase0 processRegistryUpdates 4.0830 us/op 3.2410 us/op 1.26
mainnet_e58758 - phase0 processSlashings 242.00 ns/op 279.00 ns/op 0.87
mainnet_e58758 - phase0 processEth1DataReset 216.00 ns/op 200.00 ns/op 1.08
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3752 ms/op 1.3729 ms/op 1.00
mainnet_e58758 - phase0 processSlashingsReset 1.0470 us/op 1.0480 us/op 1.00
mainnet_e58758 - phase0 processRandaoMixesReset 1.2210 us/op 1.1790 us/op 1.04
mainnet_e58758 - phase0 processHistoricalRootsUpdate 192.00 ns/op 203.00 ns/op 0.95
mainnet_e58758 - phase0 processParticipationRecordUpdates 917.00 ns/op 928.00 ns/op 0.99
mainnet_e58758 - phase0 afterProcessEpoch 36.827 ms/op 37.205 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3491 ms/op 1.3913 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.2401 ms/op 2.0634 ms/op 1.09
altair processInactivityUpdates - 250000 normalcase 19.562 ms/op 20.134 ms/op 0.97
altair processInactivityUpdates - 250000 worstcase 22.602 ms/op 23.960 ms/op 0.94
phase0 processRegistryUpdates - 250000 normalcase 10.768 us/op 11.831 us/op 0.91
phase0 processRegistryUpdates - 250000 badcase_full_deposits 294.71 us/op 427.91 us/op 0.69
phase0 processRegistryUpdates - 250000 worstcase 0.5 100.69 ms/op 141.00 ms/op 0.71
altair processRewardsAndPenalties - 250000 normalcase 25.690 ms/op 29.788 ms/op 0.86
altair processRewardsAndPenalties - 250000 worstcase 29.604 ms/op 27.352 ms/op 1.08
phase0 getAttestationDeltas - 250000 normalcase 6.2093 ms/op 8.9986 ms/op 0.69
phase0 getAttestationDeltas - 250000 worstcase 6.2715 ms/op 8.1615 ms/op 0.77
phase0 processSlashings - 250000 worstcase 108.56 us/op 110.44 us/op 0.98
altair processSyncCommitteeUpdates - 250000 12.948 ms/op 13.910 ms/op 0.93
BeaconState.hashTreeRoot - No change 249.00 ns/op 309.00 ns/op 0.81
BeaconState.hashTreeRoot - 1 full validator 97.378 us/op 105.80 us/op 0.92
BeaconState.hashTreeRoot - 32 full validator 1.2153 ms/op 1.2975 ms/op 0.94
BeaconState.hashTreeRoot - 512 full validator 10.973 ms/op 16.050 ms/op 0.68
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 104.03 us/op 134.03 us/op 0.78
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4098 ms/op 2.7438 ms/op 0.51
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 22.849 ms/op 27.436 ms/op 0.83
BeaconState.hashTreeRoot - 1 balances 73.178 us/op 94.544 us/op 0.77
BeaconState.hashTreeRoot - 32 balances 762.68 us/op 1.3843 ms/op 0.55
BeaconState.hashTreeRoot - 512 balances 8.8584 ms/op 11.550 ms/op 0.77
BeaconState.hashTreeRoot - 250000 balances 197.38 ms/op 229.31 ms/op 0.86
aggregationBits - 2048 els - zipIndexesInBitList 23.482 us/op 24.199 us/op 0.97
byteArrayEquals 32 54.950 ns/op 56.455 ns/op 0.97
Buffer.compare 32 17.733 ns/op 17.840 ns/op 0.99
byteArrayEquals 1024 1.6147 us/op 1.6696 us/op 0.97
Buffer.compare 1024 24.935 ns/op 26.363 ns/op 0.95
byteArrayEquals 16384 25.768 us/op 28.379 us/op 0.91
Buffer.compare 16384 192.80 ns/op 209.90 ns/op 0.92
byteArrayEquals 123687377 197.49 ms/op 201.36 ms/op 0.98
Buffer.compare 123687377 9.4525 ms/op 8.5888 ms/op 1.10
byteArrayEquals 32 - diff last byte 69.941 ns/op 53.866 ns/op 1.30
Buffer.compare 32 - diff last byte 17.819 ns/op 17.737 ns/op 1.00
byteArrayEquals 1024 - diff last byte 1.6623 us/op 1.6419 us/op 1.01
Buffer.compare 1024 - diff last byte 35.350 ns/op 26.038 ns/op 1.36
byteArrayEquals 16384 - diff last byte 26.929 us/op 27.087 us/op 0.99
Buffer.compare 16384 - diff last byte 206.43 ns/op 196.53 ns/op 1.05
byteArrayEquals 123687377 - diff last byte 196.97 ms/op 201.65 ms/op 0.98
Buffer.compare 123687377 - diff last byte 7.8944 ms/op 12.990 ms/op 0.61
byteArrayEquals 32 - random bytes 5.0970 ns/op 5.2680 ns/op 0.97
Buffer.compare 32 - random bytes 17.246 ns/op 18.357 ns/op 0.94
byteArrayEquals 1024 - random bytes 5.1380 ns/op 5.2550 ns/op 0.98
Buffer.compare 1024 - random bytes 17.605 ns/op 17.584 ns/op 1.00
byteArrayEquals 16384 - random bytes 5.2300 ns/op 5.3770 ns/op 0.97
Buffer.compare 16384 - random bytes 17.704 ns/op 18.086 ns/op 0.98
byteArrayEquals 123687377 - random bytes 6.5200 ns/op 6.6300 ns/op 0.98
Buffer.compare 123687377 - random bytes 18.670 ns/op 19.070 ns/op 0.98
regular array get 100000 times 33.365 us/op 45.371 us/op 0.74
wrappedArray get 100000 times 33.426 us/op 45.589 us/op 0.73
arrayWithProxy get 100000 times 12.098 ms/op 12.196 ms/op 0.99
ssz.Root.equals 46.652 ns/op 47.864 ns/op 0.97
byteArrayEquals 45.758 ns/op 46.782 ns/op 0.98
Buffer.compare 10.486 ns/op 10.982 ns/op 0.95
processSlot - 1 slots 10.210 us/op 11.048 us/op 0.92
processSlot - 32 slots 2.3789 ms/op 3.7679 ms/op 0.63
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.7163 ms/op 4.9210 ms/op 0.76
getCommitteeAssignments - req 1 vs - 250000 vc 2.2723 ms/op 2.1951 ms/op 1.04
getCommitteeAssignments - req 100 vs - 250000 vc 4.3625 ms/op 4.3095 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6945 ms/op 4.6267 ms/op 1.01
findModifiedValidators - 10000 modified validators 857.33 ms/op 865.93 ms/op 0.99
findModifiedValidators - 1000 modified validators 729.04 ms/op 936.33 ms/op 0.78
findModifiedValidators - 100 modified validators 274.45 ms/op 408.77 ms/op 0.67
findModifiedValidators - 10 modified validators 232.11 ms/op 411.98 ms/op 0.56
findModifiedValidators - 1 modified validators 255.74 ms/op 315.93 ms/op 0.81
findModifiedValidators - no difference 294.50 ms/op 407.76 ms/op 0.72
compare ViewDUs 6.5776 s/op 7.4438 s/op 0.88
compare each validator Uint8Array 1.5971 s/op 1.7917 s/op 0.89
compare ViewDU to Uint8Array 1.6399 s/op 1.4856 s/op 1.10
migrate state 1000000 validators, 24 modified, 0 new 1.0553 s/op 1.0699 s/op 0.99
migrate state 1000000 validators, 1700 modified, 1000 new 1.3466 s/op 1.4297 s/op 0.94
migrate state 1000000 validators, 3400 modified, 2000 new 1.3827 s/op 1.6272 s/op 0.85
migrate state 1500000 validators, 24 modified, 0 new 907.40 ms/op 1.1423 s/op 0.79
migrate state 1500000 validators, 1700 modified, 1000 new 1.2363 s/op 1.2983 s/op 0.95
migrate state 1500000 validators, 3400 modified, 2000 new 1.7621 s/op 1.5183 s/op 1.16
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.2900 ns/op 4.4700 ns/op 1.18
state getBlockRootAtSlot - 250000 vs - 7PWei 540.16 ns/op 646.92 ns/op 0.83
naive computeProposerIndex 100000 validators 64.688 ms/op 58.373 ms/op 1.11
computeProposerIndex 100000 validators 1.5216 ms/op 1.6033 ms/op 0.95
naiveGetNextSyncCommitteeIndices 1000 validators 8.9258 s/op 8.1710 s/op 1.09
getNextSyncCommitteeIndices 1000 validators 135.00 ms/op 123.64 ms/op 1.09
naiveGetNextSyncCommitteeIndices 10000 validators 8.3097 s/op 8.1926 s/op 1.01
getNextSyncCommitteeIndices 10000 validators 118.65 ms/op 128.28 ms/op 0.92
naiveGetNextSyncCommitteeIndices 100000 validators 8.3921 s/op 7.7319 s/op 1.09
getNextSyncCommitteeIndices 100000 validators 129.57 ms/op 132.30 ms/op 0.98
naive computeShuffledIndex 100000 validators 26.931 s/op 24.913 s/op 1.08
cached computeShuffledIndex 100000 validators 566.52 ms/op 569.14 ms/op 1.00
naive computeShuffledIndex 2000000 validators 490.72 s/op 479.55 s/op 1.02
cached computeShuffledIndex 2000000 validators 63.791 s/op 34.875 s/op 1.83
computeProposers - vc 250000 614.47 us/op 641.42 us/op 0.96
computeEpochShuffling - vc 250000 42.015 ms/op 41.207 ms/op 1.02
getNextSyncCommittee - vc 250000 10.631 ms/op 10.409 ms/op 1.02
computeSigningRoot for AttestationData 24.406 us/op 21.153 us/op 1.15
hash AttestationData serialized data then Buffer.toString(base64) 2.0083 us/op 1.5839 us/op 1.27
toHexString serialized data 1.3549 us/op 1.1082 us/op 1.22
Buffer.toString(base64) 174.43 ns/op 155.78 ns/op 1.12
nodejs block root to RootHex using toHex 161.81 ns/op 146.04 ns/op 1.11
nodejs block root to RootHex using toRootHex 97.990 ns/op 96.394 ns/op 1.02
browser block root to RootHex using the deprecated toHexString 229.37 ns/op 208.33 ns/op 1.10
browser block root to RootHex using toHex 181.10 ns/op 173.32 ns/op 1.04
browser block root to RootHex using toRootHex 163.92 ns/op 157.52 ns/op 1.04

by benchmarkbot/action

@nazarhussain nazarhussain force-pushed the nh/6358-flaky-e2e-tests branch from 63cd115 to 7e9982e Compare May 5, 2025 09:37
Comment on lines 225 to 226
// Used only for sleep() statements
this.controller.abort();
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 change protects from scenarios where connection and libp2p dependencies are cleanup before properly saying goodbye. Identified through a lot of errors during e2e tests.

May-02 11:06:48.905[reqresp-main-B] verbose: Req  error method=goodbye, version=1, encoding=ssz_snappy, client=Lodestar, peer=16...koSwxP, requestId=6 - REQUEST_ERROR_DIAL_ERROR

@nazarhussain nazarhussain changed the title test: fix e2e flaky tests test: fix few e2e flaky tests May 5, 2025
Comment on lines +22 to +25
sequence: {
concurrent: false,
shuffle: 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 is not a behavior change, but will help to make sure that behavior does not change unintentionally in future.

@nazarhussain nazarhussain marked this pull request as ready for review May 6, 2025 10:37
@nazarhussain nazarhussain requested a review from a team as a code owner May 6, 2025 10:37
nazarhussain added a commit that referenced this pull request May 7, 2025
**Motivation**

Fix the behavior for reqresp to avoid unncessary response timeout. 

**Description**

During debugging of the e2e flaky tests #7762 found some edge case for
unnecessary response timeout.

**Steps to test or reproduce**

Run all tests
@nazarhussain nazarhussain force-pushed the nh/6358-flaky-e2e-tests branch from f6e6567 to d70f69d Compare May 7, 2025 07:55
@nazarhussain nazarhussain requested a review from nflaig May 7, 2025 07:59
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.

Looks good overall, how do we test this? ideally we should add some load to CI and see if E2E tests in this PR don't fail due to it


beforeEach(() => {
controller = new AbortController();
});
Copy link
Member

@nflaig nflaig May 7, 2025

Choose a reason for hiding this comment

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

does it make sense to abort the controller in afterEach?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had it before but does not make sense of it with these changes. Mostly it's used for sleep and peer connection, if any of those hangs up the test will already timeout.

@nazarhussain nazarhussain requested a review from nflaig May 7, 2025 08:54
@nazarhussain nazarhussain merged commit 0eb947d into unstable May 7, 2025
20 checks passed
@nazarhussain nazarhussain deleted the nh/6358-flaky-e2e-tests branch May 7, 2025 12:20
@nazarhussain
Copy link
Contributor Author

Looks good overall, how do we test this?

I see only way to is to give it a try and observe CI over few days, so we have real analysis of it. There is no way to produce/control the load on CI server on our own.

@wemeetagain
Copy link
Member

🎉 This PR is included in v1.30.0 🎉

wemeetagain pushed a commit that referenced this pull request Sep 1, 2025
**Motivation**

- make e2e tests stable
- peers get disconnected in e2e tests

**Description**

- I was not able to run `finalizeSync.test.ts` e2e tests in
`mkeil/refactor-block-input-on-unstable` until I found this option added
since #7762
- sometimes I found same issue with `unknownBlockSync.test.ts` e2e test,
suppose it will help that test too since it uses same utils

Co-authored-by: Tuyen Nguyen <[email protected]>
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.

Flaky tests

4 participants