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

chore: upgrade to js-libp2p 2.0 #7359

Open
wants to merge 6 commits into
base: unstable
Choose a base branch
from
Open

Conversation

wemeetagain
Copy link
Member

Motivation

Description

  • Upgrade libp2p to 2.0
  • Do NOT upgrade gossipsub to support IDONTWANT (suspected perf degredation with it)

* chore: upgrade to js-libp2p 2.0

* chore: bump libp2p versions

* chore: fix up yarn lock

* chore: fix some tests

* chore: fix connection map

* feat: gossipsub v1.2

* chore: bump libp2p

* chore: tweak idontwantMinDataSize

* chore: bump libp2p deps
@wemeetagain wemeetagain requested a review from a team as a code owner January 14, 2025 18:56
@wemeetagain wemeetagain changed the title Cayman/bump libp2p chore: upgrade to js-libp2p 2.0 Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 56.70103% with 42 lines in your changes missing coverage. Please review.

Project coverage is 50.25%. Comparing base (9c66fac) to head (5366dd3).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7359      +/-   ##
============================================
- Coverage     50.26%   50.25%   -0.01%     
============================================
  Files           602      602              
  Lines         40375    40378       +3     
  Branches       2206     2199       -7     
============================================
  Hits          20293    20293              
- Misses        20042    20045       +3     
  Partials         40       40              

nflaig
nflaig previously approved these changes Jan 14, 2025
Copy link
Contributor

