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: libp2p-gossipsub v10.1.1 #6156

Merged
merged 1 commit into from
Dec 8, 2023
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Dec 5, 2023

Motivation

There is a memory leak in gossipsub which is potentially fixed in v10.1.1, see ChainSafe/js-libp2p-gossipsub#477 (comment)

Description

Update libp2p-gossipsub to v10.1.1 cc @wemeetagain

part of #6129

TODOs

Records the result of different nodes in 1 week

Copy link
Contributor

github-actions bot commented Dec 5, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 4d2c488 Previous: 5201ac4 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 539.82 us/op 739.80 us/op 0.73
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 102.51 us/op 80.114 us/op 1.28
BLS verify - blst-native 1.3452 ms/op 1.2655 ms/op 1.06
BLS verifyMultipleSignatures 3 - blst-native 2.7290 ms/op 2.6535 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst-native 6.0942 ms/op 5.8306 ms/op 1.05
BLS verifyMultipleSignatures 32 - blst-native 22.585 ms/op 21.319 ms/op 1.06
BLS verifyMultipleSignatures 64 - blst-native 44.596 ms/op 42.009 ms/op 1.06
BLS verifyMultipleSignatures 128 - blst-native 86.626 ms/op 83.378 ms/op 1.04
BLS deserializing 10000 signatures 907.45 ms/op 876.05 ms/op 1.04
BLS deserializing 100000 signatures 9.2409 s/op 8.8350 s/op 1.05
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3379 ms/op 1.3712 ms/op 0.98
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.6243 ms/op 1.4199 ms/op 1.14
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3491 ms/op 2.1971 ms/op 1.07
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.9422 ms/op 3.2284 ms/op 1.22
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.6443 ms/op 6.6548 ms/op 0.85
BLS aggregatePubkeys 32 - blst-native 25.912 us/op 25.238 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 101.21 us/op 92.664 us/op 1.09
getAttestationsForBlock 47.337 ms/op 43.589 ms/op 1.09
isKnown best case - 1 super set check 381.00 ns/op 287.00 ns/op 1.33
isKnown normal case - 2 super set checks 401.00 ns/op 287.00 ns/op 1.40
isKnown worse case - 16 super set checks 432.00 ns/op 286.00 ns/op 1.51
CheckpointStateCache - add get delete 7.0460 us/op 5.4090 us/op 1.30
validate api signedAggregateAndProof - struct 2.7838 ms/op 2.6343 ms/op 1.06
validate gossip signedAggregateAndProof - struct 2.7910 ms/op 2.6328 ms/op 1.06
validate gossip attestation - vc 640000 1.3561 ms/op 1.3189 ms/op 1.03
batch validate gossip attestation - vc 640000 - chunk 32 166.58 us/op 156.35 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 64 148.48 us/op 137.84 us/op 1.08
batch validate gossip attestation - vc 640000 - chunk 128 139.87 us/op 126.79 us/op 1.10
batch validate gossip attestation - vc 640000 - chunk 256 139.32 us/op 123.46 us/op 1.13
pickEth1Vote - no votes 1.3445 ms/op 1.1025 ms/op 1.22
pickEth1Vote - max votes 9.7316 ms/op 8.9987 ms/op 1.08
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.606 ms/op 22.652 ms/op 0.73
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.365 ms/op 30.686 ms/op 0.79
pickEth1Vote - Eth1Data fastSerialize value x2048 712.82 us/op 548.74 us/op 1.30
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.9880 ms/op 6.2145 ms/op 0.80
bytes32 toHexString 569.00 ns/op 461.00 ns/op 1.23
bytes32 Buffer.toString(hex) 287.00 ns/op 271.00 ns/op 1.06
bytes32 Buffer.toString(hex) from Uint8Array 477.00 ns/op 419.00 ns/op 1.14
bytes32 Buffer.toString(hex) + 0x 295.00 ns/op 275.00 ns/op 1.07
Object access 1 prop 0.16200 ns/op 0.15900 ns/op 1.02
Map access 1 prop 0.13900 ns/op 0.14400 ns/op 0.97
Object get x1000 7.5390 ns/op 6.9940 ns/op 1.08
Map get x1000 0.77700 ns/op 0.73000 ns/op 1.06
Object set x1000 51.062 ns/op 48.248 ns/op 1.06
Map set x1000 38.206 ns/op 37.520 ns/op 1.02
Return object 10000 times 0.23560 ns/op 0.23110 ns/op 1.02
Throw Error 10000 times 3.8151 us/op 3.7598 us/op 1.01
fastMsgIdFn sha256 / 200 bytes 3.2370 us/op 3.1640 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 272.00 ns/op 262.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 200 bytes 327.00 ns/op 325.00 ns/op 1.01
fastMsgIdFn sha256 / 1000 bytes 11.198 us/op 10.905 us/op 1.03
fastMsgIdFn h32 xxhash / 1000 bytes 406.00 ns/op 392.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 1000 bytes 398.00 ns/op 390.00 ns/op 1.02
fastMsgIdFn sha256 / 10000 bytes 101.84 us/op 99.572 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 1.8950 us/op 1.8790 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.2800 us/op 1.2940 us/op 0.99
send data - 1000 256B messages 18.749 ms/op 17.695 ms/op 1.06
send data - 1000 512B messages 25.463 ms/op 24.884 ms/op 1.02
send data - 1000 1024B messages 39.629 ms/op 39.230 ms/op 1.01
send data - 1000 1200B messages 34.410 ms/op 35.221 ms/op 0.98
send data - 1000 2048B messages 40.198 ms/op 42.159 ms/op 0.95
send data - 1000 4096B messages 38.797 ms/op 40.787 ms/op 0.95
send data - 1000 16384B messages 104.54 ms/op 107.85 ms/op 0.97
send data - 1000 65536B messages 413.79 ms/op 392.78 ms/op 1.05
enrSubnets - fastDeserialize 64 bits 1.3070 us/op 1.2440 us/op 1.05
enrSubnets - ssz BitVector 64 bits 478.00 ns/op 402.00 ns/op 1.19
enrSubnets - fastDeserialize 4 bits 196.00 ns/op 154.00 ns/op 1.27
enrSubnets - ssz BitVector 4 bits 510.00 ns/op 402.00 ns/op 1.27
prioritizePeers score -10:0 att 32-0.1 sync 2-0 106.22 us/op 99.907 us/op 1.06
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 133.56 us/op 117.11 us/op 1.14
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 174.41 us/op 159.60 us/op 1.09
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 320.03 us/op 317.38 us/op 1.01
prioritizePeers score 0:0 att 64-1 sync 4-1 350.72 us/op 333.56 us/op 1.05
array of 16000 items push then shift 1.7058 us/op 1.5818 us/op 1.08
LinkedList of 16000 items push then shift 9.3300 ns/op 8.7610 ns/op 1.06
array of 16000 items push then pop 100.99 ns/op 82.861 ns/op 1.22
LinkedList of 16000 items push then pop 8.6910 ns/op 8.5250 ns/op 1.02
array of 24000 items push then shift 2.4793 us/op 2.3338 us/op 1.06
LinkedList of 24000 items push then shift 8.8360 ns/op 8.7430 ns/op 1.01
array of 24000 items push then pop 124.16 ns/op 102.43 ns/op 1.21
LinkedList of 24000 items push then pop 8.6830 ns/op 8.4490 ns/op 1.03
intersect bitArray bitLen 8 6.3650 ns/op 6.2420 ns/op 1.02
intersect array and set length 8 66.878 ns/op 59.985 ns/op 1.11
intersect bitArray bitLen 128 33.301 ns/op 33.098 ns/op 1.01
intersect array and set length 128 910.74 ns/op 829.06 ns/op 1.10
bitArray.getTrueBitIndexes() bitLen 128 1.7430 us/op 1.3580 us/op 1.28
bitArray.getTrueBitIndexes() bitLen 248 3.0830 us/op 2.3270 us/op 1.32
bitArray.getTrueBitIndexes() bitLen 512 6.0890 us/op 4.5050 us/op 1.35
Buffer.concat 32 items 992.00 ns/op 888.00 ns/op 1.12
Uint8Array.set 32 items 1.6480 us/op 1.5930 us/op 1.03
Set add up to 64 items then delete first 4.4280 us/op 4.2085 us/op 1.05
OrderedSet add up to 64 items then delete first 6.8545 us/op 5.2836 us/op 1.30
Set add up to 64 items then delete last 5.3975 us/op 4.5890 us/op 1.18
OrderedSet add up to 64 items then delete last 6.3469 us/op 5.6447 us/op 1.12
Set add up to 64 items then delete middle 4.9740 us/op 4.4479 us/op 1.12
OrderedSet add up to 64 items then delete middle 7.4081 us/op 6.8222 us/op 1.09
Set add up to 128 items then delete first 9.7028 us/op 9.1799 us/op 1.06
OrderedSet add up to 128 items then delete first 12.602 us/op 12.150 us/op 1.04
Set add up to 128 items then delete last 9.5225 us/op 9.1242 us/op 1.04
OrderedSet add up to 128 items then delete last 11.694 us/op 11.377 us/op 1.03
Set add up to 128 items then delete middle 9.2873 us/op 8.8459 us/op 1.05
OrderedSet add up to 128 items then delete middle 18.494 us/op 16.465 us/op 1.12
Set add up to 256 items then delete first 20.148 us/op 18.746 us/op 1.07
OrderedSet add up to 256 items then delete first 25.670 us/op 24.950 us/op 1.03
Set add up to 256 items then delete last 18.603 us/op 18.094 us/op 1.03
OrderedSet add up to 256 items then delete last 25.949 us/op 22.901 us/op 1.13
Set add up to 256 items then delete middle 19.745 us/op 17.600 us/op 1.12
OrderedSet add up to 256 items then delete middle 49.214 us/op 43.877 us/op 1.12
transfer serialized Status (84 B) 1.8650 us/op 1.6920 us/op 1.10
copy serialized Status (84 B) 1.6970 us/op 1.4580 us/op 1.16
transfer serialized SignedVoluntaryExit (112 B) 2.1580 us/op 2.0590 us/op 1.05
copy serialized SignedVoluntaryExit (112 B) 1.8100 us/op 1.7370 us/op 1.04
transfer serialized ProposerSlashing (416 B) 3.0760 us/op 2.8520 us/op 1.08
copy serialized ProposerSlashing (416 B) 2.3720 us/op 2.6770 us/op 0.89
transfer serialized Attestation (485 B) 2.6170 us/op 2.6390 us/op 0.99
copy serialized Attestation (485 B) 2.3880 us/op 2.9840 us/op 0.80
transfer serialized AttesterSlashing (33232 B) 2.6230 us/op 3.1810 us/op 0.82
copy serialized AttesterSlashing (33232 B) 6.5120 us/op 6.2910 us/op 1.04
transfer serialized Small SignedBeaconBlock (128000 B) 2.5730 us/op 2.8860 us/op 0.89
copy serialized Small SignedBeaconBlock (128000 B) 16.217 us/op 16.054 us/op 1.01
transfer serialized Avg SignedBeaconBlock (200000 B) 2.9170 us/op 3.2270 us/op 0.90
copy serialized Avg SignedBeaconBlock (200000 B) 24.449 us/op 22.421 us/op 1.09
transfer serialized BlobsSidecar (524380 B) 3.0880 us/op 2.8530 us/op 1.08
copy serialized BlobsSidecar (524380 B) 92.524 us/op 88.633 us/op 1.04
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2670 us/op 3.1240 us/op 1.05
copy serialized Big SignedBeaconBlock (1000000 B) 167.38 us/op 161.75 us/op 1.03
pass gossip attestations to forkchoice per slot 3.9373 ms/op 4.0058 ms/op 0.98
forkChoice updateHead vc 100000 bc 64 eq 0 670.08 us/op 719.43 us/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 0 5.0870 ms/op 5.1202 ms/op 0.99
forkChoice updateHead vc 1000000 bc 64 eq 0 7.0007 ms/op 6.8886 ms/op 1.02
forkChoice updateHead vc 600000 bc 320 eq 0 4.1253 ms/op 3.9607 ms/op 1.04
forkChoice updateHead vc 600000 bc 1200 eq 0 4.2363 ms/op 4.0298 ms/op 1.05
forkChoice updateHead vc 600000 bc 7200 eq 0 5.4507 ms/op 4.9291 ms/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 1000 11.172 ms/op 10.471 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 10000 12.082 ms/op 11.242 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 300000 17.648 ms/op 14.930 ms/op 1.18
computeDeltas 500000 validators 300 proto nodes 6.7484 ms/op 6.4080 ms/op 1.05
computeDeltas 500000 validators 1200 proto nodes 6.6482 ms/op 6.5627 ms/op 1.01
computeDeltas 500000 validators 7200 proto nodes 6.4140 ms/op 6.2924 ms/op 1.02
computeDeltas 750000 validators 300 proto nodes 9.7556 ms/op 9.5432 ms/op 1.02
computeDeltas 750000 validators 1200 proto nodes 9.8634 ms/op 9.5263 ms/op 1.04
computeDeltas 750000 validators 7200 proto nodes 9.7056 ms/op 9.5998 ms/op 1.01
computeDeltas 1400000 validators 300 proto nodes 19.139 ms/op 17.934 ms/op 1.07
computeDeltas 1400000 validators 1200 proto nodes 20.044 ms/op 17.833 ms/op 1.12
computeDeltas 1400000 validators 7200 proto nodes 20.498 ms/op 17.630 ms/op 1.16
computeDeltas 2100000 validators 300 proto nodes 32.440 ms/op 27.325 ms/op 1.19
computeDeltas 2100000 validators 1200 proto nodes 32.805 ms/op 27.603 ms/op 1.19
computeDeltas 2100000 validators 7200 proto nodes 32.413 ms/op 28.509 ms/op 1.14
computeProposerBoostScoreFromBalances 500000 validators 3.9974 ms/op 3.5905 ms/op 1.11
computeProposerBoostScoreFromBalances 750000 validators 4.3334 ms/op 3.6214 ms/op 1.20
computeProposerBoostScoreFromBalances 1400000 validators 3.9611 ms/op 3.6578 ms/op 1.08
computeProposerBoostScoreFromBalances 2100000 validators 3.8269 ms/op 3.6559 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei normalcase 2.3469 ms/op 2.2217 ms/op 1.06
altair processAttestation - 250000 vs - 7PWei worstcase 3.4680 ms/op 3.2264 ms/op 1.07
altair processAttestation - setStatus - 1/6 committees join 176.84 us/op 171.14 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 348.19 us/op 332.49 us/op 1.05
altair processAttestation - setStatus - 1/2 committees join 468.59 us/op 446.79 us/op 1.05
altair processAttestation - setStatus - 2/3 committees join 596.36 us/op 550.07 us/op 1.08
altair processAttestation - setStatus - 4/5 committees join 838.13 us/op 770.34 us/op 1.09
altair processAttestation - setStatus - 100% committees join 965.90 us/op 870.17 us/op 1.11
altair processBlock - 250000 vs - 7PWei normalcase 9.5919 ms/op 10.071 ms/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase hashState 34.890 ms/op 36.180 ms/op 0.96
altair processBlock - 250000 vs - 7PWei worstcase 36.559 ms/op 35.483 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 92.116 ms/op 92.005 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4575 ms/op 3.4608 ms/op 0.71
phase0 processBlock - 250000 vs - 7PWei worstcase 31.746 ms/op 31.258 ms/op 1.02
altair processEth1Data - 250000 vs - 7PWei normalcase 637.99 us/op 539.71 us/op 1.18
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 11.616 us/op 14.236 us/op 0.82
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 71.008 us/op 94.485 us/op 0.75
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 12.821 us/op 16.762 us/op 0.76
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 14.313 us/op 17.887 us/op 0.80
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 206.91 us/op 212.96 us/op 0.97
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.5118 ms/op 2.0891 ms/op 0.72
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.0866 ms/op 2.8574 ms/op 0.73
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6777 ms/op 2.2329 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9608 ms/op 3.3195 ms/op 1.19
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.7057 ms/op 2.1714 ms/op 1.25
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.2708 ms/op 4.6929 ms/op 1.12
Tree 40 250000 create 387.51 ms/op 347.23 ms/op 1.12
Tree 40 250000 get(125000) 209.84 ns/op 189.35 ns/op 1.11
Tree 40 250000 set(125000) 1.0195 us/op 970.46 ns/op 1.05
Tree 40 250000 toArray() 22.837 ms/op 18.870 ms/op 1.21
Tree 40 250000 iterate all - toArray() + loop 24.154 ms/op 18.874 ms/op 1.28
Tree 40 250000 iterate all - get(i) 71.140 ms/op 66.009 ms/op 1.08
MutableVector 250000 create 15.955 ms/op 16.656 ms/op 0.96
MutableVector 250000 get(125000) 6.5320 ns/op 6.3550 ns/op 1.03
MutableVector 250000 set(125000) 282.57 ns/op 252.79 ns/op 1.12
MutableVector 250000 toArray() 3.4859 ms/op 3.2358 ms/op 1.08
MutableVector 250000 iterate all - toArray() + loop 4.3891 ms/op 3.2470 ms/op 1.35
MutableVector 250000 iterate all - get(i) 1.5373 ms/op 1.4793 ms/op 1.04
Array 250000 create 4.3808 ms/op 2.7956 ms/op 1.57
Array 250000 clone - spread 1.2649 ms/op 1.2731 ms/op 0.99
Array 250000 get(125000) 1.0860 ns/op 1.0200 ns/op 1.06
Array 250000 set(125000) 4.5240 ns/op 4.0770 ns/op 1.11
Array 250000 iterate all - loop 183.60 us/op 161.92 us/op 1.13
effectiveBalanceIncrements clone Uint8Array 300000 34.926 us/op 26.647 us/op 1.31
effectiveBalanceIncrements clone MutableVector 300000 347.00 ns/op 366.00 ns/op 0.95
effectiveBalanceIncrements rw all Uint8Array 300000 210.87 us/op 194.48 us/op 1.08
effectiveBalanceIncrements rw all MutableVector 300000 85.606 ms/op 82.126 ms/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 116.10 ms/op 109.44 ms/op 1.06
phase0 beforeProcessEpoch - 250000 vs - 7PWei 48.085 ms/op 53.800 ms/op 0.89
altair processEpoch - mainnet_e81889 512.31 ms/op 519.62 ms/op 0.99
mainnet_e81889 - altair beforeProcessEpoch 80.546 ms/op 78.556 ms/op 1.03
mainnet_e81889 - altair processJustificationAndFinalization 17.513 us/op 22.938 us/op 0.76
mainnet_e81889 - altair processInactivityUpdates 5.7238 ms/op 5.4911 ms/op 1.04
mainnet_e81889 - altair processRewardsAndPenalties 60.688 ms/op 72.962 ms/op 0.83
mainnet_e81889 - altair processRegistryUpdates 2.3700 us/op 3.9670 us/op 0.60
mainnet_e81889 - altair processSlashings 647.00 ns/op 717.00 ns/op 0.90
mainnet_e81889 - altair processEth1DataReset 615.00 ns/op 766.00 ns/op 0.80
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5168 ms/op 2.5904 ms/op 0.59
mainnet_e81889 - altair processSlashingsReset 6.1280 us/op 6.2860 us/op 0.97
mainnet_e81889 - altair processRandaoMixesReset 8.1350 us/op 8.1360 us/op 1.00
mainnet_e81889 - altair processHistoricalRootsUpdate 764.00 ns/op 916.00 ns/op 0.83
mainnet_e81889 - altair processParticipationFlagUpdates 2.2480 us/op 3.8570 us/op 0.58
mainnet_e81889 - altair processSyncCommitteeUpdates 738.00 ns/op 1.0630 us/op 0.69
mainnet_e81889 - altair afterProcessEpoch 120.59 ms/op 116.83 ms/op 1.03
capella processEpoch - mainnet_e217614 2.2540 s/op 2.2645 s/op 1.00
mainnet_e217614 - capella beforeProcessEpoch 444.72 ms/op 452.75 ms/op 0.98
mainnet_e217614 - capella processJustificationAndFinalization 16.906 us/op 18.230 us/op 0.93
mainnet_e217614 - capella processInactivityUpdates 19.907 ms/op 19.164 ms/op 1.04
mainnet_e217614 - capella processRewardsAndPenalties 417.64 ms/op 412.86 ms/op 1.01
mainnet_e217614 - capella processRegistryUpdates 35.549 us/op 28.128 us/op 1.26
mainnet_e217614 - capella processSlashings 1.1360 us/op 824.00 ns/op 1.38
mainnet_e217614 - capella processEth1DataReset 853.00 ns/op 720.00 ns/op 1.18
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.9000 ms/op 4.9102 ms/op 1.20
mainnet_e217614 - capella processSlashingsReset 5.6110 us/op 3.9550 us/op 1.42
mainnet_e217614 - capella processRandaoMixesReset 6.0260 us/op 6.9890 us/op 0.86
mainnet_e217614 - capella processHistoricalRootsUpdate 1.1090 us/op 979.00 ns/op 1.13
mainnet_e217614 - capella processParticipationFlagUpdates 3.2580 us/op 3.3360 us/op 0.98
mainnet_e217614 - capella afterProcessEpoch 335.47 ms/op 286.22 ms/op 1.17
phase0 processEpoch - mainnet_e58758 434.09 ms/op 471.45 ms/op 0.92
mainnet_e58758 - phase0 beforeProcessEpoch 132.13 ms/op 151.88 ms/op 0.87
mainnet_e58758 - phase0 processJustificationAndFinalization 20.286 us/op 25.387 us/op 0.80
mainnet_e58758 - phase0 processRewardsAndPenalties 57.092 ms/op 60.222 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 11.987 us/op 14.165 us/op 0.85
mainnet_e58758 - phase0 processSlashings 587.00 ns/op 861.00 ns/op 0.68
mainnet_e58758 - phase0 processEth1DataReset 446.00 ns/op 657.00 ns/op 0.68
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1724 ms/op 2.1616 ms/op 0.54
mainnet_e58758 - phase0 processSlashingsReset 3.8650 us/op 4.3730 us/op 0.88
mainnet_e58758 - phase0 processRandaoMixesReset 4.6050 us/op 6.3850 us/op 0.72
mainnet_e58758 - phase0 processHistoricalRootsUpdate 403.00 ns/op 653.00 ns/op 0.62
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.7410 us/op 4.9200 us/op 0.76
mainnet_e58758 - phase0 afterProcessEpoch 101.28 ms/op 94.514 ms/op 1.07
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3988 ms/op 2.4886 ms/op 0.56
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7472 ms/op 2.6895 ms/op 0.65
altair processInactivityUpdates - 250000 normalcase 24.026 ms/op 27.062 ms/op 0.89
altair processInactivityUpdates - 250000 worstcase 23.954 ms/op 31.394 ms/op 0.76
phase0 processRegistryUpdates - 250000 normalcase 9.4830 us/op 11.032 us/op 0.86
phase0 processRegistryUpdates - 250000 badcase_full_deposits 386.72 us/op 617.43 us/op 0.63
phase0 processRegistryUpdates - 250000 worstcase 0.5 139.88 ms/op 122.35 ms/op 1.14
altair processRewardsAndPenalties - 250000 normalcase 57.298 ms/op 65.473 ms/op 0.88
altair processRewardsAndPenalties - 250000 worstcase 56.735 ms/op 63.254 ms/op 0.90
phase0 getAttestationDeltas - 250000 normalcase 9.7458 ms/op 8.4964 ms/op 1.15
phase0 getAttestationDeltas - 250000 worstcase 11.143 ms/op 8.5149 ms/op 1.31
phase0 processSlashings - 250000 worstcase 95.808 us/op 132.70 us/op 0.72
altair processSyncCommitteeUpdates - 250000 177.40 ms/op 156.13 ms/op 1.14
BeaconState.hashTreeRoot - No change 300.00 ns/op 232.00 ns/op 1.29
BeaconState.hashTreeRoot - 1 full validator 145.25 us/op 143.72 us/op 1.01
BeaconState.hashTreeRoot - 32 full validator 1.8595 ms/op 1.6988 ms/op 1.09
BeaconState.hashTreeRoot - 512 full validator 16.272 ms/op 18.722 ms/op 0.87
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 177.88 us/op 209.62 us/op 0.85
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.3218 ms/op 2.9605 ms/op 0.78
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 31.630 ms/op 40.666 ms/op 0.78
BeaconState.hashTreeRoot - 1 balances 138.95 us/op 172.29 us/op 0.81
BeaconState.hashTreeRoot - 32 balances 1.3271 ms/op 1.5157 ms/op 0.88
BeaconState.hashTreeRoot - 512 balances 15.253 ms/op 13.488 ms/op 1.13
BeaconState.hashTreeRoot - 250000 balances 195.47 ms/op 226.13 ms/op 0.86
aggregationBits - 2048 els - zipIndexesInBitList 23.016 us/op 16.840 us/op 1.37
byteArrayEquals 32 75.511 ns/op 71.868 ns/op 1.05
Buffer.compare 32 56.287 ns/op 53.054 ns/op 1.06
byteArrayEquals 1024 2.0597 us/op 1.9609 us/op 1.05
Buffer.compare 1024 76.474 ns/op 67.485 ns/op 1.13
byteArrayEquals 16384 32.928 us/op 31.237 us/op 1.05
Buffer.compare 16384 270.25 ns/op 261.56 ns/op 1.03
byteArrayEquals 123687377 249.67 ms/op 242.66 ms/op 1.03
Buffer.compare 123687377 7.4351 ms/op 6.1094 ms/op 1.22
byteArrayEquals 32 - diff last byte 81.140 ns/op 71.367 ns/op 1.14
Buffer.compare 32 - diff last byte 59.140 ns/op 58.118 ns/op 1.02
byteArrayEquals 1024 - diff last byte 2.1036 us/op 1.9693 us/op 1.07
Buffer.compare 1024 - diff last byte 74.636 ns/op 68.669 ns/op 1.09
byteArrayEquals 16384 - diff last byte 33.368 us/op 31.432 us/op 1.06
Buffer.compare 16384 - diff last byte 255.22 ns/op 249.55 ns/op 1.02
byteArrayEquals 123687377 - diff last byte 257.44 ms/op 230.83 ms/op 1.12
Buffer.compare 123687377 - diff last byte 9.7981 ms/op 6.0457 ms/op 1.62
byteArrayEquals 32 - random bytes 6.6380 ns/op 4.9260 ns/op 1.35
Buffer.compare 32 - random bytes 63.444 ns/op 56.810 ns/op 1.12
byteArrayEquals 1024 - random bytes 6.2280 ns/op 4.8440 ns/op 1.29
Buffer.compare 1024 - random bytes 61.174 ns/op 56.289 ns/op 1.09
byteArrayEquals 16384 - random bytes 5.4810 ns/op 4.8370 ns/op 1.13
Buffer.compare 16384 - random bytes 62.168 ns/op 56.641 ns/op 1.10
byteArrayEquals 123687377 - random bytes 8.7300 ns/op 7.6600 ns/op 1.14
Buffer.compare 123687377 - random bytes 68.110 ns/op 59.080 ns/op 1.15
regular array get 100000 times 45.872 us/op 41.319 us/op 1.11
wrappedArray get 100000 times 45.786 us/op 41.412 us/op 1.11
arrayWithProxy get 100000 times 15.809 ms/op 14.652 ms/op 1.08
ssz.Root.equals 55.848 ns/op 53.055 ns/op 1.05
byteArrayEquals 54.753 ns/op 52.170 ns/op 1.05
Buffer.compare 11.743 ns/op 10.652 ns/op 1.10
shuffle list - 16384 els 6.9427 ms/op 6.7463 ms/op 1.03
shuffle list - 250000 els 105.78 ms/op 99.956 ms/op 1.06
processSlot - 1 slots 18.590 us/op 18.299 us/op 1.02
processSlot - 32 slots 3.1416 ms/op 3.3333 ms/op 0.94
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 56.764 ms/op 59.612 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 2.5022 ms/op 2.4814 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 3.7058 ms/op 3.6492 ms/op 1.02
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0364 ms/op 3.9909 ms/op 1.01
findModifiedValidators - 10000 modified validators 529.11 ms/op 542.18 ms/op 0.98
findModifiedValidators - 1000 modified validators 412.59 ms/op 412.23 ms/op 1.00
findModifiedValidators - 100 modified validators 408.08 ms/op 352.91 ms/op 1.16
findModifiedValidators - 10 modified validators 405.95 ms/op 385.94 ms/op 1.05
findModifiedValidators - 1 modified validators 388.24 ms/op 397.51 ms/op 0.98
findModifiedValidators - no difference 415.95 ms/op 416.14 ms/op 1.00
compare ViewDUs 4.5839 s/op 5.0722 s/op 0.90
compare each validator Uint8Array 1.9217 s/op 1.5912 s/op 1.21
compare ViewDU to Uint8Array 1.3237 s/op 1.0794 s/op 1.23
migrate state 1000000 validators, 24 modified, 0 new 769.20 ms/op 897.63 ms/op 0.86
migrate state 1000000 validators, 1700 modified, 1000 new 1.1734 s/op 1.1896 s/op 0.99
migrate state 1000000 validators, 3400 modified, 2000 new 1.3567 s/op 1.4153 s/op 0.96
migrate state 1500000 validators, 24 modified, 0 new 812.28 ms/op 898.74 ms/op 0.90
migrate state 1500000 validators, 1700 modified, 1000 new 1.0580 s/op 1.1975 s/op 0.88
migrate state 1500000 validators, 3400 modified, 2000 new 1.4239 s/op 1.3649 s/op 1.04
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8700 ns/op 4.0200 ns/op 1.21
state getBlockRootAtSlot - 250000 vs - 7PWei 965.91 ns/op 926.66 ns/op 1.04
computeProposers - vc 250000 10.303 ms/op 8.5250 ms/op 1.21
computeEpochShuffling - vc 250000 107.41 ms/op 100.77 ms/op 1.07
getNextSyncCommittee - vc 250000 163.77 ms/op 147.26 ms/op 1.11
computeSigningRoot for AttestationData 33.146 us/op 27.681 us/op 1.20
hash AttestationData serialized data then Buffer.toString(base64) 2.4146 us/op 2.2381 us/op 1.08
toHexString serialized data 1.1451 us/op 1.0545 us/op 1.09
Buffer.toString(base64) 249.71 ns/op 212.35 ns/op 1.18

