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: update libp2p #6285

Merged
merged 15 commits into from
Jan 16, 2024
Merged

feat: update libp2p #6285

merged 15 commits into from
Jan 16, 2024

Conversation

wemeetagain
Copy link
Member

  • update libp2p to v1.x (and associated dependencies)
  • revamp libp2p dashboard with relevant metrics
  • deployed to feat3 on Jan 11

@wemeetagain wemeetagain requested a review from a team as a code owner January 11, 2024 22:10
"@chainsafe/libp2p-noise": "^13.0.1",
"@chainsafe/discv5": "^7.1.0",
"@chainsafe/enr": "^2.0.2",
"@chainsafe/libp2p-gossipsub": "^11.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

@wemeetagain is it worth to use v11.1.0 for this upgrade? that's for batchPublish option ChainSafe/js-libp2p-gossipsub#482

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, we can upgrade it to 11.1.0. Should we turn on batchPublish in certain places?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes just need to add a new option to Eth2Gossipsub constructor batchPublish: true. That PR need to release first

Copy link
Contributor

Choose a reason for hiding this comment

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

found some weird metrics with batchPublish option so let's not do it in this PR. "Validator miss ratio" is so high and balance delta is so high too (first half is with batchPublish as true and 2nd half is false)

Screenshot 2024-01-16 at 20 19 40

Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Merging #6285 (9ed3066) into unstable (4ff2911) will decrease coverage by 0.01%.
Report is 3 commits behind head on unstable.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6285      +/-   ##
============================================
- Coverage     80.38%   80.38%   -0.01%     
============================================
  Files           202      202              
  Lines         19620    19618       -2     
  Branches       1176     1176              
============================================
- Hits          15771    15769       -2     
  Misses         3821     3821              
  Partials         28       28              

Copy link
Contributor

