-
-
Notifications
You must be signed in to change notification settings - Fork 405
chore: cleanup types exports for all packages #8434
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
base: unstable
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @nazarhussain, 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 streamlines the declaration of TypeScript type exports across all packages within the repository. The primary goal is to establish a consistent pattern for how type definitions are exposed, moving away from a mixed approach of subpath and module exports. By consolidating type declarations directly into the 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 aims to standardize the type exports across all packages by using subpath exports in package.json
. The changes are generally in the right direction, removing the now-unnecessary types
and typesVersions
top-level fields. However, I've identified a few critical issues in the exports
configuration for some packages that would lead to incorrect module or type resolution. These issues need to be addressed to ensure the packages work as expected. Please see my detailed comments.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #8434 +/- ##
=========================================
Coverage 52.22% 52.22%
=========================================
Files 853 853
Lines 64898 64898
Branches 4768 4767 -1
=========================================
Hits 33893 33893
Misses 30935 30935
Partials 70 70 🚀 New features to boost your workflow:
|
|
Benchmark suite | Current: 3bcefbc | Previous: 83de5b8 | Ratio |
---|---|---|---|
altair processAttestation - 250000 vs - 7PWei normalcase | 6.1786 ms/op | 2.0570 ms/op | 3.00 |
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 | 17.123 us/op | 5.6250 us/op | 3.04 |
Array.fill - length 1000000 | 11.721 ms/op | 3.7047 ms/op | 3.16 |
Full benchmark results
Benchmark suite | Current: 3bcefbc | Previous: 83de5b8 | Ratio |
---|---|---|---|
getPubkeys - index2pubkey - req 1000 vs - 250000 vc | 991.65 us/op | 979.12 us/op | 1.01 |
getPubkeys - validatorsArr - req 1000 vs - 250000 vc | 36.287 us/op | 37.179 us/op | 0.98 |
BLS verify - blst | 796.19 us/op | 859.30 us/op | 0.93 |
BLS verifyMultipleSignatures 3 - blst | 1.1617 ms/op | 1.6711 ms/op | 0.70 |
BLS verifyMultipleSignatures 8 - blst | 1.8930 ms/op | 2.3458 ms/op | 0.81 |
BLS verifyMultipleSignatures 32 - blst | 4.9415 ms/op | 5.6329 ms/op | 0.88 |
BLS verifyMultipleSignatures 64 - blst | 9.2073 ms/op | 10.815 ms/op | 0.85 |
BLS verifyMultipleSignatures 128 - blst | 17.736 ms/op | 17.618 ms/op | 1.01 |
BLS deserializing 10000 signatures | 693.41 ms/op | 719.59 ms/op | 0.96 |
BLS deserializing 100000 signatures | 7.0151 s/op | 7.1073 s/op | 0.99 |
BLS verifyMultipleSignatures - same message - 3 - blst | 920.87 us/op | 913.06 us/op | 1.01 |
BLS verifyMultipleSignatures - same message - 8 - blst | 1.0091 ms/op | 1.1881 ms/op | 0.85 |
BLS verifyMultipleSignatures - same message - 32 - blst | 1.6918 ms/op | 1.7130 ms/op | 0.99 |
BLS verifyMultipleSignatures - same message - 64 - blst | 2.5990 ms/op | 2.6386 ms/op | 0.98 |
BLS verifyMultipleSignatures - same message - 128 - blst | 4.4524 ms/op | 4.4392 ms/op | 1.00 |
BLS aggregatePubkeys 32 - blst | 19.824 us/op | 19.868 us/op | 1.00 |
BLS aggregatePubkeys 128 - blst | 70.478 us/op | 70.925 us/op | 0.99 |
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 | 53.902 ms/op | 54.504 ms/op | 0.99 |
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 | 49.873 ms/op | 56.465 ms/op | 0.88 |
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 | 39.293 ms/op | 42.025 ms/op | 0.93 |
getSlashingsAndExits - default max | 76.315 us/op | 74.862 us/op | 1.02 |
getSlashingsAndExits - 2k | 307.70 us/op | 328.58 us/op | 0.94 |
isKnown best case - 1 super set check | 214.00 ns/op | 214.00 ns/op | 1.00 |
isKnown normal case - 2 super set checks | 211.00 ns/op | 207.00 ns/op | 1.02 |
isKnown worse case - 16 super set checks | 212.00 ns/op | 210.00 ns/op | 1.01 |
InMemoryCheckpointStateCache - add get delete | 2.4470 us/op | 2.4760 us/op | 0.99 |
validate api signedAggregateAndProof - struct | 1.4353 ms/op | 1.8461 ms/op | 0.78 |
validate gossip signedAggregateAndProof - struct | 1.4556 ms/op | 2.5847 ms/op | 0.56 |
batch validate gossip attestation - vc 640000 - chunk 32 | 119.03 us/op | 117.73 us/op | 1.01 |
batch validate gossip attestation - vc 640000 - chunk 64 | 107.80 us/op | 104.24 us/op | 1.03 |
batch validate gossip attestation - vc 640000 - chunk 128 | 99.644 us/op | 97.264 us/op | 1.02 |
batch validate gossip attestation - vc 640000 - chunk 256 | 101.32 us/op | 98.564 us/op | 1.03 |
pickEth1Vote - no votes | 1.0189 ms/op | 986.65 us/op | 1.03 |
pickEth1Vote - max votes | 7.5216 ms/op | 5.7759 ms/op | 1.30 |
pickEth1Vote - Eth1Data hashTreeRoot value x2048 | 12.171 ms/op | 11.081 ms/op | 1.10 |
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 | 17.052 ms/op | 15.055 ms/op | 1.13 |
pickEth1Vote - Eth1Data fastSerialize value x2048 | 443.96 us/op | 512.73 us/op | 0.87 |
pickEth1Vote - Eth1Data fastSerialize tree x2048 | 2.2192 ms/op | 3.1140 ms/op | 0.71 |
bytes32 toHexString | 385.00 ns/op | 384.00 ns/op | 1.00 |
bytes32 Buffer.toString(hex) | 270.00 ns/op | 265.00 ns/op | 1.02 |
bytes32 Buffer.toString(hex) from Uint8Array | 368.00 ns/op | 350.00 ns/op | 1.05 |
bytes32 Buffer.toString(hex) + 0x | 272.00 ns/op | 262.00 ns/op | 1.04 |
Object access 1 prop | 0.12300 ns/op | 0.12800 ns/op | 0.96 |
Map access 1 prop | 0.12700 ns/op | 0.12600 ns/op | 1.01 |
Object get x1000 | 6.1680 ns/op | 6.0160 ns/op | 1.03 |
Map get x1000 | 6.8030 ns/op | 6.4230 ns/op | 1.06 |
Object set x1000 | 34.285 ns/op | 28.482 ns/op | 1.20 |
Map set x1000 | 21.697 ns/op | 19.320 ns/op | 1.12 |
Return object 10000 times | 0.29590 ns/op | 0.29080 ns/op | 1.02 |
Throw Error 10000 times | 4.4879 us/op | 4.3435 us/op | 1.03 |
toHex | 135.31 ns/op | 135.16 ns/op | 1.00 |
Buffer.from | 124.54 ns/op | 128.31 ns/op | 0.97 |
shared Buffer | 88.831 ns/op | 97.747 ns/op | 0.91 |
fastMsgIdFn sha256 / 200 bytes | 2.2840 us/op | 2.2330 us/op | 1.02 |
fastMsgIdFn h32 xxhash / 200 bytes | 219.00 ns/op | 207.00 ns/op | 1.06 |
fastMsgIdFn h64 xxhash / 200 bytes | 281.00 ns/op | 287.00 ns/op | 0.98 |
fastMsgIdFn sha256 / 1000 bytes | 7.9790 us/op | 7.5590 us/op | 1.06 |
fastMsgIdFn h32 xxhash / 1000 bytes | 350.00 ns/op | 340.00 ns/op | 1.03 |
fastMsgIdFn h64 xxhash / 1000 bytes | 346.00 ns/op | 339.00 ns/op | 1.02 |
fastMsgIdFn sha256 / 10000 bytes | 68.974 us/op | 66.247 us/op | 1.04 |
fastMsgIdFn h32 xxhash / 10000 bytes | 1.8990 us/op | 1.8700 us/op | 1.02 |
fastMsgIdFn h64 xxhash / 10000 bytes | 1.2870 us/op | 1.2500 us/op | 1.03 |
send data - 1000 256B messages | 18.607 ms/op | 15.843 ms/op | 1.17 |
send data - 1000 512B messages | 21.844 ms/op | 19.933 ms/op | 1.10 |
send data - 1000 1024B messages | 30.366 ms/op | 27.895 ms/op | 1.09 |
send data - 1000 1200B messages | 26.538 ms/op | 24.430 ms/op | 1.09 |
send data - 1000 2048B messages | 30.471 ms/op | 26.143 ms/op | 1.17 |
send data - 1000 4096B messages | 33.512 ms/op | 27.390 ms/op | 1.22 |
send data - 1000 16384B messages | 50.297 ms/op | 43.360 ms/op | 1.16 |
send data - 1000 65536B messages | 129.06 ms/op | 119.90 ms/op | 1.08 |
enrSubnets - fastDeserialize 64 bits | 939.00 ns/op | 914.00 ns/op | 1.03 |
enrSubnets - ssz BitVector 64 bits | 351.00 ns/op | 334.00 ns/op | 1.05 |
enrSubnets - fastDeserialize 4 bits | 134.00 ns/op | 136.00 ns/op | 0.99 |
enrSubnets - ssz BitVector 4 bits | 343.00 ns/op | 328.00 ns/op | 1.05 |
prioritizePeers score -10:0 att 32-0.1 sync 2-0 | 249.61 us/op | 249.60 us/op | 1.00 |
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 | 274.60 us/op | 270.74 us/op | 1.01 |
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 | 393.78 us/op | 388.66 us/op | 1.01 |
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 | 744.73 us/op | 718.56 us/op | 1.04 |
prioritizePeers score 0:0 att 64-1 sync 4-1 | 926.68 us/op | 872.52 us/op | 1.06 |
array of 16000 items push then shift | 1.7003 us/op | 1.6612 us/op | 1.02 |
LinkedList of 16000 items push then shift | 7.5110 ns/op | 7.3760 ns/op | 1.02 |
array of 16000 items push then pop | 81.157 ns/op | 79.308 ns/op | 1.02 |
LinkedList of 16000 items push then pop | 10.975 ns/op | 7.3690 ns/op | 1.49 |
array of 24000 items push then shift | 2.4651 us/op | 2.4706 us/op | 1.00 |
LinkedList of 24000 items push then shift | 7.8140 ns/op | 7.3350 ns/op | 1.07 |
array of 24000 items push then pop | 119.26 ns/op | 107.25 ns/op | 1.11 |
LinkedList of 24000 items push then pop | 7.5270 ns/op | 7.2480 ns/op | 1.04 |
intersect bitArray bitLen 8 | 6.4830 ns/op | 6.5080 ns/op | 1.00 |
intersect array and set length 8 | 38.710 ns/op | 38.695 ns/op | 1.00 |
intersect bitArray bitLen 128 | 30.911 ns/op | 30.343 ns/op | 1.02 |
intersect array and set length 128 | 650.72 ns/op | 634.39 ns/op | 1.03 |
bitArray.getTrueBitIndexes() bitLen 128 | 1.0920 us/op | 1.0490 us/op | 1.04 |
bitArray.getTrueBitIndexes() bitLen 248 | 1.9770 us/op | 1.8350 us/op | 1.08 |
bitArray.getTrueBitIndexes() bitLen 512 | 4.0100 us/op | 3.7810 us/op | 1.06 |
Buffer.concat 32 items | 812.00 ns/op | 628.00 ns/op | 1.29 |
Uint8Array.set 32 items | 1.2260 us/op | 1.0800 us/op | 1.14 |
Buffer.copy | 2.2250 us/op | 2.5610 us/op | 0.87 |
Uint8Array.set - with subarray | 1.6270 us/op | 1.7360 us/op | 0.94 |
Uint8Array.set - without subarray | 966.00 ns/op | 897.00 ns/op | 1.08 |
getUint32 - dataview | 215.00 ns/op | 206.00 ns/op | 1.04 |
getUint32 - manual | 128.00 ns/op | 125.00 ns/op | 1.02 |
Set add up to 64 items then delete first | 2.4806 us/op | 2.0712 us/op | 1.20 |
OrderedSet add up to 64 items then delete first | 3.8126 us/op | 3.3763 us/op | 1.13 |
Set add up to 64 items then delete last | 2.9255 us/op | 2.4977 us/op | 1.17 |
OrderedSet add up to 64 items then delete last | 4.3529 us/op | 3.7468 us/op | 1.16 |
Set add up to 64 items then delete middle | 3.2520 us/op | 2.4010 us/op | 1.35 |
OrderedSet add up to 64 items then delete middle | 6.2819 us/op | 5.2914 us/op | 1.19 |
Set add up to 128 items then delete first | 5.8509 us/op | 5.1723 us/op | 1.13 |
OrderedSet add up to 128 items then delete first | 9.3320 us/op | 8.0814 us/op | 1.15 |
Set add up to 128 items then delete last | 5.8850 us/op | 5.0933 us/op | 1.16 |
OrderedSet add up to 128 items then delete last | 8.1255 us/op | 7.4976 us/op | 1.08 |
Set add up to 128 items then delete middle | 5.7083 us/op | 5.0701 us/op | 1.13 |
OrderedSet add up to 128 items then delete middle | 14.907 us/op | 14.137 us/op | 1.05 |
Set add up to 256 items then delete first | 13.127 us/op | 11.116 us/op | 1.18 |
OrderedSet add up to 256 items then delete first | 17.298 us/op | 16.246 us/op | 1.06 |
Set add up to 256 items then delete last | 10.953 us/op | 10.109 us/op | 1.08 |
OrderedSet add up to 256 items then delete last | 17.103 us/op | 15.193 us/op | 1.13 |
Set add up to 256 items then delete middle | 12.410 us/op | 9.9972 us/op | 1.24 |
OrderedSet add up to 256 items then delete middle | 46.217 us/op | 43.028 us/op | 1.07 |
transfer serialized Status (84 B) | 2.3880 us/op | 2.3500 us/op | 1.02 |
copy serialized Status (84 B) | 1.2400 us/op | 1.1600 us/op | 1.07 |
transfer serialized SignedVoluntaryExit (112 B) | 2.4220 us/op | 2.2800 us/op | 1.06 |
copy serialized SignedVoluntaryExit (112 B) | 1.2800 us/op | 1.1730 us/op | 1.09 |
transfer serialized ProposerSlashing (416 B) | 2.5520 us/op | 2.7270 us/op | 0.94 |
copy serialized ProposerSlashing (416 B) | 1.7250 us/op | 1.2640 us/op | 1.36 |
transfer serialized Attestation (485 B) | 2.5060 us/op | 2.3290 us/op | 1.08 |
copy serialized Attestation (485 B) | 1.5020 us/op | 1.2460 us/op | 1.21 |
transfer serialized AttesterSlashing (33232 B) | 2.8980 us/op | 2.4900 us/op | 1.16 |
copy serialized AttesterSlashing (33232 B) | 3.6190 us/op | 3.4300 us/op | 1.06 |
transfer serialized Small SignedBeaconBlock (128000 B) | 3.3520 us/op | 3.0080 us/op | 1.11 |
copy serialized Small SignedBeaconBlock (128000 B) | 14.035 us/op | 8.7840 us/op | 1.60 |
transfer serialized Avg SignedBeaconBlock (200000 B) | 3.8630 us/op | 3.3730 us/op | 1.15 |
copy serialized Avg SignedBeaconBlock (200000 B) | 17.103 us/op | 18.061 us/op | 0.95 |
transfer serialized BlobsSidecar (524380 B) | 4.2530 us/op | 3.2700 us/op | 1.30 |
copy serialized BlobsSidecar (524380 B) | 71.234 us/op | 60.774 us/op | 1.17 |
transfer serialized Big SignedBeaconBlock (1000000 B) | 4.7220 us/op | 3.3660 us/op | 1.40 |
copy serialized Big SignedBeaconBlock (1000000 B) | 131.57 us/op | 120.31 us/op | 1.09 |
pass gossip attestations to forkchoice per slot | 2.9059 ms/op | 2.8818 ms/op | 1.01 |
forkChoice updateHead vc 100000 bc 64 eq 0 | 490.58 us/op | 465.61 us/op | 1.05 |
forkChoice updateHead vc 600000 bc 64 eq 0 | 4.4297 ms/op | 2.8953 ms/op | 1.53 |
forkChoice updateHead vc 1000000 bc 64 eq 0 | 5.5936 ms/op | 4.9363 ms/op | 1.13 |
forkChoice updateHead vc 600000 bc 320 eq 0 | 3.5244 ms/op | 2.8665 ms/op | 1.23 |
forkChoice updateHead vc 600000 bc 1200 eq 0 | 3.6261 ms/op | 2.9085 ms/op | 1.25 |
forkChoice updateHead vc 600000 bc 7200 eq 0 | 3.7486 ms/op | 3.1086 ms/op | 1.21 |
forkChoice updateHead vc 600000 bc 64 eq 1000 | 11.039 ms/op | 10.610 ms/op | 1.04 |
forkChoice updateHead vc 600000 bc 64 eq 10000 | 11.676 ms/op | 10.543 ms/op | 1.11 |
forkChoice updateHead vc 600000 bc 64 eq 300000 | 16.282 ms/op | 14.191 ms/op | 1.15 |
computeDeltas 500000 validators 300 proto nodes | 4.7014 ms/op | 4.0032 ms/op | 1.17 |
computeDeltas 500000 validators 1200 proto nodes | 4.9126 ms/op | 4.0377 ms/op | 1.22 |
computeDeltas 500000 validators 7200 proto nodes | 6.6838 ms/op | 4.0329 ms/op | 1.66 |
computeDeltas 750000 validators 300 proto nodes | 8.0908 ms/op | 5.9911 ms/op | 1.35 |
computeDeltas 750000 validators 1200 proto nodes | 7.1283 ms/op | 5.9510 ms/op | 1.20 |
computeDeltas 750000 validators 7200 proto nodes | 7.2597 ms/op | 5.9983 ms/op | 1.21 |
computeDeltas 1400000 validators 300 proto nodes | 14.917 ms/op | 11.357 ms/op | 1.31 |
computeDeltas 1400000 validators 1200 proto nodes | 20.097 ms/op | 11.293 ms/op | 1.78 |
computeDeltas 1400000 validators 7200 proto nodes | 20.045 ms/op | 11.230 ms/op | 1.79 |
computeDeltas 2100000 validators 300 proto nodes | 34.850 ms/op | 16.996 ms/op | 2.05 |
computeDeltas 2100000 validators 1200 proto nodes | 30.343 ms/op | 16.984 ms/op | 1.79 |
computeDeltas 2100000 validators 7200 proto nodes | 29.660 ms/op | 16.911 ms/op | 1.75 |
altair processAttestation - 250000 vs - 7PWei normalcase | 6.1786 ms/op | 2.0570 ms/op | 3.00 |
altair processAttestation - 250000 vs - 7PWei worstcase | 8.5720 ms/op | 3.0652 ms/op | 2.80 |
altair processAttestation - setStatus - 1/6 committees join | 230.43 us/op | 129.91 us/op | 1.77 |
altair processAttestation - setStatus - 1/3 committees join | 363.83 us/op | 246.42 us/op | 1.48 |
altair processAttestation - setStatus - 1/2 committees join | 480.61 us/op | 351.36 us/op | 1.37 |
altair processAttestation - setStatus - 2/3 committees join | 997.75 us/op | 456.33 us/op | 2.19 |
altair processAttestation - setStatus - 4/5 committees join | 1.6346 ms/op | 630.33 us/op | 2.59 |
altair processAttestation - setStatus - 100% committees join | 1.1636 ms/op | 731.25 us/op | 1.59 |
altair processBlock - 250000 vs - 7PWei normalcase | 10.927 ms/op | 4.4503 ms/op | 2.46 |
altair processBlock - 250000 vs - 7PWei normalcase hashState | 58.080 ms/op | 33.990 ms/op | 1.71 |
altair processBlock - 250000 vs - 7PWei worstcase | 64.078 ms/op | 41.465 ms/op | 1.55 |
altair processBlock - 250000 vs - 7PWei worstcase hashState | 140.74 ms/op | 87.142 ms/op | 1.62 |
phase0 processBlock - 250000 vs - 7PWei normalcase | 3.9714 ms/op | 2.5004 ms/op | 1.59 |
phase0 processBlock - 250000 vs - 7PWei worstcase | 40.877 ms/op | 24.714 ms/op | 1.65 |
altair processEth1Data - 250000 vs - 7PWei normalcase | 935.40 us/op | 347.28 us/op | 2.69 |
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 | 17.123 us/op | 5.6250 us/op | 3.04 |
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 | 76.031 us/op | 35.285 us/op | 2.15 |
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 | 26.828 us/op | 12.647 us/op | 2.12 |
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 | 17.884 us/op | 10.065 us/op | 1.78 |
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 | 292.08 us/op | 143.92 us/op | 2.03 |
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 | 3.9863 ms/op | 1.8403 ms/op | 2.17 |
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 | 5.6367 ms/op | 2.4158 ms/op | 2.33 |
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 | 5.4233 ms/op | 2.3777 ms/op | 2.28 |
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 | 10.693 ms/op | 4.6069 ms/op | 2.32 |
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 | 5.8785 ms/op | 2.4458 ms/op | 2.40 |
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 | 10.892 ms/op | 4.7226 ms/op | 2.31 |
Tree 40 250000 create | 1.0666 s/op | 434.17 ms/op | 2.46 |
Tree 40 250000 get(125000) | 169.83 ns/op | 145.98 ns/op | 1.16 |
Tree 40 250000 set(125000) | 4.2725 us/op | 1.5156 us/op | 2.82 |
Tree 40 250000 toArray() | 48.170 ms/op | 17.959 ms/op | 2.68 |
Tree 40 250000 iterate all - toArray() + loop | 42.152 ms/op | 15.655 ms/op | 2.69 |
Tree 40 250000 iterate all - get(i) | 133.75 ms/op | 52.786 ms/op | 2.53 |
Array 250000 create | 4.3803 ms/op | 3.1955 ms/op | 1.37 |
Array 250000 clone - spread | 7.0065 ms/op | 1.6214 ms/op | 4.32 |
Array 250000 get(125000) | 0.83900 ns/op | 0.42200 ns/op | 1.99 |
Array 250000 set(125000) | 0.82500 ns/op | 0.43700 ns/op | 1.89 |
Array 250000 iterate all - loop | 121.73 us/op | 106.26 us/op | 1.15 |
phase0 afterProcessEpoch - 250000 vs - 7PWei | 56.915 ms/op | 42.644 ms/op | 1.33 |
Array.fill - length 1000000 | 11.721 ms/op | 3.7047 ms/op | 3.16 |
Array push - length 1000000 | 31.588 ms/op | 13.406 ms/op | 2.36 |
Array.get | 0.32909 ns/op | 0.28208 ns/op | 1.17 |
Uint8Array.get | 0.51010 ns/op | 0.44912 ns/op | 1.14 |
phase0 beforeProcessEpoch - 250000 vs - 7PWei | 39.508 ms/op | 16.713 ms/op | 2.36 |
altair processEpoch - mainnet_e81889 | 455.92 ms/op | 268.31 ms/op | 1.70 |
mainnet_e81889 - altair beforeProcessEpoch | 26.834 ms/op | 16.873 ms/op | 1.59 |
mainnet_e81889 - altair processJustificationAndFinalization | 10.558 us/op | 8.4900 us/op | 1.24 |
mainnet_e81889 - altair processInactivityUpdates | 10.303 ms/op | 4.3143 ms/op | 2.39 |
mainnet_e81889 - altair processRewardsAndPenalties | 57.268 ms/op | 36.453 ms/op | 1.57 |
mainnet_e81889 - altair processRegistryUpdates | 1.2460 us/op | 719.00 ns/op | 1.73 |
mainnet_e81889 - altair processSlashings | 344.00 ns/op | 189.00 ns/op | 1.82 |
mainnet_e81889 - altair processEth1DataReset | 374.00 ns/op | 193.00 ns/op | 1.94 |
mainnet_e81889 - altair processEffectiveBalanceUpdates | 1.5701 ms/op | 1.2079 ms/op | 1.30 |
mainnet_e81889 - altair processSlashingsReset | 1.1330 us/op | 1.2160 us/op | 0.93 |
mainnet_e81889 - altair processRandaoMixesReset | 3.6660 us/op | 1.1850 us/op | 3.09 |
mainnet_e81889 - altair processHistoricalRootsUpdate | 315.00 ns/op | 180.00 ns/op | 1.75 |
mainnet_e81889 - altair processParticipationFlagUpdates | 974.00 ns/op | 726.00 ns/op | 1.34 |
mainnet_e81889 - altair processSyncCommitteeUpdates | 256.00 ns/op | 142.00 ns/op | 1.80 |
mainnet_e81889 - altair afterProcessEpoch | 53.174 ms/op | 44.768 ms/op | 1.19 |
capella processEpoch - mainnet_e217614 | 1.6678 s/op | 987.68 ms/op | 1.69 |
mainnet_e217614 - capella beforeProcessEpoch | 90.866 ms/op | 65.911 ms/op | 1.38 |
mainnet_e217614 - capella processJustificationAndFinalization | 13.534 us/op | 6.2210 us/op | 2.18 |
mainnet_e217614 - capella processInactivityUpdates | 32.434 ms/op | 15.492 ms/op | 2.09 |
mainnet_e217614 - capella processRewardsAndPenalties | 317.90 ms/op | 198.51 ms/op | 1.60 |
mainnet_e217614 - capella processRegistryUpdates | 13.333 us/op | 7.8060 us/op | 1.71 |
mainnet_e217614 - capella processSlashings | 441.00 ns/op | 194.00 ns/op | 2.27 |
mainnet_e217614 - capella processEth1DataReset | 416.00 ns/op | 197.00 ns/op | 2.11 |
mainnet_e217614 - capella processEffectiveBalanceUpdates | 8.5146 ms/op | 12.667 ms/op | 0.67 |
mainnet_e217614 - capella processSlashingsReset | 2.0900 us/op | 1.1450 us/op | 1.83 |
mainnet_e217614 - capella processRandaoMixesReset | 2.0960 us/op | 1.3290 us/op | 1.58 |
mainnet_e217614 - capella processHistoricalRootsUpdate | 359.00 ns/op | 207.00 ns/op | 1.73 |
mainnet_e217614 - capella processParticipationFlagUpdates | 1.1080 us/op | 597.00 ns/op | 1.86 |
mainnet_e217614 - capella afterProcessEpoch | 135.81 ms/op | 123.15 ms/op | 1.10 |
phase0 processEpoch - mainnet_e58758 | 419.48 ms/op | 323.84 ms/op | 1.30 |
mainnet_e58758 - phase0 beforeProcessEpoch | 125.72 ms/op | 87.743 ms/op | 1.43 |
mainnet_e58758 - phase0 processJustificationAndFinalization | 6.7140 us/op | 6.0800 us/op | 1.10 |
mainnet_e58758 - phase0 processRewardsAndPenalties | 50.417 ms/op | 47.432 ms/op | 1.06 |
mainnet_e58758 - phase0 processRegistryUpdates | 3.6870 us/op | 3.4450 us/op | 1.07 |
mainnet_e58758 - phase0 processSlashings | 215.00 ns/op | 191.00 ns/op | 1.13 |
mainnet_e58758 - phase0 processEth1DataReset | 213.00 ns/op | 183.00 ns/op | 1.16 |
mainnet_e58758 - phase0 processEffectiveBalanceUpdates | 6.0122 ms/op | 1.2529 ms/op | 4.80 |
mainnet_e58758 - phase0 processSlashingsReset | 1.4560 us/op | 994.00 ns/op | 1.46 |
mainnet_e58758 - phase0 processRandaoMixesReset | 1.5000 us/op | 1.2900 us/op | 1.16 |
mainnet_e58758 - phase0 processHistoricalRootsUpdate | 314.00 ns/op | 186.00 ns/op | 1.69 |
mainnet_e58758 - phase0 processParticipationRecordUpdates | 1.8610 us/op | 930.00 ns/op | 2.00 |
mainnet_e58758 - phase0 afterProcessEpoch | 42.716 ms/op | 36.681 ms/op | 1.16 |
phase0 processEffectiveBalanceUpdates - 250000 normalcase | 2.7740 ms/op | 2.0786 ms/op | 1.33 |
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 | 4.6776 ms/op | 1.9285 ms/op | 2.43 |
altair processInactivityUpdates - 250000 normalcase | 27.486 ms/op | 23.207 ms/op | 1.18 |
altair processInactivityUpdates - 250000 worstcase | 21.263 ms/op | 22.532 ms/op | 0.94 |
phase0 processRegistryUpdates - 250000 normalcase | 13.644 us/op | 6.6840 us/op | 2.04 |
phase0 processRegistryUpdates - 250000 badcase_full_deposits | 303.92 us/op | 442.83 us/op | 0.69 |
phase0 processRegistryUpdates - 250000 worstcase 0.5 | 138.62 ms/op | 115.31 ms/op | 1.20 |
altair processRewardsAndPenalties - 250000 normalcase | 35.628 ms/op | 30.355 ms/op | 1.17 |
altair processRewardsAndPenalties - 250000 worstcase | 40.211 ms/op | 35.201 ms/op | 1.14 |
phase0 getAttestationDeltas - 250000 normalcase | 16.646 ms/op | 6.2561 ms/op | 2.66 |
phase0 getAttestationDeltas - 250000 worstcase | 10.106 ms/op | 6.2566 ms/op | 1.62 |
phase0 processSlashings - 250000 worstcase | 111.78 us/op | 113.50 us/op | 0.98 |
altair processSyncCommitteeUpdates - 250000 | 15.846 ms/op | 11.605 ms/op | 1.37 |
BeaconState.hashTreeRoot - No change | 392.00 ns/op | 282.00 ns/op | 1.39 |
BeaconState.hashTreeRoot - 1 full validator | 117.72 us/op | 79.193 us/op | 1.49 |
BeaconState.hashTreeRoot - 32 full validator | 1.2636 ms/op | 936.46 us/op | 1.35 |
BeaconState.hashTreeRoot - 512 full validator | 17.570 ms/op | 15.390 ms/op | 1.14 |
BeaconState.hashTreeRoot - 1 validator.effectiveBalance | 166.04 us/op | 113.91 us/op | 1.46 |
BeaconState.hashTreeRoot - 32 validator.effectiveBalance | 2.3836 ms/op | 1.6997 ms/op | 1.40 |
BeaconState.hashTreeRoot - 512 validator.effectiveBalance | 40.616 ms/op | 21.352 ms/op | 1.90 |
BeaconState.hashTreeRoot - 1 balances | 101.60 us/op | 77.269 us/op | 1.31 |
BeaconState.hashTreeRoot - 32 balances | 1.2927 ms/op | 919.36 us/op | 1.41 |
BeaconState.hashTreeRoot - 512 balances | 11.029 ms/op | 7.9227 ms/op | 1.39 |
BeaconState.hashTreeRoot - 250000 balances | 239.76 ms/op | 167.20 ms/op | 1.43 |
aggregationBits - 2048 els - zipIndexesInBitList | 27.596 us/op | 23.758 us/op | 1.16 |
byteArrayEquals 32 | 62.737 ns/op | 57.849 ns/op | 1.08 |
Buffer.compare 32 | 20.148 ns/op | 19.084 ns/op | 1.06 |
byteArrayEquals 1024 | 1.8672 us/op | 1.7055 us/op | 1.09 |
Buffer.compare 1024 | 32.700 ns/op | 27.968 ns/op | 1.17 |
byteArrayEquals 16384 | 30.595 us/op | 26.990 us/op | 1.13 |
Buffer.compare 16384 | 214.83 ns/op | 228.74 ns/op | 0.94 |
byteArrayEquals 123687377 | 230.20 ms/op | 202.32 ms/op | 1.14 |
Buffer.compare 123687377 | 12.459 ms/op | 7.8139 ms/op | 1.59 |
byteArrayEquals 32 - diff last byte | 60.649 ns/op | 55.648 ns/op | 1.09 |
Buffer.compare 32 - diff last byte | 20.410 ns/op | 18.327 ns/op | 1.11 |
byteArrayEquals 1024 - diff last byte | 1.8074 us/op | 1.6687 us/op | 1.08 |
Buffer.compare 1024 - diff last byte | 30.195 ns/op | 27.580 ns/op | 1.09 |
byteArrayEquals 16384 - diff last byte | 29.603 us/op | 26.533 us/op | 1.12 |
Buffer.compare 16384 - diff last byte | 219.66 ns/op | 214.18 ns/op | 1.03 |
byteArrayEquals 123687377 - diff last byte | 217.97 ms/op | 201.18 ms/op | 1.08 |
Buffer.compare 123687377 - diff last byte | 9.1832 ms/op | 7.6169 ms/op | 1.21 |
byteArrayEquals 32 - random bytes | 6.1050 ns/op | 5.4050 ns/op | 1.13 |
Buffer.compare 32 - random bytes | 19.126 ns/op | 17.872 ns/op | 1.07 |
byteArrayEquals 1024 - random bytes | 5.7290 ns/op | 5.3590 ns/op | 1.07 |
Buffer.compare 1024 - random bytes | 18.673 ns/op | 17.855 ns/op | 1.05 |
byteArrayEquals 16384 - random bytes | 5.7110 ns/op | 5.3740 ns/op | 1.06 |
Buffer.compare 16384 - random bytes | 19.400 ns/op | 17.864 ns/op | 1.09 |
byteArrayEquals 123687377 - random bytes | 7.3400 ns/op | 7.5700 ns/op | 0.97 |
Buffer.compare 123687377 - random bytes | 21.860 ns/op | 20.710 ns/op | 1.06 |
regular array get 100000 times | 39.495 us/op | 34.993 us/op | 1.13 |
wrappedArray get 100000 times | 39.052 us/op | 34.917 us/op | 1.12 |
arrayWithProxy get 100000 times | 16.193 ms/op | 12.669 ms/op | 1.28 |
ssz.Root.equals | 56.298 ns/op | 48.650 ns/op | 1.16 |
byteArrayEquals | 51.604 ns/op | 47.546 ns/op | 1.09 |
Buffer.compare | 11.777 ns/op | 10.797 ns/op | 1.09 |
processSlot - 1 slots | 11.299 us/op | 13.221 us/op | 0.85 |
processSlot - 32 slots | 2.4304 ms/op | 2.5074 ms/op | 0.97 |
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei | 3.4873 ms/op | 3.5942 ms/op | 0.97 |
getCommitteeAssignments - req 1 vs - 250000 vc | 2.2675 ms/op | 2.2277 ms/op | 1.02 |
getCommitteeAssignments - req 100 vs - 250000 vc | 4.3589 ms/op | 4.3265 ms/op | 1.01 |
getCommitteeAssignments - req 1000 vs - 250000 vc | 4.6492 ms/op | 4.6500 ms/op | 1.00 |
findModifiedValidators - 10000 modified validators | 731.17 ms/op | 815.26 ms/op | 0.90 |
findModifiedValidators - 1000 modified validators | 728.05 ms/op | 748.85 ms/op | 0.97 |
findModifiedValidators - 100 modified validators | 222.75 ms/op | 292.12 ms/op | 0.76 |
findModifiedValidators - 10 modified validators | 195.86 ms/op | 155.08 ms/op | 1.26 |
findModifiedValidators - 1 modified validators | 174.72 ms/op | 166.88 ms/op | 1.05 |
findModifiedValidators - no difference | 156.68 ms/op | 221.30 ms/op | 0.71 |
compare ViewDUs | 6.7920 s/op | 7.0604 s/op | 0.96 |
compare each validator Uint8Array | 1.6896 s/op | 1.7758 s/op | 0.95 |
compare ViewDU to Uint8Array | 1.2149 s/op | 1.8616 s/op | 0.65 |
migrate state 1000000 validators, 24 modified, 0 new | 946.86 ms/op | 1.3016 s/op | 0.73 |
migrate state 1000000 validators, 1700 modified, 1000 new | 1.2729 s/op | 1.7404 s/op | 0.73 |
migrate state 1000000 validators, 3400 modified, 2000 new | 1.4740 s/op | 1.7966 s/op | 0.82 |
migrate state 1500000 validators, 24 modified, 0 new | 896.43 ms/op | 1.0733 s/op | 0.84 |
migrate state 1500000 validators, 1700 modified, 1000 new | 1.1328 s/op | 1.1817 s/op | 0.96 |
migrate state 1500000 validators, 3400 modified, 2000 new | 1.4508 s/op | 1.3137 s/op | 1.10 |
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei | 4.8600 ns/op | 5.3300 ns/op | 0.91 |
state getBlockRootAtSlot - 250000 vs - 7PWei | 549.49 ns/op | 621.73 ns/op | 0.88 |
naive computeProposerIndex 100000 validators | 62.671 ms/op | 65.965 ms/op | 0.95 |
computeProposerIndex 100000 validators | 1.5592 ms/op | 1.6661 ms/op | 0.94 |
naiveGetNextSyncCommitteeIndices 1000 validators | 8.0725 s/op | 8.1893 s/op | 0.99 |
getNextSyncCommitteeIndices 1000 validators | 114.65 ms/op | 140.48 ms/op | 0.82 |
naiveGetNextSyncCommitteeIndices 10000 validators | 8.3189 s/op | 9.7746 s/op | 0.85 |
getNextSyncCommitteeIndices 10000 validators | 124.30 ms/op | 129.38 ms/op | 0.96 |
naiveGetNextSyncCommitteeIndices 100000 validators | 10.375 s/op | 7.6039 s/op | 1.36 |
getNextSyncCommitteeIndices 100000 validators | 156.19 ms/op | 116.27 ms/op | 1.34 |
naive computeShuffledIndex 100000 validators | 36.658 s/op | 22.097 s/op | 1.66 |
cached computeShuffledIndex 100000 validators | 988.02 ms/op | 568.30 ms/op | 1.74 |
naive computeShuffledIndex 2000000 validators | 705.99 s/op | 494.71 s/op | 1.43 |
cached computeShuffledIndex 2000000 validators | 29.950 s/op | 31.878 s/op | 0.94 |
computeProposers - vc 250000 | 626.93 us/op | 630.04 us/op | 1.00 |
computeEpochShuffling - vc 250000 | 42.563 ms/op | 42.299 ms/op | 1.01 |
getNextSyncCommittee - vc 250000 | 10.628 ms/op | 10.599 ms/op | 1.00 |
computeSigningRoot for AttestationData | 20.270 us/op | 19.173 us/op | 1.06 |
hash AttestationData serialized data then Buffer.toString(base64) | 1.5868 us/op | 1.6002 us/op | 0.99 |
toHexString serialized data | 1.1727 us/op | 1.1569 us/op | 1.01 |
Buffer.toString(base64) | 148.83 ns/op | 157.12 ns/op | 0.95 |
nodejs block root to RootHex using toHex | 147.45 ns/op | 151.10 ns/op | 0.98 |
nodejs block root to RootHex using toRootHex | 87.549 ns/op | 99.563 ns/op | 0.88 |
nodejs fromhex(blob) | 113.54 ms/op | 114.65 ms/op | 0.99 |
nodejs fromHexInto(blob) | 96.988 ms/op | 97.271 ms/op | 1.00 |
browser block root to RootHex using the deprecated toHexString | 213.90 ns/op | 213.77 ns/op | 1.00 |
browser block root to RootHex using toHex | 174.98 ns/op | 173.27 ns/op | 1.01 |
browser block root to RootHex using toRootHex | 162.25 ns/op | 162.15 ns/op | 1.00 |
browser fromHexInto(blob) | 810.80 us/op | 830.16 us/op | 0.98 |
browser fromHex(blob) | 785.35 ms/op | 795.25 ms/op | 0.99 |
by benchmarkbot/action
where is there a schema definition for conditional exports that includes "types"? Or which versions of typescript support this? the link in the description doesn't show it |
@wemeetagain It was introduced in Typescript 4.7 and we are currently using 5.9 |
3bd6a56
to
8793ff6
Compare
merge conflicts |
Motivation
Make the types exports consistent for all packages.
All modern runtimes support conditional exports and there are caveats when we have both conditional exports and normal exports present in a package.json. This PR tend to make all exports follow same consistent and modern pattern.
Description
typesVersions
, this is useful only if we have different version of types for different versions of Typescript. Or having different types files for different file paths.Steps to test or reproduce