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 5 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.44%. Comparing base (42631de) to head (e64ff6f).
Report is 7 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7359      +/-   ##
============================================
- Coverage     48.61%   48.44%   -0.17%     
============================================
  Files           603      602       -1     
  Lines         40519    40390     -129     
  Branches       2070     2062       -8     
============================================
- Hits          19697    19568     -129     
  Misses        20784    20784              
  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: 6fb7396 Previous: ee9d4fa Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.6300 ms/op 1.7230 ms/op 0.95
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 42.921 us/op 37.800 us/op 1.14
BLS verify - blst 916.68 us/op 966.50 us/op 0.95
BLS verifyMultipleSignatures 3 - blst 1.2631 ms/op 1.2906 ms/op 0.98
BLS verifyMultipleSignatures 8 - blst 1.9203 ms/op 1.8218 ms/op 1.05
BLS verifyMultipleSignatures 32 - blst 5.8596 ms/op 6.1339 ms/op 0.96
BLS verifyMultipleSignatures 64 - blst 10.947 ms/op 10.490 ms/op 1.04
BLS verifyMultipleSignatures 128 - blst 17.592 ms/op 17.297 ms/op 1.02
BLS deserializing 10000 signatures 716.99 ms/op 679.61 ms/op 1.05
BLS deserializing 100000 signatures 7.1709 s/op 6.7454 s/op 1.06
BLS verifyMultipleSignatures - same message - 3 - blst 1.0297 ms/op 895.04 us/op 1.15
BLS verifyMultipleSignatures - same message - 8 - blst 1.1830 ms/op 1.1144 ms/op 1.06
BLS verifyMultipleSignatures - same message - 32 - blst 1.8226 ms/op 1.7669 ms/op 1.03
BLS verifyMultipleSignatures - same message - 64 - blst 2.6842 ms/op 2.5913 ms/op 1.04
BLS verifyMultipleSignatures - same message - 128 - blst 4.5112 ms/op 4.2857 ms/op 1.05
BLS aggregatePubkeys 32 - blst 20.290 us/op 19.912 us/op 1.02
BLS aggregatePubkeys 128 - blst 72.467 us/op 69.416 us/op 1.04
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 60.228 ms/op 52.506 ms/op 1.15
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 51.532 ms/op 52.197 ms/op 0.99
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 42.505 ms/op 40.425 ms/op 1.05
getSlashingsAndExits - default max 77.566 us/op 87.288 us/op 0.89
getSlashingsAndExits - 2k 404.02 us/op 375.32 us/op 1.08
proposeBlockBody type=full, size=empty 5.3505 ms/op 5.3109 ms/op 1.01
isKnown best case - 1 super set check 277.00 ns/op 299.00 ns/op 0.93
isKnown normal case - 2 super set checks 274.00 ns/op 272.00 ns/op 1.01
isKnown worse case - 16 super set checks 274.00 ns/op 268.00 ns/op 1.02
InMemoryCheckpointStateCache - add get delete 2.8080 us/op 3.1110 us/op 0.90
validate api signedAggregateAndProof - struct 1.9017 ms/op 2.1636 ms/op 0.88
validate gossip signedAggregateAndProof - struct 2.6702 ms/op 1.3691 ms/op 1.95
batch validate gossip attestation - vc 640000 - chunk 32 132.86 us/op 134.37 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 64 116.49 us/op 114.11 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 108.56 us/op 113.46 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 107.02 us/op 116.29 us/op 0.92
pickEth1Vote - no votes 1.0447 ms/op 1.1728 ms/op 0.89
pickEth1Vote - max votes 5.4656 ms/op 7.0117 ms/op 0.78
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.308 ms/op 13.124 ms/op 0.94
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.206 ms/op 19.577 ms/op 1.08
pickEth1Vote - Eth1Data fastSerialize value x2048 465.62 us/op 562.34 us/op 0.83
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.4918 ms/op 2.8686 ms/op 0.87
bytes32 toHexString 457.00 ns/op 513.00 ns/op 0.89
bytes32 Buffer.toString(hex) 235.00 ns/op 254.00 ns/op 0.93
bytes32 Buffer.toString(hex) from Uint8Array 372.00 ns/op 448.00 ns/op 0.83
bytes32 Buffer.toString(hex) + 0x 228.00 ns/op 253.00 ns/op 0.90
Object access 1 prop 0.13800 ns/op 0.18400 ns/op 0.75
Map access 1 prop 0.12600 ns/op 0.14500 ns/op 0.87
Object get x1000 6.0920 ns/op 6.3910 ns/op 0.95
Map get x1000 6.5180 ns/op 6.7860 ns/op 0.96
Object set x1000 33.530 ns/op 43.599 ns/op 0.77
Map set x1000 24.355 ns/op 29.735 ns/op 0.82
Return object 10000 times 0.30600 ns/op 0.31830 ns/op 0.96
Throw Error 10000 times 3.4235 us/op 3.5183 us/op 0.97
toHex 143.36 ns/op 178.38 ns/op 0.80
Buffer.from 127.27 ns/op 160.80 ns/op 0.79
shared Buffer 82.608 ns/op 94.233 ns/op 0.88
fastMsgIdFn sha256 / 200 bytes 2.2290 us/op 2.4410 us/op 0.91
fastMsgIdFn h32 xxhash / 200 bytes 248.00 ns/op 313.00 ns/op 0.79
fastMsgIdFn h64 xxhash / 200 bytes 265.00 ns/op 281.00 ns/op 0.94
fastMsgIdFn sha256 / 1000 bytes 7.5050 us/op 7.7250 us/op 0.97
fastMsgIdFn h32 xxhash / 1000 bytes 370.00 ns/op 461.00 ns/op 0.80
fastMsgIdFn h64 xxhash / 1000 bytes 344.00 ns/op 359.00 ns/op 0.96
fastMsgIdFn sha256 / 10000 bytes 65.399 us/op 68.458 us/op 0.96
fastMsgIdFn h32 xxhash / 10000 bytes 1.8830 us/op 1.9970 us/op 0.94
fastMsgIdFn h64 xxhash / 10000 bytes 1.2070 us/op 1.2860 us/op 0.94
send data - 1000 256B messages 12.283 ms/op 14.896 ms/op 0.82
send data - 1000 512B messages 19.085 ms/op 19.764 ms/op 0.97
send data - 1000 1024B messages 25.611 ms/op 28.746 ms/op 0.89
send data - 1000 1200B messages 25.494 ms/op 29.668 ms/op 0.86
send data - 1000 2048B messages 33.464 ms/op 36.955 ms/op 0.91
send data - 1000 4096B messages 33.271 ms/op 34.462 ms/op 0.97
send data - 1000 16384B messages 72.567 ms/op 71.284 ms/op 1.02
send data - 1000 65536B messages 245.35 ms/op 205.69 ms/op 1.19
enrSubnets - fastDeserialize 64 bits 1.1170 us/op 1.3560 us/op 0.82
enrSubnets - ssz BitVector 64 bits 371.00 ns/op 474.00 ns/op 0.78
enrSubnets - fastDeserialize 4 bits 154.00 ns/op 209.00 ns/op 0.74
enrSubnets - ssz BitVector 4 bits 363.00 ns/op 481.00 ns/op 0.75
prioritizePeers score -10:0 att 32-0.1 sync 2-0 153.42 us/op 204.29 us/op 0.75
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 173.91 us/op 190.70 us/op 0.91
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 234.51 us/op 349.50 us/op 0.67
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 447.30 us/op 511.85 us/op 0.87
prioritizePeers score 0:0 att 64-1 sync 4-1 580.28 us/op 703.48 us/op 0.82
array of 16000 items push then shift 1.6511 us/op 1.7616 us/op 0.94
LinkedList of 16000 items push then shift 7.4670 ns/op 8.4110 ns/op 0.89
array of 16000 items push then pop 118.54 ns/op 133.74 ns/op 0.89
LinkedList of 16000 items push then pop 7.4470 ns/op 7.7800 ns/op 0.96
array of 24000 items push then shift 2.5228 us/op 2.5667 us/op 0.98
LinkedList of 24000 items push then shift 7.3130 ns/op 8.3890 ns/op 0.87
array of 24000 items push then pop 156.18 ns/op 175.26 ns/op 0.89
LinkedList of 24000 items push then pop 6.9570 ns/op 7.6050 ns/op 0.91
intersect bitArray bitLen 8 6.3020 ns/op 6.9150 ns/op 0.91
intersect array and set length 8 43.703 ns/op 53.462 ns/op 0.82
intersect bitArray bitLen 128 29.564 ns/op 32.038 ns/op 0.92
intersect array and set length 128 682.69 ns/op 781.73 ns/op 0.87
bitArray.getTrueBitIndexes() bitLen 128 1.4310 us/op 1.7310 us/op 0.83
bitArray.getTrueBitIndexes() bitLen 248 2.3140 us/op 2.8170 us/op 0.82
bitArray.getTrueBitIndexes() bitLen 512 4.5090 us/op 5.8690 us/op 0.77
Buffer.concat 32 items 713.00 ns/op 876.00 ns/op 0.81
Uint8Array.set 32 items 1.8280 us/op 2.0650 us/op 0.89
Buffer.copy 3.2830 us/op 3.1020 us/op 1.06
Uint8Array.set - with subarray 2.9530 us/op 3.5250 us/op 0.84
Uint8Array.set - without subarray 1.6910 us/op 2.2820 us/op 0.74
getUint32 - dataview 234.00 ns/op 286.00 ns/op 0.82
getUint32 - manual 154.00 ns/op 228.00 ns/op 0.68
Set add up to 64 items then delete first 2.1841 us/op 2.6573 us/op 0.82
OrderedSet add up to 64 items then delete first 3.2862 us/op 3.9839 us/op 0.82
Set add up to 64 items then delete last 2.5396 us/op 2.9122 us/op 0.87
OrderedSet add up to 64 items then delete last 3.6432 us/op 3.9679 us/op 0.92
Set add up to 64 items then delete middle 2.5507 us/op 2.8962 us/op 0.88
OrderedSet add up to 64 items then delete middle 5.4973 us/op 5.7830 us/op 0.95
Set add up to 128 items then delete first 5.0664 us/op 5.2380 us/op 0.97
OrderedSet add up to 128 items then delete first 7.6685 us/op 8.5529 us/op 0.90
Set add up to 128 items then delete last 5.0711 us/op 5.0468 us/op 1.00
OrderedSet add up to 128 items then delete last 7.4535 us/op 7.3649 us/op 1.01
Set add up to 128 items then delete middle 5.3319 us/op 5.0233 us/op 1.06
OrderedSet add up to 128 items then delete middle 13.698 us/op 15.341 us/op 0.89
Set add up to 256 items then delete first 11.003 us/op 11.523 us/op 0.95
OrderedSet add up to 256 items then delete first 16.087 us/op 17.444 us/op 0.92
Set add up to 256 items then delete last 10.176 us/op 11.495 us/op 0.89
OrderedSet add up to 256 items then delete last 14.660 us/op 16.077 us/op 0.91
Set add up to 256 items then delete middle 10.548 us/op 10.130 us/op 1.04
OrderedSet add up to 256 items then delete middle 44.768 us/op 44.747 us/op 1.00
transfer serialized Status (84 B) 2.9180 us/op 2.9170 us/op 1.00
copy serialized Status (84 B) 1.4760 us/op 1.4830 us/op 1.00
transfer serialized SignedVoluntaryExit (112 B) 2.9860 us/op 3.0920 us/op 0.97
copy serialized SignedVoluntaryExit (112 B) 1.5560 us/op 1.6210 us/op 0.96
transfer serialized ProposerSlashing (416 B) 3.1760 us/op 3.5420 us/op 0.90
copy serialized ProposerSlashing (416 B) 2.0300 us/op 2.2840 us/op 0.89
transfer serialized Attestation (485 B) 3.3680 us/op 2.9860 us/op 1.13
copy serialized Attestation (485 B) 2.2040 us/op 1.7280 us/op 1.28
transfer serialized AttesterSlashing (33232 B) 3.7890 us/op 2.6810 us/op 1.41
copy serialized AttesterSlashing (33232 B) 6.6760 us/op 5.6830 us/op 1.17
transfer serialized Small SignedBeaconBlock (128000 B) 5.4180 us/op 3.5100 us/op 1.54
copy serialized Small SignedBeaconBlock (128000 B) 18.657 us/op 16.391 us/op 1.14
transfer serialized Avg SignedBeaconBlock (200000 B) 5.0290 us/op 4.1130 us/op 1.22
copy serialized Avg SignedBeaconBlock (200000 B) 26.703 us/op 24.468 us/op 1.09
transfer serialized BlobsSidecar (524380 B) 4.6820 us/op 4.2540 us/op 1.10
copy serialized BlobsSidecar (524380 B) 99.131 us/op 85.429 us/op 1.16
transfer serialized Big SignedBeaconBlock (1000000 B) 4.4500 us/op 4.8530 us/op 0.92
copy serialized Big SignedBeaconBlock (1000000 B) 152.44 us/op 160.44 us/op 0.95
pass gossip attestations to forkchoice per slot 2.8110 ms/op 2.7705 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 484.10 us/op 456.31 us/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 0 2.9228 ms/op 2.8464 ms/op 1.03
forkChoice updateHead vc 1000000 bc 64 eq 0 5.2564 ms/op 5.1362 ms/op 1.02
forkChoice updateHead vc 600000 bc 320 eq 0 2.9672 ms/op 2.8702 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9450 ms/op 2.7934 ms/op 1.05
forkChoice updateHead vc 600000 bc 7200 eq 0 4.3175 ms/op 3.7977 ms/op 1.14
forkChoice updateHead vc 600000 bc 64 eq 1000 10.436 ms/op 10.565 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 10000 10.396 ms/op 10.598 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 300000 13.614 ms/op 14.796 ms/op 0.92
computeDeltas 500000 validators 300 proto nodes 4.1277 ms/op 4.0559 ms/op 1.02
computeDeltas 500000 validators 1200 proto nodes 4.0885 ms/op 4.0705 ms/op 1.00
computeDeltas 500000 validators 7200 proto nodes 4.1507 ms/op 4.0609 ms/op 1.02
computeDeltas 750000 validators 300 proto nodes 6.2126 ms/op 6.0921 ms/op 1.02
computeDeltas 750000 validators 1200 proto nodes 6.1109 ms/op 5.9213 ms/op 1.03
computeDeltas 750000 validators 7200 proto nodes 5.8824 ms/op 5.9691 ms/op 0.99
computeDeltas 1400000 validators 300 proto nodes 11.340 ms/op 10.929 ms/op 1.04
computeDeltas 1400000 validators 1200 proto nodes 11.124 ms/op 11.149 ms/op 1.00
computeDeltas 1400000 validators 7200 proto nodes 11.003 ms/op 11.222 ms/op 0.98
computeDeltas 2100000 validators 300 proto nodes 17.103 ms/op 17.184 ms/op 1.00
computeDeltas 2100000 validators 1200 proto nodes 17.180 ms/op 17.223 ms/op 1.00
computeDeltas 2100000 validators 7200 proto nodes 17.797 ms/op 17.577 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.0218 ms/op 2.2618 ms/op 0.89
altair processAttestation - 250000 vs - 7PWei worstcase 3.1581 ms/op 3.0346 ms/op 1.04
altair processAttestation - setStatus - 1/6 committees join 139.35 us/op 135.92 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 275.36 us/op 246.82 us/op 1.12
altair processAttestation - setStatus - 1/2 committees join 367.69 us/op 340.43 us/op 1.08
altair processAttestation - setStatus - 2/3 committees join 470.96 us/op 441.52 us/op 1.07
altair processAttestation - setStatus - 4/5 committees join 638.45 us/op 594.89 us/op 1.07
altair processAttestation - setStatus - 100% committees join 777.96 us/op 722.17 us/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase 6.7129 ms/op 6.7356 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.723 ms/op 24.701 ms/op 1.32
altair processBlock - 250000 vs - 7PWei worstcase 42.093 ms/op 45.994 ms/op 0.92
altair processBlock - 250000 vs - 7PWei worstcase hashState 84.029 ms/op 74.926 ms/op 1.12
phase0 processBlock - 250000 vs - 7PWei normalcase 2.6027 ms/op 2.3881 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei worstcase 31.883 ms/op 25.878 ms/op 1.23
altair processEth1Data - 250000 vs - 7PWei normalcase 786.92 us/op 384.49 us/op 2.05
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.2530 us/op 6.0320 us/op 1.37
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 41.826 us/op 37.659 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.939 us/op 10.048 us/op 1.09
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.6800 us/op 6.7020 us/op 1.15
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 105.51 us/op 154.33 us/op 0.68
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.9393 ms/op 1.1630 ms/op 1.67
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.2090 ms/op 2.6318 ms/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9917 ms/op 1.5813 ms/op 1.26
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.7889 ms/op 3.7051 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.7215 ms/op 1.4146 ms/op 1.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.0951 ms/op 3.5167 ms/op 0.88
Tree 40 250000 create 442.85 ms/op 444.04 ms/op 1.00
Tree 40 250000 get(125000) 144.25 ns/op 153.63 ns/op 0.94
Tree 40 250000 set(125000) 1.4703 us/op 1.5984 us/op 0.92
Tree 40 250000 toArray() 15.772 ms/op 21.573 ms/op 0.73
Tree 40 250000 iterate all - toArray() + loop 15.915 ms/op 20.087 ms/op 0.79
Tree 40 250000 iterate all - get(i) 53.566 ms/op 53.431 ms/op 1.00
Array 250000 create 3.6189 ms/op 3.2535 ms/op 1.11
Array 250000 clone - spread 1.5949 ms/op 1.3742 ms/op 1.16
Array 250000 get(125000) 0.43400 ns/op 0.40900 ns/op 1.06
Array 250000 set(125000) 0.46500 ns/op 0.43000 ns/op 1.08
Array 250000 iterate all - loop 85.159 us/op 104.98 us/op 0.81
phase0 afterProcessEpoch - 250000 vs - 7PWei 56.008 ms/op 51.861 ms/op 1.08
Array.fill - length 1000000 3.7281 ms/op 3.4160 ms/op 1.09
Array push - length 1000000 18.010 ms/op 17.730 ms/op 1.02
Array.get 0.29692 ns/op 0.29011 ns/op 1.02
Uint8Array.get 0.45926 ns/op 0.43871 ns/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.134 ms/op 18.076 ms/op 0.95
altair processEpoch - mainnet_e81889 282.16 ms/op 306.56 ms/op 0.92
mainnet_e81889 - altair beforeProcessEpoch 19.664 ms/op 20.052 ms/op 0.98
mainnet_e81889 - altair processJustificationAndFinalization 15.797 us/op 16.560 us/op 0.95
mainnet_e81889 - altair processInactivityUpdates 5.1340 ms/op 5.6305 ms/op 0.91
mainnet_e81889 - altair processRewardsAndPenalties 43.394 ms/op 46.478 ms/op 0.93
mainnet_e81889 - altair processRegistryUpdates 2.8870 us/op 2.2130 us/op 1.30
mainnet_e81889 - altair processSlashings 451.00 ns/op 392.00 ns/op 1.15
mainnet_e81889 - altair processEth1DataReset 423.00 ns/op 484.00 ns/op 0.87
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7200 ms/op 1.7361 ms/op 0.99
mainnet_e81889 - altair processSlashingsReset 3.7230 us/op 3.3170 us/op 1.12
mainnet_e81889 - altair processRandaoMixesReset 6.9780 us/op 4.7990 us/op 1.45
mainnet_e81889 - altair processHistoricalRootsUpdate 744.00 ns/op 922.00 ns/op 0.81
mainnet_e81889 - altair processParticipationFlagUpdates 2.6000 us/op 2.0770 us/op 1.25
mainnet_e81889 - altair processSyncCommitteeUpdates 776.00 ns/op 600.00 ns/op 1.29
mainnet_e81889 - altair afterProcessEpoch 54.755 ms/op 52.040 ms/op 1.05
capella processEpoch - mainnet_e217614 1.1050 s/op 1.0923 s/op 1.01
mainnet_e217614 - capella beforeProcessEpoch 74.977 ms/op 65.986 ms/op 1.14
mainnet_e217614 - capella processJustificationAndFinalization 20.488 us/op 13.286 us/op 1.54
mainnet_e217614 - capella processInactivityUpdates 15.367 ms/op 16.282 ms/op 0.94
mainnet_e217614 - capella processRewardsAndPenalties 251.11 ms/op 232.92 ms/op 1.08
mainnet_e217614 - capella processRegistryUpdates 14.591 us/op 13.810 us/op 1.06
mainnet_e217614 - capella processSlashings 489.00 ns/op 571.00 ns/op 0.86
mainnet_e217614 - capella processEth1DataReset 453.00 ns/op 506.00 ns/op 0.90
mainnet_e217614 - capella processEffectiveBalanceUpdates 12.715 ms/op 13.895 ms/op 0.92
mainnet_e217614 - capella processSlashingsReset 6.5900 us/op 7.4330 us/op 0.89
mainnet_e217614 - capella processRandaoMixesReset 6.7790 us/op 4.3600 us/op 1.55
mainnet_e217614 - capella processHistoricalRootsUpdate 881.00 ns/op 678.00 ns/op 1.30
mainnet_e217614 - capella processParticipationFlagUpdates 2.6870 us/op 2.3780 us/op 1.13
mainnet_e217614 - capella afterProcessEpoch 128.78 ms/op 126.05 ms/op 1.02
phase0 processEpoch - mainnet_e58758 352.89 ms/op 352.91 ms/op 1.00
mainnet_e58758 - phase0 beforeProcessEpoch 80.210 ms/op 71.945 ms/op 1.11
mainnet_e58758 - phase0 processJustificationAndFinalization 18.701 us/op 14.130 us/op 1.32
mainnet_e58758 - phase0 processRewardsAndPenalties 31.635 ms/op 32.041 ms/op 0.99
mainnet_e58758 - phase0 processRegistryUpdates 8.1610 us/op 7.2810 us/op 1.12
mainnet_e58758 - phase0 processSlashings 545.00 ns/op 525.00 ns/op 1.04
mainnet_e58758 - phase0 processEth1DataReset 440.00 ns/op 403.00 ns/op 1.09
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.5126 ms/op 1.4365 ms/op 1.05
mainnet_e58758 - phase0 processSlashingsReset 4.6090 us/op 2.8210 us/op 1.63
mainnet_e58758 - phase0 processRandaoMixesReset 6.5300 us/op 4.5750 us/op 1.43
mainnet_e58758 - phase0 processHistoricalRootsUpdate 709.00 ns/op 483.00 ns/op 1.47
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.3540 us/op 3.9000 us/op 1.63
mainnet_e58758 - phase0 afterProcessEpoch 42.602 ms/op 43.229 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2265 ms/op 1.6174 ms/op 0.76
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.5602 ms/op 2.5254 ms/op 1.41
altair processInactivityUpdates - 250000 normalcase 22.732 ms/op 18.340 ms/op 1.24
altair processInactivityUpdates - 250000 worstcase 21.967 ms/op 20.488 ms/op 1.07
phase0 processRegistryUpdates - 250000 normalcase 8.8080 us/op 6.6120 us/op 1.33
phase0 processRegistryUpdates - 250000 badcase_full_deposits 337.33 us/op 306.96 us/op 1.10
phase0 processRegistryUpdates - 250000 worstcase 0.5 125.61 ms/op 110.50 ms/op 1.14
altair processRewardsAndPenalties - 250000 normalcase 55.313 ms/op 46.636 ms/op 1.19
altair processRewardsAndPenalties - 250000 worstcase 47.142 ms/op 39.453 ms/op 1.19
phase0 getAttestationDeltas - 250000 normalcase 6.5403 ms/op 6.8434 ms/op 0.96
phase0 getAttestationDeltas - 250000 worstcase 6.3915 ms/op 6.9884 ms/op 0.91
phase0 processSlashings - 250000 worstcase 122.24 us/op 104.07 us/op 1.17
altair processSyncCommitteeUpdates - 250000 119.08 ms/op 124.74 ms/op 0.95
BeaconState.hashTreeRoot - No change 244.00 ns/op 259.00 ns/op 0.94
BeaconState.hashTreeRoot - 1 full validator 123.24 us/op 106.84 us/op 1.15
BeaconState.hashTreeRoot - 32 full validator 1.2716 ms/op 1.0432 ms/op 1.22
BeaconState.hashTreeRoot - 512 full validator 12.467 ms/op 8.7104 ms/op 1.43
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 157.03 us/op 102.14 us/op 1.54
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0619 ms/op 1.5037 ms/op 1.37
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.796 ms/op 17.228 ms/op 1.44
BeaconState.hashTreeRoot - 1 balances 115.87 us/op 78.487 us/op 1.48
BeaconState.hashTreeRoot - 32 balances 1.1454 ms/op 754.23 us/op 1.52
BeaconState.hashTreeRoot - 512 balances 8.1959 ms/op 7.0099 ms/op 1.17
BeaconState.hashTreeRoot - 250000 balances 169.90 ms/op 177.77 ms/op 0.96
aggregationBits - 2048 els - zipIndexesInBitList 24.883 us/op 24.774 us/op 1.00
byteArrayEquals 32 54.251 ns/op 53.177 ns/op 1.02
Buffer.compare 32 17.523 ns/op 16.987 ns/op 1.03
byteArrayEquals 1024 1.5961 us/op 1.5764 us/op 1.01
Buffer.compare 1024 24.566 ns/op 25.383 ns/op 0.97
byteArrayEquals 16384 25.648 us/op 25.074 us/op 1.02
Buffer.compare 16384 197.37 ns/op 196.52 ns/op 1.00
byteArrayEquals 123687377 194.02 ms/op 189.55 ms/op 1.02
Buffer.compare 123687377 7.3938 ms/op 6.4664 ms/op 1.14
byteArrayEquals 32 - diff last byte 53.852 ns/op 52.314 ns/op 1.03
Buffer.compare 32 - diff last byte 18.007 ns/op 17.132 ns/op 1.05
byteArrayEquals 1024 - diff last byte 1.6043 us/op 1.5811 us/op 1.01
Buffer.compare 1024 - diff last byte 26.033 ns/op 25.718 ns/op 1.01
byteArrayEquals 16384 - diff last byte 25.408 us/op 25.232 us/op 1.01
Buffer.compare 16384 - diff last byte 204.36 ns/op 199.29 ns/op 1.03
byteArrayEquals 123687377 - diff last byte 193.44 ms/op 186.73 ms/op 1.04
Buffer.compare 123687377 - diff last byte 6.3984 ms/op 6.5785 ms/op 0.97
byteArrayEquals 32 - random bytes 5.0940 ns/op 5.1080 ns/op 1.00
Buffer.compare 32 - random bytes 17.046 ns/op 18.559 ns/op 0.92
byteArrayEquals 1024 - random bytes 5.0930 ns/op 5.1010 ns/op 1.00
Buffer.compare 1024 - random bytes 17.040 ns/op 16.933 ns/op 1.01
byteArrayEquals 16384 - random bytes 5.0760 ns/op 5.0850 ns/op 1.00
Buffer.compare 16384 - random bytes 17.047 ns/op 17.016 ns/op 1.00
byteArrayEquals 123687377 - random bytes 6.3700 ns/op 6.3500 ns/op 1.00
Buffer.compare 123687377 - random bytes 18.220 ns/op 18.230 ns/op 1.00
regular array get 100000 times 39.114 us/op 42.783 us/op 0.91
wrappedArray get 100000 times 33.095 us/op 32.895 us/op 1.01
arrayWithProxy get 100000 times 13.472 ms/op 12.509 ms/op 1.08
ssz.Root.equals 46.146 ns/op 46.023 ns/op 1.00
byteArrayEquals 45.261 ns/op 44.848 ns/op 1.01
Buffer.compare 10.668 ns/op 10.233 ns/op 1.04
processSlot - 1 slots 13.208 us/op 12.918 us/op 1.02
processSlot - 32 slots 3.0692 ms/op 3.2231 ms/op 0.95
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.255 ms/op 41.192 ms/op 0.98
getCommitteeAssignments - req 1 vs - 250000 vc 2.1663 ms/op 2.0965 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 4.2027 ms/op 4.0336 ms/op 1.04
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4745 ms/op 4.2962 ms/op 1.04
findModifiedValidators - 10000 modified validators 247.21 ms/op 228.99 ms/op 1.08
findModifiedValidators - 1000 modified validators 165.31 ms/op 151.24 ms/op 1.09
findModifiedValidators - 100 modified validators 163.04 ms/op 146.23 ms/op 1.11
findModifiedValidators - 10 modified validators 167.07 ms/op 152.21 ms/op 1.10
findModifiedValidators - 1 modified validators 135.94 ms/op 138.97 ms/op 0.98
findModifiedValidators - no difference 150.24 ms/op 162.60 ms/op 0.92
compare ViewDUs 3.1700 s/op 3.1698 s/op 1.00
compare each validator Uint8Array 1.0860 s/op 1.6132 s/op 0.67
compare ViewDU to Uint8Array 975.64 ms/op 872.48 ms/op 1.12
migrate state 1000000 validators, 24 modified, 0 new 715.55 ms/op 781.07 ms/op 0.92
migrate state 1000000 validators, 1700 modified, 1000 new 980.87 ms/op 1.0372 s/op 0.95
migrate state 1000000 validators, 3400 modified, 2000 new 1.2031 s/op 1.1353 s/op 1.06
migrate state 1500000 validators, 24 modified, 0 new 747.29 ms/op 742.43 ms/op 1.01
migrate state 1500000 validators, 1700 modified, 1000 new 967.79 ms/op 993.61 ms/op 0.97
migrate state 1500000 validators, 3400 modified, 2000 new 1.2228 s/op 1.2144 s/op 1.01
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7000 ns/op 4.9700 ns/op 0.95
state getBlockRootAtSlot - 250000 vs - 7PWei 683.26 ns/op 730.11 ns/op 0.94
computeProposers - vc 250000 7.1987 ms/op 7.2814 ms/op 0.99
computeEpochShuffling - vc 250000 43.847 ms/op 42.763 ms/op 1.03
getNextSyncCommittee - vc 250000 125.71 ms/op 121.78 ms/op 1.03
computeSigningRoot for AttestationData 20.983 us/op 24.257 us/op 0.87
hash AttestationData serialized data then Buffer.toString(base64) 1.6223 us/op 1.7515 us/op 0.93
toHexString serialized data 939.25 ns/op 1.2709 us/op 0.74
Buffer.toString(base64) 176.49 ns/op 229.48 ns/op 0.77
nodejs block root to RootHex using toHex 155.90 ns/op 187.06 ns/op 0.83
nodejs block root to RootHex using toRootHex 101.65 ns/op 116.51 ns/op 0.87
browser block root to RootHex using the deprecated toHexString 253.43 ns/op 293.07 ns/op 0.86
browser block root to RootHex using toHex 237.03 ns/op 245.48 ns/op 0.97
browser block root to RootHex using toRootHex 180.05 ns/op 189.94 ns/op 0.95

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