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: assert as-sha256 is used as hasher by ssz #7394

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jan 23, 2025

Motivation

Loading an incorrect hasher can cause strange regressions in performance which might not be immediately obvious, best to catch this at startup and exit as there is no reason for the beacon node to use any other hasher besides as-sha256 (at least right now).

Description

Assert as-sha256 is used as hasher by ssz

@nflaig nflaig requested a review from a team as a code owner January 23, 2025 21:56
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 48.60%. Comparing base (42631de) to head (e1e067d).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7394      +/-   ##
============================================
- Coverage     48.61%   48.60%   -0.01%     
============================================
  Files           603      603              
  Lines         40519    40523       +4     
  Branches       2070     2070              
============================================
+ Hits          19697    19698       +1     
- Misses        20784    20787       +3     
  Partials         38       38              

@nflaig nflaig merged commit 821c319 into unstable Jan 23, 2025
19 of 20 checks passed
@nflaig nflaig deleted the nflaig/assert-as-sha256 branch January 23, 2025 22:33
Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: a282033 Previous: 6781de9 Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 12.307 ms/op 44.830 ms/op 0.27
Array.fill - length 1000000 2.4033 ms/op 10.397 ms/op 0.23
Full benchmark results
Benchmark suite Current: a282033 Previous: 6781de9 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.5160 ms/op 1.6951 ms/op 0.89
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 30.917 us/op 51.323 us/op 0.60
BLS verify - blst 896.59 us/op 962.75 us/op 0.93
BLS verifyMultipleSignatures 3 - blst 1.3570 ms/op 1.4290 ms/op 0.95
BLS verifyMultipleSignatures 8 - blst 1.4753 ms/op 1.9982 ms/op 0.74
BLS verifyMultipleSignatures 32 - blst 4.4996 ms/op 7.3711 ms/op 0.61
BLS verifyMultipleSignatures 64 - blst 8.4133 ms/op 10.782 ms/op 0.78
BLS verifyMultipleSignatures 128 - blst 15.945 ms/op 17.162 ms/op 0.93
BLS deserializing 10000 signatures 625.95 ms/op 693.82 ms/op 0.90
BLS deserializing 100000 signatures 6.1459 s/op 7.0658 s/op 0.87
BLS verifyMultipleSignatures - same message - 3 - blst 952.25 us/op 999.49 us/op 0.95
BLS verifyMultipleSignatures - same message - 8 - blst 1.0120 ms/op 1.2518 ms/op 0.81
BLS verifyMultipleSignatures - same message - 32 - blst 1.6122 ms/op 1.8443 ms/op 0.87
BLS verifyMultipleSignatures - same message - 64 - blst 2.4272 ms/op 2.8017 ms/op 0.87
BLS verifyMultipleSignatures - same message - 128 - blst 4.2645 ms/op 4.6224 ms/op 0.92
BLS aggregatePubkeys 32 - blst 17.899 us/op 21.107 us/op 0.85
BLS aggregatePubkeys 128 - blst 62.820 us/op 71.861 us/op 0.87
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 74.946 ms/op 91.820 ms/op 0.82
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 44.573 ms/op 55.688 ms/op 0.80
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 36.648 ms/op 49.299 ms/op 0.74
getSlashingsAndExits - default max 54.066 us/op 79.079 us/op 0.68
getSlashingsAndExits - 2k 615.88 us/op 586.20 us/op 1.05
proposeBlockBody type=full, size=empty 4.4764 ms/op 5.3442 ms/op 0.84
isKnown best case - 1 super set check 438.00 ns/op 286.00 ns/op 1.53
isKnown normal case - 2 super set checks 425.00 ns/op 284.00 ns/op 1.50
isKnown worse case - 16 super set checks 447.00 ns/op 281.00 ns/op 1.59
InMemoryCheckpointStateCache - add get delete 2.6100 us/op 2.8290 us/op 0.92
validate api signedAggregateAndProof - struct 1.7179 ms/op 2.6280 ms/op 0.65
validate gossip signedAggregateAndProof - struct 1.7033 ms/op 1.8109 ms/op 0.94
batch validate gossip attestation - vc 640000 - chunk 32 126.05 us/op 130.76 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 64 100.69 us/op 119.31 us/op 0.84
batch validate gossip attestation - vc 640000 - chunk 128 96.938 us/op 120.05 us/op 0.81
batch validate gossip attestation - vc 640000 - chunk 256 93.722 us/op 122.82 us/op 0.76
pickEth1Vote - no votes 875.78 us/op 1.2155 ms/op 0.72
pickEth1Vote - max votes 6.7111 ms/op 10.002 ms/op 0.67
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.726 ms/op 17.304 ms/op 1.14
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.705 ms/op 29.815 ms/op 0.73
pickEth1Vote - Eth1Data fastSerialize value x2048 371.50 us/op 566.41 us/op 0.66
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.5706 ms/op 4.5616 ms/op 0.78
bytes32 toHexString 609.00 ns/op 678.00 ns/op 0.90
bytes32 Buffer.toString(hex) 455.00 ns/op 274.00 ns/op 1.66
bytes32 Buffer.toString(hex) from Uint8Array 583.00 ns/op 468.00 ns/op 1.25
bytes32 Buffer.toString(hex) + 0x 504.00 ns/op 266.00 ns/op 1.89
Object access 1 prop 0.37200 ns/op 0.16500 ns/op 2.25
Map access 1 prop 0.35300 ns/op 0.12700 ns/op 2.78
Object get x1000 5.3250 ns/op 6.2250 ns/op 0.86
Map get x1000 6.0260 ns/op 6.6720 ns/op 0.90
Object set x1000 23.588 ns/op 50.360 ns/op 0.47
Map set x1000 25.065 ns/op 31.346 ns/op 0.80
Return object 10000 times 0.30810 ns/op 0.32790 ns/op 0.94
Throw Error 10000 times 2.7544 us/op 3.5457 us/op 0.78
toHex 130.39 ns/op 177.96 ns/op 0.73
Buffer.from 121.09 ns/op 157.61 ns/op 0.77
shared Buffer 73.920 ns/op 99.144 ns/op 0.75
fastMsgIdFn sha256 / 200 bytes 2.0630 us/op 2.4470 us/op 0.84
fastMsgIdFn h32 xxhash / 200 bytes 501.00 ns/op 298.00 ns/op 1.68
fastMsgIdFn h64 xxhash / 200 bytes 491.00 ns/op 288.00 ns/op 1.70
fastMsgIdFn sha256 / 1000 bytes 6.0720 us/op 7.7780 us/op 0.78
fastMsgIdFn h32 xxhash / 1000 bytes 625.00 ns/op 429.00 ns/op 1.46
fastMsgIdFn h64 xxhash / 1000 bytes 578.00 ns/op 354.00 ns/op 1.63
fastMsgIdFn sha256 / 10000 bytes 49.478 us/op 67.533 us/op 0.73
fastMsgIdFn h32 xxhash / 10000 bytes 2.0150 us/op 2.0090 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.3560 us/op 1.2840 us/op 1.06
send data - 1000 256B messages 11.923 ms/op 14.190 ms/op 0.84
send data - 1000 512B messages 15.792 ms/op 20.123 ms/op 0.78
send data - 1000 1024B messages 26.091 ms/op 29.623 ms/op 0.88
send data - 1000 1200B messages 24.332 ms/op 30.524 ms/op 0.80
send data - 1000 2048B messages 30.277 ms/op 32.478 ms/op 0.93
send data - 1000 4096B messages 28.764 ms/op 35.267 ms/op 0.82
send data - 1000 16384B messages 68.780 ms/op 69.145 ms/op 0.99
send data - 1000 65536B messages 257.23 ms/op 198.62 ms/op 1.30
enrSubnets - fastDeserialize 64 bits 1.1180 us/op 1.1690 us/op 0.96
enrSubnets - ssz BitVector 64 bits 601.00 ns/op 367.00 ns/op 1.64
enrSubnets - fastDeserialize 4 bits 376.00 ns/op 140.00 ns/op 2.69
enrSubnets - ssz BitVector 4 bits 608.00 ns/op 402.00 ns/op 1.51
prioritizePeers score -10:0 att 32-0.1 sync 2-0 113.89 us/op 144.55 us/op 0.79
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 137.87 us/op 159.51 us/op 0.86
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 204.99 us/op 228.97 us/op 0.90
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 345.63 us/op 410.84 us/op 0.84
prioritizePeers score 0:0 att 64-1 sync 4-1 449.19 us/op 568.97 us/op 0.79
array of 16000 items push then shift 1.3057 us/op 1.7026 us/op 0.77
LinkedList of 16000 items push then shift 7.7830 ns/op 8.1030 ns/op 0.96
array of 16000 items push then pop 105.83 ns/op 132.55 ns/op 0.80
LinkedList of 16000 items push then pop 6.2280 ns/op 7.9160 ns/op 0.79
array of 24000 items push then shift 1.8313 us/op 2.7431 us/op 0.67
LinkedList of 24000 items push then shift 6.8310 ns/op 8.4820 ns/op 0.81
array of 24000 items push then pop 152.84 ns/op 157.77 ns/op 0.97
LinkedList of 24000 items push then pop 7.0420 ns/op 7.2950 ns/op 0.97
intersect bitArray bitLen 8 5.6370 ns/op 6.5490 ns/op 0.86
intersect array and set length 8 38.629 ns/op 46.389 ns/op 0.83
intersect bitArray bitLen 128 26.222 ns/op 33.938 ns/op 0.77
intersect array and set length 128 570.45 ns/op 1.0779 us/op 0.53
bitArray.getTrueBitIndexes() bitLen 128 1.5200 us/op 2.3040 us/op 0.66
bitArray.getTrueBitIndexes() bitLen 248 2.3330 us/op 3.6500 us/op 0.64
bitArray.getTrueBitIndexes() bitLen 512 4.7900 us/op 8.2350 us/op 0.58
Buffer.concat 32 items 919.00 ns/op 1.1480 us/op 0.80
Uint8Array.set 32 items 1.8490 us/op 2.5460 us/op 0.73
Buffer.copy 2.7160 us/op 3.4540 us/op 0.79
Uint8Array.set - with subarray 2.4930 us/op 4.1310 us/op 0.60
Uint8Array.set - without subarray 1.6210 us/op 2.6990 us/op 0.60
getUint32 - dataview 446.00 ns/op 386.00 ns/op 1.16
getUint32 - manual 381.00 ns/op 279.00 ns/op 1.37
Set add up to 64 items then delete first 1.8142 us/op 3.4524 us/op 0.53
OrderedSet add up to 64 items then delete first 3.1576 us/op 4.7981 us/op 0.66
Set add up to 64 items then delete last 2.0864 us/op 3.3903 us/op 0.62
OrderedSet add up to 64 items then delete last 3.4171 us/op 4.9120 us/op 0.70
Set add up to 64 items then delete middle 2.2476 us/op 3.7571 us/op 0.60
OrderedSet add up to 64 items then delete middle 4.5615 us/op 7.8082 us/op 0.58
Set add up to 128 items then delete first 3.9009 us/op 7.0163 us/op 0.56
OrderedSet add up to 128 items then delete first 6.0734 us/op 10.826 us/op 0.56
Set add up to 128 items then delete last 4.3267 us/op 7.1047 us/op 0.61
OrderedSet add up to 128 items then delete last 6.7904 us/op 10.374 us/op 0.65
Set add up to 128 items then delete middle 3.9226 us/op 6.8262 us/op 0.57
OrderedSet add up to 128 items then delete middle 13.335 us/op 17.542 us/op 0.76
Set add up to 256 items then delete first 8.5115 us/op 14.443 us/op 0.59
OrderedSet add up to 256 items then delete first 12.364 us/op 22.111 us/op 0.56
Set add up to 256 items then delete last 8.0939 us/op 13.764 us/op 0.59
OrderedSet add up to 256 items then delete last 12.513 us/op 21.829 us/op 0.57
Set add up to 256 items then delete middle 7.7606 us/op 13.147 us/op 0.59
OrderedSet add up to 256 items then delete middle 38.682 us/op 50.508 us/op 0.77
transfer serialized Status (84 B) 2.5360 us/op 3.3470 us/op 0.76
copy serialized Status (84 B) 1.6200 us/op 1.7470 us/op 0.93
transfer serialized SignedVoluntaryExit (112 B) 2.9660 us/op 3.5580 us/op 0.83
copy serialized SignedVoluntaryExit (112 B) 1.6150 us/op 1.8450 us/op 0.88
transfer serialized ProposerSlashing (416 B) 3.4060 us/op 4.1250 us/op 0.83
copy serialized ProposerSlashing (416 B) 2.7970 us/op 2.6740 us/op 1.05
transfer serialized Attestation (485 B) 3.5730 us/op 4.0290 us/op 0.89
copy serialized Attestation (485 B) 3.1410 us/op 2.3420 us/op 1.34
transfer serialized AttesterSlashing (33232 B) 3.5100 us/op 4.0510 us/op 0.87
copy serialized AttesterSlashing (33232 B) 10.393 us/op 10.780 us/op 0.96
transfer serialized Small SignedBeaconBlock (128000 B) 4.6770 us/op 5.4280 us/op 0.86
copy serialized Small SignedBeaconBlock (128000 B) 23.073 us/op 31.731 us/op 0.73
transfer serialized Avg SignedBeaconBlock (200000 B) 4.5090 us/op 6.2800 us/op 0.72
copy serialized Avg SignedBeaconBlock (200000 B) 36.604 us/op 48.416 us/op 0.76
transfer serialized BlobsSidecar (524380 B) 5.6600 us/op 7.9970 us/op 0.71
copy serialized BlobsSidecar (524380 B) 97.006 us/op 149.66 us/op 0.65
transfer serialized Big SignedBeaconBlock (1000000 B) 5.2250 us/op 10.123 us/op 0.52
copy serialized Big SignedBeaconBlock (1000000 B) 171.99 us/op 257.62 us/op 0.67
pass gossip attestations to forkchoice per slot 2.3398 ms/op 3.1541 ms/op 0.74
forkChoice updateHead vc 100000 bc 64 eq 0 378.71 us/op 474.34 us/op 0.80
forkChoice updateHead vc 600000 bc 64 eq 0 3.5041 ms/op 5.2473 ms/op 0.67
forkChoice updateHead vc 1000000 bc 64 eq 0 3.7376 ms/op 6.3525 ms/op 0.59
forkChoice updateHead vc 600000 bc 320 eq 0 2.4989 ms/op 3.6194 ms/op 0.69
forkChoice updateHead vc 600000 bc 1200 eq 0 2.5200 ms/op 3.5327 ms/op 0.71
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2908 ms/op 4.3829 ms/op 0.75
forkChoice updateHead vc 600000 bc 64 eq 1000 10.014 ms/op 11.125 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 10000 9.5880 ms/op 11.275 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 300000 12.307 ms/op 44.830 ms/op 0.27
computeDeltas 500000 validators 300 proto nodes 3.6950 ms/op 5.0038 ms/op 0.74
computeDeltas 500000 validators 1200 proto nodes 3.5348 ms/op 5.4469 ms/op 0.65
computeDeltas 500000 validators 7200 proto nodes 3.4848 ms/op 5.1048 ms/op 0.68
computeDeltas 750000 validators 300 proto nodes 5.3232 ms/op 8.9012 ms/op 0.60
computeDeltas 750000 validators 1200 proto nodes 5.2310 ms/op 7.8187 ms/op 0.67
computeDeltas 750000 validators 7200 proto nodes 5.1586 ms/op 6.8165 ms/op 0.76
computeDeltas 1400000 validators 300 proto nodes 9.4575 ms/op 11.979 ms/op 0.79
computeDeltas 1400000 validators 1200 proto nodes 9.1374 ms/op 11.755 ms/op 0.78
computeDeltas 1400000 validators 7200 proto nodes 9.2655 ms/op 11.919 ms/op 0.78
computeDeltas 2100000 validators 300 proto nodes 13.998 ms/op 18.326 ms/op 0.76
computeDeltas 2100000 validators 1200 proto nodes 14.137 ms/op 19.422 ms/op 0.73
computeDeltas 2100000 validators 7200 proto nodes 14.217 ms/op 20.615 ms/op 0.69
altair processAttestation - 250000 vs - 7PWei normalcase 1.5924 ms/op 3.0972 ms/op 0.51
altair processAttestation - 250000 vs - 7PWei worstcase 2.4453 ms/op 4.5103 ms/op 0.54
altair processAttestation - setStatus - 1/6 committees join 92.209 us/op 177.48 us/op 0.52
altair processAttestation - setStatus - 1/3 committees join 183.93 us/op 373.28 us/op 0.49
altair processAttestation - setStatus - 1/2 committees join 265.80 us/op 413.48 us/op 0.64
altair processAttestation - setStatus - 2/3 committees join 361.69 us/op 471.36 us/op 0.77
altair processAttestation - setStatus - 4/5 committees join 487.48 us/op 634.51 us/op 0.77
altair processAttestation - setStatus - 100% committees join 576.36 us/op 842.88 us/op 0.68
altair processBlock - 250000 vs - 7PWei normalcase 4.1372 ms/op 7.1278 ms/op 0.58
altair processBlock - 250000 vs - 7PWei normalcase hashState 34.885 ms/op 35.566 ms/op 0.98
altair processBlock - 250000 vs - 7PWei worstcase 35.753 ms/op 45.696 ms/op 0.78
altair processBlock - 250000 vs - 7PWei worstcase hashState 83.708 ms/op 97.108 ms/op 0.86
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2707 ms/op 2.6696 ms/op 0.85
phase0 processBlock - 250000 vs - 7PWei worstcase 23.141 ms/op 29.776 ms/op 0.78
altair processEth1Data - 250000 vs - 7PWei normalcase 295.85 us/op 389.39 us/op 0.76
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 3.2980 us/op 8.3530 us/op 0.39
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 17.100 us/op 35.103 us/op 0.49
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.1020 us/op 8.9250 us/op 0.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.0550 us/op 6.2300 us/op 1.13
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 109.14 us/op 175.91 us/op 0.62
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 779.12 us/op 941.75 us/op 0.83
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0054 ms/op 2.5651 ms/op 0.39
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.0098 ms/op 1.3546 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.7315 ms/op 3.5762 ms/op 0.76
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1020 ms/op 1.6462 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.7229 ms/op 3.8835 ms/op 0.70
Tree 40 250000 create 353.01 ms/op 419.60 ms/op 0.84
Tree 40 250000 get(125000) 114.73 ns/op 160.06 ns/op 0.72
Tree 40 250000 set(125000) 1.2099 us/op 1.5172 us/op 0.80
Tree 40 250000 toArray() 9.4039 ms/op 16.963 ms/op 0.55
Tree 40 250000 iterate all - toArray() + loop 10.583 ms/op 18.752 ms/op 0.56
Tree 40 250000 iterate all - get(i) 37.702 ms/op 56.545 ms/op 0.67
Array 250000 create 2.3125 ms/op 3.0780 ms/op 0.75
Array 250000 clone - spread 1.1975 ms/op 1.5690 ms/op 0.76
Array 250000 get(125000) 0.56200 ns/op 0.42800 ns/op 1.31
Array 250000 set(125000) 0.57400 ns/op 0.46200 ns/op 1.24
Array 250000 iterate all - loop 73.696 us/op 109.95 us/op 0.67
phase0 afterProcessEpoch - 250000 vs - 7PWei 39.530 ms/op 57.861 ms/op 0.68
Array.fill - length 1000000 2.4033 ms/op 10.397 ms/op 0.23
Array push - length 1000000 14.286 ms/op 35.499 ms/op 0.40
Array.get 0.25045 ns/op 0.39952 ns/op 0.63
Uint8Array.get 0.32530 ns/op 0.54224 ns/op 0.60
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.485 ms/op 40.609 ms/op 0.38
altair processEpoch - mainnet_e81889 258.37 ms/op 471.80 ms/op 0.55
mainnet_e81889 - altair beforeProcessEpoch 17.489 ms/op 39.346 ms/op 0.44
mainnet_e81889 - altair processJustificationAndFinalization 13.226 us/op 47.021 us/op 0.28
mainnet_e81889 - altair processInactivityUpdates 3.8731 ms/op 9.4193 ms/op 0.41
mainnet_e81889 - altair processRewardsAndPenalties 54.729 ms/op 72.076 ms/op 0.76
mainnet_e81889 - altair processRegistryUpdates 2.2490 us/op 9.2350 us/op 0.24
mainnet_e81889 - altair processSlashings 841.00 ns/op 1.3980 us/op 0.60
mainnet_e81889 - altair processEth1DataReset 839.00 ns/op 1.8690 us/op 0.45
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6270 ms/op 1.7875 ms/op 0.91
mainnet_e81889 - altair processSlashingsReset 2.6730 us/op 10.031 us/op 0.27
mainnet_e81889 - altair processRandaoMixesReset 4.0160 us/op 13.844 us/op 0.29
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0530 us/op 2.3580 us/op 0.45
mainnet_e81889 - altair processParticipationFlagUpdates 1.9430 us/op 4.8980 us/op 0.40
mainnet_e81889 - altair processSyncCommitteeUpdates 877.00 ns/op 1.5540 us/op 0.56
mainnet_e81889 - altair afterProcessEpoch 41.029 ms/op 58.205 ms/op 0.70
capella processEpoch - mainnet_e217614 788.24 ms/op 1.2004 s/op 0.66
mainnet_e217614 - capella beforeProcessEpoch 61.527 ms/op 81.749 ms/op 0.75
mainnet_e217614 - capella processJustificationAndFinalization 9.6110 us/op 18.370 us/op 0.52
mainnet_e217614 - capella processInactivityUpdates 10.544 ms/op 19.608 ms/op 0.54
mainnet_e217614 - capella processRewardsAndPenalties 223.55 ms/op 248.55 ms/op 0.90
mainnet_e217614 - capella processRegistryUpdates 7.2420 us/op 21.936 us/op 0.33
mainnet_e217614 - capella processSlashings 517.00 ns/op 742.00 ns/op 0.70
mainnet_e217614 - capella processEth1DataReset 885.00 ns/op 837.00 ns/op 1.06
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.2373 ms/op 16.588 ms/op 0.26
mainnet_e217614 - capella processSlashingsReset 2.8130 us/op 3.6450 us/op 0.77
mainnet_e217614 - capella processRandaoMixesReset 3.0340 us/op 10.618 us/op 0.29
mainnet_e217614 - capella processHistoricalRootsUpdate 930.00 ns/op 821.00 ns/op 1.13
mainnet_e217614 - capella processParticipationFlagUpdates 1.8080 us/op 3.0270 us/op 0.60
mainnet_e217614 - capella afterProcessEpoch 101.47 ms/op 130.66 ms/op 0.78
phase0 processEpoch - mainnet_e58758 258.61 ms/op 425.67 ms/op 0.61
mainnet_e58758 - phase0 beforeProcessEpoch 55.682 ms/op 95.670 ms/op 0.58
mainnet_e58758 - phase0 processJustificationAndFinalization 12.207 us/op 25.494 us/op 0.48
mainnet_e58758 - phase0 processRewardsAndPenalties 19.216 ms/op 34.725 ms/op 0.55
mainnet_e58758 - phase0 processRegistryUpdates 6.5380 us/op 10.621 us/op 0.62
mainnet_e58758 - phase0 processSlashings 810.00 ns/op 880.00 ns/op 0.92
mainnet_e58758 - phase0 processEth1DataReset 767.00 ns/op 669.00 ns/op 1.15
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3350 ms/op 1.4517 ms/op 0.92
mainnet_e58758 - phase0 processSlashingsReset 2.4170 us/op 4.9270 us/op 0.49
mainnet_e58758 - phase0 processRandaoMixesReset 3.1480 us/op 7.2000 us/op 0.44
mainnet_e58758 - phase0 processHistoricalRootsUpdate 749.00 ns/op 886.00 ns/op 0.85
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.0540 us/op 8.4050 us/op 0.36
mainnet_e58758 - phase0 afterProcessEpoch 35.614 ms/op 47.766 ms/op 0.75
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6704 ms/op 1.9689 ms/op 0.85
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.2759 ms/op 3.3569 ms/op 0.38
altair processInactivityUpdates - 250000 normalcase 12.688 ms/op 27.119 ms/op 0.47
altair processInactivityUpdates - 250000 worstcase 12.373 ms/op 29.169 ms/op 0.42
phase0 processRegistryUpdates - 250000 normalcase 5.0340 us/op 13.109 us/op 0.38
phase0 processRegistryUpdates - 250000 badcase_full_deposits 287.57 us/op 426.16 us/op 0.67
phase0 processRegistryUpdates - 250000 worstcase 0.5 80.143 ms/op 148.98 ms/op 0.54
altair processRewardsAndPenalties - 250000 normalcase 39.134 ms/op 48.475 ms/op 0.81
altair processRewardsAndPenalties - 250000 worstcase 36.442 ms/op 44.644 ms/op 0.82
phase0 getAttestationDeltas - 250000 normalcase 5.8689 ms/op 12.142 ms/op 0.48
phase0 getAttestationDeltas - 250000 worstcase 5.4339 ms/op 8.3250 ms/op 0.65
phase0 processSlashings - 250000 worstcase 87.721 us/op 138.88 us/op 0.63
altair processSyncCommitteeUpdates - 250000 91.107 ms/op 179.98 ms/op 0.51
BeaconState.hashTreeRoot - No change 453.00 ns/op 285.00 ns/op 1.59
BeaconState.hashTreeRoot - 1 full validator 95.149 us/op 90.064 us/op 1.06
BeaconState.hashTreeRoot - 32 full validator 1.1148 ms/op 1.0397 ms/op 1.07
BeaconState.hashTreeRoot - 512 full validator 10.178 ms/op 18.436 ms/op 0.55
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 146.18 us/op 133.71 us/op 1.09
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6082 ms/op 1.7057 ms/op 0.94
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.662 ms/op 24.305 ms/op 0.85
BeaconState.hashTreeRoot - 1 balances 78.560 us/op 127.75 us/op 0.61
BeaconState.hashTreeRoot - 32 balances 617.92 us/op 1.1977 ms/op 0.52
BeaconState.hashTreeRoot - 512 balances 5.5261 ms/op 8.9187 ms/op 0.62
BeaconState.hashTreeRoot - 250000 balances 103.93 ms/op 212.50 ms/op 0.49
aggregationBits - 2048 els - zipIndexesInBitList 19.236 us/op 26.561 us/op 0.72
byteArrayEquals 32 47.860 ns/op 55.410 ns/op 0.86
Buffer.compare 32 15.497 ns/op 17.792 ns/op 0.87
byteArrayEquals 1024 1.2630 us/op 1.6210 us/op 0.78
Buffer.compare 1024 23.175 ns/op 25.268 ns/op 0.92
byteArrayEquals 16384 19.995 us/op 25.703 us/op 0.78
Buffer.compare 16384 206.34 ns/op 205.49 ns/op 1.00
byteArrayEquals 123687377 152.53 ms/op 200.74 ms/op 0.76
Buffer.compare 123687377 3.9018 ms/op 11.535 ms/op 0.34
byteArrayEquals 32 - diff last byte 47.183 ns/op 56.921 ns/op 0.83
Buffer.compare 32 - diff last byte 15.654 ns/op 19.337 ns/op 0.81
byteArrayEquals 1024 - diff last byte 1.2538 us/op 1.7320 us/op 0.72
Buffer.compare 1024 - diff last byte 24.871 ns/op 28.810 ns/op 0.86
byteArrayEquals 16384 - diff last byte 19.925 us/op 34.528 us/op 0.58
Buffer.compare 16384 - diff last byte 198.76 ns/op 205.61 ns/op 0.97
byteArrayEquals 123687377 - diff last byte 154.51 ms/op 199.76 ms/op 0.77
Buffer.compare 123687377 - diff last byte 4.4423 ms/op 7.4832 ms/op 0.59
byteArrayEquals 32 - random bytes 5.0390 ns/op 5.2660 ns/op 0.96
Buffer.compare 32 - random bytes 16.068 ns/op 18.018 ns/op 0.89
byteArrayEquals 1024 - random bytes 4.9740 ns/op 5.2880 ns/op 0.94
Buffer.compare 1024 - random bytes 15.739 ns/op 18.321 ns/op 0.86
byteArrayEquals 16384 - random bytes 4.9450 ns/op 5.3890 ns/op 0.92
Buffer.compare 16384 - random bytes 15.731 ns/op 17.641 ns/op 0.89
byteArrayEquals 123687377 - random bytes 7.8700 ns/op 6.4100 ns/op 1.23
Buffer.compare 123687377 - random bytes 18.700 ns/op 18.620 ns/op 1.00
regular array get 100000 times 31.075 us/op 33.206 us/op 0.94
wrappedArray get 100000 times 31.029 us/op 34.592 us/op 0.90
arrayWithProxy get 100000 times 9.7576 ms/op 13.296 ms/op 0.73
ssz.Root.equals 38.457 ns/op 45.809 ns/op 0.84
byteArrayEquals 41.195 ns/op 45.133 ns/op 0.91
Buffer.compare 8.6910 ns/op 10.370 ns/op 0.84
processSlot - 1 slots 11.474 us/op 16.238 us/op 0.71
processSlot - 32 slots 2.6375 ms/op 3.5330 ms/op 0.75
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.873 ms/op 37.363 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 1.7303 ms/op 2.1631 ms/op 0.80
getCommitteeAssignments - req 100 vs - 250000 vc 3.3988 ms/op 4.2044 ms/op 0.81
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6706 ms/op 4.4711 ms/op 0.82
findModifiedValidators - 10000 modified validators 211.97 ms/op 245.13 ms/op 0.86
findModifiedValidators - 1000 modified validators 132.58 ms/op 164.16 ms/op 0.81
findModifiedValidators - 100 modified validators 132.11 ms/op 168.27 ms/op 0.79
findModifiedValidators - 10 modified validators 126.10 ms/op 167.39 ms/op 0.75
findModifiedValidators - 1 modified validators 115.25 ms/op 166.54 ms/op 0.69
findModifiedValidators - no difference 151.71 ms/op 179.52 ms/op 0.85
compare ViewDUs 3.4063 s/op 3.4187 s/op 1.00
compare each validator Uint8Array 745.73 ms/op 1.5699 s/op 0.48
compare ViewDU to Uint8Array 760.12 ms/op 898.86 ms/op 0.85
migrate state 1000000 validators, 24 modified, 0 new 612.76 ms/op 785.48 ms/op 0.78
migrate state 1000000 validators, 1700 modified, 1000 new 818.67 ms/op 1.0177 s/op 0.80
migrate state 1000000 validators, 3400 modified, 2000 new 854.43 ms/op 1.2656 s/op 0.68
migrate state 1500000 validators, 24 modified, 0 new 625.93 ms/op 819.88 ms/op 0.76
migrate state 1500000 validators, 1700 modified, 1000 new 949.59 ms/op 1.0578 s/op 0.90
migrate state 1500000 validators, 3400 modified, 2000 new 1.0951 s/op 1.2772 s/op 0.86
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.9200 ns/op 4.3900 ns/op 1.35
state getBlockRootAtSlot - 250000 vs - 7PWei 375.42 ns/op 626.35 ns/op 0.60
computeProposers - vc 250000 6.5607 ms/op 8.0347 ms/op 0.82
computeEpochShuffling - vc 250000 35.201 ms/op 41.148 ms/op 0.86
getNextSyncCommittee - vc 250000 106.81 ms/op 134.93 ms/op 0.79
computeSigningRoot for AttestationData 26.009 us/op 29.662 us/op 0.88
hash AttestationData serialized data then Buffer.toString(base64) 1.1678 us/op 1.5300 us/op 0.76
toHexString serialized data 766.50 ns/op 851.41 ns/op 0.90
Buffer.toString(base64) 119.86 ns/op 165.91 ns/op 0.72
nodejs block root to RootHex using toHex 114.95 ns/op 148.43 ns/op 0.77
nodejs block root to RootHex using toRootHex 75.682 ns/op 90.814 ns/op 0.83
browser block root to RootHex using the deprecated toHexString 204.11 ns/op 224.02 ns/op 0.91
browser block root to RootHex using toHex 165.33 ns/op 178.85 ns/op 0.92
browser block root to RootHex using toRootHex 233.13 ns/op 158.75 ns/op 1.47

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