github-actions bot commented Jan 15, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 4408f55 Previous: 4ff2911 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 858.13 us/op 790.42 us/op 1.09
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 59.528 us/op 80.935 us/op 0.74
BLS verify - blst-native 1.0546 ms/op 1.3015 ms/op 0.81
BLS verifyMultipleSignatures 3 - blst-native 2.2623 ms/op 2.7542 ms/op 0.82
BLS verifyMultipleSignatures 8 - blst-native 4.9749 ms/op 6.1017 ms/op 0.82
BLS verifyMultipleSignatures 32 - blst-native 18.226 ms/op 22.375 ms/op 0.81
BLS verifyMultipleSignatures 64 - blst-native 35.942 ms/op 43.855 ms/op 0.82
BLS verifyMultipleSignatures 128 - blst-native 71.363 ms/op 86.832 ms/op 0.82
BLS deserializing 10000 signatures 784.39 ms/op 928.19 ms/op 0.85
BLS deserializing 100000 signatures 8.1725 s/op 9.3938 s/op 0.87
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1893 ms/op 1.3394 ms/op 0.89
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.3447 ms/op 1.5185 ms/op 0.89
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.1190 ms/op 2.3234 ms/op 0.91
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.0378 ms/op 4.4427 ms/op 0.91
BLS verifyMultipleSignatures - same message - 128 - blst-native 4.8638 ms/op 7.8803 ms/op 0.62
BLS aggregatePubkeys 32 - blst-native 22.163 us/op 26.029 us/op 0.85
BLS aggregatePubkeys 128 - blst-native 85.816 us/op 100.23 us/op 0.86
getAttestationsForBlock 42.278 ms/op 49.463 ms/op 0.85
getSlashingsAndExits - default max 129.53 us/op 158.89 us/op 0.82
getSlashingsAndExits - 2k 354.25 us/op 370.92 us/op 0.96
proposeBlockBody type=full, size=empty 3.7672 ms/op 4.9057 ms/op 0.77
isKnown best case - 1 super set check 316.00 ns/op 320.00 ns/op 0.99
isKnown normal case - 2 super set checks 291.00 ns/op 314.00 ns/op 0.93
isKnown worse case - 16 super set checks 315.00 ns/op 309.00 ns/op 1.02
CheckpointStateCache - add get delete 3.7270 us/op 5.8350 us/op 0.64
validate api signedAggregateAndProof - struct 2.3132 ms/op 2.7171 ms/op 0.85
validate gossip signedAggregateAndProof - struct 2.3064 ms/op 2.7186 ms/op 0.85
validate gossip attestation - vc 640000 1.1078 ms/op 1.3136 ms/op 0.84
batch validate gossip attestation - vc 640000 - chunk 32 135.64 us/op 156.85 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 64 136.71 us/op 143.75 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 128 140.43 us/op 131.74 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 256 129.88 us/op 128.63 us/op 1.01
pickEth1Vote - no votes 1.2701 ms/op 1.2189 ms/op 1.04
pickEth1Vote - max votes 12.811 ms/op 10.697 ms/op 1.20
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.620 ms/op 18.045 ms/op 1.20
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 29.648 ms/op 26.088 ms/op 1.14
pickEth1Vote - Eth1Data fastSerialize value x2048 527.16 us/op 575.92 us/op 0.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.4060 ms/op 6.1417 ms/op 1.04
bytes32 toHexString 658.00 ns/op 476.00 ns/op 1.38
bytes32 Buffer.toString(hex) 428.00 ns/op 274.00 ns/op 1.56
bytes32 Buffer.toString(hex) from Uint8Array 576.00 ns/op 395.00 ns/op 1.46
bytes32 Buffer.toString(hex) + 0x 378.00 ns/op 275.00 ns/op 1.37
Object access 1 prop 0.22800 ns/op 0.14800 ns/op 1.54
Map access 1 prop 0.20400 ns/op 0.13800 ns/op 1.48
Object get x1000 5.3410 ns/op 7.3300 ns/op 0.73
Map get x1000 0.79900 ns/op 0.70200 ns/op 1.14
Object set x1000 36.009 ns/op 47.136 ns/op 0.76
Map set x1000 19.946 ns/op 36.368 ns/op 0.55
Return object 10000 times 0.23730 ns/op 0.22460 ns/op 1.06
Throw Error 10000 times 2.8134 us/op 3.6671 us/op 0.77
fastMsgIdFn sha256 / 200 bytes 2.1750 us/op 3.1190 us/op 0.70
fastMsgIdFn h32 xxhash / 200 bytes 381.00 ns/op 275.00 ns/op 1.39
fastMsgIdFn h64 xxhash / 200 bytes 420.00 ns/op 337.00 ns/op 1.25
fastMsgIdFn sha256 / 1000 bytes 6.3240 us/op 10.823 us/op 0.58
fastMsgIdFn h32 xxhash / 1000 bytes 536.00 ns/op 396.00 ns/op 1.35
fastMsgIdFn h64 xxhash / 1000 bytes 459.00 ns/op 393.00 ns/op 1.17
fastMsgIdFn sha256 / 10000 bytes 51.471 us/op 99.559 us/op 0.52
fastMsgIdFn h32 xxhash / 10000 bytes 1.8530 us/op 1.8430 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.2940 us/op 1.2710 us/op 1.02
send data - 1000 256B messages 16.087 ms/op 17.545 ms/op 0.92
send data - 1000 512B messages 18.246 ms/op 25.348 ms/op 0.72
send data - 1000 1024B messages 31.043 ms/op 39.271 ms/op 0.79
send data - 1000 1200B messages 28.381 ms/op 37.281 ms/op 0.76
send data - 1000 2048B messages 46.816 ms/op 42.997 ms/op 1.09
send data - 1000 4096B messages 36.628 ms/op 40.091 ms/op 0.91
send data - 1000 16384B messages 93.552 ms/op 115.93 ms/op 0.81
send data - 1000 65536B messages 468.66 ms/op 451.35 ms/op 1.04
enrSubnets - fastDeserialize 64 bits 1.1540 us/op 1.2390 us/op 0.93
enrSubnets - ssz BitVector 64 bits 524.00 ns/op 418.00 ns/op 1.25
enrSubnets - fastDeserialize 4 bits 211.00 ns/op 173.00 ns/op 1.22
enrSubnets - ssz BitVector 4 bits 483.00 ns/op 409.00 ns/op 1.18
prioritizePeers score -10:0 att 32-0.1 sync 2-0 79.739 us/op 98.759 us/op 0.81
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 90.197 us/op 119.74 us/op 0.75
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 122.32 us/op 155.55 us/op 0.79
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 185.62 us/op 278.17 us/op 0.67
prioritizePeers score 0:0 att 64-1 sync 4-1 210.22 us/op 324.54 us/op 0.65
array of 16000 items push then shift 1.3321 us/op 1.5390 us/op 0.87
LinkedList of 16000 items push then shift 6.4500 ns/op 8.6190 ns/op 0.75
array of 16000 items push then pop 56.451 ns/op 72.656 ns/op 0.78
LinkedList of 16000 items push then pop 5.7710 ns/op 8.3760 ns/op 0.69
array of 24000 items push then shift 2.0408 us/op 2.2840 us/op 0.89
LinkedList of 24000 items push then shift 5.8910 ns/op 8.5720 ns/op 0.69
array of 24000 items push then pop 85.429 ns/op 110.05 ns/op 0.78
LinkedList of 24000 items push then pop 5.8550 ns/op 8.3110 ns/op 0.70
intersect bitArray bitLen 8 5.0070 ns/op 6.1340 ns/op 0.82
intersect array and set length 8 48.269 ns/op 60.318 ns/op 0.80
intersect bitArray bitLen 128 27.491 ns/op 32.565 ns/op 0.84
intersect array and set length 128 686.21 ns/op 816.37 ns/op 0.84
bitArray.getTrueBitIndexes() bitLen 128 1.0920 us/op 1.4100 us/op 0.77
bitArray.getTrueBitIndexes() bitLen 248 1.8050 us/op 2.3900 us/op 0.76
bitArray.getTrueBitIndexes() bitLen 512 3.4480 us/op 4.7750 us/op 0.72
Buffer.concat 32 items 828.00 ns/op 959.00 ns/op 0.86
Uint8Array.set 32 items 2.2840 us/op 1.9970 us/op 1.14
Set add up to 64 items then delete first 1.6453 us/op 4.2766 us/op 0.38
OrderedSet add up to 64 items then delete first 2.4852 us/op 5.3239 us/op 0.47
Set add up to 64 items then delete last 1.9023 us/op 4.4071 us/op 0.43
OrderedSet add up to 64 items then delete last 2.7764 us/op 5.4437 us/op 0.51
Set add up to 64 items then delete middle 1.8824 us/op 4.3592 us/op 0.43
OrderedSet add up to 64 items then delete middle 3.9524 us/op 6.6675 us/op 0.59
Set add up to 128 items then delete first 3.9776 us/op 8.8194 us/op 0.45
OrderedSet add up to 128 items then delete first 8.6089 us/op 12.050 us/op 0.71
Set add up to 128 items then delete last 5.4660 us/op 8.9694 us/op 0.61
OrderedSet add up to 128 items then delete last 7.7811 us/op 11.249 us/op 0.69
Set add up to 128 items then delete middle 4.5279 us/op 8.9656 us/op 0.51
OrderedSet add up to 128 items then delete middle 10.971 us/op 16.603 us/op 0.66
Set add up to 256 items then delete first 7.5297 us/op 18.457 us/op 0.41
OrderedSet add up to 256 items then delete first 12.096 us/op 24.903 us/op 0.49
Set add up to 256 items then delete last 8.4437 us/op 17.955 us/op 0.47
OrderedSet add up to 256 items then delete last 15.814 us/op 22.709 us/op 0.70
Set add up to 256 items then delete middle 10.787 us/op 17.827 us/op 0.61
OrderedSet add up to 256 items then delete middle 29.964 us/op 44.808 us/op 0.67
transfer serialized Status (84 B) 1.5620 us/op 1.7300 us/op 0.90
copy serialized Status (84 B) 1.4860 us/op 1.4500 us/op 1.02
transfer serialized SignedVoluntaryExit (112 B) 1.8170 us/op 1.9570 us/op 0.93
copy serialized SignedVoluntaryExit (112 B) 1.5440 us/op 1.6090 us/op 0.96
transfer serialized ProposerSlashing (416 B) 2.7800 us/op 3.0070 us/op 0.92
copy serialized ProposerSlashing (416 B) 3.0510 us/op 2.9280 us/op 1.04
transfer serialized Attestation (485 B) 2.8620 us/op 3.1300 us/op 0.91
copy serialized Attestation (485 B) 2.6450 us/op 2.9280 us/op 0.90
transfer serialized AttesterSlashing (33232 B) 2.5270 us/op 3.0570 us/op 0.83
copy serialized AttesterSlashing (33232 B) 5.1370 us/op 6.0850 us/op 0.84
transfer serialized Small SignedBeaconBlock (128000 B) 3.1350 us/op 3.1580 us/op 0.99
copy serialized Small SignedBeaconBlock (128000 B) 9.5890 us/op 14.113 us/op 0.68
transfer serialized Avg SignedBeaconBlock (200000 B) 3.0250 us/op 3.5600 us/op 0.85
copy serialized Avg SignedBeaconBlock (200000 B) 13.355 us/op 20.032 us/op 0.67
transfer serialized BlobsSidecar (524380 B) 3.0890 us/op 3.3220 us/op 0.93
copy serialized BlobsSidecar (524380 B) 73.509 us/op 81.919 us/op 0.90
transfer serialized Big SignedBeaconBlock (1000000 B) 3.4750 us/op 3.6740 us/op 0.95
copy serialized Big SignedBeaconBlock (1000000 B) 134.34 us/op 148.79 us/op 0.90
pass gossip attestations to forkchoice per slot 2.6960 ms/op 3.8246 ms/op 0.70
forkChoice updateHead vc 100000 bc 64 eq 0 474.14 us/op 660.19 us/op 0.72
forkChoice updateHead vc 600000 bc 64 eq 0 3.2810 ms/op 4.4605 ms/op 0.74
forkChoice updateHead vc 1000000 bc 64 eq 0 4.2246 ms/op 6.9217 ms/op 0.61
forkChoice updateHead vc 600000 bc 320 eq 0 2.7069 ms/op 4.1475 ms/op 0.65
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0292 ms/op 4.2859 ms/op 0.71
forkChoice updateHead vc 600000 bc 7200 eq 0 4.3255 ms/op 5.1188 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 1000 10.361 ms/op 11.180 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 10000 10.052 ms/op 11.816 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 300000 16.680 ms/op 15.579 ms/op 1.07
computeDeltas 500000 validators 300 proto nodes 3.3362 ms/op 6.5100 ms/op 0.51
computeDeltas 500000 validators 1200 proto nodes 3.1378 ms/op 6.3606 ms/op 0.49
computeDeltas 500000 validators 7200 proto nodes 3.3857 ms/op 6.3198 ms/op 0.54
computeDeltas 750000 validators 300 proto nodes 5.4852 ms/op 9.2726 ms/op 0.59
computeDeltas 750000 validators 1200 proto nodes 5.8425 ms/op 9.3949 ms/op 0.62
computeDeltas 750000 validators 7200 proto nodes 5.2294 ms/op 9.4504 ms/op 0.55
computeDeltas 1400000 validators 300 proto nodes 10.460 ms/op 18.846 ms/op 0.56
computeDeltas 1400000 validators 1200 proto nodes 9.3327 ms/op 18.823 ms/op 0.50
computeDeltas 1400000 validators 7200 proto nodes 9.5250 ms/op 18.532 ms/op 0.51
computeDeltas 2100000 validators 300 proto nodes 14.138 ms/op 28.620 ms/op 0.49
computeDeltas 2100000 validators 1200 proto nodes 14.457 ms/op 27.150 ms/op 0.53
computeDeltas 2100000 validators 7200 proto nodes 14.781 ms/op 27.829 ms/op 0.53
computeProposerBoostScoreFromBalances 500000 validators 3.6058 ms/op 3.6500 ms/op 0.99
computeProposerBoostScoreFromBalances 750000 validators 3.6582 ms/op 3.5938 ms/op 1.02
computeProposerBoostScoreFromBalances 1400000 validators 3.4616 ms/op 3.5832 ms/op 0.97
computeProposerBoostScoreFromBalances 2100000 validators 3.3094 ms/op 3.6292 ms/op 0.91
altair processAttestation - 250000 vs - 7PWei normalcase 1.7627 ms/op 2.0451 ms/op 0.86
altair processAttestation - 250000 vs - 7PWei worstcase 2.7155 ms/op 3.0241 ms/op 0.90
altair processAttestation - setStatus - 1/6 committees join 101.28 us/op 139.07 us/op 0.73
altair processAttestation - setStatus - 1/3 committees join 166.57 us/op 272.95 us/op 0.61
altair processAttestation - setStatus - 1/2 committees join 243.13 us/op 371.71 us/op 0.65
altair processAttestation - setStatus - 2/3 committees join 330.72 us/op 457.49 us/op 0.72
altair processAttestation - setStatus - 4/5 committees join 417.12 us/op 655.43 us/op 0.64
altair processAttestation - setStatus - 100% committees join 519.74 us/op 758.18 us/op 0.69
altair processBlock - 250000 vs - 7PWei normalcase 9.0159 ms/op 9.7957 ms/op 0.92
altair processBlock - 250000 vs - 7PWei normalcase hashState 34.746 ms/op 33.317 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase 33.456 ms/op 35.864 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 82.328 ms/op 88.727 ms/op 0.93
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3803 ms/op 2.4592 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei worstcase 29.057 ms/op 30.141 ms/op 0.96
altair processEth1Data - 250000 vs - 7PWei normalcase 376.06 us/op 503.90 us/op 0.75
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.7100 us/op 12.199 us/op 0.71
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 59.069 us/op 57.078 us/op 1.03
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 16.120 us/op 10.631 us/op 1.52
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 13.437 us/op 9.6820 us/op 1.39
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 172.21 us/op 130.14 us/op 1.32
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1330 ms/op 1.0699 ms/op 1.06
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1990 ms/op 1.5594 ms/op 0.77
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2988 ms/op 1.5198 ms/op 0.85
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.8850 ms/op 3.2428 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9925 ms/op 2.2669 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.2308 ms/op 4.4695 ms/op 0.95
Tree 40 250000 create 336.52 ms/op 336.21 ms/op 1.00
Tree 40 250000 get(125000) 132.32 ns/op 197.93 ns/op 0.67
Tree 40 250000 set(125000) 927.45 ns/op 978.60 ns/op 0.95
Tree 40 250000 toArray() 19.825 ms/op 18.555 ms/op 1.07
Tree 40 250000 iterate all - toArray() + loop 12.902 ms/op 18.713 ms/op 0.69
Tree 40 250000 iterate all - get(i) 47.313 ms/op 64.208 ms/op 0.74
MutableVector 250000 create 13.238 ms/op 13.648 ms/op 0.97
MutableVector 250000 get(125000) 5.8670 ns/op 6.3780 ns/op 0.92
MutableVector 250000 set(125000) 215.71 ns/op 267.42 ns/op 0.81
MutableVector 250000 toArray() 3.8010 ms/op 2.9909 ms/op 1.27
MutableVector 250000 iterate all - toArray() + loop 3.9205 ms/op 3.6905 ms/op 1.06
MutableVector 250000 iterate all - get(i) 1.3852 ms/op 1.8969 ms/op 0.73
Array 250000 create 3.0240 ms/op 2.7935 ms/op 1.08
Array 250000 clone - spread 1.1389 ms/op 1.2348 ms/op 0.92
Array 250000 get(125000) 1.0210 ns/op 1.0270 ns/op 0.99
Array 250000 set(125000) 1.2260 ns/op 4.0590 ns/op 0.30
Array 250000 iterate all - loop 155.53 us/op 163.76 us/op 0.95
effectiveBalanceIncrements clone Uint8Array 300000 17.471 us/op 26.326 us/op 0.66
effectiveBalanceIncrements clone MutableVector 300000 310.00 ns/op 364.00 ns/op 0.85
effectiveBalanceIncrements rw all Uint8Array 300000 191.43 us/op 197.45 us/op 0.97
effectiveBalanceIncrements rw all MutableVector 300000 158.32 ms/op 80.961 ms/op 1.96
phase0 afterProcessEpoch - 250000 vs - 7PWei 86.550 ms/op 111.13 ms/op 0.78
phase0 beforeProcessEpoch - 250000 vs - 7PWei 53.837 ms/op 51.951 ms/op 1.04
altair processEpoch - mainnet_e81889 402.56 ms/op 496.82 ms/op 0.81
mainnet_e81889 - altair beforeProcessEpoch 73.839 ms/op 80.107 ms/op 0.92
mainnet_e81889 - altair processJustificationAndFinalization 14.473 us/op 14.500 us/op 1.00
mainnet_e81889 - altair processInactivityUpdates 3.9826 ms/op 5.4021 ms/op 0.74
mainnet_e81889 - altair processRewardsAndPenalties 56.391 ms/op 60.038 ms/op 0.94
mainnet_e81889 - altair processRegistryUpdates 4.6930 us/op 2.5020 us/op 1.88
mainnet_e81889 - altair processSlashings 803.00 ns/op 426.00 ns/op 1.88
mainnet_e81889 - altair processEth1DataReset 908.00 ns/op 426.00 ns/op 2.13
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0777 ms/op 1.4261 ms/op 0.76
mainnet_e81889 - altair processSlashingsReset 3.1330 us/op 3.6460 us/op 0.86
mainnet_e81889 - altair processRandaoMixesReset 5.9910 us/op 5.0450 us/op 1.19
mainnet_e81889 - altair processHistoricalRootsUpdate 1.4120 us/op 599.00 ns/op 2.36
mainnet_e81889 - altair processParticipationFlagUpdates 2.3480 us/op 2.0950 us/op 1.12
mainnet_e81889 - altair processSyncCommitteeUpdates 1.3830 us/op 556.00 ns/op 2.49
mainnet_e81889 - altair afterProcessEpoch 82.417 ms/op 115.28 ms/op 0.71
capella processEpoch - mainnet_e217614 2.2881 s/op 2.1276 s/op 1.08
mainnet_e217614 - capella beforeProcessEpoch 509.09 ms/op 508.01 ms/op 1.00
mainnet_e217614 - capella processJustificationAndFinalization 19.869 us/op 22.100 us/op 0.90
mainnet_e217614 - capella processInactivityUpdates 26.948 ms/op 23.811 ms/op 1.13
mainnet_e217614 - capella processRewardsAndPenalties 427.44 ms/op 401.69 ms/op 1.06
mainnet_e217614 - capella processRegistryUpdates 34.354 us/op 29.402 us/op 1.17
mainnet_e217614 - capella processSlashings 915.00 ns/op 551.00 ns/op 1.66
mainnet_e217614 - capella processEth1DataReset 706.00 ns/op 516.00 ns/op 1.37
mainnet_e217614 - capella processEffectiveBalanceUpdates 8.7321 ms/op 4.7723 ms/op 1.83
mainnet_e217614 - capella processSlashingsReset 4.0530 us/op 4.3460 us/op 0.93
mainnet_e217614 - capella processRandaoMixesReset 5.6130 us/op 7.5620 us/op 0.74
mainnet_e217614 - capella processHistoricalRootsUpdate 814.00 ns/op 431.00 ns/op 1.89
mainnet_e217614 - capella processParticipationFlagUpdates 1.6790 us/op 1.4720 us/op 1.14
mainnet_e217614 - capella afterProcessEpoch 230.49 ms/op 324.86 ms/op 0.71
phase0 processEpoch - mainnet_e58758 470.00 ms/op 467.16 ms/op 1.01
mainnet_e58758 - phase0 beforeProcessEpoch 120.01 ms/op 121.18 ms/op 0.99
mainnet_e58758 - phase0 processJustificationAndFinalization 16.388 us/op 16.160 us/op 1.01
mainnet_e58758 - phase0 processRewardsAndPenalties 51.924 ms/op 53.539 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 8.1260 us/op 10.390 us/op 0.78
mainnet_e58758 - phase0 processSlashings 662.00 ns/op 538.00 ns/op 1.23
mainnet_e58758 - phase0 processEth1DataReset 608.00 ns/op 376.00 ns/op 1.62
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 897.21 us/op 1.1608 ms/op 0.77
mainnet_e58758 - phase0 processSlashingsReset 3.0870 us/op 4.1090 us/op 0.75
mainnet_e58758 - phase0 processRandaoMixesReset 5.1390 us/op 4.0210 us/op 1.28
mainnet_e58758 - phase0 processHistoricalRootsUpdate 889.00 ns/op 465.00 ns/op 1.91
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.7010 us/op 3.1960 us/op 1.16
mainnet_e58758 - phase0 afterProcessEpoch 64.551 ms/op 95.741 ms/op 0.67
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8167 ms/op 1.4046 ms/op 1.29
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1974 ms/op 1.5675 ms/op 0.76
altair processInactivityUpdates - 250000 normalcase 28.352 ms/op 22.633 ms/op 1.25
altair processInactivityUpdates - 250000 worstcase 23.754 ms/op 26.726 ms/op 0.89
phase0 processRegistryUpdates - 250000 normalcase 10.461 us/op 8.5330 us/op 1.23
phase0 processRegistryUpdates - 250000 badcase_full_deposits 336.86 us/op 392.11 us/op 0.86
phase0 processRegistryUpdates - 250000 worstcase 0.5 133.28 ms/op 122.18 ms/op 1.09
altair processRewardsAndPenalties - 250000 normalcase 62.278 ms/op 60.541 ms/op 1.03
altair processRewardsAndPenalties - 250000 worstcase 62.623 ms/op 56.345 ms/op 1.11
phase0 getAttestationDeltas - 250000 normalcase 6.2512 ms/op 8.7505 ms/op 0.71
phase0 getAttestationDeltas - 250000 worstcase 7.0989 ms/op 9.6382 ms/op 0.74
phase0 processSlashings - 250000 worstcase 90.454 us/op 91.957 us/op 0.98
altair processSyncCommitteeUpdates - 250000 110.63 ms/op 156.41 ms/op 0.71
BeaconState.hashTreeRoot - No change 355.00 ns/op 279.00 ns/op 1.27
BeaconState.hashTreeRoot - 1 full validator 144.92 us/op 152.18 us/op 0.95
BeaconState.hashTreeRoot - 32 full validator 1.4597 ms/op 1.5033 ms/op 0.97
BeaconState.hashTreeRoot - 512 full validator 16.676 ms/op 18.899 ms/op 0.88
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 159.15 us/op 217.97 us/op 0.73
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.7562 ms/op 2.1629 ms/op 1.27
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 31.405 ms/op 28.830 ms/op 1.09
BeaconState.hashTreeRoot - 1 balances 137.91 us/op 122.81 us/op 1.12
BeaconState.hashTreeRoot - 32 balances 1.2135 ms/op 1.1012 ms/op 1.10
BeaconState.hashTreeRoot - 512 balances 12.022 ms/op 17.039 ms/op 0.71
BeaconState.hashTreeRoot - 250000 balances 175.17 ms/op 191.84 ms/op 0.91
aggregationBits - 2048 els - zipIndexesInBitList 12.339 us/op 17.567 us/op 0.70
byteArrayEquals 32 64.961 ns/op 74.156 ns/op 0.88
Buffer.compare 32 38.973 ns/op 55.489 ns/op 0.70
byteArrayEquals 1024 1.8495 us/op 1.9760 us/op 0.94
Buffer.compare 1024 45.482 ns/op 68.704 ns/op 0.66
byteArrayEquals 16384 27.952 us/op 32.149 us/op 0.87
Buffer.compare 16384 221.67 ns/op 269.65 ns/op 0.82
byteArrayEquals 123687377 211.76 ms/op 248.04 ms/op 0.85
Buffer.compare 123687377 4.4571 ms/op 8.2399 ms/op 0.54
byteArrayEquals 32 - diff last byte 62.222 ns/op 73.137 ns/op 0.85
Buffer.compare 32 - diff last byte 39.105 ns/op 57.264 ns/op 0.68
byteArrayEquals 1024 - diff last byte 1.7937 us/op 2.0942 us/op 0.86
Buffer.compare 1024 - diff last byte 51.486 ns/op 74.388 ns/op 0.69
byteArrayEquals 16384 - diff last byte 27.914 us/op 33.441 us/op 0.83
Buffer.compare 16384 - diff last byte 209.97 ns/op 262.95 ns/op 0.80
byteArrayEquals 123687377 - diff last byte 207.11 ms/op 247.00 ms/op 0.84
Buffer.compare 123687377 - diff last byte 4.4215 ms/op 7.2223 ms/op 0.61
byteArrayEquals 32 - random bytes 4.9020 ns/op 5.5930 ns/op 0.88
Buffer.compare 32 - random bytes 41.343 ns/op 60.883 ns/op 0.68
byteArrayEquals 1024 - random bytes 4.6600 ns/op 5.1950 ns/op 0.90
Buffer.compare 1024 - random bytes 39.371 ns/op 59.228 ns/op 0.66
byteArrayEquals 16384 - random bytes 4.5340 ns/op 5.3840 ns/op 0.84
Buffer.compare 16384 - random bytes 38.861 ns/op 60.049 ns/op 0.65
byteArrayEquals 123687377 - random bytes 8.2000 ns/op 8.5500 ns/op 0.96
Buffer.compare 123687377 - random bytes 38.680 ns/op 63.820 ns/op 0.61
regular array get 100000 times 41.912 us/op 44.849 us/op 0.93
wrappedArray get 100000 times 41.314 us/op 44.861 us/op 0.92
arrayWithProxy get 100000 times 10.500 ms/op 14.251 ms/op 0.74
ssz.Root.equals 57.604 ns/op 54.040 ns/op 1.07
byteArrayEquals 54.807 ns/op 53.087 ns/op 1.03
Buffer.compare 9.4850 ns/op 11.987 ns/op 0.79
shuffle list - 16384 els 4.7972 ms/op 7.0339 ms/op 0.68
shuffle list - 250000 els 67.560 ms/op 103.54 ms/op 0.65
processSlot - 1 slots 21.288 us/op 17.249 us/op 1.23
processSlot - 32 slots 2.9954 ms/op 3.0352 ms/op 0.99
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 47.711 ms/op 55.220 ms/op 0.86
getCommitteeAssignments - req 1 vs - 250000 vc 2.3417 ms/op 2.4843 ms/op 0.94
getCommitteeAssignments - req 100 vs - 250000 vc 3.4868 ms/op 3.6614 ms/op 0.95
getCommitteeAssignments - req 1000 vs - 250000 vc 3.9273 ms/op 4.0440 ms/op 0.97
findModifiedValidators - 10000 modified validators 468.71 ms/op 523.62 ms/op 0.90
findModifiedValidators - 1000 modified validators 351.36 ms/op 430.54 ms/op 0.82
findModifiedValidators - 100 modified validators 337.03 ms/op 380.59 ms/op 0.89
findModifiedValidators - 10 modified validators 365.68 ms/op 394.07 ms/op 0.93
findModifiedValidators - 1 modified validators 427.06 ms/op 431.32 ms/op 0.99
findModifiedValidators - no difference 433.81 ms/op 425.19 ms/op 1.02
compare ViewDUs 5.1393 s/op 4.3265 s/op 1.19
compare each validator Uint8Array 1.9977 s/op 1.8364 s/op 1.09
compare ViewDU to Uint8Array 1.1506 s/op 1.1131 s/op 1.03
migrate state 1000000 validators, 24 modified, 0 new 728.36 ms/op 781.60 ms/op 0.93
migrate state 1000000 validators, 1700 modified, 1000 new 971.81 ms/op 1.0800 s/op 0.90
migrate state 1000000 validators, 3400 modified, 2000 new 1.1994 s/op 1.3188 s/op 0.91
migrate state 1500000 validators, 24 modified, 0 new 762.34 ms/op 796.33 ms/op 0.96
migrate state 1500000 validators, 1700 modified, 1000 new 995.37 ms/op 1.0936 s/op 0.91
migrate state 1500000 validators, 3400 modified, 2000 new 1.2152 s/op 1.3197 s/op 0.92
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0900 ns/op 4.4000 ns/op 1.16
state getBlockRootAtSlot - 250000 vs - 7PWei 569.88 ns/op 730.74 ns/op 0.78
computeProposers - vc 250000 7.7758 ms/op 9.1791 ms/op 0.85
computeEpochShuffling - vc 250000 71.233 ms/op 99.063 ms/op 0.72
getNextSyncCommittee - vc 250000 116.54 ms/op 157.65 ms/op 0.74
computeSigningRoot for AttestationData 27.813 us/op 26.756 us/op 1.04
hash AttestationData serialized data then Buffer.toString(base64) 1.2978 us/op 2.2539 us/op 0.58
toHexString serialized data 835.28 ns/op 1.0456 us/op 0.80
Buffer.toString(base64) 158.93 ns/op 211.17 ns/op 0.75

