Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: track leaked libp2p connections #6656

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Apr 10, 2024

Motivation

Lodestar periodically prune leaked connections if our peer data is > 2x actual connections, and we don't track it while in the profile shown here there are > 15k of leaked connections

Description

  • Track it in lodestar_peer_manager_leaked_connections_count metric
  • The constant of 2 is too big to me, if we increase max peer count to 110 it'd mean we only prune until we have 220 peer data. I think it makes sense to do the prune if peer data is > 10% of actual connections as the check is not too expensive there and it does not happen in every heartbeat
  • Will do a follow up PR for Grafana once this PR is merged

part of #6595

Steps to test or reproduce

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

Merging #6656 (5cc2d7c) into unstable (6bd9af9) will decrease coverage by 0.01%.
Report is 1 commits behind head on unstable.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6656      +/-   ##
============================================
- Coverage     61.69%   61.68%   -0.01%     
============================================
  Files           556      556              
  Lines         58820    58825       +5     
  Branches       1887     1887              
============================================
  Hits          36287    36287              
- Misses        22492    22497       +5     
  Partials         41       41              

Copy link
Contributor

github-actions bot commented Apr 10, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: bc6e0d8 Previous: e029851 Ratio
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 3.3440 us/op 11.870 us/op 0.28
Full benchmark results
Benchmark suite Current: bc6e0d8 Previous: e029851 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 362.48 us/op 544.80 us/op 0.67
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.484 us/op 50.916 us/op 0.97
BLS verify - blst-native 1.1083 ms/op 1.1256 ms/op 0.98
BLS verifyMultipleSignatures 3 - blst-native 2.3470 ms/op 2.4088 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst-native 5.2715 ms/op 5.2962 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 19.397 ms/op 19.454 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst-native 38.451 ms/op 38.288 ms/op 1.00
BLS verifyMultipleSignatures 128 - blst-native 75.177 ms/op 75.992 ms/op 0.99
BLS deserializing 10000 signatures 801.86 ms/op 781.29 ms/op 1.03
BLS deserializing 100000 signatures 8.2485 s/op 8.1682 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2078 ms/op 1.1158 ms/op 1.08
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2885 ms/op 1.2661 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.7202 ms/op 1.9958 ms/op 1.36
BLS verifyMultipleSignatures - same message - 64 - blst-native 2.9882 ms/op 3.8102 ms/op 0.78
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.8922 ms/op 4.9924 ms/op 1.38
BLS aggregatePubkeys 32 - blst-native 24.214 us/op 22.512 us/op 1.08
BLS aggregatePubkeys 128 - blst-native 88.478 us/op 88.546 us/op 1.00
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 47.310 ms/op 41.242 ms/op 1.15
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 55.971 ms/op 50.977 ms/op 1.10
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 24.625 ms/op 26.312 ms/op 0.94
getSlashingsAndExits - default max 145.42 us/op 108.50 us/op 1.34
getSlashingsAndExits - 2k 590.21 us/op 328.33 us/op 1.80
proposeBlockBody type=full, size=empty 4.4578 ms/op 4.2550 ms/op 1.05
isKnown best case - 1 super set check 248.00 ns/op 308.00 ns/op 0.81
isKnown normal case - 2 super set checks 327.00 ns/op 318.00 ns/op 1.03
isKnown worse case - 16 super set checks 255.00 ns/op 316.00 ns/op 0.81
InMemoryCheckpointStateCache - add get delete 4.5430 us/op 4.0220 us/op 1.13
validate api signedAggregateAndProof - struct 2.2841 ms/op 2.3888 ms/op 0.96
validate gossip signedAggregateAndProof - struct 2.3673 ms/op 2.3931 ms/op 0.99
validate gossip attestation - vc 640000 1.1167 ms/op 1.1278 ms/op 0.99
batch validate gossip attestation - vc 640000 - chunk 32 139.17 us/op 135.62 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 64 129.79 us/op 119.06 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 128 136.88 us/op 110.63 us/op 1.24
batch validate gossip attestation - vc 640000 - chunk 256 125.06 us/op 104.91 us/op 1.19
pickEth1Vote - no votes 1.0835 ms/op 909.20 us/op 1.19
pickEth1Vote - max votes 6.6941 ms/op 5.2678 ms/op 1.27
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.804 ms/op 11.515 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.265 ms/op 16.213 ms/op 1.00
pickEth1Vote - Eth1Data fastSerialize value x2048 477.41 us/op 426.09 us/op 1.12
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.3599 ms/op 7.5547 ms/op 0.44
bytes32 toHexString 358.00 ns/op 428.00 ns/op 0.84
bytes32 Buffer.toString(hex) 210.00 ns/op 297.00 ns/op 0.71
bytes32 Buffer.toString(hex) from Uint8Array 324.00 ns/op 396.00 ns/op 0.82
bytes32 Buffer.toString(hex) + 0x 208.00 ns/op 299.00 ns/op 0.70
Object access 1 prop 0.11100 ns/op 0.19400 ns/op 0.57
Map access 1 prop 0.099000 ns/op 0.19000 ns/op 0.52
Object get x1000 5.4420 ns/op 4.6800 ns/op 1.16
Map get x1000 0.65800 ns/op 0.68300 ns/op 0.96
Object set x1000 25.707 ns/op 25.220 ns/op 1.02
Map set x1000 17.634 ns/op 17.222 ns/op 1.02
Return object 10000 times 0.23320 ns/op 0.21070 ns/op 1.11
Throw Error 10000 times 2.8251 us/op 2.5503 us/op 1.11
fastMsgIdFn sha256 / 200 bytes 1.8970 us/op 1.8660 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 211.00 ns/op 286.00 ns/op 0.74
fastMsgIdFn h64 xxhash / 200 bytes 249.00 ns/op 340.00 ns/op 0.73
fastMsgIdFn sha256 / 1000 bytes 6.1910 us/op 5.8580 us/op 1.06
fastMsgIdFn h32 xxhash / 1000 bytes 322.00 ns/op 394.00 ns/op 0.82
fastMsgIdFn h64 xxhash / 1000 bytes 316.00 ns/op 395.00 ns/op 0.80
fastMsgIdFn sha256 / 10000 bytes 53.531 us/op 48.794 us/op 1.10
fastMsgIdFn h32 xxhash / 10000 bytes 1.7410 us/op 1.6990 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.1380 us/op 1.2360 us/op 0.92
send data - 1000 256B messages 11.282 ms/op 14.186 ms/op 0.80
send data - 1000 512B messages 14.888 ms/op 14.968 ms/op 0.99
send data - 1000 1024B messages 23.952 ms/op 22.787 ms/op 1.05
send data - 1000 1200B messages 26.199 ms/op 27.491 ms/op 0.95
send data - 1000 2048B messages 34.239 ms/op 35.659 ms/op 0.96
send data - 1000 4096B messages 33.936 ms/op 32.114 ms/op 1.06
send data - 1000 16384B messages 92.882 ms/op 88.463 ms/op 1.05
send data - 1000 65536B messages 372.33 ms/op 405.01 ms/op 0.92
enrSubnets - fastDeserialize 64 bits 825.00 ns/op 1.0500 us/op 0.79
enrSubnets - ssz BitVector 64 bits 302.00 ns/op 418.00 ns/op 0.72
enrSubnets - fastDeserialize 4 bits 114.00 ns/op 194.00 ns/op 0.59
enrSubnets - ssz BitVector 4 bits 309.00 ns/op 405.00 ns/op 0.76
prioritizePeers score -10:0 att 32-0.1 sync 2-0 71.433 us/op 65.785 us/op 1.09
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 77.605 us/op 80.698 us/op 0.96
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 107.38 us/op 104.39 us/op 1.03
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 176.17 us/op 178.11 us/op 0.99
prioritizePeers score 0:0 att 64-1 sync 4-1 214.87 us/op 201.96 us/op 1.06
array of 16000 items push then shift 1.2660 us/op 1.2710 us/op 1.00
LinkedList of 16000 items push then shift 5.7940 ns/op 5.8710 ns/op 0.99
array of 16000 items push then pop 65.560 ns/op 49.448 ns/op 1.33
LinkedList of 16000 items push then pop 5.5070 ns/op 5.6520 ns/op 0.97
array of 24000 items push then shift 1.7709 us/op 1.8596 us/op 0.95
LinkedList of 24000 items push then shift 6.1610 ns/op 5.7860 ns/op 1.06
array of 24000 items push then pop 99.120 ns/op 77.905 ns/op 1.27
LinkedList of 24000 items push then pop 5.5010 ns/op 5.8780 ns/op 0.94
intersect bitArray bitLen 8 4.7120 ns/op 4.7270 ns/op 1.00
intersect array and set length 8 48.625 ns/op 48.419 ns/op 1.00
intersect bitArray bitLen 128 29.228 ns/op 29.384 ns/op 0.99
intersect array and set length 128 680.27 ns/op 681.22 ns/op 1.00
bitArray.getTrueBitIndexes() bitLen 128 1.0920 us/op 1.2650 us/op 0.86
bitArray.getTrueBitIndexes() bitLen 248 1.7680 us/op 1.9270 us/op 0.92
bitArray.getTrueBitIndexes() bitLen 512 3.4050 us/op 3.5120 us/op 0.97
Buffer.concat 32 items 795.00 ns/op 900.00 ns/op 0.88
Uint8Array.set 32 items 2.0730 us/op 2.0890 us/op 0.99
Set add up to 64 items then delete first 1.7604 us/op 1.7387 us/op 1.01
OrderedSet add up to 64 items then delete first 2.7062 us/op 2.6711 us/op 1.01
Set add up to 64 items then delete last 1.9923 us/op 1.9715 us/op 1.01
OrderedSet add up to 64 items then delete last 3.0920 us/op 2.9483 us/op 1.05
Set add up to 64 items then delete middle 1.9885 us/op 1.9826 us/op 1.00
OrderedSet add up to 64 items then delete middle 4.2089 us/op 4.2460 us/op 0.99
Set add up to 128 items then delete first 3.9188 us/op 3.9214 us/op 1.00
OrderedSet add up to 128 items then delete first 5.8093 us/op 6.1587 us/op 0.94
Set add up to 128 items then delete last 3.8350 us/op 3.7970 us/op 1.01
OrderedSet add up to 128 items then delete last 5.9555 us/op 5.7032 us/op 1.04
Set add up to 128 items then delete middle 3.8222 us/op 3.8007 us/op 1.01
OrderedSet add up to 128 items then delete middle 10.746 us/op 10.598 us/op 1.01
Set add up to 256 items then delete first 7.7615 us/op 7.7826 us/op 1.00
OrderedSet add up to 256 items then delete first 11.457 us/op 12.226 us/op 0.94
Set add up to 256 items then delete last 7.6085 us/op 7.5374 us/op 1.01
OrderedSet add up to 256 items then delete last 12.142 us/op 11.340 us/op 1.07
Set add up to 256 items then delete middle 7.5446 us/op 7.5320 us/op 1.00
OrderedSet add up to 256 items then delete middle 30.935 us/op 30.743 us/op 1.01
transfer serialized Status (84 B) 1.3660 us/op 1.3640 us/op 1.00
copy serialized Status (84 B) 1.0420 us/op 1.1700 us/op 0.89
transfer serialized SignedVoluntaryExit (112 B) 1.4960 us/op 1.5570 us/op 0.96
copy serialized SignedVoluntaryExit (112 B) 1.1260 us/op 1.2600 us/op 0.89
transfer serialized ProposerSlashing (416 B) 2.0660 us/op 2.2430 us/op 0.92
copy serialized ProposerSlashing (416 B) 2.2260 us/op 2.3270 us/op 0.96
transfer serialized Attestation (485 B) 2.1200 us/op 2.3330 us/op 0.91
copy serialized Attestation (485 B) 2.1190 us/op 2.3270 us/op 0.91
transfer serialized AttesterSlashing (33232 B) 2.3000 us/op 2.1500 us/op 1.07
copy serialized AttesterSlashing (33232 B) 4.5150 us/op 4.2390 us/op 1.07
transfer serialized Small SignedBeaconBlock (128000 B) 3.0900 us/op 2.3550 us/op 1.31
copy serialized Small SignedBeaconBlock (128000 B) 9.3860 us/op 8.6990 us/op 1.08
transfer serialized Avg SignedBeaconBlock (200000 B) 2.6320 us/op 2.5180 us/op 1.05
copy serialized Avg SignedBeaconBlock (200000 B) 12.758 us/op 13.041 us/op 0.98
transfer serialized BlobsSidecar (524380 B) 2.6300 us/op 2.4290 us/op 1.08
copy serialized BlobsSidecar (524380 B) 116.44 us/op 79.067 us/op 1.47
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2470 us/op 3.0370 us/op 1.07
copy serialized Big SignedBeaconBlock (1000000 B) 203.46 us/op 139.69 us/op 1.46
pass gossip attestations to forkchoice per slot 2.5751 ms/op 2.6115 ms/op 0.99
forkChoice updateHead vc 100000 bc 64 eq 0 466.07 us/op 451.39 us/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 0 2.7169 ms/op 2.7572 ms/op 0.99
forkChoice updateHead vc 1000000 bc 64 eq 0 4.5868 ms/op 4.3884 ms/op 1.05
forkChoice updateHead vc 600000 bc 320 eq 0 2.6855 ms/op 2.5956 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7598 ms/op 2.5893 ms/op 1.07
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3894 ms/op 3.5704 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 1000 9.8475 ms/op 9.7675 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 10000 9.6916 ms/op 9.1812 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 300000 11.987 ms/op 11.064 ms/op 1.08
computeDeltas 500000 validators 300 proto nodes 4.5471 ms/op 3.0094 ms/op 1.51
computeDeltas 500000 validators 1200 proto nodes 3.0345 ms/op 2.7799 ms/op 1.09
computeDeltas 500000 validators 7200 proto nodes 3.0047 ms/op 2.8522 ms/op 1.05
computeDeltas 750000 validators 300 proto nodes 4.6934 ms/op 4.5301 ms/op 1.04
computeDeltas 750000 validators 1200 proto nodes 4.5489 ms/op 4.5314 ms/op 1.00
computeDeltas 750000 validators 7200 proto nodes 4.7999 ms/op 4.4805 ms/op 1.07
computeDeltas 1400000 validators 300 proto nodes 9.1420 ms/op 8.6265 ms/op 1.06
computeDeltas 1400000 validators 1200 proto nodes 8.6784 ms/op 8.7363 ms/op 0.99
computeDeltas 1400000 validators 7200 proto nodes 9.2345 ms/op 8.6891 ms/op 1.06
computeDeltas 2100000 validators 300 proto nodes 14.877 ms/op 12.701 ms/op 1.17
computeDeltas 2100000 validators 1200 proto nodes 13.852 ms/op 12.632 ms/op 1.10
computeDeltas 2100000 validators 7200 proto nodes 13.894 ms/op 12.432 ms/op 1.12
altair processAttestation - 250000 vs - 7PWei normalcase 2.0425 ms/op 1.5503 ms/op 1.32
altair processAttestation - 250000 vs - 7PWei worstcase 2.1947 ms/op 2.3705 ms/op 0.93
altair processAttestation - setStatus - 1/6 committees join 74.139 us/op 71.716 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 163.31 us/op 142.30 us/op 1.15
altair processAttestation - setStatus - 1/2 committees join 234.04 us/op 203.23 us/op 1.15
altair processAttestation - setStatus - 2/3 committees join 283.34 us/op 261.11 us/op 1.09
altair processAttestation - setStatus - 4/5 committees join 399.19 us/op 369.22 us/op 1.08
altair processAttestation - setStatus - 100% committees join 492.73 us/op 451.79 us/op 1.09
altair processBlock - 250000 vs - 7PWei normalcase 7.4897 ms/op 6.8568 ms/op 1.09
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.100 ms/op 28.719 ms/op 1.12
altair processBlock - 250000 vs - 7PWei worstcase 36.370 ms/op 31.301 ms/op 1.16
altair processBlock - 250000 vs - 7PWei worstcase hashState 89.794 ms/op 83.334 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei normalcase 2.6203 ms/op 2.0723 ms/op 1.26
phase0 processBlock - 250000 vs - 7PWei worstcase 24.795 ms/op 23.823 ms/op 1.04
altair processEth1Data - 250000 vs - 7PWei normalcase 296.49 us/op 286.16 us/op 1.04
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 3.3440 us/op 11.870 us/op 0.28
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 58.844 us/op 58.201 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 23.321 us/op 8.2670 us/op 2.82
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 13.489 us/op 11.175 us/op 1.21
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 161.42 us/op 134.30 us/op 1.20
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1503 ms/op 991.63 us/op 1.16
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.3853 ms/op 1.1660 ms/op 1.19
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2387 ms/op 798.40 us/op 1.55
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.3970 ms/op 1.9027 ms/op 1.79
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2320 ms/op 1.7245 ms/op 1.29
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.4368 ms/op 3.3862 ms/op 1.31
Tree 40 250000 create 303.80 ms/op 230.25 ms/op 1.32
Tree 40 250000 get(125000) 123.29 ns/op 113.39 ns/op 1.09
Tree 40 250000 set(125000) 857.65 ns/op 714.72 ns/op 1.20
Tree 40 250000 toArray() 12.445 ms/op 9.3646 ms/op 1.33
Tree 40 250000 iterate all - toArray() + loop 13.264 ms/op 9.6999 ms/op 1.37
Tree 40 250000 iterate all - get(i) 48.072 ms/op 42.724 ms/op 1.13
MutableVector 250000 create 14.053 ms/op 10.364 ms/op 1.36
MutableVector 250000 get(125000) 5.6080 ns/op 5.4750 ns/op 1.02
MutableVector 250000 set(125000) 210.23 ns/op 207.41 ns/op 1.01
MutableVector 250000 toArray() 2.4931 ms/op 2.7465 ms/op 0.91
MutableVector 250000 iterate all - toArray() + loop 2.5890 ms/op 2.4122 ms/op 1.07
MutableVector 250000 iterate all - get(i) 1.3449 ms/op 1.3107 ms/op 1.03
Array 250000 create 2.4486 ms/op 2.0193 ms/op 1.21
Array 250000 clone - spread 1.2501 ms/op 1.1850 ms/op 1.05
Array 250000 get(125000) 1.0030 ns/op 1.0770 ns/op 0.93
Array 250000 set(125000) 1.2150 ns/op 1.2850 ns/op 0.95
Array 250000 iterate all - loop 157.04 us/op 156.61 us/op 1.00
effectiveBalanceIncrements clone Uint8Array 300000 15.884 us/op 15.180 us/op 1.05
effectiveBalanceIncrements clone MutableVector 300000 376.00 ns/op 447.00 ns/op 0.84
effectiveBalanceIncrements rw all Uint8Array 300000 189.59 us/op 184.20 us/op 1.03
effectiveBalanceIncrements rw all MutableVector 300000 71.823 ms/op 65.916 ms/op 1.09
phase0 afterProcessEpoch - 250000 vs - 7PWei 85.404 ms/op 81.683 ms/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 46.306 ms/op 27.815 ms/op 1.66
altair processEpoch - mainnet_e81889 427.92 ms/op 426.38 ms/op 1.00
mainnet_e81889 - altair beforeProcessEpoch 77.927 ms/op 67.385 ms/op 1.16
mainnet_e81889 - altair processJustificationAndFinalization 10.111 us/op 5.6940 us/op 1.78
mainnet_e81889 - altair processInactivityUpdates 5.6955 ms/op 4.5054 ms/op 1.26
mainnet_e81889 - altair processRewardsAndPenalties 58.510 ms/op 57.361 ms/op 1.02
mainnet_e81889 - altair processRegistryUpdates 1.8160 us/op 1.9350 us/op 0.94
mainnet_e81889 - altair processSlashings 404.00 ns/op 632.00 ns/op 0.64
mainnet_e81889 - altair processEth1DataReset 474.00 ns/op 564.00 ns/op 0.84
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0308 ms/op 1.7229 ms/op 0.60
mainnet_e81889 - altair processSlashingsReset 2.8800 us/op 3.6550 us/op 0.79
mainnet_e81889 - altair processRandaoMixesReset 2.3320 us/op 4.2880 us/op 0.54
mainnet_e81889 - altair processHistoricalRootsUpdate 671.00 ns/op 1.1240 us/op 0.60
mainnet_e81889 - altair processParticipationFlagUpdates 1.3820 us/op 1.6500 us/op 0.84
mainnet_e81889 - altair processSyncCommitteeUpdates 355.00 ns/op 618.00 ns/op 0.57
mainnet_e81889 - altair afterProcessEpoch 80.815 ms/op 81.017 ms/op 1.00
capella processEpoch - mainnet_e217614 1.6022 s/op 1.6493 s/op 0.97
mainnet_e217614 - capella beforeProcessEpoch 394.92 ms/op 401.47 ms/op 0.98
mainnet_e217614 - capella processJustificationAndFinalization 9.5010 us/op 8.5210 us/op 1.12
mainnet_e217614 - capella processInactivityUpdates 14.068 ms/op 15.266 ms/op 0.92
mainnet_e217614 - capella processRewardsAndPenalties 487.87 ms/op 462.64 ms/op 1.05
mainnet_e217614 - capella processRegistryUpdates 20.066 us/op 16.570 us/op 1.21
mainnet_e217614 - capella processSlashings 365.00 ns/op 671.00 ns/op 0.54
mainnet_e217614 - capella processEth1DataReset 194.00 ns/op 598.00 ns/op 0.32
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.4522 ms/op 4.3089 ms/op 0.80
mainnet_e217614 - capella processSlashingsReset 1.5150 us/op 1.6880 us/op 0.90
mainnet_e217614 - capella processRandaoMixesReset 3.0390 us/op 2.9070 us/op 1.05
mainnet_e217614 - capella processHistoricalRootsUpdate 392.00 ns/op 595.00 ns/op 0.66
mainnet_e217614 - capella processParticipationFlagUpdates 1.4190 us/op 1.1680 us/op 1.21
mainnet_e217614 - capella afterProcessEpoch 214.94 ms/op 245.36 ms/op 0.88
phase0 processEpoch - mainnet_e58758 378.59 ms/op 406.36 ms/op 0.93
mainnet_e58758 - phase0 beforeProcessEpoch 125.49 ms/op 113.94 ms/op 1.10
mainnet_e58758 - phase0 processJustificationAndFinalization 12.428 us/op 12.221 us/op 1.02
mainnet_e58758 - phase0 processRewardsAndPenalties 60.630 ms/op 60.058 ms/op 1.01
mainnet_e58758 - phase0 processRegistryUpdates 7.8100 us/op 7.6500 us/op 1.02
mainnet_e58758 - phase0 processSlashings 420.00 ns/op 601.00 ns/op 0.70
mainnet_e58758 - phase0 processEth1DataReset 386.00 ns/op 501.00 ns/op 0.77
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 857.48 us/op 1.3542 ms/op 0.63
mainnet_e58758 - phase0 processSlashingsReset 3.4510 us/op 2.3530 us/op 1.47
mainnet_e58758 - phase0 processRandaoMixesReset 3.7040 us/op 2.5540 us/op 1.45
mainnet_e58758 - phase0 processHistoricalRootsUpdate 531.00 ns/op 493.00 ns/op 1.08
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.9480 us/op 2.6500 us/op 1.49
mainnet_e58758 - phase0 afterProcessEpoch 71.224 ms/op 66.355 ms/op 1.07
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0332 ms/op 1.8329 ms/op 0.56
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.3428 ms/op 1.0425 ms/op 1.29
altair processInactivityUpdates - 250000 normalcase 20.410 ms/op 22.390 ms/op 0.91
altair processInactivityUpdates - 250000 worstcase 22.556 ms/op 25.594 ms/op 0.88
phase0 processRegistryUpdates - 250000 normalcase 7.7710 us/op 7.8510 us/op 0.99
phase0 processRegistryUpdates - 250000 badcase_full_deposits 467.50 us/op 430.59 us/op 1.09
phase0 processRegistryUpdates - 250000 worstcase 0.5 136.00 ms/op 120.47 ms/op 1.13
altair processRewardsAndPenalties - 250000 normalcase 53.543 ms/op 70.663 ms/op 0.76
altair processRewardsAndPenalties - 250000 worstcase 59.486 ms/op 68.346 ms/op 0.87
phase0 getAttestationDeltas - 250000 normalcase 8.0589 ms/op 5.5631 ms/op 1.45
phase0 getAttestationDeltas - 250000 worstcase 8.7171 ms/op 5.6359 ms/op 1.55
phase0 processSlashings - 250000 worstcase 76.693 us/op 83.557 us/op 0.92
altair processSyncCommitteeUpdates - 250000 130.60 ms/op 98.269 ms/op 1.33
BeaconState.hashTreeRoot - No change 579.00 ns/op 319.00 ns/op 1.82
BeaconState.hashTreeRoot - 1 full validator 121.50 us/op 83.773 us/op 1.45
BeaconState.hashTreeRoot - 32 full validator 1.3619 ms/op 860.82 us/op 1.58
BeaconState.hashTreeRoot - 512 full validator 18.282 ms/op 9.2736 ms/op 1.97
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 175.97 us/op 101.77 us/op 1.73
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.6405 ms/op 1.3847 ms/op 1.91
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.754 ms/op 17.555 ms/op 1.87
BeaconState.hashTreeRoot - 1 balances 127.88 us/op 81.205 us/op 1.57
BeaconState.hashTreeRoot - 32 balances 951.64 us/op 729.96 us/op 1.30
BeaconState.hashTreeRoot - 512 balances 13.344 ms/op 7.3467 ms/op 1.82
BeaconState.hashTreeRoot - 250000 balances 171.00 ms/op 141.96 ms/op 1.20
aggregationBits - 2048 els - zipIndexesInBitList 23.844 us/op 19.407 us/op 1.23
byteArrayEquals 32 65.543 ns/op 64.480 ns/op 1.02
Buffer.compare 32 38.949 ns/op 39.405 ns/op 0.99
byteArrayEquals 1024 1.8314 us/op 1.7495 us/op 1.05
Buffer.compare 1024 50.913 ns/op 44.426 ns/op 1.15
byteArrayEquals 16384 28.706 us/op 27.924 us/op 1.03
Buffer.compare 16384 232.87 ns/op 206.35 ns/op 1.13
byteArrayEquals 123687377 215.23 ms/op 209.71 ms/op 1.03
Buffer.compare 123687377 5.1064 ms/op 4.4011 ms/op 1.16
byteArrayEquals 32 - diff last byte 62.230 ns/op 61.590 ns/op 1.01
Buffer.compare 32 - diff last byte 37.947 ns/op 40.340 ns/op 0.94
byteArrayEquals 1024 - diff last byte 1.6597 us/op 1.7565 us/op 0.94
Buffer.compare 1024 - diff last byte 42.134 ns/op 48.720 ns/op 0.86
byteArrayEquals 16384 - diff last byte 26.422 us/op 27.539 us/op 0.96
Buffer.compare 16384 - diff last byte 206.03 ns/op 215.37 ns/op 0.96
byteArrayEquals 123687377 - diff last byte 205.02 ms/op 209.63 ms/op 0.98
Buffer.compare 123687377 - diff last byte 6.6757 ms/op 4.3565 ms/op 1.53
byteArrayEquals 32 - random bytes 5.8660 ns/op 4.6400 ns/op 1.26
Buffer.compare 32 - random bytes 39.582 ns/op 41.489 ns/op 0.95
byteArrayEquals 1024 - random bytes 5.3360 ns/op 4.5260 ns/op 1.18
Buffer.compare 1024 - random bytes 37.931 ns/op 40.331 ns/op 0.94
byteArrayEquals 16384 - random bytes 5.3480 ns/op 4.5570 ns/op 1.17
Buffer.compare 16384 - random bytes 37.536 ns/op 40.025 ns/op 0.94
byteArrayEquals 123687377 - random bytes 7.2800 ns/op 8.1100 ns/op 0.90
Buffer.compare 123687377 - random bytes 42.960 ns/op 42.540 ns/op 1.01
regular array get 100000 times 41.389 us/op 40.839 us/op 1.01
wrappedArray get 100000 times 41.206 us/op 41.754 us/op 0.99
arrayWithProxy get 100000 times 12.395 ms/op 10.208 ms/op 1.21
ssz.Root.equals 55.174 ns/op 55.143 ns/op 1.00
byteArrayEquals 53.735 ns/op 53.302 ns/op 1.01
Buffer.compare 10.431 ns/op 9.4480 ns/op 1.10
shuffle list - 16384 els 6.0226 ms/op 5.6776 ms/op 1.06
shuffle list - 250000 els 88.271 ms/op 84.230 ms/op 1.05
processSlot - 1 slots 16.181 us/op 13.357 us/op 1.21
processSlot - 32 slots 3.0809 ms/op 2.6719 ms/op 1.15
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 50.542 ms/op 49.211 ms/op 1.03
getCommitteeAssignments - req 1 vs - 250000 vc 2.4179 ms/op 2.2661 ms/op 1.07
getCommitteeAssignments - req 100 vs - 250000 vc 3.5949 ms/op 3.3153 ms/op 1.08
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0276 ms/op 3.6297 ms/op 1.11
findModifiedValidators - 10000 modified validators 336.54 ms/op 288.20 ms/op 1.17
findModifiedValidators - 1000 modified validators 169.06 ms/op 160.05 ms/op 1.06
findModifiedValidators - 100 modified validators 169.87 ms/op 144.45 ms/op 1.18
findModifiedValidators - 10 modified validators 179.36 ms/op 146.16 ms/op 1.23
findModifiedValidators - 1 modified validators 160.04 ms/op 141.80 ms/op 1.13
findModifiedValidators - no difference 179.78 ms/op 160.49 ms/op 1.12
compare ViewDUs 4.0426 s/op 4.0264 s/op 1.00
compare each validator Uint8Array 1.8001 s/op 1.3482 s/op 1.34
compare ViewDU to Uint8Array 1.2103 s/op 907.96 ms/op 1.33
migrate state 1000000 validators, 24 modified, 0 new 628.96 ms/op 691.76 ms/op 0.91
migrate state 1000000 validators, 1700 modified, 1000 new 979.26 ms/op 929.62 ms/op 1.05
migrate state 1000000 validators, 3400 modified, 2000 new 1.2788 s/op 1.2275 s/op 1.04
migrate state 1500000 validators, 24 modified, 0 new 718.61 ms/op 645.28 ms/op 1.11
migrate state 1500000 validators, 1700 modified, 1000 new 929.63 ms/op 861.33 ms/op 1.08
migrate state 1500000 validators, 3400 modified, 2000 new 1.2607 s/op 1.1136 s/op 1.13
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.7100 ns/op 4.1200 ns/op 0.90
state getBlockRootAtSlot - 250000 vs - 7PWei 661.07 ns/op 854.21 ns/op 0.77
computeProposers - vc 250000 7.3362 ms/op 6.3829 ms/op 1.15
computeEpochShuffling - vc 250000 88.444 ms/op 78.380 ms/op 1.13
getNextSyncCommittee - vc 250000 123.37 ms/op 103.42 ms/op 1.19
computeSigningRoot for AttestationData 24.637 us/op 24.425 us/op 1.01
hash AttestationData serialized data then Buffer.toString(base64) 1.2576 us/op 1.2351 us/op 1.02
toHexString serialized data 773.80 ns/op 738.52 ns/op 1.05
Buffer.toString(base64) 177.46 ns/op 138.34 ns/op 1.28

by benchmarkbot/action

@twoeths twoeths marked this pull request as ready for review April 10, 2024 12:36
@twoeths twoeths requested a review from a team as a code owner April 10, 2024 12:36
@twoeths twoeths merged commit f21660e into unstable Apr 11, 2024
20 checks passed
@twoeths twoeths deleted the tuyen/track_leaked_connections branch April 11, 2024 01:02
nflaig added a commit that referenced this pull request Apr 11, 2024
* feat: track leaked libp2p connections

* update var name

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.18.0 🎉

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.

None yet

3 participants