Skip to content
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

ci: assert eslintrc rules are sorted #5567

Merged
merged 1 commit into from
May 30, 2023
Merged

Conversation

dapplion
Copy link
Contributor

Motivation

Description

Add CI step to ensure eslintrc rules are sorted

@dapplion dapplion requested a review from a team as a code owner May 29, 2023 10:35
@dapplion dapplion changed the title Assert eslintrc is rules are sorted chore: assert eslintrc is rules are sorted May 29, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 29, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d4065e6 Previous: 1cecf82 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 536.79 us/op 527.88 us/op 1.02
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 47.059 us/op 46.387 us/op 1.01
BLS verify - blst-native 1.2336 ms/op 1.2198 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 2.5185 ms/op 2.5180 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 5.3894 ms/op 5.3238 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 19.622 ms/op 19.248 ms/op 1.02
BLS aggregatePubkeys 32 - blst-native 25.883 us/op 25.836 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 101.39 us/op 100.40 us/op 1.01
getAttestationsForBlock 59.242 ms/op 60.302 ms/op 0.98
isKnown best case - 1 super set check 269.00 ns/op 261.00 ns/op 1.03
isKnown normal case - 2 super set checks 266.00 ns/op 262.00 ns/op 1.02
isKnown worse case - 16 super set checks 258.00 ns/op 263.00 ns/op 0.98
CheckpointStateCache - add get delete 5.2380 us/op 5.5670 us/op 0.94
validate gossip signedAggregateAndProof - struct 2.7535 ms/op 2.7973 ms/op 0.98
validate gossip attestation - struct 1.3220 ms/op 1.3217 ms/op 1.00
pickEth1Vote - no votes 1.2698 ms/op 1.2633 ms/op 1.01
pickEth1Vote - max votes 9.7870 ms/op 10.380 ms/op 0.94
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.9012 ms/op 8.9253 ms/op 1.00
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 15.154 ms/op 13.990 ms/op 1.08
pickEth1Vote - Eth1Data fastSerialize value x2048 619.39 us/op 653.17 us/op 0.95
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.7834 ms/op 4.6080 ms/op 1.26
bytes32 toHexString 489.00 ns/op 484.00 ns/op 1.01
bytes32 Buffer.toString(hex) 355.00 ns/op 347.00 ns/op 1.02
bytes32 Buffer.toString(hex) from Uint8Array 572.00 ns/op 588.00 ns/op 0.97
bytes32 Buffer.toString(hex) + 0x 345.00 ns/op 350.00 ns/op 0.99
Object access 1 prop 0.16600 ns/op 0.17000 ns/op 0.98
Map access 1 prop 0.15600 ns/op 0.16200 ns/op 0.96
Object get x1000 6.6070 ns/op 6.5590 ns/op 1.01
Map get x1000 0.63500 ns/op 0.57600 ns/op 1.10
Object set x1000 53.787 ns/op 53.246 ns/op 1.01
Map set x1000 45.168 ns/op 44.996 ns/op 1.00
Return object 10000 times 0.23850 ns/op 0.23570 ns/op 1.01
Throw Error 10000 times 4.2258 us/op 4.2501 us/op 0.99
fastMsgIdFn sha256 / 200 bytes 3.4410 us/op 3.5790 us/op 0.96
fastMsgIdFn h32 xxhash / 200 bytes 282.00 ns/op 290.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 200 bytes 394.00 ns/op 418.00 ns/op 0.94
fastMsgIdFn sha256 / 1000 bytes 11.640 us/op 11.772 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 402.00 ns/op 425.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 1000 bytes 462.00 ns/op 501.00 ns/op 0.92
fastMsgIdFn sha256 / 10000 bytes 104.96 us/op 104.97 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 1.9640 us/op 1.9790 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 1.3870 us/op 1.4330 us/op 0.97
enrSubnets - fastDeserialize 64 bits 1.3160 us/op 1.3700 us/op 0.96
enrSubnets - ssz BitVector 64 bits 490.00 ns/op 517.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 170.00 ns/op 183.00 ns/op 0.93
enrSubnets - ssz BitVector 4 bits 494.00 ns/op 533.00 ns/op 0.93
prioritizePeers score -10:0 att 32-0.1 sync 2-0 102.50 us/op 110.38 us/op 0.93
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 136.31 us/op 153.58 us/op 0.89
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 170.24 us/op 167.73 us/op 1.01
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 317.21 us/op 296.97 us/op 1.07
prioritizePeers score 0:0 att 64-1 sync 4-1 374.29 us/op 357.62 us/op 1.05
array of 16000 items push then shift 1.6168 us/op 1.6407 us/op 0.99
LinkedList of 16000 items push then shift 8.8200 ns/op 9.0360 ns/op 0.98
array of 16000 items push then pop 86.796 ns/op 74.481 ns/op 1.17
LinkedList of 16000 items push then pop 8.8110 ns/op 8.6560 ns/op 1.02
array of 24000 items push then shift 2.4183 us/op 2.4098 us/op 1.00
LinkedList of 24000 items push then shift 9.3170 ns/op 8.8380 ns/op 1.05
array of 24000 items push then pop 83.076 ns/op 83.923 ns/op 0.99
LinkedList of 24000 items push then pop 8.9920 ns/op 8.5710 ns/op 1.05
intersect bitArray bitLen 8 13.604 ns/op 13.554 ns/op 1.00
intersect array and set length 8 92.097 ns/op 76.671 ns/op 1.20
intersect bitArray bitLen 128 46.597 ns/op 44.196 ns/op 1.05
intersect array and set length 128 1.1917 us/op 1.0684 us/op 1.12
Buffer.concat 32 items 3.1630 us/op 2.6830 us/op 1.18
Uint8Array.set 32 items 2.3290 us/op 3.0270 us/op 0.77
pass gossip attestations to forkchoice per slot 2.9418 ms/op 2.7661 ms/op 1.06
computeDeltas 3.3423 ms/op 3.2522 ms/op 1.03
computeProposerBoostScoreFromBalances 1.8433 ms/op 1.8403 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 3.5256 ms/op 3.2936 ms/op 1.07
altair processAttestation - 250000 vs - 7PWei worstcase 4.8989 ms/op 3.7288 ms/op 1.31
altair processAttestation - setStatus - 1/6 committees join 147.51 us/op 145.88 us/op 1.01
altair processAttestation - setStatus - 1/3 committees join 292.95 us/op 290.21 us/op 1.01
altair processAttestation - setStatus - 1/2 committees join 389.44 us/op 377.34 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 473.86 us/op 482.74 us/op 0.98
altair processAttestation - setStatus - 4/5 committees join 654.10 us/op 699.23 us/op 0.94
altair processAttestation - setStatus - 100% committees join 762.46 us/op 790.93 us/op 0.96
altair processBlock - 250000 vs - 7PWei normalcase 17.233 ms/op 22.016 ms/op 0.78
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.693 ms/op 29.283 ms/op 0.88
altair processBlock - 250000 vs - 7PWei worstcase 48.710 ms/op 60.539 ms/op 0.80
altair processBlock - 250000 vs - 7PWei worstcase hashState 73.070 ms/op 71.890 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0766 ms/op 2.4845 ms/op 0.84
phase0 processBlock - 250000 vs - 7PWei worstcase 28.986 ms/op 32.446 ms/op 0.89
altair processEth1Data - 250000 vs - 7PWei normalcase 482.91 us/op 656.86 us/op 0.74
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.8610 us/op 7.7940 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 24.915 us/op 31.844 us/op 0.78
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 12.858 us/op 13.115 us/op 0.98
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.8360 us/op 9.9410 us/op 0.79
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 100.19 us/op 114.08 us/op 0.88
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 652.84 us/op 686.01 us/op 0.95
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 918.93 us/op 947.63 us/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 882.56 us/op 926.64 us/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3357 ms/op 2.4653 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.7517 ms/op 1.5660 ms/op 1.12
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0163 ms/op 4.0356 ms/op 1.00
Tree 40 250000 create 325.99 ms/op 374.85 ms/op 0.87
Tree 40 250000 get(125000) 197.96 ns/op 192.92 ns/op 1.03
Tree 40 250000 set(125000) 1.2614 us/op 954.19 ns/op 1.32
Tree 40 250000 toArray() 22.682 ms/op 21.142 ms/op 1.07
Tree 40 250000 iterate all - toArray() + loop 24.509 ms/op 22.311 ms/op 1.10
Tree 40 250000 iterate all - get(i) 89.667 ms/op 75.921 ms/op 1.18
MutableVector 250000 create 14.539 ms/op 11.731 ms/op 1.24
MutableVector 250000 get(125000) 6.7380 ns/op 6.7250 ns/op 1.00
MutableVector 250000 set(125000) 253.48 ns/op 310.12 ns/op 0.82
MutableVector 250000 toArray() 3.1974 ms/op 4.0316 ms/op 0.79
MutableVector 250000 iterate all - toArray() + loop 3.2348 ms/op 4.4189 ms/op 0.73
MutableVector 250000 iterate all - get(i) 1.5360 ms/op 1.5958 ms/op 0.96
Array 250000 create 2.9529 ms/op 3.6144 ms/op 0.82
Array 250000 clone - spread 1.1782 ms/op 1.2008 ms/op 0.98
Array 250000 get(125000) 0.54500 ns/op 0.56700 ns/op 0.96
Array 250000 set(125000) 0.63300 ns/op 0.65400 ns/op 0.97
Array 250000 iterate all - loop 83.616 us/op 108.06 us/op 0.77
effectiveBalanceIncrements clone Uint8Array 300000 28.739 us/op 32.739 us/op 0.88
effectiveBalanceIncrements clone MutableVector 300000 341.00 ns/op 329.00 ns/op 1.04
effectiveBalanceIncrements rw all Uint8Array 300000 170.10 us/op 166.81 us/op 1.02
effectiveBalanceIncrements rw all MutableVector 300000 81.760 ms/op 76.716 ms/op 1.07
phase0 afterProcessEpoch - 250000 vs - 7PWei 115.64 ms/op 113.12 ms/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 42.723 ms/op 39.610 ms/op 1.08
altair processEpoch - mainnet_e81889 306.45 ms/op 303.91 ms/op 1.01
mainnet_e81889 - altair beforeProcessEpoch 54.301 ms/op 63.285 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 19.353 us/op 17.775 us/op 1.09
mainnet_e81889 - altair processInactivityUpdates 6.3964 ms/op 6.3278 ms/op 1.01
mainnet_e81889 - altair processRewardsAndPenalties 54.266 ms/op 67.978 ms/op 0.80
mainnet_e81889 - altair processRegistryUpdates 2.5110 us/op 2.6890 us/op 0.93
mainnet_e81889 - altair processSlashings 543.00 ns/op 669.00 ns/op 0.81
mainnet_e81889 - altair processEth1DataReset 671.00 ns/op 663.00 ns/op 1.01
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2575 ms/op 1.2537 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 4.6910 us/op 4.1390 us/op 1.13
mainnet_e81889 - altair processRandaoMixesReset 4.5580 us/op 10.178 us/op 0.45
mainnet_e81889 - altair processHistoricalRootsUpdate 555.00 ns/op 1.1180 us/op 0.50
mainnet_e81889 - altair processParticipationFlagUpdates 2.9200 us/op 2.3930 us/op 1.22
mainnet_e81889 - altair processSyncCommitteeUpdates 703.00 ns/op 609.00 ns/op 1.15
mainnet_e81889 - altair afterProcessEpoch 128.73 ms/op 129.34 ms/op 1.00
phase0 processEpoch - mainnet_e58758 360.76 ms/op 354.47 ms/op 1.02
mainnet_e58758 - phase0 beforeProcessEpoch 141.70 ms/op 134.65 ms/op 1.05
mainnet_e58758 - phase0 processJustificationAndFinalization 16.299 us/op 15.347 us/op 1.06
mainnet_e58758 - phase0 processRewardsAndPenalties 60.626 ms/op 63.828 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 7.8670 us/op 9.1120 us/op 0.86
mainnet_e58758 - phase0 processSlashings 615.00 ns/op 503.00 ns/op 1.22
mainnet_e58758 - phase0 processEth1DataReset 466.00 ns/op 529.00 ns/op 0.88
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0081 ms/op 1.0018 ms/op 1.01
mainnet_e58758 - phase0 processSlashingsReset 4.2700 us/op 4.5960 us/op 0.93
mainnet_e58758 - phase0 processRandaoMixesReset 4.3750 us/op 4.5750 us/op 0.96
mainnet_e58758 - phase0 processHistoricalRootsUpdate 671.00 ns/op 547.00 ns/op 1.23
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.5290 us/op 3.9710 us/op 1.14
mainnet_e58758 - phase0 afterProcessEpoch 100.85 ms/op 99.189 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2861 ms/op 1.2451 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5732 ms/op 1.6076 ms/op 0.98
altair processInactivityUpdates - 250000 normalcase 24.331 ms/op 26.365 ms/op 0.92
altair processInactivityUpdates - 250000 worstcase 23.856 ms/op 19.785 ms/op 1.21
phase0 processRegistryUpdates - 250000 normalcase 7.4290 us/op 7.0350 us/op 1.06
phase0 processRegistryUpdates - 250000 badcase_full_deposits 268.47 us/op 266.38 us/op 1.01
phase0 processRegistryUpdates - 250000 worstcase 0.5 124.08 ms/op 120.88 ms/op 1.03
altair processRewardsAndPenalties - 250000 normalcase 65.182 ms/op 65.794 ms/op 0.99
altair processRewardsAndPenalties - 250000 worstcase 68.990 ms/op 67.104 ms/op 1.03
phase0 getAttestationDeltas - 250000 normalcase 6.9066 ms/op 7.1058 ms/op 0.97
phase0 getAttestationDeltas - 250000 worstcase 6.7532 ms/op 6.8824 ms/op 0.98
phase0 processSlashings - 250000 worstcase 3.7189 ms/op 3.6186 ms/op 1.03
altair processSyncCommitteeUpdates - 250000 181.14 ms/op 178.86 ms/op 1.01
BeaconState.hashTreeRoot - No change 322.00 ns/op 272.00 ns/op 1.18
BeaconState.hashTreeRoot - 1 full validator 51.532 us/op 53.167 us/op 0.97
BeaconState.hashTreeRoot - 32 full validator 503.20 us/op 489.94 us/op 1.03
BeaconState.hashTreeRoot - 512 full validator 5.4144 ms/op 5.6557 ms/op 0.96
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 62.367 us/op 62.669 us/op 1.00
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 868.53 us/op 908.42 us/op 0.96
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.838 ms/op 11.818 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 50.005 us/op 50.582 us/op 0.99
BeaconState.hashTreeRoot - 32 balances 468.03 us/op 476.05 us/op 0.98
BeaconState.hashTreeRoot - 512 balances 4.5223 ms/op 4.5050 ms/op 1.00
BeaconState.hashTreeRoot - 250000 balances 74.555 ms/op 76.731 ms/op 0.97
aggregationBits - 2048 els - zipIndexesInBitList 16.834 us/op 15.868 us/op 1.06
regular array get 100000 times 33.456 us/op 33.177 us/op 1.01
wrappedArray get 100000 times 33.445 us/op 33.177 us/op 1.01
arrayWithProxy get 100000 times 16.282 ms/op 16.309 ms/op 1.00
ssz.Root.equals 558.00 ns/op 588.00 ns/op 0.95
byteArrayEquals 561.00 ns/op 555.00 ns/op 1.01
shuffle list - 16384 els 6.9714 ms/op 6.8796 ms/op 1.01
shuffle list - 250000 els 101.85 ms/op 100.78 ms/op 1.01
processSlot - 1 slots 9.0280 us/op 8.3440 us/op 1.08
processSlot - 32 slots 1.3500 ms/op 1.3214 ms/op 1.02
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.061 ms/op 36.851 ms/op 0.98
getCommitteeAssignments - req 1 vs - 250000 vc 2.9412 ms/op 2.8520 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 4.2193 ms/op 4.0139 ms/op 1.05
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5370 ms/op 4.3328 ms/op 1.05
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7200 ns/op 4.3000 ns/op 1.10
state getBlockRootAtSlot - 250000 vs - 7PWei 782.61 ns/op 816.89 ns/op 0.96
computeProposers - vc 250000 11.076 ms/op 10.619 ms/op 1.04
computeEpochShuffling - vc 250000 106.04 ms/op 100.61 ms/op 1.05
getNextSyncCommittee - vc 250000 179.45 ms/op 171.73 ms/op 1.04
computeSigningRoot for AttestationData 13.427 us/op 13.220 us/op 1.02
hash AttestationData serialized data then Buffer.toString(base64) 2.5362 us/op 2.4011 us/op 1.06
toHexString serialized data 1.1167 us/op 1.0475 us/op 1.07
Buffer.toString(base64) 316.42 ns/op 310.87 ns/op 1.02

by benchmarkbot/action

Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Just a hint from GPT-4

It's important to note that the order of rules in eslint configurations can matter. For example, if you're using a plugin that extends eslint's functionality and there's a conflict between two rules, the rule that appears last in the configuration will take precedence. So, even if the two configurations have the same rules, if they're in a different order, they might not function identically.

It does not seem to matter in our case as there are no lint errors.

@nflaig nflaig changed the title chore: assert eslintrc is rules are sorted ci: assert eslintrc rules are sorted May 29, 2023
@wemeetagain wemeetagain merged commit abc4b1a into unstable May 30, 2023
@wemeetagain wemeetagain deleted the dapplion/sort-eslintrc branch May 30, 2023 14:19
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.9.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants