-
-
Notifications
You must be signed in to change notification settings - Fork 413
fix: ensure data column sidecars respect blob limit #8534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @nflaig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the validation of data column sidecars by enforcing the protocol's blob limit. It introduces a specific error type for cases where the number of KZG commitments exceeds the maximum allowed per block for a given epoch. The changes ensure that the beacon node correctly rejects malformed or oversized data column sidecars, aligning with the consensus specifications and contributing to the network's stability and integrity. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly implements the check to ensure data column sidecars respect the blob limit, aligning with the recent consensus spec update. The changes to introduce a new error type and the validation logic itself are sound. However, a crucial part is missing: tests for this new validation logic. It's important to add unit tests that verify the rejection of sidecars with too many KZG commitments to ensure correctness and prevent future regressions. I've also included a minor suggestion to improve code readability in the new validation logic.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## unstable #8534 +/- ##
============================================
- Coverage 52.23% 52.21% -0.02%
============================================
Files 852 852
Lines 65155 65167 +12
Branches 4779 4779
============================================
- Hits 34032 34030 -2
- Misses 31054 31068 +14
Partials 69 69 🚀 New features to boost your workflow:
|
|
| Benchmark suite | Current: 3f2ec1b | Previous: d9cc6b9 | Ratio |
|---|---|---|---|
| Uint8Array.set 32 items | 3.4630 us/op | 997.00 ns/op | 3.47 |
| Uint8Array.set - without subarray | 3.5830 us/op | 976.00 ns/op | 3.67 |
| getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 | 13.282 us/op | 3.4920 us/op | 3.80 |
Full benchmark results
| Benchmark suite | Current: 3f2ec1b | Previous: d9cc6b9 | Ratio |
|---|---|---|---|
| getPubkeys - index2pubkey - req 1000 vs - 250000 vc | 825.65 us/op | 846.92 us/op | 0.97 |
| getPubkeys - validatorsArr - req 1000 vs - 250000 vc | 34.676 us/op | 34.283 us/op | 1.01 |
| BLS verify - blst | 935.00 us/op | 855.45 us/op | 1.09 |
| BLS verifyMultipleSignatures 3 - blst | 1.3700 ms/op | 1.3962 ms/op | 0.98 |
| BLS verifyMultipleSignatures 8 - blst | 2.1727 ms/op | 2.1045 ms/op | 1.03 |
| BLS verifyMultipleSignatures 32 - blst | 4.4973 ms/op | 4.8744 ms/op | 0.92 |
| BLS verifyMultipleSignatures 64 - blst | 8.6653 ms/op | 8.9265 ms/op | 0.97 |
| BLS verifyMultipleSignatures 128 - blst | 17.183 ms/op | 16.793 ms/op | 1.02 |
| BLS deserializing 10000 signatures | 644.60 ms/op | 652.80 ms/op | 0.99 |
| BLS deserializing 100000 signatures | 6.4836 s/op | 6.3354 s/op | 1.02 |
| BLS verifyMultipleSignatures - same message - 3 - blst | 928.11 us/op | 973.37 us/op | 0.95 |
| BLS verifyMultipleSignatures - same message - 8 - blst | 1.1207 ms/op | 1.0759 ms/op | 1.04 |
| BLS verifyMultipleSignatures - same message - 32 - blst | 1.7443 ms/op | 1.7422 ms/op | 1.00 |
| BLS verifyMultipleSignatures - same message - 64 - blst | 2.5383 ms/op | 2.6207 ms/op | 0.97 |
| BLS verifyMultipleSignatures - same message - 128 - blst | 4.1451 ms/op | 4.2269 ms/op | 0.98 |
| BLS aggregatePubkeys 32 - blst | 17.871 us/op | 17.993 us/op | 0.99 |
| BLS aggregatePubkeys 128 - blst | 62.982 us/op | 63.471 us/op | 0.99 |
| notSeenSlots=1 numMissedVotes=1 numBadVotes=10 | 54.413 ms/op | 39.705 ms/op | 1.37 |
| notSeenSlots=1 numMissedVotes=0 numBadVotes=4 | 51.123 ms/op | 40.418 ms/op | 1.26 |
| notSeenSlots=2 numMissedVotes=1 numBadVotes=10 | 37.920 ms/op | 36.556 ms/op | 1.04 |
| getSlashingsAndExits - default max | 50.807 us/op | 55.362 us/op | 0.92 |
| getSlashingsAndExits - 2k | 424.17 us/op | 301.06 us/op | 1.41 |
| isKnown best case - 1 super set check | 531.00 ns/op | 420.00 ns/op | 1.26 |
| isKnown normal case - 2 super set checks | 426.00 ns/op | 437.00 ns/op | 0.97 |
| isKnown worse case - 16 super set checks | 427.00 ns/op | 403.00 ns/op | 1.06 |
| InMemoryCheckpointStateCache - add get delete | 2.9950 us/op | 2.4320 us/op | 1.23 |
| validate api signedAggregateAndProof - struct | 1.5235 ms/op | 1.4289 ms/op | 1.07 |
| validate gossip signedAggregateAndProof - struct | 1.5352 ms/op | 1.9188 ms/op | 0.80 |
| batch validate gossip attestation - vc 640000 - chunk 32 | 113.53 us/op | 109.40 us/op | 1.04 |
| batch validate gossip attestation - vc 640000 - chunk 64 | 99.640 us/op | 94.017 us/op | 1.06 |
| batch validate gossip attestation - vc 640000 - chunk 128 | 88.830 us/op | 87.125 us/op | 1.02 |
| batch validate gossip attestation - vc 640000 - chunk 256 | 117.30 us/op | 86.663 us/op | 1.35 |
| pickEth1Vote - no votes | 818.17 us/op | 788.21 us/op | 1.04 |
| pickEth1Vote - max votes | 12.173 ms/op | 4.1871 ms/op | 2.91 |
| pickEth1Vote - Eth1Data hashTreeRoot value x2048 | 20.012 ms/op | 8.6273 ms/op | 2.32 |
| pickEth1Vote - Eth1Data hashTreeRoot tree x2048 | 33.926 ms/op | 11.511 ms/op | 2.95 |
| pickEth1Vote - Eth1Data fastSerialize value x2048 | 545.64 us/op | 351.08 us/op | 1.55 |
| pickEth1Vote - Eth1Data fastSerialize tree x2048 | 6.4838 ms/op | 1.9720 ms/op | 3.29 |
| bytes32 toHexString | 539.00 ns/op | 519.00 ns/op | 1.04 |
| bytes32 Buffer.toString(hex) | 543.00 ns/op | 433.00 ns/op | 1.25 |
| bytes32 Buffer.toString(hex) from Uint8Array | 820.00 ns/op | 499.00 ns/op | 1.64 |
| bytes32 Buffer.toString(hex) + 0x | 613.00 ns/op | 431.00 ns/op | 1.42 |
| Object access 1 prop | 0.32600 ns/op | 0.30500 ns/op | 1.07 |
| Map access 1 prop | 0.32800 ns/op | 0.31900 ns/op | 1.03 |
| Object get x1000 | 6.1190 ns/op | 5.1480 ns/op | 1.19 |
| Map get x1000 | 5.7360 ns/op | 5.7450 ns/op | 1.00 |
| Object set x1000 | 24.796 ns/op | 19.100 ns/op | 1.30 |
| Map set x1000 | 19.240 ns/op | 16.739 ns/op | 1.15 |
| Return object 10000 times | 0.30260 ns/op | 0.28780 ns/op | 1.05 |
| Throw Error 10000 times | 3.7736 us/op | 3.5836 us/op | 1.05 |
| toHex | 98.197 ns/op | 99.578 ns/op | 0.99 |
| Buffer.from | 92.620 ns/op | 92.241 ns/op | 1.00 |
| shared Buffer | 88.328 ns/op | 66.314 ns/op | 1.33 |
| fastMsgIdFn sha256 / 200 bytes | 2.1220 us/op | 1.9390 us/op | 1.09 |
| fastMsgIdFn h32 xxhash / 200 bytes | 395.00 ns/op | 383.00 ns/op | 1.03 |
| fastMsgIdFn h64 xxhash / 200 bytes | 572.00 ns/op | 439.00 ns/op | 1.30 |
| fastMsgIdFn sha256 / 1000 bytes | 6.0450 us/op | 5.8570 us/op | 1.03 |
| fastMsgIdFn h32 xxhash / 1000 bytes | 564.00 ns/op | 513.00 ns/op | 1.10 |
| fastMsgIdFn h64 xxhash / 1000 bytes | 642.00 ns/op | 512.00 ns/op | 1.25 |
| fastMsgIdFn sha256 / 10000 bytes | 65.928 us/op | 49.221 us/op | 1.34 |
| fastMsgIdFn h32 xxhash / 10000 bytes | 2.2250 us/op | 1.9150 us/op | 1.16 |
| fastMsgIdFn h64 xxhash / 10000 bytes | 1.4950 us/op | 1.3170 us/op | 1.14 |
| send data - 1000 256B messages | 24.977 ms/op | 13.015 ms/op | 1.92 |
| send data - 1000 512B messages | 27.312 ms/op | 15.327 ms/op | 1.78 |
| send data - 1000 1024B messages | 44.429 ms/op | 22.818 ms/op | 1.95 |
| send data - 1000 1200B messages | 36.612 ms/op | 18.915 ms/op | 1.94 |
| send data - 1000 2048B messages | 45.292 ms/op | 19.831 ms/op | 2.28 |
| send data - 1000 4096B messages | 49.221 ms/op | 22.501 ms/op | 2.19 |
| send data - 1000 16384B messages | 51.771 ms/op | 31.560 ms/op | 1.64 |
| send data - 1000 65536B messages | 132.79 ms/op | 92.475 ms/op | 1.44 |
| enrSubnets - fastDeserialize 64 bits | 1.4020 us/op | 962.00 ns/op | 1.46 |
| enrSubnets - ssz BitVector 64 bits | 787.00 ns/op | 487.00 ns/op | 1.62 |
| enrSubnets - fastDeserialize 4 bits | 497.00 ns/op | 324.00 ns/op | 1.53 |
| enrSubnets - ssz BitVector 4 bits | 623.00 ns/op | 493.00 ns/op | 1.26 |
| prioritizePeers score -10:0 att 32-0.1 sync 2-0 | 223.55 us/op | 198.69 us/op | 1.13 |
| prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 | 287.74 us/op | 236.04 us/op | 1.22 |
| prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 | 495.37 us/op | 369.90 us/op | 1.34 |
| prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 | 842.72 us/op | 679.72 us/op | 1.24 |
| prioritizePeers score 0:0 att 64-1 sync 4-1 | 965.75 us/op | 756.57 us/op | 1.28 |
| array of 16000 items push then shift | 1.3066 us/op | 1.3044 us/op | 1.00 |
| LinkedList of 16000 items push then shift | 8.4280 ns/op | 6.4520 ns/op | 1.31 |
| array of 16000 items push then pop | 80.265 ns/op | 68.328 ns/op | 1.17 |
| LinkedList of 16000 items push then pop | 7.2040 ns/op | 6.3800 ns/op | 1.13 |
| array of 24000 items push then shift | 1.9054 us/op | 1.9156 us/op | 0.99 |
| LinkedList of 24000 items push then shift | 7.8090 ns/op | 6.3970 ns/op | 1.22 |
| array of 24000 items push then pop | 117.22 ns/op | 98.264 ns/op | 1.19 |
| LinkedList of 24000 items push then pop | 7.3120 ns/op | 6.3370 ns/op | 1.15 |
| intersect bitArray bitLen 8 | 5.4550 ns/op | 5.5710 ns/op | 0.98 |
| intersect array and set length 8 | 55.992 ns/op | 33.042 ns/op | 1.69 |
| intersect bitArray bitLen 128 | 46.264 ns/op | 26.973 ns/op | 1.72 |
| intersect array and set length 128 | 728.13 ns/op | 545.08 ns/op | 1.34 |
| bitArray.getTrueBitIndexes() bitLen 128 | 1.7360 us/op | 1.1400 us/op | 1.52 |
| bitArray.getTrueBitIndexes() bitLen 248 | 2.5400 us/op | 1.8910 us/op | 1.34 |
| bitArray.getTrueBitIndexes() bitLen 512 | 5.4870 us/op | 3.7500 us/op | 1.46 |
| Buffer.concat 32 items | 1.5330 us/op | 860.00 ns/op | 1.78 |
| Uint8Array.set 32 items | 3.4630 us/op | 997.00 ns/op | 3.47 |
| Buffer.copy | 4.7500 us/op | 1.9480 us/op | 2.44 |
| Uint8Array.set - with subarray | 3.9210 us/op | 1.5300 us/op | 2.56 |
| Uint8Array.set - without subarray | 3.5830 us/op | 976.00 ns/op | 3.67 |
| getUint32 - dataview | 655.00 ns/op | 376.00 ns/op | 1.74 |
| getUint32 - manual | 446.00 ns/op | 326.00 ns/op | 1.37 |
| Set add up to 64 items then delete first | 3.4628 us/op | 2.0787 us/op | 1.67 |
| OrderedSet add up to 64 items then delete first | 6.1829 us/op | 3.1835 us/op | 1.94 |
| Set add up to 64 items then delete last | 3.8965 us/op | 1.9324 us/op | 2.02 |
| OrderedSet add up to 64 items then delete last | 4.0135 us/op | 3.3680 us/op | 1.19 |
| Set add up to 64 items then delete middle | 2.9943 us/op | 2.1494 us/op | 1.39 |
| OrderedSet add up to 64 items then delete middle | 6.0659 us/op | 4.9055 us/op | 1.24 |
| Set add up to 128 items then delete first | 6.7103 us/op | 4.4119 us/op | 1.52 |
| OrderedSet add up to 128 items then delete first | 9.5010 us/op | 6.8306 us/op | 1.39 |
| Set add up to 128 items then delete last | 5.0686 us/op | 4.1128 us/op | 1.23 |
| OrderedSet add up to 128 items then delete last | 6.7792 us/op | 6.5938 us/op | 1.03 |
| Set add up to 128 items then delete middle | 5.5022 us/op | 4.2002 us/op | 1.31 |
| OrderedSet add up to 128 items then delete middle | 16.079 us/op | 13.052 us/op | 1.23 |
| Set add up to 256 items then delete first | 9.0929 us/op | 10.558 us/op | 0.86 |
| OrderedSet add up to 256 items then delete first | 27.844 us/op | 13.032 us/op | 2.14 |
| Set add up to 256 items then delete last | 16.545 us/op | 8.0138 us/op | 2.06 |
| OrderedSet add up to 256 items then delete last | 23.637 us/op | 13.625 us/op | 1.73 |
| Set add up to 256 items then delete middle | 12.888 us/op | 8.2851 us/op | 1.56 |
| OrderedSet add up to 256 items then delete middle | 54.855 us/op | 39.248 us/op | 1.40 |
| transfer serialized Status (84 B) | 4.7110 us/op | 1.8880 us/op | 2.50 |
| copy serialized Status (84 B) | 2.6480 us/op | 1.1610 us/op | 2.28 |
| transfer serialized SignedVoluntaryExit (112 B) | 4.4380 us/op | 1.8860 us/op | 2.35 |
| copy serialized SignedVoluntaryExit (112 B) | 2.6190 us/op | 1.1510 us/op | 2.28 |
| transfer serialized ProposerSlashing (416 B) | 5.1710 us/op | 1.9130 us/op | 2.70 |
| copy serialized ProposerSlashing (416 B) | 3.1110 us/op | 1.1860 us/op | 2.62 |
| transfer serialized Attestation (485 B) | 4.3530 us/op | 1.9110 us/op | 2.28 |
| copy serialized Attestation (485 B) | 3.1350 us/op | 1.2090 us/op | 2.59 |
| transfer serialized AttesterSlashing (33232 B) | 4.2140 us/op | 1.9300 us/op | 2.18 |
| copy serialized AttesterSlashing (33232 B) | 6.6850 us/op | 3.5510 us/op | 1.88 |
| transfer serialized Small SignedBeaconBlock (128000 B) | 4.2230 us/op | 2.0400 us/op | 2.07 |
| copy serialized Small SignedBeaconBlock (128000 B) | 30.090 us/op | 10.181 us/op | 2.96 |
| transfer serialized Avg SignedBeaconBlock (200000 B) | 3.9470 us/op | 2.1380 us/op | 1.85 |
| copy serialized Avg SignedBeaconBlock (200000 B) | 25.713 us/op | 14.279 us/op | 1.80 |
| transfer serialized BlobsSidecar (524380 B) | 4.9580 us/op | 2.6540 us/op | 1.87 |
| copy serialized BlobsSidecar (524380 B) | 93.232 us/op | 75.132 us/op | 1.24 |
| transfer serialized Big SignedBeaconBlock (1000000 B) | 6.2580 us/op | 3.1000 us/op | 2.02 |
| copy serialized Big SignedBeaconBlock (1000000 B) | 144.40 us/op | 126.21 us/op | 1.14 |
| pass gossip attestations to forkchoice per slot | 2.5938 ms/op | 2.4762 ms/op | 1.05 |
| forkChoice updateHead vc 100000 bc 64 eq 0 | 413.15 us/op | 421.56 us/op | 0.98 |
| forkChoice updateHead vc 600000 bc 64 eq 0 | 2.9560 ms/op | 2.5942 ms/op | 1.14 |
| forkChoice updateHead vc 1000000 bc 64 eq 0 | 6.0865 ms/op | 5.1686 ms/op | 1.18 |
| forkChoice updateHead vc 600000 bc 320 eq 0 | 2.9095 ms/op | 2.5075 ms/op | 1.16 |
| forkChoice updateHead vc 600000 bc 1200 eq 0 | 3.0837 ms/op | 2.6568 ms/op | 1.16 |
| forkChoice updateHead vc 600000 bc 7200 eq 0 | 3.3923 ms/op | 2.7503 ms/op | 1.23 |
| forkChoice updateHead vc 600000 bc 64 eq 1000 | 3.0016 ms/op | 2.6949 ms/op | 1.11 |
| forkChoice updateHead vc 600000 bc 64 eq 10000 | 4.3506 ms/op | 2.5760 ms/op | 1.69 |
| forkChoice updateHead vc 600000 bc 64 eq 300000 | 10.128 ms/op | 7.9715 ms/op | 1.27 |
| computeDeltas 1400000 validators 300 proto nodes | 17.342 ms/op | 9.9614 ms/op | 1.74 |
| computeDeltas 1400000 validators 1200 proto nodes | 17.658 ms/op | 9.8861 ms/op | 1.79 |
| computeDeltas 1400000 validators 7200 proto nodes | 17.580 ms/op | 9.8100 ms/op | 1.79 |
| computeDeltas 2100000 validators 300 proto nodes | 27.301 ms/op | 14.772 ms/op | 1.85 |
| computeDeltas 2100000 validators 1200 proto nodes | 25.710 ms/op | 14.782 ms/op | 1.74 |
| computeDeltas 2100000 validators 7200 proto nodes | 26.560 ms/op | 14.894 ms/op | 1.78 |
| altair processAttestation - 250000 vs - 7PWei normalcase | 2.3505 ms/op | 1.8188 ms/op | 1.29 |
| altair processAttestation - 250000 vs - 7PWei worstcase | 3.8419 ms/op | 3.2904 ms/op | 1.17 |
| altair processAttestation - setStatus - 1/6 committees join | 165.14 us/op | 176.68 us/op | 0.93 |
| altair processAttestation - setStatus - 1/3 committees join | 228.99 us/op | 224.80 us/op | 1.02 |
| altair processAttestation - setStatus - 1/2 committees join | 321.40 us/op | 325.45 us/op | 0.99 |
| altair processAttestation - setStatus - 2/3 committees join | 419.15 us/op | 406.03 us/op | 1.03 |
| altair processAttestation - setStatus - 4/5 committees join | 566.68 us/op | 502.12 us/op | 1.13 |
| altair processAttestation - setStatus - 100% committees join | 712.95 us/op | 602.64 us/op | 1.18 |
| altair processBlock - 250000 vs - 7PWei normalcase | 5.4476 ms/op | 3.7711 ms/op | 1.44 |
| altair processBlock - 250000 vs - 7PWei normalcase hashState | 46.580 ms/op | 31.317 ms/op | 1.49 |
| altair processBlock - 250000 vs - 7PWei worstcase | 52.085 ms/op | 34.735 ms/op | 1.50 |
| altair processBlock - 250000 vs - 7PWei worstcase hashState | 90.680 ms/op | 93.166 ms/op | 0.97 |
| phase0 processBlock - 250000 vs - 7PWei normalcase | 1.7313 ms/op | 1.6186 ms/op | 1.07 |
| phase0 processBlock - 250000 vs - 7PWei worstcase | 26.950 ms/op | 26.255 ms/op | 1.03 |
| altair processEth1Data - 250000 vs - 7PWei normalcase | 288.38 us/op | 260.36 us/op | 1.11 |
| getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 | 10.026 us/op | 5.4470 us/op | 1.84 |
| getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 | 47.791 us/op | 32.323 us/op | 1.48 |
| getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 | 16.847 us/op | 9.6710 us/op | 1.74 |
| getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 | 13.282 us/op | 3.4920 us/op | 3.80 |
| getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 | 162.97 us/op | 151.54 us/op | 1.08 |
| getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 | 2.4150 ms/op | 1.3746 ms/op | 1.76 |
| getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 | 2.9758 ms/op | 1.8316 ms/op | 1.62 |
| getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 | 3.6682 ms/op | 1.8195 ms/op | 2.02 |
| getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 | 7.8233 ms/op | 3.6570 ms/op | 2.14 |
| getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 | 2.9932 ms/op | 1.7710 ms/op | 1.69 |
| getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 | 6.7257 ms/op | 3.5020 ms/op | 1.92 |
| Tree 40 250000 create | 520.67 ms/op | 345.44 ms/op | 1.51 |
| Tree 40 250000 get(125000) | 182.83 ns/op | 107.35 ns/op | 1.70 |
| Tree 40 250000 set(125000) | 4.0269 us/op | 1.1932 us/op | 3.37 |
| Tree 40 250000 toArray() | 33.552 ms/op | 9.3070 ms/op | 3.61 |
| Tree 40 250000 iterate all - toArray() + loop | 26.881 ms/op | 9.2918 ms/op | 2.89 |
| Tree 40 250000 iterate all - get(i) | 57.375 ms/op | 37.736 ms/op | 1.52 |
| Array 250000 create | 2.3240 ms/op | 1.9175 ms/op | 1.21 |
| Array 250000 clone - spread | 736.81 us/op | 624.22 us/op | 1.18 |
| Array 250000 get(125000) | 0.60300 ns/op | 0.55800 ns/op | 1.08 |
| Array 250000 set(125000) | 0.77300 ns/op | 0.57900 ns/op | 1.34 |
| Array 250000 iterate all - loop | 96.333 us/op | 100.49 us/op | 0.96 |
| phase0 afterProcessEpoch - 250000 vs - 7PWei | 43.130 ms/op | 37.838 ms/op | 1.14 |
| Array.fill - length 1000000 | 3.6269 ms/op | 2.6348 ms/op | 1.38 |
| Array push - length 1000000 | 21.398 ms/op | 9.2668 ms/op | 2.31 |
| Array.get | 0.27577 ns/op | 0.24970 ns/op | 1.10 |
| Uint8Array.get | 0.35941 ns/op | 0.40589 ns/op | 0.89 |
| phase0 beforeProcessEpoch - 250000 vs - 7PWei | 26.949 ms/op | 17.904 ms/op | 1.51 |
| altair processEpoch - mainnet_e81889 | 441.03 ms/op | 211.41 ms/op | 2.09 |
| mainnet_e81889 - altair beforeProcessEpoch | 24.699 ms/op | 14.827 ms/op | 1.67 |
| mainnet_e81889 - altair processJustificationAndFinalization | 9.7820 us/op | 4.3430 us/op | 2.25 |
| mainnet_e81889 - altair processInactivityUpdates | 4.2454 ms/op | 3.5414 ms/op | 1.20 |
| mainnet_e81889 - altair processRewardsAndPenalties | 51.428 ms/op | 26.360 ms/op | 1.95 |
| mainnet_e81889 - altair processRegistryUpdates | 1.3410 us/op | 867.00 ns/op | 1.55 |
| mainnet_e81889 - altair processSlashings | 459.00 ns/op | 410.00 ns/op | 1.12 |
| mainnet_e81889 - altair processEth1DataReset | 484.00 ns/op | 405.00 ns/op | 1.20 |
| mainnet_e81889 - altair processEffectiveBalanceUpdates | 1.4467 ms/op | 1.1027 ms/op | 1.31 |
| mainnet_e81889 - altair processSlashingsReset | 1.8030 us/op | 1.2300 us/op | 1.47 |
| mainnet_e81889 - altair processRandaoMixesReset | 2.7940 us/op | 1.1740 us/op | 2.38 |
| mainnet_e81889 - altair processHistoricalRootsUpdate | 639.00 ns/op | 410.00 ns/op | 1.56 |
| mainnet_e81889 - altair processParticipationFlagUpdates | 1.2990 us/op | 703.00 ns/op | 1.85 |
| mainnet_e81889 - altair processSyncCommitteeUpdates | 462.00 ns/op | 370.00 ns/op | 1.25 |
| mainnet_e81889 - altair afterProcessEpoch | 43.665 ms/op | 41.249 ms/op | 1.06 |
| capella processEpoch - mainnet_e217614 | 1.1967 s/op | 827.16 ms/op | 1.45 |
| mainnet_e217614 - capella beforeProcessEpoch | 74.313 ms/op | 62.518 ms/op | 1.19 |
| mainnet_e217614 - capella processJustificationAndFinalization | 6.3410 us/op | 4.6910 us/op | 1.35 |
| mainnet_e217614 - capella processInactivityUpdates | 14.236 ms/op | 12.437 ms/op | 1.14 |
| mainnet_e217614 - capella processRewardsAndPenalties | 194.69 ms/op | 180.59 ms/op | 1.08 |
| mainnet_e217614 - capella processRegistryUpdates | 6.7280 us/op | 5.3190 us/op | 1.26 |
| mainnet_e217614 - capella processSlashings | 413.00 ns/op | 405.00 ns/op | 1.02 |
| mainnet_e217614 - capella processEth1DataReset | 418.00 ns/op | 402.00 ns/op | 1.04 |
| mainnet_e217614 - capella processEffectiveBalanceUpdates | 3.5533 ms/op | 3.9889 ms/op | 0.89 |
| mainnet_e217614 - capella processSlashingsReset | 1.4920 us/op | 1.2990 us/op | 1.15 |
| mainnet_e217614 - capella processRandaoMixesReset | 1.4910 us/op | 1.2020 us/op | 1.24 |
| mainnet_e217614 - capella processHistoricalRootsUpdate | 411.00 ns/op | 405.00 ns/op | 1.01 |
| mainnet_e217614 - capella processParticipationFlagUpdates | 780.00 ns/op | 703.00 ns/op | 1.11 |
| mainnet_e217614 - capella afterProcessEpoch | 110.94 ms/op | 104.67 ms/op | 1.06 |
| phase0 processEpoch - mainnet_e58758 | 362.56 ms/op | 244.88 ms/op | 1.48 |
| mainnet_e58758 - phase0 beforeProcessEpoch | 108.54 ms/op | 69.784 ms/op | 1.56 |
| mainnet_e58758 - phase0 processJustificationAndFinalization | 7.2580 us/op | 4.4610 us/op | 1.63 |
| mainnet_e58758 - phase0 processRewardsAndPenalties | 44.152 ms/op | 41.414 ms/op | 1.07 |
| mainnet_e58758 - phase0 processRegistryUpdates | 3.4320 us/op | 2.7210 us/op | 1.26 |
| mainnet_e58758 - phase0 processSlashings | 413.00 ns/op | 394.00 ns/op | 1.05 |
| mainnet_e58758 - phase0 processEth1DataReset | 411.00 ns/op | 381.00 ns/op | 1.08 |
| mainnet_e58758 - phase0 processEffectiveBalanceUpdates | 5.4237 ms/op | 916.56 us/op | 5.92 |
| mainnet_e58758 - phase0 processSlashingsReset | 1.3370 us/op | 1.0930 us/op | 1.22 |
| mainnet_e58758 - phase0 processRandaoMixesReset | 1.4460 us/op | 1.1970 us/op | 1.21 |
| mainnet_e58758 - phase0 processHistoricalRootsUpdate | 414.00 ns/op | 387.00 ns/op | 1.07 |
| mainnet_e58758 - phase0 processParticipationRecordUpdates | 1.5110 us/op | 1.1670 us/op | 1.29 |
| mainnet_e58758 - phase0 afterProcessEpoch | 34.006 ms/op | 33.066 ms/op | 1.03 |
| phase0 processEffectiveBalanceUpdates - 250000 normalcase | 1.0550 ms/op | 939.25 us/op | 1.12 |
| phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 | 1.4718 ms/op | 1.3830 ms/op | 1.06 |
| altair processInactivityUpdates - 250000 normalcase | 18.964 ms/op | 16.748 ms/op | 1.13 |
| altair processInactivityUpdates - 250000 worstcase | 19.334 ms/op | 18.101 ms/op | 1.07 |
| phase0 processRegistryUpdates - 250000 normalcase | 6.3240 us/op | 4.9410 us/op | 1.28 |
| phase0 processRegistryUpdates - 250000 badcase_full_deposits | 252.66 us/op | 274.04 us/op | 0.92 |
| phase0 processRegistryUpdates - 250000 worstcase 0.5 | 115.57 ms/op | 110.16 ms/op | 1.05 |
| altair processRewardsAndPenalties - 250000 normalcase | 26.083 ms/op | 29.761 ms/op | 0.88 |
| altair processRewardsAndPenalties - 250000 worstcase | 29.431 ms/op | 30.494 ms/op | 0.97 |
| phase0 getAttestationDeltas - 250000 normalcase | 18.329 ms/op | 6.3507 ms/op | 2.89 |
| phase0 getAttestationDeltas - 250000 worstcase | 5.1932 ms/op | 6.3092 ms/op | 0.82 |
| phase0 processSlashings - 250000 worstcase | 106.49 us/op | 83.326 us/op | 1.28 |
| altair processSyncCommitteeUpdates - 250000 | 12.107 ms/op | 9.8397 ms/op | 1.23 |
| BeaconState.hashTreeRoot - No change | 448.00 ns/op | 438.00 ns/op | 1.02 |
| BeaconState.hashTreeRoot - 1 full validator | 111.96 us/op | 69.708 us/op | 1.61 |
| BeaconState.hashTreeRoot - 32 full validator | 960.99 us/op | 703.41 us/op | 1.37 |
| BeaconState.hashTreeRoot - 512 full validator | 15.225 ms/op | 7.0407 ms/op | 2.16 |
| BeaconState.hashTreeRoot - 1 validator.effectiveBalance | 113.60 us/op | 71.580 us/op | 1.59 |
| BeaconState.hashTreeRoot - 32 validator.effectiveBalance | 1.9939 ms/op | 1.0295 ms/op | 1.94 |
| BeaconState.hashTreeRoot - 512 validator.effectiveBalance | 34.432 ms/op | 14.651 ms/op | 2.35 |
| BeaconState.hashTreeRoot - 1 balances | 78.460 us/op | 56.647 us/op | 1.39 |
| BeaconState.hashTreeRoot - 32 balances | 677.46 us/op | 532.74 us/op | 1.27 |
| BeaconState.hashTreeRoot - 512 balances | 8.8324 ms/op | 8.1674 ms/op | 1.08 |
| BeaconState.hashTreeRoot - 250000 balances | 216.29 ms/op | 182.27 ms/op | 1.19 |
| aggregationBits - 2048 els - zipIndexesInBitList | 21.988 us/op | 18.902 us/op | 1.16 |
| byteArrayEquals 32 | 49.721 ns/op | 41.595 ns/op | 1.20 |
| Buffer.compare 32 | 15.827 ns/op | 14.724 ns/op | 1.07 |
| byteArrayEquals 1024 | 1.3124 us/op | 1.2171 us/op | 1.08 |
| Buffer.compare 1024 | 23.496 ns/op | 22.641 ns/op | 1.04 |
| byteArrayEquals 16384 | 20.448 us/op | 19.377 us/op | 1.06 |
| Buffer.compare 16384 | 180.08 ns/op | 162.71 ns/op | 1.11 |
| byteArrayEquals 123687377 | 153.76 ms/op | 148.05 ms/op | 1.04 |
| Buffer.compare 123687377 | 5.6128 ms/op | 3.7746 ms/op | 1.49 |
| byteArrayEquals 32 - diff last byte | 46.623 ns/op | 42.781 ns/op | 1.09 |
| Buffer.compare 32 - diff last byte | 15.143 ns/op | 16.440 ns/op | 0.92 |
| byteArrayEquals 1024 - diff last byte | 1.2372 us/op | 1.2780 us/op | 0.97 |
| Buffer.compare 1024 - diff last byte | 23.598 ns/op | 23.316 ns/op | 1.01 |
| byteArrayEquals 16384 - diff last byte | 19.884 us/op | 20.147 us/op | 0.99 |
| Buffer.compare 16384 - diff last byte | 164.10 ns/op | 190.70 ns/op | 0.86 |
| byteArrayEquals 123687377 - diff last byte | 149.39 ms/op | 151.20 ms/op | 0.99 |
| Buffer.compare 123687377 - diff last byte | 5.5848 ms/op | 3.7148 ms/op | 1.50 |
| byteArrayEquals 32 - random bytes | 4.6820 ns/op | 4.9860 ns/op | 0.94 |
| Buffer.compare 32 - random bytes | 14.878 ns/op | 15.585 ns/op | 0.95 |
| byteArrayEquals 1024 - random bytes | 4.6370 ns/op | 4.8460 ns/op | 0.96 |
| Buffer.compare 1024 - random bytes | 14.892 ns/op | 15.414 ns/op | 0.97 |
| byteArrayEquals 16384 - random bytes | 4.7250 ns/op | 4.8370 ns/op | 0.98 |
| Buffer.compare 16384 - random bytes | 15.014 ns/op | 15.441 ns/op | 0.97 |
| byteArrayEquals 123687377 - random bytes | 7.6100 ns/op | 7.6300 ns/op | 1.00 |
| Buffer.compare 123687377 - random bytes | 17.850 ns/op | 18.610 ns/op | 0.96 |
| regular array get 100000 times | 30.020 us/op | 40.099 us/op | 0.75 |
| wrappedArray get 100000 times | 29.655 us/op | 40.059 us/op | 0.74 |
| arrayWithProxy get 100000 times | 8.5132 ms/op | 9.6671 ms/op | 0.88 |
| ssz.Root.equals | 42.778 ns/op | 39.176 ns/op | 1.09 |
| byteArrayEquals | 41.925 ns/op | 38.577 ns/op | 1.09 |
| Buffer.compare | 8.7080 ns/op | 8.9110 ns/op | 0.98 |
| processSlot - 1 slots | 8.4900 us/op | 8.3320 us/op | 1.02 |
| processSlot - 32 slots | 2.6638 ms/op | 1.5758 ms/op | 1.69 |
| getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei | 3.2136 ms/op | 1.9461 ms/op | 1.65 |
| getCommitteeAssignments - req 1 vs - 250000 vc | 1.7910 ms/op | 1.8017 ms/op | 0.99 |
| getCommitteeAssignments - req 100 vs - 250000 vc | 3.5034 ms/op | 3.5302 ms/op | 0.99 |
| getCommitteeAssignments - req 1000 vs - 250000 vc | 3.6848 ms/op | 3.7543 ms/op | 0.98 |
| findModifiedValidators - 10000 modified validators | 763.98 ms/op | 739.09 ms/op | 1.03 |
| findModifiedValidators - 1000 modified validators | 655.42 ms/op | 640.56 ms/op | 1.02 |
| findModifiedValidators - 100 modified validators | 217.58 ms/op | 154.93 ms/op | 1.40 |
| findModifiedValidators - 10 modified validators | 154.14 ms/op | 122.01 ms/op | 1.26 |
| findModifiedValidators - 1 modified validators | 150.05 ms/op | 124.38 ms/op | 1.21 |
| findModifiedValidators - no difference | 136.76 ms/op | 128.61 ms/op | 1.06 |
| compare ViewDUs | 6.4050 s/op | 5.9992 s/op | 1.07 |
| compare each validator Uint8Array | 1.3727 s/op | 1.5490 s/op | 0.89 |
| compare ViewDU to Uint8Array | 1.2479 s/op | 837.65 ms/op | 1.49 |
| migrate state 1000000 validators, 24 modified, 0 new | 1.0524 s/op | 825.61 ms/op | 1.27 |
| migrate state 1000000 validators, 1700 modified, 1000 new | 1.2047 s/op | 1.1185 s/op | 1.08 |
| migrate state 1000000 validators, 3400 modified, 2000 new | 1.1729 s/op | 1.2090 s/op | 0.97 |
| migrate state 1500000 validators, 24 modified, 0 new | 772.39 ms/op | 830.17 ms/op | 0.93 |
| migrate state 1500000 validators, 1700 modified, 1000 new | 1.0496 s/op | 1.0284 s/op | 1.02 |
| migrate state 1500000 validators, 3400 modified, 2000 new | 1.2303 s/op | 1.1037 s/op | 1.11 |
| RootCache.getBlockRootAtSlot - 250000 vs - 7PWei | 6.0000 ns/op | 5.6300 ns/op | 1.07 |
| state getBlockRootAtSlot - 250000 vs - 7PWei | 397.11 ns/op | 427.68 ns/op | 0.93 |
| naive computeProposerIndex 100000 validators | 42.387 ms/op | 38.471 ms/op | 1.10 |
| computeProposerIndex 100000 validators | 1.3344 ms/op | 1.2717 ms/op | 1.05 |
| naiveGetNextSyncCommitteeIndices 1000 validators | 5.6709 s/op | 5.7193 s/op | 0.99 |
| getNextSyncCommitteeIndices 1000 validators | 94.926 ms/op | 97.358 ms/op | 0.98 |
| naiveGetNextSyncCommitteeIndices 10000 validators | 6.1160 s/op | 6.0401 s/op | 1.01 |
| getNextSyncCommitteeIndices 10000 validators | 95.858 ms/op | 99.131 ms/op | 0.97 |
| naiveGetNextSyncCommitteeIndices 100000 validators | 6.6652 s/op | 5.7382 s/op | 1.16 |
| getNextSyncCommitteeIndices 100000 validators | 90.478 ms/op | 96.988 ms/op | 0.93 |
| naive computeShuffledIndex 100000 validators | 19.811 s/op | 20.431 s/op | 0.97 |
| cached computeShuffledIndex 100000 validators | 467.01 ms/op | 467.59 ms/op | 1.00 |
| naive computeShuffledIndex 2000000 validators | 390.91 s/op | 371.53 s/op | 1.05 |
| cached computeShuffledIndex 2000000 validators | 21.773 s/op | 25.093 s/op | 0.87 |
| computeProposers - vc 250000 | 555.30 us/op | 531.28 us/op | 1.05 |
| computeEpochShuffling - vc 250000 | 41.026 ms/op | 36.830 ms/op | 1.11 |
| getNextSyncCommittee - vc 250000 | 9.4811 ms/op | 8.8818 ms/op | 1.07 |
| computeSigningRoot for AttestationData | 19.379 us/op | 15.998 us/op | 1.21 |
| hash AttestationData serialized data then Buffer.toString(base64) | 1.1929 us/op | 1.1406 us/op | 1.05 |
| toHexString serialized data | 1.0476 us/op | 937.57 ns/op | 1.12 |
| Buffer.toString(base64) | 109.11 ns/op | 116.05 ns/op | 0.94 |
| nodejs block root to RootHex using toHex | 110.34 ns/op | 102.38 ns/op | 1.08 |
| nodejs block root to RootHex using toRootHex | 75.513 ns/op | 67.385 ns/op | 1.12 |
| nodejs fromhex(blob) | 101.98 ms/op | 106.18 ms/op | 0.96 |
| nodejs fromHexInto(blob) | 83.550 ms/op | 75.440 ms/op | 1.11 |
| browser block root to RootHex using the deprecated toHexString | 210.84 ns/op | 178.99 ns/op | 1.18 |
| browser block root to RootHex using toHex | 161.23 ns/op | 143.48 ns/op | 1.12 |
| browser block root to RootHex using toRootHex | 151.43 ns/op | 133.47 ns/op | 1.13 |
| browser fromHexInto(blob) | 740.54 us/op | 615.59 us/op | 1.20 |
| browser fromHex(blob) | 709.94 ms/op | 618.18 ms/op | 1.15 |
by benchmarkbot/action
|
🎉 This PR is included in v1.36.0 🎉 |
Motivation
See ethereum/consensus-specs#4650
Description
Ensure data column sidecars respect blob limit by checking that
kzgCommitments.lengthof each data column sidecar does not exceedgetMaxBlobsPerBlock(epoch).