Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade fastify to v5 #7101

Merged
merged 3 commits into from
Sep 23, 2024
Merged

chore: upgrade fastify to v5 #7101

merged 3 commits into from
Sep 23, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Sep 23, 2024

Motivation

This release includes fastify/fastify#5545 and allows to remove workaround in ssz content type parser. The new fastify version also removed a bunch of deprecated code which promises a 5-10% performance increase.

Description

Upgrade fastify to v5

There is a migration guide which provides details on breaking changes which we addressed already previously when the code was marked as deprecated.

A notable new feature is Diagnostic Channel support but I don't see a use case for this right now.

Copy link
Contributor

github-actions bot commented Sep 23, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: aab5d85 Previous: 0dceb83 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.7234 ms/op 2.4101 ms/op 0.72
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.156 us/op 74.769 us/op 0.66
BLS verify - blst 892.65 us/op 1.0612 ms/op 0.84
BLS verifyMultipleSignatures 3 - blst 1.3202 ms/op 1.4676 ms/op 0.90
BLS verifyMultipleSignatures 8 - blst 2.0620 ms/op 2.3814 ms/op 0.87
BLS verifyMultipleSignatures 32 - blst 4.5757 ms/op 6.2678 ms/op 0.73
BLS verifyMultipleSignatures 64 - blst 8.4878 ms/op 11.431 ms/op 0.74
BLS verifyMultipleSignatures 128 - blst 16.241 ms/op 19.959 ms/op 0.81
BLS deserializing 10000 signatures 617.13 ms/op 729.93 ms/op 0.85
BLS deserializing 100000 signatures 6.2624 s/op 7.2244 s/op 0.87
BLS verifyMultipleSignatures - same message - 3 - blst 933.86 us/op 1.0362 ms/op 0.90
BLS verifyMultipleSignatures - same message - 8 - blst 1.0745 ms/op 1.2532 ms/op 0.86
BLS verifyMultipleSignatures - same message - 32 - blst 1.6656 ms/op 2.1786 ms/op 0.76
BLS verifyMultipleSignatures - same message - 64 - blst 2.5292 ms/op 2.9615 ms/op 0.85
BLS verifyMultipleSignatures - same message - 128 - blst 4.1215 ms/op 4.9045 ms/op 0.84
BLS aggregatePubkeys 32 - blst 17.905 us/op 24.361 us/op 0.73
BLS aggregatePubkeys 128 - blst 64.662 us/op 74.235 us/op 0.87
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 57.607 ms/op 75.355 ms/op 0.76
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 57.949 ms/op 84.005 ms/op 0.69
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 31.942 ms/op 53.322 ms/op 0.60
getSlashingsAndExits - default max 65.901 us/op 159.32 us/op 0.41
getSlashingsAndExits - 2k 373.84 us/op 331.75 us/op 1.13
proposeBlockBody type=full, size=empty 5.6311 ms/op 7.1607 ms/op 0.79
isKnown best case - 1 super set check 556.00 ns/op 536.00 ns/op 1.04
isKnown normal case - 2 super set checks 486.00 ns/op 531.00 ns/op 0.92
isKnown worse case - 16 super set checks 492.00 ns/op 529.00 ns/op 0.93
InMemoryCheckpointStateCache - add get delete 2.9050 us/op 3.8280 us/op 0.76
updateUnfinalizedPubkeys - updating 10 pubkeys 1.1554 ms/op 1.4515 ms/op 0.80
updateUnfinalizedPubkeys - updating 100 pubkeys 3.4620 ms/op 4.8723 ms/op 0.71
updateUnfinalizedPubkeys - updating 1000 pubkeys 43.038 ms/op 63.408 ms/op 0.68
validate api signedAggregateAndProof - struct 1.6038 ms/op 1.6717 ms/op 0.96
validate gossip signedAggregateAndProof - struct 1.6808 ms/op 1.8130 ms/op 0.93
validate gossip attestation - vc 640000 982.79 us/op 1.0643 ms/op 0.92
batch validate gossip attestation - vc 640000 - chunk 32 135.86 us/op 152.53 us/op 0.89
batch validate gossip attestation - vc 640000 - chunk 64 117.74 us/op 145.29 us/op 0.81
batch validate gossip attestation - vc 640000 - chunk 128 122.95 us/op 117.42 us/op 1.05
batch validate gossip attestation - vc 640000 - chunk 256 111.79 us/op 116.85 us/op 0.96
pickEth1Vote - no votes 1.1124 ms/op 1.3212 ms/op 0.84
pickEth1Vote - max votes 6.4821 ms/op 8.0321 ms/op 0.81
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.275 ms/op 15.050 ms/op 0.68
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.360 ms/op 23.435 ms/op 0.83
pickEth1Vote - Eth1Data fastSerialize value x2048 384.04 us/op 588.90 us/op 0.65
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.3963 ms/op 3.6694 ms/op 1.20
bytes32 toHexString 863.00 ns/op 606.00 ns/op 1.42
bytes32 Buffer.toString(hex) 472.00 ns/op 276.00 ns/op 1.71
bytes32 Buffer.toString(hex) from Uint8Array 732.00 ns/op 475.00 ns/op 1.54
bytes32 Buffer.toString(hex) + 0x 550.00 ns/op 269.00 ns/op 2.04
Object access 1 prop 0.37400 ns/op 0.15700 ns/op 2.38
Map access 1 prop 0.36000 ns/op 0.13600 ns/op 2.65
Object get x1000 5.4600 ns/op 6.4890 ns/op 0.84
Map get x1000 5.6750 ns/op 8.6030 ns/op 0.66
Object set x1000 30.002 ns/op 43.407 ns/op 0.69
Map set x1000 23.143 ns/op 25.244 ns/op 0.92
Return object 10000 times 0.30180 ns/op 0.29110 ns/op 1.04
Throw Error 10000 times 2.8334 us/op 3.4216 us/op 0.83
toHex 132.15 ns/op 158.63 ns/op 0.83
Buffer.from 116.39 ns/op 143.02 ns/op 0.81
shared Buffer 75.107 ns/op 95.883 ns/op 0.78
fastMsgIdFn sha256 / 200 bytes 2.0660 us/op 2.3990 us/op 0.86
fastMsgIdFn h32 xxhash / 200 bytes 503.00 ns/op 269.00 ns/op 1.87
fastMsgIdFn h64 xxhash / 200 bytes 493.00 ns/op 276.00 ns/op 1.79
fastMsgIdFn sha256 / 1000 bytes 6.6190 us/op 7.6030 us/op 0.87
fastMsgIdFn h32 xxhash / 1000 bytes 687.00 ns/op 412.00 ns/op 1.67
fastMsgIdFn h64 xxhash / 1000 bytes 601.00 ns/op 348.00 ns/op 1.73
fastMsgIdFn sha256 / 10000 bytes 51.880 us/op 66.639 us/op 0.78
fastMsgIdFn h32 xxhash / 10000 bytes 2.0390 us/op 1.9260 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.5040 us/op 1.2460 us/op 1.21
send data - 1000 256B messages 11.796 ms/op 13.749 ms/op 0.86
send data - 1000 512B messages 17.162 ms/op 17.279 ms/op 0.99
send data - 1000 1024B messages 25.071 ms/op 27.936 ms/op 0.90
send data - 1000 1200B messages 26.475 ms/op 28.421 ms/op 0.93
send data - 1000 2048B messages 32.661 ms/op 36.324 ms/op 0.90
send data - 1000 4096B messages 33.000 ms/op 32.922 ms/op 1.00
send data - 1000 16384B messages 93.108 ms/op 80.341 ms/op 1.16
send data - 1000 65536B messages 320.03 ms/op 231.15 ms/op 1.38
enrSubnets - fastDeserialize 64 bits 1.4390 us/op 1.2370 us/op 1.16
enrSubnets - ssz BitVector 64 bits 847.00 ns/op 432.00 ns/op 1.96
enrSubnets - fastDeserialize 4 bits 417.00 ns/op 194.00 ns/op 2.15
enrSubnets - ssz BitVector 4 bits 703.00 ns/op 415.00 ns/op 1.69
prioritizePeers score -10:0 att 32-0.1 sync 2-0 190.28 us/op 178.59 us/op 1.07
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 164.17 us/op 179.43 us/op 0.91
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 270.39 us/op 313.74 us/op 0.86
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 429.70 us/op 452.35 us/op 0.95
prioritizePeers score 0:0 att 64-1 sync 4-1 1.0102 ms/op 795.01 us/op 1.27
array of 16000 items push then shift 1.4641 us/op 1.6762 us/op 0.87
LinkedList of 16000 items push then shift 8.1890 ns/op 8.1340 ns/op 1.01
array of 16000 items push then pop 81.866 ns/op 130.75 ns/op 0.63
LinkedList of 16000 items push then pop 7.4150 ns/op 7.3710 ns/op 1.01
array of 24000 items push then shift 1.9705 us/op 2.4674 us/op 0.80
LinkedList of 24000 items push then shift 7.2570 ns/op 7.8140 ns/op 0.93
array of 24000 items push then pop 165.27 ns/op 186.69 ns/op 0.89
LinkedList of 24000 items push then pop 10.130 ns/op 7.9450 ns/op 1.28
intersect bitArray bitLen 8 5.8020 ns/op 7.2360 ns/op 0.80
intersect array and set length 8 90.500 ns/op 51.156 ns/op 1.77
intersect bitArray bitLen 128 27.999 ns/op 29.943 ns/op 0.94
intersect array and set length 128 711.98 ns/op 753.83 ns/op 0.94
bitArray.getTrueBitIndexes() bitLen 128 2.6600 us/op 2.0430 us/op 1.30
bitArray.getTrueBitIndexes() bitLen 248 4.9420 us/op 3.5720 us/op 1.38
bitArray.getTrueBitIndexes() bitLen 512 8.5520 us/op 7.4810 us/op 1.14
Buffer.concat 32 items 1.3360 us/op 933.00 ns/op 1.43
Uint8Array.set 32 items 2.5370 us/op 1.5640 us/op 1.62
Buffer.copy 2.9790 us/op 1.9180 us/op 1.55
Uint8Array.set - with subarray 4.1520 us/op 3.0560 us/op 1.36
Uint8Array.set - without subarray 2.7260 us/op 1.5650 us/op 1.74
getUint32 - dataview 506.00 ns/op 303.00 ns/op 1.67
getUint32 - manual 493.00 ns/op 223.00 ns/op 2.21
Set add up to 64 items then delete first 2.0712 us/op 2.7090 us/op 0.76
OrderedSet add up to 64 items then delete first 2.8902 us/op 3.9264 us/op 0.74
Set add up to 64 items then delete last 2.6823 us/op 3.1573 us/op 0.85
OrderedSet add up to 64 items then delete last 3.9283 us/op 4.6268 us/op 0.85
Set add up to 64 items then delete middle 2.2052 us/op 2.7075 us/op 0.81
OrderedSet add up to 64 items then delete middle 4.9636 us/op 6.7923 us/op 0.73
Set add up to 128 items then delete first 4.2398 us/op 6.5125 us/op 0.65
OrderedSet add up to 128 items then delete first 6.3605 us/op 9.9761 us/op 0.64
Set add up to 128 items then delete last 5.1406 us/op 6.1414 us/op 0.84
OrderedSet add up to 128 items then delete last 7.0888 us/op 9.5445 us/op 0.74
Set add up to 128 items then delete middle 4.1073 us/op 6.1705 us/op 0.67
OrderedSet add up to 128 items then delete middle 12.674 us/op 14.814 us/op 0.86
Set add up to 256 items then delete first 8.9732 us/op 11.597 us/op 0.77
OrderedSet add up to 256 items then delete first 13.852 us/op 19.812 us/op 0.70
Set add up to 256 items then delete last 9.7456 us/op 13.249 us/op 0.74
OrderedSet add up to 256 items then delete last 13.538 us/op 18.091 us/op 0.75
Set add up to 256 items then delete middle 13.334 us/op 11.216 us/op 1.19
OrderedSet add up to 256 items then delete middle 49.190 us/op 44.577 us/op 1.10
transfer serialized Status (84 B) 1.8110 us/op 1.5040 us/op 1.20
copy serialized Status (84 B) 1.8300 us/op 1.4280 us/op 1.28
transfer serialized SignedVoluntaryExit (112 B) 2.1650 us/op 1.6200 us/op 1.34
copy serialized SignedVoluntaryExit (112 B) 1.9340 us/op 1.5200 us/op 1.27
transfer serialized ProposerSlashing (416 B) 2.7460 us/op 2.8680 us/op 0.96
copy serialized ProposerSlashing (416 B) 3.0990 us/op 3.0280 us/op 1.02
transfer serialized Attestation (485 B) 2.3850 us/op 2.8350 us/op 0.84
copy serialized Attestation (485 B) 2.3580 us/op 2.9010 us/op 0.81
transfer serialized AttesterSlashing (33232 B) 2.4270 us/op 3.3470 us/op 0.73
copy serialized AttesterSlashing (33232 B) 10.957 us/op 8.6580 us/op 1.27
transfer serialized Small SignedBeaconBlock (128000 B) 3.8240 us/op 3.3030 us/op 1.16
copy serialized Small SignedBeaconBlock (128000 B) 32.411 us/op 23.052 us/op 1.41
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5670 us/op 3.9120 us/op 0.91
copy serialized Avg SignedBeaconBlock (200000 B) 51.231 us/op 33.034 us/op 1.55
transfer serialized BlobsSidecar (524380 B) 5.4850 us/op 3.9580 us/op 1.39
copy serialized BlobsSidecar (524380 B) 156.23 us/op 132.79 us/op 1.18
transfer serialized Big SignedBeaconBlock (1000000 B) 7.2050 us/op 4.5620 us/op 1.58
copy serialized Big SignedBeaconBlock (1000000 B) 372.10 us/op 189.29 us/op 1.97
pass gossip attestations to forkchoice per slot 3.6629 ms/op 2.8948 ms/op 1.27
forkChoice updateHead vc 100000 bc 64 eq 0 683.74 us/op 607.14 us/op 1.13
forkChoice updateHead vc 600000 bc 64 eq 0 2.5817 ms/op 4.3279 ms/op 0.60
forkChoice updateHead vc 1000000 bc 64 eq 0 4.6802 ms/op 5.7893 ms/op 0.81
forkChoice updateHead vc 600000 bc 320 eq 0 3.1543 ms/op 3.2736 ms/op 0.96
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8944 ms/op 3.6558 ms/op 0.79
forkChoice updateHead vc 600000 bc 7200 eq 0 3.6528 ms/op 4.2157 ms/op 0.87
forkChoice updateHead vc 600000 bc 64 eq 1000 10.268 ms/op 11.092 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 10000 9.8169 ms/op 11.362 ms/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 300000 16.149 ms/op 18.289 ms/op 0.88
computeDeltas 500000 validators 300 proto nodes 3.3985 ms/op 4.2661 ms/op 0.80
computeDeltas 500000 validators 1200 proto nodes 3.3813 ms/op 4.1034 ms/op 0.82
computeDeltas 500000 validators 7200 proto nodes 3.4373 ms/op 4.3026 ms/op 0.80
computeDeltas 750000 validators 300 proto nodes 5.1359 ms/op 6.2695 ms/op 0.82
computeDeltas 750000 validators 1200 proto nodes 5.0753 ms/op 5.9345 ms/op 0.86
computeDeltas 750000 validators 7200 proto nodes 4.9155 ms/op 5.8058 ms/op 0.85
computeDeltas 1400000 validators 300 proto nodes 9.0613 ms/op 10.865 ms/op 0.83
computeDeltas 1400000 validators 1200 proto nodes 9.0811 ms/op 10.277 ms/op 0.88
computeDeltas 1400000 validators 7200 proto nodes 8.8997 ms/op 10.106 ms/op 0.88
computeDeltas 2100000 validators 300 proto nodes 13.077 ms/op 14.969 ms/op 0.87
computeDeltas 2100000 validators 1200 proto nodes 13.025 ms/op 15.458 ms/op 0.84
computeDeltas 2100000 validators 7200 proto nodes 13.055 ms/op 15.241 ms/op 0.86
altair processAttestation - 250000 vs - 7PWei normalcase 1.4081 ms/op 1.6783 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei worstcase 2.1207 ms/op 2.6174 ms/op 0.81
altair processAttestation - setStatus - 1/6 committees join 67.954 us/op 87.356 us/op 0.78
altair processAttestation - setStatus - 1/3 committees join 137.04 us/op 173.31 us/op 0.79
altair processAttestation - setStatus - 1/2 committees join 199.55 us/op 244.25 us/op 0.82
altair processAttestation - setStatus - 2/3 committees join 268.38 us/op 315.23 us/op 0.85
altair processAttestation - setStatus - 4/5 committees join 392.70 us/op 477.17 us/op 0.82
altair processAttestation - setStatus - 100% committees join 470.45 us/op 548.82 us/op 0.86
altair processBlock - 250000 vs - 7PWei normalcase 4.6652 ms/op 3.7312 ms/op 1.25
altair processBlock - 250000 vs - 7PWei normalcase hashState 22.045 ms/op 26.142 ms/op 0.84
altair processBlock - 250000 vs - 7PWei worstcase 35.483 ms/op 34.384 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 57.044 ms/op 70.686 ms/op 0.81
phase0 processBlock - 250000 vs - 7PWei normalcase 1.3739 ms/op 1.9327 ms/op 0.71
phase0 processBlock - 250000 vs - 7PWei worstcase 22.324 ms/op 19.821 ms/op 1.13
altair processEth1Data - 250000 vs - 7PWei normalcase 240.58 us/op 295.79 us/op 0.81
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 3.0000 us/op 4.8620 us/op 0.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 28.431 us/op 30.846 us/op 0.92
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.7150 us/op 8.5630 us/op 0.90
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.4960 us/op 5.3300 us/op 1.03
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 125.92 us/op 118.24 us/op 1.06
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 802.38 us/op 1.1309 ms/op 0.71
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1755 ms/op 1.5100 ms/op 0.78
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1688 ms/op 1.5551 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.0885 ms/op 3.9024 ms/op 0.79
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.2053 ms/op 1.6497 ms/op 0.73
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9808 ms/op 3.6743 ms/op 0.81
Tree 40 250000 create 209.42 ms/op 231.91 ms/op 0.90
Tree 40 250000 get(125000) 128.41 ns/op 146.43 ns/op 0.88
Tree 40 250000 set(125000) 584.03 ns/op 680.18 ns/op 0.86
Tree 40 250000 toArray() 14.262 ms/op 16.178 ms/op 0.88
Tree 40 250000 iterate all - toArray() + loop 12.056 ms/op 15.878 ms/op 0.76
Tree 40 250000 iterate all - get(i) 40.904 ms/op 51.276 ms/op 0.80
Array 250000 create 2.4599 ms/op 2.7759 ms/op 0.89
Array 250000 clone - spread 1.2578 ms/op 1.3519 ms/op 0.93
Array 250000 get(125000) 0.58200 ns/op 0.40100 ns/op 1.45
Array 250000 set(125000) 0.59500 ns/op 0.41300 ns/op 1.44
Array 250000 iterate all - loop 77.582 us/op 101.84 us/op 0.76
phase0 afterProcessEpoch - 250000 vs - 7PWei 77.555 ms/op 90.556 ms/op 0.86
Array.fill - length 1000000 2.4938 ms/op 3.3941 ms/op 0.73
Array push - length 1000000 21.103 ms/op 22.186 ms/op 0.95
Array.get 0.26332 ns/op 0.26645 ns/op 0.99
Uint8Array.get 0.34060 ns/op 0.41884 ns/op 0.81
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.222 ms/op 16.314 ms/op 0.81
altair processEpoch - mainnet_e81889 294.08 ms/op 323.79 ms/op 0.91
mainnet_e81889 - altair beforeProcessEpoch 20.339 ms/op 18.144 ms/op 1.12
mainnet_e81889 - altair processJustificationAndFinalization 9.4880 us/op 11.490 us/op 0.83
mainnet_e81889 - altair processInactivityUpdates 4.9025 ms/op 5.2905 ms/op 0.93
mainnet_e81889 - altair processRewardsAndPenalties 49.921 ms/op 54.297 ms/op 0.92
mainnet_e81889 - altair processRegistryUpdates 1.6570 us/op 1.6780 us/op 0.99
mainnet_e81889 - altair processSlashings 792.00 ns/op 380.00 ns/op 2.08
mainnet_e81889 - altair processEth1DataReset 761.00 ns/op 305.00 ns/op 2.50
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5355 ms/op 1.9403 ms/op 0.79
mainnet_e81889 - altair processSlashingsReset 2.8770 us/op 2.4280 us/op 1.18
mainnet_e81889 - altair processRandaoMixesReset 5.8680 us/op 3.3170 us/op 1.77
mainnet_e81889 - altair processHistoricalRootsUpdate 758.00 ns/op 320.00 ns/op 2.37
mainnet_e81889 - altair processParticipationFlagUpdates 1.9660 us/op 1.8230 us/op 1.08
mainnet_e81889 - altair processSyncCommitteeUpdates 687.00 ns/op 230.00 ns/op 2.99
mainnet_e81889 - altair afterProcessEpoch 79.555 ms/op 95.428 ms/op 0.83
capella processEpoch - mainnet_e217614 1.3820 s/op 1.1974 s/op 1.15
mainnet_e217614 - capella beforeProcessEpoch 74.992 ms/op 69.147 ms/op 1.08
mainnet_e217614 - capella processJustificationAndFinalization 22.865 us/op 15.095 us/op 1.51
mainnet_e217614 - capella processInactivityUpdates 15.048 ms/op 18.464 ms/op 0.82
mainnet_e217614 - capella processRewardsAndPenalties 251.12 ms/op 234.26 ms/op 1.07
mainnet_e217614 - capella processRegistryUpdates 14.990 us/op 13.029 us/op 1.15
mainnet_e217614 - capella processSlashings 963.00 ns/op 382.00 ns/op 2.52
mainnet_e217614 - capella processEth1DataReset 882.00 ns/op 322.00 ns/op 2.74
mainnet_e217614 - capella processEffectiveBalanceUpdates 22.458 ms/op 15.069 ms/op 1.49
mainnet_e217614 - capella processSlashingsReset 4.6110 us/op 2.5610 us/op 1.80
mainnet_e217614 - capella processRandaoMixesReset 6.9360 us/op 4.0830 us/op 1.70
mainnet_e217614 - capella processHistoricalRootsUpdate 1.7970 us/op 328.00 ns/op 5.48
mainnet_e217614 - capella processParticipationFlagUpdates 3.5670 us/op 1.1540 us/op 3.09
mainnet_e217614 - capella afterProcessEpoch 212.73 ms/op 239.72 ms/op 0.89
phase0 processEpoch - mainnet_e58758 285.04 ms/op 424.64 ms/op 0.67
mainnet_e58758 - phase0 beforeProcessEpoch 91.037 ms/op 93.804 ms/op 0.97
mainnet_e58758 - phase0 processJustificationAndFinalization 18.300 us/op 17.842 us/op 1.03
mainnet_e58758 - phase0 processRewardsAndPenalties 24.469 ms/op 25.738 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 8.6450 us/op 8.4270 us/op 1.03
mainnet_e58758 - phase0 processSlashings 806.00 ns/op 399.00 ns/op 2.02
mainnet_e58758 - phase0 processEth1DataReset 803.00 ns/op 355.00 ns/op 2.26
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3876 ms/op 1.3193 ms/op 1.05
mainnet_e58758 - phase0 processSlashingsReset 4.1860 us/op 3.6550 us/op 1.15
mainnet_e58758 - phase0 processRandaoMixesReset 11.220 us/op 5.6320 us/op 1.99
mainnet_e58758 - phase0 processHistoricalRootsUpdate 784.00 ns/op 780.00 ns/op 1.01
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.9350 us/op 3.4200 us/op 1.44
mainnet_e58758 - phase0 afterProcessEpoch 68.720 ms/op 80.977 ms/op 0.85
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1010 ms/op 1.4293 ms/op 0.77
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9604 ms/op 2.5388 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 21.172 ms/op 20.376 ms/op 1.04
altair processInactivityUpdates - 250000 worstcase 19.291 ms/op 17.707 ms/op 1.09
phase0 processRegistryUpdates - 250000 normalcase 7.9050 us/op 6.5070 us/op 1.21
phase0 processRegistryUpdates - 250000 badcase_full_deposits 311.67 us/op 307.62 us/op 1.01
phase0 processRegistryUpdates - 250000 worstcase 0.5 122.34 ms/op 111.29 ms/op 1.10
altair processRewardsAndPenalties - 250000 normalcase 43.616 ms/op 42.327 ms/op 1.03
altair processRewardsAndPenalties - 250000 worstcase 43.950 ms/op 39.607 ms/op 1.11
phase0 getAttestationDeltas - 250000 normalcase 8.1655 ms/op 9.3194 ms/op 0.88
phase0 getAttestationDeltas - 250000 worstcase 6.4180 ms/op 8.1057 ms/op 0.79
phase0 processSlashings - 250000 worstcase 89.987 us/op 91.128 us/op 0.99
altair processSyncCommitteeUpdates - 250000 111.52 ms/op 127.86 ms/op 0.87
BeaconState.hashTreeRoot - No change 461.00 ns/op 262.00 ns/op 1.76
BeaconState.hashTreeRoot - 1 full validator 139.09 us/op 120.19 us/op 1.16
BeaconState.hashTreeRoot - 32 full validator 1.7248 ms/op 1.5826 ms/op 1.09
BeaconState.hashTreeRoot - 512 full validator 8.1684 ms/op 14.040 ms/op 0.58
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 95.404 us/op 147.79 us/op 0.65
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.2227 ms/op 2.0330 ms/op 0.60
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 25.367 ms/op 25.316 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 108.17 us/op 110.43 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 1.1346 ms/op 1.2342 ms/op 0.92
BeaconState.hashTreeRoot - 512 balances 11.087 ms/op 8.5594 ms/op 1.30
BeaconState.hashTreeRoot - 250000 balances 205.19 ms/op 162.87 ms/op 1.26
aggregationBits - 2048 els - zipIndexesInBitList 33.276 us/op 32.239 us/op 1.03
byteArrayEquals 32 48.075 ns/op 54.050 ns/op 0.89
Buffer.compare 32 15.636 ns/op 17.095 ns/op 0.91
byteArrayEquals 1024 1.2688 us/op 1.5669 us/op 0.81
Buffer.compare 1024 23.239 ns/op 24.171 ns/op 0.96
byteArrayEquals 16384 20.039 us/op 25.253 us/op 0.79
Buffer.compare 16384 168.03 ns/op 192.21 ns/op 0.87
byteArrayEquals 123687377 149.78 ms/op 189.29 ms/op 0.79
Buffer.compare 123687377 4.1945 ms/op 7.0977 ms/op 0.59
byteArrayEquals 32 - diff last byte 47.061 ns/op 52.108 ns/op 0.90
Buffer.compare 32 - diff last byte 17.149 ns/op 17.632 ns/op 0.97
byteArrayEquals 1024 - diff last byte 1.2507 us/op 1.5739 us/op 0.79
Buffer.compare 1024 - diff last byte 25.232 ns/op 25.836 ns/op 0.98
byteArrayEquals 16384 - diff last byte 20.818 us/op 25.068 us/op 0.83
Buffer.compare 16384 - diff last byte 211.16 ns/op 188.99 ns/op 1.12
byteArrayEquals 123687377 - diff last byte 164.22 ms/op 188.59 ms/op 0.87
Buffer.compare 123687377 - diff last byte 8.5267 ms/op 6.2212 ms/op 1.37
byteArrayEquals 32 - random bytes 5.1520 ns/op 5.1170 ns/op 1.01
Buffer.compare 32 - random bytes 16.403 ns/op 16.939 ns/op 0.97
byteArrayEquals 1024 - random bytes 5.3010 ns/op 5.1180 ns/op 1.04
Buffer.compare 1024 - random bytes 15.978 ns/op 17.115 ns/op 0.93
byteArrayEquals 16384 - random bytes 5.1100 ns/op 5.0710 ns/op 1.01
Buffer.compare 16384 - random bytes 16.004 ns/op 16.993 ns/op 0.94
byteArrayEquals 123687377 - random bytes 8.2800 ns/op 6.3300 ns/op 1.31
Buffer.compare 123687377 - random bytes 19.160 ns/op 18.280 ns/op 1.05
regular array get 100000 times 31.838 us/op 40.121 us/op 0.79
wrappedArray get 100000 times 31.853 us/op 32.935 us/op 0.97
arrayWithProxy get 100000 times 10.100 ms/op 13.215 ms/op 0.76
ssz.Root.equals 41.393 ns/op 45.693 ns/op 0.91
byteArrayEquals 44.201 ns/op 45.157 ns/op 0.98
Buffer.compare 10.098 ns/op 10.340 ns/op 0.98
shuffle list - 16384 els 5.7741 ms/op 6.3542 ms/op 0.91
shuffle list - 250000 els 90.040 ms/op 91.212 ms/op 0.99
processSlot - 1 slots 14.646 us/op 12.280 us/op 1.19
processSlot - 32 slots 4.1331 ms/op 2.4032 ms/op 1.72
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 49.195 ms/op 36.441 ms/op 1.35
getCommitteeAssignments - req 1 vs - 250000 vc 2.3962 ms/op 2.1140 ms/op 1.13
getCommitteeAssignments - req 100 vs - 250000 vc 3.6954 ms/op 4.1296 ms/op 0.89
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8865 ms/op 4.3976 ms/op 0.88
findModifiedValidators - 10000 modified validators 377.14 ms/op 253.50 ms/op 1.49
findModifiedValidators - 1000 modified validators 275.51 ms/op 184.47 ms/op 1.49
findModifiedValidators - 100 modified validators 269.63 ms/op 164.91 ms/op 1.64
findModifiedValidators - 10 modified validators 216.82 ms/op 161.12 ms/op 1.35
findModifiedValidators - 1 modified validators 240.92 ms/op 171.39 ms/op 1.41
findModifiedValidators - no difference 214.04 ms/op 157.35 ms/op 1.36
compare ViewDUs 3.8417 s/op 2.9784 s/op 1.29
compare each validator Uint8Array 1.5309 s/op 1.4062 s/op 1.09
compare ViewDU to Uint8Array 893.50 ms/op 1.1754 s/op 0.76
migrate state 1000000 validators, 24 modified, 0 new 824.39 ms/op 901.49 ms/op 0.91
migrate state 1000000 validators, 1700 modified, 1000 new 980.14 ms/op 1.2578 s/op 0.78
migrate state 1000000 validators, 3400 modified, 2000 new 1.1499 s/op 1.4842 s/op 0.77
migrate state 1500000 validators, 24 modified, 0 new 851.00 ms/op 1.0103 s/op 0.84
migrate state 1500000 validators, 1700 modified, 1000 new 1.1062 s/op 1.1858 s/op 0.93
migrate state 1500000 validators, 3400 modified, 2000 new 1.4384 s/op 1.3438 s/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 7.2700 ns/op 4.4800 ns/op 1.62
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0464 us/op 551.24 ns/op 1.90
computeProposers - vc 250000 7.4027 ms/op 7.4230 ms/op 1.00
computeEpochShuffling - vc 250000 83.286 ms/op 93.609 ms/op 0.89
getNextSyncCommittee - vc 250000 127.83 ms/op 128.87 ms/op 0.99
computeSigningRoot for AttestationData 20.441 us/op 24.198 us/op 0.84
hash AttestationData serialized data then Buffer.toString(base64) 1.2255 us/op 1.6127 us/op 0.76
toHexString serialized data 955.74 ns/op 912.88 ns/op 1.05
Buffer.toString(base64) 155.73 ns/op 196.14 ns/op 0.79
nodejs block root to RootHex using toHex 121.41 ns/op 153.37 ns/op 0.79
nodejs block root to RootHex using toRootHex 82.009 ns/op 97.550 ns/op 0.84
browser block root to RootHex using the deprecated toHexString 215.73 ns/op 236.19 ns/op 0.91
browser block root to RootHex using toHex 168.41 ns/op 188.91 ns/op 0.89
browser block root to RootHex using toRootHex 153.23 ns/op 171.26 ns/op 0.89

by benchmarkbot/action

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.85%. Comparing base (cd98c23) to head (c4a42ce).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7101   +/-   ##
=========================================
  Coverage     50.84%   50.85%           
=========================================
  Files           597      597           
  Lines         39835    39839    +4     
  Branches       2069     2059   -10     
=========================================
+ Hits          20256    20259    +3     
- Misses        19579    19580    +1     

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

yarn.lock Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
@nflaig nflaig merged commit d0ba6bc into unstable Sep 23, 2024
20 checks passed
@nflaig nflaig deleted the nflaig/fastify-v5 branch September 23, 2024 20:54
philknows pushed a commit that referenced this pull request Sep 27, 2024
* chore: upgrade fastify to v5

* Upgrade fastify plugins

* Clean up yarn lock
@wemeetagain
Copy link
Member

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