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 4 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 48.60%. Comparing base (42631de) to head (282a709).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7359      +/-   ##
============================================
- Coverage     48.61%   48.60%   -0.01%     
============================================
  Files           603      603              
  Lines         40519    40526       +7     
  Branches       2070     2063       -7     
============================================
+ Hits          19697    19698       +1     
- Misses        20784    20790       +6     
  Partials         38       38              

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: 75524cf Previous: 821c319 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.8437 ms/op 2.0039 ms/op 1.42
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 72.609 us/op 67.383 us/op 1.08
BLS verify - blst 1.0820 ms/op 990.25 us/op 1.09
BLS verifyMultipleSignatures 3 - blst 1.7412 ms/op 1.3960 ms/op 1.25
BLS verifyMultipleSignatures 8 - blst 2.5563 ms/op 1.9688 ms/op 1.30
BLS verifyMultipleSignatures 32 - blst 7.7374 ms/op 6.2492 ms/op 1.24
BLS verifyMultipleSignatures 64 - blst 14.043 ms/op 11.553 ms/op 1.22
BLS verifyMultipleSignatures 128 - blst 23.597 ms/op 19.773 ms/op 1.19
BLS deserializing 10000 signatures 738.88 ms/op 740.38 ms/op 1.00
BLS deserializing 100000 signatures 7.6570 s/op 7.3580 s/op 1.04
BLS verifyMultipleSignatures - same message - 3 - blst 1.2658 ms/op 1.1926 ms/op 1.06
BLS verifyMultipleSignatures - same message - 8 - blst 1.3557 ms/op 1.3033 ms/op 1.04
BLS verifyMultipleSignatures - same message - 32 - blst 1.9139 ms/op 2.1026 ms/op 0.91
BLS verifyMultipleSignatures - same message - 64 - blst 3.0188 ms/op 2.9709 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.8345 ms/op 4.9605 ms/op 0.97
BLS aggregatePubkeys 32 - blst 21.887 us/op 21.363 us/op 1.02
BLS aggregatePubkeys 128 - blst 73.549 us/op 76.606 us/op 0.96
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 63.026 ms/op 63.300 ms/op 1.00
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 68.853 ms/op 78.636 ms/op 0.88
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 39.100 ms/op 47.784 ms/op 0.82
getSlashingsAndExits - default max 97.409 us/op 103.06 us/op 0.95
getSlashingsAndExits - 2k 362.64 us/op 464.28 us/op 0.78
proposeBlockBody type=full, size=empty 7.1885 ms/op 6.0313 ms/op 1.19
isKnown best case - 1 super set check 525.00 ns/op 335.00 ns/op 1.57
isKnown normal case - 2 super set checks 515.00 ns/op 308.00 ns/op 1.67
isKnown worse case - 16 super set checks 456.00 ns/op 312.00 ns/op 1.46
InMemoryCheckpointStateCache - add get delete 3.7010 us/op 3.2880 us/op 1.13
validate api signedAggregateAndProof - struct 1.4766 ms/op 2.1017 ms/op 0.70
validate gossip signedAggregateAndProof - struct 1.5106 ms/op 1.8738 ms/op 0.81
batch validate gossip attestation - vc 640000 - chunk 32 147.80 us/op 143.80 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 64 135.52 us/op 132.96 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 128.97 us/op 126.47 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 256 123.82 us/op 117.93 us/op 1.05
pickEth1Vote - no votes 1.3395 ms/op 1.1340 ms/op 1.18
pickEth1Vote - max votes 9.6356 ms/op 7.2128 ms/op 1.34
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.127 ms/op 15.217 ms/op 1.13
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 31.093 ms/op 20.933 ms/op 1.49
pickEth1Vote - Eth1Data fastSerialize value x2048 703.17 us/op 586.39 us/op 1.20
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.1030 ms/op 3.0906 ms/op 1.33
bytes32 toHexString 806.00 ns/op 530.00 ns/op 1.52
bytes32 Buffer.toString(hex) 272.00 ns/op 252.00 ns/op 1.08
bytes32 Buffer.toString(hex) from Uint8Array 535.00 ns/op 434.00 ns/op 1.23
bytes32 Buffer.toString(hex) + 0x 277.00 ns/op 256.00 ns/op 1.08
Object access 1 prop 0.22000 ns/op 0.15500 ns/op 1.42
Map access 1 prop 0.15500 ns/op 0.13900 ns/op 1.12
Object get x1000 8.9020 ns/op 6.1660 ns/op 1.44
Map get x1000 7.9450 ns/op 6.6700 ns/op 1.19
Object set x1000 65.795 ns/op 46.584 ns/op 1.41
Map set x1000 44.325 ns/op 31.360 ns/op 1.41
Return object 10000 times 0.34090 ns/op 0.31500 ns/op 1.08
Throw Error 10000 times 3.6953 us/op 3.5543 us/op 1.04
toHex 198.50 ns/op 175.77 ns/op 1.13
Buffer.from 181.92 ns/op 161.65 ns/op 1.13
shared Buffer 101.88 ns/op 96.585 ns/op 1.05
fastMsgIdFn sha256 / 200 bytes 2.7850 us/op 2.3550 us/op 1.18
fastMsgIdFn h32 xxhash / 200 bytes 347.00 ns/op 280.00 ns/op 1.24
fastMsgIdFn h64 xxhash / 200 bytes 289.00 ns/op 270.00 ns/op 1.07
fastMsgIdFn sha256 / 1000 bytes 8.4010 us/op 7.6270 us/op 1.10
fastMsgIdFn h32 xxhash / 1000 bytes 495.00 ns/op 385.00 ns/op 1.29
fastMsgIdFn h64 xxhash / 1000 bytes 419.00 ns/op 344.00 ns/op 1.22
fastMsgIdFn sha256 / 10000 bytes 68.385 us/op 65.844 us/op 1.04
fastMsgIdFn h32 xxhash / 10000 bytes 1.9980 us/op 1.9710 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.2840 us/op 1.3300 us/op 0.97
send data - 1000 256B messages 18.667 ms/op 13.918 ms/op 1.34
send data - 1000 512B messages 22.907 ms/op 21.670 ms/op 1.06
send data - 1000 1024B messages 30.278 ms/op 26.675 ms/op 1.14
send data - 1000 1200B messages 29.815 ms/op 29.813 ms/op 1.00
send data - 1000 2048B messages 36.640 ms/op 34.120 ms/op 1.07
send data - 1000 4096B messages 37.377 ms/op 31.111 ms/op 1.20
send data - 1000 16384B messages 87.872 ms/op 74.284 ms/op 1.18
send data - 1000 65536B messages 267.73 ms/op 210.29 ms/op 1.27
enrSubnets - fastDeserialize 64 bits 2.0630 us/op 1.1050 us/op 1.87
enrSubnets - ssz BitVector 64 bits 558.00 ns/op 359.00 ns/op 1.55
enrSubnets - fastDeserialize 4 bits 211.00 ns/op 139.00 ns/op 1.52
enrSubnets - ssz BitVector 4 bits 488.00 ns/op 351.00 ns/op 1.39
prioritizePeers score -10:0 att 32-0.1 sync 2-0 216.69 us/op 142.35 us/op 1.52
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 257.40 us/op 160.03 us/op 1.61
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 380.74 us/op 219.96 us/op 1.73
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 583.62 us/op 409.30 us/op 1.43
prioritizePeers score 0:0 att 64-1 sync 4-1 780.58 us/op 533.08 us/op 1.46
array of 16000 items push then shift 1.7270 us/op 1.6483 us/op 1.05
LinkedList of 16000 items push then shift 10.671 ns/op 7.1230 ns/op 1.50
array of 16000 items push then pop 151.10 ns/op 116.14 ns/op 1.30
LinkedList of 16000 items push then pop 9.2490 ns/op 7.0010 ns/op 1.32
array of 24000 items push then shift 2.5972 us/op 2.4603 us/op 1.06
LinkedList of 24000 items push then shift 10.828 ns/op 7.7050 ns/op 1.41
array of 24000 items push then pop 214.12 ns/op 145.71 ns/op 1.47
LinkedList of 24000 items push then pop 9.3190 ns/op 7.0500 ns/op 1.32
intersect bitArray bitLen 8 7.0920 ns/op 6.5500 ns/op 1.08
intersect array and set length 8 77.131 ns/op 45.362 ns/op 1.70
intersect bitArray bitLen 128 31.150 ns/op 30.381 ns/op 1.03
intersect array and set length 128 889.68 ns/op 732.70 ns/op 1.21
bitArray.getTrueBitIndexes() bitLen 128 1.8680 us/op 1.4580 us/op 1.28
bitArray.getTrueBitIndexes() bitLen 248 2.8740 us/op 2.4850 us/op 1.16
bitArray.getTrueBitIndexes() bitLen 512 5.5960 us/op 4.4960 us/op 1.24
Buffer.concat 32 items 998.00 ns/op 780.00 ns/op 1.28
Uint8Array.set 32 items 2.1240 us/op 2.0760 us/op 1.02
Buffer.copy 3.0380 us/op 3.2930 us/op 0.92
Uint8Array.set - with subarray 3.5620 us/op 3.0990 us/op 1.15
Uint8Array.set - without subarray 2.0670 us/op 1.9540 us/op 1.06
getUint32 - dataview 294.00 ns/op 232.00 ns/op 1.27
getUint32 - manual 320.00 ns/op 148.00 ns/op 2.16
Set add up to 64 items then delete first 2.7367 us/op 2.1545 us/op 1.27
OrderedSet add up to 64 items then delete first 3.2540 us/op 3.1686 us/op 1.03
Set add up to 64 items then delete last 2.5838 us/op 2.4901 us/op 1.04
OrderedSet add up to 64 items then delete last 3.7237 us/op 3.5676 us/op 1.04
Set add up to 64 items then delete middle 2.9966 us/op 2.4670 us/op 1.21
OrderedSet add up to 64 items then delete middle 6.5909 us/op 5.2222 us/op 1.26
Set add up to 128 items then delete first 6.3532 us/op 4.9976 us/op 1.27
OrderedSet add up to 128 items then delete first 8.6041 us/op 7.9226 us/op 1.09
Set add up to 128 items then delete last 5.4652 us/op 4.9403 us/op 1.11
OrderedSet add up to 128 items then delete last 7.1704 us/op 7.2881 us/op 0.98
Set add up to 128 items then delete middle 4.8808 us/op 4.8435 us/op 1.01
OrderedSet add up to 128 items then delete middle 13.593 us/op 13.495 us/op 1.01
Set add up to 256 items then delete first 10.605 us/op 10.222 us/op 1.04
OrderedSet add up to 256 items then delete first 16.363 us/op 16.219 us/op 1.01
Set add up to 256 items then delete last 10.260 us/op 9.8502 us/op 1.04
OrderedSet add up to 256 items then delete last 15.366 us/op 14.883 us/op 1.03
Set add up to 256 items then delete middle 9.9590 us/op 9.7526 us/op 1.02
OrderedSet add up to 256 items then delete middle 41.380 us/op 41.949 us/op 0.99
transfer serialized Status (84 B) 2.5890 us/op 2.8080 us/op 0.92
copy serialized Status (84 B) 1.3390 us/op 1.4180 us/op 0.94
transfer serialized SignedVoluntaryExit (112 B) 2.7110 us/op 2.6460 us/op 1.02
copy serialized SignedVoluntaryExit (112 B) 1.4670 us/op 1.3550 us/op 1.08
transfer serialized ProposerSlashing (416 B) 2.6560 us/op 3.3630 us/op 0.79
copy serialized ProposerSlashing (416 B) 1.7600 us/op 2.1550 us/op 0.82
transfer serialized Attestation (485 B) 3.0210 us/op 3.0300 us/op 1.00
copy serialized Attestation (485 B) 1.8480 us/op 1.7160 us/op 1.08
transfer serialized AttesterSlashing (33232 B) 2.9710 us/op 3.1280 us/op 0.95
copy serialized AttesterSlashing (33232 B) 5.5070 us/op 5.5120 us/op 1.00
transfer serialized Small SignedBeaconBlock (128000 B) 3.4520 us/op 3.2750 us/op 1.05
copy serialized Small SignedBeaconBlock (128000 B) 15.217 us/op 45.648 us/op 0.33
transfer serialized Avg SignedBeaconBlock (200000 B) 4.0420 us/op 4.2980 us/op 0.94
copy serialized Avg SignedBeaconBlock (200000 B) 24.426 us/op 19.771 us/op 1.24
transfer serialized BlobsSidecar (524380 B) 4.2450 us/op 3.9290 us/op 1.08
copy serialized BlobsSidecar (524380 B) 130.83 us/op 80.504 us/op 1.63
transfer serialized Big SignedBeaconBlock (1000000 B) 4.9250 us/op 3.9860 us/op 1.24
copy serialized Big SignedBeaconBlock (1000000 B) 158.35 us/op 149.00 us/op 1.06
pass gossip attestations to forkchoice per slot 2.7145 ms/op 4.6259 ms/op 0.59
forkChoice updateHead vc 100000 bc 64 eq 0 455.09 us/op 455.31 us/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 0 3.2549 ms/op 3.7102 ms/op 0.88
forkChoice updateHead vc 1000000 bc 64 eq 0 4.9302 ms/op 5.3640 ms/op 0.92
forkChoice updateHead vc 600000 bc 320 eq 0 2.8400 ms/op 2.8673 ms/op 0.99
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0554 ms/op 2.9763 ms/op 1.03
forkChoice updateHead vc 600000 bc 7200 eq 0 4.6707 ms/op 4.1352 ms/op 1.13
forkChoice updateHead vc 600000 bc 64 eq 1000 10.279 ms/op 10.565 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 10000 10.938 ms/op 11.014 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 300000 13.087 ms/op 15.891 ms/op 0.82
computeDeltas 500000 validators 300 proto nodes 4.2008 ms/op 4.0844 ms/op 1.03
computeDeltas 500000 validators 1200 proto nodes 4.2624 ms/op 4.1636 ms/op 1.02
computeDeltas 500000 validators 7200 proto nodes 4.4258 ms/op 4.2841 ms/op 1.03
computeDeltas 750000 validators 300 proto nodes 7.3153 ms/op 6.4844 ms/op 1.13
computeDeltas 750000 validators 1200 proto nodes 7.6802 ms/op 8.5198 ms/op 0.90
computeDeltas 750000 validators 7200 proto nodes 7.0387 ms/op 8.0568 ms/op 0.87
computeDeltas 1400000 validators 300 proto nodes 13.123 ms/op 13.413 ms/op 0.98
computeDeltas 1400000 validators 1200 proto nodes 12.019 ms/op 13.096 ms/op 0.92
computeDeltas 1400000 validators 7200 proto nodes 11.639 ms/op 12.729 ms/op 0.91
computeDeltas 2100000 validators 300 proto nodes 19.597 ms/op 19.718 ms/op 0.99
computeDeltas 2100000 validators 1200 proto nodes 18.985 ms/op 19.804 ms/op 0.96
computeDeltas 2100000 validators 7200 proto nodes 18.655 ms/op 23.082 ms/op 0.81
altair processAttestation - 250000 vs - 7PWei normalcase 2.8721 ms/op 3.9280 ms/op 0.73
altair processAttestation - 250000 vs - 7PWei worstcase 3.5735 ms/op 5.2171 ms/op 0.68
altair processAttestation - setStatus - 1/6 committees join 145.82 us/op 198.16 us/op 0.74
altair processAttestation - setStatus - 1/3 committees join 310.06 us/op 363.36 us/op 0.85
altair processAttestation - setStatus - 1/2 committees join 381.81 us/op 451.00 us/op 0.85
altair processAttestation - setStatus - 2/3 committees join 475.52 us/op 598.92 us/op 0.79
altair processAttestation - setStatus - 4/5 committees join 692.04 us/op 745.71 us/op 0.93
altair processAttestation - setStatus - 100% committees join 745.36 us/op 916.12 us/op 0.81
altair processBlock - 250000 vs - 7PWei normalcase 4.6040 ms/op 6.8325 ms/op 0.67
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.468 ms/op 29.981 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase 31.832 ms/op 54.268 ms/op 0.59
altair processBlock - 250000 vs - 7PWei worstcase hashState 72.306 ms/op 131.57 ms/op 0.55
phase0 processBlock - 250000 vs - 7PWei normalcase 2.1385 ms/op 4.0616 ms/op 0.53
phase0 processBlock - 250000 vs - 7PWei worstcase 21.944 ms/op 34.996 ms/op 0.63
altair processEth1Data - 250000 vs - 7PWei normalcase 437.32 us/op 689.32 us/op 0.63
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.1430 us/op 9.7010 us/op 0.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 37.094 us/op 55.839 us/op 0.66
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.8940 us/op 17.224 us/op 0.57
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.3290 us/op 12.485 us/op 0.75
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 167.76 us/op 223.63 us/op 0.75
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 947.31 us/op 1.7458 ms/op 0.54
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5073 ms/op 2.2057 ms/op 0.68
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6729 ms/op 2.7283 ms/op 0.61
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 9.3893 ms/op 8.2947 ms/op 1.13
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6096 ms/op 2.3651 ms/op 0.68
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.7648 ms/op 6.9169 ms/op 0.69
Tree 40 250000 create 781.45 ms/op 1.0324 s/op 0.76
Tree 40 250000 get(125000) 162.94 ns/op 224.49 ns/op 0.73
Tree 40 250000 set(125000) 2.4387 us/op 3.4276 us/op 0.71
Tree 40 250000 toArray() 24.997 ms/op 33.820 ms/op 0.74
Tree 40 250000 iterate all - toArray() + loop 23.744 ms/op 32.657 ms/op 0.73
Tree 40 250000 iterate all - get(i) 72.237 ms/op 84.399 ms/op 0.86
Array 250000 create 4.5321 ms/op 5.6659 ms/op 0.80
Array 250000 clone - spread 2.1075 ms/op 5.6399 ms/op 0.37
Array 250000 get(125000) 0.45500 ns/op 0.60500 ns/op 0.75
Array 250000 set(125000) 0.48500 ns/op 0.72700 ns/op 0.67
Array 250000 iterate all - loop 113.25 us/op 119.37 us/op 0.95
phase0 afterProcessEpoch - 250000 vs - 7PWei 55.720 ms/op 65.905 ms/op 0.85
Array.fill - length 1000000 5.9155 ms/op 9.7906 ms/op 0.60
Array push - length 1000000 27.402 ms/op 55.190 ms/op 0.50
Array.get 0.30450 ns/op 0.44172 ns/op 0.69
Uint8Array.get 0.45847 ns/op 0.57034 ns/op 0.80
phase0 beforeProcessEpoch - 250000 vs - 7PWei 21.439 ms/op 36.827 ms/op 0.58
altair processEpoch - mainnet_e81889 370.51 ms/op 416.64 ms/op 0.89
mainnet_e81889 - altair beforeProcessEpoch 28.819 ms/op 34.754 ms/op 0.83
mainnet_e81889 - altair processJustificationAndFinalization 28.689 us/op 37.440 us/op 0.77
mainnet_e81889 - altair processInactivityUpdates 8.0455 ms/op 10.330 ms/op 0.78
mainnet_e81889 - altair processRewardsAndPenalties 47.698 ms/op 64.807 ms/op 0.74
mainnet_e81889 - altair processRegistryUpdates 5.2370 us/op 6.8150 us/op 0.77
mainnet_e81889 - altair processSlashings 1.0670 us/op 1.1550 us/op 0.92
mainnet_e81889 - altair processEth1DataReset 1.1390 us/op 1.2660 us/op 0.90
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.8138 ms/op 2.0667 ms/op 0.88
mainnet_e81889 - altair processSlashingsReset 8.2700 us/op 8.9080 us/op 0.93
mainnet_e81889 - altair processRandaoMixesReset 10.354 us/op 9.0490 us/op 1.14
mainnet_e81889 - altair processHistoricalRootsUpdate 1.7740 us/op 1.5330 us/op 1.16
mainnet_e81889 - altair processParticipationFlagUpdates 5.7750 us/op 7.8200 us/op 0.74
mainnet_e81889 - altair processSyncCommitteeUpdates 1.9340 us/op 1.6470 us/op 1.17
mainnet_e81889 - altair afterProcessEpoch 58.453 ms/op 59.015 ms/op 0.99
capella processEpoch - mainnet_e217614 1.3719 s/op 1.1527 s/op 1.19
mainnet_e217614 - capella beforeProcessEpoch 83.820 ms/op 70.568 ms/op 1.19
mainnet_e217614 - capella processJustificationAndFinalization 28.433 us/op 18.953 us/op 1.50
mainnet_e217614 - capella processInactivityUpdates 19.358 ms/op 16.634 ms/op 1.16
mainnet_e217614 - capella processRewardsAndPenalties 263.44 ms/op 251.90 ms/op 1.05
mainnet_e217614 - capella processRegistryUpdates 23.053 us/op 16.045 us/op 1.44
mainnet_e217614 - capella processSlashings 1.4200 us/op 847.00 ns/op 1.68
mainnet_e217614 - capella processEth1DataReset 1.1300 us/op 472.00 ns/op 2.39
mainnet_e217614 - capella processEffectiveBalanceUpdates 15.752 ms/op 14.105 ms/op 1.12
mainnet_e217614 - capella processSlashingsReset 5.8720 us/op 7.5410 us/op 0.78
mainnet_e217614 - capella processRandaoMixesReset 11.811 us/op 5.8040 us/op 2.03
mainnet_e217614 - capella processHistoricalRootsUpdate 1.3290 us/op 702.00 ns/op 1.89
mainnet_e217614 - capella processParticipationFlagUpdates 3.4590 us/op 2.7370 us/op 1.26
mainnet_e217614 - capella afterProcessEpoch 128.21 ms/op 125.27 ms/op 1.02
phase0 processEpoch - mainnet_e58758 416.57 ms/op 368.06 ms/op 1.13
mainnet_e58758 - phase0 beforeProcessEpoch 119.87 ms/op 79.505 ms/op 1.51
mainnet_e58758 - phase0 processJustificationAndFinalization 26.720 us/op 15.685 us/op 1.70
mainnet_e58758 - phase0 processRewardsAndPenalties 24.512 ms/op 27.111 ms/op 0.90
mainnet_e58758 - phase0 processRegistryUpdates 12.260 us/op 8.9600 us/op 1.37
mainnet_e58758 - phase0 processSlashings 1.3150 us/op 665.00 ns/op 1.98
mainnet_e58758 - phase0 processEth1DataReset 1.4740 us/op 506.00 ns/op 2.91
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0375 ms/op 1.6187 ms/op 1.26
mainnet_e58758 - phase0 processSlashingsReset 6.0220 us/op 4.0280 us/op 1.50
mainnet_e58758 - phase0 processRandaoMixesReset 12.627 us/op 6.4780 us/op 1.95
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.4870 us/op 583.00 ns/op 2.55
mainnet_e58758 - phase0 processParticipationRecordUpdates 10.931 us/op 3.5780 us/op 3.06
mainnet_e58758 - phase0 afterProcessEpoch 47.305 ms/op 44.400 ms/op 1.07
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6831 ms/op 2.0071 ms/op 0.84
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 5.3582 ms/op 1.9144 ms/op 2.80
altair processInactivityUpdates - 250000 normalcase 22.800 ms/op 19.816 ms/op 1.15
altair processInactivityUpdates - 250000 worstcase 18.946 ms/op 20.551 ms/op 0.92
phase0 processRegistryUpdates - 250000 normalcase 9.3560 us/op 5.6660 us/op 1.65
phase0 processRegistryUpdates - 250000 badcase_full_deposits 318.40 us/op 309.67 us/op 1.03
phase0 processRegistryUpdates - 250000 worstcase 0.5 124.75 ms/op 110.40 ms/op 1.13
altair processRewardsAndPenalties - 250000 normalcase 48.775 ms/op 45.038 ms/op 1.08
altair processRewardsAndPenalties - 250000 worstcase 43.425 ms/op 47.362 ms/op 0.92
phase0 getAttestationDeltas - 250000 normalcase 10.536 ms/op 6.8483 ms/op 1.54
phase0 getAttestationDeltas - 250000 worstcase 7.7653 ms/op 7.0156 ms/op 1.11
phase0 processSlashings - 250000 worstcase 102.81 us/op 111.81 us/op 0.92
altair processSyncCommitteeUpdates - 250000 126.84 ms/op 133.34 ms/op 0.95
BeaconState.hashTreeRoot - No change 238.00 ns/op 257.00 ns/op 0.93
BeaconState.hashTreeRoot - 1 full validator 108.92 us/op 105.98 us/op 1.03
BeaconState.hashTreeRoot - 32 full validator 1.1348 ms/op 1.1156 ms/op 1.02
BeaconState.hashTreeRoot - 512 full validator 10.031 ms/op 9.1336 ms/op 1.10
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 135.64 us/op 157.32 us/op 0.86
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7585 ms/op 2.1626 ms/op 0.81
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 22.506 ms/op 27.426 ms/op 0.82
BeaconState.hashTreeRoot - 1 balances 131.10 us/op 95.800 us/op 1.37
BeaconState.hashTreeRoot - 32 balances 1.6274 ms/op 931.13 us/op 1.75
BeaconState.hashTreeRoot - 512 balances 11.762 ms/op 8.3134 ms/op 1.41
BeaconState.hashTreeRoot - 250000 balances 212.27 ms/op 148.97 ms/op 1.42
aggregationBits - 2048 els - zipIndexesInBitList 40.443 us/op 26.278 us/op 1.54
byteArrayEquals 32 56.233 ns/op 54.405 ns/op 1.03
Buffer.compare 32 18.347 ns/op 17.484 ns/op 1.05
byteArrayEquals 1024 1.6851 us/op 1.6073 us/op 1.05
Buffer.compare 1024 25.928 ns/op 25.853 ns/op 1.00
byteArrayEquals 16384 25.413 us/op 25.531 us/op 1.00
Buffer.compare 16384 207.18 ns/op 206.92 ns/op 1.00
byteArrayEquals 123687377 205.99 ms/op 192.50 ms/op 1.07
Buffer.compare 123687377 12.952 ms/op 6.9973 ms/op 1.85
byteArrayEquals 32 - diff last byte 52.838 ns/op 53.164 ns/op 0.99
Buffer.compare 32 - diff last byte 17.390 ns/op 20.342 ns/op 0.85
byteArrayEquals 1024 - diff last byte 1.6021 us/op 1.6354 us/op 0.98
Buffer.compare 1024 - diff last byte 25.338 ns/op 27.958 ns/op 0.91
byteArrayEquals 16384 - diff last byte 25.331 us/op 25.550 us/op 0.99
Buffer.compare 16384 - diff last byte 197.44 ns/op 195.42 ns/op 1.01
byteArrayEquals 123687377 - diff last byte 196.51 ms/op 194.32 ms/op 1.01
Buffer.compare 123687377 - diff last byte 9.1637 ms/op 7.3624 ms/op 1.24
byteArrayEquals 32 - random bytes 5.4700 ns/op 5.2480 ns/op 1.04
Buffer.compare 32 - random bytes 18.502 ns/op 17.789 ns/op 1.04
byteArrayEquals 1024 - random bytes 5.4560 ns/op 5.2130 ns/op 1.05
Buffer.compare 1024 - random bytes 17.435 ns/op 17.287 ns/op 1.01
byteArrayEquals 16384 - random bytes 5.4120 ns/op 5.1690 ns/op 1.05
Buffer.compare 16384 - random bytes 18.636 ns/op 17.508 ns/op 1.06
byteArrayEquals 123687377 - random bytes 7.1400 ns/op 6.5400 ns/op 1.09
Buffer.compare 123687377 - random bytes 21.780 ns/op 18.790 ns/op 1.16
regular array get 100000 times 40.768 us/op 36.425 us/op 1.12
wrappedArray get 100000 times 34.606 us/op 33.684 us/op 1.03
arrayWithProxy get 100000 times 12.954 ms/op 14.592 ms/op 0.89
ssz.Root.equals 46.716 ns/op 46.953 ns/op 0.99
byteArrayEquals 46.274 ns/op 46.199 ns/op 1.00
Buffer.compare 11.030 ns/op 10.697 ns/op 1.03
processSlot - 1 slots 15.026 us/op 15.509 us/op 0.97
processSlot - 32 slots 3.0566 ms/op 4.0540 ms/op 0.75
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 47.769 ms/op 38.718 ms/op 1.23
getCommitteeAssignments - req 1 vs - 250000 vc 2.4581 ms/op 2.1443 ms/op 1.15
getCommitteeAssignments - req 100 vs - 250000 vc 4.3914 ms/op 4.1510 ms/op 1.06
getCommitteeAssignments - req 1000 vs - 250000 vc 4.8258 ms/op 4.4484 ms/op 1.08
findModifiedValidators - 10000 modified validators 366.84 ms/op 251.52 ms/op 1.46
findModifiedValidators - 1000 modified validators 338.92 ms/op 195.18 ms/op 1.74
findModifiedValidators - 100 modified validators 347.36 ms/op 181.18 ms/op 1.92
findModifiedValidators - 10 modified validators 289.49 ms/op 189.57 ms/op 1.53
findModifiedValidators - 1 modified validators 297.17 ms/op 185.18 ms/op 1.60
findModifiedValidators - no difference 311.41 ms/op 175.11 ms/op 1.78
compare ViewDUs 5.1288 s/op 3.3275 s/op 1.54
compare each validator Uint8Array 2.4738 s/op 1.6687 s/op 1.48
compare ViewDU to Uint8Array 1.3347 s/op 924.21 ms/op 1.44
migrate state 1000000 validators, 24 modified, 0 new 809.81 ms/op 698.39 ms/op 1.16
migrate state 1000000 validators, 1700 modified, 1000 new 1.0127 s/op 1.0160 s/op 1.00
migrate state 1000000 validators, 3400 modified, 2000 new 1.2321 s/op 1.2591 s/op 0.98
migrate state 1500000 validators, 24 modified, 0 new 812.08 ms/op 841.65 ms/op 0.96
migrate state 1500000 validators, 1700 modified, 1000 new 938.04 ms/op 1.0117 s/op 0.93
migrate state 1500000 validators, 3400 modified, 2000 new 1.1555 s/op 1.2457 s/op 0.93
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0900 ns/op 4.4800 ns/op 1.14
state getBlockRootAtSlot - 250000 vs - 7PWei 878.32 ns/op 727.76 ns/op 1.21
computeProposers - vc 250000 7.9923 ms/op 6.7755 ms/op 1.18
computeEpochShuffling - vc 250000 44.135 ms/op 41.157 ms/op 1.07
getNextSyncCommittee - vc 250000 131.25 ms/op 119.67 ms/op 1.10
computeSigningRoot for AttestationData 27.507 us/op 22.584 us/op 1.22
hash AttestationData serialized data then Buffer.toString(base64) 1.6545 us/op 1.5564 us/op 1.06
toHexString serialized data 909.98 ns/op 859.12 ns/op 1.06
Buffer.toString(base64) 203.20 ns/op 178.51 ns/op 1.14
nodejs block root to RootHex using toHex 158.68 ns/op 142.83 ns/op 1.11
nodejs block root to RootHex using toRootHex 94.664 ns/op 90.822 ns/op 1.04
browser block root to RootHex using the deprecated toHexString 229.81 ns/op 221.22 ns/op 1.04
browser block root to RootHex using toHex 184.59 ns/op 177.71 ns/op 1.04
browser block root to RootHex using toRootHex 168.10 ns/op 158.24 ns/op 1.06

by benchmarkbot/action

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