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: properly handle missing schema if route is not defined #6650

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Apr 7, 2024

Motivation

Follow up to previous PR #6626 which improves handling of missing schema if route is not defined.

The type provided by fastify is not correct as schema might be undefined which results in an uncaught exception if you call a route that does not exist.

We also had a type cast previously which was not correct and result in unlabeled metrics if someone called a route that does not exist.

Description

Properly handle missing schema if route is not defined

@nflaig nflaig requested a review from a team as a code owner April 7, 2024 17:55
Copy link
Contributor

github-actions bot commented Apr 7, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 1060a05 Previous: d450cce Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 584.11 us/op 560.17 us/op 1.04
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 88.165 us/op 51.206 us/op 1.72
BLS verify - blst-native 1.3435 ms/op 1.0744 ms/op 1.25
BLS verifyMultipleSignatures 3 - blst-native 2.8310 ms/op 2.2878 ms/op 1.24
BLS verifyMultipleSignatures 8 - blst-native 6.2131 ms/op 5.0565 ms/op 1.23
BLS verifyMultipleSignatures 32 - blst-native 22.729 ms/op 18.628 ms/op 1.22
BLS verifyMultipleSignatures 64 - blst-native 44.756 ms/op 38.018 ms/op 1.18
BLS verifyMultipleSignatures 128 - blst-native 88.734 ms/op 74.829 ms/op 1.19
BLS deserializing 10000 signatures 916.45 ms/op 814.89 ms/op 1.12
BLS deserializing 100000 signatures 9.5285 s/op 8.1736 s/op 1.17
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3360 ms/op 1.1516 ms/op 1.16
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4981 ms/op 1.2947 ms/op 1.16
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.8394 ms/op 2.3506 ms/op 1.21
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.0967 ms/op 3.6251 ms/op 1.13
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.6891 ms/op 5.0359 ms/op 1.13
BLS aggregatePubkeys 32 - blst-native 26.141 us/op 22.674 us/op 1.15
BLS aggregatePubkeys 128 - blst-native 99.728 us/op 88.968 us/op 1.12
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 64.767 ms/op 53.117 ms/op 1.22
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 62.093 ms/op 67.137 ms/op 0.92
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 37.923 ms/op 30.289 ms/op 1.25
getSlashingsAndExits - default max 237.66 us/op 243.77 us/op 0.97
getSlashingsAndExits - 2k 432.27 us/op 348.15 us/op 1.24
proposeBlockBody type=full, size=empty 5.9737 ms/op 4.1355 ms/op 1.44
isKnown best case - 1 super set check 330.00 ns/op 317.00 ns/op 1.04
isKnown normal case - 2 super set checks 325.00 ns/op 320.00 ns/op 1.02
isKnown worse case - 16 super set checks 328.00 ns/op 312.00 ns/op 1.05
InMemoryCheckpointStateCache - add get delete 7.3680 us/op 3.9430 us/op 1.87
validate api signedAggregateAndProof - struct 2.7631 ms/op 2.4428 ms/op 1.13
validate gossip signedAggregateAndProof - struct 2.7735 ms/op 2.4379 ms/op 1.14
validate gossip attestation - vc 640000 1.3852 ms/op 1.1519 ms/op 1.20
batch validate gossip attestation - vc 640000 - chunk 32 166.07 us/op 142.95 us/op 1.16
batch validate gossip attestation - vc 640000 - chunk 64 144.51 us/op 123.69 us/op 1.17
batch validate gossip attestation - vc 640000 - chunk 128 134.65 us/op 118.99 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 256 135.96 us/op 115.35 us/op 1.18
pickEth1Vote - no votes 1.2875 ms/op 838.83 us/op 1.53
pickEth1Vote - max votes 10.532 ms/op 9.5294 ms/op 1.11
pickEth1Vote - Eth1Data hashTreeRoot value x2048 20.679 ms/op 12.598 ms/op 1.64
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.255 ms/op 17.575 ms/op 1.61
pickEth1Vote - Eth1Data fastSerialize value x2048 654.88 us/op 434.21 us/op 1.51
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.7959 ms/op 4.9946 ms/op 1.16
bytes32 toHexString 584.00 ns/op 507.00 ns/op 1.15
bytes32 Buffer.toString(hex) 317.00 ns/op 320.00 ns/op 0.99
bytes32 Buffer.toString(hex) from Uint8Array 479.00 ns/op 491.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 311.00 ns/op 325.00 ns/op 0.96
Object access 1 prop 0.17800 ns/op 0.22300 ns/op 0.80
Map access 1 prop 0.16000 ns/op 0.20400 ns/op 0.78
Object get x1000 7.2670 ns/op 4.8690 ns/op 1.49
Map get x1000 0.80800 ns/op 0.72300 ns/op 1.12
Object set x1000 52.703 ns/op 27.248 ns/op 1.93
Map set x1000 41.574 ns/op 18.087 ns/op 2.30
Return object 10000 times 0.24550 ns/op 0.22360 ns/op 1.10
Throw Error 10000 times 3.9392 us/op 2.6784 us/op 1.47
fastMsgIdFn sha256 / 200 bytes 3.3510 us/op 2.0210 us/op 1.66
fastMsgIdFn h32 xxhash / 200 bytes 308.00 ns/op 344.00 ns/op 0.90
fastMsgIdFn h64 xxhash / 200 bytes 356.00 ns/op 391.00 ns/op 0.91
fastMsgIdFn sha256 / 1000 bytes 11.513 us/op 6.4820 us/op 1.78
fastMsgIdFn h32 xxhash / 1000 bytes 419.00 ns/op 421.00 ns/op 1.00
fastMsgIdFn h64 xxhash / 1000 bytes 435.00 ns/op 432.00 ns/op 1.01
fastMsgIdFn sha256 / 10000 bytes 105.92 us/op 53.274 us/op 1.99
fastMsgIdFn h32 xxhash / 10000 bytes 2.0130 us/op 1.8790 us/op 1.07
fastMsgIdFn h64 xxhash / 10000 bytes 1.3920 us/op 1.2770 us/op 1.09
send data - 1000 256B messages 18.902 ms/op 10.818 ms/op 1.75
send data - 1000 512B messages 28.956 ms/op 13.948 ms/op 2.08
send data - 1000 1024B messages 40.676 ms/op 25.728 ms/op 1.58
send data - 1000 1200B messages 38.430 ms/op 30.279 ms/op 1.27
send data - 1000 2048B messages 48.958 ms/op 39.762 ms/op 1.23
send data - 1000 4096B messages 46.516 ms/op 35.584 ms/op 1.31
send data - 1000 16384B messages 116.54 ms/op 98.798 ms/op 1.18
send data - 1000 65536B messages 417.65 ms/op 397.93 ms/op 1.05
enrSubnets - fastDeserialize 64 bits 1.5980 us/op 998.00 ns/op 1.60
enrSubnets - ssz BitVector 64 bits 522.00 ns/op 464.00 ns/op 1.13
enrSubnets - fastDeserialize 4 bits 210.00 ns/op 243.00 ns/op 0.86
enrSubnets - ssz BitVector 4 bits 472.00 ns/op 504.00 ns/op 0.94
prioritizePeers score -10:0 att 32-0.1 sync 2-0 115.27 us/op 74.391 us/op 1.55
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 146.73 us/op 83.994 us/op 1.75
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 183.63 us/op 142.05 us/op 1.29
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 334.28 us/op 220.25 us/op 1.52
prioritizePeers score 0:0 att 64-1 sync 4-1 349.26 us/op 219.75 us/op 1.59
array of 16000 items push then shift 1.6362 us/op 1.2436 us/op 1.32
LinkedList of 16000 items push then shift 8.9940 ns/op 7.0110 ns/op 1.28
array of 16000 items push then pop 100.68 ns/op 78.230 ns/op 1.29
LinkedList of 16000 items push then pop 9.3870 ns/op 5.7270 ns/op 1.64
array of 24000 items push then shift 2.4472 us/op 1.8392 us/op 1.33
LinkedList of 24000 items push then shift 9.3860 ns/op 6.9590 ns/op 1.35
array of 24000 items push then pop 149.87 ns/op 107.58 ns/op 1.39
LinkedList of 24000 items push then pop 9.1180 ns/op 5.8720 ns/op 1.55
intersect bitArray bitLen 8 6.2880 ns/op 4.6240 ns/op 1.36
intersect array and set length 8 71.542 ns/op 50.285 ns/op 1.42
intersect bitArray bitLen 128 36.252 ns/op 28.759 ns/op 1.26
intersect array and set length 128 1.0111 us/op 675.46 ns/op 1.50
bitArray.getTrueBitIndexes() bitLen 128 1.7410 us/op 1.2720 us/op 1.37
bitArray.getTrueBitIndexes() bitLen 248 2.9900 us/op 1.9640 us/op 1.52
bitArray.getTrueBitIndexes() bitLen 512 5.9490 us/op 4.2660 us/op 1.39
Buffer.concat 32 items 1.1090 us/op 841.00 ns/op 1.32
Uint8Array.set 32 items 2.3510 us/op 1.4130 us/op 1.66
Set add up to 64 items then delete first 4.4658 us/op 1.6923 us/op 2.64
OrderedSet add up to 64 items then delete first 5.6609 us/op 2.5582 us/op 2.21
Set add up to 64 items then delete last 5.3421 us/op 1.8955 us/op 2.82
OrderedSet add up to 64 items then delete last 6.4199 us/op 2.8894 us/op 2.22
Set add up to 64 items then delete middle 4.6893 us/op 1.9396 us/op 2.42
OrderedSet add up to 64 items then delete middle 7.4329 us/op 4.0804 us/op 1.82
Set add up to 128 items then delete first 9.4230 us/op 3.7184 us/op 2.53
OrderedSet add up to 128 items then delete first 12.399 us/op 5.8774 us/op 2.11
Set add up to 128 items then delete last 10.014 us/op 3.6410 us/op 2.75
OrderedSet add up to 128 items then delete last 13.548 us/op 5.5056 us/op 2.46
Set add up to 128 items then delete middle 10.016 us/op 3.6746 us/op 2.73
OrderedSet add up to 128 items then delete middle 19.238 us/op 10.965 us/op 1.75
Set add up to 256 items then delete first 21.112 us/op 7.2624 us/op 2.91
OrderedSet add up to 256 items then delete first 24.389 us/op 11.712 us/op 2.08
Set add up to 256 items then delete last 21.037 us/op 7.1797 us/op 2.93
OrderedSet add up to 256 items then delete last 25.474 us/op 11.086 us/op 2.30
Set add up to 256 items then delete middle 19.800 us/op 7.1661 us/op 2.76
OrderedSet add up to 256 items then delete middle 49.577 us/op 30.057 us/op 1.65
transfer serialized Status (84 B) 1.9990 us/op 1.2620 us/op 1.58
copy serialized Status (84 B) 1.4200 us/op 1.0230 us/op 1.39
transfer serialized SignedVoluntaryExit (112 B) 2.0390 us/op 1.2990 us/op 1.57
copy serialized SignedVoluntaryExit (112 B) 1.4790 us/op 1.0350 us/op 1.43
transfer serialized ProposerSlashing (416 B) 2.2620 us/op 1.4060 us/op 1.61
copy serialized ProposerSlashing (416 B) 1.8500 us/op 1.2210 us/op 1.52
transfer serialized Attestation (485 B) 2.1070 us/op 1.4400 us/op 1.46
copy serialized Attestation (485 B) 2.0430 us/op 1.3630 us/op 1.50
transfer serialized AttesterSlashing (33232 B) 2.4190 us/op 1.6270 us/op 1.49
copy serialized AttesterSlashing (33232 B) 6.7820 us/op 4.4630 us/op 1.52
transfer serialized Small SignedBeaconBlock (128000 B) 2.5650 us/op 1.9050 us/op 1.35
copy serialized Small SignedBeaconBlock (128000 B) 16.829 us/op 12.572 us/op 1.34
transfer serialized Avg SignedBeaconBlock (200000 B) 3.4190 us/op 2.0190 us/op 1.69
copy serialized Avg SignedBeaconBlock (200000 B) 29.320 us/op 20.972 us/op 1.40
transfer serialized BlobsSidecar (524380 B) 3.4380 us/op 1.9290 us/op 1.78
copy serialized BlobsSidecar (524380 B) 99.483 us/op 114.15 us/op 0.87
transfer serialized Big SignedBeaconBlock (1000000 B) 4.5820 us/op 2.1680 us/op 2.11
copy serialized Big SignedBeaconBlock (1000000 B) 322.86 us/op 158.80 us/op 2.03
pass gossip attestations to forkchoice per slot 4.0635 ms/op 2.6128 ms/op 1.56
forkChoice updateHead vc 100000 bc 64 eq 0 707.48 us/op 449.11 us/op 1.58
forkChoice updateHead vc 600000 bc 64 eq 0 5.0056 ms/op 2.8892 ms/op 1.73
forkChoice updateHead vc 1000000 bc 64 eq 0 7.8799 ms/op 4.5177 ms/op 1.74
forkChoice updateHead vc 600000 bc 320 eq 0 4.2879 ms/op 2.6116 ms/op 1.64
forkChoice updateHead vc 600000 bc 1200 eq 0 4.4009 ms/op 2.7203 ms/op 1.62
forkChoice updateHead vc 600000 bc 7200 eq 0 5.4589 ms/op 3.7270 ms/op 1.46
forkChoice updateHead vc 600000 bc 64 eq 1000 11.220 ms/op 9.7074 ms/op 1.16
forkChoice updateHead vc 600000 bc 64 eq 10000 11.935 ms/op 9.5907 ms/op 1.24
forkChoice updateHead vc 600000 bc 64 eq 300000 17.218 ms/op 12.660 ms/op 1.36
computeDeltas 500000 validators 300 proto nodes 7.0662 ms/op 3.0327 ms/op 2.33
computeDeltas 500000 validators 1200 proto nodes 6.6901 ms/op 2.9381 ms/op 2.28
computeDeltas 500000 validators 7200 proto nodes 6.6797 ms/op 3.0324 ms/op 2.20
computeDeltas 750000 validators 300 proto nodes 9.9964 ms/op 4.7737 ms/op 2.09
computeDeltas 750000 validators 1200 proto nodes 9.9701 ms/op 4.6139 ms/op 2.16
computeDeltas 750000 validators 7200 proto nodes 10.259 ms/op 4.8907 ms/op 2.10
computeDeltas 1400000 validators 300 proto nodes 19.469 ms/op 9.2248 ms/op 2.11
computeDeltas 1400000 validators 1200 proto nodes 20.253 ms/op 9.0639 ms/op 2.23
computeDeltas 1400000 validators 7200 proto nodes 19.457 ms/op 9.0440 ms/op 2.15
computeDeltas 2100000 validators 300 proto nodes 29.008 ms/op 12.922 ms/op 2.24
computeDeltas 2100000 validators 1200 proto nodes 28.536 ms/op 13.702 ms/op 2.08
computeDeltas 2100000 validators 7200 proto nodes 28.822 ms/op 13.305 ms/op 2.17
altair processAttestation - 250000 vs - 7PWei normalcase 2.8433 ms/op 2.1715 ms/op 1.31
altair processAttestation - 250000 vs - 7PWei worstcase 4.3960 ms/op 2.9785 ms/op 1.48
altair processAttestation - setStatus - 1/6 committees join 230.56 us/op 85.707 us/op 2.69
altair processAttestation - setStatus - 1/3 committees join 393.31 us/op 157.69 us/op 2.49
altair processAttestation - setStatus - 1/2 committees join 516.20 us/op 217.50 us/op 2.37
altair processAttestation - setStatus - 2/3 committees join 629.20 us/op 303.30 us/op 2.07
altair processAttestation - setStatus - 4/5 committees join 922.43 us/op 437.24 us/op 2.11
altair processAttestation - setStatus - 100% committees join 1.0282 ms/op 500.06 us/op 2.06
altair processBlock - 250000 vs - 7PWei normalcase 9.8940 ms/op 7.5214 ms/op 1.32
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.101 ms/op 31.242 ms/op 1.22
altair processBlock - 250000 vs - 7PWei worstcase 46.968 ms/op 37.383 ms/op 1.26
altair processBlock - 250000 vs - 7PWei worstcase hashState 104.04 ms/op 79.244 ms/op 1.31
phase0 processBlock - 250000 vs - 7PWei normalcase 3.2941 ms/op 2.2441 ms/op 1.47
phase0 processBlock - 250000 vs - 7PWei worstcase 32.521 ms/op 28.446 ms/op 1.14
altair processEth1Data - 250000 vs - 7PWei normalcase 639.10 us/op 405.11 us/op 1.58
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 17.540 us/op 12.575 us/op 1.39
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 91.278 us/op 38.920 us/op 2.35
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 35.085 us/op 32.084 us/op 1.09
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 20.499 us/op 13.837 us/op 1.48
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 245.17 us/op 171.33 us/op 1.43
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.8228 ms/op 918.73 us/op 1.98
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.1536 ms/op 1.0888 ms/op 1.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.2379 ms/op 1.5384 ms/op 1.45
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.2841 ms/op 2.3880 ms/op 1.79
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.3803 ms/op 1.8783 ms/op 1.80
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.9589 ms/op 4.2364 ms/op 1.64
Tree 40 250000 create 505.38 ms/op 302.58 ms/op 1.67
Tree 40 250000 get(125000) 213.51 ns/op 125.76 ns/op 1.70
Tree 40 250000 set(125000) 1.2462 us/op 828.57 ns/op 1.50
Tree 40 250000 toArray() 23.663 ms/op 20.075 ms/op 1.18
Tree 40 250000 iterate all - toArray() + loop 24.118 ms/op 22.489 ms/op 1.07
Tree 40 250000 iterate all - get(i) 78.055 ms/op 50.771 ms/op 1.54
MutableVector 250000 create 18.422 ms/op 14.482 ms/op 1.27
MutableVector 250000 get(125000) 6.8230 ns/op 5.6470 ns/op 1.21
MutableVector 250000 set(125000) 349.97 ns/op 226.51 ns/op 1.55
MutableVector 250000 toArray() 4.0472 ms/op 2.6870 ms/op 1.51
MutableVector 250000 iterate all - toArray() + loop 4.1223 ms/op 2.3895 ms/op 1.73
MutableVector 250000 iterate all - get(i) 1.5844 ms/op 1.3624 ms/op 1.16
Array 250000 create 3.8276 ms/op 2.3410 ms/op 1.63
Array 250000 clone - spread 1.4058 ms/op 1.1563 ms/op 1.22
Array 250000 get(125000) 1.1880 ns/op 1.0700 ns/op 1.11
Array 250000 set(125000) 5.2010 ns/op 1.2880 ns/op 4.04
Array 250000 iterate all - loop 174.00 us/op 160.03 us/op 1.09
effectiveBalanceIncrements clone Uint8Array 300000 48.991 us/op 14.367 us/op 3.41
effectiveBalanceIncrements clone MutableVector 300000 422.00 ns/op 424.00 ns/op 1.00
effectiveBalanceIncrements rw all Uint8Array 300000 211.24 us/op 192.26 us/op 1.10
effectiveBalanceIncrements rw all MutableVector 300000 99.563 ms/op 68.411 ms/op 1.46
phase0 afterProcessEpoch - 250000 vs - 7PWei 122.15 ms/op 80.306 ms/op 1.52
phase0 beforeProcessEpoch - 250000 vs - 7PWei 63.392 ms/op 47.709 ms/op 1.33
altair processEpoch - mainnet_e81889 592.59 ms/op 399.27 ms/op 1.48
mainnet_e81889 - altair beforeProcessEpoch 100.02 ms/op 73.335 ms/op 1.36
mainnet_e81889 - altair processJustificationAndFinalization 21.016 us/op 13.251 us/op 1.59
mainnet_e81889 - altair processInactivityUpdates 6.5315 ms/op 6.8844 ms/op 0.95
mainnet_e81889 - altair processRewardsAndPenalties 69.091 ms/op 63.718 ms/op 1.08
mainnet_e81889 - altair processRegistryUpdates 4.1610 us/op 1.8850 us/op 2.21
mainnet_e81889 - altair processSlashings 533.00 ns/op 727.00 ns/op 0.73
mainnet_e81889 - altair processEth1DataReset 712.00 ns/op 690.00 ns/op 1.03
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7826 ms/op 1.0127 ms/op 1.76
mainnet_e81889 - altair processSlashingsReset 8.7400 us/op 2.7200 us/op 3.21
mainnet_e81889 - altair processRandaoMixesReset 6.9210 us/op 1.8440 us/op 3.75
mainnet_e81889 - altair processHistoricalRootsUpdate 884.00 ns/op 714.00 ns/op 1.24
mainnet_e81889 - altair processParticipationFlagUpdates 3.6140 us/op 1.5740 us/op 2.30
mainnet_e81889 - altair processSyncCommitteeUpdates 871.00 ns/op 608.00 ns/op 1.43
mainnet_e81889 - altair afterProcessEpoch 125.57 ms/op 82.185 ms/op 1.53
capella processEpoch - mainnet_e217614 2.2557 s/op 1.8952 s/op 1.19
mainnet_e217614 - capella beforeProcessEpoch 587.27 ms/op 527.44 ms/op 1.11
mainnet_e217614 - capella processJustificationAndFinalization 30.590 us/op 14.665 us/op 2.09
mainnet_e217614 - capella processInactivityUpdates 25.609 ms/op 23.147 ms/op 1.11
mainnet_e217614 - capella processRewardsAndPenalties 664.23 ms/op 602.36 ms/op 1.10
mainnet_e217614 - capella processRegistryUpdates 39.921 us/op 28.580 us/op 1.40
mainnet_e217614 - capella processSlashings 1.8100 us/op 1.4980 us/op 1.21
mainnet_e217614 - capella processEth1DataReset 816.00 ns/op 850.00 ns/op 0.96
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.6111 ms/op 3.6186 ms/op 1.55
mainnet_e217614 - capella processSlashingsReset 7.8650 us/op 4.2880 us/op 1.83
mainnet_e217614 - capella processRandaoMixesReset 7.7330 us/op 3.3950 us/op 2.28
mainnet_e217614 - capella processHistoricalRootsUpdate 1.4590 us/op 1.3990 us/op 1.04
mainnet_e217614 - capella processParticipationFlagUpdates 6.7620 us/op 3.6820 us/op 1.84
mainnet_e217614 - capella afterProcessEpoch 408.89 ms/op 210.24 ms/op 1.94
phase0 processEpoch - mainnet_e58758 614.75 ms/op 436.11 ms/op 1.41
mainnet_e58758 - phase0 beforeProcessEpoch 192.04 ms/op 133.31 ms/op 1.44
mainnet_e58758 - phase0 processJustificationAndFinalization 32.188 us/op 18.243 us/op 1.76
mainnet_e58758 - phase0 processRewardsAndPenalties 95.243 ms/op 61.974 ms/op 1.54
mainnet_e58758 - phase0 processRegistryUpdates 23.528 us/op 14.758 us/op 1.59
mainnet_e58758 - phase0 processSlashings 1.5530 us/op 1.7080 us/op 0.91
mainnet_e58758 - phase0 processEth1DataReset 963.00 ns/op 577.00 ns/op 1.67
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9333 ms/op 1.4520 ms/op 1.33
mainnet_e58758 - phase0 processSlashingsReset 7.6300 us/op 4.1530 us/op 1.84
mainnet_e58758 - phase0 processRandaoMixesReset 9.8200 us/op 3.4080 us/op 2.88
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.2300 us/op 806.00 ns/op 1.53
mainnet_e58758 - phase0 processParticipationRecordUpdates 8.0360 us/op 6.4960 us/op 1.24
mainnet_e58758 - phase0 afterProcessEpoch 122.94 ms/op 72.769 ms/op 1.69
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.2001 ms/op 1.1132 ms/op 1.98
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.4396 ms/op 1.2582 ms/op 1.94
altair processInactivityUpdates - 250000 normalcase 42.868 ms/op 33.245 ms/op 1.29
altair processInactivityUpdates - 250000 worstcase 29.597 ms/op 30.890 ms/op 0.96
phase0 processRegistryUpdates - 250000 normalcase 18.194 us/op 14.047 us/op 1.30
phase0 processRegistryUpdates - 250000 badcase_full_deposits 597.50 us/op 417.86 us/op 1.43
phase0 processRegistryUpdates - 250000 worstcase 0.5 170.69 ms/op 134.45 ms/op 1.27
altair processRewardsAndPenalties - 250000 normalcase 82.295 ms/op 66.612 ms/op 1.24
altair processRewardsAndPenalties - 250000 worstcase 77.025 ms/op 68.896 ms/op 1.12
phase0 getAttestationDeltas - 250000 normalcase 14.452 ms/op 9.2309 ms/op 1.57
phase0 getAttestationDeltas - 250000 worstcase 14.383 ms/op 10.438 ms/op 1.38
phase0 processSlashings - 250000 worstcase 151.93 us/op 92.287 us/op 1.65
altair processSyncCommitteeUpdates - 250000 179.45 ms/op 129.03 ms/op 1.39
BeaconState.hashTreeRoot - No change 1.0500 us/op 724.00 ns/op 1.45
BeaconState.hashTreeRoot - 1 full validator 181.72 us/op 145.26 us/op 1.25
BeaconState.hashTreeRoot - 32 full validator 1.9572 ms/op 1.8497 ms/op 1.06
BeaconState.hashTreeRoot - 512 full validator 17.155 ms/op 20.410 ms/op 0.84
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 190.86 us/op 185.93 us/op 1.03
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.7935 ms/op 2.4926 ms/op 1.12
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 30.932 ms/op 31.508 ms/op 0.98
BeaconState.hashTreeRoot - 1 balances 149.22 us/op 161.66 us/op 0.92
BeaconState.hashTreeRoot - 32 balances 1.2945 ms/op 945.91 us/op 1.37
BeaconState.hashTreeRoot - 512 balances 12.333 ms/op 7.6245 ms/op 1.62
BeaconState.hashTreeRoot - 250000 balances 215.16 ms/op 159.50 ms/op 1.35
aggregationBits - 2048 els - zipIndexesInBitList 32.210 us/op 21.176 us/op 1.52
byteArrayEquals 32 80.952 ns/op 66.793 ns/op 1.21
Buffer.compare 32 57.537 ns/op 40.490 ns/op 1.42
byteArrayEquals 1024 2.1182 us/op 1.8726 us/op 1.13
Buffer.compare 1024 73.127 ns/op 46.021 ns/op 1.59
byteArrayEquals 16384 33.821 us/op 29.111 us/op 1.16
Buffer.compare 16384 269.22 ns/op 242.84 ns/op 1.11
byteArrayEquals 123687377 259.43 ms/op 228.60 ms/op 1.13
Buffer.compare 123687377 7.3308 ms/op 8.2373 ms/op 0.89
byteArrayEquals 32 - diff last byte 80.592 ns/op 70.858 ns/op 1.14
Buffer.compare 32 - diff last byte 58.312 ns/op 44.987 ns/op 1.30
byteArrayEquals 1024 - diff last byte 2.0890 us/op 1.9822 us/op 1.05
Buffer.compare 1024 - diff last byte 74.384 ns/op 49.022 ns/op 1.52
byteArrayEquals 16384 - diff last byte 32.984 us/op 29.582 us/op 1.12
Buffer.compare 16384 - diff last byte 259.32 ns/op 246.53 ns/op 1.05
byteArrayEquals 123687377 - diff last byte 250.64 ms/op 212.27 ms/op 1.18
Buffer.compare 123687377 - diff last byte 8.9390 ms/op 7.6694 ms/op 1.17
byteArrayEquals 32 - random bytes 6.2940 ns/op 5.5880 ns/op 1.13
Buffer.compare 32 - random bytes 64.001 ns/op 40.667 ns/op 1.57
byteArrayEquals 1024 - random bytes 6.1650 ns/op 5.2230 ns/op 1.18
Buffer.compare 1024 - random bytes 63.640 ns/op 38.943 ns/op 1.63
byteArrayEquals 16384 - random bytes 5.7970 ns/op 5.3400 ns/op 1.09
Buffer.compare 16384 - random bytes 62.411 ns/op 39.684 ns/op 1.57
byteArrayEquals 123687377 - random bytes 9.1700 ns/op 8.6400 ns/op 1.06
Buffer.compare 123687377 - random bytes 76.510 ns/op 46.120 ns/op 1.66
regular array get 100000 times 47.276 us/op 43.277 us/op 1.09
wrappedArray get 100000 times 51.055 us/op 43.385 us/op 1.18
arrayWithProxy get 100000 times 15.340 ms/op 11.371 ms/op 1.35
ssz.Root.equals 59.087 ns/op 59.700 ns/op 0.99
byteArrayEquals 61.128 ns/op 58.619 ns/op 1.04
Buffer.compare 12.496 ns/op 10.694 ns/op 1.17
shuffle list - 16384 els 9.0409 ms/op 5.8489 ms/op 1.55
shuffle list - 250000 els 135.86 ms/op 88.324 ms/op 1.54
processSlot - 1 slots 21.660 us/op 16.996 us/op 1.27
processSlot - 32 slots 4.9168 ms/op 3.1387 ms/op 1.57
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 68.277 ms/op 47.926 ms/op 1.42
getCommitteeAssignments - req 1 vs - 250000 vc 2.7938 ms/op 2.4309 ms/op 1.15
getCommitteeAssignments - req 100 vs - 250000 vc 4.0518 ms/op 3.5183 ms/op 1.15
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6308 ms/op 3.8023 ms/op 1.22
findModifiedValidators - 10000 modified validators 439.42 ms/op 305.35 ms/op 1.44
findModifiedValidators - 1000 modified validators 291.79 ms/op 177.24 ms/op 1.65
findModifiedValidators - 100 modified validators 222.76 ms/op 169.23 ms/op 1.32
findModifiedValidators - 10 modified validators 196.66 ms/op 147.90 ms/op 1.33
findModifiedValidators - 1 modified validators 239.16 ms/op 174.54 ms/op 1.37
findModifiedValidators - no difference 244.36 ms/op 199.36 ms/op 1.23
compare ViewDUs 5.0399 s/op 3.9256 s/op 1.28
compare each validator Uint8Array 1.9186 s/op 1.5542 s/op 1.23
compare ViewDU to Uint8Array 1.4502 s/op 836.02 ms/op 1.73
migrate state 1000000 validators, 24 modified, 0 new 827.51 ms/op 633.84 ms/op 1.31
migrate state 1000000 validators, 1700 modified, 1000 new 1.1481 s/op 913.80 ms/op 1.26
migrate state 1000000 validators, 3400 modified, 2000 new 1.6407 s/op 1.1501 s/op 1.43
migrate state 1500000 validators, 24 modified, 0 new 983.09 ms/op 642.25 ms/op 1.53
migrate state 1500000 validators, 1700 modified, 1000 new 1.3170 s/op 957.19 ms/op 1.38
migrate state 1500000 validators, 3400 modified, 2000 new 1.4422 s/op 1.0070 s/op 1.43
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.8700 ns/op 4.8300 ns/op 1.22
state getBlockRootAtSlot - 250000 vs - 7PWei 1.1542 us/op 650.98 ns/op 1.77
computeProposers - vc 250000 11.633 ms/op 6.1814 ms/op 1.88
computeEpochShuffling - vc 250000 142.01 ms/op 89.176 ms/op 1.59
getNextSyncCommittee - vc 250000 198.37 ms/op 103.81 ms/op 1.91
computeSigningRoot for AttestationData 35.944 us/op 26.241 us/op 1.37
hash AttestationData serialized data then Buffer.toString(base64) 2.4150 us/op 1.3250 us/op 1.82
toHexString serialized data 1.5064 us/op 806.59 ns/op 1.87
Buffer.toString(base64) 302.38 ns/op 184.87 ns/op 1.64

