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 2 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.76%. Comparing base (6fb5259) to head (137a125).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7359      +/-   ##
============================================
- Coverage     48.76%   48.76%   -0.01%     
============================================
  Files           601      601              
  Lines         40243    40246       +3     
  Branches       2066     2060       -6     
============================================
+ Hits          19625    19626       +1     
- Misses        20580    20582       +2     
  Partials         38       38              

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 077d467 Previous: 6fb5259 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8118 ms/op 1.7558 ms/op 1.03
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 54.705 us/op 48.488 us/op 1.13
BLS verify - blst 969.33 us/op 798.75 us/op 1.21
BLS verifyMultipleSignatures 3 - blst 1.4607 ms/op 1.1707 ms/op 1.25
BLS verifyMultipleSignatures 8 - blst 1.9584 ms/op 1.6704 ms/op 1.17
BLS verifyMultipleSignatures 32 - blst 5.7445 ms/op 4.8584 ms/op 1.18
BLS verifyMultipleSignatures 64 - blst 10.634 ms/op 8.9637 ms/op 1.19
BLS verifyMultipleSignatures 128 - blst 17.097 ms/op 17.411 ms/op 0.98
BLS deserializing 10000 signatures 703.46 ms/op 685.65 ms/op 1.03
BLS deserializing 100000 signatures 6.9641 s/op 6.9563 s/op 1.00
BLS verifyMultipleSignatures - same message - 3 - blst 1.0431 ms/op 916.86 us/op 1.14
BLS verifyMultipleSignatures - same message - 8 - blst 1.4807 ms/op 999.91 us/op 1.48
BLS verifyMultipleSignatures - same message - 32 - blst 2.0931 ms/op 1.6959 ms/op 1.23
BLS verifyMultipleSignatures - same message - 64 - blst 2.7248 ms/op 2.5733 ms/op 1.06
BLS verifyMultipleSignatures - same message - 128 - blst 4.4261 ms/op 4.3497 ms/op 1.02
BLS aggregatePubkeys 32 - blst 19.977 us/op 20.025 us/op 1.00
BLS aggregatePubkeys 128 - blst 71.231 us/op 71.057 us/op 1.00
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 92.685 ms/op 63.596 ms/op 1.46
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 63.038 ms/op 57.623 ms/op 1.09
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 54.833 ms/op 42.118 ms/op 1.30
getSlashingsAndExits - default max 166.13 us/op 134.20 us/op 1.24
getSlashingsAndExits - 2k 561.91 us/op 391.36 us/op 1.44
proposeBlockBody type=full, size=empty 5.9081 ms/op 5.8430 ms/op 1.01
isKnown best case - 1 super set check 279.00 ns/op 279.00 ns/op 1.00
isKnown normal case - 2 super set checks 262.00 ns/op 268.00 ns/op 0.98
isKnown worse case - 16 super set checks 261.00 ns/op 269.00 ns/op 0.97
InMemoryCheckpointStateCache - add get delete 2.7420 us/op 2.4890 us/op 1.10
validate api signedAggregateAndProof - struct 1.7210 ms/op 1.3818 ms/op 1.25
validate gossip signedAggregateAndProof - struct 1.7521 ms/op 1.3722 ms/op 1.28
batch validate gossip attestation - vc 640000 - chunk 32 128.82 us/op 120.49 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 64 116.93 us/op 106.23 us/op 1.10
batch validate gossip attestation - vc 640000 - chunk 128 111.03 us/op 101.56 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 107.91 us/op 100.64 us/op 1.07
pickEth1Vote - no votes 1.0177 ms/op 1.0372 ms/op 0.98
pickEth1Vote - max votes 7.1922 ms/op 5.8242 ms/op 1.23
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.961 ms/op 16.428 ms/op 0.91
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 23.831 ms/op 16.496 ms/op 1.44
pickEth1Vote - Eth1Data fastSerialize value x2048 631.34 us/op 544.96 us/op 1.16
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.3209 ms/op 3.1003 ms/op 1.07
bytes32 toHexString 481.00 ns/op 443.00 ns/op 1.09
bytes32 Buffer.toString(hex) 241.00 ns/op 239.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 366.00 ns/op 384.00 ns/op 0.95
bytes32 Buffer.toString(hex) + 0x 237.00 ns/op 245.00 ns/op 0.97
Object access 1 prop 0.14000 ns/op 0.14900 ns/op 0.94
Map access 1 prop 0.12900 ns/op 0.13100 ns/op 0.98
Object get x1000 5.8870 ns/op 5.8620 ns/op 1.00
Map get x1000 6.3730 ns/op 6.5560 ns/op 0.97
Object set x1000 33.176 ns/op 32.848 ns/op 1.01
Map set x1000 24.889 ns/op 23.751 ns/op 1.05
Return object 10000 times 0.30370 ns/op 0.29420 ns/op 1.03
Throw Error 10000 times 3.4073 us/op 3.3694 us/op 1.01
toHex 162.82 ns/op 154.77 ns/op 1.05
Buffer.from 128.75 ns/op 139.66 ns/op 0.92
shared Buffer 94.083 ns/op 87.210 ns/op 1.08
fastMsgIdFn sha256 / 200 bytes 2.2400 us/op 2.2700 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 232.00 ns/op 238.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 200 bytes 277.00 ns/op 276.00 ns/op 1.00
fastMsgIdFn sha256 / 1000 bytes 7.3130 us/op 7.3360 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 361.00 ns/op 370.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 1000 bytes 344.00 ns/op 351.00 ns/op 0.98
fastMsgIdFn sha256 / 10000 bytes 65.113 us/op 64.288 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.9070 us/op 1.8860 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.2250 us/op 1.2680 us/op 0.97
send data - 1000 256B messages 12.647 ms/op 12.417 ms/op 1.02
send data - 1000 512B messages 18.807 ms/op 17.879 ms/op 1.05
send data - 1000 1024B messages 26.396 ms/op 25.535 ms/op 1.03
send data - 1000 1200B messages 27.194 ms/op 26.220 ms/op 1.04
send data - 1000 2048B messages 32.970 ms/op 30.674 ms/op 1.07
send data - 1000 4096B messages 29.963 ms/op 31.462 ms/op 0.95
send data - 1000 16384B messages 67.553 ms/op 73.304 ms/op 0.92
send data - 1000 65536B messages 212.52 ms/op 217.40 ms/op 0.98
enrSubnets - fastDeserialize 64 bits 1.3700 us/op 1.0770 us/op 1.27
enrSubnets - ssz BitVector 64 bits 452.00 ns/op 364.00 ns/op 1.24
enrSubnets - fastDeserialize 4 bits 176.00 ns/op 147.00 ns/op 1.20
enrSubnets - ssz BitVector 4 bits 415.00 ns/op 361.00 ns/op 1.15
prioritizePeers score -10:0 att 32-0.1 sync 2-0 150.47 us/op 131.85 us/op 1.14
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 177.74 us/op 154.31 us/op 1.15
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 242.35 us/op 224.22 us/op 1.08
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 408.76 us/op 400.59 us/op 1.02
prioritizePeers score 0:0 att 64-1 sync 4-1 538.29 us/op 502.77 us/op 1.07
array of 16000 items push then shift 1.6739 us/op 1.6113 us/op 1.04
LinkedList of 16000 items push then shift 7.8170 ns/op 7.0350 ns/op 1.11
array of 16000 items push then pop 132.99 ns/op 116.92 ns/op 1.14
LinkedList of 16000 items push then pop 7.8930 ns/op 7.0870 ns/op 1.11
array of 24000 items push then shift 2.4868 us/op 2.4163 us/op 1.03
LinkedList of 24000 items push then shift 8.4940 ns/op 7.0660 ns/op 1.20
array of 24000 items push then pop 173.25 ns/op 130.05 ns/op 1.33
LinkedList of 24000 items push then pop 7.9770 ns/op 6.9410 ns/op 1.15
intersect bitArray bitLen 8 6.8680 ns/op 6.3580 ns/op 1.08
intersect array and set length 8 49.577 ns/op 43.341 ns/op 1.14
intersect bitArray bitLen 128 32.658 ns/op 29.713 ns/op 1.10
intersect array and set length 128 755.76 ns/op 692.12 ns/op 1.09
bitArray.getTrueBitIndexes() bitLen 128 1.6680 us/op 1.3120 us/op 1.27
bitArray.getTrueBitIndexes() bitLen 248 2.6510 us/op 2.2680 us/op 1.17
bitArray.getTrueBitIndexes() bitLen 512 5.5510 us/op 4.4650 us/op 1.24
Buffer.concat 32 items 855.00 ns/op 743.00 ns/op 1.15
Uint8Array.set 32 items 1.7090 us/op 1.4460 us/op 1.18
Buffer.copy 2.7640 us/op 2.3920 us/op 1.16
Uint8Array.set - with subarray 3.1660 us/op 2.2680 us/op 1.40
Uint8Array.set - without subarray 2.1300 us/op 1.4670 us/op 1.45
getUint32 - dataview 288.00 ns/op 227.00 ns/op 1.27
getUint32 - manual 239.00 ns/op 147.00 ns/op 1.63
Set add up to 64 items then delete first 3.3278 us/op 2.1278 us/op 1.56
OrderedSet add up to 64 items then delete first 4.4859 us/op 3.1377 us/op 1.43
Set add up to 64 items then delete last 3.4978 us/op 2.4004 us/op 1.46
OrderedSet add up to 64 items then delete last 4.7117 us/op 3.6470 us/op 1.29
Set add up to 64 items then delete middle 3.3343 us/op 2.3992 us/op 1.39
OrderedSet add up to 64 items then delete middle 6.6629 us/op 5.0317 us/op 1.32
Set add up to 128 items then delete first 6.8234 us/op 4.7407 us/op 1.44
OrderedSet add up to 128 items then delete first 10.279 us/op 7.2885 us/op 1.41
Set add up to 128 items then delete last 6.0217 us/op 4.8666 us/op 1.24
OrderedSet add up to 128 items then delete last 9.3054 us/op 7.2966 us/op 1.28
Set add up to 128 items then delete middle 6.0412 us/op 4.7028 us/op 1.28
OrderedSet add up to 128 items then delete middle 16.487 us/op 13.063 us/op 1.26
Set add up to 256 items then delete first 13.512 us/op 9.3341 us/op 1.45
OrderedSet add up to 256 items then delete first 21.035 us/op 13.883 us/op 1.52
Set add up to 256 items then delete last 12.693 us/op 9.4926 us/op 1.34
OrderedSet add up to 256 items then delete last 18.252 us/op 15.467 us/op 1.18
Set add up to 256 items then delete middle 12.803 us/op 10.032 us/op 1.28
OrderedSet add up to 256 items then delete middle 49.364 us/op 41.588 us/op 1.19
transfer serialized Status (84 B) 3.1060 us/op 2.5820 us/op 1.20
copy serialized Status (84 B) 1.6640 us/op 1.3960 us/op 1.19
transfer serialized SignedVoluntaryExit (112 B) 3.2680 us/op 2.7030 us/op 1.21
copy serialized SignedVoluntaryExit (112 B) 1.6710 us/op 1.4410 us/op 1.16
transfer serialized ProposerSlashing (416 B) 3.3180 us/op 2.8240 us/op 1.17
copy serialized ProposerSlashing (416 B) 2.2730 us/op 1.6250 us/op 1.40
transfer serialized Attestation (485 B) 3.4100 us/op 2.7810 us/op 1.23
copy serialized Attestation (485 B) 2.2300 us/op 1.7230 us/op 1.29
transfer serialized AttesterSlashing (33232 B) 3.0970 us/op 2.8370 us/op 1.09
copy serialized AttesterSlashing (33232 B) 7.6160 us/op 5.2300 us/op 1.46
transfer serialized Small SignedBeaconBlock (128000 B) 4.1280 us/op 3.2740 us/op 1.26
copy serialized Small SignedBeaconBlock (128000 B) 19.687 us/op 15.581 us/op 1.26
transfer serialized Avg SignedBeaconBlock (200000 B) 4.9540 us/op 3.9190 us/op 1.26
copy serialized Avg SignedBeaconBlock (200000 B) 24.378 us/op 20.934 us/op 1.16
transfer serialized BlobsSidecar (524380 B) 5.1370 us/op 4.1470 us/op 1.24
copy serialized BlobsSidecar (524380 B) 92.267 us/op 87.922 us/op 1.05
transfer serialized Big SignedBeaconBlock (1000000 B) 6.0130 us/op 4.1400 us/op 1.45
copy serialized Big SignedBeaconBlock (1000000 B) 291.65 us/op 155.86 us/op 1.87
pass gossip attestations to forkchoice per slot 2.8716 ms/op 2.6829 ms/op 1.07
forkChoice updateHead vc 100000 bc 64 eq 0 488.26 us/op 455.60 us/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 0 4.1380 ms/op 3.5230 ms/op 1.17
forkChoice updateHead vc 1000000 bc 64 eq 0 5.1542 ms/op 4.9269 ms/op 1.05
forkChoice updateHead vc 600000 bc 320 eq 0 3.0143 ms/op 2.7926 ms/op 1.08
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0611 ms/op 2.8580 ms/op 1.07
forkChoice updateHead vc 600000 bc 7200 eq 0 3.6874 ms/op 3.7517 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 1000 10.912 ms/op 10.627 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 10000 10.314 ms/op 10.736 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 300000 14.177 ms/op 14.169 ms/op 1.00
computeDeltas 500000 validators 300 proto nodes 4.2647 ms/op 4.2186 ms/op 1.01
computeDeltas 500000 validators 1200 proto nodes 4.3381 ms/op 4.1095 ms/op 1.06
computeDeltas 500000 validators 7200 proto nodes 4.5450 ms/op 4.1234 ms/op 1.10
computeDeltas 750000 validators 300 proto nodes 6.2930 ms/op 6.0822 ms/op 1.03
computeDeltas 750000 validators 1200 proto nodes 6.4637 ms/op 6.0632 ms/op 1.07
computeDeltas 750000 validators 7200 proto nodes 6.3511 ms/op 6.0741 ms/op 1.05
computeDeltas 1400000 validators 300 proto nodes 11.951 ms/op 11.454 ms/op 1.04
computeDeltas 1400000 validators 1200 proto nodes 12.101 ms/op 11.401 ms/op 1.06
computeDeltas 1400000 validators 7200 proto nodes 12.442 ms/op 11.575 ms/op 1.07
computeDeltas 2100000 validators 300 proto nodes 18.266 ms/op 17.104 ms/op 1.07
computeDeltas 2100000 validators 1200 proto nodes 17.961 ms/op 17.128 ms/op 1.05
computeDeltas 2100000 validators 7200 proto nodes 17.925 ms/op 17.014 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei normalcase 2.1582 ms/op 2.2064 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei worstcase 4.1478 ms/op 2.9692 ms/op 1.40
altair processAttestation - setStatus - 1/6 committees join 132.42 us/op 136.60 us/op 0.97
altair processAttestation - setStatus - 1/3 committees join 254.51 us/op 251.06 us/op 1.01
altair processAttestation - setStatus - 1/2 committees join 350.04 us/op 352.96 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 548.36 us/op 448.35 us/op 1.22
altair processAttestation - setStatus - 4/5 committees join 630.69 us/op 606.66 us/op 1.04
altair processAttestation - setStatus - 100% committees join 726.44 us/op 730.89 us/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase 5.0858 ms/op 5.7041 ms/op 0.89
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.184 ms/op 22.714 ms/op 1.24
altair processBlock - 250000 vs - 7PWei worstcase 39.735 ms/op 33.069 ms/op 1.20
altair processBlock - 250000 vs - 7PWei worstcase hashState 82.096 ms/op 73.108 ms/op 1.12
phase0 processBlock - 250000 vs - 7PWei normalcase 2.6713 ms/op 1.7866 ms/op 1.50
phase0 processBlock - 250000 vs - 7PWei worstcase 29.982 ms/op 20.833 ms/op 1.44
altair processEth1Data - 250000 vs - 7PWei normalcase 396.23 us/op 350.35 us/op 1.13
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.5170 us/op 5.7100 us/op 1.49
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 54.376 us/op 53.235 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.832 us/op 11.978 us/op 1.57
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.718 us/op 7.5000 us/op 1.43
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 217.78 us/op 125.58 us/op 1.73
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4123 ms/op 1.2562 ms/op 1.12
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8277 ms/op 1.4382 ms/op 1.27
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.1429 ms/op 1.4771 ms/op 1.45
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9375 ms/op 3.8955 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0390 ms/op 1.4973 ms/op 1.36
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.5351 ms/op 4.2588 ms/op 1.06
Tree 40 250000 create 256.96 ms/op 210.29 ms/op 1.22
Tree 40 250000 get(125000) 162.68 ns/op 143.29 ns/op 1.14
Tree 40 250000 set(125000) 777.04 ns/op 714.95 ns/op 1.09
Tree 40 250000 toArray() 22.472 ms/op 18.693 ms/op 1.20
Tree 40 250000 iterate all - toArray() + loop 22.330 ms/op 19.722 ms/op 1.13
Tree 40 250000 iterate all - get(i) 58.901 ms/op 58.025 ms/op 1.02
Array 250000 create 3.8740 ms/op 2.9723 ms/op 1.30
Array 250000 clone - spread 1.4696 ms/op 1.5293 ms/op 0.96
Array 250000 get(125000) 0.43000 ns/op 0.42200 ns/op 1.02
Array 250000 set(125000) 0.48100 ns/op 0.44700 ns/op 1.08
Array 250000 iterate all - loop 112.35 us/op 83.954 us/op 1.34
phase0 afterProcessEpoch - 250000 vs - 7PWei 55.456 ms/op 53.362 ms/op 1.04
Array.fill - length 1000000 4.4548 ms/op 3.7870 ms/op 1.18
Array push - length 1000000 21.702 ms/op 17.510 ms/op 1.24
Array.get 0.29068 ns/op 0.27102 ns/op 1.07
Uint8Array.get 0.46499 ns/op 0.43483 ns/op 1.07
phase0 beforeProcessEpoch - 250000 vs - 7PWei 23.170 ms/op 15.742 ms/op 1.47
altair processEpoch - mainnet_e81889 339.13 ms/op 268.52 ms/op 1.26
mainnet_e81889 - altair beforeProcessEpoch 23.577 ms/op 17.940 ms/op 1.31
mainnet_e81889 - altair processJustificationAndFinalization 16.857 us/op 14.316 us/op 1.18
mainnet_e81889 - altair processInactivityUpdates 7.6230 ms/op 4.8943 ms/op 1.56
mainnet_e81889 - altair processRewardsAndPenalties 44.692 ms/op 42.143 ms/op 1.06
mainnet_e81889 - altair processRegistryUpdates 2.4480 us/op 2.3770 us/op 1.03
mainnet_e81889 - altair processSlashings 443.00 ns/op 405.00 ns/op 1.09
mainnet_e81889 - altair processEth1DataReset 488.00 ns/op 482.00 ns/op 1.01
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7177 ms/op 1.3734 ms/op 1.25
mainnet_e81889 - altair processSlashingsReset 3.7350 us/op 3.2640 us/op 1.14
mainnet_e81889 - altair processRandaoMixesReset 5.4020 us/op 4.1680 us/op 1.30
mainnet_e81889 - altair processHistoricalRootsUpdate 822.00 ns/op 838.00 ns/op 0.98
mainnet_e81889 - altair processParticipationFlagUpdates 2.3570 us/op 2.1060 us/op 1.12
mainnet_e81889 - altair processSyncCommitteeUpdates 762.00 ns/op 617.00 ns/op 1.24
mainnet_e81889 - altair afterProcessEpoch 53.600 ms/op 50.238 ms/op 1.07
capella processEpoch - mainnet_e217614 1.0229 s/op 1.0428 s/op 0.98
mainnet_e217614 - capella beforeProcessEpoch 77.793 ms/op 68.064 ms/op 1.14
mainnet_e217614 - capella processJustificationAndFinalization 20.340 us/op 12.050 us/op 1.69
mainnet_e217614 - capella processInactivityUpdates 15.835 ms/op 16.587 ms/op 0.95
mainnet_e217614 - capella processRewardsAndPenalties 248.48 ms/op 212.93 ms/op 1.17
mainnet_e217614 - capella processRegistryUpdates 22.139 us/op 16.404 us/op 1.35
mainnet_e217614 - capella processSlashings 928.00 ns/op 525.00 ns/op 1.77
mainnet_e217614 - capella processEth1DataReset 685.00 ns/op 500.00 ns/op 1.37
mainnet_e217614 - capella processEffectiveBalanceUpdates 10.774 ms/op 11.259 ms/op 0.96
mainnet_e217614 - capella processSlashingsReset 4.5240 us/op 3.2340 us/op 1.40
mainnet_e217614 - capella processRandaoMixesReset 6.5640 us/op 4.8570 us/op 1.35
mainnet_e217614 - capella processHistoricalRootsUpdate 1.3160 us/op 539.00 ns/op 2.44
mainnet_e217614 - capella processParticipationFlagUpdates 3.1570 us/op 1.5090 us/op 2.09
mainnet_e217614 - capella afterProcessEpoch 123.38 ms/op 122.66 ms/op 1.01
phase0 processEpoch - mainnet_e58758 327.67 ms/op 321.99 ms/op 1.02
mainnet_e58758 - phase0 beforeProcessEpoch 71.254 ms/op 69.195 ms/op 1.03
mainnet_e58758 - phase0 processJustificationAndFinalization 14.260 us/op 12.358 us/op 1.15
mainnet_e58758 - phase0 processRewardsAndPenalties 30.397 ms/op 29.679 ms/op 1.02
mainnet_e58758 - phase0 processRegistryUpdates 10.384 us/op 8.1230 us/op 1.28
mainnet_e58758 - phase0 processSlashings 695.00 ns/op 521.00 ns/op 1.33
mainnet_e58758 - phase0 processEth1DataReset 504.00 ns/op 413.00 ns/op 1.22
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.4710 ms/op 1.1405 ms/op 1.29
mainnet_e58758 - phase0 processSlashingsReset 2.7940 us/op 2.2380 us/op 1.25
mainnet_e58758 - phase0 processRandaoMixesReset 6.5740 us/op 4.2270 us/op 1.56
mainnet_e58758 - phase0 processHistoricalRootsUpdate 516.00 ns/op 417.00 ns/op 1.24
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.6420 us/op 3.6480 us/op 1.00
mainnet_e58758 - phase0 afterProcessEpoch 44.415 ms/op 42.659 ms/op 1.04
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8993 ms/op 1.3205 ms/op 1.44
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.6378 ms/op 1.8169 ms/op 1.45
altair processInactivityUpdates - 250000 normalcase 19.671 ms/op 14.734 ms/op 1.34
altair processInactivityUpdates - 250000 worstcase 20.772 ms/op 15.205 ms/op 1.37
phase0 processRegistryUpdates - 250000 normalcase 12.764 us/op 9.0000 us/op 1.42
phase0 processRegistryUpdates - 250000 badcase_full_deposits 522.12 us/op 274.25 us/op 1.90
phase0 processRegistryUpdates - 250000 worstcase 0.5 99.219 ms/op 102.01 ms/op 0.97
altair processRewardsAndPenalties - 250000 normalcase 40.661 ms/op 37.954 ms/op 1.07
altair processRewardsAndPenalties - 250000 worstcase 34.143 ms/op 38.391 ms/op 0.89
phase0 getAttestationDeltas - 250000 normalcase 8.2089 ms/op 7.3314 ms/op 1.12
phase0 getAttestationDeltas - 250000 worstcase 7.7346 ms/op 6.9921 ms/op 1.11
phase0 processSlashings - 250000 worstcase 106.09 us/op 76.355 us/op 1.39
altair processSyncCommitteeUpdates - 250000 134.90 ms/op 116.53 ms/op 1.16
BeaconState.hashTreeRoot - No change 261.00 ns/op 239.00 ns/op 1.09
BeaconState.hashTreeRoot - 1 full validator 117.52 us/op 103.12 us/op 1.14
BeaconState.hashTreeRoot - 32 full validator 1.4742 ms/op 1.3325 ms/op 1.11
BeaconState.hashTreeRoot - 512 full validator 9.1611 ms/op 11.277 ms/op 0.81
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 113.50 us/op 124.88 us/op 0.91
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3810 ms/op 1.4028 ms/op 0.98
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.282 ms/op 20.090 ms/op 1.01
BeaconState.hashTreeRoot - 1 balances 90.745 us/op 74.347 us/op 1.22
BeaconState.hashTreeRoot - 32 balances 759.25 us/op 1.2161 ms/op 0.62
BeaconState.hashTreeRoot - 512 balances 6.5591 ms/op 8.5238 ms/op 0.77
BeaconState.hashTreeRoot - 250000 balances 172.00 ms/op 178.15 ms/op 0.97
aggregationBits - 2048 els - zipIndexesInBitList 27.339 us/op 22.930 us/op 1.19
byteArrayEquals 32 54.656 ns/op 53.097 ns/op 1.03
Buffer.compare 32 18.099 ns/op 16.979 ns/op 1.07
byteArrayEquals 1024 1.6159 us/op 1.5677 us/op 1.03
Buffer.compare 1024 25.656 ns/op 25.089 ns/op 1.02
byteArrayEquals 16384 25.524 us/op 24.765 us/op 1.03
Buffer.compare 16384 203.03 ns/op 189.04 ns/op 1.07
byteArrayEquals 123687377 193.73 ms/op 186.88 ms/op 1.04
Buffer.compare 123687377 7.6689 ms/op 6.0320 ms/op 1.27
byteArrayEquals 32 - diff last byte 54.814 ns/op 51.702 ns/op 1.06
Buffer.compare 32 - diff last byte 17.909 ns/op 16.800 ns/op 1.07
byteArrayEquals 1024 - diff last byte 1.6506 us/op 1.5591 us/op 1.06
Buffer.compare 1024 - diff last byte 27.039 ns/op 24.748 ns/op 1.09
byteArrayEquals 16384 - diff last byte 26.078 us/op 24.811 us/op 1.05
Buffer.compare 16384 - diff last byte 193.30 ns/op 200.52 ns/op 0.96
byteArrayEquals 123687377 - diff last byte 195.34 ms/op 189.69 ms/op 1.03
Buffer.compare 123687377 - diff last byte 8.7143 ms/op 6.0850 ms/op 1.43
byteArrayEquals 32 - random bytes 5.3950 ns/op 5.0690 ns/op 1.06
Buffer.compare 32 - random bytes 21.841 ns/op 16.894 ns/op 1.29
byteArrayEquals 1024 - random bytes 5.5120 ns/op 5.0730 ns/op 1.09
Buffer.compare 1024 - random bytes 20.528 ns/op 16.908 ns/op 1.21
byteArrayEquals 16384 - random bytes 5.4800 ns/op 5.0720 ns/op 1.08
Buffer.compare 16384 - random bytes 20.650 ns/op 16.882 ns/op 1.22
byteArrayEquals 123687377 - random bytes 6.6900 ns/op 6.2700 ns/op 1.07
Buffer.compare 123687377 - random bytes 23.130 ns/op 18.200 ns/op 1.27
regular array get 100000 times 43.939 us/op 32.763 us/op 1.34
wrappedArray get 100000 times 34.468 us/op 32.457 us/op 1.06
arrayWithProxy get 100000 times 14.062 ms/op 12.839 ms/op 1.10
ssz.Root.equals 47.520 ns/op 45.466 ns/op 1.05
byteArrayEquals 47.620 ns/op 44.912 ns/op 1.06
Buffer.compare 10.622 ns/op 10.238 ns/op 1.04
processSlot - 1 slots 13.495 us/op 12.434 us/op 1.09
processSlot - 32 slots 2.8839 ms/op 2.9540 ms/op 0.98
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 39.074 ms/op 37.709 ms/op 1.04
getCommitteeAssignments - req 1 vs - 250000 vc 2.0275 ms/op 2.1103 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 3.9173 ms/op 4.0741 ms/op 0.96
getCommitteeAssignments - req 1000 vs - 250000 vc 4.1913 ms/op 4.4982 ms/op 0.93
findModifiedValidators - 10000 modified validators 248.94 ms/op 241.16 ms/op 1.03
findModifiedValidators - 1000 modified validators 177.75 ms/op 180.40 ms/op 0.99
findModifiedValidators - 100 modified validators 153.19 ms/op 177.31 ms/op 0.86
findModifiedValidators - 10 modified validators 156.97 ms/op 162.32 ms/op 0.97
findModifiedValidators - 1 modified validators 137.39 ms/op 178.32 ms/op 0.77
findModifiedValidators - no difference 154.04 ms/op 165.08 ms/op 0.93
compare ViewDUs 3.1564 s/op 2.9849 s/op 1.06
compare each validator Uint8Array 1.6580 s/op 1.6662 s/op 1.00
compare ViewDU to Uint8Array 1.0024 s/op 911.90 ms/op 1.10
migrate state 1000000 validators, 24 modified, 0 new 721.10 ms/op 729.68 ms/op 0.99
migrate state 1000000 validators, 1700 modified, 1000 new 1.0443 s/op 986.01 ms/op 1.06
migrate state 1000000 validators, 3400 modified, 2000 new 1.2752 s/op 1.1609 s/op 1.10
migrate state 1500000 validators, 24 modified, 0 new 752.32 ms/op 760.84 ms/op 0.99
migrate state 1500000 validators, 1700 modified, 1000 new 970.68 ms/op 979.83 ms/op 0.99
migrate state 1500000 validators, 3400 modified, 2000 new 1.2299 s/op 1.1805 s/op 1.04
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4000 ns/op 4.3000 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 779.66 ns/op 653.57 ns/op 1.19
computeProposers - vc 250000 7.8137 ms/op 6.8138 ms/op 1.15
computeEpochShuffling - vc 250000 43.167 ms/op 40.920 ms/op 1.05
getNextSyncCommittee - vc 250000 139.54 ms/op 120.12 ms/op 1.16
computeSigningRoot for AttestationData 25.348 us/op 20.359 us/op 1.25
hash AttestationData serialized data then Buffer.toString(base64) 1.5985 us/op 1.5839 us/op 1.01
toHexString serialized data 909.53 ns/op 855.78 ns/op 1.06
Buffer.toString(base64) 190.28 ns/op 181.46 ns/op 1.05
nodejs block root to RootHex using toHex 158.11 ns/op 156.59 ns/op 1.01
nodejs block root to RootHex using toRootHex 100.48 ns/op 89.723 ns/op 1.12
browser block root to RootHex using the deprecated toHexString 263.16 ns/op 221.04 ns/op 1.19
browser block root to RootHex using toHex 195.24 ns/op 174.91 ns/op 1.12
browser block root to RootHex using toRootHex 167.84 ns/op 156.21 ns/op 1.07

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