ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.11k stars 273 forks source link

fix: default to http status text if error response is empty #6898

Closed nflaig closed 1 week ago

nflaig commented 1 week ago

Motivation

Noticed Grandine does not return any error response, not even a text/plain response. To improve UX for such cases, we can default to http status text to avoid empty error messages.

Description

Default to http status text if error response is empty

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.

Project coverage is 62.75%. Comparing base (85dc0ba) to head (382b188).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## unstable #6898 +/- ## ============================================ - Coverage 62.75% 62.75% -0.01% ============================================ Files 578 578 Lines 61354 61355 +1 Branches 2125 2119 -6 ============================================ - Hits 38505 38504 -1 - Misses 22811 22813 +2 Partials 38 38 ```
github-actions[bot] commented 1 week ago

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: d441a0f73a86ac47e93a81bbea583868cdef26b0 Previous: 85dc0ba06d1adaf05df0e4aac8f74dee267c9625 Ratio
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 3.2400 us/op 13.027 us/op 0.25
Full benchmark results | Benchmark suite | Current: d441a0f73a86ac47e93a81bbea583868cdef26b0 | Previous: 85dc0ba06d1adaf05df0e4aac8f74dee267c9625 | Ratio | |-|-|-|-| | getPubkeys - index2pubkey - req 1000 vs - 250000 vc | 698.43 us/op | 690.61 us/op | 1.01 | | getPubkeys - validatorsArr - req 1000 vs - 250000 vc | 42.518 us/op | 59.595 us/op | 0.71 | | BLS verify - blst-native | 1.1400 ms/op | 1.2121 ms/op | 0.94 | | BLS verifyMultipleSignatures 3 - blst-native | 2.4443 ms/op | 2.6717 ms/op | 0.91 | | BLS verifyMultipleSignatures 8 - blst-native | 5.3959 ms/op | 6.0055 ms/op | 0.90 | | BLS verifyMultipleSignatures 32 - blst-native | 19.714 ms/op | 21.554 ms/op | 0.91 | | BLS verifyMultipleSignatures 64 - blst-native | 38.644 ms/op | 42.636 ms/op | 0.91 | | BLS verifyMultipleSignatures 128 - blst-native | 77.059 ms/op | 83.979 ms/op | 0.92 | | BLS deserializing 10000 signatures | 784.50 ms/op | 892.84 ms/op | 0.88 | | BLS deserializing 100000 signatures | 8.1367 s/op | 8.7870 s/op | 0.93 | | BLS verifyMultipleSignatures - same message - 3 - blst-native | 1.1428 ms/op | 1.2521 ms/op | 0.91 | | BLS verifyMultipleSignatures - same message - 8 - blst-native | 1.2692 ms/op | 1.4302 ms/op | 0.89 | | BLS verifyMultipleSignatures - same message - 32 - blst-native | 2.0402 ms/op | 2.4767 ms/op | 0.82 | | BLS verifyMultipleSignatures - same message - 64 - blst-native | 3.4945 ms/op | 3.3679 ms/op | 1.04 | | BLS verifyMultipleSignatures - same message - 128 - blst-native | 5.0288 ms/op | 5.5798 ms/op | 0.90 | | BLS aggregatePubkeys 32 - blst-native | 23.090 us/op | 25.537 us/op | 0.90 | | BLS aggregatePubkeys 128 - blst-native | 89.657 us/op | 100.35 us/op | 0.89 | | notSeenSlots=1 numMissedVotes=1 numBadVotes=10 | 46.492 ms/op | 83.305 ms/op | 0.56 | | notSeenSlots=1 numMissedVotes=0 numBadVotes=4 | 57.280 ms/op | 62.188 ms/op | 0.92 | | notSeenSlots=2 numMissedVotes=1 numBadVotes=10 | 31.856 ms/op | 36.313 ms/op | 0.88 | | getSlashingsAndExits - default max | 90.943 us/op | 117.95 us/op | 0.77 | | getSlashingsAndExits - 2k | 298.47 us/op | 401.94 us/op | 0.74 | | proposeBlockBody type=full, size=empty | 5.2227 ms/op | 6.0188 ms/op | 0.87 | | isKnown best case - 1 super set check | 491.00 ns/op | 417.00 ns/op | 1.18 | | isKnown normal case - 2 super set checks | 492.00 ns/op | 339.00 ns/op | 1.45 | | isKnown worse case - 16 super set checks | 485.00 ns/op | 542.00 ns/op | 0.89 | | InMemoryCheckpointStateCache - add get delete | 4.2710 us/op | 5.9680 us/op | 0.72 | | validate api signedAggregateAndProof - struct | 2.4815 ms/op | 2.6852 ms/op | 0.92 | | validate gossip signedAggregateAndProof - struct | 2.6585 ms/op | 2.6938 ms/op | 0.99 | | validate gossip attestation - vc 640000 | 1.1937 ms/op | 1.3205 ms/op | 0.90 | | batch validate gossip attestation - vc 640000 - chunk 32 | 140.08 us/op | 158.72 us/op | 0.88 | | batch validate gossip attestation - vc 640000 - chunk 64 | 121.55 us/op | 146.43 us/op | 0.83 | | batch validate gossip attestation - vc 640000 - chunk 128 | 114.64 us/op | 141.37 us/op | 0.81 | | batch validate gossip attestation - vc 640000 - chunk 256 | 116.52 us/op | 128.71 us/op | 0.91 | | pickEth1Vote - no votes | 964.40 us/op | 1.1482 ms/op | 0.84 | | pickEth1Vote - max votes | 8.7534 ms/op | 9.1169 ms/op | 0.96 | | pickEth1Vote - Eth1Data hashTreeRoot value x2048 | 12.436 ms/op | 13.285 ms/op | 0.94 | | pickEth1Vote - Eth1Data hashTreeRoot tree x2048 | 18.645 ms/op | 21.102 ms/op | 0.88 | | pickEth1Vote - Eth1Data fastSerialize value x2048 | 390.38 us/op | 599.25 us/op | 0.65 | | pickEth1Vote - Eth1Data fastSerialize tree x2048 | 6.4264 ms/op | 5.9634 ms/op | 1.08 | | bytes32 toHexString | 592.00 ns/op | 506.00 ns/op | 1.17 | | bytes32 Buffer.toString(hex) | 434.00 ns/op | 259.00 ns/op | 1.68 | | bytes32 Buffer.toString(hex) from Uint8Array | 554.00 ns/op | 414.00 ns/op | 1.34 | | bytes32 Buffer.toString(hex) + 0x | 456.00 ns/op | 258.00 ns/op | 1.77 | | Object access 1 prop | 0.37100 ns/op | 0.17600 ns/op | 2.11 | | Map access 1 prop | 0.30900 ns/op | 0.14300 ns/op | 2.16 | | Object get x1000 | 5.1550 ns/op | 5.9870 ns/op | 0.86 | | Map get x1000 | 5.4680 ns/op | 6.6280 ns/op | 0.82 | | Object set x1000 | 25.544 ns/op | 43.551 ns/op | 0.59 | | Map set x1000 | 20.244 ns/op | 31.794 ns/op | 0.64 | | Return object 10000 times | 0.29420 ns/op | 0.30500 ns/op | 0.96 | | Throw Error 10000 times | 2.6775 us/op | 3.5720 us/op | 0.75 | | fastMsgIdFn sha256 / 200 bytes | 2.0860 us/op | 2.3290 us/op | 0.90 | | fastMsgIdFn h32 xxhash / 200 bytes | 486.00 ns/op | 294.00 ns/op | 1.65 | | fastMsgIdFn h64 xxhash / 200 bytes | 452.00 ns/op | 278.00 ns/op | 1.63 | | fastMsgIdFn sha256 / 1000 bytes | 5.9830 us/op | 7.5330 us/op | 0.79 | | fastMsgIdFn h32 xxhash / 1000 bytes | 597.00 ns/op | 427.00 ns/op | 1.40 | | fastMsgIdFn h64 xxhash / 1000 bytes | 526.00 ns/op | 368.00 ns/op | 1.43 | | fastMsgIdFn sha256 / 10000 bytes | 49.023 us/op | 65.753 us/op | 0.75 | | fastMsgIdFn h32 xxhash / 10000 bytes | 1.9390 us/op | 1.9380 us/op | 1.00 | | fastMsgIdFn h64 xxhash / 10000 bytes | 1.3410 us/op | 1.2360 us/op | 1.08 | | send data - 1000 256B messages | 12.124 ms/op | 14.969 ms/op | 0.81 | | send data - 1000 512B messages | 16.116 ms/op | 19.406 ms/op | 0.83 | | send data - 1000 1024B messages | 22.311 ms/op | 30.814 ms/op | 0.72 | | send data - 1000 1200B messages | 25.855 ms/op | 31.142 ms/op | 0.83 | | send data - 1000 2048B messages | 31.220 ms/op | 34.665 ms/op | 0.90 | | send data - 1000 4096B messages | 27.571 ms/op | 32.112 ms/op | 0.86 | | send data - 1000 16384B messages | 74.551 ms/op | 74.738 ms/op | 1.00 | | send data - 1000 65536B messages | 258.13 ms/op | 227.45 ms/op | 1.13 | | enrSubnets - fastDeserialize 64 bits | 1.4720 us/op | 1.5930 us/op | 0.92 | | enrSubnets - ssz BitVector 64 bits | 617.00 ns/op | 491.00 ns/op | 1.26 | | enrSubnets - fastDeserialize 4 bits | 388.00 ns/op | 205.00 ns/op | 1.89 | | enrSubnets - ssz BitVector 4 bits | 626.00 ns/op | 471.00 ns/op | 1.33 | | prioritizePeers score -10:0 att 32-0.1 sync 2-0 | 171.83 us/op | 192.01 us/op | 0.89 | | prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 | 135.96 us/op | 247.13 us/op | 0.55 | | prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 | 308.22 us/op | 331.26 us/op | 0.93 | | prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 | 479.19 us/op | 464.45 us/op | 1.03 | | prioritizePeers score 0:0 att 64-1 sync 4-1 | 726.23 us/op | 953.29 us/op | 0.76 | | array of 16000 items push then shift | 1.3200 us/op | 1.6987 us/op | 0.78 | | LinkedList of 16000 items push then shift | 7.2280 ns/op | 8.4820 ns/op | 0.85 | | array of 16000 items push then pop | 88.393 ns/op | 138.51 ns/op | 0.64 | | LinkedList of 16000 items push then pop | 6.3550 ns/op | 7.5710 ns/op | 0.84 | | array of 24000 items push then shift | 1.9792 us/op | 2.4913 us/op | 0.79 | | LinkedList of 24000 items push then shift | 6.8500 ns/op | 8.7920 ns/op | 0.78 | | array of 24000 items push then pop | 120.71 ns/op | 185.48 ns/op | 0.65 | | LinkedList of 24000 items push then pop | 6.4370 ns/op | 7.6770 ns/op | 0.84 | | intersect bitArray bitLen 8 | 5.6410 ns/op | 6.6700 ns/op | 0.85 | | intersect array and set length 8 | 38.678 ns/op | 57.823 ns/op | 0.67 | | intersect bitArray bitLen 128 | 27.039 ns/op | 30.683 ns/op | 0.88 | | intersect array and set length 128 | 584.38 ns/op | 868.11 ns/op | 0.67 | | bitArray.getTrueBitIndexes() bitLen 128 | 2.0300 us/op | 2.4020 us/op | 0.85 | | bitArray.getTrueBitIndexes() bitLen 248 | 2.6670 us/op | 4.2040 us/op | 0.63 | | bitArray.getTrueBitIndexes() bitLen 512 | 6.6120 us/op | 9.8450 us/op | 0.67 | | Buffer.concat 32 items | 1.0230 us/op | 1.1200 us/op | 0.91 | | Uint8Array.set 32 items | 1.5480 us/op | 1.7500 us/op | 0.88 | | Buffer.copy | 1.7010 us/op | 2.2510 us/op | 0.76 | | Uint8Array.set - with subarray | 2.1170 us/op | 3.3760 us/op | 0.63 | | Uint8Array.set - without subarray | 1.5940 us/op | 1.9030 us/op | 0.84 | | Set add up to 64 items then delete first | 1.7904 us/op | 2.9501 us/op | 0.61 | | OrderedSet add up to 64 items then delete first | 2.7840 us/op | 4.3869 us/op | 0.63 | | Set add up to 64 items then delete last | 2.0450 us/op | 3.2033 us/op | 0.64 | | OrderedSet add up to 64 items then delete last | 3.0884 us/op | 4.8707 us/op | 0.63 | | Set add up to 64 items then delete middle | 2.2443 us/op | 3.2282 us/op | 0.70 | | OrderedSet add up to 64 items then delete middle | 4.8829 us/op | 6.4181 us/op | 0.76 | | Set add up to 128 items then delete first | 4.0035 us/op | 5.9231 us/op | 0.68 | | OrderedSet add up to 128 items then delete first | 6.3005 us/op | 9.4965 us/op | 0.66 | | Set add up to 128 items then delete last | 3.8738 us/op | 6.3418 us/op | 0.61 | | OrderedSet add up to 128 items then delete last | 5.9159 us/op | 8.9225 us/op | 0.66 | | Set add up to 128 items then delete middle | 3.9314 us/op | 6.0864 us/op | 0.65 | | OrderedSet add up to 128 items then delete middle | 12.022 us/op | 15.846 us/op | 0.76 | | Set add up to 256 items then delete first | 7.8791 us/op | 12.066 us/op | 0.65 | | OrderedSet add up to 256 items then delete first | 12.729 us/op | 21.423 us/op | 0.59 | | Set add up to 256 items then delete last | 7.6059 us/op | 13.210 us/op | 0.58 | | OrderedSet add up to 256 items then delete last | 12.285 us/op | 20.476 us/op | 0.60 | | Set add up to 256 items then delete middle | 7.3487 us/op | 12.659 us/op | 0.58 | | OrderedSet add up to 256 items then delete middle | 35.441 us/op | 49.633 us/op | 0.71 | | transfer serialized Status (84 B) | 1.5330 us/op | 1.7080 us/op | 0.90 | | copy serialized Status (84 B) | 1.3420 us/op | 1.4410 us/op | 0.93 | | transfer serialized SignedVoluntaryExit (112 B) | 1.6570 us/op | 1.7990 us/op | 0.92 | | copy serialized SignedVoluntaryExit (112 B) | 1.2940 us/op | 1.4710 us/op | 0.88 | | transfer serialized ProposerSlashing (416 B) | 1.5350 us/op | 2.5190 us/op | 0.61 | | copy serialized ProposerSlashing (416 B) | 1.7770 us/op | 2.2940 us/op | 0.77 | | transfer serialized Attestation (485 B) | 1.9130 us/op | 2.3490 us/op | 0.81 | | copy serialized Attestation (485 B) | 2.3230 us/op | 2.2010 us/op | 1.06 | | transfer serialized AttesterSlashing (33232 B) | 2.6490 us/op | 2.0420 us/op | 1.30 | | copy serialized AttesterSlashing (33232 B) | 6.8730 us/op | 7.6960 us/op | 0.89 | | transfer serialized Small SignedBeaconBlock (128000 B) | 1.9960 us/op | 2.9690 us/op | 0.67 | | copy serialized Small SignedBeaconBlock (128000 B) | 14.489 us/op | 25.452 us/op | 0.57 | | transfer serialized Avg SignedBeaconBlock (200000 B) | 1.9470 us/op | 3.4460 us/op | 0.57 | | copy serialized Avg SignedBeaconBlock (200000 B) | 19.216 us/op | 36.582 us/op | 0.53 | | transfer serialized BlobsSidecar (524380 B) | 2.2910 us/op | 4.7390 us/op | 0.48 | | copy serialized BlobsSidecar (524380 B) | 73.140 us/op | 141.36 us/op | 0.52 | | transfer serialized Big SignedBeaconBlock (1000000 B) | 2.8900 us/op | 4.9690 us/op | 0.58 | | copy serialized Big SignedBeaconBlock (1000000 B) | 305.02 us/op | 295.80 us/op | 1.03 | | pass gossip attestations to forkchoice per slot | 2.4675 ms/op | 3.3679 ms/op | 0.73 | | forkChoice updateHead vc 100000 bc 64 eq 0 | 381.71 us/op | 527.21 us/op | 0.72 | | forkChoice updateHead vc 600000 bc 64 eq 0 | 2.3659 ms/op | 3.4712 ms/op | 0.68 | | forkChoice updateHead vc 1000000 bc 64 eq 0 | 4.1915 ms/op | 6.2263 ms/op | 0.67 | | forkChoice updateHead vc 600000 bc 320 eq 0 | 2.4334 ms/op | 3.5396 ms/op | 0.69 | | forkChoice updateHead vc 600000 bc 1200 eq 0 | 2.5695 ms/op | 3.3153 ms/op | 0.78 | | forkChoice updateHead vc 600000 bc 7200 eq 0 | 3.3592 ms/op | 4.0380 ms/op | 0.83 | | forkChoice updateHead vc 600000 bc 64 eq 1000 | 9.5125 ms/op | 11.258 ms/op | 0.84 | | forkChoice updateHead vc 600000 bc 64 eq 10000 | 9.1483 ms/op | 11.192 ms/op | 0.82 | | forkChoice updateHead vc 600000 bc 64 eq 300000 | 12.268 ms/op | 25.172 ms/op | 0.49 | | computeDeltas 500000 validators 300 proto nodes | 3.0269 ms/op | 4.0754 ms/op | 0.74 | | computeDeltas 500000 validators 1200 proto nodes | 2.9869 ms/op | 4.7328 ms/op | 0.63 | | computeDeltas 500000 validators 7200 proto nodes | 3.1516 ms/op | 4.1492 ms/op | 0.76 | | computeDeltas 750000 validators 300 proto nodes | 5.0941 ms/op | 6.8104 ms/op | 0.75 | | computeDeltas 750000 validators 1200 proto nodes | 5.0950 ms/op | 7.4369 ms/op | 0.69 | | computeDeltas 750000 validators 7200 proto nodes | 4.7885 ms/op | 7.8047 ms/op | 0.61 | | computeDeltas 1400000 validators 300 proto nodes | 8.9409 ms/op | 18.010 ms/op | 0.50 | | computeDeltas 1400000 validators 1200 proto nodes | 8.4143 ms/op | 17.195 ms/op | 0.49 | | computeDeltas 1400000 validators 7200 proto nodes | 8.0965 ms/op | 15.861 ms/op | 0.51 | | computeDeltas 2100000 validators 300 proto nodes | 12.222 ms/op | 23.233 ms/op | 0.53 | | computeDeltas 2100000 validators 1200 proto nodes | 12.314 ms/op | 24.201 ms/op | 0.51 | | computeDeltas 2100000 validators 7200 proto nodes | 12.313 ms/op | 24.496 ms/op | 0.50 | | altair processAttestation - 250000 vs - 7PWei normalcase | 1.3964 ms/op | 3.6532 ms/op | 0.38 | | altair processAttestation - 250000 vs - 7PWei worstcase | 2.0963 ms/op | 5.5557 ms/op | 0.38 | | altair processAttestation - setStatus - 1/6 committees join | 74.980 us/op | 174.77 us/op | 0.43 | | altair processAttestation - setStatus - 1/3 committees join | 150.20 us/op | 231.15 us/op | 0.65 | | altair processAttestation - setStatus - 1/2 committees join | 198.59 us/op | 317.95 us/op | 0.62 | | altair processAttestation - setStatus - 2/3 committees join | 262.99 us/op | 542.73 us/op | 0.48 | | altair processAttestation - setStatus - 4/5 committees join | 398.55 us/op | 630.05 us/op | 0.63 | | altair processAttestation - setStatus - 100% committees join | 470.47 us/op | 736.98 us/op | 0.64 | | altair processBlock - 250000 vs - 7PWei normalcase | 3.5751 ms/op | 6.0497 ms/op | 0.59 | | altair processBlock - 250000 vs - 7PWei normalcase hashState | 28.517 ms/op | 32.471 ms/op | 0.88 | | altair processBlock - 250000 vs - 7PWei worstcase | 36.814 ms/op | 52.785 ms/op | 0.70 | | altair processBlock - 250000 vs - 7PWei worstcase hashState | 81.522 ms/op | 103.14 ms/op | 0.79 | | phase0 processBlock - 250000 vs - 7PWei normalcase | 1.6219 ms/op | 3.2285 ms/op | 0.50 | | phase0 processBlock - 250000 vs - 7PWei worstcase | 23.822 ms/op | 33.390 ms/op | 0.71 | | altair processEth1Data - 250000 vs - 7PWei normalcase | 241.15 us/op | 539.38 us/op | 0.45 | | getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 | 4.5520 us/op | 11.670 us/op | 0.39 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 | 18.108 us/op | 47.413 us/op | 0.38 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 | 7.1890 us/op | 17.641 us/op | 0.41 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 | 3.2400 us/op | 13.027 us/op | 0.25 | | getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 | 81.954 us/op | 174.64 us/op | 0.47 | | getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 | 870.71 us/op | 1.0908 ms/op | 0.80 | | getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 | 1.0721 ms/op | 1.5291 ms/op | 0.70 | | getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 | 1.0951 ms/op | 1.6796 ms/op | 0.65 | | getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 | 2.0758 ms/op | 4.5828 ms/op | 0.45 | | getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 | 1.1869 ms/op | 2.1003 ms/op | 0.57 | | getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 | 3.1496 ms/op | 4.4901 ms/op | 0.70 | | Tree 40 250000 create | 192.15 ms/op | 272.03 ms/op | 0.71 | | Tree 40 250000 get(125000) | 111.41 ns/op | 152.79 ns/op | 0.73 | | Tree 40 250000 set(125000) | 543.74 ns/op | 794.18 ns/op | 0.68 | | Tree 40 250000 toArray() | 9.7284 ms/op | 22.827 ms/op | 0.43 | | Tree 40 250000 iterate all - toArray() + loop | 9.7316 ms/op | 23.856 ms/op | 0.41 | | Tree 40 250000 iterate all - get(i) | 43.194 ms/op | 64.643 ms/op | 0.67 | | MutableVector 250000 create | 8.6185 ms/op | 10.629 ms/op | 0.81 | | MutableVector 250000 get(125000) | 5.9430 ns/op | 6.6600 ns/op | 0.89 | | MutableVector 250000 set(125000) | 184.84 ns/op | 222.40 ns/op | 0.83 | | MutableVector 250000 toArray() | 2.7291 ms/op | 4.3049 ms/op | 0.63 | | MutableVector 250000 iterate all - toArray() + loop | 2.8003 ms/op | 4.3914 ms/op | 0.64 | | MutableVector 250000 iterate all - get(i) | 1.4046 ms/op | 1.6418 ms/op | 0.86 | | Array 250000 create | 2.4510 ms/op | 3.9652 ms/op | 0.62 | | Array 250000 clone - spread | 1.4081 ms/op | 1.6063 ms/op | 0.88 | | Array 250000 get(125000) | 0.58400 ns/op | 0.44300 ns/op | 1.32 | | Array 250000 set(125000) | 0.59700 ns/op | 0.47700 ns/op | 1.25 | | Array 250000 iterate all - loop | 76.825 us/op | 113.51 us/op | 0.68 | | effectiveBalanceIncrements clone Uint8Array 300000 | 14.389 us/op | 44.561 us/op | 0.32 | | effectiveBalanceIncrements clone MutableVector 300000 | 318.00 ns/op | 137.00 ns/op | 2.32 | | effectiveBalanceIncrements rw all Uint8Array 300000 | 165.93 us/op | 202.34 us/op | 0.82 | | effectiveBalanceIncrements rw all MutableVector 300000 | 60.727 ms/op | 89.125 ms/op | 0.68 | | phase0 afterProcessEpoch - 250000 vs - 7PWei | 75.727 ms/op | 92.978 ms/op | 0.81 | | phase0 beforeProcessEpoch - 250000 vs - 7PWei | 38.121 ms/op | 53.294 ms/op | 0.72 | | altair processEpoch - mainnet_e81889 | 311.64 ms/op | 433.53 ms/op | 0.72 | | mainnet_e81889 - altair beforeProcessEpoch | 39.855 ms/op | 77.602 ms/op | 0.51 | | mainnet_e81889 - altair processJustificationAndFinalization | 6.3830 us/op | 15.719 us/op | 0.41 | | mainnet_e81889 - altair processInactivityUpdates | 4.3628 ms/op | 7.8858 ms/op | 0.55 | | mainnet_e81889 - altair processRewardsAndPenalties | 44.892 ms/op | 46.313 ms/op | 0.97 | | mainnet_e81889 - altair processRegistryUpdates | 2.1590 us/op | 2.3980 us/op | 0.90 | | mainnet_e81889 - altair processSlashings | 746.00 ns/op | 457.00 ns/op | 1.63 | | mainnet_e81889 - altair processEth1DataReset | 689.00 ns/op | 419.00 ns/op | 1.64 | | mainnet_e81889 - altair processEffectiveBalanceUpdates | 2.0564 ms/op | 1.2359 ms/op | 1.66 | | mainnet_e81889 - altair processSlashingsReset | 1.4040 us/op | 7.1210 us/op | 0.20 | | mainnet_e81889 - altair processRandaoMixesReset | 3.0040 us/op | 8.8390 us/op | 0.34 | | mainnet_e81889 - altair processHistoricalRootsUpdate | 387.00 ns/op | 1.2310 us/op | 0.31 | | mainnet_e81889 - altair processParticipationFlagUpdates | 1.3620 us/op | 4.3820 us/op | 0.31 | | mainnet_e81889 - altair processSyncCommitteeUpdates | 679.00 ns/op | 779.00 ns/op | 0.87 | | mainnet_e81889 - altair afterProcessEpoch | 80.362 ms/op | 99.451 ms/op | 0.81 | | capella processEpoch - mainnet_e217614 | 1.1729 s/op | 1.6904 s/op | 0.69 | | mainnet_e217614 - capella beforeProcessEpoch | 240.18 ms/op | 345.12 ms/op | 0.70 | | mainnet_e217614 - capella processJustificationAndFinalization | 9.1200 us/op | 19.333 us/op | 0.47 | | mainnet_e217614 - capella processInactivityUpdates | 14.925 ms/op | 21.180 ms/op | 0.70 | | mainnet_e217614 - capella processRewardsAndPenalties | 248.84 ms/op | 307.69 ms/op | 0.81 | | mainnet_e217614 - capella processRegistryUpdates | 10.984 us/op | 32.970 us/op | 0.33 | | mainnet_e217614 - capella processSlashings | 816.00 ns/op | 1.1980 us/op | 0.68 | | mainnet_e217614 - capella processEth1DataReset | 729.00 ns/op | 1.2200 us/op | 0.60 | | mainnet_e217614 - capella processEffectiveBalanceUpdates | 4.9051 ms/op | 8.2953 ms/op | 0.59 | | mainnet_e217614 - capella processSlashingsReset | 2.5130 us/op | 8.5330 us/op | 0.29 | | mainnet_e217614 - capella processRandaoMixesReset | 2.9970 us/op | 12.241 us/op | 0.24 | | mainnet_e217614 - capella processHistoricalRootsUpdate | 797.00 ns/op | 1.4630 us/op | 0.54 | | mainnet_e217614 - capella processParticipationFlagUpdates | 2.0830 us/op | 7.3220 us/op | 0.28 | | mainnet_e217614 - capella afterProcessEpoch | 245.40 ms/op | 369.73 ms/op | 0.66 | | phase0 processEpoch - mainnet_e58758 | 354.75 ms/op | 490.88 ms/op | 0.72 | | mainnet_e58758 - phase0 beforeProcessEpoch | 116.70 ms/op | 141.19 ms/op | 0.83 | | mainnet_e58758 - phase0 processJustificationAndFinalization | 13.516 us/op | 27.777 us/op | 0.49 | | mainnet_e58758 - phase0 processRewardsAndPenalties | 35.916 ms/op | 43.845 ms/op | 0.82 | | mainnet_e58758 - phase0 processRegistryUpdates | 6.5140 us/op | 13.242 us/op | 0.49 | | mainnet_e58758 - phase0 processSlashings | 823.00 ns/op | 624.00 ns/op | 1.32 | | mainnet_e58758 - phase0 processEth1DataReset | 832.00 ns/op | 961.00 ns/op | 0.87 | | mainnet_e58758 - phase0 processEffectiveBalanceUpdates | 1.0914 ms/op | 1.4417 ms/op | 0.76 | | mainnet_e58758 - phase0 processSlashingsReset | 3.6650 us/op | 8.5500 us/op | 0.43 | | mainnet_e58758 - phase0 processRandaoMixesReset | 3.3860 us/op | 8.8450 us/op | 0.38 | | mainnet_e58758 - phase0 processHistoricalRootsUpdate | 718.00 ns/op | 1.1690 us/op | 0.61 | | mainnet_e58758 - phase0 processParticipationRecordUpdates | 3.4870 us/op | 9.2000 us/op | 0.38 | | mainnet_e58758 - phase0 afterProcessEpoch | 64.499 ms/op | 89.998 ms/op | 0.72 | | phase0 processEffectiveBalanceUpdates - 250000 normalcase | 763.29 us/op | 1.7309 ms/op | 0.44 | | phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 | 1.3238 ms/op | 1.9806 ms/op | 0.67 | | altair processInactivityUpdates - 250000 normalcase | 20.590 ms/op | 25.613 ms/op | 0.80 | | altair processInactivityUpdates - 250000 worstcase | 17.769 ms/op | 24.183 ms/op | 0.73 | | phase0 processRegistryUpdates - 250000 normalcase | 5.6870 us/op | 16.657 us/op | 0.34 | | phase0 processRegistryUpdates - 250000 badcase_full_deposits | 327.57 us/op | 360.71 us/op | 0.91 | | phase0 processRegistryUpdates - 250000 worstcase 0.5 | 113.31 ms/op | 155.40 ms/op | 0.73 | | altair processRewardsAndPenalties - 250000 normalcase | 46.246 ms/op | 76.824 ms/op | 0.60 | | altair processRewardsAndPenalties - 250000 worstcase | 44.571 ms/op | 58.860 ms/op | 0.76 | | phase0 getAttestationDeltas - 250000 normalcase | 7.1426 ms/op | 8.6699 ms/op | 0.82 | | phase0 getAttestationDeltas - 250000 worstcase | 8.3280 ms/op | 14.297 ms/op | 0.58 | | phase0 processSlashings - 250000 worstcase | 92.589 us/op | 139.54 us/op | 0.66 | | altair processSyncCommitteeUpdates - 250000 | 98.902 ms/op | 156.80 ms/op | 0.63 | | BeaconState.hashTreeRoot - No change | 566.00 ns/op | 459.00 ns/op | 1.23 | | BeaconState.hashTreeRoot - 1 full validator | 77.126 us/op | 162.83 us/op | 0.47 | | BeaconState.hashTreeRoot - 32 full validator | 853.71 us/op | 1.3338 ms/op | 0.64 | | BeaconState.hashTreeRoot - 512 full validator | 8.3808 ms/op | 14.650 ms/op | 0.57 | | BeaconState.hashTreeRoot - 1 validator.effectiveBalance | 107.11 us/op | 152.23 us/op | 0.70 | | BeaconState.hashTreeRoot - 32 validator.effectiveBalance | 1.4125 ms/op | 2.2092 ms/op | 0.64 | | BeaconState.hashTreeRoot - 512 validator.effectiveBalance | 16.930 ms/op | 34.273 ms/op | 0.49 | | BeaconState.hashTreeRoot - 1 balances | 67.171 us/op | 134.78 us/op | 0.50 | | BeaconState.hashTreeRoot - 32 balances | 649.92 us/op | 1.0679 ms/op | 0.61 | | BeaconState.hashTreeRoot - 512 balances | 6.2717 ms/op | 10.044 ms/op | 0.62 | | BeaconState.hashTreeRoot - 250000 balances | 126.53 ms/op | 168.08 ms/op | 0.75 | | aggregationBits - 2048 els - zipIndexesInBitList | 22.580 us/op | 30.940 us/op | 0.73 | | byteArrayEquals 32 | 44.610 ns/op | 55.186 ns/op | 0.81 | | Buffer.compare 32 | 36.662 ns/op | 49.158 ns/op | 0.75 | | byteArrayEquals 1024 | 1.2363 us/op | 1.6217 us/op | 0.76 | | Buffer.compare 1024 | 45.166 ns/op | 58.385 ns/op | 0.77 | | byteArrayEquals 16384 | 19.313 us/op | 26.363 us/op | 0.73 | | Buffer.compare 16384 | 222.87 ns/op | 239.16 ns/op | 0.93 | | byteArrayEquals 123687377 | 151.83 ms/op | 197.75 ms/op | 0.77 | | Buffer.compare 123687377 | 4.7433 ms/op | 8.5064 ms/op | 0.56 | | byteArrayEquals 32 - diff last byte | 47.891 ns/op | 56.975 ns/op | 0.84 | | Buffer.compare 32 - diff last byte | 39.878 ns/op | 47.062 ns/op | 0.85 | | byteArrayEquals 1024 - diff last byte | 1.2757 us/op | 1.6172 us/op | 0.79 | | Buffer.compare 1024 - diff last byte | 48.504 ns/op | 55.647 ns/op | 0.87 | | byteArrayEquals 16384 - diff last byte | 20.260 us/op | 25.946 us/op | 0.78 | | Buffer.compare 16384 - diff last byte | 205.12 ns/op | 245.73 ns/op | 0.83 | | byteArrayEquals 123687377 - diff last byte | 146.84 ms/op | 197.35 ms/op | 0.74 | | Buffer.compare 123687377 - diff last byte | 4.4001 ms/op | 9.5952 ms/op | 0.46 | | byteArrayEquals 32 - random bytes | 4.9660 ns/op | 5.4570 ns/op | 0.91 | | Buffer.compare 32 - random bytes | 41.173 ns/op | 49.575 ns/op | 0.83 | | byteArrayEquals 1024 - random bytes | 4.9980 ns/op | 5.9380 ns/op | 0.84 | | Buffer.compare 1024 - random bytes | 40.003 ns/op | 47.814 ns/op | 0.84 | | byteArrayEquals 16384 - random bytes | 4.9920 ns/op | 5.5940 ns/op | 0.89 | | Buffer.compare 16384 - random bytes | 40.045 ns/op | 47.888 ns/op | 0.84 | | byteArrayEquals 123687377 - random bytes | 8.0100 ns/op | 7.4600 ns/op | 1.07 | | Buffer.compare 123687377 - random bytes | 43.800 ns/op | 58.420 ns/op | 0.75 | | regular array get 100000 times | 31.319 us/op | 38.343 us/op | 0.82 | | wrappedArray get 100000 times | 31.302 us/op | 44.348 us/op | 0.71 | | arrayWithProxy get 100000 times | 9.5693 ms/op | 13.572 ms/op | 0.71 | | ssz.Root.equals | 44.342 ns/op | 57.511 ns/op | 0.77 | | byteArrayEquals | 43.288 ns/op | 49.228 ns/op | 0.88 | | Buffer.compare | 9.1560 ns/op | 11.367 ns/op | 0.81 | | shuffle list - 16384 els | 5.7349 ms/op | 6.7651 ms/op | 0.85 | | shuffle list - 250000 els | 81.975 ms/op | 97.153 ms/op | 0.84 | | processSlot - 1 slots | 10.768 us/op | 13.849 us/op | 0.78 | | processSlot - 32 slots | 2.2049 ms/op | 2.9157 ms/op | 0.76 | | getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei | 37.152 ms/op | 39.985 ms/op | 0.93 | | getCommitteeAssignments - req 1 vs - 250000 vc | 1.7501 ms/op | 2.2366 ms/op | 0.78 | | getCommitteeAssignments - req 100 vs - 250000 vc | 3.4707 ms/op | 4.3106 ms/op | 0.81 | | getCommitteeAssignments - req 1000 vs - 250000 vc | 3.7290 ms/op | 4.6506 ms/op | 0.80 | | findModifiedValidators - 10000 modified validators | 253.56 ms/op | 282.77 ms/op | 0.90 | | findModifiedValidators - 1000 modified validators | 175.33 ms/op | 185.42 ms/op | 0.95 | | findModifiedValidators - 100 modified validators | 163.23 ms/op | 180.31 ms/op | 0.91 | | findModifiedValidators - 10 modified validators | 183.26 ms/op | 182.57 ms/op | 1.00 | | findModifiedValidators - 1 modified validators | 180.72 ms/op | 177.58 ms/op | 1.02 | | findModifiedValidators - no difference | 180.79 ms/op | 170.09 ms/op | 1.06 | | compare ViewDUs | 3.1796 s/op | 3.2578 s/op | 0.98 | | compare each validator Uint8Array | 1.7479 s/op | 1.7105 s/op | 1.02 | | compare ViewDU to Uint8Array | 1.0767 s/op | 1.3948 s/op | 0.77 | | migrate state 1000000 validators, 24 modified, 0 new | 594.88 ms/op | 647.00 ms/op | 0.92 | | migrate state 1000000 validators, 1700 modified, 1000 new | 829.94 ms/op | 1.1652 s/op | 0.71 | | migrate state 1000000 validators, 3400 modified, 2000 new | 1.0272 s/op | 1.2140 s/op | 0.85 | | migrate state 1500000 validators, 24 modified, 0 new | 559.37 ms/op | 708.21 ms/op | 0.79 | | migrate state 1500000 validators, 1700 modified, 1000 new | 781.58 ms/op | 1.0049 s/op | 0.78 | | migrate state 1500000 validators, 3400 modified, 2000 new | 976.65 ms/op | 1.1431 s/op | 0.85 | | RootCache.getBlockRootAtSlot - 250000 vs - 7PWei | 5.9700 ns/op | 5.1900 ns/op | 1.15 | | state getBlockRootAtSlot - 250000 vs - 7PWei | 817.07 ns/op | 640.58 ns/op | 1.28 | | computeProposers - vc 250000 | 5.9797 ms/op | 7.8820 ms/op | 0.76 | | computeEpochShuffling - vc 250000 | 77.449 ms/op | 98.783 ms/op | 0.78 | | getNextSyncCommittee - vc 250000 | 102.49 ms/op | 145.45 ms/op | 0.70 | | computeSigningRoot for AttestationData | 21.242 us/op | 23.947 us/op | 0.89 | | hash AttestationData serialized data then Buffer.toString(base64) | 1.1755 us/op | 1.6552 us/op | 0.71 | | toHexString serialized data | 724.10 ns/op | 1.4083 us/op | 0.51 | | Buffer.toString(base64) | 138.61 ns/op | 248.39 ns/op | 0.56 |

by benchmarkbot/action