by benchmarkbot/action

Looks like `request.routeSchema` will be deprecated (runtime only warning)

(node:7) [FSTDEP015] DeprecationWarning: You are accessing the deprecated "request.routeSchema" property.
Use "request.routeOptions.schema" instead. Property "req.routeSchema" will be removed in `fastify@5`.
Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Merging #6650 (5cf5c2a) into unstable (f2ec0d4) will not change coverage.
Report is 5 commits behind head on unstable.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6650   +/-   ##
=========================================
  Coverage     61.69%   61.69%           
=========================================
  Files           556      556           
  Lines         58820    58820           
  Branches       1887     1887           
=========================================
  Hits          36287    36287           
  Misses        22492    22492           
  Partials         41       41           

Copy link
Contributor

@jeluard jeluard left a comment

Choose a reason for hiding this comment

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

Might be worth creating an issue on fastify repo too

@nflaig
Copy link
Member Author

nflaig commented Apr 8, 2024

Might be worth creating an issue on fastify repo too

Done fastify/fastify#5393

@nflaig nflaig merged commit 7fadd30 into unstable Apr 8, 2024
20 checks passed
@nflaig nflaig deleted the nflaig/handle-no-schema-req branch April 8, 2024 22:21
@wemeetagain
Copy link
Member

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

None yet

3 participants