by benchmarkbot/action

@twoeths
Copy link
Contributor

twoeths commented Jan 16, 2024

I see some great metrics with this PR (mostly on the test mainnet node)

  • attnet count with >0 mesh peers
  • Network Worker Message Latency
  • Dial Error Rate
  • gc on both network thread and main thread
  • memory on network worker (especially lg1k) tends to be more stable but not sure in the long run

looks great overall 🚀

twoeths
twoeths previously approved these changes Jan 16, 2024
nflaig
nflaig previously approved these changes Jan 16, 2024
@wemeetagain wemeetagain dismissed stale reviews from nflaig and twoeths via 9ed3066 January 16, 2024 15:14
@wemeetagain wemeetagain merged commit 9eb9cce into unstable Jan 16, 2024
13 of 15 checks passed
@wemeetagain wemeetagain deleted the cayman/update-libp2p branch January 16, 2024 17:52
ensi321 pushed a commit to ensi321/lodestar that referenced this pull request Jan 22, 2024
* wip

* chore: update discv5 and enr

* chore: bump dependencies

* chore: fix import statement

* chore: update libp2p dependencies

* chore: yarn.lock cleanup

* chore: update discv5

* feat: revamp libp2p dashboard

* Clean up metrics registry type casts

* chore: fix lint / build errors

* chore: more import updates

* chore: more yarn.lock cleanup

* chore: update gossipsub

---------

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

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

5 participants