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: update ssz and accompanying packages to v1.0.0 #7393

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jan 23, 2025

Motivation

We dropped CJS support 🎉 fixed some file resolution issues causing wrong hasher to be loaded and got some clean named imports for hasher instead of having to dig it out of the libs folder.

Description

Update ssz and accompanying packages to v1.0.0

@nflaig nflaig marked this pull request as ready for review January 23, 2025 21:08
@nflaig nflaig requested a review from a team as a code owner January 23, 2025 21:08
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.61%. Comparing base (c34e129) to head (8fd3f15).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7393   +/-   ##
=========================================
  Coverage     48.61%   48.61%           
=========================================
  Files           603      603           
  Lines         40519    40519           
  Branches       2070     2070           
=========================================
  Hits          19697    19697           
  Misses        20784    20784           
  Partials         38       38           

@wemeetagain wemeetagain merged commit 42631de into unstable Jan 23, 2025
18 of 20 checks passed
@wemeetagain wemeetagain deleted the nflaig/update-ssz branch January 23, 2025 21:44
Copy link
Contributor

⚠️ Performance Alert ⚠️

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

Benchmark suite Current: ed42377 Previous: c34e129 Ratio
phase0 processEffectiveBalanceUpdates - 250000 normalcase 3.0512 ms/op 945.33 us/op 3.23
Buffer.compare 123687377 16.089 ms/op 4.8359 ms/op 3.33
Full benchmark results
Benchmark suite Current: ed42377 Previous: c34e129 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.3695 ms/op 1.8033 ms/op 0.76
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 41.909 us/op 35.681 us/op 1.17
BLS verify - blst 883.35 us/op 925.39 us/op 0.95
BLS verifyMultipleSignatures 3 - blst 1.3161 ms/op 1.3209 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst 2.0804 ms/op 1.9046 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst 6.7310 ms/op 4.8125 ms/op 1.40
BLS verifyMultipleSignatures 64 - blst 11.276 ms/op 9.2791 ms/op 1.22
BLS verifyMultipleSignatures 128 - blst 18.047 ms/op 17.275 ms/op 1.04
BLS deserializing 10000 signatures 700.64 ms/op 648.65 ms/op 1.08
BLS deserializing 100000 signatures 6.8551 s/op 6.4409 s/op 1.06
BLS verifyMultipleSignatures - same message - 3 - blst 855.37 us/op 918.39 us/op 0.93
BLS verifyMultipleSignatures - same message - 8 - blst 1.2899 ms/op 1.1202 ms/op 1.15
BLS verifyMultipleSignatures - same message - 32 - blst 1.8313 ms/op 1.7286 ms/op 1.06
BLS verifyMultipleSignatures - same message - 64 - blst 2.7368 ms/op 2.5277 ms/op 1.08
BLS verifyMultipleSignatures - same message - 128 - blst 4.4188 ms/op 4.3004 ms/op 1.03
BLS aggregatePubkeys 32 - blst 20.053 us/op 18.777 us/op 1.07
BLS aggregatePubkeys 128 - blst 67.670 us/op 64.476 us/op 1.05
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 59.419 ms/op 50.438 ms/op 1.18
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 60.194 ms/op 45.039 ms/op 1.34
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 48.671 ms/op 36.200 ms/op 1.34
getSlashingsAndExits - default max 76.273 us/op 77.302 us/op 0.99
getSlashingsAndExits - 2k 421.32 us/op 333.46 us/op 1.26
proposeBlockBody type=full, size=empty 5.4794 ms/op 5.0650 ms/op 1.08
isKnown best case - 1 super set check 283.00 ns/op 476.00 ns/op 0.59
isKnown normal case - 2 super set checks 267.00 ns/op 463.00 ns/op 0.58
isKnown worse case - 16 super set checks 260.00 ns/op 466.00 ns/op 0.56
InMemoryCheckpointStateCache - add get delete 2.6640 us/op 2.7430 us/op 0.97
validate api signedAggregateAndProof - struct 2.0164 ms/op 2.2022 ms/op 0.92
validate gossip signedAggregateAndProof - struct 1.3781 ms/op 2.2322 ms/op 0.62
batch validate gossip attestation - vc 640000 - chunk 32 126.49 us/op 125.81 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 106.62 us/op 106.86 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 128 104.22 us/op 97.615 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 256 101.46 us/op 104.73 us/op 0.97
pickEth1Vote - no votes 988.96 us/op 951.01 us/op 1.04
pickEth1Vote - max votes 5.9271 ms/op 5.8852 ms/op 1.01
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.081 ms/op 13.244 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 23.534 ms/op 23.679 ms/op 0.99
pickEth1Vote - Eth1Data fastSerialize value x2048 470.27 us/op 374.53 us/op 1.26
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.9555 ms/op 3.2101 ms/op 0.92
bytes32 toHexString 427.00 ns/op 586.00 ns/op 0.73
bytes32 Buffer.toString(hex) 245.00 ns/op 462.00 ns/op 0.53
bytes32 Buffer.toString(hex) from Uint8Array 353.00 ns/op 614.00 ns/op 0.57
bytes32 Buffer.toString(hex) + 0x 236.00 ns/op 491.00 ns/op 0.48
Object access 1 prop 0.13300 ns/op 0.38000 ns/op 0.35
Map access 1 prop 0.14300 ns/op 0.35900 ns/op 0.40
Object get x1000 5.9290 ns/op 5.1390 ns/op 1.15
Map get x1000 6.6260 ns/op 7.4580 ns/op 0.89
Object set x1000 32.714 ns/op 23.679 ns/op 1.38
Map set x1000 22.348 ns/op 22.631 ns/op 0.99
Return object 10000 times 0.29080 ns/op 0.31560 ns/op 0.92
Throw Error 10000 times 3.4110 us/op 2.8934 us/op 1.18
toHex 140.00 ns/op 111.30 ns/op 1.26
Buffer.from 128.48 ns/op 101.43 ns/op 1.27
shared Buffer 84.042 ns/op 68.644 ns/op 1.22
fastMsgIdFn sha256 / 200 bytes 2.2110 us/op 2.0530 us/op 1.08
fastMsgIdFn h32 xxhash / 200 bytes 226.00 ns/op 478.00 ns/op 0.47
fastMsgIdFn h64 xxhash / 200 bytes 257.00 ns/op 530.00 ns/op 0.48
fastMsgIdFn sha256 / 1000 bytes 7.3540 us/op 6.2810 us/op 1.17
fastMsgIdFn h32 xxhash / 1000 bytes 365.00 ns/op 636.00 ns/op 0.57
fastMsgIdFn h64 xxhash / 1000 bytes 334.00 ns/op 607.00 ns/op 0.55
fastMsgIdFn sha256 / 10000 bytes 63.549 us/op 51.055 us/op 1.24
fastMsgIdFn h32 xxhash / 10000 bytes 1.8490 us/op 2.0650 us/op 0.90
fastMsgIdFn h64 xxhash / 10000 bytes 1.2140 us/op 1.3830 us/op 0.88
send data - 1000 256B messages 12.568 ms/op 11.011 ms/op 1.14
send data - 1000 512B messages 16.428 ms/op 14.755 ms/op 1.11
send data - 1000 1024B messages 24.973 ms/op 25.654 ms/op 0.97
send data - 1000 1200B messages 26.450 ms/op 23.555 ms/op 1.12
send data - 1000 2048B messages 30.099 ms/op 33.717 ms/op 0.89
send data - 1000 4096B messages 31.065 ms/op 30.474 ms/op 1.02
send data - 1000 16384B messages 72.078 ms/op 70.130 ms/op 1.03
send data - 1000 65536B messages 211.90 ms/op 257.97 ms/op 0.82
enrSubnets - fastDeserialize 64 bits 1.0470 us/op 1.1060 us/op 0.95
enrSubnets - ssz BitVector 64 bits 350.00 ns/op 561.00 ns/op 0.62
enrSubnets - fastDeserialize 4 bits 140.00 ns/op 338.00 ns/op 0.41
enrSubnets - ssz BitVector 4 bits 346.00 ns/op 550.00 ns/op 0.63
prioritizePeers score -10:0 att 32-0.1 sync 2-0 133.88 us/op 112.04 us/op 1.19
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 154.99 us/op 133.02 us/op 1.17
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 228.37 us/op 223.77 us/op 1.02
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 417.85 us/op 370.56 us/op 1.13
prioritizePeers score 0:0 att 64-1 sync 4-1 510.74 us/op 444.90 us/op 1.15
array of 16000 items push then shift 1.6594 us/op 1.3691 us/op 1.21
LinkedList of 16000 items push then shift 7.3700 ns/op 7.3340 ns/op 1.00
array of 16000 items push then pop 125.22 ns/op 116.17 ns/op 1.08
LinkedList of 16000 items push then pop 7.3510 ns/op 7.2930 ns/op 1.01
array of 24000 items push then shift 2.5012 us/op 1.8964 us/op 1.32
LinkedList of 24000 items push then shift 7.4240 ns/op 7.1460 ns/op 1.04
array of 24000 items push then pop 144.49 ns/op 153.06 ns/op 0.94
LinkedList of 24000 items push then pop 7.5230 ns/op 6.7070 ns/op 1.12
intersect bitArray bitLen 8 6.5390 ns/op 5.4390 ns/op 1.20
intersect array and set length 8 44.602 ns/op 38.691 ns/op 1.15
intersect bitArray bitLen 128 30.476 ns/op 27.779 ns/op 1.10
intersect array and set length 128 674.68 ns/op 671.39 ns/op 1.00
bitArray.getTrueBitIndexes() bitLen 128 1.3460 us/op 1.6940 us/op 0.79
bitArray.getTrueBitIndexes() bitLen 248 2.2390 us/op 2.6850 us/op 0.83
bitArray.getTrueBitIndexes() bitLen 512 4.3460 us/op 5.7930 us/op 0.75
Buffer.concat 32 items 704.00 ns/op 1.0970 us/op 0.64
Uint8Array.set 32 items 1.4130 us/op 1.8170 us/op 0.78
Buffer.copy 2.6230 us/op 2.9800 us/op 0.88
Uint8Array.set - with subarray 2.1100 us/op 2.8800 us/op 0.73
Uint8Array.set - without subarray 1.6530 us/op 1.6970 us/op 0.97
getUint32 - dataview 249.00 ns/op 473.00 ns/op 0.53
getUint32 - manual 160.00 ns/op 378.00 ns/op 0.42
Set add up to 64 items then delete first 2.2201 us/op 2.1171 us/op 1.05
OrderedSet add up to 64 items then delete first 3.3368 us/op 3.4149 us/op 0.98
Set add up to 64 items then delete last 2.5761 us/op 2.4996 us/op 1.03
OrderedSet add up to 64 items then delete last 4.2329 us/op 3.4299 us/op 1.23
Set add up to 64 items then delete middle 2.8564 us/op 2.1828 us/op 1.31
OrderedSet add up to 64 items then delete middle 5.9947 us/op 5.0361 us/op 1.19
Set add up to 128 items then delete first 5.3035 us/op 4.6094 us/op 1.15
OrderedSet add up to 128 items then delete first 8.0666 us/op 6.7981 us/op 1.19
Set add up to 128 items then delete last 4.9936 us/op 4.4746 us/op 1.12
OrderedSet add up to 128 items then delete last 7.4676 us/op 6.3304 us/op 1.18
Set add up to 128 items then delete middle 5.1649 us/op 4.6475 us/op 1.11
OrderedSet add up to 128 items then delete middle 14.839 us/op 12.718 us/op 1.17
Set add up to 256 items then delete first 10.434 us/op 9.4937 us/op 1.10
OrderedSet add up to 256 items then delete first 17.387 us/op 14.104 us/op 1.23
Set add up to 256 items then delete last 9.8735 us/op 9.3094 us/op 1.06
OrderedSet add up to 256 items then delete last 14.662 us/op 13.527 us/op 1.08
Set add up to 256 items then delete middle 10.401 us/op 8.8198 us/op 1.18
OrderedSet add up to 256 items then delete middle 44.391 us/op 36.294 us/op 1.22
transfer serialized Status (84 B) 2.8890 us/op 2.2640 us/op 1.28
copy serialized Status (84 B) 1.3250 us/op 1.4070 us/op 0.94
transfer serialized SignedVoluntaryExit (112 B) 2.5850 us/op 2.6820 us/op 0.96
copy serialized SignedVoluntaryExit (112 B) 1.3110 us/op 1.6510 us/op 0.79
transfer serialized ProposerSlashing (416 B) 2.8420 us/op 3.2610 us/op 0.87
copy serialized ProposerSlashing (416 B) 1.7150 us/op 2.9180 us/op 0.59
transfer serialized Attestation (485 B) 2.8920 us/op 3.3410 us/op 0.87
copy serialized Attestation (485 B) 1.9590 us/op 2.8990 us/op 0.68
transfer serialized AttesterSlashing (33232 B) 3.4050 us/op 3.2620 us/op 1.04
copy serialized AttesterSlashing (33232 B) 5.8390 us/op 5.1920 us/op 1.12
transfer serialized Small SignedBeaconBlock (128000 B) 4.4960 us/op 3.9660 us/op 1.13
copy serialized Small SignedBeaconBlock (128000 B) 15.923 us/op 11.664 us/op 1.37
transfer serialized Avg SignedBeaconBlock (200000 B) 5.3910 us/op 4.2480 us/op 1.27
copy serialized Avg SignedBeaconBlock (200000 B) 23.099 us/op 14.268 us/op 1.62
transfer serialized BlobsSidecar (524380 B) 5.1450 us/op 4.8700 us/op 1.06
copy serialized BlobsSidecar (524380 B) 146.69 us/op 84.847 us/op 1.73
transfer serialized Big SignedBeaconBlock (1000000 B) 5.0910 us/op 5.3000 us/op 0.96
copy serialized Big SignedBeaconBlock (1000000 B) 195.67 us/op 419.81 us/op 0.47
pass gossip attestations to forkchoice per slot 2.7194 ms/op 2.3888 ms/op 1.14
forkChoice updateHead vc 100000 bc 64 eq 0 453.51 us/op 363.28 us/op 1.25
forkChoice updateHead vc 600000 bc 64 eq 0 3.3856 ms/op 2.3537 ms/op 1.44
forkChoice updateHead vc 1000000 bc 64 eq 0 6.5646 ms/op 3.6236 ms/op 1.81
forkChoice updateHead vc 600000 bc 320 eq 0 3.0890 ms/op 2.1926 ms/op 1.41
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9261 ms/op 2.4036 ms/op 1.22
forkChoice updateHead vc 600000 bc 7200 eq 0 4.1152 ms/op 2.8391 ms/op 1.45
forkChoice updateHead vc 600000 bc 64 eq 1000 11.363 ms/op 9.3471 ms/op 1.22
forkChoice updateHead vc 600000 bc 64 eq 10000 11.914 ms/op 9.2129 ms/op 1.29
forkChoice updateHead vc 600000 bc 64 eq 300000 16.794 ms/op 14.485 ms/op 1.16
computeDeltas 500000 validators 300 proto nodes 4.2180 ms/op 3.4308 ms/op 1.23
computeDeltas 500000 validators 1200 proto nodes 4.2299 ms/op 3.2981 ms/op 1.28
computeDeltas 500000 validators 7200 proto nodes 4.2176 ms/op 3.2789 ms/op 1.29
computeDeltas 750000 validators 300 proto nodes 6.1663 ms/op 4.9177 ms/op 1.25
computeDeltas 750000 validators 1200 proto nodes 6.1069 ms/op 5.0155 ms/op 1.22
computeDeltas 750000 validators 7200 proto nodes 6.0609 ms/op 4.9371 ms/op 1.23
computeDeltas 1400000 validators 300 proto nodes 11.509 ms/op 9.3265 ms/op 1.23
computeDeltas 1400000 validators 1200 proto nodes 11.669 ms/op 9.6894 ms/op 1.20
computeDeltas 1400000 validators 7200 proto nodes 11.559 ms/op 9.5488 ms/op 1.21
computeDeltas 2100000 validators 300 proto nodes 17.638 ms/op 14.399 ms/op 1.22
computeDeltas 2100000 validators 1200 proto nodes 17.729 ms/op 14.144 ms/op 1.25
computeDeltas 2100000 validators 7200 proto nodes 17.923 ms/op 14.150 ms/op 1.27
altair processAttestation - 250000 vs - 7PWei normalcase 2.1800 ms/op 1.6356 ms/op 1.33
altair processAttestation - 250000 vs - 7PWei worstcase 3.1857 ms/op 2.3560 ms/op 1.35
altair processAttestation - setStatus - 1/6 committees join 124.28 us/op 100.76 us/op 1.23
altair processAttestation - setStatus - 1/3 committees join 257.62 us/op 192.05 us/op 1.34
altair processAttestation - setStatus - 1/2 committees join 345.93 us/op 268.17 us/op 1.29
altair processAttestation - setStatus - 2/3 committees join 444.55 us/op 359.10 us/op 1.24
altair processAttestation - setStatus - 4/5 committees join 626.74 us/op 496.41 us/op 1.26
altair processAttestation - setStatus - 100% committees join 733.20 us/op 598.75 us/op 1.22
altair processBlock - 250000 vs - 7PWei normalcase 5.7014 ms/op 4.1659 ms/op 1.37
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.408 ms/op 27.576 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase 37.882 ms/op 32.521 ms/op 1.16
altair processBlock - 250000 vs - 7PWei worstcase hashState 80.156 ms/op 61.542 ms/op 1.30
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2573 ms/op 1.8195 ms/op 1.24
phase0 processBlock - 250000 vs - 7PWei worstcase 24.221 ms/op 23.740 ms/op 1.02
altair processEth1Data - 250000 vs - 7PWei normalcase 407.76 us/op 348.98 us/op 1.17
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.2450 us/op 4.6530 us/op 1.13
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 33.929 us/op 25.981 us/op 1.31
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.7910 us/op 8.4760 us/op 1.04
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.4010 us/op 4.0750 us/op 1.57
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 149.21 us/op 103.02 us/op 1.45
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1392 ms/op 1.2225 ms/op 0.93
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5434 ms/op 962.80 us/op 1.60
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.3345 ms/op 1.0440 ms/op 1.28
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.7121 ms/op 2.8626 ms/op 1.30
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6421 ms/op 1.0230 ms/op 1.61
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6471 ms/op 3.0351 ms/op 1.20
Tree 40 250000 create 431.26 ms/op 448.52 ms/op 0.96
Tree 40 250000 get(125000) 143.91 ns/op 133.71 ns/op 1.08
Tree 40 250000 set(125000) 1.4677 us/op 1.5389 us/op 0.95
Tree 40 250000 toArray() 18.467 ms/op 20.606 ms/op 0.90
Tree 40 250000 iterate all - toArray() + loop 19.152 ms/op 20.847 ms/op 0.92
Tree 40 250000 iterate all - get(i) 52.823 ms/op 52.620 ms/op 1.00
Array 250000 create 3.3472 ms/op 3.4856 ms/op 0.96
Array 250000 clone - spread 1.4685 ms/op 1.3838 ms/op 1.06
Array 250000 get(125000) 0.42600 ns/op 0.59800 ns/op 0.71
Array 250000 set(125000) 0.44300 ns/op 0.62700 ns/op 0.71
Array 250000 iterate all - loop 103.66 us/op 77.559 us/op 1.34
phase0 afterProcessEpoch - 250000 vs - 7PWei 55.425 ms/op 46.766 ms/op 1.19
Array.fill - length 1000000 3.6492 ms/op 2.7163 ms/op 1.34
Array push - length 1000000 23.305 ms/op 16.452 ms/op 1.42
Array.get 0.28855 ns/op 0.26054 ns/op 1.11
Uint8Array.get 0.44902 ns/op 0.34397 ns/op 1.31
phase0 beforeProcessEpoch - 250000 vs - 7PWei 19.652 ms/op 17.009 ms/op 1.16
altair processEpoch - mainnet_e81889 272.94 ms/op 292.26 ms/op 0.93
mainnet_e81889 - altair beforeProcessEpoch 20.097 ms/op 19.372 ms/op 1.04
mainnet_e81889 - altair processJustificationAndFinalization 18.788 us/op 15.862 us/op 1.18
mainnet_e81889 - altair processInactivityUpdates 5.2024 ms/op 4.6243 ms/op 1.13
mainnet_e81889 - altair processRewardsAndPenalties 60.552 ms/op 46.709 ms/op 1.30
mainnet_e81889 - altair processRegistryUpdates 2.6180 us/op 2.8010 us/op 0.93
mainnet_e81889 - altair processSlashings 563.00 ns/op 858.00 ns/op 0.66
mainnet_e81889 - altair processEth1DataReset 814.00 ns/op 919.00 ns/op 0.89
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.6035 ms/op 1.0920 ms/op 2.38
mainnet_e81889 - altair processSlashingsReset 3.1200 us/op 5.4510 us/op 0.57
mainnet_e81889 - altair processRandaoMixesReset 3.9460 us/op 6.5320 us/op 0.60
mainnet_e81889 - altair processHistoricalRootsUpdate 1.2320 us/op 1.2880 us/op 0.96
mainnet_e81889 - altair processParticipationFlagUpdates 7.2400 us/op 3.5350 us/op 2.05
mainnet_e81889 - altair processSyncCommitteeUpdates 2.1840 us/op 955.00 ns/op 2.29
mainnet_e81889 - altair afterProcessEpoch 67.279 ms/op 41.775 ms/op 1.61
capella processEpoch - mainnet_e217614 1.2157 s/op 1.0315 s/op 1.18
mainnet_e217614 - capella beforeProcessEpoch 66.772 ms/op 71.076 ms/op 0.94
mainnet_e217614 - capella processJustificationAndFinalization 14.697 us/op 13.073 us/op 1.12
mainnet_e217614 - capella processInactivityUpdates 16.890 ms/op 13.067 ms/op 1.29
mainnet_e217614 - capella processRewardsAndPenalties 311.14 ms/op 250.05 ms/op 1.24
mainnet_e217614 - capella processRegistryUpdates 26.840 us/op 16.757 us/op 1.60
mainnet_e217614 - capella processSlashings 1.7140 us/op 916.00 ns/op 1.87
mainnet_e217614 - capella processEth1DataReset 1.5720 us/op 805.00 ns/op 1.95
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.892 ms/op 6.2999 ms/op 1.89
mainnet_e217614 - capella processSlashingsReset 9.5470 us/op 3.6040 us/op 2.65
mainnet_e217614 - capella processRandaoMixesReset 12.023 us/op 4.8510 us/op 2.48
mainnet_e217614 - capella processHistoricalRootsUpdate 1.8130 us/op 812.00 ns/op 2.23
mainnet_e217614 - capella processParticipationFlagUpdates 9.3050 us/op 2.8220 us/op 3.30
mainnet_e217614 - capella afterProcessEpoch 166.13 ms/op 104.32 ms/op 1.59
phase0 processEpoch - mainnet_e58758 663.84 ms/op 312.55 ms/op 2.12
mainnet_e58758 - phase0 beforeProcessEpoch 192.26 ms/op 72.597 ms/op 2.65
mainnet_e58758 - phase0 processJustificationAndFinalization 39.993 us/op 17.428 us/op 2.29
mainnet_e58758 - phase0 processRewardsAndPenalties 40.832 ms/op 32.395 ms/op 1.26
mainnet_e58758 - phase0 processRegistryUpdates 29.176 us/op 8.8350 us/op 3.30
mainnet_e58758 - phase0 processSlashings 2.3950 us/op 1.0620 us/op 2.26
mainnet_e58758 - phase0 processEth1DataReset 1.6700 us/op 940.00 ns/op 1.78
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.1337 ms/op 903.57 us/op 2.36
mainnet_e58758 - phase0 processSlashingsReset 7.7470 us/op 4.2740 us/op 1.81
mainnet_e58758 - phase0 processRandaoMixesReset 13.835 us/op 5.8310 us/op 2.37
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.6830 us/op 886.00 ns/op 1.90
mainnet_e58758 - phase0 processParticipationRecordUpdates 13.902 us/op 5.1680 us/op 2.69
mainnet_e58758 - phase0 afterProcessEpoch 47.640 ms/op 37.112 ms/op 1.28
phase0 processEffectiveBalanceUpdates - 250000 normalcase 3.0512 ms/op 945.33 us/op 3.23
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.0010 ms/op 1.9015 ms/op 1.58
altair processInactivityUpdates - 250000 normalcase 39.848 ms/op 16.745 ms/op 2.38
altair processInactivityUpdates - 250000 worstcase 39.469 ms/op 18.028 ms/op 2.19
phase0 processRegistryUpdates - 250000 normalcase 17.594 us/op 5.3270 us/op 3.30
phase0 processRegistryUpdates - 250000 badcase_full_deposits 552.38 us/op 289.60 us/op 1.91
phase0 processRegistryUpdates - 250000 worstcase 0.5 289.65 ms/op 106.99 ms/op 2.71
altair processRewardsAndPenalties - 250000 normalcase 60.482 ms/op 43.544 ms/op 1.39
altair processRewardsAndPenalties - 250000 worstcase 40.150 ms/op 43.188 ms/op 0.93
phase0 getAttestationDeltas - 250000 normalcase 7.0548 ms/op 9.0538 ms/op 0.78
phase0 getAttestationDeltas - 250000 worstcase 7.0877 ms/op 5.2860 ms/op 1.34
phase0 processSlashings - 250000 worstcase 101.50 us/op 96.744 us/op 1.05
altair processSyncCommitteeUpdates - 250000 133.22 ms/op 95.388 ms/op 1.40
BeaconState.hashTreeRoot - No change 247.00 ns/op 471.00 ns/op 0.52
BeaconState.hashTreeRoot - 1 full validator 96.807 us/op 86.057 us/op 1.12
BeaconState.hashTreeRoot - 32 full validator 1.0662 ms/op 929.87 us/op 1.15
BeaconState.hashTreeRoot - 512 full validator 13.055 ms/op 7.9929 ms/op 1.63
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 161.04 us/op 101.17 us/op 1.59
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 3.0654 ms/op 2.0910 ms/op 1.47
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 43.761 ms/op 22.425 ms/op 1.95
BeaconState.hashTreeRoot - 1 balances 188.88 us/op 106.92 us/op 1.77
BeaconState.hashTreeRoot - 32 balances 1.8481 ms/op 1.2001 ms/op 1.54
BeaconState.hashTreeRoot - 512 balances 16.199 ms/op 7.8300 ms/op 2.07
BeaconState.hashTreeRoot - 250000 balances 243.68 ms/op 154.30 ms/op 1.58
aggregationBits - 2048 els - zipIndexesInBitList 43.914 us/op 19.401 us/op 2.26
byteArrayEquals 32 65.057 ns/op 48.240 ns/op 1.35
Buffer.compare 32 20.733 ns/op 15.779 ns/op 1.31
byteArrayEquals 1024 1.8839 us/op 1.2787 us/op 1.47
Buffer.compare 1024 31.882 ns/op 23.453 ns/op 1.36
byteArrayEquals 16384 32.041 us/op 20.565 us/op 1.56
Buffer.compare 16384 267.74 ns/op 176.22 ns/op 1.52
byteArrayEquals 123687377 273.20 ms/op 154.32 ms/op 1.77
Buffer.compare 123687377 16.089 ms/op 4.8359 ms/op 3.33
byteArrayEquals 32 - diff last byte 57.824 ns/op 48.551 ns/op 1.19
Buffer.compare 32 - diff last byte 19.127 ns/op 16.056 ns/op 1.19
byteArrayEquals 1024 - diff last byte 2.0861 us/op 1.2938 us/op 1.61
Buffer.compare 1024 - diff last byte 37.475 ns/op 23.467 ns/op 1.60
byteArrayEquals 16384 - diff last byte 47.120 us/op 20.455 us/op 2.30
Buffer.compare 16384 - diff last byte 289.96 ns/op 210.83 ns/op 1.38
byteArrayEquals 123687377 - diff last byte 249.31 ms/op 149.50 ms/op 1.67
Buffer.compare 123687377 - diff last byte 10.203 ms/op 4.5778 ms/op 2.23
byteArrayEquals 32 - random bytes 5.4610 ns/op 4.7850 ns/op 1.14
Buffer.compare 32 - random bytes 18.127 ns/op 15.197 ns/op 1.19
byteArrayEquals 1024 - random bytes 5.4490 ns/op 4.7840 ns/op 1.14
Buffer.compare 1024 - random bytes 19.137 ns/op 15.062 ns/op 1.27
byteArrayEquals 16384 - random bytes 5.4550 ns/op 4.7760 ns/op 1.14
Buffer.compare 16384 - random bytes 19.586 ns/op 15.072 ns/op 1.30
byteArrayEquals 123687377 - random bytes 6.8500 ns/op 7.7500 ns/op 0.88
Buffer.compare 123687377 - random bytes 19.620 ns/op 20.400 ns/op 0.96
regular array get 100000 times 34.987 us/op 30.207 us/op 1.16
wrappedArray get 100000 times 35.029 us/op 30.554 us/op 1.15
arrayWithProxy get 100000 times 14.008 ms/op 8.6311 ms/op 1.62
ssz.Root.equals 47.607 ns/op 43.106 ns/op 1.10
byteArrayEquals 46.752 ns/op 38.280 ns/op 1.22
Buffer.compare 10.653 ns/op 8.7990 ns/op 1.21
processSlot - 1 slots 14.847 us/op 10.861 us/op 1.37
processSlot - 32 slots 3.4458 ms/op 2.3413 ms/op 1.47
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 39.007 ms/op 40.651 ms/op 0.96
getCommitteeAssignments - req 1 vs - 250000 vc 2.1906 ms/op 1.8414 ms/op 1.19
getCommitteeAssignments - req 100 vs - 250000 vc 4.2396 ms/op 3.5157 ms/op 1.21
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5772 ms/op 3.8237 ms/op 1.20
findModifiedValidators - 10000 modified validators 258.02 ms/op 212.69 ms/op 1.21
findModifiedValidators - 1000 modified validators 183.32 ms/op 136.38 ms/op 1.34
findModifiedValidators - 100 modified validators 187.58 ms/op 144.35 ms/op 1.30
findModifiedValidators - 10 modified validators 190.78 ms/op 132.33 ms/op 1.44
findModifiedValidators - 1 modified validators 174.05 ms/op 145.31 ms/op 1.20
findModifiedValidators - no difference 179.53 ms/op 131.56 ms/op 1.36
compare ViewDUs 3.2340 s/op 3.2852 s/op 0.98
compare each validator Uint8Array 1.3000 s/op 1.0569 s/op 1.23
compare ViewDU to Uint8Array 927.97 ms/op 656.13 ms/op 1.41
migrate state 1000000 validators, 24 modified, 0 new 750.84 ms/op 598.84 ms/op 1.25
migrate state 1000000 validators, 1700 modified, 1000 new 952.84 ms/op 883.03 ms/op 1.08
migrate state 1000000 validators, 3400 modified, 2000 new 1.1285 s/op 1.0697 s/op 1.05
migrate state 1500000 validators, 24 modified, 0 new 796.45 ms/op 769.14 ms/op 1.04
migrate state 1500000 validators, 1700 modified, 1000 new 995.49 ms/op 1.0082 s/op 0.99
migrate state 1500000 validators, 3400 modified, 2000 new 1.2294 s/op 1.2002 s/op 1.02
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0400 ns/op 6.3300 ns/op 0.80
state getBlockRootAtSlot - 250000 vs - 7PWei 830.90 ns/op 708.17 ns/op 1.17
computeProposers - vc 250000 7.9156 ms/op 7.0096 ms/op 1.13
computeEpochShuffling - vc 250000 43.599 ms/op 35.164 ms/op 1.24
getNextSyncCommittee - vc 250000 130.79 ms/op 113.33 ms/op 1.15
computeSigningRoot for AttestationData 20.335 us/op 22.801 us/op 0.89
hash AttestationData serialized data then Buffer.toString(base64) 1.6267 us/op 1.2966 us/op 1.25
toHexString serialized data 924.25 ns/op 784.88 ns/op 1.18
Buffer.toString(base64) 187.90 ns/op 135.42 ns/op 1.39
nodejs block root to RootHex using toHex 163.81 ns/op 110.49 ns/op 1.48
nodejs block root to RootHex using toRootHex 96.886 ns/op 74.059 ns/op 1.31
browser block root to RootHex using the deprecated toHexString 240.98 ns/op 207.60 ns/op 1.16
browser block root to RootHex using toHex 189.87 ns/op 169.69 ns/op 1.12
browser block root to RootHex using toRootHex 174.22 ns/op 151.30 ns/op 1.15

by benchmarkbot/action

@wemeetagain
Copy link
Member

🎉 This PR is included in v1.26.0 🎉

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