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: update HTTP error response format to be spec compliant #7110

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Sep 26, 2024

Motivation

Description

  • convert error responses to consistent format as defined by beacon-api spec
  • log 404 errors as warnings (currently silently ignored since we don't use fastify built-in logger)
  • log JSON schema validation errors as warn instead of error
  • add option to include stacktraces in HTTP error responses (by setting --rest.stacktraces CLI flag)

Closes #6480

@nflaig nflaig requested a review from a team as a code owner September 26, 2024 16:31
wemeetagain
wemeetagain previously approved these changes Sep 26, 2024
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

Copy link
Contributor

github-actions bot commented Sep 26, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 88c0771 Previous: bf60786 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.1383 ms/op 1.7725 ms/op 1.21
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 48.110 us/op 37.860 us/op 1.27
BLS verify - blst 1.0299 ms/op 893.40 us/op 1.15
BLS verifyMultipleSignatures 3 - blst 1.3305 ms/op 1.7107 ms/op 0.78
BLS verifyMultipleSignatures 8 - blst 1.9317 ms/op 1.9509 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst 6.0341 ms/op 4.2600 ms/op 1.42
BLS verifyMultipleSignatures 64 - blst 10.758 ms/op 8.2356 ms/op 1.31
BLS verifyMultipleSignatures 128 - blst 17.851 ms/op 15.511 ms/op 1.15
BLS deserializing 10000 signatures 702.64 ms/op 593.58 ms/op 1.18
BLS deserializing 100000 signatures 7.9095 s/op 6.1357 s/op 1.29
BLS verifyMultipleSignatures - same message - 3 - blst 1.3030 ms/op 985.92 us/op 1.32
BLS verifyMultipleSignatures - same message - 8 - blst 1.3319 ms/op 1.0911 ms/op 1.22
BLS verifyMultipleSignatures - same message - 32 - blst 2.4121 ms/op 1.6556 ms/op 1.46
BLS verifyMultipleSignatures - same message - 64 - blst 3.7075 ms/op 2.4183 ms/op 1.53
BLS verifyMultipleSignatures - same message - 128 - blst 5.5473 ms/op 3.9903 ms/op 1.39
BLS aggregatePubkeys 32 - blst 22.428 us/op 17.660 us/op 1.27
BLS aggregatePubkeys 128 - blst 78.799 us/op 60.736 us/op 1.30
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 91.415 ms/op 64.202 ms/op 1.42
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 66.389 ms/op 43.586 ms/op 1.52
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 54.685 ms/op 32.628 ms/op 1.68
getSlashingsAndExits - default max 204.57 us/op 71.269 us/op 2.87
getSlashingsAndExits - 2k 596.56 us/op 243.81 us/op 2.45
proposeBlockBody type=full, size=empty 7.6184 ms/op 5.0919 ms/op 1.50
isKnown best case - 1 super set check 921.00 ns/op 501.00 ns/op 1.84
isKnown normal case - 2 super set checks 945.00 ns/op 461.00 ns/op 2.05
isKnown worse case - 16 super set checks 1.0270 us/op 468.00 ns/op 2.19
InMemoryCheckpointStateCache - add get delete 5.7920 us/op 2.8170 us/op 2.06
updateUnfinalizedPubkeys - updating 10 pubkeys 2.1335 ms/op 1.2399 ms/op 1.72
updateUnfinalizedPubkeys - updating 100 pubkeys 6.6771 ms/op 3.2239 ms/op 2.07
updateUnfinalizedPubkeys - updating 1000 pubkeys 82.532 ms/op 40.109 ms/op 2.06
validate api signedAggregateAndProof - struct 2.1412 ms/op 1.5448 ms/op 1.39
validate gossip signedAggregateAndProof - struct 2.2800 ms/op 1.7758 ms/op 1.28
validate gossip attestation - vc 640000 1.4372 ms/op 973.18 us/op 1.48
batch validate gossip attestation - vc 640000 - chunk 32 205.60 us/op 114.55 us/op 1.79
batch validate gossip attestation - vc 640000 - chunk 64 123.09 us/op 95.666 us/op 1.29
batch validate gossip attestation - vc 640000 - chunk 128 109.50 us/op 96.930 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 256 112.11 us/op 90.762 us/op 1.24
pickEth1Vote - no votes 1.2022 ms/op 800.58 us/op 1.50
pickEth1Vote - max votes 9.8398 ms/op 4.2318 ms/op 2.33
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.188 ms/op 9.2263 ms/op 1.86
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 26.407 ms/op 13.752 ms/op 1.92
pickEth1Vote - Eth1Data fastSerialize value x2048 534.43 us/op 329.91 us/op 1.62
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.5774 ms/op 1.8613 ms/op 1.92
bytes32 toHexString 650.00 ns/op 563.00 ns/op 1.15
bytes32 Buffer.toString(hex) 261.00 ns/op 428.00 ns/op 0.61
bytes32 Buffer.toString(hex) from Uint8Array 475.00 ns/op 520.00 ns/op 0.91
bytes32 Buffer.toString(hex) + 0x 259.00 ns/op 423.00 ns/op 0.61
Object access 1 prop 0.14900 ns/op 0.30800 ns/op 0.48
Map access 1 prop 0.13100 ns/op 0.30500 ns/op 0.43
Object get x1000 6.1390 ns/op 4.7880 ns/op 1.28
Map get x1000 6.4560 ns/op 5.5950 ns/op 1.15
Object set x1000 34.288 ns/op 25.151 ns/op 1.36
Map set x1000 26.084 ns/op 18.667 ns/op 1.40
Return object 10000 times 0.30620 ns/op 0.28630 ns/op 1.07
Throw Error 10000 times 3.4882 us/op 2.5585 us/op 1.36
toHex 171.77 ns/op 100.89 ns/op 1.70
Buffer.from 159.99 ns/op 95.521 ns/op 1.67
shared Buffer 99.408 ns/op 63.900 ns/op 1.56
fastMsgIdFn sha256 / 200 bytes 2.3150 us/op 1.8810 us/op 1.23
fastMsgIdFn h32 xxhash / 200 bytes 307.00 ns/op 393.00 ns/op 0.78
fastMsgIdFn h64 xxhash / 200 bytes 274.00 ns/op 434.00 ns/op 0.63
fastMsgIdFn sha256 / 1000 bytes 7.4590 us/op 5.4930 us/op 1.36
fastMsgIdFn h32 xxhash / 1000 bytes 389.00 ns/op 511.00 ns/op 0.76
fastMsgIdFn h64 xxhash / 1000 bytes 345.00 ns/op 507.00 ns/op 0.68
fastMsgIdFn sha256 / 10000 bytes 64.627 us/op 46.280 us/op 1.40
fastMsgIdFn h32 xxhash / 10000 bytes 1.9580 us/op 1.8350 us/op 1.07
fastMsgIdFn h64 xxhash / 10000 bytes 1.2210 us/op 1.2850 us/op 0.95
send data - 1000 256B messages 12.354 ms/op 9.3224 ms/op 1.33
send data - 1000 512B messages 18.411 ms/op 13.147 ms/op 1.40
send data - 1000 1024B messages 29.585 ms/op 23.413 ms/op 1.26
send data - 1000 1200B messages 27.862 ms/op 22.890 ms/op 1.22
send data - 1000 2048B messages 33.488 ms/op 29.629 ms/op 1.13
send data - 1000 4096B messages 34.103 ms/op 25.649 ms/op 1.33
send data - 1000 16384B messages 82.622 ms/op 65.331 ms/op 1.26
send data - 1000 65536B messages 232.20 ms/op 238.55 ms/op 0.97
enrSubnets - fastDeserialize 64 bits 1.1080 us/op 1.1350 us/op 0.98
enrSubnets - ssz BitVector 64 bits 394.00 ns/op 530.00 ns/op 0.74
enrSubnets - fastDeserialize 4 bits 179.00 ns/op 349.00 ns/op 0.51
enrSubnets - ssz BitVector 4 bits 425.00 ns/op 534.00 ns/op 0.80
prioritizePeers score -10:0 att 32-0.1 sync 2-0 173.86 us/op 120.97 us/op 1.44
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 208.34 us/op 147.56 us/op 1.41
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 265.96 us/op 268.79 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 487.70 us/op 473.57 us/op 1.03
prioritizePeers score 0:0 att 64-1 sync 4-1 849.00 us/op 448.62 us/op 1.89
array of 16000 items push then shift 1.7107 us/op 1.2796 us/op 1.34
LinkedList of 16000 items push then shift 9.3210 ns/op 6.2920 ns/op 1.48
array of 16000 items push then pop 153.55 ns/op 75.958 ns/op 2.02
LinkedList of 16000 items push then pop 7.5570 ns/op 6.1310 ns/op 1.23
array of 24000 items push then shift 2.5035 us/op 1.8762 us/op 1.33
LinkedList of 24000 items push then shift 8.0400 ns/op 6.2660 ns/op 1.28
array of 24000 items push then pop 180.19 ns/op 106.50 ns/op 1.69
LinkedList of 24000 items push then pop 7.7590 ns/op 6.0300 ns/op 1.29
intersect bitArray bitLen 8 6.4730 ns/op 5.0860 ns/op 1.27
intersect array and set length 8 54.207 ns/op 36.012 ns/op 1.51
intersect bitArray bitLen 128 30.566 ns/op 24.801 ns/op 1.23
intersect array and set length 128 793.61 ns/op 533.86 ns/op 1.49
bitArray.getTrueBitIndexes() bitLen 128 2.5020 us/op 2.2920 us/op 1.09
bitArray.getTrueBitIndexes() bitLen 248 4.5490 us/op 3.2270 us/op 1.41
bitArray.getTrueBitIndexes() bitLen 512 8.5060 us/op 6.4240 us/op 1.32
Buffer.concat 32 items 1.0050 us/op 978.00 ns/op 1.03
Uint8Array.set 32 items 1.6930 us/op 1.7320 us/op 0.98
Buffer.copy 1.9580 us/op 1.8880 us/op 1.04
Uint8Array.set - with subarray 2.9510 us/op 2.4960 us/op 1.18
Uint8Array.set - without subarray 1.7890 us/op 1.6700 us/op 1.07
getUint32 - dataview 311.00 ns/op 412.00 ns/op 0.75
getUint32 - manual 263.00 ns/op 343.00 ns/op 0.77
Set add up to 64 items then delete first 3.0183 us/op 1.8455 us/op 1.64
OrderedSet add up to 64 items then delete first 4.4894 us/op 2.8647 us/op 1.57
Set add up to 64 items then delete last 2.9741 us/op 2.0953 us/op 1.42
OrderedSet add up to 64 items then delete last 4.3322 us/op 3.1607 us/op 1.37
Set add up to 64 items then delete middle 2.8970 us/op 2.1011 us/op 1.38
OrderedSet add up to 64 items then delete middle 5.7518 us/op 4.3454 us/op 1.32
Set add up to 128 items then delete first 5.7090 us/op 3.7705 us/op 1.51
OrderedSet add up to 128 items then delete first 7.9154 us/op 5.9257 us/op 1.34
Set add up to 128 items then delete last 6.0917 us/op 3.6443 us/op 1.67
OrderedSet add up to 128 items then delete last 7.9181 us/op 5.5940 us/op 1.42
Set add up to 128 items then delete middle 5.6694 us/op 3.6430 us/op 1.56
OrderedSet add up to 128 items then delete middle 15.658 us/op 11.109 us/op 1.41
Set add up to 256 items then delete first 12.648 us/op 7.4357 us/op 1.70
OrderedSet add up to 256 items then delete first 16.308 us/op 11.913 us/op 1.37
Set add up to 256 items then delete last 10.255 us/op 7.2251 us/op 1.42
OrderedSet add up to 256 items then delete last 16.823 us/op 11.245 us/op 1.50
Set add up to 256 items then delete middle 10.891 us/op 7.7943 us/op 1.40
OrderedSet add up to 256 items then delete middle 45.670 us/op 34.228 us/op 1.33
transfer serialized Status (84 B) 1.4360 us/op 1.3510 us/op 1.06
copy serialized Status (84 B) 1.2670 us/op 1.1550 us/op 1.10
transfer serialized SignedVoluntaryExit (112 B) 1.5080 us/op 1.5150 us/op 1.00
copy serialized SignedVoluntaryExit (112 B) 1.2560 us/op 1.1950 us/op 1.05
transfer serialized ProposerSlashing (416 B) 1.7550 us/op 2.2810 us/op 0.77
copy serialized ProposerSlashing (416 B) 2.4260 us/op 2.0300 us/op 1.20
transfer serialized Attestation (485 B) 2.1840 us/op 2.1000 us/op 1.04
copy serialized Attestation (485 B) 1.8280 us/op 1.9780 us/op 0.92
transfer serialized AttesterSlashing (33232 B) 2.0560 us/op 2.2920 us/op 0.90
copy serialized AttesterSlashing (33232 B) 8.7460 us/op 4.5220 us/op 1.93
transfer serialized Small SignedBeaconBlock (128000 B) 3.0230 us/op 2.7270 us/op 1.11
copy serialized Small SignedBeaconBlock (128000 B) 21.397 us/op 10.159 us/op 2.11
transfer serialized Avg SignedBeaconBlock (200000 B) 4.4930 us/op 3.2920 us/op 1.36
copy serialized Avg SignedBeaconBlock (200000 B) 28.151 us/op 14.058 us/op 2.00
transfer serialized BlobsSidecar (524380 B) 3.2910 us/op 3.2200 us/op 1.02
copy serialized BlobsSidecar (524380 B) 132.83 us/op 75.342 us/op 1.76
transfer serialized Big SignedBeaconBlock (1000000 B) 3.6400 us/op 3.4810 us/op 1.05
copy serialized Big SignedBeaconBlock (1000000 B) 155.73 us/op 135.16 us/op 1.15
pass gossip attestations to forkchoice per slot 3.1839 ms/op 2.2705 ms/op 1.40
forkChoice updateHead vc 100000 bc 64 eq 0 525.09 us/op 372.04 us/op 1.41
forkChoice updateHead vc 600000 bc 64 eq 0 3.3575 ms/op 2.5074 ms/op 1.34
forkChoice updateHead vc 1000000 bc 64 eq 0 6.4155 ms/op 3.9867 ms/op 1.61
forkChoice updateHead vc 600000 bc 320 eq 0 4.4081 ms/op 2.3261 ms/op 1.90
forkChoice updateHead vc 600000 bc 1200 eq 0 3.8321 ms/op 2.3320 ms/op 1.64
forkChoice updateHead vc 600000 bc 7200 eq 0 4.2622 ms/op 2.9664 ms/op 1.44
forkChoice updateHead vc 600000 bc 64 eq 1000 11.102 ms/op 8.9068 ms/op 1.25
forkChoice updateHead vc 600000 bc 64 eq 10000 11.237 ms/op 8.8146 ms/op 1.27
forkChoice updateHead vc 600000 bc 64 eq 300000 15.192 ms/op 11.360 ms/op 1.34
computeDeltas 500000 validators 300 proto nodes 3.9494 ms/op 2.9554 ms/op 1.34
computeDeltas 500000 validators 1200 proto nodes 3.9973 ms/op 2.9110 ms/op 1.37
computeDeltas 500000 validators 7200 proto nodes 4.1862 ms/op 2.8986 ms/op 1.44
computeDeltas 750000 validators 300 proto nodes 5.9366 ms/op 4.3639 ms/op 1.36
computeDeltas 750000 validators 1200 proto nodes 6.0641 ms/op 4.3820 ms/op 1.38
computeDeltas 750000 validators 7200 proto nodes 6.2023 ms/op 4.3820 ms/op 1.42
computeDeltas 1400000 validators 300 proto nodes 10.430 ms/op 8.0802 ms/op 1.29
computeDeltas 1400000 validators 1200 proto nodes 11.042 ms/op 8.0391 ms/op 1.37
computeDeltas 1400000 validators 7200 proto nodes 10.445 ms/op 8.2811 ms/op 1.26
computeDeltas 2100000 validators 300 proto nodes 18.039 ms/op 12.164 ms/op 1.48
computeDeltas 2100000 validators 1200 proto nodes 17.072 ms/op 12.203 ms/op 1.40
computeDeltas 2100000 validators 7200 proto nodes 16.150 ms/op 12.658 ms/op 1.28
altair processAttestation - 250000 vs - 7PWei normalcase 2.2742 ms/op 1.4604 ms/op 1.56
altair processAttestation - 250000 vs - 7PWei worstcase 2.8332 ms/op 2.1987 ms/op 1.29
altair processAttestation - setStatus - 1/6 committees join 90.623 us/op 72.164 us/op 1.26
altair processAttestation - setStatus - 1/3 committees join 176.86 us/op 140.18 us/op 1.26
altair processAttestation - setStatus - 1/2 committees join 250.34 us/op 201.80 us/op 1.24
altair processAttestation - setStatus - 2/3 committees join 325.44 us/op 270.17 us/op 1.20
altair processAttestation - setStatus - 4/5 committees join 460.87 us/op 393.25 us/op 1.17
altair processAttestation - setStatus - 100% committees join 555.25 us/op 478.96 us/op 1.16
altair processBlock - 250000 vs - 7PWei normalcase 7.1876 ms/op 3.4566 ms/op 2.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.844 ms/op 22.045 ms/op 1.35
altair processBlock - 250000 vs - 7PWei worstcase 39.541 ms/op 31.650 ms/op 1.25
altair processBlock - 250000 vs - 7PWei worstcase hashState 81.229 ms/op 65.917 ms/op 1.23
phase0 processBlock - 250000 vs - 7PWei normalcase 2.7259 ms/op 1.6852 ms/op 1.62
phase0 processBlock - 250000 vs - 7PWei worstcase 26.600 ms/op 21.956 ms/op 1.21
altair processEth1Data - 250000 vs - 7PWei normalcase 320.50 us/op 239.48 us/op 1.34
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.9390 us/op 5.3580 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 38.613 us/op 29.010 us/op 1.33
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 13.144 us/op 8.2160 us/op 1.60
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.8100 us/op 3.3570 us/op 2.03
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 156.71 us/op 130.59 us/op 1.20
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1323 ms/op 796.80 us/op 1.42
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3050 ms/op 1.0540 ms/op 2.19
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5010 ms/op 1.2295 ms/op 1.22
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6280 ms/op 2.8773 ms/op 1.26
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0109 ms/op 1.0999 ms/op 1.83
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6151 ms/op 2.8862 ms/op 1.25
Tree 40 250000 create 229.92 ms/op 181.91 ms/op 1.26
Tree 40 250000 get(125000) 154.40 ns/op 105.40 ns/op 1.46
Tree 40 250000 set(125000) 654.56 ns/op 546.82 ns/op 1.20
Tree 40 250000 toArray() 16.493 ms/op 12.549 ms/op 1.31
Tree 40 250000 iterate all - toArray() + loop 15.976 ms/op 13.414 ms/op 1.19
Tree 40 250000 iterate all - get(i) 52.860 ms/op 40.266 ms/op 1.31
Array 250000 create 2.8319 ms/op 2.2797 ms/op 1.24
Array 250000 clone - spread 1.4516 ms/op 1.0724 ms/op 1.35
Array 250000 get(125000) 0.42100 ns/op 0.57100 ns/op 0.74
Array 250000 set(125000) 0.45200 ns/op 0.57500 ns/op 0.79
Array 250000 iterate all - loop 83.713 us/op 72.179 us/op 1.16
phase0 afterProcessEpoch - 250000 vs - 7PWei 90.295 ms/op 75.667 ms/op 1.19
Array.fill - length 1000000 3.6318 ms/op 2.3876 ms/op 1.52
Array push - length 1000000 16.996 ms/op 15.229 ms/op 1.12
Array.get 0.28215 ns/op 0.25526 ns/op 1.11
Uint8Array.get 0.43496 ns/op 0.34187 ns/op 1.27
phase0 beforeProcessEpoch - 250000 vs - 7PWei 18.068 ms/op 12.622 ms/op 1.43
altair processEpoch - mainnet_e81889 339.17 ms/op 314.54 ms/op 1.08
mainnet_e81889 - altair beforeProcessEpoch 19.128 ms/op 16.895 ms/op 1.13
mainnet_e81889 - altair processJustificationAndFinalization 17.346 us/op 12.113 us/op 1.43
mainnet_e81889 - altair processInactivityUpdates 6.2192 ms/op 4.1838 ms/op 1.49
mainnet_e81889 - altair processRewardsAndPenalties 51.611 ms/op 51.486 ms/op 1.00
mainnet_e81889 - altair processRegistryUpdates 2.9180 us/op 1.6040 us/op 1.82
mainnet_e81889 - altair processSlashings 461.00 ns/op 650.00 ns/op 0.71
mainnet_e81889 - altair processEth1DataReset 458.00 ns/op 681.00 ns/op 0.67
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.8640 ms/op 1.0471 ms/op 1.78
mainnet_e81889 - altair processSlashingsReset 4.4670 us/op 1.2690 us/op 3.52
mainnet_e81889 - altair processRandaoMixesReset 9.4560 us/op 1.5590 us/op 6.07
mainnet_e81889 - altair processHistoricalRootsUpdate 908.00 ns/op 406.00 ns/op 2.24
mainnet_e81889 - altair processParticipationFlagUpdates 2.3370 us/op 3.0360 us/op 0.77
mainnet_e81889 - altair processSyncCommitteeUpdates 459.00 ns/op 751.00 ns/op 0.61
mainnet_e81889 - altair afterProcessEpoch 93.816 ms/op 72.847 ms/op 1.29
capella processEpoch - mainnet_e217614 1.3956 s/op 1.0752 s/op 1.30
mainnet_e217614 - capella beforeProcessEpoch 80.492 ms/op 62.126 ms/op 1.30
mainnet_e217614 - capella processJustificationAndFinalization 22.453 us/op 6.5530 us/op 3.43
mainnet_e217614 - capella processInactivityUpdates 18.458 ms/op 14.947 ms/op 1.23
mainnet_e217614 - capella processRewardsAndPenalties 251.05 ms/op 266.30 ms/op 0.94
mainnet_e217614 - capella processRegistryUpdates 16.124 us/op 6.8980 us/op 2.34
mainnet_e217614 - capella processSlashings 760.00 ns/op 437.00 ns/op 1.74
mainnet_e217614 - capella processEth1DataReset 475.00 ns/op 430.00 ns/op 1.10
mainnet_e217614 - capella processEffectiveBalanceUpdates 13.845 ms/op 5.7529 ms/op 2.41
mainnet_e217614 - capella processSlashingsReset 5.3060 us/op 2.5450 us/op 2.08
mainnet_e217614 - capella processRandaoMixesReset 7.0570 us/op 3.0930 us/op 2.28
mainnet_e217614 - capella processHistoricalRootsUpdate 1.8000 us/op 678.00 ns/op 2.65
mainnet_e217614 - capella processParticipationFlagUpdates 3.6540 us/op 1.3880 us/op 2.63
mainnet_e217614 - capella afterProcessEpoch 352.69 ms/op 181.99 ms/op 1.94
phase0 processEpoch - mainnet_e58758 503.46 ms/op 333.05 ms/op 1.51
mainnet_e58758 - phase0 beforeProcessEpoch 155.08 ms/op 76.500 ms/op 2.03
mainnet_e58758 - phase0 processJustificationAndFinalization 41.269 us/op 11.884 us/op 3.47
mainnet_e58758 - phase0 processRewardsAndPenalties 47.128 ms/op 35.906 ms/op 1.31
mainnet_e58758 - phase0 processRegistryUpdates 11.789 us/op 6.3220 us/op 1.86
mainnet_e58758 - phase0 processSlashings 697.00 ns/op 717.00 ns/op 0.97
mainnet_e58758 - phase0 processEth1DataReset 672.00 ns/op 734.00 ns/op 0.92
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.4563 ms/op 858.57 us/op 1.70
mainnet_e58758 - phase0 processSlashingsReset 4.3620 us/op 2.2260 us/op 1.96
mainnet_e58758 - phase0 processRandaoMixesReset 11.381 us/op 3.3230 us/op 3.42
mainnet_e58758 - phase0 processHistoricalRootsUpdate 619.00 ns/op 671.00 ns/op 0.92
mainnet_e58758 - phase0 processParticipationRecordUpdates 7.6450 us/op 2.7810 us/op 2.75
mainnet_e58758 - phase0 afterProcessEpoch 84.799 ms/op 58.701 ms/op 1.44
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9300 ms/op 950.60 us/op 2.03
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.9569 ms/op 1.6748 ms/op 1.77
altair processInactivityUpdates - 250000 normalcase 22.514 ms/op 18.625 ms/op 1.21
altair processInactivityUpdates - 250000 worstcase 20.153 ms/op 18.318 ms/op 1.10
phase0 processRegistryUpdates - 250000 normalcase 9.6530 us/op 5.8140 us/op 1.66
phase0 processRegistryUpdates - 250000 badcase_full_deposits 440.76 us/op 295.22 us/op 1.49
phase0 processRegistryUpdates - 250000 worstcase 0.5 137.24 ms/op 116.89 ms/op 1.17
altair processRewardsAndPenalties - 250000 normalcase 41.469 ms/op 45.762 ms/op 0.91
altair processRewardsAndPenalties - 250000 worstcase 38.331 ms/op 41.212 ms/op 0.93
phase0 getAttestationDeltas - 250000 normalcase 10.035 ms/op 6.1615 ms/op 1.63
phase0 getAttestationDeltas - 250000 worstcase 10.594 ms/op 5.6895 ms/op 1.86
phase0 processSlashings - 250000 worstcase 110.54 us/op 51.070 us/op 2.16
altair processSyncCommitteeUpdates - 250000 141.87 ms/op 96.301 ms/op 1.47
BeaconState.hashTreeRoot - No change 244.00 ns/op 428.00 ns/op 0.57
BeaconState.hashTreeRoot - 1 full validator 104.62 us/op 133.73 us/op 0.78
BeaconState.hashTreeRoot - 32 full validator 1.3429 ms/op 1.4531 ms/op 0.92
BeaconState.hashTreeRoot - 512 full validator 14.378 ms/op 13.092 ms/op 1.10
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 187.71 us/op 143.73 us/op 1.31
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2638 ms/op 1.7458 ms/op 1.30
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.138 ms/op 24.714 ms/op 1.14
BeaconState.hashTreeRoot - 1 balances 101.80 us/op 122.44 us/op 0.83
BeaconState.hashTreeRoot - 32 balances 1.2466 ms/op 1.1800 ms/op 1.06
BeaconState.hashTreeRoot - 512 balances 12.885 ms/op 7.1832 ms/op 1.79
BeaconState.hashTreeRoot - 250000 balances 232.13 ms/op 185.34 ms/op 1.25
aggregationBits - 2048 els - zipIndexesInBitList 34.788 us/op 19.551 us/op 1.78
byteArrayEquals 32 55.564 ns/op 44.929 ns/op 1.24
Buffer.compare 32 17.809 ns/op 14.435 ns/op 1.23
byteArrayEquals 1024 1.6513 us/op 1.2545 us/op 1.32
Buffer.compare 1024 27.707 ns/op 23.149 ns/op 1.20
byteArrayEquals 16384 26.384 us/op 19.910 us/op 1.33
Buffer.compare 16384 204.21 ns/op 187.22 ns/op 1.09
byteArrayEquals 123687377 196.50 ms/op 146.65 ms/op 1.34
Buffer.compare 123687377 8.2553 ms/op 4.1867 ms/op 1.97
byteArrayEquals 32 - diff last byte 53.563 ns/op 46.269 ns/op 1.16
Buffer.compare 32 - diff last byte 17.669 ns/op 16.602 ns/op 1.06
byteArrayEquals 1024 - diff last byte 1.6182 us/op 1.2553 us/op 1.29
Buffer.compare 1024 - diff last byte 25.703 ns/op 24.952 ns/op 1.03
byteArrayEquals 16384 - diff last byte 26.025 us/op 19.972 us/op 1.30
Buffer.compare 16384 - diff last byte 207.58 ns/op 193.10 ns/op 1.07
byteArrayEquals 123687377 - diff last byte 193.50 ms/op 150.10 ms/op 1.29
Buffer.compare 123687377 - diff last byte 7.7435 ms/op 4.2286 ms/op 1.83
byteArrayEquals 32 - random bytes 5.2390 ns/op 4.9450 ns/op 1.06
Buffer.compare 32 - random bytes 17.338 ns/op 16.500 ns/op 1.05
byteArrayEquals 1024 - random bytes 5.1640 ns/op 4.8520 ns/op 1.06
Buffer.compare 1024 - random bytes 17.411 ns/op 16.787 ns/op 1.04
byteArrayEquals 16384 - random bytes 5.2060 ns/op 4.8380 ns/op 1.08
Buffer.compare 16384 - random bytes 17.329 ns/op 15.961 ns/op 1.09
byteArrayEquals 123687377 - random bytes 6.5300 ns/op 7.7000 ns/op 0.85
Buffer.compare 123687377 - random bytes 18.630 ns/op 19.710 ns/op 0.95
regular array get 100000 times 42.491 us/op 30.236 us/op 1.41
wrappedArray get 100000 times 32.958 us/op 30.597 us/op 1.08
arrayWithProxy get 100000 times 13.478 ms/op 10.432 ms/op 1.29
ssz.Root.equals 46.341 ns/op 42.806 ns/op 1.08
byteArrayEquals 45.553 ns/op 36.742 ns/op 1.24
Buffer.compare 10.453 ns/op 8.4780 ns/op 1.23
shuffle list - 16384 els 6.4324 ms/op 5.4716 ms/op 1.18
shuffle list - 250000 els 91.302 ms/op 80.935 ms/op 1.13
processSlot - 1 slots 15.413 us/op 9.6150 us/op 1.60
processSlot - 32 slots 3.1651 ms/op 1.7932 ms/op 1.77
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 38.698 ms/op 34.521 ms/op 1.12
getCommitteeAssignments - req 1 vs - 250000 vc 2.0950 ms/op 1.7383 ms/op 1.21
getCommitteeAssignments - req 100 vs - 250000 vc 4.1735 ms/op 3.3761 ms/op 1.24
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5275 ms/op 3.6541 ms/op 1.24
findModifiedValidators - 10000 modified validators 348.55 ms/op 241.71 ms/op 1.44
findModifiedValidators - 1000 modified validators 203.81 ms/op 146.18 ms/op 1.39
findModifiedValidators - 100 modified validators 207.65 ms/op 139.44 ms/op 1.49
findModifiedValidators - 10 modified validators 195.27 ms/op 130.59 ms/op 1.50
findModifiedValidators - 1 modified validators 166.76 ms/op 117.05 ms/op 1.42
findModifiedValidators - no difference 164.03 ms/op 129.12 ms/op 1.27
compare ViewDUs 3.2655 s/op 3.2021 s/op 1.02
compare each validator Uint8Array 1.6864 s/op 1.5893 s/op 1.06
compare ViewDU to Uint8Array 1.2178 s/op 629.44 ms/op 1.93
migrate state 1000000 validators, 24 modified, 0 new 969.00 ms/op 796.46 ms/op 1.22
migrate state 1000000 validators, 1700 modified, 1000 new 1.2813 s/op 1.0315 s/op 1.24
migrate state 1000000 validators, 3400 modified, 2000 new 1.5273 s/op 1.2737 s/op 1.20
migrate state 1500000 validators, 24 modified, 0 new 1.0528 s/op 822.76 ms/op 1.28
migrate state 1500000 validators, 1700 modified, 1000 new 1.2884 s/op 1.0823 s/op 1.19
migrate state 1500000 validators, 3400 modified, 2000 new 1.3896 s/op 1.2984 s/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8000 ns/op 5.8800 ns/op 0.82
state getBlockRootAtSlot - 250000 vs - 7PWei 893.60 ns/op 957.95 ns/op 0.93
computeProposers - vc 250000 8.3885 ms/op 6.0749 ms/op 1.38
computeEpochShuffling - vc 250000 95.121 ms/op 79.464 ms/op 1.20
getNextSyncCommittee - vc 250000 143.67 ms/op 104.25 ms/op 1.38
computeSigningRoot for AttestationData 29.277 us/op 25.480 us/op 1.15
hash AttestationData serialized data then Buffer.toString(base64) 1.6057 us/op 1.1911 us/op 1.35
toHexString serialized data 891.63 ns/op 795.37 ns/op 1.12
Buffer.toString(base64) 189.23 ns/op 147.12 ns/op 1.29
nodejs block root to RootHex using toHex 145.69 ns/op 115.50 ns/op 1.26
nodejs block root to RootHex using toRootHex 95.128 ns/op 76.278 ns/op 1.25
browser block root to RootHex using the deprecated toHexString 228.54 ns/op 212.63 ns/op 1.07
browser block root to RootHex using toHex 184.04 ns/op 165.91 ns/op 1.11
browser block root to RootHex using toRootHex 162.22 ns/op 149.85 ns/op 1.08

by benchmarkbot/action

@nflaig nflaig merged commit bf4a25f into unstable Oct 2, 2024
20 checks passed
@nflaig nflaig deleted the nflaig/api-error-response branch October 2, 2024 15:24
philknows pushed a commit that referenced this pull request Oct 18, 2024
* fix: update HTTP error response format to be spec compliant

* Fix error assertions

* Remove group tag from keymanager option

* Fix body has already been read

* Assert deepEqual
@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.

API error responses are not spec compliant
2 participants