ChainSafe / lodestar

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

feat: electra fork #6986

Closed g11tech closed 2 months ago

g11tech commented 3 months ago

superseeding previous rebase :

superceeds :

github-actions[bot] commented 3 months ago

Performance Report

✔️ no performance regression detected

Full benchmark results | Benchmark suite | Current: 1856baf0540d2ca0922976b223f12bc090d354ee | Previous: 5d2e1a7228483af92930a32ce76277eee9977b01 | Ratio | |-|-|-|-| | getPubkeys - index2pubkey - req 1000 vs - 250000 vc | 1.8786 ms/op | 2.1060 ms/op | 0.89 | | getPubkeys - validatorsArr - req 1000 vs - 250000 vc | 52.833 us/op | 55.538 us/op | 0.95 | | BLS verify - blst | 832.75 us/op | 961.58 us/op | 0.87 | | BLS verifyMultipleSignatures 3 - blst | 1.1981 ms/op | 1.3817 ms/op | 0.87 | | BLS verifyMultipleSignatures 8 - blst | 1.6552 ms/op | 1.9178 ms/op | 0.86 | | BLS verifyMultipleSignatures 32 - blst | 4.8039 ms/op | 4.8652 ms/op | 0.99 | | BLS verifyMultipleSignatures 64 - blst | 9.0289 ms/op | 9.2313 ms/op | 0.98 | | BLS verifyMultipleSignatures 128 - blst | 17.190 ms/op | 17.152 ms/op | 1.00 | | BLS deserializing 10000 signatures | 686.39 ms/op | 698.07 ms/op | 0.98 | | BLS deserializing 100000 signatures | 6.8382 s/op | 6.9835 s/op | 0.98 | | BLS verifyMultipleSignatures - same message - 3 - blst | 900.23 us/op | 908.14 us/op | 0.99 | | BLS verifyMultipleSignatures - same message - 8 - blst | 1.0359 ms/op | 1.1394 ms/op | 0.91 | | BLS verifyMultipleSignatures - same message - 32 - blst | 1.7587 ms/op | 1.8498 ms/op | 0.95 | | BLS verifyMultipleSignatures - same message - 64 - blst | 2.5739 ms/op | 2.6303 ms/op | 0.98 | | BLS verifyMultipleSignatures - same message - 128 - blst | 4.3436 ms/op | 4.3425 ms/op | 1.00 | | BLS aggregatePubkeys 32 - blst | 19.882 us/op | 21.077 us/op | 0.94 | | BLS aggregatePubkeys 128 - blst | 70.372 us/op | 73.300 us/op | 0.96 | | notSeenSlots=1 numMissedVotes=1 numBadVotes=10 | 62.387 ms/op | 65.692 ms/op | 0.95 | | notSeenSlots=1 numMissedVotes=0 numBadVotes=4 | 53.449 ms/op | 65.548 ms/op | 0.82 | | notSeenSlots=2 numMissedVotes=1 numBadVotes=10 | 32.690 ms/op | 34.443 ms/op | 0.95 | | getSlashingsAndExits - default max | 103.74 us/op | 92.771 us/op | 1.12 | | getSlashingsAndExits - 2k | 308.92 us/op | 368.79 us/op | 0.84 | | proposeBlockBody type=full, size=empty | 5.9107 ms/op | 6.3791 ms/op | 0.93 | | isKnown best case - 1 super set check | 381.00 ns/op | 548.00 ns/op | 0.70 | | isKnown normal case - 2 super set checks | 309.00 ns/op | 544.00 ns/op | 0.57 | | isKnown worse case - 16 super set checks | 414.00 ns/op | 495.00 ns/op | 0.84 | | InMemoryCheckpointStateCache - add get delete | 3.0850 us/op | 3.3460 us/op | 0.92 | | updateUnfinalizedPubkeys - updating 10 pubkeys | 1.4139 ms/op | | updateUnfinalizedPubkeys - updating 100 pubkeys | 2.9185 ms/op | | updateUnfinalizedPubkeys - updating 1000 pubkeys | 63.089 ms/op | | validate api signedAggregateAndProof - struct | 1.6008 ms/op | 1.5182 ms/op | 1.05 | | validate gossip signedAggregateAndProof - struct | 1.5400 ms/op | 1.5438 ms/op | 1.00 | | validate gossip attestation - vc 640000 | 997.87 us/op | 944.04 us/op | 1.06 | | batch validate gossip attestation - vc 640000 - chunk 32 | 144.91 us/op | 134.10 us/op | 1.08 | | batch validate gossip attestation - vc 640000 - chunk 64 | 127.56 us/op | 120.83 us/op | 1.06 | | batch validate gossip attestation - vc 640000 - chunk 128 | 121.98 us/op | 114.26 us/op | 1.07 | | batch validate gossip attestation - vc 640000 - chunk 256 | 118.96 us/op | 116.15 us/op | 1.02 | | pickEth1Vote - no votes | 1.2430 ms/op | 1.1466 ms/op | 1.08 | | pickEth1Vote - max votes | 7.0125 ms/op | 8.3843 ms/op | 0.84 | | pickEth1Vote - Eth1Data hashTreeRoot value x2048 | 15.331 ms/op | 18.825 ms/op | 0.81 | | pickEth1Vote - Eth1Data hashTreeRoot tree x2048 | 19.327 ms/op | 24.938 ms/op | 0.77 | | pickEth1Vote - Eth1Data fastSerialize value x2048 | 548.26 us/op | 614.60 us/op | 0.89 | | pickEth1Vote - Eth1Data fastSerialize tree x2048 | 3.1538 ms/op | 4.0200 ms/op | 0.78 | | bytes32 toHexString | 611.00 ns/op | 715.00 ns/op | 0.85 | | bytes32 Buffer.toString(hex) | 279.00 ns/op | 278.00 ns/op | 1.00 | | bytes32 Buffer.toString(hex) from Uint8Array | 491.00 ns/op | 479.00 ns/op | 1.03 | | bytes32 Buffer.toString(hex) + 0x | 261.00 ns/op | 264.00 ns/op | 0.99 | | Object access 1 prop | 0.19000 ns/op | 0.19100 ns/op | 0.99 | | Map access 1 prop | 0.14600 ns/op | 0.14400 ns/op | 1.01 | | Object get x1000 | 6.1480 ns/op | 6.5020 ns/op | 0.95 | | Map get x1000 | 6.4840 ns/op | 6.6910 ns/op | 0.97 | | Object set x1000 | 47.390 ns/op | 57.953 ns/op | 0.82 | | Map set x1000 | 29.650 ns/op | 38.152 ns/op | 0.78 | | Return object 10000 times | 0.30460 ns/op | 0.32200 ns/op | 0.95 | | Throw Error 10000 times | 3.6221 us/op | 3.5894 us/op | 1.01 | | toHex | 172.83 ns/op | 175.26 ns/op | 0.99 | | Buffer.from | 162.13 ns/op | 169.25 ns/op | 0.96 | | shared Buffer | 98.795 ns/op | 106.39 ns/op | 0.93 | | fastMsgIdFn sha256 / 200 bytes | 2.4030 us/op | 2.4660 us/op | 0.97 | | fastMsgIdFn h32 xxhash / 200 bytes | 308.00 ns/op | 322.00 ns/op | 0.96 | | fastMsgIdFn h64 xxhash / 200 bytes | 278.00 ns/op | 295.00 ns/op | 0.94 | | fastMsgIdFn sha256 / 1000 bytes | 7.8960 us/op | 7.7460 us/op | 1.02 | | fastMsgIdFn h32 xxhash / 1000 bytes | 442.00 ns/op | 442.00 ns/op | 1.00 | | fastMsgIdFn h64 xxhash / 1000 bytes | 358.00 ns/op | 365.00 ns/op | 0.98 | | fastMsgIdFn sha256 / 10000 bytes | 66.942 us/op | 67.017 us/op | 1.00 | | fastMsgIdFn h32 xxhash / 10000 bytes | 2.0110 us/op | 2.0060 us/op | 1.00 | | fastMsgIdFn h64 xxhash / 10000 bytes | 1.2830 us/op | 1.2770 us/op | 1.00 | | send data - 1000 256B messages | 14.791 ms/op | 14.790 ms/op | 1.00 | | send data - 1000 512B messages | 19.728 ms/op | 19.559 ms/op | 1.01 | | send data - 1000 1024B messages | 29.559 ms/op | 34.545 ms/op | 0.86 | | send data - 1000 1200B messages | 23.366 ms/op | 35.769 ms/op | 0.65 | | send data - 1000 2048B messages | 33.836 ms/op | 43.542 ms/op | 0.78 | | send data - 1000 4096B messages | 37.383 ms/op | 48.025 ms/op | 0.78 | | send data - 1000 16384B messages | 82.602 ms/op | 79.058 ms/op | 1.04 | | send data - 1000 65536B messages | 229.80 ms/op | 213.37 ms/op | 1.08 | | enrSubnets - fastDeserialize 64 bits | 1.4580 us/op | 1.4000 us/op | 1.04 | | enrSubnets - ssz BitVector 64 bits | 490.00 ns/op | 456.00 ns/op | 1.07 | | enrSubnets - fastDeserialize 4 bits | 205.00 ns/op | 204.00 ns/op | 1.00 | | enrSubnets - ssz BitVector 4 bits | 454.00 ns/op | 455.00 ns/op | 1.00 | | prioritizePeers score -10:0 att 32-0.1 sync 2-0 | 180.27 us/op | 206.55 us/op | 0.87 | | prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 | 188.94 us/op | 248.29 us/op | 0.76 | | prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 | 337.25 us/op | 388.33 us/op | 0.87 | | prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 | 421.10 us/op | 425.95 us/op | 0.99 | | prioritizePeers score 0:0 att 64-1 sync 4-1 | 766.82 us/op | 750.92 us/op | 1.02 | | array of 16000 items push then shift | 1.7109 us/op | 1.8121 us/op | 0.94 | | LinkedList of 16000 items push then shift | 8.4140 ns/op | 8.2770 ns/op | 1.02 | | array of 16000 items push then pop | 142.14 ns/op | 144.35 ns/op | 0.98 | | LinkedList of 16000 items push then pop | 8.0180 ns/op | 8.2240 ns/op | 0.97 | | array of 24000 items push then shift | 2.5661 us/op | 2.8984 us/op | 0.89 | | LinkedList of 24000 items push then shift | 8.7470 ns/op | 9.7990 ns/op | 0.89 | | array of 24000 items push then pop | 207.80 ns/op | 199.49 ns/op | 1.04 | | LinkedList of 24000 items push then pop | 7.5950 ns/op | 8.1670 ns/op | 0.93 | | intersect bitArray bitLen 8 | 6.5300 ns/op | 6.8000 ns/op | 0.96 | | intersect array and set length 8 | 49.332 ns/op | 81.699 ns/op | 0.60 | | intersect bitArray bitLen 128 | 30.164 ns/op | 33.337 ns/op | 0.90 | | intersect array and set length 128 | 757.44 ns/op | 963.31 ns/op | 0.79 | | bitArray.getTrueBitIndexes() bitLen 128 | 1.9430 us/op | 2.6430 us/op | 0.74 | | bitArray.getTrueBitIndexes() bitLen 248 | 3.9820 us/op | 3.7350 us/op | 1.07 | | bitArray.getTrueBitIndexes() bitLen 512 | 8.7290 us/op | 8.5250 us/op | 1.02 | | Buffer.concat 32 items | 989.00 ns/op | 1.1490 us/op | 0.86 | | Uint8Array.set 32 items | 1.5690 us/op | 2.3420 us/op | 0.67 | | Buffer.copy | 2.2780 us/op | 1.9960 us/op | 1.14 | | Uint8Array.set - with subarray | 2.7150 us/op | 3.1020 us/op | 0.88 | | Uint8Array.set - without subarray | 1.4970 us/op | 1.8120 us/op | 0.83 | | getUint32 - dataview | 282.00 ns/op | 318.00 ns/op | 0.89 | | getUint32 - manual | 226.00 ns/op | 240.00 ns/op | 0.94 | | Set add up to 64 items then delete first | 2.7939 us/op | 2.6394 us/op | 1.06 | | OrderedSet add up to 64 items then delete first | 4.6960 us/op | 3.9113 us/op | 1.20 | | Set add up to 64 items then delete last | 3.2988 us/op | 2.5850 us/op | 1.28 | | OrderedSet add up to 64 items then delete last | 4.6173 us/op | 4.4672 us/op | 1.03 | | Set add up to 64 items then delete middle | 3.1859 us/op | 2.7569 us/op | 1.16 | | OrderedSet add up to 64 items then delete middle | 6.4895 us/op | 6.7594 us/op | 0.96 | | Set add up to 128 items then delete first | 5.8155 us/op | 7.0565 us/op | 0.82 | | OrderedSet add up to 128 items then delete first | 8.6206 us/op | 11.330 us/op | 0.76 | | Set add up to 128 items then delete last | 5.3205 us/op | 6.6222 us/op | 0.80 | | OrderedSet add up to 128 items then delete last | 7.6602 us/op | 11.140 us/op | 0.69 | | Set add up to 128 items then delete middle | 5.4005 us/op | 7.8775 us/op | 0.69 | | OrderedSet add up to 128 items then delete middle | 16.540 us/op | 18.322 us/op | 0.90 | | Set add up to 256 items then delete first | 11.719 us/op | 15.166 us/op | 0.77 | | OrderedSet add up to 256 items then delete first | 18.874 us/op | 25.420 us/op | 0.74 | | Set add up to 256 items then delete last | 11.674 us/op | 13.541 us/op | 0.86 | | OrderedSet add up to 256 items then delete last | 16.074 us/op | 19.015 us/op | 0.85 | | Set add up to 256 items then delete middle | 10.500 us/op | 11.270 us/op | 0.93 | | OrderedSet add up to 256 items then delete middle | 48.464 us/op | 48.012 us/op | 1.01 | | transfer serialized Status (84 B) | 1.3900 us/op | 1.4540 us/op | 0.96 | | copy serialized Status (84 B) | 1.3650 us/op | 1.2750 us/op | 1.07 | | transfer serialized SignedVoluntaryExit (112 B) | 1.6450 us/op | 1.6760 us/op | 0.98 | | copy serialized SignedVoluntaryExit (112 B) | 1.4710 us/op | 1.4230 us/op | 1.03 | | transfer serialized ProposerSlashing (416 B) | 1.8940 us/op | 2.4400 us/op | 0.78 | | copy serialized ProposerSlashing (416 B) | 1.4810 us/op | 1.7720 us/op | 0.84 | | transfer serialized Attestation (485 B) | 1.5840 us/op | 1.7310 us/op | 0.92 | | copy serialized Attestation (485 B) | 1.4230 us/op | 2.0160 us/op | 0.71 | | transfer serialized AttesterSlashing (33232 B) | 1.9280 us/op | 2.7420 us/op | 0.70 | | copy serialized AttesterSlashing (33232 B) | 5.5100 us/op | 8.5460 us/op | 0.64 | | transfer serialized Small SignedBeaconBlock (128000 B) | 2.8140 us/op | 3.6240 us/op | 0.78 | | copy serialized Small SignedBeaconBlock (128000 B) | 17.389 us/op | 19.767 us/op | 0.88 | | transfer serialized Avg SignedBeaconBlock (200000 B) | 3.6990 us/op | 3.9350 us/op | 0.94 | | copy serialized Avg SignedBeaconBlock (200000 B) | 27.190 us/op | 32.664 us/op | 0.83 | | transfer serialized BlobsSidecar (524380 B) | 3.3950 us/op | 3.8770 us/op | 0.88 | | copy serialized BlobsSidecar (524380 B) | 76.760 us/op | 86.078 us/op | 0.89 | | transfer serialized Big SignedBeaconBlock (1000000 B) | 3.6260 us/op | 3.9940 us/op | 0.91 | | copy serialized Big SignedBeaconBlock (1000000 B) | 166.90 us/op | 170.22 us/op | 0.98 | | pass gossip attestations to forkchoice per slot | 2.8707 ms/op | 2.8990 ms/op | 0.99 | | forkChoice updateHead vc 100000 bc 64 eq 0 | 588.30 us/op | 508.09 us/op | 1.16 | | forkChoice updateHead vc 600000 bc 64 eq 0 | 3.1522 ms/op | 3.1609 ms/op | 1.00 | | forkChoice updateHead vc 1000000 bc 64 eq 0 | 5.5391 ms/op | 5.4650 ms/op | 1.01 | | forkChoice updateHead vc 600000 bc 320 eq 0 | 3.1196 ms/op | 3.0776 ms/op | 1.01 | | forkChoice updateHead vc 600000 bc 1200 eq 0 | 3.1283 ms/op | 3.2059 ms/op | 0.98 | | forkChoice updateHead vc 600000 bc 7200 eq 0 | 3.6162 ms/op | 3.6792 ms/op | 0.98 | | forkChoice updateHead vc 600000 bc 64 eq 1000 | 11.696 ms/op | 10.659 ms/op | 1.10 | | forkChoice updateHead vc 600000 bc 64 eq 10000 | 11.285 ms/op | 10.804 ms/op | 1.04 | | forkChoice updateHead vc 600000 bc 64 eq 300000 | 15.601 ms/op | 15.362 ms/op | 1.02 | | computeDeltas 500000 validators 300 proto nodes | 3.6559 ms/op | 3.7629 ms/op | 0.97 | | computeDeltas 500000 validators 1200 proto nodes | 3.8720 ms/op | 3.7258 ms/op | 1.04 | | computeDeltas 500000 validators 7200 proto nodes | 3.9018 ms/op | 3.6626 ms/op | 1.07 | | computeDeltas 750000 validators 300 proto nodes | 5.4845 ms/op | 5.4985 ms/op | 1.00 | | computeDeltas 750000 validators 1200 proto nodes | 5.6141 ms/op | 5.5012 ms/op | 1.02 | | computeDeltas 750000 validators 7200 proto nodes | 5.4448 ms/op | 5.6196 ms/op | 0.97 | | computeDeltas 1400000 validators 300 proto nodes | 10.014 ms/op | 10.270 ms/op | 0.98 | | computeDeltas 1400000 validators 1200 proto nodes | 10.212 ms/op | 10.496 ms/op | 0.97 | | computeDeltas 1400000 validators 7200 proto nodes | 10.487 ms/op | 10.599 ms/op | 0.99 | | computeDeltas 2100000 validators 300 proto nodes | 16.358 ms/op | 14.997 ms/op | 1.09 | | computeDeltas 2100000 validators 1200 proto nodes | 16.201 ms/op | 15.482 ms/op | 1.05 | | computeDeltas 2100000 validators 7200 proto nodes | 15.124 ms/op | 15.557 ms/op | 0.97 | | altair processAttestation - 250000 vs - 7PWei normalcase | 1.8121 ms/op | 1.7634 ms/op | 1.03 | | altair processAttestation - 250000 vs - 7PWei worstcase | 2.7335 ms/op | 3.4772 ms/op | 0.79 | | altair processAttestation - setStatus - 1/6 committees join | 88.874 us/op | 99.424 us/op | 0.89 | | altair processAttestation - setStatus - 1/3 committees join | 186.61 us/op | 188.68 us/op | 0.99 | | altair processAttestation - setStatus - 1/2 committees join | 256.93 us/op | 256.68 us/op | 1.00 | | altair processAttestation - setStatus - 2/3 committees join | 329.15 us/op | 332.76 us/op | 0.99 | | altair processAttestation - setStatus - 4/5 committees join | 497.74 us/op | 489.76 us/op | 1.02 | | altair processAttestation - setStatus - 100% committees join | 570.09 us/op | 561.45 us/op | 1.02 | | altair processBlock - 250000 vs - 7PWei normalcase | 3.9718 ms/op | 5.0858 ms/op | 0.78 | | altair processBlock - 250000 vs - 7PWei normalcase hashState | 23.773 ms/op | 25.276 ms/op | 0.94 | | altair processBlock - 250000 vs - 7PWei worstcase | 31.945 ms/op | 39.110 ms/op | 0.82 | | altair processBlock - 250000 vs - 7PWei worstcase hashState | 67.278 ms/op | 81.264 ms/op | 0.83 | | phase0 processBlock - 250000 vs - 7PWei normalcase | 1.9408 ms/op | 2.3899 ms/op | 0.81 | | phase0 processBlock - 250000 vs - 7PWei worstcase | 23.183 ms/op | 24.852 ms/op | 0.93 | | altair processEth1Data - 250000 vs - 7PWei normalcase | 301.05 us/op | 334.06 us/op | 0.90 | | getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 | 5.8930 us/op | 8.4040 us/op | 0.70 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 | 42.456 us/op | 37.909 us/op | 1.12 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 | 12.803 us/op | 13.358 us/op | 0.96 | | getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 | 6.2310 us/op | 10.059 us/op | 0.62 | | getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 | 150.06 us/op | 139.40 us/op | 1.08 | | getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 | 1.3470 ms/op | 747.70 us/op | 1.80 | | getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 | 1.8971 ms/op | 948.83 us/op | 2.00 | | getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 | 1.8763 ms/op | 990.48 us/op | 1.89 | | getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 | 4.0999 ms/op | 2.5564 ms/op | 1.60 | | getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 | 1.8774 ms/op | 1.7412 ms/op | 1.08 | | getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 | 4.1902 ms/op | 4.7903 ms/op | 0.87 | | Tree 40 250000 create | 229.80 ms/op | 319.86 ms/op | 0.72 | | Tree 40 250000 get(125000) | 153.74 ns/op | 169.10 ns/op | 0.91 | | Tree 40 250000 set(125000) | 691.91 ns/op | 785.99 ns/op | 0.88 | | Tree 40 250000 toArray() | 17.249 ms/op | 18.994 ms/op | 0.91 | | Tree 40 250000 iterate all - toArray() + loop | 16.498 ms/op | 23.417 ms/op | 0.70 | | Tree 40 250000 iterate all - get(i) | 56.434 ms/op | 66.141 ms/op | 0.85 | | Array 250000 create | 3.3250 ms/op | 3.9560 ms/op | 0.84 | | Array 250000 clone - spread | 1.4491 ms/op | 1.5895 ms/op | 0.91 | | Array 250000 get(125000) | 0.41700 ns/op | 0.44800 ns/op | 0.93 | | Array 250000 set(125000) | 0.44100 ns/op | 0.48000 ns/op | 0.92 | | Array 250000 iterate all - loop | 87.362 us/op | 107.35 us/op | 0.81 | | phase0 afterProcessEpoch - 250000 vs - 7PWei | 88.488 ms/op | 92.421 ms/op | 0.96 | | Array.fill - length 1000000 | 3.6759 ms/op | 3.4752 ms/op | 1.06 | | Array push - length 1000000 | 18.829 ms/op | 19.799 ms/op | 0.95 | | Array.get | 0.28837 ns/op | 0.28835 ns/op | 1.00 | | Uint8Array.get | 0.44807 ns/op | 0.43966 ns/op | 1.02 | | phase0 beforeProcessEpoch - 250000 vs - 7PWei | 16.655 ms/op | 16.020 ms/op | 1.04 | | altair processEpoch - mainnet_e81889 | 337.18 ms/op | 386.27 ms/op | 0.87 | | mainnet_e81889 - altair beforeProcessEpoch | 18.501 ms/op | 22.395 ms/op | 0.83 | | mainnet_e81889 - altair processJustificationAndFinalization | 12.638 us/op | 16.196 us/op | 0.78 | | mainnet_e81889 - altair processInactivityUpdates | 5.7430 ms/op | 7.7119 ms/op | 0.74 | | mainnet_e81889 - altair processRewardsAndPenalties | 47.836 ms/op | 46.565 ms/op | 1.03 | | mainnet_e81889 - altair processRegistryUpdates | 2.3550 us/op | 2.8940 us/op | 0.81 | | mainnet_e81889 - altair processSlashings | 376.00 ns/op | 797.00 ns/op | 0.47 | | mainnet_e81889 - altair processEth1DataReset | 326.00 ns/op | 978.00 ns/op | 0.33 | | mainnet_e81889 - altair processEffectiveBalanceUpdates | 1.5768 ms/op | 1.9162 ms/op | 0.82 | | mainnet_e81889 - altair processSlashingsReset | 2.9330 us/op | 3.7630 us/op | 0.78 | | mainnet_e81889 - altair processRandaoMixesReset | 3.5920 us/op | 5.6440 us/op | 0.64 | | mainnet_e81889 - altair processHistoricalRootsUpdate | 685.00 ns/op | 1.4850 us/op | 0.46 | | mainnet_e81889 - altair processParticipationFlagUpdates | 2.1200 us/op | 5.2490 us/op | 0.40 | | mainnet_e81889 - altair processSyncCommitteeUpdates | 445.00 ns/op | 545.00 ns/op | 0.82 | | mainnet_e81889 - altair afterProcessEpoch | 94.549 ms/op | 102.91 ms/op | 0.92 | | capella processEpoch - mainnet_e217614 | 1.1258 s/op | 1.2961 s/op | 0.87 | | mainnet_e217614 - capella beforeProcessEpoch | 79.701 ms/op | 70.280 ms/op | 1.13 | | mainnet_e217614 - capella processJustificationAndFinalization | 16.078 us/op | 14.877 us/op | 1.08 | | mainnet_e217614 - capella processInactivityUpdates | 17.191 ms/op | 17.280 ms/op | 0.99 | | mainnet_e217614 - capella processRewardsAndPenalties | 239.30 ms/op | 220.33 ms/op | 1.09 | | mainnet_e217614 - capella processRegistryUpdates | 12.870 us/op | 16.813 us/op | 0.77 | | mainnet_e217614 - capella processSlashings | 509.00 ns/op | 498.00 ns/op | 1.02 | | mainnet_e217614 - capella processEth1DataReset | 303.00 ns/op | 501.00 ns/op | 0.60 | | mainnet_e217614 - capella processEffectiveBalanceUpdates | 15.232 ms/op | 5.8006 ms/op | 2.63 | | mainnet_e217614 - capella processSlashingsReset | 4.1050 us/op | 7.4210 us/op | 0.55 | | mainnet_e217614 - capella processRandaoMixesReset | 6.6080 us/op | 5.3290 us/op | 1.24 | | mainnet_e217614 - capella processHistoricalRootsUpdate | 643.00 ns/op | 815.00 ns/op | 0.79 | | mainnet_e217614 - capella processParticipationFlagUpdates | 2.2120 us/op | 3.1320 us/op | 0.71 | | mainnet_e217614 - capella afterProcessEpoch | 246.17 ms/op | 262.01 ms/op | 0.94 | | phase0 processEpoch - mainnet_e58758 | 342.09 ms/op | 461.50 ms/op | 0.74 | | mainnet_e58758 - phase0 beforeProcessEpoch | 68.044 ms/op | 110.52 ms/op | 0.62 | | mainnet_e58758 - phase0 processJustificationAndFinalization | 18.175 us/op | 30.214 us/op | 0.60 | | mainnet_e58758 - phase0 processRewardsAndPenalties | 30.559 ms/op | 34.516 ms/op | 0.89 | | mainnet_e58758 - phase0 processRegistryUpdates | 8.7490 us/op | 13.274 us/op | 0.66 | | mainnet_e58758 - phase0 processSlashings | 444.00 ns/op | 560.00 ns/op | 0.79 | | mainnet_e58758 - phase0 processEth1DataReset | 537.00 ns/op | 409.00 ns/op | 1.31 | | mainnet_e58758 - phase0 processEffectiveBalanceUpdates | 1.2730 ms/op | 1.1334 ms/op | 1.12 | | mainnet_e58758 - phase0 processSlashingsReset | 3.5690 us/op | 7.6550 us/op | 0.47 | | mainnet_e58758 - phase0 processRandaoMixesReset | 5.1690 us/op | 8.3760 us/op | 0.62 | | mainnet_e58758 - phase0 processHistoricalRootsUpdate | 577.00 ns/op | 865.00 ns/op | 0.67 | | mainnet_e58758 - phase0 processParticipationRecordUpdates | 4.2820 us/op | 5.9460 us/op | 0.72 | | mainnet_e58758 - phase0 afterProcessEpoch | 75.488 ms/op | 87.373 ms/op | 0.86 | | phase0 processEffectiveBalanceUpdates - 250000 normalcase | 1.8954 ms/op | 1.9396 ms/op | 0.98 | | phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 | 2.1812 ms/op | 2.2238 ms/op | 0.98 | | altair processInactivityUpdates - 250000 normalcase | 17.292 ms/op | 17.435 ms/op | 0.99 | | altair processInactivityUpdates - 250000 worstcase | 16.633 ms/op | 18.685 ms/op | 0.89 | | phase0 processRegistryUpdates - 250000 normalcase | 8.9360 us/op | 7.9050 us/op | 1.13 | | phase0 processRegistryUpdates - 250000 badcase_full_deposits | 285.85 us/op | 295.25 us/op | 0.97 | | phase0 processRegistryUpdates - 250000 worstcase 0.5 | 115.27 ms/op | 117.37 ms/op | 0.98 | | altair processRewardsAndPenalties - 250000 normalcase | 41.790 ms/op | 39.336 ms/op | 1.06 | | altair processRewardsAndPenalties - 250000 worstcase | 43.297 ms/op | 39.939 ms/op | 1.08 | | phase0 getAttestationDeltas - 250000 normalcase | 8.4110 ms/op | 9.9926 ms/op | 0.84 | | phase0 getAttestationDeltas - 250000 worstcase | 8.3607 ms/op | 9.0416 ms/op | 0.92 | | phase0 processSlashings - 250000 worstcase | 121.58 us/op | 110.10 us/op | 1.10 | | altair processSyncCommitteeUpdates - 250000 | 135.37 ms/op | 130.28 ms/op | 1.04 | | BeaconState.hashTreeRoot - No change | 369.00 ns/op | 336.00 ns/op | 1.10 | | BeaconState.hashTreeRoot - 1 full validator | 120.88 us/op | 103.74 us/op | 1.17 | | BeaconState.hashTreeRoot - 32 full validator | 1.0988 ms/op | 1.1534 ms/op | 0.95 | | BeaconState.hashTreeRoot - 512 full validator | 17.398 ms/op | 13.607 ms/op | 1.28 | | BeaconState.hashTreeRoot - 1 validator.effectiveBalance | 167.98 us/op | 128.94 us/op | 1.30 | | BeaconState.hashTreeRoot - 32 validator.effectiveBalance | 2.1127 ms/op | 1.8879 ms/op | 1.12 | | BeaconState.hashTreeRoot - 512 validator.effectiveBalance | 25.357 ms/op | 21.627 ms/op | 1.17 | | BeaconState.hashTreeRoot - 1 balances | 93.293 us/op | 97.348 us/op | 0.96 | | BeaconState.hashTreeRoot - 32 balances | 853.41 us/op | 944.80 us/op | 0.90 | | BeaconState.hashTreeRoot - 512 balances | 7.6888 ms/op | 8.3400 ms/op | 0.92 | | BeaconState.hashTreeRoot - 250000 balances | 156.83 ms/op | 178.46 ms/op | 0.88 | | aggregationBits - 2048 els - zipIndexesInBitList | 27.746 us/op | 26.286 us/op | 1.06 | | byteArrayEquals 32 | 54.479 ns/op | 55.318 ns/op | 0.98 | | Buffer.compare 32 | 27.102 ns/op | 17.754 ns/op | 1.53 | | byteArrayEquals 1024 | 1.6272 us/op | 1.6067 us/op | 1.01 | | Buffer.compare 1024 | 26.068 ns/op | 24.617 ns/op | 1.06 | | byteArrayEquals 16384 | 25.779 us/op | 25.536 us/op | 1.01 | | Buffer.compare 16384 | 197.43 ns/op | 205.46 ns/op | 0.96 | | byteArrayEquals 123687377 | 194.23 ms/op | 195.01 ms/op | 1.00 | | Buffer.compare 123687377 | 7.8110 ms/op | 7.6452 ms/op | 1.02 | | byteArrayEquals 32 - diff last byte | 53.728 ns/op | 53.152 ns/op | 1.01 | | Buffer.compare 32 - diff last byte | 17.815 ns/op | 17.030 ns/op | 1.05 | | byteArrayEquals 1024 - diff last byte | 1.6425 us/op | 1.6068 us/op | 1.02 | | Buffer.compare 1024 - diff last byte | 26.326 ns/op | 25.318 ns/op | 1.04 | | byteArrayEquals 16384 - diff last byte | 26.342 us/op | 25.864 us/op | 1.02 | | Buffer.compare 16384 - diff last byte | 212.98 ns/op | 207.44 ns/op | 1.03 | | byteArrayEquals 123687377 - diff last byte | 190.95 ms/op | 198.21 ms/op | 0.96 | | Buffer.compare 123687377 - diff last byte | 6.7550 ms/op | 9.4539 ms/op | 0.71 | | byteArrayEquals 32 - random bytes | 5.2570 ns/op | 5.4490 ns/op | 0.96 | | Buffer.compare 32 - random bytes | 17.493 ns/op | 17.979 ns/op | 0.97 | | byteArrayEquals 1024 - random bytes | 5.2760 ns/op | 5.4070 ns/op | 0.98 | | Buffer.compare 1024 - random bytes | 17.437 ns/op | 18.166 ns/op | 0.96 | | byteArrayEquals 16384 - random bytes | 5.2480 ns/op | 5.4130 ns/op | 0.97 | | Buffer.compare 16384 - random bytes | 17.483 ns/op | 17.965 ns/op | 0.97 | | byteArrayEquals 123687377 - random bytes | 6.5600 ns/op | 7.4700 ns/op | 0.88 | | Buffer.compare 123687377 - random bytes | 19.030 ns/op | 19.700 ns/op | 0.97 | | regular array get 100000 times | 37.562 us/op | 36.462 us/op | 1.03 | | wrappedArray get 100000 times | 33.262 us/op | 35.196 us/op | 0.95 | | arrayWithProxy get 100000 times | 13.046 ms/op | 13.799 ms/op | 0.95 | | ssz.Root.equals | 45.849 ns/op | 47.472 ns/op | 0.97 | | byteArrayEquals | 45.270 ns/op | 47.608 ns/op | 0.95 | | Buffer.compare | 10.606 ns/op | 11.634 ns/op | 0.91 | | shuffle list - 16384 els | 6.1444 ms/op | 6.4936 ms/op | 0.95 | | shuffle list - 250000 els | 90.057 ms/op | 95.567 ms/op | 0.94 | | processSlot - 1 slots | 15.434 us/op | 16.898 us/op | 0.91 | | processSlot - 32 slots | 3.6923 ms/op | 2.8353 ms/op | 1.30 | | getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei | 36.040 ms/op | 37.050 ms/op | 0.97 | | getCommitteeAssignments - req 1 vs - 250000 vc | 2.2730 ms/op | 2.2299 ms/op | 1.02 | | getCommitteeAssignments - req 100 vs - 250000 vc | 4.2457 ms/op | 4.3122 ms/op | 0.98 | | getCommitteeAssignments - req 1000 vs - 250000 vc | 4.5198 ms/op | 4.7020 ms/op | 0.96 | | findModifiedValidators - 10000 modified validators | 247.89 ms/op | 284.11 ms/op | 0.87 | | findModifiedValidators - 1000 modified validators | 164.52 ms/op | 208.41 ms/op | 0.79 | | findModifiedValidators - 100 modified validators | 147.71 ms/op | 174.18 ms/op | 0.85 | | findModifiedValidators - 10 modified validators | 164.65 ms/op | 180.23 ms/op | 0.91 | | findModifiedValidators - 1 modified validators | 155.22 ms/op | 185.44 ms/op | 0.84 | | findModifiedValidators - no difference | 150.64 ms/op | 159.92 ms/op | 0.94 | | compare ViewDUs | 2.7921 s/op | 3.1193 s/op | 0.90 | | compare each validator Uint8Array | 1.1766 s/op | 1.7027 s/op | 0.69 | | compare ViewDU to Uint8Array | 1.1104 s/op | 1.1979 s/op | 0.93 | | migrate state 1000000 validators, 24 modified, 0 new | 529.05 ms/op | 591.63 ms/op | 0.89 | | migrate state 1000000 validators, 1700 modified, 1000 new | 773.88 ms/op | 858.97 ms/op | 0.90 | | migrate state 1000000 validators, 3400 modified, 2000 new | 946.36 ms/op | 1.1011 s/op | 0.86 | | migrate state 1500000 validators, 24 modified, 0 new | 607.24 ms/op | 575.59 ms/op | 1.05 | | migrate state 1500000 validators, 1700 modified, 1000 new | 821.20 ms/op | 830.35 ms/op | 0.99 | | migrate state 1500000 validators, 3400 modified, 2000 new | 1.0911 s/op | 1.0789 s/op | 1.01 | | RootCache.getBlockRootAtSlot - 250000 vs - 7PWei | 5.2600 ns/op | 4.8700 ns/op | 1.08 | | state getBlockRootAtSlot - 250000 vs - 7PWei | 964.45 ns/op | 624.74 ns/op | 1.54 | | computeProposers - vc 250000 | 9.0586 ms/op | 7.9971 ms/op | 1.13 | | computeEpochShuffling - vc 250000 | 93.795 ms/op | 96.733 ms/op | 0.97 | | getNextSyncCommittee - vc 250000 | 136.47 ms/op | 142.97 ms/op | 0.95 | | computeSigningRoot for AttestationData | 20.633 us/op | 29.065 us/op | 0.71 | | hash AttestationData serialized data then Buffer.toString(base64) | 1.6530 us/op | 1.7284 us/op | 0.96 | | toHexString serialized data | 940.40 ns/op | 1.1280 us/op | 0.83 | | Buffer.toString(base64) | 197.20 ns/op | 216.61 ns/op | 0.91 | | block root to RootHex using toHex | 161.50 ns/op | 176.58 ns/op | 0.91 | | block root to RootHex using toRootHex | 96.112 ns/op | 110.25 ns/op | 0.87 |

