ChainSafe / lodestar

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

fix: avoid toHexString() #7075

Closed twoeths closed 2 months ago

twoeths commented 2 months ago

Motivation

Description

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 69.73684% with 23 lines in your changes missing coverage. Please review.

Project coverage is 50.91%. Comparing base (6c1e335) to head (4801dac). Report is 1 commits behind head on unstable.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## unstable #7075 +/- ## ============================================ + Coverage 49.06% 50.91% +1.84% ============================================ Files 594 594 Lines 39607 39609 +2 Branches 2248 2248 ============================================ + Hits 19433 20166 +733 + Misses 20133 19443 -690 + Partials 41 0 -41 ```
github-actions[bot] commented 2 months ago

Performance Report

✔️ no performance regression detected

Full benchmark results | Benchmark suite | Current: 7792d933d9238d9b981603ac21de18cd093fa900 | Previous: 6c1e335a5734bba7e38f160e26d134300eb7cee3 | Ratio | |-|-|-|-| | getPubkeys - index2pubkey - req 1000 vs - 250000 vc | 2.8027 ms/op | 2.0004 ms/op | 1.40 | | getPubkeys - validatorsArr - req 1000 vs - 250000 vc | 79.219 us/op | 50.520 us/op | 1.57 | | BLS verify - blst | 956.12 us/op | 945.66 us/op | 1.01 | | BLS verifyMultipleSignatures 3 - blst | 1.5436 ms/op | 1.2779 ms/op | 1.21 | | BLS verifyMultipleSignatures 8 - blst | 2.4774 ms/op | 1.8806 ms/op | 1.32 | | BLS verifyMultipleSignatures 32 - blst | 7.6888 ms/op | 5.9542 ms/op | 1.29 | | BLS verifyMultipleSignatures 64 - blst | 14.352 ms/op | 11.054 ms/op | 1.30 | | BLS verifyMultipleSignatures 128 - blst | 26.227 ms/op | 17.917 ms/op | 1.46 | | BLS deserializing 10000 signatures | 801.35 ms/op | 698.41 ms/op | 1.15 | | BLS deserializing 100000 signatures | 8.3821 s/op | 7.1478 s/op | 1.17 | | BLS verifyMultipleSignatures - same message - 3 - blst | 1.1856 ms/op | 1.1945 ms/op | 0.99 | | BLS verifyMultipleSignatures - same message - 8 - blst | 1.3927 ms/op | 1.2832 ms/op | 1.09 | | BLS verifyMultipleSignatures - same message - 32 - blst | 2.0300 ms/op | 2.0519 ms/op | 0.99 | | BLS verifyMultipleSignatures - same message - 64 - blst | 3.9938 ms/op | 3.0620 ms/op | 1.30 | | BLS verifyMultipleSignatures - same message - 128 - blst | 5.7639 ms/op | 5.2129 ms/op | 1.11 | | BLS aggregatePubkeys 32 - blst | 25.110 us/op | 22.203 us/op | 1.13 | | BLS aggregatePubkeys 128 - blst | 83.691 us/op | 73.881 us/op | 1.13 | | notSeenSlots=1 numMissedVotes=1 numBadVotes=10 | 141.89 ms/op | 93.932 ms/op | 1.51 | | notSeenSlots=1 numMissedVotes=0 numBadVotes=4 | 92.246 ms/op | 58.802 ms/op | 1.57 | | notSeenSlots=2 numMissedVotes=1 numBadVotes=10 | 43.709 ms/op | 40.844 ms/op | 1.07 | | getSlashingsAndExits - default max | 107.43 us/op | 107.38 us/op | 1.00 | | getSlashingsAndExits - 2k | 256.47 us/op | 325.84 us/op | 0.79 | | proposeBlockBody type=full, size=empty | 5.8656 ms/op | 6.5283 ms/op | 0.90 | | isKnown best case - 1 super set check | 321.00 ns/op | 481.00 ns/op | 0.67 | | isKnown normal case - 2 super set checks | 304.00 ns/op | 477.00 ns/op | 0.64 | | isKnown worse case - 16 super set checks | 288.00 ns/op | 420.00 ns/op | 0.69 | | InMemoryCheckpointStateCache - add get delete | 3.5500 us/op | 4.4810 us/op | 0.79 | | updateUnfinalizedPubkeys - updating 10 pubkeys | 1.0188 ms/op | 1.2332 ms/op | 0.83 | | updateUnfinalizedPubkeys - updating 100 pubkeys | 2.5423 ms/op | 2.8586 ms/op | 0.89 | | updateUnfinalizedPubkeys - updating 1000 pubkeys | 53.995 ms/op | 61.150 ms/op | 0.88 | | validate api signedAggregateAndProof - struct | 1.5499 ms/op | 1.5404 ms/op | 1.01 | | validate gossip signedAggregateAndProof - struct | 1.4014 ms/op | 1.5780 ms/op | 0.89 | | validate gossip attestation - vc 640000 | 876.92 us/op | 1.1358 ms/op | 0.77 | | batch validate gossip attestation - vc 640000 - chunk 32 | 122.68 us/op | 164.46 us/op | 0.75 | | batch validate gossip attestation - vc 640000 - chunk 64 | 109.11 us/op | 149.19 us/op | 0.73 | | batch validate gossip attestation - vc 640000 - chunk 128 | 104.67 us/op | 153.11 us/op | 0.68 | | batch validate gossip attestation - vc 640000 - chunk 256 | 100.37 us/op | 154.95 us/op | 0.65 | | pickEth1Vote - no votes | 1.0814 ms/op | 1.9039 ms/op | 0.57 | | pickEth1Vote - max votes | 6.3039 ms/op | 12.282 ms/op | 0.51 | | pickEth1Vote - Eth1Data hashTreeRoot value x2048 | 14.210 ms/op | 26.259 ms/op | 0.54 | | pickEth1Vote - Eth1Data hashTreeRoot tree x2048 | 20.074 ms/op | 37.548 ms/op | 0.53 | | pickEth1Vote - Eth1Data fastSerialize value x2048 | 474.82 us/op | 735.92 us/op | 0.65 | | pickEth1Vote - Eth1Data fastSerialize tree x2048 | 3.0649 ms/op | 6.4006 ms/op | 0.48 | | bytes32 toHexString | 436.00 ns/op | 944.00 ns/op | 0.46 | | bytes32 Buffer.toString(hex) | 258.00 ns/op | 322.00 ns/op | 0.80 | | bytes32 Buffer.toString(hex) from Uint8Array | 414.00 ns/op | 587.00 ns/op | 0.71 | | bytes32 Buffer.toString(hex) + 0x | 259.00 ns/op | 306.00 ns/op | 0.85 | | Object access 1 prop | 0.15200 ns/op | 0.23900 ns/op | 0.64 | | Map access 1 prop | 0.13200 ns/op | 0.15800 ns/op | 0.84 | | Object get x1000 | 6.2120 ns/op | 7.3030 ns/op | 0.85 | | Map get x1000 | 6.8670 ns/op | 7.5090 ns/op | 0.91 | | Object set x1000 | 33.567 ns/op | 81.364 ns/op | 0.41 | | Map set x1000 | 22.643 ns/op | 50.163 ns/op | 0.45 | | Return object 10000 times | 0.29420 ns/op | 0.35670 ns/op | 0.82 | | Throw Error 10000 times | 3.4058 us/op | 4.3034 us/op | 0.79 | | toHex | 148.65 ns/op | 210.83 ns/op | 0.71 | | Buffer.from | 134.09 ns/op | 190.51 ns/op | 0.70 | | shared Buffer | 91.627 ns/op | 125.22 ns/op | 0.73 | | fastMsgIdFn sha256 / 200 bytes | 2.2270 us/op | 2.8930 us/op | 0.77 | | fastMsgIdFn h32 xxhash / 200 bytes | 246.00 ns/op | 398.00 ns/op | 0.62 | | fastMsgIdFn h64 xxhash / 200 bytes | 268.00 ns/op | 349.00 ns/op | 0.77 | | fastMsgIdFn sha256 / 1000 bytes | 7.6000 us/op | 8.7130 us/op | 0.87 | | fastMsgIdFn h32 xxhash / 1000 bytes | 371.00 ns/op | 538.00 ns/op | 0.69 | | fastMsgIdFn h64 xxhash / 1000 bytes | 343.00 ns/op | 446.00 ns/op | 0.77 | | fastMsgIdFn sha256 / 10000 bytes | 64.671 us/op | 77.610 us/op | 0.83 | | fastMsgIdFn h32 xxhash / 10000 bytes | 1.8590 us/op | 2.2040 us/op | 0.84 | | fastMsgIdFn h64 xxhash / 10000 bytes | 1.2260 us/op | 1.3800 us/op | 0.89 | | send data - 1000 256B messages | 13.026 ms/op | 19.270 ms/op | 0.68 | | send data - 1000 512B messages | 17.000 ms/op | 25.407 ms/op | 0.67 | | send data - 1000 1024B messages | 26.873 ms/op | 36.085 ms/op | 0.74 | | send data - 1000 1200B messages | 18.944 ms/op | 43.847 ms/op | 0.43 | | send data - 1000 2048B messages | 33.694 ms/op | 54.629 ms/op | 0.62 | | send data - 1000 4096B messages | 31.789 ms/op | 57.769 ms/op | 0.55 | | send data - 1000 16384B messages | 72.364 ms/op | 132.27 ms/op | 0.55 | | send data - 1000 65536B messages | 219.52 ms/op | 433.76 ms/op | 0.51 | | enrSubnets - fastDeserialize 64 bits | 1.1380 us/op | 2.3640 us/op | 0.48 | | enrSubnets - ssz BitVector 64 bits | 368.00 ns/op | 662.00 ns/op | 0.56 | | enrSubnets - fastDeserialize 4 bits | 151.00 ns/op | 252.00 ns/op | 0.60 | | enrSubnets - ssz BitVector 4 bits | 356.00 ns/op | 580.00 ns/op | 0.61 | | prioritizePeers score -10:0 att 32-0.1 sync 2-0 | 157.03 us/op | 215.18 us/op | 0.73 | | prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 | 179.00 us/op | 215.44 us/op | 0.83 | | prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 | 256.61 us/op | 415.75 us/op | 0.62 | | prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 | 409.23 us/op | 564.75 us/op | 0.72 | | prioritizePeers score 0:0 att 64-1 sync 4-1 | 739.77 us/op | 932.87 us/op | 0.79 | | array of 16000 items push then shift | 1.6291 us/op | 1.7989 us/op | 0.91 | | LinkedList of 16000 items push then shift | 7.5680 ns/op | 9.6060 ns/op | 0.79 | | array of 16000 items push then pop | 130.91 ns/op | 172.52 ns/op | 0.76 | | LinkedList of 16000 items push then pop | 7.3690 ns/op | 11.403 ns/op | 0.65 | | array of 24000 items push then shift | 2.4723 us/op | 3.4960 us/op | 0.71 | | LinkedList of 24000 items push then shift | 7.5900 ns/op | 11.326 ns/op | 0.67 | | array of 24000 items push then pop | 160.83 ns/op | 235.19 ns/op | 0.68 | | LinkedList of 24000 items push then pop | 6.9750 ns/op | 9.8270 ns/op | 0.71 | | intersect bitArray bitLen 8 | 6.5490 ns/op | 7.8050 ns/op | 0.84 | | intersect array and set length 8 | 48.363 ns/op | 79.882 ns/op | 0.61 | | intersect bitArray bitLen 128 | 30.216 ns/op | 38.751 ns/op | 0.78 | | intersect array and set length 128 | 709.47 ns/op | 1.2246 us/op | 0.58 | | bitArray.getTrueBitIndexes() bitLen 128 | 1.7440 us/op | 3.8250 us/op | 0.46 | | bitArray.getTrueBitIndexes() bitLen 248 | 3.3900 us/op | 6.4220 us/op | 0.53 | | bitArray.getTrueBitIndexes() bitLen 512 | 7.1340 us/op | 14.963 us/op | 0.48 | | Buffer.concat 32 items | 975.00 ns/op | 2.2580 us/op | 0.43 | | Uint8Array.set 32 items | 2.1690 us/op | 3.5580 us/op | 0.61 | | Buffer.copy | 2.4860 us/op | 3.5150 us/op | 0.71 | | Uint8Array.set - with subarray | 3.1720 us/op | 5.3280 us/op | 0.60 | | Uint8Array.set - without subarray | 2.0020 us/op | 2.9270 us/op | 0.68 | | getUint32 - dataview | 336.00 ns/op | 424.00 ns/op | 0.79 | | getUint32 - manual | 374.00 ns/op | 432.00 ns/op | 0.87 | | Set add up to 64 items then delete first | 3.7679 us/op | 3.9648 us/op | 0.95 | | OrderedSet add up to 64 items then delete first | 4.9629 us/op | 7.7565 us/op | 0.64 | | Set add up to 64 items then delete last | 3.0175 us/op | 5.1704 us/op | 0.58 | | OrderedSet add up to 64 items then delete last | 4.5428 us/op | 7.9595 us/op | 0.57 | | Set add up to 64 items then delete middle | 2.8648 us/op | 4.4484 us/op | 0.64 | | OrderedSet add up to 64 items then delete middle | 7.0106 us/op | 11.216 us/op | 0.63 | | Set add up to 128 items then delete first | 5.6947 us/op | 10.628 us/op | 0.54 | | OrderedSet add up to 128 items then delete first | 8.4265 us/op | 17.964 us/op | 0.47 | | Set add up to 128 items then delete last | 5.9054 us/op | 10.519 us/op | 0.56 | | OrderedSet add up to 128 items then delete last | 8.9591 us/op | 16.337 us/op | 0.55 | | Set add up to 128 items then delete middle | 6.0232 us/op | 11.412 us/op | 0.53 | | OrderedSet add up to 128 items then delete middle | 16.818 us/op | 27.718 us/op | 0.61 | | Set add up to 256 items then delete first | 12.017 us/op | 22.263 us/op | 0.54 | | OrderedSet add up to 256 items then delete first | 18.776 us/op | 32.817 us/op | 0.57 | | Set add up to 256 items then delete last | 12.519 us/op | 19.293 us/op | 0.65 | | OrderedSet add up to 256 items then delete last | 19.142 us/op | 28.184 us/op | 0.68 | | Set add up to 256 items then delete middle | 11.717 us/op | 17.597 us/op | 0.67 | | OrderedSet add up to 256 items then delete middle | 51.195 us/op | 62.439 us/op | 0.82 | | transfer serialized Status (84 B) | 1.6140 us/op | 2.3710 us/op | 0.68 | | copy serialized Status (84 B) | 1.3710 us/op | 1.8320 us/op | 0.75 | | transfer serialized SignedVoluntaryExit (112 B) | 1.7170 us/op | 2.9310 us/op | 0.59 | | copy serialized SignedVoluntaryExit (112 B) | 1.4940 us/op | 2.6900 us/op | 0.56 | | transfer serialized ProposerSlashing (416 B) | 1.9270 us/op | 3.1360 us/op | 0.61 | | copy serialized ProposerSlashing (416 B) | 1.6730 us/op | 3.0870 us/op | 0.54 | | transfer serialized Attestation (485 B) | 1.8090 us/op | 2.6030 us/op | 0.69 | | copy serialized Attestation (485 B) | 1.7670 us/op | 3.1580 us/op | 0.56 | | transfer serialized AttesterSlashing (33232 B) | 1.9830 us/op | 3.2380 us/op | 0.61 | | copy serialized AttesterSlashing (33232 B) | 5.8550 us/op | 15.329 us/op | 0.38 | | transfer serialized Small SignedBeaconBlock (128000 B) | 2.0330 us/op | 5.1310 us/op | 0.40 | | copy serialized Small SignedBeaconBlock (128000 B) | 16.545 us/op | 44.552 us/op | 0.37 | | transfer serialized Avg SignedBeaconBlock (200000 B) | 2.7940 us/op | 6.6740 us/op | 0.42 | | copy serialized Avg SignedBeaconBlock (200000 B) | 24.042 us/op | 72.347 us/op | 0.33 | | transfer serialized BlobsSidecar (524380 B) | 2.8180 us/op | 9.7240 us/op | 0.29 | | copy serialized BlobsSidecar (524380 B) | 261.28 us/op | 197.95 us/op | 1.32 | | transfer serialized Big SignedBeaconBlock (1000000 B) | 4.2610 us/op | 7.3030 us/op | 0.58 | | copy serialized Big SignedBeaconBlock (1000000 B) | 248.03 us/op | 378.17 us/op | 0.66 | | pass gossip attestations to forkchoice per slot | 2.9343 ms/op | 4.7891 ms/op | 0.61 | | forkChoice updateHead vc 100000 bc 64 eq 0 | 504.33 us/op | 817.69 us/op | 0.62 | | forkChoice updateHead vc 600000 bc 64 eq 0 | 3.2980 ms/op | 4.7045 ms/op | 0.70 | | forkChoice updateHead vc 1000000 bc 64 eq 0 | 6.1257 ms/op | 8.1505 ms/op | 0.75 | | forkChoice updateHead vc 600000 bc 320 eq 0 | 3.9501 ms/op | 6.5278 ms/op | 0.61 | | forkChoice updateHead vc 600000 bc 1200 eq 0 | 4.1142 ms/op | 4.4307 ms/op | 0.93 | | forkChoice updateHead vc 600000 bc 7200 eq 0 | 4.7605 ms/op | 4.7584 ms/op | 1.00 | | forkChoice updateHead vc 600000 bc 64 eq 1000 | 12.393 ms/op | 13.227 ms/op | 0.94 | | forkChoice updateHead vc 600000 bc 64 eq 10000 | 12.417 ms/op | 16.342 ms/op | 0.76 | | forkChoice updateHead vc 600000 bc 64 eq 300000 | 24.378 ms/op | 54.394 ms/op | 0.45 | | computeDeltas 500000 validators 300 proto nodes | 4.5302 ms/op | 4.8289 ms/op | 0.94 | | computeDeltas 500000 validators 1200 proto nodes | 4.1660 ms/op | 5.2111 ms/op | 0.80 | | computeDeltas 500000 validators 7200 proto nodes | 4.1982 ms/op | 5.1999 ms/op | 0.81 | | computeDeltas 750000 validators 300 proto nodes | 5.8701 ms/op | 7.5898 ms/op | 0.77 | | computeDeltas 750000 validators 1200 proto nodes | 5.7852 ms/op | 8.0191 ms/op | 0.72 | | computeDeltas 750000 validators 7200 proto nodes | 6.0030 ms/op | 8.1549 ms/op | 0.74 | | computeDeltas 1400000 validators 300 proto nodes | 11.576 ms/op | 15.453 ms/op | 0.75 | | computeDeltas 1400000 validators 1200 proto nodes | 11.633 ms/op | 14.074 ms/op | 0.83 | | computeDeltas 1400000 validators 7200 proto nodes | 11.962 ms/op | 13.339 ms/op | 0.90 | | computeDeltas 2100000 validators 300 proto nodes | 18.736 ms/op | 17.514 ms/op | 1.07 | | computeDeltas 2100000 validators 1200 proto nodes | 19.210 ms/op | 17.890 ms/op | 1.07 | | computeDeltas 2100000 validators 7200 proto nodes | 18.024 ms/op | 17.951 ms/op | 1.00 | | altair processAttestation - 250000 vs - 7PWei normalcase | 2.6845 ms/op | 2.7361 ms/op | 0.98 | | altair processAttestation - 250000 vs - 7PWei worstcase | 3.2714 ms/op | 3.9267 ms/op | 0.83 | | altair processAttestation - setStatus - 1/6 committees join | 110.54 us/op | 122.84 us/op | 0.90 | | altair processAttestation - setStatus - 1/3 committees join | 212.60 us/op | 207.86 us/op | 1.02 | | altair processAttestation - setStatus - 1/2 committees join | 302.49 us/op | 290.07 us/op | 1.04 | | altair processAttestation - setStatus - 2/3 committees join | 385.27 us/op | 399.99 us/op | 0.96 | | altair processAttestation - setStatus - 4/5 committees join | 522.15 us/op | 570.04 us/op | 0.92 | | altair processAttestation - setStatus - 100% committees join | 687.78 us/op | 662.97 us/op | 1.04 | | altair processBlock - 250000 vs - 7PWei normalcase | 6.4205 ms/op | 6.7566 ms/op | 0.95 | | altair processBlock - 250000 vs - 7PWei normalcase hashState | 30.840 ms/op | 32.328 ms/op | 0.95 | | altair processBlock - 250000 vs - 7PWei worstcase | 38.817 ms/op | 43.510 ms/op | 0.89 | | altair processBlock - 250000 vs - 7PWei worstcase hashState | 87.519 ms/op | 89.783 ms/op | 0.97 | | phase0 processBlock - 250000 vs - 7PWei normalcase | 2.4071 ms/op | 3.0639 ms/op | 0.79 | | phase0 processBlock - 250000 vs - 7PWei worstcase | 24.960 ms/op | 31.659 ms/op | 0.79 | | altair processEth1Data - 250000 vs - 7PWei normalcase | 485.12 us/op | 561.43 us/op | 0.86 | | getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 | 5.7940 us/op | 9.5430 us/op | 0.61 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 | 42.904 us/op | 56.370 us/op | 0.76 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 | 11.577 us/op | 15.152 us/op | 0.76 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 | 8.8180 us/op | 8.6260 us/op | 1.02 | | getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 | 152.19 us/op | 180.43 us/op | 0.84 | | getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 | 1.1928 ms/op | 1.4344 ms/op | 0.83 | | getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 | 1.8584 ms/op | 1.9414 ms/op | 0.96 | | getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 | 1.5954 ms/op | 1.9486 ms/op | 0.82 | | getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 | 3.9044 ms/op | 4.0544 ms/op | 0.96 | | getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 | 1.8928 ms/op | 2.0046 ms/op | 0.94 | | getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 | 4.4866 ms/op | 4.5218 ms/op | 0.99 | | Tree 40 250000 create | 270.06 ms/op | 347.14 ms/op | 0.78 | | Tree 40 250000 get(125000) | 173.90 ns/op | 173.77 ns/op | 1.00 | | Tree 40 250000 set(125000) | 889.04 ns/op | 946.53 ns/op | 0.94 | | Tree 40 250000 toArray() | 21.528 ms/op | 23.282 ms/op | 0.92 | | Tree 40 250000 iterate all - toArray() + loop | 22.622 ms/op | 23.049 ms/op | 0.98 | | Tree 40 250000 iterate all - get(i) | 65.066 ms/op | 64.462 ms/op | 1.01 | | Array 250000 create | 3.8741 ms/op | 4.2665 ms/op | 0.91 | | Array 250000 clone - spread | 1.6985 ms/op | 1.7192 ms/op | 0.99 | | Array 250000 get(125000) | 0.45800 ns/op | 0.46900 ns/op | 0.98 | | Array 250000 set(125000) | 0.48700 ns/op | 0.52000 ns/op | 0.94 | | Array 250000 iterate all - loop | 107.55 us/op | 91.059 us/op | 1.18 | | phase0 afterProcessEpoch - 250000 vs - 7PWei | 95.228 ms/op | 101.32 ms/op | 0.94 | | Array.fill - length 1000000 | 4.9617 ms/op | 4.5656 ms/op | 1.09 | | Array push - length 1000000 | 21.717 ms/op | 23.820 ms/op | 0.91 | | Array.get | 0.29714 ns/op | 0.30310 ns/op | 0.98 | | Uint8Array.get | 0.45984 ns/op | 0.47585 ns/op | 0.97 | | phase0 beforeProcessEpoch - 250000 vs - 7PWei | 20.694 ms/op | 17.392 ms/op | 1.19 | | altair processEpoch - mainnet_e81889 | 340.80 ms/op | 367.77 ms/op | 0.93 | | mainnet_e81889 - altair beforeProcessEpoch | 19.313 ms/op | 19.745 ms/op | 0.98 | | mainnet_e81889 - altair processJustificationAndFinalization | 15.215 us/op | 16.286 us/op | 0.93 | | mainnet_e81889 - altair processInactivityUpdates | 6.7489 ms/op | 7.7649 ms/op | 0.87 | | mainnet_e81889 - altair processRewardsAndPenalties | 46.193 ms/op | 50.248 ms/op | 0.92 | | mainnet_e81889 - altair processRegistryUpdates | 4.1940 us/op | 2.0880 us/op | 2.01 | | mainnet_e81889 - altair processSlashings | 955.00 ns/op | 483.00 ns/op | 1.98 | | mainnet_e81889 - altair processEth1DataReset | 856.00 ns/op | 421.00 ns/op | 2.03 | | mainnet_e81889 - altair processEffectiveBalanceUpdates | 1.9485 ms/op | 1.8750 ms/op | 1.04 | | mainnet_e81889 - altair processSlashingsReset | 3.9600 us/op | 6.7570 us/op | 0.59 | | mainnet_e81889 - altair processRandaoMixesReset | 6.1090 us/op | 3.7400 us/op | 1.63 | | mainnet_e81889 - altair processHistoricalRootsUpdate | 590.00 ns/op | 822.00 ns/op | 0.72 | | mainnet_e81889 - altair processParticipationFlagUpdates | 3.4700 us/op | 5.3350 us/op | 0.65 | | mainnet_e81889 - altair processSyncCommitteeUpdates | 546.00 ns/op | 589.00 ns/op | 0.93 | | mainnet_e81889 - altair afterProcessEpoch | 92.876 ms/op | 105.77 ms/op | 0.88 | | capella processEpoch - mainnet_e217614 | 1.2270 s/op | 1.4142 s/op | 0.87 | | mainnet_e217614 - capella beforeProcessEpoch | 73.660 ms/op | 83.660 ms/op | 0.88 | | mainnet_e217614 - capella processJustificationAndFinalization | 22.103 us/op | 31.195 us/op | 0.71 | | mainnet_e217614 - capella processInactivityUpdates | 23.568 ms/op | 22.934 ms/op | 1.03 | | mainnet_e217614 - capella processRewardsAndPenalties | 241.17 ms/op | 278.97 ms/op | 0.86 | | mainnet_e217614 - capella processRegistryUpdates | 12.420 us/op | 16.247 us/op | 0.76 | | mainnet_e217614 - capella processSlashings | 379.00 ns/op | 785.00 ns/op | 0.48 | | mainnet_e217614 - capella processEth1DataReset | 275.00 ns/op | 451.00 ns/op | 0.61 | | mainnet_e217614 - capella processEffectiveBalanceUpdates | 13.272 ms/op | 4.8768 ms/op | 2.72 | | mainnet_e217614 - capella processSlashingsReset | 3.0780 us/op | 4.9020 us/op | 0.63 | | mainnet_e217614 - capella processRandaoMixesReset | 4.7910 us/op | 12.448 us/op | 0.38 | | mainnet_e217614 - capella processHistoricalRootsUpdate | 518.00 ns/op | 1.0340 us/op | 0.50 | | mainnet_e217614 - capella processParticipationFlagUpdates | 2.5760 us/op | 5.0150 us/op | 0.51 | | mainnet_e217614 - capella afterProcessEpoch | 254.98 ms/op | 262.10 ms/op | 0.97 | | phase0 processEpoch - mainnet_e58758 | 434.02 ms/op | 477.41 ms/op | 0.91 | | mainnet_e58758 - phase0 beforeProcessEpoch | 76.187 ms/op | 127.63 ms/op | 0.60 | | mainnet_e58758 - phase0 processJustificationAndFinalization | 16.524 us/op | 24.784 us/op | 0.67 | | mainnet_e58758 - phase0 processRewardsAndPenalties | 27.509 ms/op | 41.314 ms/op | 0.67 | | mainnet_e58758 - phase0 processRegistryUpdates | 11.301 us/op | 14.733 us/op | 0.77 | | mainnet_e58758 - phase0 processSlashings | 468.00 ns/op | 608.00 ns/op | 0.77 | | mainnet_e58758 - phase0 processEth1DataReset | 342.00 ns/op | 925.00 ns/op | 0.37 | | mainnet_e58758 - phase0 processEffectiveBalanceUpdates | 1.6131 ms/op | 1.5885 ms/op | 1.02 | | mainnet_e58758 - phase0 processSlashingsReset | 2.8570 us/op | 5.3630 us/op | 0.53 | | mainnet_e58758 - phase0 processRandaoMixesReset | 5.0180 us/op | 11.687 us/op | 0.43 | | mainnet_e58758 - phase0 processHistoricalRootsUpdate | 542.00 ns/op | 835.00 ns/op | 0.65 | | mainnet_e58758 - phase0 processParticipationRecordUpdates | 4.4800 us/op | 4.7230 us/op | 0.95 | | mainnet_e58758 - phase0 afterProcessEpoch | 81.833 ms/op | 89.070 ms/op | 0.92 | | phase0 processEffectiveBalanceUpdates - 250000 normalcase | 1.9294 ms/op | 1.5634 ms/op | 1.23 | | phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 | 4.0084 ms/op | 4.7416 ms/op | 0.85 | | altair processInactivityUpdates - 250000 normalcase | 19.554 ms/op | 21.162 ms/op | 0.92 | | altair processInactivityUpdates - 250000 worstcase | 18.478 ms/op | 22.735 ms/op | 0.81 | | phase0 processRegistryUpdates - 250000 normalcase | 8.5680 us/op | 12.075 us/op | 0.71 | | phase0 processRegistryUpdates - 250000 badcase_full_deposits | 283.04 us/op | 451.99 us/op | 0.63 | | phase0 processRegistryUpdates - 250000 worstcase 0.5 | 114.81 ms/op | 146.66 ms/op | 0.78 | | altair processRewardsAndPenalties - 250000 normalcase | 41.835 ms/op | 43.106 ms/op | 0.97 | | altair processRewardsAndPenalties - 250000 worstcase | 40.275 ms/op | 40.081 ms/op | 1.00 | | phase0 getAttestationDeltas - 250000 normalcase | 7.6325 ms/op | 9.5111 ms/op | 0.80 | | phase0 getAttestationDeltas - 250000 worstcase | 7.9118 ms/op | 10.098 ms/op | 0.78 | | phase0 processSlashings - 250000 worstcase | 98.567 us/op | 116.10 us/op | 0.85 | | altair processSyncCommitteeUpdates - 250000 | 130.75 ms/op | 147.37 ms/op | 0.89 | | BeaconState.hashTreeRoot - No change | 276.00 ns/op | 467.00 ns/op | 0.59 | | BeaconState.hashTreeRoot - 1 full validator | 102.34 us/op | 125.06 us/op | 0.82 | | BeaconState.hashTreeRoot - 32 full validator | 1.2226 ms/op | 1.5454 ms/op | 0.79 | | BeaconState.hashTreeRoot - 512 full validator | 9.4664 ms/op | 16.483 ms/op | 0.57 | | BeaconState.hashTreeRoot - 1 validator.effectiveBalance | 104.07 us/op | 193.84 us/op | 0.54 | | BeaconState.hashTreeRoot - 32 validator.effectiveBalance | 1.9562 ms/op | 2.4090 ms/op | 0.81 | | BeaconState.hashTreeRoot - 512 validator.effectiveBalance | 21.542 ms/op | 30.200 ms/op | 0.71 | | BeaconState.hashTreeRoot - 1 balances | 93.749 us/op | 124.12 us/op | 0.76 | | BeaconState.hashTreeRoot - 32 balances | 1.2682 ms/op | 1.0909 ms/op | 1.16 | | BeaconState.hashTreeRoot - 512 balances | 10.556 ms/op | 14.989 ms/op | 0.70 | | BeaconState.hashTreeRoot - 250000 balances | 174.45 ms/op | 230.02 ms/op | 0.76 | | aggregationBits - 2048 els - zipIndexesInBitList | 23.973 us/op | 38.433 us/op | 0.62 | | byteArrayEquals 32 | 54.017 ns/op | 63.530 ns/op | 0.85 | | Buffer.compare 32 | 17.421 ns/op | 18.959 ns/op | 0.92 | | byteArrayEquals 1024 | 1.5908 us/op | 1.8164 us/op | 0.88 | | Buffer.compare 1024 | 25.854 ns/op | 25.717 ns/op | 1.01 | | byteArrayEquals 16384 | 25.443 us/op | 28.287 us/op | 0.90 | | Buffer.compare 16384 | 193.24 ns/op | 258.32 ns/op | 0.75 | | byteArrayEquals 123687377 | 193.19 ms/op | 214.88 ms/op | 0.90 | | Buffer.compare 123687377 | 7.3570 ms/op | 9.5230 ms/op | 0.77 | | byteArrayEquals 32 - diff last byte | 53.202 ns/op | 58.226 ns/op | 0.91 | | Buffer.compare 32 - diff last byte | 17.411 ns/op | 19.241 ns/op | 0.90 | | byteArrayEquals 1024 - diff last byte | 1.5985 us/op | 1.6865 us/op | 0.95 | | Buffer.compare 1024 - diff last byte | 25.568 ns/op | 27.448 ns/op | 0.93 | | byteArrayEquals 16384 - diff last byte | 25.379 us/op | 27.891 us/op | 0.91 | | Buffer.compare 16384 - diff last byte | 207.83 ns/op | 231.50 ns/op | 0.90 | | byteArrayEquals 123687377 - diff last byte | 197.38 ms/op | 214.28 ms/op | 0.92 | | Buffer.compare 123687377 - diff last byte | 7.2283 ms/op | 11.464 ms/op | 0.63 | | byteArrayEquals 32 - random bytes | 5.0630 ns/op | 5.8100 ns/op | 0.87 | | Buffer.compare 32 - random bytes | 16.837 ns/op | 21.014 ns/op | 0.80 | | byteArrayEquals 1024 - random bytes | 5.0380 ns/op | 5.6630 ns/op | 0.89 | | Buffer.compare 1024 - random bytes | 18.044 ns/op | 19.001 ns/op | 0.95 | | byteArrayEquals 16384 - random bytes | 5.1910 ns/op | 5.5850 ns/op | 0.93 | | Buffer.compare 16384 - random bytes | 17.313 ns/op | 18.230 ns/op | 0.95 | | byteArrayEquals 123687377 - random bytes | 6.5000 ns/op | 6.9000 ns/op | 0.94 | | Buffer.compare 123687377 - random bytes | 18.490 ns/op | 19.950 ns/op | 0.93 | | regular array get 100000 times | 33.840 us/op | 43.316 us/op | 0.78 | | wrappedArray get 100000 times | 33.029 us/op | 34.376 us/op | 0.96 | | arrayWithProxy get 100000 times | 13.141 ms/op | 14.108 ms/op | 0.93 | | ssz.Root.equals | 45.816 ns/op | 49.140 ns/op | 0.93 | | byteArrayEquals | 45.135 ns/op | 47.581 ns/op | 0.95 | | Buffer.compare | 10.308 ns/op | 11.010 ns/op | 0.94 | | shuffle list - 16384 els | 6.1486 ms/op | 6.6033 ms/op | 0.93 | | shuffle list - 250000 els | 86.938 ms/op | 100.04 ms/op | 0.87 | | processSlot - 1 slots | 13.707 us/op | 16.605 us/op | 0.83 | | processSlot - 32 slots | 3.0019 ms/op | 4.4642 ms/op | 0.67 | | getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei | 36.784 ms/op | 39.125 ms/op | 0.94 | | getCommitteeAssignments - req 1 vs - 250000 vc | 2.1488 ms/op | 2.2107 ms/op | 0.97 | | getCommitteeAssignments - req 100 vs - 250000 vc | 4.2501 ms/op | 4.2783 ms/op | 0.99 | | getCommitteeAssignments - req 1000 vs - 250000 vc | 4.4419 ms/op | 4.6112 ms/op | 0.96 | | findModifiedValidators - 10000 modified validators | 283.54 ms/op | 305.38 ms/op | 0.93 | | findModifiedValidators - 1000 modified validators | 165.79 ms/op | 181.82 ms/op | 0.91 | | findModifiedValidators - 100 modified validators | 153.18 ms/op | 174.48 ms/op | 0.88 | | findModifiedValidators - 10 modified validators | 142.58 ms/op | 162.93 ms/op | 0.88 | | findModifiedValidators - 1 modified validators | 150.98 ms/op | 223.19 ms/op | 0.68 | | findModifiedValidators - no difference | 165.21 ms/op | 249.43 ms/op | 0.66 | | compare ViewDUs | 3.4331 s/op | 3.7424 s/op | 0.92 | | compare each validator Uint8Array | 1.8024 s/op | 2.0691 s/op | 0.87 | | compare ViewDU to Uint8Array | 1.4173 s/op | 1.3954 s/op | 1.02 | | migrate state 1000000 validators, 24 modified, 0 new | 740.12 ms/op | 805.04 ms/op | 0.92 | | migrate state 1000000 validators, 1700 modified, 1000 new | 914.35 ms/op | 1.0886 s/op | 0.84 | | migrate state 1000000 validators, 3400 modified, 2000 new | 1.0137 s/op | 1.5026 s/op | 0.67 | | migrate state 1500000 validators, 24 modified, 0 new | 726.68 ms/op | 877.39 ms/op | 0.83 | | migrate state 1500000 validators, 1700 modified, 1000 new | 866.99 ms/op | 1.0731 s/op | 0.81 | | migrate state 1500000 validators, 3400 modified, 2000 new | 1.0312 s/op | 1.2613 s/op | 0.82 | | RootCache.getBlockRootAtSlot - 250000 vs - 7PWei | 5.0200 ns/op | 5.2800 ns/op | 0.95 | | state getBlockRootAtSlot - 250000 vs - 7PWei | 568.01 ns/op | 896.08 ns/op | 0.63 | | computeProposers - vc 250000 | 7.9505 ms/op | 9.5718 ms/op | 0.83 | | computeEpochShuffling - vc 250000 | 102.53 ms/op | 103.19 ms/op | 0.99 | | getNextSyncCommittee - vc 250000 | 135.87 ms/op | 149.48 ms/op | 0.91 | | computeSigningRoot for AttestationData | 26.440 us/op | 23.708 us/op | 1.12 | | hash AttestationData serialized data then Buffer.toString(base64) | 1.6799 us/op | 1.6854 us/op | 1.00 | | toHexString serialized data | 955.85 ns/op | 1.1045 us/op | 0.87 | | Buffer.toString(base64) | 195.20 ns/op | 219.12 ns/op | 0.89 | | nodejs block root to RootHex using toHex | 160.38 ns/op | 179.78 ns/op | 0.89 | | nodejs block root to RootHex using toRootHex | 103.22 ns/op | 121.23 ns/op | 0.85 | | browser block root to RootHex using the deprecated toHexString | 281.62 ns/op | 289.39 ns/op | 0.97 | | browser block root to RootHex using toHex | 228.55 ns/op | 241.35 ns/op | 0.95 | | browser block root to RootHex using toRootHex | 180.14 ns/op | 192.57 ns/op | 0.94 |

by benchmarkbot/action

wemeetagain commented 1 week ago

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