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: clean up workaround in ssz content type parser #6926

Closed
wants to merge 2 commits into from

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jul 1, 2024

Motivation

Workaround in ssz content type parser is quite hacky and triggers a deprecation warning if a request with ssz body is sent for the first time.

Description

Clean up workaround in ssz content type parser

Depends on fastify/fastify#5545 which if not back ported to v4 requires us to upgrade to fastify v5

@nflaig nflaig requested a review from a team as a code owner July 1, 2024 13:33
@nflaig nflaig marked this pull request as draft July 1, 2024 13:33
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.52%. Comparing base (e6c559f) to head (e8b12ec).
Report is 191 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6926      +/-   ##
============================================
- Coverage     62.52%   62.52%   -0.01%     
============================================
  Files           575      575              
  Lines         60985    60983       -2     
  Branches       2125     2125              
============================================
- Hits          38130    38128       -2     
  Misses        22816    22816              
  Partials         39       39              

Copy link
Contributor

github-actions bot commented Jul 1, 2024

⚠️ 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: 6d94510 Previous: e6c559f Ratio
Object access 1 prop 0.36400 ns/op 0.11200 ns/op 3.25
Map access 1 prop 0.33100 ns/op 0.10700 ns/op 3.09
enrSubnets - fastDeserialize 4 bits 403.00 ns/op 121.00 ns/op 3.33
BeaconState.hashTreeRoot - No change 741.00 ns/op 217.00 ns/op 3.41
Full benchmark results
Benchmark suite Current: 6d94510 Previous: e6c559f Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 714.93 us/op 680.59 us/op 1.05
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 62.880 us/op 37.482 us/op 1.68
BLS verify - blst-native 1.1301 ms/op 1.0529 ms/op 1.07
BLS verifyMultipleSignatures 3 - blst-native 2.4098 ms/op 2.2441 ms/op 1.07
BLS verifyMultipleSignatures 8 - blst-native 5.3416 ms/op 4.9718 ms/op 1.07
BLS verifyMultipleSignatures 32 - blst-native 19.495 ms/op 18.278 ms/op 1.07
BLS verifyMultipleSignatures 64 - blst-native 38.349 ms/op 36.012 ms/op 1.06
BLS verifyMultipleSignatures 128 - blst-native 77.172 ms/op 71.514 ms/op 1.08
BLS deserializing 10000 signatures 821.04 ms/op 760.79 ms/op 1.08
BLS deserializing 100000 signatures 7.9830 s/op 7.5924 s/op 1.05
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1624 ms/op 1.0994 ms/op 1.06
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2962 ms/op 1.2495 ms/op 1.04
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.0313 ms/op 2.0526 ms/op 0.99
BLS verifyMultipleSignatures - same message - 64 - blst-native 2.9930 ms/op 3.2425 ms/op 0.92
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.1439 ms/op 5.3955 ms/op 1.14
BLS aggregatePubkeys 32 - blst-native 23.511 us/op 22.102 us/op 1.06
BLS aggregatePubkeys 128 - blst-native 89.111 us/op 82.664 us/op 1.08
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 64.669 ms/op 57.600 ms/op 1.12
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 54.641 ms/op 41.358 ms/op 1.32
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 30.796 ms/op 28.982 ms/op 1.06
getSlashingsAndExits - default max 103.60 us/op 69.462 us/op 1.49
getSlashingsAndExits - 2k 285.27 us/op 229.50 us/op 1.24
proposeBlockBody type=full, size=empty 5.0041 ms/op 5.0027 ms/op 1.00
isKnown best case - 1 super set check 595.00 ns/op 225.00 ns/op 2.64
isKnown normal case - 2 super set checks 518.00 ns/op 221.00 ns/op 2.34
isKnown worse case - 16 super set checks 642.00 ns/op 223.00 ns/op 2.88
InMemoryCheckpointStateCache - add get delete 6.6160 us/op 3.6990 us/op 1.79
validate api signedAggregateAndProof - struct 2.5662 ms/op 2.2215 ms/op 1.16
validate gossip signedAggregateAndProof - struct 2.4269 ms/op 2.2253 ms/op 1.09
validate gossip attestation - vc 640000 1.2151 ms/op 1.0987 ms/op 1.11
batch validate gossip attestation - vc 640000 - chunk 32 152.42 us/op 126.21 us/op 1.21
batch validate gossip attestation - vc 640000 - chunk 64 130.02 us/op 114.32 us/op 1.14
batch validate gossip attestation - vc 640000 - chunk 128 123.89 us/op 105.64 us/op 1.17
batch validate gossip attestation - vc 640000 - chunk 256 117.63 us/op 104.59 us/op 1.12
pickEth1Vote - no votes 964.48 us/op 847.56 us/op 1.14
pickEth1Vote - max votes 10.981 ms/op 7.2483 ms/op 1.51
pickEth1Vote - Eth1Data hashTreeRoot value x2048 18.712 ms/op 13.108 ms/op 1.43
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.269 ms/op 17.456 ms/op 1.28
pickEth1Vote - Eth1Data fastSerialize value x2048 434.54 us/op 330.40 us/op 1.32
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.0376 ms/op 4.7988 ms/op 0.84
bytes32 toHexString 661.00 ns/op 353.00 ns/op 1.87
bytes32 Buffer.toString(hex) 470.00 ns/op 190.00 ns/op 2.47
bytes32 Buffer.toString(hex) from Uint8Array 653.00 ns/op 265.00 ns/op 2.46
bytes32 Buffer.toString(hex) + 0x 464.00 ns/op 187.00 ns/op 2.48
Object access 1 prop 0.36400 ns/op 0.11200 ns/op 3.25
Map access 1 prop 0.33100 ns/op 0.10700 ns/op 3.09
Object get x1000 5.0520 ns/op 5.1910 ns/op 0.97
Map get x1000 6.0360 ns/op 5.5090 ns/op 1.10
Object set x1000 25.808 ns/op 24.932 ns/op 1.04
Map set x1000 22.043 ns/op 18.212 ns/op 1.21
Return object 10000 times 0.29810 ns/op 0.27050 ns/op 1.10
Throw Error 10000 times 2.8241 us/op 2.5170 us/op 1.12
fastMsgIdFn sha256 / 200 bytes 2.3250 us/op 1.5780 us/op 1.47
fastMsgIdFn h32 xxhash / 200 bytes 515.00 ns/op 178.00 ns/op 2.89
fastMsgIdFn h64 xxhash / 200 bytes 509.00 ns/op 200.00 ns/op 2.54
fastMsgIdFn sha256 / 1000 bytes 6.3110 us/op 5.3350 us/op 1.18
fastMsgIdFn h32 xxhash / 1000 bytes 656.00 ns/op 295.00 ns/op 2.22
fastMsgIdFn h64 xxhash / 1000 bytes 554.00 ns/op 263.00 ns/op 2.11
fastMsgIdFn sha256 / 10000 bytes 52.884 us/op 46.294 us/op 1.14
fastMsgIdFn h32 xxhash / 10000 bytes 2.0130 us/op 1.5850 us/op 1.27
fastMsgIdFn h64 xxhash / 10000 bytes 1.3650 us/op 1.0220 us/op 1.34
send data - 1000 256B messages 10.554 ms/op 9.4890 ms/op 1.11
send data - 1000 512B messages 17.109 ms/op 12.867 ms/op 1.33
send data - 1000 1024B messages 24.350 ms/op 19.907 ms/op 1.22
send data - 1000 1200B messages 22.490 ms/op 21.536 ms/op 1.04
send data - 1000 2048B messages 33.915 ms/op 26.333 ms/op 1.29
send data - 1000 4096B messages 31.521 ms/op 24.722 ms/op 1.28
send data - 1000 16384B messages 70.831 ms/op 59.399 ms/op 1.19
send data - 1000 65536B messages 264.91 ms/op 184.61 ms/op 1.43
enrSubnets - fastDeserialize 64 bits 1.1660 us/op 808.00 ns/op 1.44
enrSubnets - ssz BitVector 64 bits 635.00 ns/op 266.00 ns/op 2.39
enrSubnets - fastDeserialize 4 bits 403.00 ns/op 121.00 ns/op 3.33
enrSubnets - ssz BitVector 4 bits 615.00 ns/op 263.00 ns/op 2.34
prioritizePeers score -10:0 att 32-0.1 sync 2-0 169.00 us/op 110.38 us/op 1.53
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 161.41 us/op 129.77 us/op 1.24
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 259.30 us/op 189.31 us/op 1.37
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 450.51 us/op 336.56 us/op 1.34
prioritizePeers score 0:0 att 64-1 sync 4-1 563.49 us/op 405.49 us/op 1.39
array of 16000 items push then shift 1.3847 us/op 1.1859 us/op 1.17
LinkedList of 16000 items push then shift 6.9930 ns/op 7.0350 ns/op 0.99
array of 16000 items push then pop 115.57 ns/op 77.215 ns/op 1.50
LinkedList of 16000 items push then pop 6.9620 ns/op 6.0860 ns/op 1.14
array of 24000 items push then shift 2.1450 us/op 1.7278 us/op 1.24
LinkedList of 24000 items push then shift 7.2190 ns/op 6.3580 ns/op 1.14
array of 24000 items push then pop 186.35 ns/op 98.779 ns/op 1.89
LinkedList of 24000 items push then pop 6.6910 ns/op 5.6940 ns/op 1.18
intersect bitArray bitLen 8 5.5340 ns/op 4.8560 ns/op 1.14
intersect array and set length 8 39.819 ns/op 34.627 ns/op 1.15
intersect bitArray bitLen 128 27.415 ns/op 24.696 ns/op 1.11
intersect array and set length 128 630.86 ns/op 528.50 ns/op 1.19
bitArray.getTrueBitIndexes() bitLen 128 2.5970 us/op 1.0660 us/op 2.44
bitArray.getTrueBitIndexes() bitLen 248 3.8460 us/op 1.8360 us/op 2.09
bitArray.getTrueBitIndexes() bitLen 512 7.5960 us/op 3.4220 us/op 2.22
Buffer.concat 32 items 1.1070 us/op 759.00 ns/op 1.46
Uint8Array.set 32 items 1.7800 us/op 1.5850 us/op 1.12
Buffer.copy 2.2200 us/op 2.0840 us/op 1.07
Uint8Array.set - with subarray 2.3950 us/op 2.8890 us/op 0.83
Uint8Array.set - without subarray 1.5120 us/op 1.8590 us/op 0.81
Set add up to 64 items then delete first 1.8516 us/op 1.7721 us/op 1.04
OrderedSet add up to 64 items then delete first 2.9493 us/op 2.7261 us/op 1.08
Set add up to 64 items then delete last 2.0313 us/op 2.0798 us/op 0.98
OrderedSet add up to 64 items then delete last 3.2065 us/op 2.9007 us/op 1.11
Set add up to 64 items then delete middle 2.0513 us/op 1.8476 us/op 1.11
OrderedSet add up to 64 items then delete middle 4.6114 us/op 4.1120 us/op 1.12
Set add up to 128 items then delete first 3.9987 us/op 3.9800 us/op 1.00
OrderedSet add up to 128 items then delete first 6.0262 us/op 6.1807 us/op 0.98
Set add up to 128 items then delete last 3.9560 us/op 3.8154 us/op 1.04
OrderedSet add up to 128 items then delete last 6.6002 us/op 5.7575 us/op 1.15
Set add up to 128 items then delete middle 4.0648 us/op 3.8230 us/op 1.06
OrderedSet add up to 128 items then delete middle 12.762 us/op 11.233 us/op 1.14
Set add up to 256 items then delete first 8.3261 us/op 7.7339 us/op 1.08
OrderedSet add up to 256 items then delete first 12.539 us/op 12.154 us/op 1.03
Set add up to 256 items then delete last 7.8594 us/op 7.4695 us/op 1.05
OrderedSet add up to 256 items then delete last 12.119 us/op 11.429 us/op 1.06
Set add up to 256 items then delete middle 7.6566 us/op 7.4371 us/op 1.03
OrderedSet add up to 256 items then delete middle 34.711 us/op 33.522 us/op 1.04
transfer serialized Status (84 B) 1.5510 us/op 1.2560 us/op 1.23
copy serialized Status (84 B) 1.3280 us/op 974.00 ns/op 1.36
transfer serialized SignedVoluntaryExit (112 B) 1.6360 us/op 1.3000 us/op 1.26
copy serialized SignedVoluntaryExit (112 B) 1.4280 us/op 1.0520 us/op 1.36
transfer serialized ProposerSlashing (416 B) 2.2930 us/op 2.0170 us/op 1.14
copy serialized ProposerSlashing (416 B) 2.4650 us/op 2.1440 us/op 1.15
transfer serialized Attestation (485 B) 2.3850 us/op 1.9400 us/op 1.23
copy serialized Attestation (485 B) 2.4310 us/op 2.0850 us/op 1.17
transfer serialized AttesterSlashing (33232 B) 2.8820 us/op 1.9820 us/op 1.45
copy serialized AttesterSlashing (33232 B) 7.2670 us/op 5.6550 us/op 1.29
transfer serialized Small SignedBeaconBlock (128000 B) 3.6240 us/op 2.4230 us/op 1.50
copy serialized Small SignedBeaconBlock (128000 B) 17.359 us/op 12.111 us/op 1.43
transfer serialized Avg SignedBeaconBlock (200000 B) 3.3050 us/op 2.6970 us/op 1.23
copy serialized Avg SignedBeaconBlock (200000 B) 21.590 us/op 17.000 us/op 1.27
transfer serialized BlobsSidecar (524380 B) 3.3290 us/op 2.5320 us/op 1.31
copy serialized BlobsSidecar (524380 B) 74.800 us/op 109.53 us/op 0.68
transfer serialized Big SignedBeaconBlock (1000000 B) 3.5760 us/op 2.9630 us/op 1.21
copy serialized Big SignedBeaconBlock (1000000 B) 252.61 us/op 130.50 us/op 1.94
pass gossip attestations to forkchoice per slot 2.6205 ms/op 2.3925 ms/op 1.10
forkChoice updateHead vc 100000 bc 64 eq 0 392.59 us/op 374.43 us/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 0 2.5104 ms/op 2.5107 ms/op 1.00
forkChoice updateHead vc 1000000 bc 64 eq 0 4.1920 ms/op 4.5978 ms/op 0.91
forkChoice updateHead vc 600000 bc 320 eq 0 2.5437 ms/op 2.5358 ms/op 1.00
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8110 ms/op 2.5371 ms/op 1.11
forkChoice updateHead vc 600000 bc 7200 eq 0 2.8909 ms/op 2.7924 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 1000 9.6599 ms/op 9.4519 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 10000 9.8739 ms/op 9.3944 ms/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 300000 12.115 ms/op 10.875 ms/op 1.11
computeDeltas 500000 validators 300 proto nodes 3.3207 ms/op 3.0213 ms/op 1.10
computeDeltas 500000 validators 1200 proto nodes 3.2062 ms/op 3.1402 ms/op 1.02
computeDeltas 500000 validators 7200 proto nodes 3.2562 ms/op 3.0369 ms/op 1.07
computeDeltas 750000 validators 300 proto nodes 5.0268 ms/op 4.4145 ms/op 1.14
computeDeltas 750000 validators 1200 proto nodes 4.7980 ms/op 4.4399 ms/op 1.08
computeDeltas 750000 validators 7200 proto nodes 4.7306 ms/op 4.3963 ms/op 1.08
computeDeltas 1400000 validators 300 proto nodes 8.7752 ms/op 8.2329 ms/op 1.07
computeDeltas 1400000 validators 1200 proto nodes 8.9552 ms/op 8.2271 ms/op 1.09
computeDeltas 1400000 validators 7200 proto nodes 8.6121 ms/op 8.2651 ms/op 1.04
computeDeltas 2100000 validators 300 proto nodes 12.925 ms/op 11.962 ms/op 1.08
computeDeltas 2100000 validators 1200 proto nodes 12.655 ms/op 12.354 ms/op 1.02
computeDeltas 2100000 validators 7200 proto nodes 13.346 ms/op 12.111 ms/op 1.10
altair processAttestation - 250000 vs - 7PWei normalcase 1.5011 ms/op 1.3274 ms/op 1.13
altair processAttestation - 250000 vs - 7PWei worstcase 2.4693 ms/op 2.0343 ms/op 1.21
altair processAttestation - setStatus - 1/6 committees join 105.86 us/op 68.473 us/op 1.55
altair processAttestation - setStatus - 1/3 committees join 201.00 us/op 131.70 us/op 1.53
altair processAttestation - setStatus - 1/2 committees join 276.80 us/op 183.78 us/op 1.51
altair processAttestation - setStatus - 2/3 committees join 382.80 us/op 262.07 us/op 1.46
altair processAttestation - setStatus - 4/5 committees join 520.95 us/op 377.46 us/op 1.38
altair processAttestation - setStatus - 100% committees join 663.58 us/op 456.20 us/op 1.45
altair processBlock - 250000 vs - 7PWei normalcase 3.5479 ms/op 3.4702 ms/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase hashState 23.022 ms/op 24.516 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase 40.252 ms/op 39.116 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.245 ms/op 76.947 ms/op 0.98
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8902 ms/op 2.1728 ms/op 0.87
phase0 processBlock - 250000 vs - 7PWei worstcase 26.446 ms/op 22.028 ms/op 1.20
altair processEth1Data - 250000 vs - 7PWei normalcase 320.05 us/op 237.11 us/op 1.35
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.9850 us/op 4.1210 us/op 1.45
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 19.395 us/op 17.538 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.9470 us/op 6.3970 us/op 1.24
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.7810 us/op 4.5490 us/op 1.27
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 81.879 us/op 69.570 us/op 1.18
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 955.39 us/op 490.12 us/op 1.95
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 791.08 us/op 1.0416 ms/op 0.76
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 605.64 us/op 1.1104 ms/op 0.55
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.0076 ms/op 1.8457 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1208 ms/op 1.1820 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.1622 ms/op 2.9122 ms/op 1.09
Tree 40 250000 create 228.97 ms/op 174.28 ms/op 1.31
Tree 40 250000 get(125000) 114.99 ns/op 103.06 ns/op 1.12
Tree 40 250000 set(125000) 594.19 ns/op 482.01 ns/op 1.23
Tree 40 250000 toArray() 19.345 ms/op 11.896 ms/op 1.63
Tree 40 250000 iterate all - toArray() + loop 19.836 ms/op 11.851 ms/op 1.67
Tree 40 250000 iterate all - get(i) 56.376 ms/op 39.135 ms/op 1.44
MutableVector 250000 create 10.477 ms/op 12.563 ms/op 0.83
MutableVector 250000 get(125000) 6.1110 ns/op 5.6030 ns/op 1.09
MutableVector 250000 set(125000) 175.15 ns/op 161.61 ns/op 1.08
MutableVector 250000 toArray() 3.0843 ms/op 2.5575 ms/op 1.21
MutableVector 250000 iterate all - toArray() + loop 3.3519 ms/op 2.6683 ms/op 1.26
MutableVector 250000 iterate all - get(i) 1.5006 ms/op 1.4069 ms/op 1.07
Array 250000 create 2.9318 ms/op 2.2465 ms/op 1.31
Array 250000 clone - spread 1.3126 ms/op 1.1641 ms/op 1.13
Array 250000 get(125000) 0.60900 ns/op 0.35600 ns/op 1.71
Array 250000 set(125000) 0.60900 ns/op 0.36600 ns/op 1.66
Array 250000 iterate all - loop 78.773 us/op 74.972 us/op 1.05
effectiveBalanceIncrements clone Uint8Array 300000 17.731 us/op 12.708 us/op 1.40
effectiveBalanceIncrements clone MutableVector 300000 341.00 ns/op 101.00 ns/op 3.38
effectiveBalanceIncrements rw all Uint8Array 300000 170.56 us/op 162.95 us/op 1.05
effectiveBalanceIncrements rw all MutableVector 300000 57.002 ms/op 52.654 ms/op 1.08
phase0 afterProcessEpoch - 250000 vs - 7PWei 78.753 ms/op 77.154 ms/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 59.107 ms/op 36.117 ms/op 1.64
altair processEpoch - mainnet_e81889 370.17 ms/op 347.15 ms/op 1.07
mainnet_e81889 - altair beforeProcessEpoch 58.329 ms/op 43.367 ms/op 1.35
mainnet_e81889 - altair processJustificationAndFinalization 17.300 us/op 9.2700 us/op 1.87
mainnet_e81889 - altair processInactivityUpdates 6.5402 ms/op 5.2472 ms/op 1.25
mainnet_e81889 - altair processRewardsAndPenalties 42.058 ms/op 49.556 ms/op 0.85
mainnet_e81889 - altair processRegistryUpdates 3.2000 us/op 1.5830 us/op 2.02
mainnet_e81889 - altair processSlashings 1.1170 us/op 348.00 ns/op 3.21
mainnet_e81889 - altair processEth1DataReset 1.0540 us/op 267.00 ns/op 3.95
mainnet_e81889 - altair processEffectiveBalanceUpdates 841.31 us/op 1.1248 ms/op 0.75
mainnet_e81889 - altair processSlashingsReset 4.3670 us/op 2.3290 us/op 1.88
mainnet_e81889 - altair processRandaoMixesReset 5.2570 us/op 2.9780 us/op 1.77
mainnet_e81889 - altair processHistoricalRootsUpdate 1.1300 us/op 365.00 ns/op 3.10
mainnet_e81889 - altair processParticipationFlagUpdates 2.3270 us/op 1.2480 us/op 1.86
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0730 us/op 297.00 ns/op 3.61
mainnet_e81889 - altair afterProcessEpoch 81.297 ms/op 80.556 ms/op 1.01
capella processEpoch - mainnet_e217614 1.1059 s/op 1.1798 s/op 0.94
mainnet_e217614 - capella beforeProcessEpoch 220.93 ms/op 217.77 ms/op 1.01
mainnet_e217614 - capella processJustificationAndFinalization 10.820 us/op 9.7180 us/op 1.11
mainnet_e217614 - capella processInactivityUpdates 15.107 ms/op 14.896 ms/op 1.01
mainnet_e217614 - capella processRewardsAndPenalties 243.14 ms/op 251.56 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 15.018 us/op 10.264 us/op 1.46
mainnet_e217614 - capella processSlashings 885.00 ns/op 313.00 ns/op 2.83
mainnet_e217614 - capella processEth1DataReset 776.00 ns/op 240.00 ns/op 3.23
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.7140 ms/op 3.8012 ms/op 1.24
mainnet_e217614 - capella processSlashingsReset 2.8580 us/op 1.5520 us/op 1.84
mainnet_e217614 - capella processRandaoMixesReset 4.1600 us/op 2.3650 us/op 1.76
mainnet_e217614 - capella processHistoricalRootsUpdate 761.00 ns/op 265.00 ns/op 2.87
mainnet_e217614 - capella processParticipationFlagUpdates 2.1980 us/op 1.1070 us/op 1.99
mainnet_e217614 - capella afterProcessEpoch 256.04 ms/op 228.63 ms/op 1.12
phase0 processEpoch - mainnet_e58758 329.92 ms/op 354.81 ms/op 0.93
mainnet_e58758 - phase0 beforeProcessEpoch 108.34 ms/op 98.406 ms/op 1.10
mainnet_e58758 - phase0 processJustificationAndFinalization 17.663 us/op 9.4680 us/op 1.87
mainnet_e58758 - phase0 processRewardsAndPenalties 30.785 ms/op 32.832 ms/op 0.94
mainnet_e58758 - phase0 processRegistryUpdates 9.0410 us/op 5.6420 us/op 1.60
mainnet_e58758 - phase0 processSlashings 785.00 ns/op 288.00 ns/op 2.73
mainnet_e58758 - phase0 processEth1DataReset 800.00 ns/op 300.00 ns/op 2.67
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 779.80 us/op 723.34 us/op 1.08
mainnet_e58758 - phase0 processSlashingsReset 3.8190 us/op 1.4860 us/op 2.57
mainnet_e58758 - phase0 processRandaoMixesReset 6.8240 us/op 2.2010 us/op 3.10
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.2830 us/op 274.00 ns/op 4.68
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.5330 us/op 3.4700 us/op 1.31
mainnet_e58758 - phase0 afterProcessEpoch 69.510 ms/op 63.283 ms/op 1.10
phase0 processEffectiveBalanceUpdates - 250000 normalcase 820.56 us/op 755.84 us/op 1.09
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6361 ms/op 1.4120 ms/op 1.16
altair processInactivityUpdates - 250000 normalcase 18.527 ms/op 16.188 ms/op 1.14
altair processInactivityUpdates - 250000 worstcase 18.873 ms/op 16.084 ms/op 1.17
phase0 processRegistryUpdates - 250000 normalcase 8.6140 us/op 4.2810 us/op 2.01
phase0 processRegistryUpdates - 250000 badcase_full_deposits 304.24 us/op 302.09 us/op 1.01
phase0 processRegistryUpdates - 250000 worstcase 0.5 119.28 ms/op 107.69 ms/op 1.11
altair processRewardsAndPenalties - 250000 normalcase 44.661 ms/op 39.511 ms/op 1.13
altair processRewardsAndPenalties - 250000 worstcase 42.074 ms/op 39.312 ms/op 1.07
phase0 getAttestationDeltas - 250000 normalcase 6.7414 ms/op 5.6705 ms/op 1.19
phase0 getAttestationDeltas - 250000 worstcase 8.4213 ms/op 5.9105 ms/op 1.42
phase0 processSlashings - 250000 worstcase 94.031 us/op 48.773 us/op 1.93
altair processSyncCommitteeUpdates - 250000 119.62 ms/op 107.30 ms/op 1.11
BeaconState.hashTreeRoot - No change 741.00 ns/op 217.00 ns/op 3.41
BeaconState.hashTreeRoot - 1 full validator 124.92 us/op 115.84 us/op 1.08
BeaconState.hashTreeRoot - 32 full validator 1.1637 ms/op 1.3593 ms/op 0.86
BeaconState.hashTreeRoot - 512 full validator 10.754 ms/op 13.302 ms/op 0.81
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 113.23 us/op 128.00 us/op 0.88
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9290 ms/op 1.6546 ms/op 1.17
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 26.627 ms/op 20.866 ms/op 1.28
BeaconState.hashTreeRoot - 1 balances 109.45 us/op 122.88 us/op 0.89
BeaconState.hashTreeRoot - 32 balances 976.00 us/op 784.34 us/op 1.24
BeaconState.hashTreeRoot - 512 balances 9.6038 ms/op 11.739 ms/op 0.82
BeaconState.hashTreeRoot - 250000 balances 186.21 ms/op 164.03 ms/op 1.14
aggregationBits - 2048 els - zipIndexesInBitList 41.145 us/op 18.713 us/op 2.20
byteArrayEquals 32 48.561 ns/op 46.390 ns/op 1.05
Buffer.compare 32 15.682 ns/op 16.062 ns/op 0.98
byteArrayEquals 1024 1.2950 us/op 1.2397 us/op 1.04
Buffer.compare 1024 22.999 ns/op 22.594 ns/op 1.02
byteArrayEquals 16384 20.411 us/op 19.672 us/op 1.04
Buffer.compare 16384 179.43 ns/op 175.26 ns/op 1.02
byteArrayEquals 123687377 153.76 ms/op 146.38 ms/op 1.05
Buffer.compare 123687377 5.6217 ms/op 3.6191 ms/op 1.55
byteArrayEquals 32 - diff last byte 48.282 ns/op 45.481 ns/op 1.06
Buffer.compare 32 - diff last byte 15.932 ns/op 15.718 ns/op 1.01
byteArrayEquals 1024 - diff last byte 1.2911 us/op 1.2204 us/op 1.06
Buffer.compare 1024 - diff last byte 24.668 ns/op 22.587 ns/op 1.09
byteArrayEquals 16384 - diff last byte 20.200 us/op 19.385 us/op 1.04
Buffer.compare 16384 - diff last byte 174.33 ns/op 168.99 ns/op 1.03
byteArrayEquals 123687377 - diff last byte 152.28 ms/op 145.72 ms/op 1.04
Buffer.compare 123687377 - diff last byte 6.1952 ms/op 5.2654 ms/op 1.18
byteArrayEquals 32 - random bytes 4.8270 ns/op 4.2380 ns/op 1.14
Buffer.compare 32 - random bytes 15.185 ns/op 14.002 ns/op 1.08
byteArrayEquals 1024 - random bytes 4.7840 ns/op 4.2100 ns/op 1.14
Buffer.compare 1024 - random bytes 14.867 ns/op 13.798 ns/op 1.08
byteArrayEquals 16384 - random bytes 4.7850 ns/op 4.2030 ns/op 1.14
Buffer.compare 16384 - random bytes 14.949 ns/op 13.767 ns/op 1.09
byteArrayEquals 123687377 - random bytes 7.6900 ns/op 5.4700 ns/op 1.41
Buffer.compare 123687377 - random bytes 17.770 ns/op 14.670 ns/op 1.21
regular array get 100000 times 29.736 us/op 27.323 us/op 1.09
wrappedArray get 100000 times 29.569 us/op 27.097 us/op 1.09
arrayWithProxy get 100000 times 9.8228 ms/op 8.2046 ms/op 1.20
ssz.Root.equals 42.314 ns/op 39.494 ns/op 1.07
byteArrayEquals 43.050 ns/op 39.174 ns/op 1.10
Buffer.compare 8.6720 ns/op 8.0020 ns/op 1.08
shuffle list - 16384 els 5.4673 ms/op 5.0002 ms/op 1.09
shuffle list - 250000 els 80.385 ms/op 72.911 ms/op 1.10
processSlot - 1 slots 11.658 us/op 10.110 us/op 1.15
processSlot - 32 slots 2.8949 ms/op 2.8659 ms/op 1.01
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 41.817 ms/op 42.280 ms/op 0.99
getCommitteeAssignments - req 1 vs - 250000 vc 1.7849 ms/op 1.7798 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.5367 ms/op 3.4565 ms/op 1.02
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7763 ms/op 3.6917 ms/op 1.02
findModifiedValidators - 10000 modified validators 219.31 ms/op 228.07 ms/op 0.96
findModifiedValidators - 1000 modified validators 183.15 ms/op 161.64 ms/op 1.13
findModifiedValidators - 100 modified validators 144.29 ms/op 157.34 ms/op 0.92
findModifiedValidators - 10 modified validators 122.31 ms/op 140.47 ms/op 0.87
findModifiedValidators - 1 modified validators 153.88 ms/op 136.59 ms/op 1.13
findModifiedValidators - no difference 149.90 ms/op 148.61 ms/op 1.01
compare ViewDUs 3.2429 s/op 2.8320 s/op 1.15
compare each validator Uint8Array 1.5379 s/op 1.5759 s/op 0.98
compare ViewDU to Uint8Array 745.28 ms/op 669.58 ms/op 1.11
migrate state 1000000 validators, 24 modified, 0 new 434.37 ms/op 569.76 ms/op 0.76
migrate state 1000000 validators, 1700 modified, 1000 new 722.51 ms/op 795.04 ms/op 0.91
migrate state 1000000 validators, 3400 modified, 2000 new 1.0131 s/op 990.87 ms/op 1.02
migrate state 1500000 validators, 24 modified, 0 new 544.04 ms/op 563.49 ms/op 0.97
migrate state 1500000 validators, 1700 modified, 1000 new 801.36 ms/op 742.10 ms/op 1.08
migrate state 1500000 validators, 3400 modified, 2000 new 1.0497 s/op 981.87 ms/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 7.1200 ns/op 3.7200 ns/op 1.91
state getBlockRootAtSlot - 250000 vs - 7PWei 594.11 ns/op 517.87 ns/op 1.15
computeProposers - vc 250000 6.8305 ms/op 6.3329 ms/op 1.08
computeEpochShuffling - vc 250000 90.528 ms/op 80.882 ms/op 1.12
getNextSyncCommittee - vc 250000 111.30 ms/op 94.895 ms/op 1.17
computeSigningRoot for AttestationData 20.746 us/op 17.136 us/op 1.21
hash AttestationData serialized data then Buffer.toString(base64) 1.3127 us/op 1.1619 us/op 1.13
toHexString serialized data 907.85 ns/op 756.74 ns/op 1.20
Buffer.toString(base64) 160.20 ns/op 139.31 ns/op 1.15

by benchmarkbot/action

@nflaig
Copy link
Member Author

nflaig commented Sep 23, 2024

Closed in favor of #7101

@nflaig nflaig closed this Sep 23, 2024
@nflaig nflaig deleted the nflaig/cleanup-parser branch September 23, 2024 10:54
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.

1 participant