ChainSafe / lodestar

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

fix: update multiple api errors to be spec compliant #7113

Closed nflaig closed 1 month ago

nflaig commented 1 month ago

Motivation

Description

Update multiple api errors to be spec compliant

Closes https://github.com/ChainSafe/lodestar/issues/6293

Depends on https://github.com/ChainSafe/lodestar/pull/7110

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 48.95%. Comparing base (bf4a25f) to head (7dcab22). Report is 1 commits behind head on unstable.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## unstable #7113 +/- ## ============================================ - Coverage 48.96% 48.95% -0.01% ============================================ Files 597 597 Lines 39840 39843 +3 Branches 2064 2059 -5 ============================================ - Hits 19508 19507 -1 - Misses 20291 20295 +4 Partials 41 41 ```
github-actions[bot] commented 1 month ago

Performance Report

✔️ no performance regression detected

Full benchmark results | Benchmark suite | Current: 487a7eb88006196a479bace5681ae19ab70d5d5c | Previous: b457778eefb31ed4286a9da9597d51a0818b0f79 | Ratio | |-|-|-|-| | getPubkeys - index2pubkey - req 1000 vs - 250000 vc | 2.1789 ms/op | 2.3772 ms/op | 0.92 | | getPubkeys - validatorsArr - req 1000 vs - 250000 vc | 72.715 us/op | 77.120 us/op | 0.94 | | BLS verify - blst | 941.39 us/op | 996.98 us/op | 0.94 | | BLS verifyMultipleSignatures 3 - blst | 1.3179 ms/op | 1.3793 ms/op | 0.96 | | BLS verifyMultipleSignatures 8 - blst | 1.7296 ms/op | 2.0048 ms/op | 0.86 | | BLS verifyMultipleSignatures 32 - blst | 5.6649 ms/op | 5.3727 ms/op | 1.05 | | BLS verifyMultipleSignatures 64 - blst | 9.2652 ms/op | 9.9630 ms/op | 0.93 | | BLS verifyMultipleSignatures 128 - blst | 18.072 ms/op | 18.767 ms/op | 0.96 | | BLS deserializing 10000 signatures | 709.54 ms/op | 714.92 ms/op | 0.99 | | BLS deserializing 100000 signatures | 7.1337 s/op | 7.2146 s/op | 0.99 | | BLS verifyMultipleSignatures - same message - 3 - blst | 852.32 us/op | 1.0964 ms/op | 0.78 | | BLS verifyMultipleSignatures - same message - 8 - blst | 1.0989 ms/op | 1.2417 ms/op | 0.88 | | BLS verifyMultipleSignatures - same message - 32 - blst | 1.7832 ms/op | 1.9628 ms/op | 0.91 | | BLS verifyMultipleSignatures - same message - 64 - blst | 2.6369 ms/op | 2.8922 ms/op | 0.91 | | BLS verifyMultipleSignatures - same message - 128 - blst | 4.4319 ms/op | 4.4931 ms/op | 0.99 | | BLS aggregatePubkeys 32 - blst | 20.083 us/op | 21.117 us/op | 0.95 | | BLS aggregatePubkeys 128 - blst | 71.604 us/op | 74.626 us/op | 0.96 | | notSeenSlots=1 numMissedVotes=1 numBadVotes=10 | 71.418 ms/op | 94.390 ms/op | 0.76 | | notSeenSlots=1 numMissedVotes=0 numBadVotes=4 | 52.416 ms/op | 59.614 ms/op | 0.88 | | notSeenSlots=2 numMissedVotes=1 numBadVotes=10 | 36.522 ms/op | 36.467 ms/op | 1.00 | | getSlashingsAndExits - default max | 109.18 us/op | 192.44 us/op | 0.57 | | getSlashingsAndExits - 2k | 328.06 us/op | 490.02 us/op | 0.67 | | proposeBlockBody type=full, size=empty | 6.1675 ms/op | 6.7399 ms/op | 0.92 | | isKnown best case - 1 super set check | 462.00 ns/op | 747.00 ns/op | 0.62 | | isKnown normal case - 2 super set checks | 332.00 ns/op | 741.00 ns/op | 0.45 | | isKnown worse case - 16 super set checks | 339.00 ns/op | 708.00 ns/op | 0.48 | | InMemoryCheckpointStateCache - add get delete | 2.9940 us/op | 4.1840 us/op | 0.72 | | updateUnfinalizedPubkeys - updating 10 pubkeys | 1.1100 ms/op | 2.0624 ms/op | 0.54 | | updateUnfinalizedPubkeys - updating 100 pubkeys | 3.6864 ms/op | 5.9849 ms/op | 0.62 | | updateUnfinalizedPubkeys - updating 1000 pubkeys | 55.890 ms/op | 64.344 ms/op | 0.87 | | validate api signedAggregateAndProof - struct | 1.5367 ms/op | 1.7109 ms/op | 0.90 | | validate gossip signedAggregateAndProof - struct | 1.4870 ms/op | 1.7379 ms/op | 0.86 | | validate gossip attestation - vc 640000 | 994.53 us/op | 1.1424 ms/op | 0.87 | | batch validate gossip attestation - vc 640000 - chunk 32 | 141.53 us/op | 165.10 us/op | 0.86 | | batch validate gossip attestation - vc 640000 - chunk 64 | 122.41 us/op | 145.48 us/op | 0.84 | | batch validate gossip attestation - vc 640000 - chunk 128 | 126.80 us/op | 131.00 us/op | 0.97 | | batch validate gossip attestation - vc 640000 - chunk 256 | 127.26 us/op | 145.82 us/op | 0.87 | | pickEth1Vote - no votes | 1.2597 ms/op | 1.4340 ms/op | 0.88 | | pickEth1Vote - max votes | 7.9640 ms/op | 11.632 ms/op | 0.68 | | pickEth1Vote - Eth1Data hashTreeRoot value x2048 | 22.697 ms/op | 20.228 ms/op | 1.12 | | pickEth1Vote - Eth1Data hashTreeRoot tree x2048 | 23.226 ms/op | 34.850 ms/op | 0.67 | | pickEth1Vote - Eth1Data fastSerialize value x2048 | 603.44 us/op | 648.32 us/op | 0.93 | | pickEth1Vote - Eth1Data fastSerialize tree x2048 | 3.6968 ms/op | 4.9641 ms/op | 0.74 | | bytes32 toHexString | 679.00 ns/op | 818.00 ns/op | 0.83 | | bytes32 Buffer.toString(hex) | 285.00 ns/op | 288.00 ns/op | 0.99 | | bytes32 Buffer.toString(hex) from Uint8Array | 523.00 ns/op | 564.00 ns/op | 0.93 | | bytes32 Buffer.toString(hex) + 0x | 285.00 ns/op | 300.00 ns/op | 0.95 | | Object access 1 prop | 0.22400 ns/op | 0.21200 ns/op | 1.06 | | Map access 1 prop | 0.15200 ns/op | 0.14500 ns/op | 1.05 | | Object get x1000 | 6.0890 ns/op | 6.5460 ns/op | 0.93 | | Map get x1000 | 6.8990 ns/op | 6.9220 ns/op | 1.00 | | Object set x1000 | 54.982 ns/op | 66.420 ns/op | 0.83 | | Map set x1000 | 31.252 ns/op | 45.936 ns/op | 0.68 | | Return object 10000 times | 0.32680 ns/op | 0.37820 ns/op | 0.86 | | Throw Error 10000 times | 3.6878 us/op | 3.9566 us/op | 0.93 | | toHex | 193.40 ns/op | 219.57 ns/op | 0.88 | | Buffer.from | 189.66 ns/op | 195.50 ns/op | 0.97 | | shared Buffer | 110.34 ns/op | 106.58 ns/op | 1.04 | | fastMsgIdFn sha256 / 200 bytes | 2.5540 us/op | 2.7590 us/op | 0.93 | | fastMsgIdFn h32 xxhash / 200 bytes | 303.00 ns/op | 354.00 ns/op | 0.86 | | fastMsgIdFn h64 xxhash / 200 bytes | 303.00 ns/op | 322.00 ns/op | 0.94 | | fastMsgIdFn sha256 / 1000 bytes | 8.2460 us/op | 8.1620 us/op | 1.01 | | fastMsgIdFn h32 xxhash / 1000 bytes | 472.00 ns/op | 479.00 ns/op | 0.99 | | fastMsgIdFn h64 xxhash / 1000 bytes | 391.00 ns/op | 385.00 ns/op | 1.02 | | fastMsgIdFn sha256 / 10000 bytes | 71.086 us/op | 70.475 us/op | 1.01 | | fastMsgIdFn h32 xxhash / 10000 bytes | 2.0150 us/op | 2.0600 us/op | 0.98 | | fastMsgIdFn h64 xxhash / 10000 bytes | 1.2760 us/op | 1.3350 us/op | 0.96 | | send data - 1000 256B messages | 14.249 ms/op | 17.619 ms/op | 0.81 | | send data - 1000 512B messages | 19.879 ms/op | 22.769 ms/op | 0.87 | | send data - 1000 1024B messages | 28.613 ms/op | 33.163 ms/op | 0.86 | | send data - 1000 1200B messages | 28.851 ms/op | 37.811 ms/op | 0.76 | | send data - 1000 2048B messages | 37.012 ms/op | 43.700 ms/op | 0.85 | | send data - 1000 4096B messages | 35.541 ms/op | 42.395 ms/op | 0.84 | | send data - 1000 16384B messages | 79.951 ms/op | 83.898 ms/op | 0.95 | | send data - 1000 65536B messages | 236.78 ms/op | 242.31 ms/op | 0.98 | | enrSubnets - fastDeserialize 64 bits | 1.3000 us/op | 1.6050 us/op | 0.81 | | enrSubnets - ssz BitVector 64 bits | 407.00 ns/op | 481.00 ns/op | 0.85 | | enrSubnets - fastDeserialize 4 bits | 187.00 ns/op | 238.00 ns/op | 0.79 | | enrSubnets - ssz BitVector 4 bits | 434.00 ns/op | 545.00 ns/op | 0.80 | | prioritizePeers score -10:0 att 32-0.1 sync 2-0 | 211.10 us/op | 234.76 us/op | 0.90 | | prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 | 211.59 us/op | 236.01 us/op | 0.90 | | prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 | 339.34 us/op | 503.91 us/op | 0.67 | | prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 | 444.54 us/op | 555.71 us/op | 0.80 | | prioritizePeers score 0:0 att 64-1 sync 4-1 | 686.00 us/op | 963.92 us/op | 0.71 | | array of 16000 items push then shift | 1.7761 us/op | 1.8015 us/op | 0.99 | | LinkedList of 16000 items push then shift | 8.2520 ns/op | 10.235 ns/op | 0.81 | | array of 16000 items push then pop | 137.43 ns/op | 139.54 ns/op | 0.98 | | LinkedList of 16000 items push then pop | 7.7230 ns/op | 8.0390 ns/op | 0.96 | | array of 24000 items push then shift | 2.5712 us/op | 2.5084 us/op | 1.03 | | LinkedList of 24000 items push then shift | 7.8230 ns/op | 8.8360 ns/op | 0.89 | | array of 24000 items push then pop | 176.05 ns/op | 183.82 ns/op | 0.96 | | LinkedList of 24000 items push then pop | 7.8170 ns/op | 8.1180 ns/op | 0.96 | | intersect bitArray bitLen 8 | 6.8460 ns/op | 6.7490 ns/op | 1.01 | | intersect array and set length 8 | 49.389 ns/op | 70.130 ns/op | 0.70 | | intersect bitArray bitLen 128 | 31.853 ns/op | 31.175 ns/op | 1.02 | | intersect array and set length 128 | 757.98 ns/op | 944.29 ns/op | 0.80 | | bitArray.getTrueBitIndexes() bitLen 128 | 2.1500 us/op | 2.4060 us/op | 0.89 | | bitArray.getTrueBitIndexes() bitLen 248 | 3.6030 us/op | 4.2390 us/op | 0.85 | | bitArray.getTrueBitIndexes() bitLen 512 | 9.4150 us/op | 9.4450 us/op | 1.00 | | Buffer.concat 32 items | 1.0540 us/op | 1.2600 us/op | 0.84 | | Uint8Array.set 32 items | 1.7360 us/op | 1.9040 us/op | 0.91 | | Buffer.copy | 2.2240 us/op | 2.1490 us/op | 1.03 | | Uint8Array.set - with subarray | 3.2450 us/op | 3.4290 us/op | 0.95 | | Uint8Array.set - without subarray | 1.5140 us/op | 2.6420 us/op | 0.57 | | getUint32 - dataview | 272.00 ns/op | 312.00 ns/op | 0.87 | | getUint32 - manual | 217.00 ns/op | 268.00 ns/op | 0.81 | | Set add up to 64 items then delete first | 2.4499 us/op | 3.0548 us/op | 0.80 | | OrderedSet add up to 64 items then delete first | 3.6217 us/op | 4.7579 us/op | 0.76 | | Set add up to 64 items then delete last | 2.8658 us/op | 3.4980 us/op | 0.82 | | OrderedSet add up to 64 items then delete last | 4.8653 us/op | 5.1272 us/op | 0.95 | | Set add up to 64 items then delete middle | 2.8358 us/op | 3.3333 us/op | 0.85 | | OrderedSet add up to 64 items then delete middle | 6.2828 us/op | 6.7112 us/op | 0.94 | | Set add up to 128 items then delete first | 5.6548 us/op | 6.7622 us/op | 0.84 | | OrderedSet add up to 128 items then delete first | 9.1973 us/op | 11.014 us/op | 0.84 | | Set add up to 128 items then delete last | 5.9569 us/op | 6.5166 us/op | 0.91 | | OrderedSet add up to 128 items then delete last | 8.5439 us/op | 9.9508 us/op | 0.86 | | Set add up to 128 items then delete middle | 5.4906 us/op | 6.5390 us/op | 0.84 | | OrderedSet add up to 128 items then delete middle | 15.984 us/op | 16.753 us/op | 0.95 | | Set add up to 256 items then delete first | 11.129 us/op | 13.311 us/op | 0.84 | | OrderedSet add up to 256 items then delete first | 16.403 us/op | 21.685 us/op | 0.76 | | Set add up to 256 items then delete last | 10.923 us/op | 12.529 us/op | 0.87 | | OrderedSet add up to 256 items then delete last | 17.380 us/op | 19.276 us/op | 0.90 | | Set add up to 256 items then delete middle | 10.481 us/op | 12.284 us/op | 0.85 | | OrderedSet add up to 256 items then delete middle | 43.349 us/op | 47.160 us/op | 0.92 | | transfer serialized Status (84 B) | 1.4810 us/op | 1.6470 us/op | 0.90 | | copy serialized Status (84 B) | 1.2230 us/op | 1.4310 us/op | 0.85 | | transfer serialized SignedVoluntaryExit (112 B) | 1.4940 us/op | 1.6030 us/op | 0.93 | | copy serialized SignedVoluntaryExit (112 B) | 1.2930 us/op | 1.3050 us/op | 0.99 | | transfer serialized ProposerSlashing (416 B) | 1.6600 us/op | 1.9070 us/op | 0.87 | | copy serialized ProposerSlashing (416 B) | 1.8060 us/op | 2.1070 us/op | 0.86 | | transfer serialized Attestation (485 B) | 1.9540 us/op | 2.4160 us/op | 0.81 | | copy serialized Attestation (485 B) | 2.0310 us/op | 2.1900 us/op | 0.93 | | transfer serialized AttesterSlashing (33232 B) | 1.7970 us/op | 2.0870 us/op | 0.86 | | copy serialized AttesterSlashing (33232 B) | 6.4240 us/op | 8.1390 us/op | 0.79 | | transfer serialized Small SignedBeaconBlock (128000 B) | 2.5900 us/op | 2.3360 us/op | 1.11 | | copy serialized Small SignedBeaconBlock (128000 B) | 20.997 us/op | 22.812 us/op | 0.92 | | transfer serialized Avg SignedBeaconBlock (200000 B) | 2.9880 us/op | 2.2990 us/op | 1.30 | | copy serialized Avg SignedBeaconBlock (200000 B) | 32.393 us/op | 28.275 us/op | 1.15 | | transfer serialized BlobsSidecar (524380 B) | 4.0020 us/op | 2.7720 us/op | 1.44 | | copy serialized BlobsSidecar (524380 B) | 102.67 us/op | 155.59 us/op | 0.66 | | transfer serialized Big SignedBeaconBlock (1000000 B) | 3.8960 us/op | 2.8890 us/op | 1.35 | | copy serialized Big SignedBeaconBlock (1000000 B) | 167.99 us/op | 155.81 us/op | 1.08 | | pass gossip attestations to forkchoice per slot | 3.0880 ms/op | 2.9190 ms/op | 1.06 | | forkChoice updateHead vc 100000 bc 64 eq 0 | 531.24 us/op | 508.73 us/op | 1.04 | | forkChoice updateHead vc 600000 bc 64 eq 0 | 4.9715 ms/op | 4.4521 ms/op | 1.12 | | forkChoice updateHead vc 1000000 bc 64 eq 0 | 6.5628 ms/op | 6.5518 ms/op | 1.00 | | forkChoice updateHead vc 600000 bc 320 eq 0 | 3.4015 ms/op | 3.5934 ms/op | 0.95 | | forkChoice updateHead vc 600000 bc 1200 eq 0 | 3.6122 ms/op | 3.4731 ms/op | 1.04 | | forkChoice updateHead vc 600000 bc 7200 eq 0 | 7.3097 ms/op | 6.5128 ms/op | 1.12 | | forkChoice updateHead vc 600000 bc 64 eq 1000 | 11.823 ms/op | 11.184 ms/op | 1.06 | | forkChoice updateHead vc 600000 bc 64 eq 10000 | 11.567 ms/op | 11.127 ms/op | 1.04 | | forkChoice updateHead vc 600000 bc 64 eq 300000 | 17.319 ms/op | 21.138 ms/op | 0.82 | | computeDeltas 500000 validators 300 proto nodes | 4.6137 ms/op | 4.5528 ms/op | 1.01 | | computeDeltas 500000 validators 1200 proto nodes | 5.1780 ms/op | 4.6677 ms/op | 1.11 | | computeDeltas 500000 validators 7200 proto nodes | 5.4159 ms/op | 5.1453 ms/op | 1.05 | | computeDeltas 750000 validators 300 proto nodes | 7.4802 ms/op | 7.3965 ms/op | 1.01 | | computeDeltas 750000 validators 1200 proto nodes | 6.6313 ms/op | 7.4458 ms/op | 0.89 | | computeDeltas 750000 validators 7200 proto nodes | 6.8156 ms/op | 7.9997 ms/op | 0.85 | | computeDeltas 1400000 validators 300 proto nodes | 13.586 ms/op | 17.816 ms/op | 0.76 | | computeDeltas 1400000 validators 1200 proto nodes | 14.039 ms/op | 15.486 ms/op | 0.91 | | computeDeltas 1400000 validators 7200 proto nodes | 13.032 ms/op | 13.767 ms/op | 0.95 | | computeDeltas 2100000 validators 300 proto nodes | 18.493 ms/op | 21.436 ms/op | 0.86 | | computeDeltas 2100000 validators 1200 proto nodes | 16.152 ms/op | 21.302 ms/op | 0.76 | | computeDeltas 2100000 validators 7200 proto nodes | 16.120 ms/op | 24.703 ms/op | 0.65 | | altair processAttestation - 250000 vs - 7PWei normalcase | 2.0136 ms/op | 3.1712 ms/op | 0.63 | | altair processAttestation - 250000 vs - 7PWei worstcase | 2.9399 ms/op | 4.5548 ms/op | 0.65 | | altair processAttestation - setStatus - 1/6 committees join | 96.615 us/op | 157.58 us/op | 0.61 | | altair processAttestation - setStatus - 1/3 committees join | 186.19 us/op | 308.36 us/op | 0.60 | | altair processAttestation - setStatus - 1/2 committees join | 260.74 us/op | 406.35 us/op | 0.64 | | altair processAttestation - setStatus - 2/3 committees join | 336.46 us/op | 518.90 us/op | 0.65 | | altair processAttestation - setStatus - 4/5 committees join | 496.93 us/op | 680.24 us/op | 0.73 | | altair processAttestation - setStatus - 100% committees join | 579.53 us/op | 849.79 us/op | 0.68 | | altair processBlock - 250000 vs - 7PWei normalcase | 4.5336 ms/op | 8.7328 ms/op | 0.52 | | altair processBlock - 250000 vs - 7PWei normalcase hashState | 26.162 ms/op | 28.739 ms/op | 0.91 | | altair processBlock - 250000 vs - 7PWei worstcase | 36.853 ms/op | 46.230 ms/op | 0.80 | | altair processBlock - 250000 vs - 7PWei worstcase hashState | 70.654 ms/op | 89.002 ms/op | 0.79 | | phase0 processBlock - 250000 vs - 7PWei normalcase | 1.8531 ms/op | 2.7020 ms/op | 0.69 | | phase0 processBlock - 250000 vs - 7PWei worstcase | 21.718 ms/op | 27.532 ms/op | 0.79 | | altair processEth1Data - 250000 vs - 7PWei normalcase | 349.76 us/op | 487.47 us/op | 0.72 | | getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 | 7.0880 us/op | 9.5610 us/op | 0.74 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 | 41.799 us/op | 67.239 us/op | 0.62 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 | 12.979 us/op | 19.147 us/op | 0.68 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 | 8.5520 us/op | 11.753 us/op | 0.73 | | getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 | 177.80 us/op | 205.64 us/op | 0.86 | | getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 | 1.5788 ms/op | 1.2314 ms/op | 1.28 | | getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 | 1.6164 ms/op | 2.1334 ms/op | 0.76 | | getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 | 1.6838 ms/op | 1.9722 ms/op | 0.85 | | getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 | 3.9022 ms/op | 5.0902 ms/op | 0.77 | | getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 | 1.6993 ms/op | 1.6846 ms/op | 1.01 | | getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 | 4.0250 ms/op | 5.0181 ms/op | 0.80 | | Tree 40 250000 create | 244.64 ms/op | 448.59 ms/op | 0.55 | | Tree 40 250000 get(125000) | 155.79 ns/op | 163.59 ns/op | 0.95 | | Tree 40 250000 set(125000) | 749.48 ns/op | 1.0504 us/op | 0.71 | | Tree 40 250000 toArray() | 17.919 ms/op | 24.889 ms/op | 0.72 | | Tree 40 250000 iterate all - toArray() + loop | 18.394 ms/op | 23.817 ms/op | 0.77 | | Tree 40 250000 iterate all - get(i) | 57.397 ms/op | 64.967 ms/op | 0.88 | | Array 250000 create | 3.2407 ms/op | 3.9916 ms/op | 0.81 | | Array 250000 clone - spread | 1.6343 ms/op | 1.6472 ms/op | 0.99 | | Array 250000 get(125000) | 0.45300 ns/op | 0.47900 ns/op | 0.95 | | Array 250000 set(125000) | 0.47800 ns/op | 0.48600 ns/op | 0.98 | | Array 250000 iterate all - loop | 112.77 us/op | 101.00 us/op | 1.12 | | phase0 afterProcessEpoch - 250000 vs - 7PWei | 99.215 ms/op | 107.46 ms/op | 0.92 | | Array.fill - length 1000000 | 3.8699 ms/op | 7.8587 ms/op | 0.49 | | Array push - length 1000000 | 19.379 ms/op | 35.825 ms/op | 0.54 | | Array.get | 0.29459 ns/op | 0.32587 ns/op | 0.90 | | Uint8Array.get | 0.45588 ns/op | 0.48141 ns/op | 0.95 | | phase0 beforeProcessEpoch - 250000 vs - 7PWei | 20.801 ms/op | 29.015 ms/op | 0.72 | | altair processEpoch - mainnet_e81889 | 341.83 ms/op | 414.49 ms/op | 0.82 | | mainnet_e81889 - altair beforeProcessEpoch | 19.281 ms/op | 41.950 ms/op | 0.46 | | mainnet_e81889 - altair processJustificationAndFinalization | 12.206 us/op | 30.650 us/op | 0.40 | | mainnet_e81889 - altair processInactivityUpdates | 5.4914 ms/op | 10.591 ms/op | 0.52 | | mainnet_e81889 - altair processRewardsAndPenalties | 37.753 ms/op | 90.656 ms/op | 0.42 | | mainnet_e81889 - altair processRegistryUpdates | 1.5850 us/op | 7.4530 us/op | 0.21 | | mainnet_e81889 - altair processSlashings | 497.00 ns/op | 1.0800 us/op | 0.46 | | mainnet_e81889 - altair processEth1DataReset | 328.00 ns/op | 1.0640 us/op | 0.31 | | mainnet_e81889 - altair processEffectiveBalanceUpdates | 1.9399 ms/op | 3.0239 ms/op | 0.64 | | mainnet_e81889 - altair processSlashingsReset | 4.2770 us/op | 7.1600 us/op | 0.60 | | mainnet_e81889 - altair processRandaoMixesReset | 4.6230 us/op | 9.1400 us/op | 0.51 | | mainnet_e81889 - altair processHistoricalRootsUpdate | 610.00 ns/op | 824.00 ns/op | 0.74 | | mainnet_e81889 - altair processParticipationFlagUpdates | 2.0260 us/op | 2.7300 us/op | 0.74 | | mainnet_e81889 - altair processSyncCommitteeUpdates | 472.00 ns/op | 560.00 ns/op | 0.84 | | mainnet_e81889 - altair afterProcessEpoch | 99.926 ms/op | 112.42 ms/op | 0.89 | | capella processEpoch - mainnet_e217614 | 1.1002 s/op | 1.3832 s/op | 0.80 | | mainnet_e217614 - capella beforeProcessEpoch | 74.137 ms/op | 114.69 ms/op | 0.65 | | mainnet_e217614 - capella processJustificationAndFinalization | 14.216 us/op | 27.166 us/op | 0.52 | | mainnet_e217614 - capella processInactivityUpdates | 17.062 ms/op | 19.915 ms/op | 0.86 | | mainnet_e217614 - capella processRewardsAndPenalties | 219.56 ms/op | 265.49 ms/op | 0.83 | | mainnet_e217614 - capella processRegistryUpdates | 16.203 us/op | 23.588 us/op | 0.69 | | mainnet_e217614 - capella processSlashings | 554.00 ns/op | 623.00 ns/op | 0.89 | | mainnet_e217614 - capella processEth1DataReset | 394.00 ns/op | 550.00 ns/op | 0.72 | | mainnet_e217614 - capella processEffectiveBalanceUpdates | 14.114 ms/op | 16.716 ms/op | 0.84 | | mainnet_e217614 - capella processSlashingsReset | 3.0280 us/op | 6.9960 us/op | 0.43 | | mainnet_e217614 - capella processRandaoMixesReset | 5.9380 us/op | 7.7280 us/op | 0.77 | | mainnet_e217614 - capella processHistoricalRootsUpdate | 565.00 ns/op | 1.2880 us/op | 0.44 | | mainnet_e217614 - capella processParticipationFlagUpdates | 2.4630 us/op | 2.5900 us/op | 0.95 | | mainnet_e217614 - capella afterProcessEpoch | 247.92 ms/op | 252.75 ms/op | 0.98 | | phase0 processEpoch - mainnet_e58758 | 347.09 ms/op | 415.89 ms/op | 0.83 | | mainnet_e58758 - phase0 beforeProcessEpoch | 75.955 ms/op | 101.74 ms/op | 0.75 | | mainnet_e58758 - phase0 processJustificationAndFinalization | 18.598 us/op | 18.452 us/op | 1.01 | | mainnet_e58758 - phase0 processRewardsAndPenalties | 32.611 ms/op | 37.453 ms/op | 0.87 | | mainnet_e58758 - phase0 processRegistryUpdates | 8.1410 us/op | 10.888 us/op | 0.75 | | mainnet_e58758 - phase0 processSlashings | 388.00 ns/op | 426.00 ns/op | 0.91 | | mainnet_e58758 - phase0 processEth1DataReset | 363.00 ns/op | 476.00 ns/op | 0.76 | | mainnet_e58758 - phase0 processEffectiveBalanceUpdates | 1.2358 ms/op | 1.4114 ms/op | 0.88 | | mainnet_e58758 - phase0 processSlashingsReset | 3.0500 us/op | 5.5290 us/op | 0.55 | | mainnet_e58758 - phase0 processRandaoMixesReset | 4.6750 us/op | 6.0980 us/op | 0.77 | | mainnet_e58758 - phase0 processHistoricalRootsUpdate | 634.00 ns/op | 569.00 ns/op | 1.11 | | mainnet_e58758 - phase0 processParticipationRecordUpdates | 3.9920 us/op | 6.1040 us/op | 0.65 | | mainnet_e58758 - phase0 afterProcessEpoch | 84.308 ms/op | 91.240 ms/op | 0.92 | | phase0 processEffectiveBalanceUpdates - 250000 normalcase | 1.9395 ms/op | 1.6565 ms/op | 1.17 | | phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 | 5.3513 ms/op | 5.4876 ms/op | 0.98 | | altair processInactivityUpdates - 250000 normalcase | 18.394 ms/op | 20.127 ms/op | 0.91 | | altair processInactivityUpdates - 250000 worstcase | 18.047 ms/op | 17.821 ms/op | 1.01 | | phase0 processRegistryUpdates - 250000 normalcase | 13.005 us/op | 11.594 us/op | 1.12 | | phase0 processRegistryUpdates - 250000 badcase_full_deposits | 326.94 us/op | 338.82 us/op | 0.96 | | phase0 processRegistryUpdates - 250000 worstcase 0.5 | 136.56 ms/op | 136.23 ms/op | 1.00 | | altair processRewardsAndPenalties - 250000 normalcase | 43.634 ms/op | 37.966 ms/op | 1.15 | | altair processRewardsAndPenalties - 250000 worstcase | 44.140 ms/op | 35.392 ms/op | 1.25 | | phase0 getAttestationDeltas - 250000 normalcase | 11.405 ms/op | 12.491 ms/op | 0.91 | | phase0 getAttestationDeltas - 250000 worstcase | 9.4118 ms/op | 8.2718 ms/op | 1.14 | | phase0 processSlashings - 250000 worstcase | 116.94 us/op | 128.53 us/op | 0.91 | | altair processSyncCommitteeUpdates - 250000 | 142.68 ms/op | 136.01 ms/op | 1.05 | | BeaconState.hashTreeRoot - No change | 261.00 ns/op | 245.00 ns/op | 1.07 | | BeaconState.hashTreeRoot - 1 full validator | 129.19 us/op | 145.71 us/op | 0.89 | | BeaconState.hashTreeRoot - 32 full validator | 1.6435 ms/op | 1.2889 ms/op | 1.28 | | BeaconState.hashTreeRoot - 512 full validator | 19.168 ms/op | 13.312 ms/op | 1.44 | | BeaconState.hashTreeRoot - 1 validator.effectiveBalance | 207.08 us/op | 191.23 us/op | 1.08 | | BeaconState.hashTreeRoot - 32 validator.effectiveBalance | 2.4228 ms/op | 2.0006 ms/op | 1.21 | | BeaconState.hashTreeRoot - 512 validator.effectiveBalance | 32.328 ms/op | 25.702 ms/op | 1.26 | | BeaconState.hashTreeRoot - 1 balances | 131.28 us/op | 95.997 us/op | 1.37 | | BeaconState.hashTreeRoot - 32 balances | 1.1848 ms/op | 993.23 us/op | 1.19 | | BeaconState.hashTreeRoot - 512 balances | 13.160 ms/op | 13.105 ms/op | 1.00 | | BeaconState.hashTreeRoot - 250000 balances | 223.85 ms/op | 197.12 ms/op | 1.14 | | aggregationBits - 2048 els - zipIndexesInBitList | 31.483 us/op | 33.870 us/op | 0.93 | | byteArrayEquals 32 | 57.680 ns/op | 55.799 ns/op | 1.03 | | Buffer.compare 32 | 19.212 ns/op | 17.735 ns/op | 1.08 | | byteArrayEquals 1024 | 1.6914 us/op | 1.6440 us/op | 1.03 | | Buffer.compare 1024 | 28.630 ns/op | 25.413 ns/op | 1.13 | | byteArrayEquals 16384 | 27.702 us/op | 27.056 us/op | 1.02 | | Buffer.compare 16384 | 203.53 ns/op | 215.21 ns/op | 0.95 | | byteArrayEquals 123687377 | 202.12 ms/op | 201.55 ms/op | 1.00 | | Buffer.compare 123687377 | 8.5764 ms/op | 7.7733 ms/op | 1.10 | | byteArrayEquals 32 - diff last byte | 56.604 ns/op | 53.565 ns/op | 1.06 | | Buffer.compare 32 - diff last byte | 18.615 ns/op | 17.407 ns/op | 1.07 | | byteArrayEquals 1024 - diff last byte | 1.6935 us/op | 1.6276 us/op | 1.04 | | Buffer.compare 1024 - diff last byte | 28.902 ns/op | 26.020 ns/op | 1.11 | | byteArrayEquals 16384 - diff last byte | 30.914 us/op | 25.817 us/op | 1.20 | | Buffer.compare 16384 - diff last byte | 221.27 ns/op | 208.20 ns/op | 1.06 | | byteArrayEquals 123687377 - diff last byte | 202.93 ms/op | 205.04 ms/op | 0.99 | | Buffer.compare 123687377 - diff last byte | 8.3184 ms/op | 11.560 ms/op | 0.72 | | byteArrayEquals 32 - random bytes | 5.4030 ns/op | 5.4920 ns/op | 0.98 | | Buffer.compare 32 - random bytes | 17.939 ns/op | 19.040 ns/op | 0.94 | | byteArrayEquals 1024 - random bytes | 5.4400 ns/op | 5.5930 ns/op | 0.97 | | Buffer.compare 1024 - random bytes | 18.509 ns/op | 18.252 ns/op | 1.01 | | byteArrayEquals 16384 - random bytes | 5.4020 ns/op | 5.5780 ns/op | 0.97 | | Buffer.compare 16384 - random bytes | 17.847 ns/op | 18.873 ns/op | 0.95 | | byteArrayEquals 123687377 - random bytes | 6.7100 ns/op | 7.0300 ns/op | 0.95 | | Buffer.compare 123687377 - random bytes | 20.200 ns/op | 20.020 ns/op | 1.01 | | regular array get 100000 times | 37.860 us/op | 35.822 us/op | 1.06 | | wrappedArray get 100000 times | 34.536 us/op | 37.219 us/op | 0.93 | | arrayWithProxy get 100000 times | 13.541 ms/op | 15.262 ms/op | 0.89 | | ssz.Root.equals | 47.997 ns/op | 51.030 ns/op | 0.94 | | byteArrayEquals | 47.360 ns/op | 53.591 ns/op | 0.88 | | Buffer.compare | 11.009 ns/op | 13.254 ns/op | 0.83 | | shuffle list - 16384 els | 6.7202 ms/op | 6.9335 ms/op | 0.97 | | shuffle list - 250000 els | 101.16 ms/op | 104.85 ms/op | 0.96 | | processSlot - 1 slots | 13.875 us/op | 15.449 us/op | 0.90 | | processSlot - 32 slots | 3.2750 ms/op | 3.4238 ms/op | 0.96 | | getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei | 38.590 ms/op | 47.319 ms/op | 0.82 | | getCommitteeAssignments - req 1 vs - 250000 vc | 2.3849 ms/op | 2.6253 ms/op | 0.91 | | getCommitteeAssignments - req 100 vs - 250000 vc | 4.7737 ms/op | 4.5952 ms/op | 1.04 | | getCommitteeAssignments - req 1000 vs - 250000 vc | 4.8488 ms/op | 4.7593 ms/op | 1.02 | | findModifiedValidators - 10000 modified validators | 382.24 ms/op | 482.74 ms/op | 0.79 | | findModifiedValidators - 1000 modified validators | 241.76 ms/op | 457.92 ms/op | 0.53 | | findModifiedValidators - 100 modified validators | 249.24 ms/op | 497.75 ms/op | 0.50 | | findModifiedValidators - 10 modified validators | 195.05 ms/op | 464.50 ms/op | 0.42 | | findModifiedValidators - 1 modified validators | 176.54 ms/op | 499.40 ms/op | 0.35 | | findModifiedValidators - no difference | 182.52 ms/op | 502.01 ms/op | 0.36 | | compare ViewDUs | 3.5805 s/op | 6.6021 s/op | 0.54 | | compare each validator Uint8Array | 1.5651 s/op | 2.5286 s/op | 0.62 | | compare ViewDU to Uint8Array | 1.4191 s/op | 1.8713 s/op | 0.76 | | migrate state 1000000 validators, 24 modified, 0 new | 1.1220 s/op | 1.3857 s/op | 0.81 | | migrate state 1000000 validators, 1700 modified, 1000 new | 1.3883 s/op | 1.4368 s/op | 0.97 | | migrate state 1000000 validators, 3400 modified, 2000 new | 1.7141 s/op | 1.5387 s/op | 1.11 | | migrate state 1500000 validators, 24 modified, 0 new | 982.03 ms/op | 1.0069 s/op | 0.98 | | migrate state 1500000 validators, 1700 modified, 1000 new | 1.2198 s/op | 1.1818 s/op | 1.03 | | migrate state 1500000 validators, 3400 modified, 2000 new | 1.6262 s/op | 1.4640 s/op | 1.11 | | RootCache.getBlockRootAtSlot - 250000 vs - 7PWei | 5.5500 ns/op | 4.9900 ns/op | 1.11 | | state getBlockRootAtSlot - 250000 vs - 7PWei | 668.45 ns/op | 626.30 ns/op | 1.07 | | computeProposers - vc 250000 | 8.2940 ms/op | 8.1766 ms/op | 1.01 | | computeEpochShuffling - vc 250000 | 102.61 ms/op | 99.552 ms/op | 1.03 | | getNextSyncCommittee - vc 250000 | 148.91 ms/op | 131.45 ms/op | 1.13 | | computeSigningRoot for AttestationData | 28.344 us/op | 27.155 us/op | 1.04 | | hash AttestationData serialized data then Buffer.toString(base64) | 1.7859 us/op | 1.7799 us/op | 1.00 | | toHexString serialized data | 1.1631 us/op | 1.0392 us/op | 1.12 | | Buffer.toString(base64) | 231.62 ns/op | 231.56 ns/op | 1.00 | | nodejs block root to RootHex using toHex | 190.41 ns/op | 211.78 ns/op | 0.90 | | nodejs block root to RootHex using toRootHex | 117.23 ns/op | 115.57 ns/op | 1.01 | | browser block root to RootHex using the deprecated toHexString | 346.00 ns/op | 291.16 ns/op | 1.19 | | browser block root to RootHex using toHex | 216.12 ns/op | 255.42 ns/op | 0.85 | | browser block root to RootHex using toRootHex | 186.21 ns/op | 186.44 ns/op | 1.00 |

by benchmarkbot/action

wemeetagain commented 1 week ago

:tada: This PR is included in v1.23.0 :tada: