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

fix: move server api method invocation out of try-catch for parsing #6890

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jun 17, 2024

Motivation

Noticed method invocation calls are part of try-catch for parsing, in the case the server throws any non-ApiError it would still result in a 400 response which is not desired as this status code would indicate a client issue while if we throw Error on the server it indicates some internal issue and should be a 500 response.

This also simplifies the server handler a bit and better separates parsing from method invocation.

Description

Move server api method invocation out of try-catch for parsing

@nflaig nflaig requested a review from a team as a code owner June 17, 2024 12:33
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 73.17073% with 11 lines in your changes missing coverage. Please review.

Project coverage is 62.75%. Comparing base (f29a6db) to head (cce03cd).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6890      +/-   ##
============================================
- Coverage     62.75%   62.75%   -0.01%     
============================================
  Files           578      578              
  Lines         61347    61344       -3     
  Branches       2114     2116       +2     
============================================
- Hits          38498    38495       -3     
  Misses        22811    22811              
  Partials         38       38              

Copy link
Contributor

github-actions bot commented Jun 17, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 720c237 Previous: f37e50f Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 696.50 us/op 935.19 us/op 0.74
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 82.138 us/op 75.018 us/op 1.09
BLS verify - blst-native 1.2943 ms/op 1.3242 ms/op 0.98
BLS verifyMultipleSignatures 3 - blst-native 2.7595 ms/op 2.8662 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst-native 6.0035 ms/op 6.2540 ms/op 0.96
BLS verifyMultipleSignatures 32 - blst-native 22.849 ms/op 22.723 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst-native 43.486 ms/op 46.564 ms/op 0.93
BLS verifyMultipleSignatures 128 - blst-native 102.29 ms/op 93.196 ms/op 1.10
BLS deserializing 10000 signatures 911.40 ms/op 984.19 ms/op 0.93
BLS deserializing 100000 signatures 10.052 s/op 10.164 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2753 ms/op 1.4347 ms/op 0.89
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5112 ms/op 1.7791 ms/op 0.85
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2537 ms/op 2.9663 ms/op 0.76
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3159 ms/op 4.0338 ms/op 0.82
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.3977 ms/op 7.5617 ms/op 0.85
BLS aggregatePubkeys 32 - blst-native 26.039 us/op 28.784 us/op 0.90
BLS aggregatePubkeys 128 - blst-native 98.378 us/op 108.01 us/op 0.91
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 72.359 ms/op 94.486 ms/op 0.77
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 56.306 ms/op 76.690 ms/op 0.73
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 33.424 ms/op 43.001 ms/op 0.78
getSlashingsAndExits - default max 117.94 us/op 213.83 us/op 0.55
getSlashingsAndExits - 2k 334.93 us/op 475.00 us/op 0.71
proposeBlockBody type=full, size=empty 6.1253 ms/op 8.2561 ms/op 0.74
isKnown best case - 1 super set check 601.00 ns/op 889.00 ns/op 0.68
isKnown normal case - 2 super set checks 566.00 ns/op 943.00 ns/op 0.60
isKnown worse case - 16 super set checks 557.00 ns/op 863.00 ns/op 0.65
InMemoryCheckpointStateCache - add get delete 6.1880 us/op 7.1940 us/op 0.86
validate api signedAggregateAndProof - struct 2.6714 ms/op 3.1604 ms/op 0.85
validate gossip signedAggregateAndProof - struct 2.6749 ms/op 3.0473 ms/op 0.88
validate gossip attestation - vc 640000 1.2638 ms/op 1.5333 ms/op 0.82
batch validate gossip attestation - vc 640000 - chunk 32 148.83 us/op 194.35 us/op 0.77
batch validate gossip attestation - vc 640000 - chunk 64 131.16 us/op 156.96 us/op 0.84
batch validate gossip attestation - vc 640000 - chunk 128 122.40 us/op 149.87 us/op 0.82
batch validate gossip attestation - vc 640000 - chunk 256 116.24 us/op 150.60 us/op 0.77
pickEth1Vote - no votes 1.0524 ms/op 1.2908 ms/op 0.82
pickEth1Vote - max votes 7.2346 ms/op 11.580 ms/op 0.62
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.700 ms/op 16.975 ms/op 0.87
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.342 ms/op 25.875 ms/op 0.67
pickEth1Vote - Eth1Data fastSerialize value x2048 509.31 us/op 642.48 us/op 0.79
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.4190 ms/op 5.3289 ms/op 1.20
bytes32 toHexString 447.00 ns/op 705.00 ns/op 0.63
bytes32 Buffer.toString(hex) 238.00 ns/op 295.00 ns/op 0.81
bytes32 Buffer.toString(hex) from Uint8Array 354.00 ns/op 502.00 ns/op 0.71
bytes32 Buffer.toString(hex) + 0x 246.00 ns/op 291.00 ns/op 0.85
Object access 1 prop 0.15400 ns/op 0.20100 ns/op 0.77
Map access 1 prop 0.12600 ns/op 0.16000 ns/op 0.79
Object get x1000 5.7600 ns/op 6.8240 ns/op 0.84
Map get x1000 6.3660 ns/op 7.4650 ns/op 0.85
Object set x1000 35.650 ns/op 59.981 ns/op 0.59
Map set x1000 22.903 ns/op 40.271 ns/op 0.57
Return object 10000 times 0.29510 ns/op 0.34060 ns/op 0.87
Throw Error 10000 times 3.3835 us/op 4.0613 us/op 0.83
fastMsgIdFn sha256 / 200 bytes 2.1710 us/op 2.4270 us/op 0.89
fastMsgIdFn h32 xxhash / 200 bytes 232.00 ns/op 342.00 ns/op 0.68
fastMsgIdFn h64 xxhash / 200 bytes 272.00 ns/op 319.00 ns/op 0.85
fastMsgIdFn sha256 / 1000 bytes 7.1200 us/op 8.1040 us/op 0.88
fastMsgIdFn h32 xxhash / 1000 bytes 360.00 ns/op 469.00 ns/op 0.77
fastMsgIdFn h64 xxhash / 1000 bytes 344.00 ns/op 387.00 ns/op 0.89
fastMsgIdFn sha256 / 10000 bytes 63.026 us/op 70.556 us/op 0.89
fastMsgIdFn h32 xxhash / 10000 bytes 1.8220 us/op 2.1040 us/op 0.87
fastMsgIdFn h64 xxhash / 10000 bytes 1.2080 us/op 1.3410 us/op 0.90
send data - 1000 256B messages 12.492 ms/op 15.474 ms/op 0.81
send data - 1000 512B messages 18.015 ms/op 20.113 ms/op 0.90
send data - 1000 1024B messages 25.893 ms/op 27.707 ms/op 0.93
send data - 1000 1200B messages 19.084 ms/op 28.918 ms/op 0.66
send data - 1000 2048B messages 32.921 ms/op 35.026 ms/op 0.94
send data - 1000 4096B messages 31.685 ms/op 36.592 ms/op 0.87
send data - 1000 16384B messages 71.181 ms/op 79.416 ms/op 0.90
send data - 1000 65536B messages 202.03 ms/op 260.79 ms/op 0.77
enrSubnets - fastDeserialize 64 bits 1.1480 us/op 1.4750 us/op 0.78
enrSubnets - ssz BitVector 64 bits 360.00 ns/op 470.00 ns/op 0.77
enrSubnets - fastDeserialize 4 bits 150.00 ns/op 223.00 ns/op 0.67
enrSubnets - ssz BitVector 4 bits 348.00 ns/op 448.00 ns/op 0.78
prioritizePeers score -10:0 att 32-0.1 sync 2-0 142.75 us/op 171.12 us/op 0.83
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 168.27 us/op 185.23 us/op 0.91
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 250.95 us/op 375.65 us/op 0.67
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 386.33 us/op 499.85 us/op 0.77
prioritizePeers score 0:0 att 64-1 sync 4-1 850.79 us/op 833.57 us/op 1.02
array of 16000 items push then shift 1.6713 us/op 1.7639 us/op 0.95
LinkedList of 16000 items push then shift 7.6350 ns/op 8.4020 ns/op 0.91
array of 16000 items push then pop 137.42 ns/op 142.17 ns/op 0.97
LinkedList of 16000 items push then pop 7.4140 ns/op 7.9120 ns/op 0.94
array of 24000 items push then shift 2.4058 us/op 2.5975 us/op 0.93
LinkedList of 24000 items push then shift 7.2930 ns/op 7.9050 ns/op 0.92
array of 24000 items push then pop 161.74 ns/op 188.25 ns/op 0.86
LinkedList of 24000 items push then pop 7.2190 ns/op 7.7800 ns/op 0.93
intersect bitArray bitLen 8 6.4270 ns/op 7.1350 ns/op 0.90
intersect array and set length 8 49.180 ns/op 55.600 ns/op 0.88
intersect bitArray bitLen 128 30.390 ns/op 32.227 ns/op 0.94
intersect array and set length 128 699.24 ns/op 855.71 ns/op 0.82
bitArray.getTrueBitIndexes() bitLen 128 2.0470 us/op 2.5660 us/op 0.80
bitArray.getTrueBitIndexes() bitLen 248 3.1170 us/op 4.3570 us/op 0.72
bitArray.getTrueBitIndexes() bitLen 512 7.1830 us/op 10.622 us/op 0.68
Buffer.concat 32 items 891.00 ns/op 1.1430 us/op 0.78
Uint8Array.set 32 items 1.3160 us/op 2.4490 us/op 0.54
Buffer.copy 1.4880 us/op 2.7660 us/op 0.54
Uint8Array.set - with subarray 2.6400 us/op 4.2830 us/op 0.62
Uint8Array.set - without subarray 1.6190 us/op 2.4570 us/op 0.66
Set add up to 64 items then delete first 2.2387 us/op 3.0651 us/op 0.73
OrderedSet add up to 64 items then delete first 3.2956 us/op 3.9120 us/op 0.84
Set add up to 64 items then delete last 2.5422 us/op 3.0198 us/op 0.84
OrderedSet add up to 64 items then delete last 3.9024 us/op 5.0422 us/op 0.77
Set add up to 64 items then delete middle 2.5101 us/op 3.1271 us/op 0.80
OrderedSet add up to 64 items then delete middle 5.4908 us/op 6.5077 us/op 0.84
Set add up to 128 items then delete first 5.2503 us/op 6.3505 us/op 0.83
OrderedSet add up to 128 items then delete first 7.3402 us/op 9.2761 us/op 0.79
Set add up to 128 items then delete last 4.9319 us/op 6.9510 us/op 0.71
OrderedSet add up to 128 items then delete last 7.5969 us/op 10.349 us/op 0.73
Set add up to 128 items then delete middle 4.8012 us/op 7.1654 us/op 0.67
OrderedSet add up to 128 items then delete middle 13.461 us/op 16.855 us/op 0.80
Set add up to 256 items then delete first 10.327 us/op 13.616 us/op 0.76
OrderedSet add up to 256 items then delete first 14.893 us/op 18.424 us/op 0.81
Set add up to 256 items then delete last 9.7379 us/op 12.841 us/op 0.76
OrderedSet add up to 256 items then delete last 15.994 us/op 18.819 us/op 0.85
Set add up to 256 items then delete middle 9.6660 us/op 12.536 us/op 0.77
OrderedSet add up to 256 items then delete middle 40.202 us/op 45.839 us/op 0.88
transfer serialized Status (84 B) 1.3600 us/op 1.5960 us/op 0.85
copy serialized Status (84 B) 1.0830 us/op 1.3820 us/op 0.78
transfer serialized SignedVoluntaryExit (112 B) 1.4630 us/op 1.7600 us/op 0.83
copy serialized SignedVoluntaryExit (112 B) 1.1220 us/op 1.4870 us/op 0.75
transfer serialized ProposerSlashing (416 B) 1.5650 us/op 2.5710 us/op 0.61
copy serialized ProposerSlashing (416 B) 1.4320 us/op 2.5830 us/op 0.55
transfer serialized Attestation (485 B) 1.5650 us/op 2.0250 us/op 0.77
copy serialized Attestation (485 B) 1.3780 us/op 2.0930 us/op 0.66
transfer serialized AttesterSlashing (33232 B) 1.8320 us/op 2.6180 us/op 0.70
copy serialized AttesterSlashing (33232 B) 4.4810 us/op 7.8560 us/op 0.57
transfer serialized Small SignedBeaconBlock (128000 B) 2.5450 us/op 2.9480 us/op 0.86
copy serialized Small SignedBeaconBlock (128000 B) 14.283 us/op 20.067 us/op 0.71
transfer serialized Avg SignedBeaconBlock (200000 B) 3.0350 us/op 3.1420 us/op 0.97
copy serialized Avg SignedBeaconBlock (200000 B) 20.668 us/op 26.979 us/op 0.77
transfer serialized BlobsSidecar (524380 B) 2.9240 us/op 3.8530 us/op 0.76
copy serialized BlobsSidecar (524380 B) 84.457 us/op 93.550 us/op 0.90
transfer serialized Big SignedBeaconBlock (1000000 B) 2.8850 us/op 3.6750 us/op 0.79
copy serialized Big SignedBeaconBlock (1000000 B) 145.31 us/op 174.92 us/op 0.83
pass gossip attestations to forkchoice per slot 3.2259 ms/op 4.3228 ms/op 0.75
forkChoice updateHead vc 100000 bc 64 eq 0 502.18 us/op 552.69 us/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 0 3.3897 ms/op 3.6831 ms/op 0.92
forkChoice updateHead vc 1000000 bc 64 eq 0 5.3776 ms/op 5.8986 ms/op 0.91
forkChoice updateHead vc 600000 bc 320 eq 0 3.1389 ms/op 3.5521 ms/op 0.88
forkChoice updateHead vc 600000 bc 1200 eq 0 3.1941 ms/op 3.7376 ms/op 0.85
forkChoice updateHead vc 600000 bc 7200 eq 0 3.9245 ms/op 5.1100 ms/op 0.77
forkChoice updateHead vc 600000 bc 64 eq 1000 11.051 ms/op 11.996 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 10000 10.801 ms/op 12.049 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 300000 15.504 ms/op 26.092 ms/op 0.59
computeDeltas 500000 validators 300 proto nodes 3.7813 ms/op 4.4642 ms/op 0.85
computeDeltas 500000 validators 1200 proto nodes 4.0653 ms/op 4.7340 ms/op 0.86
computeDeltas 500000 validators 7200 proto nodes 4.4885 ms/op 4.7066 ms/op 0.95
computeDeltas 750000 validators 300 proto nodes 6.2410 ms/op 7.0706 ms/op 0.88
computeDeltas 750000 validators 1200 proto nodes 7.2534 ms/op 6.9498 ms/op 1.04
computeDeltas 750000 validators 7200 proto nodes 7.9103 ms/op 6.6924 ms/op 1.18
computeDeltas 1400000 validators 300 proto nodes 10.921 ms/op 11.794 ms/op 0.93
computeDeltas 1400000 validators 1200 proto nodes 11.245 ms/op 12.814 ms/op 0.88
computeDeltas 1400000 validators 7200 proto nodes 11.397 ms/op 12.644 ms/op 0.90
computeDeltas 2100000 validators 300 proto nodes 17.183 ms/op 18.243 ms/op 0.94
computeDeltas 2100000 validators 1200 proto nodes 17.015 ms/op 17.998 ms/op 0.95
computeDeltas 2100000 validators 7200 proto nodes 18.354 ms/op 17.043 ms/op 1.08
altair processAttestation - 250000 vs - 7PWei normalcase 3.7783 ms/op 1.9023 ms/op 1.99
altair processAttestation - 250000 vs - 7PWei worstcase 4.3250 ms/op 2.9886 ms/op 1.45
altair processAttestation - setStatus - 1/6 committees join 137.26 us/op 107.31 us/op 1.28
altair processAttestation - setStatus - 1/3 committees join 261.16 us/op 206.95 us/op 1.26
altair processAttestation - setStatus - 1/2 committees join 285.12 us/op 296.64 us/op 0.96
altair processAttestation - setStatus - 2/3 committees join 408.70 us/op 363.44 us/op 1.12
altair processAttestation - setStatus - 4/5 committees join 615.27 us/op 522.69 us/op 1.18
altair processAttestation - setStatus - 100% committees join 704.65 us/op 639.97 us/op 1.10
altair processBlock - 250000 vs - 7PWei normalcase 6.2605 ms/op 4.8364 ms/op 1.29
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.568 ms/op 25.969 ms/op 1.25
altair processBlock - 250000 vs - 7PWei worstcase 44.769 ms/op 44.672 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase hashState 106.41 ms/op 86.142 ms/op 1.24
phase0 processBlock - 250000 vs - 7PWei normalcase 2.8544 ms/op 2.3151 ms/op 1.23
phase0 processBlock - 250000 vs - 7PWei worstcase 32.696 ms/op 33.470 ms/op 0.98
altair processEth1Data - 250000 vs - 7PWei normalcase 607.46 us/op 380.85 us/op 1.60
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.2450 us/op 6.3780 us/op 1.29
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 44.491 us/op 26.047 us/op 1.71
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 14.522 us/op 9.1580 us/op 1.59
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 12.469 us/op 8.0830 us/op 1.54
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 131.08 us/op 116.38 us/op 1.13
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 853.89 us/op 891.75 us/op 0.96
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0114 ms/op 1.0329 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 944.29 us/op 1.1960 ms/op 0.79
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8257 ms/op 2.5952 ms/op 1.47
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.8721 ms/op 1.9779 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.3456 ms/op 3.9840 ms/op 1.34
Tree 40 250000 create 374.66 ms/op 247.19 ms/op 1.52
Tree 40 250000 get(125000) 166.79 ns/op 165.49 ns/op 1.01
Tree 40 250000 set(125000) 958.54 ns/op 715.58 ns/op 1.34
Tree 40 250000 toArray() 22.443 ms/op 17.925 ms/op 1.25
Tree 40 250000 iterate all - toArray() + loop 22.707 ms/op 17.789 ms/op 1.28
Tree 40 250000 iterate all - get(i) 61.457 ms/op 56.845 ms/op 1.08
MutableVector 250000 create 11.410 ms/op 9.7648 ms/op 1.17
MutableVector 250000 get(125000) 6.1590 ns/op 6.3220 ns/op 0.97
MutableVector 250000 set(125000) 240.02 ns/op 210.45 ns/op 1.14
MutableVector 250000 toArray() 4.8021 ms/op 3.7321 ms/op 1.29
MutableVector 250000 iterate all - toArray() + loop 5.6954 ms/op 3.9883 ms/op 1.43
MutableVector 250000 iterate all - get(i) 1.7318 ms/op 1.7620 ms/op 0.98
Array 250000 create 4.4096 ms/op 3.6402 ms/op 1.21
Array 250000 clone - spread 1.7550 ms/op 1.5348 ms/op 1.14
Array 250000 get(125000) 0.44100 ns/op 0.44500 ns/op 0.99
Array 250000 set(125000) 0.46900 ns/op 0.46400 ns/op 1.01
Array 250000 iterate all - loop 88.872 us/op 96.782 us/op 0.92
effectiveBalanceIncrements clone Uint8Array 300000 68.895 us/op 40.676 us/op 1.69
effectiveBalanceIncrements clone MutableVector 300000 134.00 ns/op 136.00 ns/op 0.99
effectiveBalanceIncrements rw all Uint8Array 300000 201.18 us/op 202.69 us/op 0.99
effectiveBalanceIncrements rw all MutableVector 300000 89.166 ms/op 63.801 ms/op 1.40
phase0 afterProcessEpoch - 250000 vs - 7PWei 91.687 ms/op 94.010 ms/op 0.98
phase0 beforeProcessEpoch - 250000 vs - 7PWei 52.420 ms/op 47.065 ms/op 1.11
altair processEpoch - mainnet_e81889 512.57 ms/op 406.99 ms/op 1.26
mainnet_e81889 - altair beforeProcessEpoch 126.55 ms/op 71.526 ms/op 1.77
mainnet_e81889 - altair processJustificationAndFinalization 29.161 us/op 20.334 us/op 1.43
mainnet_e81889 - altair processInactivityUpdates 12.400 ms/op 6.9004 ms/op 1.80
mainnet_e81889 - altair processRewardsAndPenalties 58.184 ms/op 49.519 ms/op 1.17
mainnet_e81889 - altair processRegistryUpdates 5.7150 us/op 3.0540 us/op 1.87
mainnet_e81889 - altair processSlashings 940.00 ns/op 510.00 ns/op 1.84
mainnet_e81889 - altair processEth1DataReset 580.00 ns/op 499.00 ns/op 1.16
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7150 ms/op 1.4482 ms/op 1.18
mainnet_e81889 - altair processSlashingsReset 7.1560 us/op 3.8750 us/op 1.85
mainnet_e81889 - altair processRandaoMixesReset 8.8460 us/op 4.4940 us/op 1.97
mainnet_e81889 - altair processHistoricalRootsUpdate 1.2280 us/op 535.00 ns/op 2.30
mainnet_e81889 - altair processParticipationFlagUpdates 6.4080 us/op 3.1410 us/op 2.04
mainnet_e81889 - altair processSyncCommitteeUpdates 1.1430 us/op 527.00 ns/op 2.17
mainnet_e81889 - altair afterProcessEpoch 100.51 ms/op 103.14 ms/op 0.97
capella processEpoch - mainnet_e217614 1.5498 s/op 1.5957 s/op 0.97
mainnet_e217614 - capella beforeProcessEpoch 329.60 ms/op 308.29 ms/op 1.07
mainnet_e217614 - capella processJustificationAndFinalization 30.291 us/op 17.223 us/op 1.76
mainnet_e217614 - capella processInactivityUpdates 21.044 ms/op 20.738 ms/op 1.01
mainnet_e217614 - capella processRewardsAndPenalties 288.76 ms/op 263.60 ms/op 1.10
mainnet_e217614 - capella processRegistryUpdates 17.835 us/op 18.674 us/op 0.96
mainnet_e217614 - capella processSlashings 550.00 ns/op 635.00 ns/op 0.87
mainnet_e217614 - capella processEth1DataReset 1.6510 us/op 1.2410 us/op 1.33
mainnet_e217614 - capella processEffectiveBalanceUpdates 17.988 ms/op 5.5554 ms/op 3.24
mainnet_e217614 - capella processSlashingsReset 6.2530 us/op 5.3760 us/op 1.16
mainnet_e217614 - capella processRandaoMixesReset 7.4240 us/op 5.4220 us/op 1.37
mainnet_e217614 - capella processHistoricalRootsUpdate 694.00 ns/op 710.00 ns/op 0.98
mainnet_e217614 - capella processParticipationFlagUpdates 2.3830 us/op 2.3720 us/op 1.00
mainnet_e217614 - capella afterProcessEpoch 306.88 ms/op 311.20 ms/op 0.99
phase0 processEpoch - mainnet_e58758 500.29 ms/op 446.74 ms/op 1.12
mainnet_e58758 - phase0 beforeProcessEpoch 174.67 ms/op 115.94 ms/op 1.51
mainnet_e58758 - phase0 processJustificationAndFinalization 32.994 us/op 21.102 us/op 1.56
mainnet_e58758 - phase0 processRewardsAndPenalties 39.468 ms/op 40.966 ms/op 0.96
mainnet_e58758 - phase0 processRegistryUpdates 17.568 us/op 9.3390 us/op 1.88
mainnet_e58758 - phase0 processSlashings 1.4580 us/op 404.00 ns/op 3.61
mainnet_e58758 - phase0 processEth1DataReset 893.00 ns/op 423.00 ns/op 2.11
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.8492 ms/op 1.2609 ms/op 1.47
mainnet_e58758 - phase0 processSlashingsReset 7.8600 us/op 4.8910 us/op 1.61
mainnet_e58758 - phase0 processRandaoMixesReset 10.429 us/op 6.1590 us/op 1.69
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.1340 us/op 447.00 ns/op 2.54
mainnet_e58758 - phase0 processParticipationRecordUpdates 8.9810 us/op 3.2560 us/op 2.76
mainnet_e58758 - phase0 afterProcessEpoch 111.91 ms/op 83.647 ms/op 1.34
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4615 ms/op 1.5414 ms/op 1.60
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 5.9072 ms/op 2.3453 ms/op 2.52
altair processInactivityUpdates - 250000 normalcase 27.534 ms/op 20.864 ms/op 1.32
altair processInactivityUpdates - 250000 worstcase 26.038 ms/op 22.420 ms/op 1.16
phase0 processRegistryUpdates - 250000 normalcase 15.142 us/op 7.9640 us/op 1.90
phase0 processRegistryUpdates - 250000 badcase_full_deposits 420.69 us/op 325.11 us/op 1.29
phase0 processRegistryUpdates - 250000 worstcase 0.5 160.81 ms/op 122.92 ms/op 1.31
altair processRewardsAndPenalties - 250000 normalcase 52.132 ms/op 42.781 ms/op 1.22
altair processRewardsAndPenalties - 250000 worstcase 62.956 ms/op 49.137 ms/op 1.28
phase0 getAttestationDeltas - 250000 normalcase 10.254 ms/op 7.8760 ms/op 1.30
phase0 getAttestationDeltas - 250000 worstcase 15.309 ms/op 8.6937 ms/op 1.76
phase0 processSlashings - 250000 worstcase 145.24 us/op 104.97 us/op 1.38
altair processSyncCommitteeUpdates - 250000 173.10 ms/op 128.87 ms/op 1.34
BeaconState.hashTreeRoot - No change 689.00 ns/op 304.00 ns/op 2.27
BeaconState.hashTreeRoot - 1 full validator 171.65 us/op 106.89 us/op 1.61
BeaconState.hashTreeRoot - 32 full validator 1.5851 ms/op 1.5973 ms/op 0.99
BeaconState.hashTreeRoot - 512 full validator 18.654 ms/op 14.429 ms/op 1.29
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 198.47 us/op 156.59 us/op 1.27
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5878 ms/op 2.2244 ms/op 1.16
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 35.647 ms/op 24.371 ms/op 1.46
BeaconState.hashTreeRoot - 1 balances 144.96 us/op 110.24 us/op 1.31
BeaconState.hashTreeRoot - 32 balances 1.4417 ms/op 1.3905 ms/op 1.04
BeaconState.hashTreeRoot - 512 balances 15.053 ms/op 13.120 ms/op 1.15
BeaconState.hashTreeRoot - 250000 balances 271.20 ms/op 216.16 ms/op 1.25
aggregationBits - 2048 els - zipIndexesInBitList 54.962 us/op 33.208 us/op 1.66
byteArrayEquals 32 60.017 ns/op 55.638 ns/op 1.08
Buffer.compare 32 64.906 ns/op 47.129 ns/op 1.38
byteArrayEquals 1024 1.7188 us/op 1.6463 us/op 1.04
Buffer.compare 1024 76.167 ns/op 54.729 ns/op 1.39
byteArrayEquals 16384 27.847 us/op 26.112 us/op 1.07
Buffer.compare 16384 304.24 ns/op 255.50 ns/op 1.19
byteArrayEquals 123687377 203.77 ms/op 208.39 ms/op 0.98
Buffer.compare 123687377 13.190 ms/op 10.315 ms/op 1.28
byteArrayEquals 32 - diff last byte 56.611 ns/op 57.818 ns/op 0.98
Buffer.compare 32 - diff last byte 49.517 ns/op 52.631 ns/op 0.94
byteArrayEquals 1024 - diff last byte 1.6945 us/op 1.7339 us/op 0.98
Buffer.compare 1024 - diff last byte 56.283 ns/op 61.560 ns/op 0.91
byteArrayEquals 16384 - diff last byte 25.760 us/op 27.545 us/op 0.94
Buffer.compare 16384 - diff last byte 244.57 ns/op 269.01 ns/op 0.91
byteArrayEquals 123687377 - diff last byte 212.75 ms/op 205.76 ms/op 1.03
Buffer.compare 123687377 - diff last byte 18.520 ms/op 8.3503 ms/op 2.22
byteArrayEquals 32 - random bytes 6.5420 ns/op 5.6130 ns/op 1.17
Buffer.compare 32 - random bytes 66.238 ns/op 51.918 ns/op 1.28
byteArrayEquals 1024 - random bytes 6.7090 ns/op 5.6650 ns/op 1.18
Buffer.compare 1024 - random bytes 65.806 ns/op 48.823 ns/op 1.35
byteArrayEquals 16384 - random bytes 6.6340 ns/op 5.4930 ns/op 1.21
Buffer.compare 16384 - random bytes 64.135 ns/op 48.347 ns/op 1.33
byteArrayEquals 123687377 - random bytes 10.660 ns/op 6.9700 ns/op 1.53
Buffer.compare 123687377 - random bytes 64.850 ns/op 50.100 ns/op 1.29
regular array get 100000 times 36.349 us/op 34.988 us/op 1.04
wrappedArray get 100000 times 36.868 us/op 35.217 us/op 1.05
arrayWithProxy get 100000 times 16.301 ms/op 13.684 ms/op 1.19
ssz.Root.equals 50.622 ns/op 48.840 ns/op 1.04
byteArrayEquals 49.809 ns/op 49.143 ns/op 1.01
Buffer.compare 15.340 ns/op 11.534 ns/op 1.33
shuffle list - 16384 els 8.0752 ms/op 7.1120 ms/op 1.14
shuffle list - 250000 els 117.64 ms/op 104.50 ms/op 1.13
processSlot - 1 slots 22.534 us/op 16.236 us/op 1.39
processSlot - 32 slots 3.7770 ms/op 3.7256 ms/op 1.01
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 53.271 ms/op 41.232 ms/op 1.29
getCommitteeAssignments - req 1 vs - 250000 vc 2.4356 ms/op 2.4224 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 4.3435 ms/op 4.6750 ms/op 0.93
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6859 ms/op 5.1554 ms/op 0.91
findModifiedValidators - 10000 modified validators 566.54 ms/op 322.03 ms/op 1.76
findModifiedValidators - 1000 modified validators 355.43 ms/op 209.47 ms/op 1.70
findModifiedValidators - 100 modified validators 356.12 ms/op 194.96 ms/op 1.83
findModifiedValidators - 10 modified validators 318.19 ms/op 225.04 ms/op 1.41
findModifiedValidators - 1 modified validators 348.69 ms/op 206.22 ms/op 1.69
findModifiedValidators - no difference 325.00 ms/op 200.62 ms/op 1.62
compare ViewDUs 4.4838 s/op 3.3137 s/op 1.35
compare each validator Uint8Array 2.0856 s/op 1.4556 s/op 1.43
compare ViewDU to Uint8Array 1.6937 s/op 1.4147 s/op 1.20
migrate state 1000000 validators, 24 modified, 0 new 823.97 ms/op 782.01 ms/op 1.05
migrate state 1000000 validators, 1700 modified, 1000 new 1.0891 s/op 1.1296 s/op 0.96
migrate state 1000000 validators, 3400 modified, 2000 new 1.3631 s/op 1.3834 s/op 0.99
migrate state 1500000 validators, 24 modified, 0 new 755.64 ms/op 843.31 ms/op 0.90
migrate state 1500000 validators, 1700 modified, 1000 new 932.39 ms/op 1.2338 s/op 0.76
migrate state 1500000 validators, 3400 modified, 2000 new 1.0818 s/op 1.5087 s/op 0.72
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5100 ns/op 5.9500 ns/op 0.76
state getBlockRootAtSlot - 250000 vs - 7PWei 591.81 ns/op 780.28 ns/op 0.76
computeProposers - vc 250000 7.0010 ms/op 12.413 ms/op 0.56
computeEpochShuffling - vc 250000 93.032 ms/op 117.84 ms/op 0.79
getNextSyncCommittee - vc 250000 139.50 ms/op 177.98 ms/op 0.78
computeSigningRoot for AttestationData 22.405 us/op 34.210 us/op 0.65
hash AttestationData serialized data then Buffer.toString(base64) 1.5197 us/op 2.0111 us/op 0.76
toHexString serialized data 886.75 ns/op 1.6255 us/op 0.55
Buffer.toString(base64) 206.13 ns/op 259.92 ns/op 0.79

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 0c5adec into unstable Jun 20, 2024
20 checks passed
@wemeetagain wemeetagain deleted the nflaig/update-server-handler branch June 20, 2024 17:53
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.20.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