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 deps #6711

Merged
merged 4 commits into from May 1, 2024
Merged

feat: update libp2p deps #6711

merged 4 commits into from May 1, 2024

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Apr 25, 2024

Motivation

Description

  • Update all libp2p and related dependencies
  • Dedupe updated dependencies in yarn.lock

@wemeetagain wemeetagain requested a review from a team as a code owner April 25, 2024 21:35
Copy link
Contributor

github-actions bot commented Apr 25, 2024

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: 4379659 Previous: 473aeb0 Ratio
isKnown best case - 1 super set check 760.00 ns/op 238.00 ns/op 3.19
isKnown normal case - 2 super set checks 850.00 ns/op 231.00 ns/op 3.68
isKnown worse case - 16 super set checks 882.00 ns/op 237.00 ns/op 3.72
Set add up to 64 items then delete first 5.5529 us/op 1.7809 us/op 3.12
Set add up to 64 items then delete last 6.2093 us/op 2.0629 us/op 3.01
Set add up to 64 items then delete middle 5.9870 us/op 1.9918 us/op 3.01
Set add up to 128 items then delete first 12.420 us/op 4.0455 us/op 3.07
Set add up to 128 items then delete last 12.450 us/op 3.8922 us/op 3.20
Set add up to 128 items then delete middle 12.258 us/op 3.9233 us/op 3.12
Set add up to 256 items then delete first 24.430 us/op 7.7649 us/op 3.15
Set add up to 256 items then delete last 24.975 us/op 7.7994 us/op 3.20
Set add up to 256 items then delete middle 24.363 us/op 7.4855 us/op 3.25
forkChoice updateHead vc 600000 bc 64 eq 0 9.8380 ms/op 2.6388 ms/op 3.73
forkChoice updateHead vc 600000 bc 7200 eq 0 13.150 ms/op 3.5061 ms/op 3.75
forkChoice updateHead vc 600000 bc 64 eq 300000 94.885 ms/op 12.790 ms/op 7.42
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 22.955 us/op 6.2720 us/op 3.66
findModifiedValidators - 10 modified validators 434.71 ms/op 121.28 ms/op 3.58
findModifiedValidators - 1 modified validators 575.63 ms/op 121.25 ms/op 4.75
findModifiedValidators - no difference 556.81 ms/op 141.46 ms/op 3.94
compare each validator Uint8Array 2.9297 s/op 869.67 ms/op 3.37
Full benchmark results
Benchmark suite Current: 4379659 Previous: 473aeb0 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 994.44 us/op 763.50 us/op 1.30
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 118.58 us/op 68.053 us/op 1.74
BLS verify - blst-native 1.3121 ms/op 1.0864 ms/op 1.21
BLS verifyMultipleSignatures 3 - blst-native 2.5105 ms/op 2.1250 ms/op 1.18
BLS verifyMultipleSignatures 8 - blst-native 5.4935 ms/op 4.5333 ms/op 1.21
BLS verifyMultipleSignatures 32 - blst-native 19.593 ms/op 16.518 ms/op 1.19
BLS verifyMultipleSignatures 64 - blst-native 38.853 ms/op 32.326 ms/op 1.20
BLS verifyMultipleSignatures 128 - blst-native 76.587 ms/op 63.460 ms/op 1.21
BLS deserializing 10000 signatures 901.70 ms/op 779.73 ms/op 1.16
BLS deserializing 100000 signatures 9.1931 s/op 7.8862 s/op 1.17
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3769 ms/op 1.1396 ms/op 1.21
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5322 ms/op 1.2804 ms/op 1.20
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3799 ms/op 2.1113 ms/op 1.13
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.4599 ms/op 3.1191 ms/op 1.11
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.6327 ms/op 5.1166 ms/op 1.10
BLS aggregatePubkeys 32 - blst-native 29.688 us/op 26.237 us/op 1.13
BLS aggregatePubkeys 128 - blst-native 116.23 us/op 103.09 us/op 1.13
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 61.430 ms/op 56.241 ms/op 1.09
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 77.021 ms/op 63.590 ms/op 1.21
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 35.132 ms/op 39.789 ms/op 0.88
getSlashingsAndExits - default max 216.44 us/op 211.10 us/op 1.03
getSlashingsAndExits - 2k 705.60 us/op 472.08 us/op 1.49
proposeBlockBody type=full, size=empty 7.6194 ms/op 7.9888 ms/op 0.95
isKnown best case - 1 super set check 760.00 ns/op 238.00 ns/op 3.19
isKnown normal case - 2 super set checks 850.00 ns/op 231.00 ns/op 3.68
isKnown worse case - 16 super set checks 882.00 ns/op 237.00 ns/op 3.72
InMemoryCheckpointStateCache - add get delete 8.9310 us/op 4.2500 us/op 2.10
validate api signedAggregateAndProof - struct 2.6591 ms/op 2.0591 ms/op 1.29
validate gossip signedAggregateAndProof - struct 2.6519 ms/op 2.1916 ms/op 1.21
validate gossip attestation - vc 640000 1.4665 ms/op 1.1737 ms/op 1.25
batch validate gossip attestation - vc 640000 - chunk 32 171.70 us/op 144.03 us/op 1.19
batch validate gossip attestation - vc 640000 - chunk 64 157.23 us/op 132.29 us/op 1.19
batch validate gossip attestation - vc 640000 - chunk 128 163.01 us/op 136.77 us/op 1.19
batch validate gossip attestation - vc 640000 - chunk 256 161.27 us/op 127.36 us/op 1.27
pickEth1Vote - no votes 1.4612 ms/op 990.21 us/op 1.48
pickEth1Vote - max votes 11.052 ms/op 9.4368 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.597 ms/op 21.709 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 27.874 ms/op 26.516 ms/op 1.05
pickEth1Vote - Eth1Data fastSerialize value x2048 759.11 us/op 561.13 us/op 1.35
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.2239 ms/op 4.4258 ms/op 1.63
bytes32 toHexString 803.00 ns/op 386.00 ns/op 2.08
bytes32 Buffer.toString(hex) 330.00 ns/op 260.00 ns/op 1.27
bytes32 Buffer.toString(hex) from Uint8Array 557.00 ns/op 475.00 ns/op 1.17
bytes32 Buffer.toString(hex) + 0x 327.00 ns/op 264.00 ns/op 1.24
Object access 1 prop 0.21400 ns/op 0.16800 ns/op 1.27
Map access 1 prop 0.17100 ns/op 0.11200 ns/op 1.53
Object get x1000 8.2540 ns/op 5.7510 ns/op 1.44
Map get x1000 0.93600 ns/op 0.80400 ns/op 1.16
Object set x1000 66.377 ns/op 41.233 ns/op 1.61
Map set x1000 57.838 ns/op 21.820 ns/op 2.65
Return object 10000 times 0.27300 ns/op 0.23940 ns/op 1.14
Throw Error 10000 times 4.1027 us/op 3.0321 us/op 1.35
fastMsgIdFn sha256 / 200 bytes 3.5830 us/op 2.0680 us/op 1.73
fastMsgIdFn h32 xxhash / 200 bytes 394.00 ns/op 316.00 ns/op 1.25
fastMsgIdFn h64 xxhash / 200 bytes 438.00 ns/op 277.00 ns/op 1.58
fastMsgIdFn sha256 / 1000 bytes 12.167 us/op 6.7580 us/op 1.80
fastMsgIdFn h32 xxhash / 1000 bytes 534.00 ns/op 332.00 ns/op 1.61
fastMsgIdFn h64 xxhash / 1000 bytes 487.00 ns/op 316.00 ns/op 1.54
fastMsgIdFn sha256 / 10000 bytes 108.95 us/op 54.703 us/op 1.99
fastMsgIdFn h32 xxhash / 10000 bytes 2.4450 us/op 1.8550 us/op 1.32
fastMsgIdFn h64 xxhash / 10000 bytes 1.7920 us/op 1.2690 us/op 1.41
send data - 1000 256B messages 21.841 ms/op 19.948 ms/op 1.09
send data - 1000 512B messages 30.057 ms/op 18.331 ms/op 1.64
send data - 1000 1024B messages 43.904 ms/op 27.543 ms/op 1.59
send data - 1000 1200B messages 39.626 ms/op 35.208 ms/op 1.13
send data - 1000 2048B messages 48.068 ms/op 38.066 ms/op 1.26
send data - 1000 4096B messages 35.749 ms/op 36.580 ms/op 0.98
send data - 1000 16384B messages 124.75 ms/op 95.834 ms/op 1.30
send data - 1000 65536B messages 457.82 ms/op 392.38 ms/op 1.17
enrSubnets - fastDeserialize 64 bits 2.0350 us/op 868.00 ns/op 2.34
enrSubnets - ssz BitVector 64 bits 624.00 ns/op 348.00 ns/op 1.79
enrSubnets - fastDeserialize 4 bits 262.00 ns/op 142.00 ns/op 1.85
enrSubnets - ssz BitVector 4 bits 602.00 ns/op 335.00 ns/op 1.80
prioritizePeers score -10:0 att 32-0.1 sync 2-0 315.83 us/op 141.84 us/op 2.23
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 473.04 us/op 169.67 us/op 2.79
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 514.76 us/op 225.39 us/op 2.28
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 779.40 us/op 365.06 us/op 2.13
prioritizePeers score 0:0 att 64-1 sync 4-1 935.45 us/op 432.27 us/op 2.16
array of 16000 items push then shift 1.8310 us/op 1.3451 us/op 1.36
LinkedList of 16000 items push then shift 12.356 ns/op 6.2720 ns/op 1.97
array of 16000 items push then pop 146.68 ns/op 88.120 ns/op 1.66
LinkedList of 16000 items push then pop 11.724 ns/op 6.0750 ns/op 1.93
array of 24000 items push then shift 2.8198 us/op 2.1596 us/op 1.31
LinkedList of 24000 items push then shift 13.496 ns/op 6.6330 ns/op 2.03
array of 24000 items push then pop 255.91 ns/op 162.77 ns/op 1.57
LinkedList of 24000 items push then pop 13.540 ns/op 5.7870 ns/op 2.34
intersect bitArray bitLen 8 7.8440 ns/op 5.3430 ns/op 1.47
intersect array and set length 8 113.62 ns/op 53.861 ns/op 2.11
intersect bitArray bitLen 128 46.312 ns/op 30.643 ns/op 1.51
intersect array and set length 128 1.3112 us/op 797.22 ns/op 1.64
bitArray.getTrueBitIndexes() bitLen 128 2.4380 us/op 1.4830 us/op 1.64
bitArray.getTrueBitIndexes() bitLen 248 4.3020 us/op 2.3650 us/op 1.82
bitArray.getTrueBitIndexes() bitLen 512 8.4230 us/op 4.4260 us/op 1.90
Buffer.concat 32 items 1.2650 us/op 827.00 ns/op 1.53
Uint8Array.set 32 items 2.6090 us/op 1.5620 us/op 1.67
Set add up to 64 items then delete first 5.5529 us/op 1.7809 us/op 3.12
OrderedSet add up to 64 items then delete first 7.4592 us/op 2.7169 us/op 2.75
Set add up to 64 items then delete last 6.2093 us/op 2.0629 us/op 3.01
OrderedSet add up to 64 items then delete last 8.2444 us/op 3.0484 us/op 2.70
Set add up to 64 items then delete middle 5.9870 us/op 1.9918 us/op 3.01
OrderedSet add up to 64 items then delete middle 9.4903 us/op 4.2695 us/op 2.22
Set add up to 128 items then delete first 12.420 us/op 4.0455 us/op 3.07
OrderedSet add up to 128 items then delete first 17.109 us/op 6.2048 us/op 2.76
Set add up to 128 items then delete last 12.450 us/op 3.8922 us/op 3.20
OrderedSet add up to 128 items then delete last 16.937 us/op 5.8610 us/op 2.89
Set add up to 128 items then delete middle 12.258 us/op 3.9233 us/op 3.12
OrderedSet add up to 128 items then delete middle 22.471 us/op 10.816 us/op 2.08
Set add up to 256 items then delete first 24.430 us/op 7.7649 us/op 3.15
OrderedSet add up to 256 items then delete first 35.112 us/op 12.719 us/op 2.76
Set add up to 256 items then delete last 24.975 us/op 7.7994 us/op 3.20
OrderedSet add up to 256 items then delete last 34.721 us/op 11.721 us/op 2.96
Set add up to 256 items then delete middle 24.363 us/op 7.4855 us/op 3.25
OrderedSet add up to 256 items then delete middle 63.938 us/op 31.712 us/op 2.02
transfer serialized Status (84 B) 2.7120 us/op 1.2200 us/op 2.22
copy serialized Status (84 B) 1.9180 us/op 926.00 ns/op 2.07
transfer serialized SignedVoluntaryExit (112 B) 2.2100 us/op 1.3310 us/op 1.66
copy serialized SignedVoluntaryExit (112 B) 1.8140 us/op 999.00 ns/op 1.82
transfer serialized ProposerSlashing (416 B) 2.8400 us/op 1.4700 us/op 1.93
copy serialized ProposerSlashing (416 B) 2.6630 us/op 1.5160 us/op 1.76
transfer serialized Attestation (485 B) 3.5790 us/op 1.6680 us/op 2.15
copy serialized Attestation (485 B) 3.0130 us/op 1.6410 us/op 1.84
transfer serialized AttesterSlashing (33232 B) 2.7810 us/op 1.6210 us/op 1.72
copy serialized AttesterSlashing (33232 B) 12.535 us/op 3.5180 us/op 3.56
transfer serialized Small SignedBeaconBlock (128000 B) 4.3970 us/op 1.7320 us/op 2.54
copy serialized Small SignedBeaconBlock (128000 B) 37.702 us/op 8.9900 us/op 4.19
transfer serialized Avg SignedBeaconBlock (200000 B) 4.7840 us/op 1.8850 us/op 2.54
copy serialized Avg SignedBeaconBlock (200000 B) 81.745 us/op 13.012 us/op 6.28
transfer serialized BlobsSidecar (524380 B) 7.1590 us/op 2.4170 us/op 2.96
copy serialized BlobsSidecar (524380 B) 228.48 us/op 85.993 us/op 2.66
transfer serialized Big SignedBeaconBlock (1000000 B) 8.3340 us/op 3.0350 us/op 2.75
copy serialized Big SignedBeaconBlock (1000000 B) 377.97 us/op 148.13 us/op 2.55
pass gossip attestations to forkchoice per slot 4.8986 ms/op 3.0393 ms/op 1.61
forkChoice updateHead vc 100000 bc 64 eq 0 1.1247 ms/op 436.53 us/op 2.58
forkChoice updateHead vc 600000 bc 64 eq 0 9.8380 ms/op 2.6388 ms/op 3.73
forkChoice updateHead vc 1000000 bc 64 eq 0 12.779 ms/op 4.5486 ms/op 2.81
forkChoice updateHead vc 600000 bc 320 eq 0 7.5773 ms/op 2.8553 ms/op 2.65
forkChoice updateHead vc 600000 bc 1200 eq 0 6.6639 ms/op 2.8696 ms/op 2.32
forkChoice updateHead vc 600000 bc 7200 eq 0 13.150 ms/op 3.5061 ms/op 3.75
forkChoice updateHead vc 600000 bc 64 eq 1000 14.238 ms/op 9.9774 ms/op 1.43
forkChoice updateHead vc 600000 bc 64 eq 10000 19.514 ms/op 10.364 ms/op 1.88
forkChoice updateHead vc 600000 bc 64 eq 300000 94.885 ms/op 12.790 ms/op 7.42
computeDeltas 500000 validators 300 proto nodes 8.0315 ms/op 3.2506 ms/op 2.47
computeDeltas 500000 validators 1200 proto nodes 7.6061 ms/op 3.0734 ms/op 2.47
computeDeltas 500000 validators 7200 proto nodes 6.6387 ms/op 3.0420 ms/op 2.18
computeDeltas 750000 validators 300 proto nodes 9.8040 ms/op 4.7882 ms/op 2.05
computeDeltas 750000 validators 1200 proto nodes 9.6297 ms/op 4.8512 ms/op 1.99
computeDeltas 750000 validators 7200 proto nodes 9.5531 ms/op 4.8441 ms/op 1.97
computeDeltas 1400000 validators 300 proto nodes 17.955 ms/op 9.1420 ms/op 1.96
computeDeltas 1400000 validators 1200 proto nodes 18.167 ms/op 9.2345 ms/op 1.97
computeDeltas 1400000 validators 7200 proto nodes 18.101 ms/op 9.1899 ms/op 1.97
computeDeltas 2100000 validators 300 proto nodes 27.003 ms/op 13.338 ms/op 2.02
computeDeltas 2100000 validators 1200 proto nodes 26.690 ms/op 13.361 ms/op 2.00
computeDeltas 2100000 validators 7200 proto nodes 26.999 ms/op 13.050 ms/op 2.07
altair processAttestation - 250000 vs - 7PWei normalcase 2.7269 ms/op 1.4206 ms/op 1.92
altair processAttestation - 250000 vs - 7PWei worstcase 3.6402 ms/op 2.1403 ms/op 1.70
altair processAttestation - setStatus - 1/6 committees join 193.76 us/op 76.567 us/op 2.53
altair processAttestation - setStatus - 1/3 committees join 353.08 us/op 142.37 us/op 2.48
altair processAttestation - setStatus - 1/2 committees join 580.01 us/op 213.73 us/op 2.71
altair processAttestation - setStatus - 2/3 committees join 602.79 us/op 283.19 us/op 2.13
altair processAttestation - setStatus - 4/5 committees join 874.10 us/op 403.93 us/op 2.16
altair processAttestation - setStatus - 100% committees join 1.0083 ms/op 480.48 us/op 2.10
altair processBlock - 250000 vs - 7PWei normalcase 10.096 ms/op 6.4895 ms/op 1.56
altair processBlock - 250000 vs - 7PWei normalcase hashState 35.012 ms/op 26.765 ms/op 1.31
altair processBlock - 250000 vs - 7PWei worstcase 39.226 ms/op 35.467 ms/op 1.11
altair processBlock - 250000 vs - 7PWei worstcase hashState 115.98 ms/op 81.759 ms/op 1.42
phase0 processBlock - 250000 vs - 7PWei normalcase 3.3297 ms/op 2.7279 ms/op 1.22
phase0 processBlock - 250000 vs - 7PWei worstcase 37.218 ms/op 25.381 ms/op 1.47
altair processEth1Data - 250000 vs - 7PWei normalcase 750.69 us/op 307.50 us/op 2.44
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 22.955 us/op 6.2720 us/op 3.66
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 75.630 us/op 47.895 us/op 1.58
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 30.361 us/op 22.858 us/op 1.33
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 17.246 us/op 14.455 us/op 1.19
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 247.09 us/op 148.28 us/op 1.67
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.7560 ms/op 720.36 us/op 2.44
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.1658 ms/op 1.1277 ms/op 1.92
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9612 ms/op 945.28 us/op 2.07
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.5146 ms/op 2.3812 ms/op 1.90
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.1689 ms/op 1.4595 ms/op 2.17
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.3449 ms/op 3.6415 ms/op 1.74
Tree 40 250000 create 441.72 ms/op 271.54 ms/op 1.63
Tree 40 250000 get(125000) 229.23 ns/op 117.02 ns/op 1.96
Tree 40 250000 set(125000) 1.3743 us/op 783.42 ns/op 1.75
Tree 40 250000 toArray() 24.902 ms/op 20.341 ms/op 1.22
Tree 40 250000 iterate all - toArray() + loop 26.620 ms/op 21.309 ms/op 1.25
Tree 40 250000 iterate all - get(i) 84.325 ms/op 54.703 ms/op 1.54
MutableVector 250000 create 19.688 ms/op 13.613 ms/op 1.45
MutableVector 250000 get(125000) 7.2520 ns/op 5.9710 ns/op 1.21
MutableVector 250000 set(125000) 693.84 ns/op 206.10 ns/op 3.37
MutableVector 250000 toArray() 5.2976 ms/op 2.4173 ms/op 2.19
MutableVector 250000 iterate all - toArray() + loop 6.0601 ms/op 2.4283 ms/op 2.50
MutableVector 250000 iterate all - get(i) 1.8962 ms/op 1.4367 ms/op 1.32
Array 250000 create 4.1709 ms/op 2.2667 ms/op 1.84
Array 250000 clone - spread 2.4059 ms/op 1.2194 ms/op 1.97
Array 250000 get(125000) 2.1530 ns/op 0.99300 ns/op 2.17
Array 250000 set(125000) 6.1620 ns/op 1.1850 ns/op 5.20
Array 250000 iterate all - loop 188.01 us/op 156.37 us/op 1.20
effectiveBalanceIncrements clone Uint8Array 300000 93.552 us/op 14.289 us/op 6.55
effectiveBalanceIncrements clone MutableVector 300000 2.1710 us/op 349.00 ns/op 6.22
effectiveBalanceIncrements rw all Uint8Array 300000 216.98 us/op 188.25 us/op 1.15
effectiveBalanceIncrements rw all MutableVector 300000 207.89 ms/op 66.917 ms/op 3.11
phase0 afterProcessEpoch - 250000 vs - 7PWei 122.48 ms/op 79.070 ms/op 1.55
phase0 beforeProcessEpoch - 250000 vs - 7PWei 49.652 ms/op 45.631 ms/op 1.09
altair processEpoch - mainnet_e81889 657.41 ms/op 421.22 ms/op 1.56
mainnet_e81889 - altair beforeProcessEpoch 118.66 ms/op 72.075 ms/op 1.65
mainnet_e81889 - altair processJustificationAndFinalization 41.626 us/op 12.283 us/op 3.39
mainnet_e81889 - altair processInactivityUpdates 10.946 ms/op 6.1464 ms/op 1.78
mainnet_e81889 - altair processRewardsAndPenalties 120.91 ms/op 71.775 ms/op 1.68
mainnet_e81889 - altair processRegistryUpdates 10.070 us/op 1.5620 us/op 6.45
mainnet_e81889 - altair processSlashings 1.5550 us/op 490.00 ns/op 3.17
mainnet_e81889 - altair processEth1DataReset 1.7480 us/op 555.00 ns/op 3.15
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.8496 ms/op 1.6645 ms/op 1.71
mainnet_e81889 - altair processSlashingsReset 9.6400 us/op 2.6600 us/op 3.62
mainnet_e81889 - altair processRandaoMixesReset 12.152 us/op 3.2620 us/op 3.73
mainnet_e81889 - altair processHistoricalRootsUpdate 2.3150 us/op 522.00 ns/op 4.43
mainnet_e81889 - altair processParticipationFlagUpdates 5.9880 us/op 1.9380 us/op 3.09
mainnet_e81889 - altair processSyncCommitteeUpdates 1.8780 us/op 619.00 ns/op 3.03
mainnet_e81889 - altair afterProcessEpoch 166.34 ms/op 82.485 ms/op 2.02
capella processEpoch - mainnet_e217614 1.9806 s/op 2.0863 s/op 0.95
mainnet_e217614 - capella beforeProcessEpoch 361.26 ms/op 422.57 ms/op 0.85
mainnet_e217614 - capella processJustificationAndFinalization 21.283 us/op 20.722 us/op 1.03
mainnet_e217614 - capella processInactivityUpdates 18.292 ms/op 19.989 ms/op 0.92
mainnet_e217614 - capella processRewardsAndPenalties 285.41 ms/op 500.81 ms/op 0.57
mainnet_e217614 - capella processRegistryUpdates 23.541 us/op 18.558 us/op 1.27
mainnet_e217614 - capella processSlashings 594.00 ns/op 663.00 ns/op 0.90
mainnet_e217614 - capella processEth1DataReset 426.00 ns/op 598.00 ns/op 0.71
mainnet_e217614 - capella processEffectiveBalanceUpdates 13.663 ms/op 3.4744 ms/op 3.93
mainnet_e217614 - capella processSlashingsReset 4.5710 us/op 3.4470 us/op 1.33
mainnet_e217614 - capella processRandaoMixesReset 5.3830 us/op 6.4000 us/op 0.84
mainnet_e217614 - capella processHistoricalRootsUpdate 653.00 ns/op 839.00 ns/op 0.78
mainnet_e217614 - capella processParticipationFlagUpdates 2.0500 us/op 1.5230 us/op 1.35
mainnet_e217614 - capella afterProcessEpoch 330.92 ms/op 251.41 ms/op 1.32
phase0 processEpoch - mainnet_e58758 800.81 ms/op 418.74 ms/op 1.91
mainnet_e58758 - phase0 beforeProcessEpoch 241.72 ms/op 121.32 ms/op 1.99
mainnet_e58758 - phase0 processJustificationAndFinalization 34.346 us/op 18.011 us/op 1.91
mainnet_e58758 - phase0 processRewardsAndPenalties 38.177 ms/op 53.275 ms/op 0.72
mainnet_e58758 - phase0 processRegistryUpdates 13.959 us/op 13.310 us/op 1.05
mainnet_e58758 - phase0 processSlashings 783.00 ns/op 710.00 ns/op 1.10
mainnet_e58758 - phase0 processEth1DataReset 499.00 ns/op 506.00 ns/op 0.99
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1560 ms/op 859.76 us/op 1.34
mainnet_e58758 - phase0 processSlashingsReset 2.6390 us/op 4.6220 us/op 0.57
mainnet_e58758 - phase0 processRandaoMixesReset 7.2840 us/op 7.0010 us/op 1.04
mainnet_e58758 - phase0 processHistoricalRootsUpdate 653.00 ns/op 913.00 ns/op 0.72
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.2770 us/op 6.2190 us/op 0.69
mainnet_e58758 - phase0 afterProcessEpoch 107.52 ms/op 74.795 ms/op 1.44
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4100 ms/op 1.0300 ms/op 1.37
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4547 ms/op 1.2194 ms/op 1.19
altair processInactivityUpdates - 250000 normalcase 19.778 ms/op 27.094 ms/op 0.73
altair processInactivityUpdates - 250000 worstcase 18.906 ms/op 28.588 ms/op 0.66
phase0 processRegistryUpdates - 250000 normalcase 11.615 us/op 10.706 us/op 1.08
phase0 processRegistryUpdates - 250000 badcase_full_deposits 400.41 us/op 444.72 us/op 0.90
phase0 processRegistryUpdates - 250000 worstcase 0.5 160.94 ms/op 114.30 ms/op 1.41
altair processRewardsAndPenalties - 250000 normalcase 46.296 ms/op 52.365 ms/op 0.88
altair processRewardsAndPenalties - 250000 worstcase 52.213 ms/op 66.803 ms/op 0.78
phase0 getAttestationDeltas - 250000 normalcase 9.2209 ms/op 6.2009 ms/op 1.49
phase0 getAttestationDeltas - 250000 worstcase 10.279 ms/op 6.2076 ms/op 1.66
phase0 processSlashings - 250000 worstcase 102.44 us/op 89.425 us/op 1.15
altair processSyncCommitteeUpdates - 250000 152.20 ms/op 108.50 ms/op 1.40
BeaconState.hashTreeRoot - No change 433.00 ns/op 459.00 ns/op 0.94
BeaconState.hashTreeRoot - 1 full validator 141.26 us/op 148.82 us/op 0.95
BeaconState.hashTreeRoot - 32 full validator 1.2278 ms/op 1.6793 ms/op 0.73
BeaconState.hashTreeRoot - 512 full validator 14.005 ms/op 16.751 ms/op 0.84
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 150.67 us/op 178.07 us/op 0.85
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9576 ms/op 2.3996 ms/op 0.82
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 25.959 ms/op 32.945 ms/op 0.79
BeaconState.hashTreeRoot - 1 balances 130.24 us/op 159.41 us/op 0.82
BeaconState.hashTreeRoot - 32 balances 1.0854 ms/op 1.5766 ms/op 0.69
BeaconState.hashTreeRoot - 512 balances 11.083 ms/op 15.478 ms/op 0.72
BeaconState.hashTreeRoot - 250000 balances 234.76 ms/op 152.60 ms/op 1.54
aggregationBits - 2048 els - zipIndexesInBitList 30.709 us/op 22.088 us/op 1.39
byteArrayEquals 32 78.683 ns/op 64.944 ns/op 1.21
Buffer.compare 32 57.890 ns/op 37.519 ns/op 1.54
byteArrayEquals 1024 2.1390 us/op 1.7755 us/op 1.20
Buffer.compare 1024 74.545 ns/op 48.620 ns/op 1.53
byteArrayEquals 16384 33.873 us/op 26.751 us/op 1.27
Buffer.compare 16384 271.05 ns/op 270.77 ns/op 1.00
byteArrayEquals 123687377 291.60 ms/op 213.73 ms/op 1.36
Buffer.compare 123687377 8.9437 ms/op 5.2220 ms/op 1.71
byteArrayEquals 32 - diff last byte 81.688 ns/op 68.539 ns/op 1.19
Buffer.compare 32 - diff last byte 64.993 ns/op 42.504 ns/op 1.53
byteArrayEquals 1024 - diff last byte 2.3602 us/op 1.8799 us/op 1.26
Buffer.compare 1024 - diff last byte 80.870 ns/op 47.871 ns/op 1.69
byteArrayEquals 16384 - diff last byte 35.297 us/op 29.445 us/op 1.20
Buffer.compare 16384 - diff last byte 291.75 ns/op 232.46 ns/op 1.26
byteArrayEquals 123687377 - diff last byte 286.11 ms/op 215.21 ms/op 1.33
Buffer.compare 123687377 - diff last byte 10.318 ms/op 6.1416 ms/op 1.68
byteArrayEquals 32 - random bytes 7.2880 ns/op 4.6070 ns/op 1.58
Buffer.compare 32 - random bytes 65.483 ns/op 41.487 ns/op 1.58
byteArrayEquals 1024 - random bytes 6.8340 ns/op 4.4600 ns/op 1.53
Buffer.compare 1024 - random bytes 65.422 ns/op 40.052 ns/op 1.63
byteArrayEquals 16384 - random bytes 6.7950 ns/op 4.6530 ns/op 1.46
Buffer.compare 16384 - random bytes 64.601 ns/op 35.788 ns/op 1.81
byteArrayEquals 123687377 - random bytes 13.630 ns/op 7.0400 ns/op 1.94
Buffer.compare 123687377 - random bytes 77.660 ns/op 38.440 ns/op 2.02
regular array get 100000 times 50.037 us/op 44.594 us/op 1.12
wrappedArray get 100000 times 49.051 us/op 41.862 us/op 1.17
arrayWithProxy get 100000 times 15.154 ms/op 9.4466 ms/op 1.60
ssz.Root.equals 61.483 ns/op 56.097 ns/op 1.10
byteArrayEquals 58.962 ns/op 53.343 ns/op 1.11
Buffer.compare 12.867 ns/op 9.8450 ns/op 1.31
shuffle list - 16384 els 9.3596 ms/op 5.8395 ms/op 1.60
shuffle list - 250000 els 136.35 ms/op 88.308 ms/op 1.54
processSlot - 1 slots 22.142 us/op 14.037 us/op 1.58
processSlot - 32 slots 4.0431 ms/op 2.4366 ms/op 1.66
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 66.897 ms/op 47.221 ms/op 1.42
getCommitteeAssignments - req 1 vs - 250000 vc 3.1189 ms/op 2.2643 ms/op 1.38
getCommitteeAssignments - req 100 vs - 250000 vc 4.4215 ms/op 3.3457 ms/op 1.32
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6425 ms/op 3.6054 ms/op 1.29
findModifiedValidators - 10000 modified validators 482.94 ms/op 280.99 ms/op 1.72
findModifiedValidators - 1000 modified validators 418.52 ms/op 151.22 ms/op 2.77
findModifiedValidators - 100 modified validators 349.59 ms/op 135.22 ms/op 2.59
findModifiedValidators - 10 modified validators 434.71 ms/op 121.28 ms/op 3.58
findModifiedValidators - 1 modified validators 575.63 ms/op 121.25 ms/op 4.75
findModifiedValidators - no difference 556.81 ms/op 141.46 ms/op 3.94
compare ViewDUs 7.9108 s/op 3.6953 s/op 2.14
compare each validator Uint8Array 2.9297 s/op 869.67 ms/op 3.37
compare ViewDU to Uint8Array 1.6155 s/op 779.77 ms/op 2.07
migrate state 1000000 validators, 24 modified, 0 new 900.72 ms/op 574.95 ms/op 1.57
migrate state 1000000 validators, 1700 modified, 1000 new 1.2802 s/op 974.38 ms/op 1.31
migrate state 1000000 validators, 3400 modified, 2000 new 1.6296 s/op 1.4563 s/op 1.12
migrate state 1500000 validators, 24 modified, 0 new 923.15 ms/op 802.96 ms/op 1.15
migrate state 1500000 validators, 1700 modified, 1000 new 1.4700 s/op 1.0181 s/op 1.44
migrate state 1500000 validators, 3400 modified, 2000 new 1.9336 s/op 1.4656 s/op 1.32
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8300 ns/op 3.7600 ns/op 1.28
state getBlockRootAtSlot - 250000 vs - 7PWei 925.56 ns/op 1.1152 us/op 0.83
computeProposers - vc 250000 10.364 ms/op 7.9477 ms/op 1.30
computeEpochShuffling - vc 250000 132.91 ms/op 84.354 ms/op 1.58
getNextSyncCommittee - vc 250000 164.12 ms/op 134.24 ms/op 1.22
computeSigningRoot for AttestationData 31.523 us/op 29.270 us/op 1.08
hash AttestationData serialized data then Buffer.toString(base64) 2.4130 us/op 1.2927 us/op 1.87
toHexString serialized data 1.2759 us/op 860.35 ns/op 1.48
Buffer.toString(base64) 250.75 ns/op 156.42 ns/op 1.60