by benchmarkbot/action

@nflaig nflaig added this to the v1.12.1 milestone Dec 5, 2023
@philknows
Copy link
Member

Do you think we'll get results of your hypothesis by Friday @tuyennhv ? This would be great if it fixes the leak ... and if it requires delaying v1.12.1 until early next week, we can consider that too.

@twoeths
Copy link
Contributor Author

twoeths commented Dec 6, 2023

Do you think we'll get results of your hypothesis by Friday @tuyennhv ? This would be great if it fixes the leak ... and if it requires delaying v1.12.1 until early next week, we can consider that too.

@philknows yes I think we'll get confirmation by Friday

@philknows
Copy link
Member

We may have to push v1.12.1 to early next week, so you can continue capturing data over the weekend to confirm your thesis.

@twoeths
Copy link
Contributor Author

twoeths commented Dec 8, 2023

posting metrics in the last 3 days since Dec 05

  • The 1k node has some memory increased but it didn't keep increasing like before
Screenshot 2023-12-08 at 08 35 52
  • The 16 validator node does not show any memory issue like before
Screenshot 2023-12-08 at 08 36 33
  • The 64 validator node is quite confusing, memory pattern is kind of similar to before
Screenshot 2023-12-08 at 08 38 00

I'd merge this PR through as there is no down side with it https://github.com/ChainSafe/js-libp2p-gossipsub/releases/tag/v10.1.1 @wemeetagain can confirm

@twoeths twoeths marked this pull request as ready for review December 8, 2023 01:40
@twoeths twoeths requested a review from a team as a code owner December 8, 2023 01:40
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.

lgtm

@wemeetagain wemeetagain merged commit ad3b5c0 into unstable Dec 8, 2023
15 checks passed
@wemeetagain wemeetagain deleted the tuyen/libp2p-gossipsub_10.1.1 branch December 8, 2023 03:42
@twoeths
Copy link
Contributor Author

twoeths commented Dec 11, 2023

update the 64 validator node metrics, it does not seem to be a leak cc @philknows

Screenshot 2023-12-11 at 08 35 20

@twoeths twoeths mentioned this pull request Dec 11, 2023
philknows pushed a commit that referenced this pull request Dec 12, 2023
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.12.1 🎉

@twoeths
Copy link
Contributor Author

twoeths commented Dec 13, 2023

posting last snapshot for the 64 validator node, memory gets back to normal in the end after 8 days of deployment

Screenshot 2023-12-13 at 09 37 34

@wemeetagain
Copy link
Member

🎉 This PR is included in v1.13.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.

4 participants