by benchmarkbot/action

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 50.16706% with 1044 lines in your changes missing coverage. Please review.

Project coverage is 49.37%. Comparing base (5d2e1a7) to head (03f7396). Report is 77 commits behind head on unstable.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## unstable #6986 +/- ## ============================================ + Coverage 49.24% 49.37% +0.12% ============================================ Files 578 589 +11 Lines 37443 39233 +1790 Branches 2168 2247 +79 ============================================ + Hits 18440 19371 +931 - Misses 18963 19821 +858 - Partials 40 41 +1 ```
twoeths commented 2 months ago

e2e consistently failed in https://github.com/ChainSafe/lodestar/actions/runs/10518956587/job/29145618824?pr=7043

one error I see in proposerBoostReorg.test.ts is

Eph 1/5 0.028[vc-0-VAL-0-7]    error: Error publishing attestations slot=13 - submitPoolAttestations failed with status 500: Cannot read properties of undefined (reading 'submitPoolAttestationsV2')
Error: submitPoolAttestations failed with status 500: Cannot read properties of undefined (reading 'submitPoolAttestationsV2')
    at ApiResponse.apiResponse.error (/Users/tuyennguyen/Projects/lodestar/packages/beacon-node/test/utils/node/validator.ts:111:20)
    at ApiResponse.assertOk (/Users/tuyennguyen/Projects/lodestar/packages/api/src/utils/client/response.ts:155:18)
    at AttestationService.signAndPublishAttestations (/Users/tuyennguyen/Projects/lodestar/packages/validator/src/services/attestation.ts:243:78)
    at AttestationService.runAttestationTasksGrouped (/Users/tuyennguyen/Projects/lodestar/packages/validator/src/services/attestation.ts:155:5)
    at AttestationService.runAttestationTasks (/Users/tuyennguyen/Projects/lodestar/packages/validator/src/services/attestation.ts:117:9)
    at Clock.runAtMostEvery (/Users/tuyennguyen/Projects/lodestar/packages/validator/src/util/clock.ts:96:7)

cc @nflaig @ensi321

twoeths commented 2 months ago

I deployed #7043 to beta, metrics look good to me, all are comparable to unstable

wemeetagain commented 2 months ago

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