by benchmarkbot/action

@twoeths
Copy link
Contributor

twoeths commented Apr 26, 2024

we should experiment disable flood publishing after this update, see #6596

Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (unstable@473aeb0). Click here to learn what that means.

Additional details and impacted files
@@             Coverage Diff             @@
##             unstable    #6711   +/-   ##
===========================================
  Coverage            ?   61.88%           
===========================================
  Files               ?      562           
  Lines               ?    59309           
  Branches            ?     1916           
===========================================
  Hits                ?    36703           
  Misses              ?    22563           
  Partials            ?       43           

@@ -42,7 +42,7 @@ export class Discv5Worker extends (EventEmitter as {new (): StrictEventEmitter<E
static async init(opts: Discv5Opts): Promise<Discv5Worker> {
const workerData: Discv5WorkerData = {
enr: opts.discv5.enr,
peerIdProto: exportToProtobuf(opts.peerId),
peerIdProto: exportToProtobuf(opts.peerId as Secp256k1PeerId),
Copy link
Member

Choose a reason for hiding this comment

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

Any way we could avoid this cast?

Copy link
Member Author

Choose a reason for hiding this comment

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

unfortunately not, see libp2p/js-libp2p#2496

@@ -90,7 +90,7 @@ export class Eth2Gossipsub extends GossipSub {
// https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/p2p-interface.md#the-gossip-domain-gossipsub
super(modules.libp2p.services.components, {
globalSignaturePolicy: SignaturePolicy.StrictNoSign,
allowPublishToZeroPeers: allowPublishToZeroPeers,
allowPublishToZeroTopicPeers: allowPublishToZeroPeers,
Copy link
Member

Choose a reason for hiding this comment

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

This is great change to get in, previous error message caused so much user confusion

Copy link
Member

Choose a reason for hiding this comment

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

Note: we have a cli flag --allowPublishToZeroPeers, could alias it but since it mostly used for 0 total peers setups shouldn't matter

@wemeetagain wemeetagain merged commit a215ae2 into unstable May 1, 2024
19 of 20 checks passed
@wemeetagain wemeetagain deleted the cayman/update-libp2p branch May 1, 2024 14:32
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