github-actions bot commented Jan 14, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: a215925 Previous: 9c66fac Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.2469 ms/op 1.0434 ms/op 1.20
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 40.359 us/op 37.333 us/op 1.08
BLS verify - blst 1.0631 ms/op 1.0443 ms/op 1.02
BLS verifyMultipleSignatures 3 - blst 1.6608 ms/op 1.5794 ms/op 1.05
BLS verifyMultipleSignatures 8 - blst 2.8226 ms/op 2.0636 ms/op 1.37
BLS verifyMultipleSignatures 32 - blst 7.6807 ms/op 5.9270 ms/op 1.30
BLS verifyMultipleSignatures 64 - blst 13.536 ms/op 9.5651 ms/op 1.42
BLS verifyMultipleSignatures 128 - blst 22.486 ms/op 18.375 ms/op 1.22
BLS deserializing 10000 signatures 822.44 ms/op 734.73 ms/op 1.12
BLS deserializing 100000 signatures 8.6450 s/op 7.7937 s/op 1.11
BLS verifyMultipleSignatures - same message - 3 - blst 1.2039 ms/op 1.0702 ms/op 1.12
BLS verifyMultipleSignatures - same message - 8 - blst 1.3095 ms/op 1.1479 ms/op 1.14
BLS verifyMultipleSignatures - same message - 32 - blst 2.0941 ms/op 1.8468 ms/op 1.13
BLS verifyMultipleSignatures - same message - 64 - blst 3.1160 ms/op 2.9482 ms/op 1.06
BLS verifyMultipleSignatures - same message - 128 - blst 5.3750 ms/op 4.9538 ms/op 1.09
BLS aggregatePubkeys 32 - blst 23.877 us/op 22.199 us/op 1.08
BLS aggregatePubkeys 128 - blst 90.036 us/op 80.197 us/op 1.12
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 120.68 ms/op 69.429 ms/op 1.74
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 84.179 ms/op 59.481 ms/op 1.42
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 62.205 ms/op 48.807 ms/op 1.27
getSlashingsAndExits - default max 186.64 us/op 87.443 us/op 2.13
getSlashingsAndExits - 2k 436.38 us/op 382.71 us/op 1.14
proposeBlockBody type=full, size=empty 7.2720 ms/op 5.4598 ms/op 1.33
isKnown best case - 1 super set check 232.00 ns/op 226.00 ns/op 1.03
isKnown normal case - 2 super set checks 228.00 ns/op 209.00 ns/op 1.09
isKnown worse case - 16 super set checks 234.00 ns/op 221.00 ns/op 1.06
InMemoryCheckpointStateCache - add get delete 2.9260 us/op 3.0440 us/op 0.96
validate api signedAggregateAndProof - struct 1.8390 ms/op 1.6648 ms/op 1.10
validate gossip signedAggregateAndProof - struct 1.7015 ms/op 1.6608 ms/op 1.02
batch validate gossip attestation - vc 640000 - chunk 32 142.68 us/op 139.59 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 64 127.68 us/op 122.70 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 128 128.17 us/op 117.35 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 126.15 us/op 123.29 us/op 1.02
pickEth1Vote - no votes 1.0230 ms/op 1.0389 ms/op 0.98
pickEth1Vote - max votes 7.4264 ms/op 5.9621 ms/op 1.25
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.154 ms/op 12.445 ms/op 1.14
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.498 ms/op 18.161 ms/op 1.24
pickEth1Vote - Eth1Data fastSerialize value x2048 492.97 us/op 481.64 us/op 1.02
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.7984 ms/op 4.1798 ms/op 0.91
bytes32 toHexString 400.00 ns/op 370.00 ns/op 1.08
bytes32 Buffer.toString(hex) 262.00 ns/op 278.00 ns/op 0.94
bytes32 Buffer.toString(hex) from Uint8Array 369.00 ns/op 373.00 ns/op 0.99
bytes32 Buffer.toString(hex) + 0x 256.00 ns/op 246.00 ns/op 1.04
Object access 1 prop 0.13100 ns/op 0.11800 ns/op 1.11
Map access 1 prop 0.13900 ns/op 0.11700 ns/op 1.19
Object get x1000 7.1000 ns/op 6.1990 ns/op 1.15
Map get x1000 6.9430 ns/op 6.5040 ns/op 1.07
Object set x1000 32.957 ns/op 31.891 ns/op 1.03
Map set x1000 22.181 ns/op 23.331 ns/op 0.95
Return object 10000 times 0.32810 ns/op 0.31240 ns/op 1.05
Throw Error 10000 times 5.0937 us/op 4.5240 us/op 1.13
toHex 157.18 ns/op 132.05 ns/op 1.19
Buffer.from 137.78 ns/op 132.05 ns/op 1.04
shared Buffer 87.100 ns/op 84.089 ns/op 1.04
fastMsgIdFn sha256 / 200 bytes 2.6850 us/op 2.2120 us/op 1.21
fastMsgIdFn h32 xxhash / 200 bytes 235.00 ns/op 203.00 ns/op 1.16
fastMsgIdFn h64 xxhash / 200 bytes 296.00 ns/op 256.00 ns/op 1.16
fastMsgIdFn sha256 / 1000 bytes 7.9210 us/op 7.4530 us/op 1.06
fastMsgIdFn h32 xxhash / 1000 bytes 373.00 ns/op 330.00 ns/op 1.13
fastMsgIdFn h64 xxhash / 1000 bytes 375.00 ns/op 380.00 ns/op 0.99
fastMsgIdFn sha256 / 10000 bytes 71.647 us/op 65.282 us/op 1.10
fastMsgIdFn h32 xxhash / 10000 bytes 1.9770 us/op 1.8390 us/op 1.08
fastMsgIdFn h64 xxhash / 10000 bytes 1.2850 us/op 1.2240 us/op 1.05
send data - 1000 256B messages 14.566 ms/op 15.492 ms/op 0.94
send data - 1000 512B messages 17.787 ms/op 19.462 ms/op 0.91
send data - 1000 1024B messages 28.715 ms/op 24.558 ms/op 1.17
send data - 1000 1200B messages 25.154 ms/op 27.901 ms/op 0.90
send data - 1000 2048B messages 28.190 ms/op 24.740 ms/op 1.14
send data - 1000 4096B messages 29.339 ms/op 25.280 ms/op 1.16
send data - 1000 16384B messages 66.813 ms/op 64.446 ms/op 1.04
send data - 1000 65536B messages 229.19 ms/op 218.79 ms/op 1.05
enrSubnets - fastDeserialize 64 bits 947.00 ns/op 916.00 ns/op 1.03
enrSubnets - ssz BitVector 64 bits 342.00 ns/op 327.00 ns/op 1.05
enrSubnets - fastDeserialize 4 bits 138.00 ns/op 130.00 ns/op 1.06
enrSubnets - ssz BitVector 4 bits 339.00 ns/op 326.00 ns/op 1.04
prioritizePeers score -10:0 att 32-0.1 sync 2-0 123.68 us/op 123.99 us/op 1.00
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 154.05 us/op 154.85 us/op 0.99
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 211.88 us/op 222.72 us/op 0.95
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 396.80 us/op 400.76 us/op 0.99
prioritizePeers score 0:0 att 64-1 sync 4-1 500.66 us/op 464.98 us/op 1.08
array of 16000 items push then shift 1.7636 us/op 1.5821 us/op 1.11
LinkedList of 16000 items push then shift 7.5090 ns/op 6.9240 ns/op 1.08
array of 16000 items push then pop 85.727 ns/op 75.092 ns/op 1.14
LinkedList of 16000 items push then pop 7.9940 ns/op 6.8280 ns/op 1.17
array of 24000 items push then shift 2.6143 us/op 2.3508 us/op 1.11
LinkedList of 24000 items push then shift 7.9200 ns/op 6.9660 ns/op 1.14
array of 24000 items push then pop 114.50 ns/op 104.72 ns/op 1.09
LinkedList of 24000 items push then pop 7.3700 ns/op 7.0030 ns/op 1.05
intersect bitArray bitLen 8 6.7380 ns/op 6.5350 ns/op 1.03
intersect array and set length 8 39.816 ns/op 38.775 ns/op 1.03
intersect bitArray bitLen 128 31.662 ns/op 29.965 ns/op 1.06
intersect array and set length 128 657.81 ns/op 620.62 ns/op 1.06
bitArray.getTrueBitIndexes() bitLen 128 1.1720 us/op 1.0180 us/op 1.15
bitArray.getTrueBitIndexes() bitLen 248 1.9450 us/op 1.7870 us/op 1.09
bitArray.getTrueBitIndexes() bitLen 512 3.9540 us/op 3.6460 us/op 1.08
Buffer.concat 32 items 644.00 ns/op 735.00 ns/op 0.88
Uint8Array.set 32 items 1.5820 us/op 1.2050 us/op 1.31
Buffer.copy 2.5270 us/op 2.1460 us/op 1.18
Uint8Array.set - with subarray 2.1260 us/op 1.9530 us/op 1.09
Uint8Array.set - without subarray 1.2310 us/op 1.2910 us/op 0.95
getUint32 - dataview 214.00 ns/op 204.00 ns/op 1.05
getUint32 - manual 130.00 ns/op 123.00 ns/op 1.06
Set add up to 64 items then delete first 2.3544 us/op 2.3096 us/op 1.02
OrderedSet add up to 64 items then delete first 3.6279 us/op 3.2777 us/op 1.11
Set add up to 64 items then delete last 2.8620 us/op 2.7930 us/op 1.02
OrderedSet add up to 64 items then delete last 4.1540 us/op 5.1936 us/op 0.80
Set add up to 64 items then delete middle 2.8054 us/op 3.4053 us/op 0.82
OrderedSet add up to 64 items then delete middle 6.1227 us/op 6.7239 us/op 0.91
Set add up to 128 items then delete first 5.7376 us/op 6.8384 us/op 0.84
OrderedSet add up to 128 items then delete first 8.7347 us/op 11.472 us/op 0.76
Set add up to 128 items then delete last 5.6449 us/op 6.7451 us/op 0.84
OrderedSet add up to 128 items then delete last 8.4304 us/op 10.478 us/op 0.80
Set add up to 128 items then delete middle 5.5116 us/op 6.3677 us/op 0.87
OrderedSet add up to 128 items then delete middle 17.049 us/op 17.994 us/op 0.95
Set add up to 256 items then delete first 10.854 us/op 14.806 us/op 0.73
OrderedSet add up to 256 items then delete first 16.895 us/op 25.001 us/op 0.68
Set add up to 256 items then delete last 10.719 us/op 13.907 us/op 0.77
OrderedSet add up to 256 items then delete last 19.569 us/op 21.671 us/op 0.90
Set add up to 256 items then delete middle 11.113 us/op 14.049 us/op 0.79
OrderedSet add up to 256 items then delete middle 49.563 us/op 51.667 us/op 0.96
transfer serialized Status (84 B) 2.6930 us/op 3.1690 us/op 0.85
copy serialized Status (84 B) 1.4830 us/op 2.1490 us/op 0.69
transfer serialized SignedVoluntaryExit (112 B) 2.8040 us/op 3.5170 us/op 0.80
copy serialized SignedVoluntaryExit (112 B) 1.6820 us/op 2.3740 us/op 0.71
transfer serialized ProposerSlashing (416 B) 2.9560 us/op 3.7000 us/op 0.80
copy serialized ProposerSlashing (416 B) 1.8420 us/op 3.0320 us/op 0.61
transfer serialized Attestation (485 B) 3.3480 us/op 3.9840 us/op 0.84
copy serialized Attestation (485 B) 1.5870 us/op 3.2960 us/op 0.48
transfer serialized AttesterSlashing (33232 B) 2.6960 us/op 3.3230 us/op 0.81
copy serialized AttesterSlashing (33232 B) 4.5080 us/op 6.3130 us/op 0.71
transfer serialized Small SignedBeaconBlock (128000 B) 3.3350 us/op 4.0240 us/op 0.83
copy serialized Small SignedBeaconBlock (128000 B) 13.700 us/op 16.502 us/op 0.83
transfer serialized Avg SignedBeaconBlock (200000 B) 3.9400 us/op 4.7530 us/op 0.83
copy serialized Avg SignedBeaconBlock (200000 B) 16.314 us/op 25.252 us/op 0.65
transfer serialized BlobsSidecar (524380 B) 4.1740 us/op 5.4620 us/op 0.76
copy serialized BlobsSidecar (524380 B) 62.408 us/op 99.931 us/op 0.62
transfer serialized Big SignedBeaconBlock (1000000 B) 4.2280 us/op 5.5850 us/op 0.76
copy serialized Big SignedBeaconBlock (1000000 B) 230.29 us/op 142.74 us/op 1.61
pass gossip attestations to forkchoice per slot 2.9091 ms/op 3.2266 ms/op 0.90
forkChoice updateHead vc 100000 bc 64 eq 0 521.52 us/op 538.04 us/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 0 3.3376 ms/op 4.0431 ms/op 0.83
forkChoice updateHead vc 1000000 bc 64 eq 0 5.6134 ms/op 8.3073 ms/op 0.68
forkChoice updateHead vc 600000 bc 320 eq 0 3.1345 ms/op 3.3133 ms/op 0.95
forkChoice updateHead vc 600000 bc 1200 eq 0 3.2633 ms/op 3.5630 ms/op 0.92
forkChoice updateHead vc 600000 bc 7200 eq 0 3.4221 ms/op 4.1564 ms/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 1000 11.169 ms/op 11.874 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 10000 11.320 ms/op 11.806 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 300000 16.034 ms/op 26.751 ms/op 0.60
computeDeltas 500000 validators 300 proto nodes 4.4020 ms/op 4.5420 ms/op 0.97
computeDeltas 500000 validators 1200 proto nodes 4.5444 ms/op 4.8641 ms/op 0.93
computeDeltas 500000 validators 7200 proto nodes 4.6960 ms/op 4.6855 ms/op 1.00
computeDeltas 750000 validators 300 proto nodes 7.2282 ms/op 6.9909 ms/op 1.03
computeDeltas 750000 validators 1200 proto nodes 6.4874 ms/op 7.1274 ms/op 0.91
computeDeltas 750000 validators 7200 proto nodes 6.6096 ms/op 7.9465 ms/op 0.83
computeDeltas 1400000 validators 300 proto nodes 12.173 ms/op 14.125 ms/op 0.86
computeDeltas 1400000 validators 1200 proto nodes 12.328 ms/op 13.885 ms/op 0.89
computeDeltas 1400000 validators 7200 proto nodes 13.111 ms/op 13.800 ms/op 0.95
computeDeltas 2100000 validators 300 proto nodes 19.934 ms/op 21.535 ms/op 0.93
computeDeltas 2100000 validators 1200 proto nodes 20.586 ms/op 21.035 ms/op 0.98
computeDeltas 2100000 validators 7200 proto nodes 20.776 ms/op 20.652 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.9719 ms/op 3.9248 ms/op 0.76
altair processAttestation - 250000 vs - 7PWei worstcase 4.4129 ms/op 4.5765 ms/op 0.96
altair processAttestation - setStatus - 1/6 committees join 173.91 us/op 153.54 us/op 1.13
altair processAttestation - setStatus - 1/3 committees join 303.48 us/op 358.16 us/op 0.85
altair processAttestation - setStatus - 1/2 committees join 403.71 us/op 441.23 us/op 0.91
altair processAttestation - setStatus - 2/3 committees join 533.66 us/op 559.47 us/op 0.95
altair processAttestation - setStatus - 4/5 committees join 799.63 us/op 751.02 us/op 1.06
altair processAttestation - setStatus - 100% committees join 879.44 us/op 906.25 us/op 0.97
altair processBlock - 250000 vs - 7PWei normalcase 5.9574 ms/op 13.110 ms/op 0.45
altair processBlock - 250000 vs - 7PWei normalcase hashState 45.703 ms/op 41.690 ms/op 1.10
altair processBlock - 250000 vs - 7PWei worstcase 50.432 ms/op 48.082 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase hashState 104.83 ms/op 103.57 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 2.5084 ms/op 2.5054 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei worstcase 30.343 ms/op 34.332 ms/op 0.88
altair processEth1Data - 250000 vs - 7PWei normalcase 414.34 us/op 445.94 us/op 0.93
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.5550 us/op 10.862 us/op 0.51
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 30.394 us/op 37.165 us/op 0.82
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.2080 us/op 8.9230 us/op 0.92
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.0520 us/op 7.4640 us/op 0.68
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 124.76 us/op 133.45 us/op 0.93
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3870 ms/op 1.2176 ms/op 1.14
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.6422 ms/op 1.6782 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5758 ms/op 1.7070 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6876 ms/op 3.6386 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9749 ms/op 1.6527 ms/op 1.19
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.4318 ms/op 3.9512 ms/op 1.12
Tree 40 250000 create 664.10 ms/op 667.23 ms/op 1.00
Tree 40 250000 get(125000) 160.75 ns/op 151.89 ns/op 1.06
Tree 40 250000 set(125000) 2.0355 us/op 2.1806 us/op 0.93
Tree 40 250000 toArray() 24.256 ms/op 23.363 ms/op 1.04
Tree 40 250000 iterate all - toArray() + loop 22.761 ms/op 22.281 ms/op 1.02
Tree 40 250000 iterate all - get(i) 65.365 ms/op 61.500 ms/op 1.06
Array 250000 create 2.8561 ms/op 2.7283 ms/op 1.05
Array 250000 clone - spread 1.8288 ms/op 1.7743 ms/op 1.03
Array 250000 get(125000) 0.47700 ns/op 0.44200 ns/op 1.08
Array 250000 set(125000) 0.49400 ns/op 0.46400 ns/op 1.06
Array 250000 iterate all - loop 131.05 us/op 90.977 us/op 1.44
phase0 afterProcessEpoch - 250000 vs - 7PWei 58.798 ms/op 53.415 ms/op 1.10
Array.fill - length 1000000 4.1020 ms/op 3.9781 ms/op 1.03
Array push - length 1000000 15.559 ms/op 23.420 ms/op 0.66
Array.get 0.32445 ns/op 0.30499 ns/op 1.06
Uint8Array.get 0.49850 ns/op 0.50245 ns/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 19.979 ms/op 19.290 ms/op 1.04
altair processEpoch - mainnet_e81889 348.44 ms/op 339.38 ms/op 1.03
mainnet_e81889 - altair beforeProcessEpoch 22.626 ms/op 21.263 ms/op 1.06
mainnet_e81889 - altair processJustificationAndFinalization 6.9560 us/op 7.6020 us/op 0.92
mainnet_e81889 - altair processInactivityUpdates 5.3863 ms/op 5.5452 ms/op 0.97
mainnet_e81889 - altair processRewardsAndPenalties 52.828 ms/op 45.916 ms/op 1.15
mainnet_e81889 - altair processRegistryUpdates 753.00 ns/op 765.00 ns/op 0.98
mainnet_e81889 - altair processSlashings 204.00 ns/op 204.00 ns/op 1.00
mainnet_e81889 - altair processEth1DataReset 192.00 ns/op 193.00 ns/op 0.99
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4722 ms/op 1.4059 ms/op 1.05
mainnet_e81889 - altair processSlashingsReset 1.2020 us/op 1.0950 us/op 1.10
mainnet_e81889 - altair processRandaoMixesReset 1.5440 us/op 1.3910 us/op 1.11
mainnet_e81889 - altair processHistoricalRootsUpdate 214.00 ns/op 216.00 ns/op 0.99
mainnet_e81889 - altair processParticipationFlagUpdates 576.00 ns/op 617.00 ns/op 0.93
mainnet_e81889 - altair processSyncCommitteeUpdates 158.00 ns/op 152.00 ns/op 1.04
mainnet_e81889 - altair afterProcessEpoch 62.199 ms/op 56.294 ms/op 1.10
capella processEpoch - mainnet_e217614 1.2484 s/op 1.2143 s/op 1.03
mainnet_e217614 - capella beforeProcessEpoch 82.730 ms/op 75.393 ms/op 1.10
mainnet_e217614 - capella processJustificationAndFinalization 5.8370 us/op 5.6880 us/op 1.03
mainnet_e217614 - capella processInactivityUpdates 18.821 ms/op 20.896 ms/op 0.90
mainnet_e217614 - capella processRewardsAndPenalties 223.97 ms/op 215.33 ms/op 1.04
mainnet_e217614 - capella processRegistryUpdates 8.4430 us/op 7.4780 us/op 1.13
mainnet_e217614 - capella processSlashings 207.00 ns/op 218.00 ns/op 0.95
mainnet_e217614 - capella processEth1DataReset 195.00 ns/op 229.00 ns/op 0.85
mainnet_e217614 - capella processEffectiveBalanceUpdates 15.050 ms/op 15.322 ms/op 0.98
mainnet_e217614 - capella processSlashingsReset 1.1360 us/op 1.0810 us/op 1.05
mainnet_e217614 - capella processRandaoMixesReset 1.4620 us/op 1.5310 us/op 0.95
mainnet_e217614 - capella processHistoricalRootsUpdate 212.00 ns/op 227.00 ns/op 0.93
mainnet_e217614 - capella processParticipationFlagUpdates 677.00 ns/op 623.00 ns/op 1.09
mainnet_e217614 - capella afterProcessEpoch 136.46 ms/op 136.64 ms/op 1.00
phase0 processEpoch - mainnet_e58758 383.47 ms/op 382.29 ms/op 1.00
mainnet_e58758 - phase0 beforeProcessEpoch 97.702 ms/op 100.66 ms/op 0.97
mainnet_e58758 - phase0 processJustificationAndFinalization 6.8880 us/op 6.3790 us/op 1.08
mainnet_e58758 - phase0 processRewardsAndPenalties 38.540 ms/op 43.186 ms/op 0.89
mainnet_e58758 - phase0 processRegistryUpdates 3.7030 us/op 4.7260 us/op 0.78
mainnet_e58758 - phase0 processSlashings 216.00 ns/op 237.00 ns/op 0.91
mainnet_e58758 - phase0 processEth1DataReset 220.00 ns/op 199.00 ns/op 1.11
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3164 ms/op 1.0944 ms/op 1.20
mainnet_e58758 - phase0 processSlashingsReset 1.1080 us/op 1.1710 us/op 0.95
mainnet_e58758 - phase0 processRandaoMixesReset 1.4670 us/op 1.6600 us/op 0.88
mainnet_e58758 - phase0 processHistoricalRootsUpdate 219.00 ns/op 213.00 ns/op 1.03
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.0620 us/op 1.0290 us/op 1.03
mainnet_e58758 - phase0 afterProcessEpoch 50.804 ms/op 46.878 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.5317 ms/op 1.8465 ms/op 0.83
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.7160 ms/op 3.6404 ms/op 0.75
altair processInactivityUpdates - 250000 normalcase 22.459 ms/op 21.586 ms/op 1.04
altair processInactivityUpdates - 250000 worstcase 22.723 ms/op 22.230 ms/op 1.02
phase0 processRegistryUpdates - 250000 normalcase 8.2980 us/op 8.2880 us/op 1.00
phase0 processRegistryUpdates - 250000 badcase_full_deposits 319.74 us/op 320.02 us/op 1.00
phase0 processRegistryUpdates - 250000 worstcase 0.5 134.07 ms/op 145.29 ms/op 0.92
altair processRewardsAndPenalties - 250000 normalcase 53.990 ms/op 41.945 ms/op 1.29
altair processRewardsAndPenalties - 250000 worstcase 51.921 ms/op 41.886 ms/op 1.24
phase0 getAttestationDeltas - 250000 normalcase 13.072 ms/op 10.417 ms/op 1.25
phase0 getAttestationDeltas - 250000 worstcase 6.9177 ms/op 7.1468 ms/op 0.97
phase0 processSlashings - 250000 worstcase 109.68 us/op 99.946 us/op 1.10
altair processSyncCommitteeUpdates - 250000 168.83 ms/op 175.70 ms/op 0.96
BeaconState.hashTreeRoot - No change 273.00 ns/op 372.00 ns/op 0.73
BeaconState.hashTreeRoot - 1 full validator 101.57 us/op 120.95 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 1.1513 ms/op 2.2832 ms/op 0.50
BeaconState.hashTreeRoot - 512 full validator 16.881 ms/op 15.485 ms/op 1.09
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 144.15 us/op 129.49 us/op 1.11
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.3419 ms/op 4.0527 ms/op 0.58
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 36.085 ms/op 39.055 ms/op 0.92
BeaconState.hashTreeRoot - 1 balances 117.35 us/op 120.45 us/op 0.97
BeaconState.hashTreeRoot - 32 balances 978.30 us/op 1.3268 ms/op 0.74
BeaconState.hashTreeRoot - 512 balances 9.7427 ms/op 12.784 ms/op 0.76
BeaconState.hashTreeRoot - 250000 balances 214.99 ms/op 267.95 ms/op 0.80
aggregationBits - 2048 els - zipIndexesInBitList 25.057 us/op 32.346 us/op 0.77
byteArrayEquals 32 67.553 ns/op 62.315 ns/op 1.08
Buffer.compare 32 20.302 ns/op 20.834 ns/op 0.97
byteArrayEquals 1024 1.8855 us/op 2.0681 us/op 0.91
Buffer.compare 1024 30.967 ns/op 30.609 ns/op 1.01
byteArrayEquals 16384 29.894 us/op 30.977 us/op 0.97
Buffer.compare 16384 234.08 ns/op 240.41 ns/op 0.97
byteArrayEquals 123687377 237.77 ms/op 260.56 ms/op 0.91
Buffer.compare 123687377 10.460 ms/op 9.5263 ms/op 1.10
byteArrayEquals 32 - diff last byte 60.639 ns/op 58.602 ns/op 1.03
Buffer.compare 32 - diff last byte 19.628 ns/op 19.034 ns/op 1.03
byteArrayEquals 1024 - diff last byte 1.8424 us/op 1.8126 us/op 1.02
Buffer.compare 1024 - diff last byte 29.659 ns/op 28.663 ns/op 1.03
byteArrayEquals 16384 - diff last byte 31.922 us/op 28.658 us/op 1.11
Buffer.compare 16384 - diff last byte 267.00 ns/op 239.97 ns/op 1.11
byteArrayEquals 123687377 - diff last byte 218.00 ms/op 222.97 ms/op 0.98
Buffer.compare 123687377 - diff last byte 9.1799 ms/op 8.4858 ms/op 1.08
byteArrayEquals 32 - random bytes 5.7470 ns/op 5.5540 ns/op 1.03
Buffer.compare 32 - random bytes 18.984 ns/op 19.299 ns/op 0.98
byteArrayEquals 1024 - random bytes 5.6750 ns/op 5.6060 ns/op 1.01
Buffer.compare 1024 - random bytes 18.811 ns/op 19.154 ns/op 0.98
byteArrayEquals 16384 - random bytes 5.6290 ns/op 5.6690 ns/op 0.99
Buffer.compare 16384 - random bytes 18.704 ns/op 19.693 ns/op 0.95
byteArrayEquals 123687377 - random bytes 7.0500 ns/op 7.3700 ns/op 0.96
Buffer.compare 123687377 - random bytes 20.570 ns/op 19.600 ns/op 1.05
regular array get 100000 times 45.253 us/op 43.054 us/op 1.05
wrappedArray get 100000 times 37.342 us/op 40.403 us/op 0.92
arrayWithProxy get 100000 times 15.731 ms/op 14.959 ms/op 1.05
ssz.Root.equals 53.067 ns/op 50.334 ns/op 1.05
byteArrayEquals 51.710 ns/op 49.336 ns/op 1.05
Buffer.compare 12.128 ns/op 11.555 ns/op 1.05
processSlot - 1 slots 12.504 us/op 12.006 us/op 1.04
processSlot - 32 slots 2.7567 ms/op 2.3248 ms/op 1.19
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 61.459 ms/op 55.309 ms/op 1.11
getCommitteeAssignments - req 1 vs - 250000 vc 2.5137 ms/op 2.4559 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 4.9245 ms/op 4.3482 ms/op 1.13
getCommitteeAssignments - req 1000 vs - 250000 vc 5.0566 ms/op 5.0043 ms/op 1.01
findModifiedValidators - 10000 modified validators 840.67 ms/op 818.30 ms/op 1.03
findModifiedValidators - 1000 modified validators 792.38 ms/op 764.57 ms/op 1.04
findModifiedValidators - 100 modified validators 310.27 ms/op 257.08 ms/op 1.21
findModifiedValidators - 10 modified validators 284.64 ms/op 234.76 ms/op 1.21
findModifiedValidators - 1 modified validators 162.62 ms/op 243.30 ms/op 0.67
findModifiedValidators - no difference 173.24 ms/op 207.22 ms/op 0.84
compare ViewDUs 7.1113 s/op 7.5599 s/op 0.94
compare each validator Uint8Array 1.5099 s/op 2.2580 s/op 0.67
compare ViewDU to Uint8Array 1.2009 s/op 2.0600 s/op 0.58
migrate state 1000000 validators, 24 modified, 0 new 993.37 ms/op 1.4078 s/op 0.71
migrate state 1000000 validators, 1700 modified, 1000 new 1.3204 s/op 1.6639 s/op 0.79
migrate state 1000000 validators, 3400 modified, 2000 new 1.6269 s/op 1.5143 s/op 1.07
migrate state 1500000 validators, 24 modified, 0 new 973.33 ms/op 970.85 ms/op 1.00
migrate state 1500000 validators, 1700 modified, 1000 new 1.1828 s/op 1.1859 s/op 1.00
migrate state 1500000 validators, 3400 modified, 2000 new 1.4988 s/op 1.3427 s/op 1.12
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0400 ns/op 4.6100 ns/op 1.09
state getBlockRootAtSlot - 250000 vs - 7PWei 566.02 ns/op 572.74 ns/op 0.99
computeProposers - vc 250000 7.6865 ms/op 8.1377 ms/op 0.94
computeEpochShuffling - vc 250000 44.697 ms/op 44.949 ms/op 0.99
getNextSyncCommittee - vc 250000 155.66 ms/op 148.26 ms/op 1.05
computeSigningRoot for AttestationData 17.450 us/op 22.216 us/op 0.79
hash AttestationData serialized data then Buffer.toString(base64) 1.5814 us/op 1.5944 us/op 0.99
toHexString serialized data 838.97 ns/op 1.0830 us/op 0.77
Buffer.toString(base64) 158.89 ns/op 189.65 ns/op 0.84
nodejs block root to RootHex using toHex 154.30 ns/op 165.63 ns/op 0.93
nodejs block root to RootHex using toRootHex 88.410 ns/op 95.698 ns/op 0.92
browser block root to RootHex using the deprecated toHexString 216.28 ns/op 238.97 ns/op 0.91
browser block root to RootHex using toHex 174.92 ns/op 188.47 ns/op 0.93
browser block root to RootHex using toRootHex 164.18 ns/op 181.36 ns/op 0.91

by benchmarkbot/action

nflaig
nflaig previously approved these changes Jan 24, 2025
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.

2 participants