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

Create codeql-analysis.yml #3975

Merged
merged 3 commits into from May 5, 2022
Merged

Create codeql-analysis.yml #3975

merged 3 commits into from May 5, 2022

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented May 5, 2022

Motivation

Recommended by Github for code analysis

@dapplion dapplion requested a review from a team as a code owner May 5, 2022 12:27
@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #3975 (4cb5e48) into master (3eeb6e2) will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3975      +/-   ##
==========================================
+ Coverage   37.06%   37.10%   +0.04%     
==========================================
  Files         325      325              
  Lines        9109     9115       +6     
  Branches     1468     1470       +2     
==========================================
+ Hits         3376     3382       +6     
  Misses       5542     5542              
  Partials      191      191              

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: f962726 Previous: 7d78388 Ratio
BeaconState.hashTreeRoot - No change 648.00 ns/op 565.00 ns/op 1.15
BeaconState.hashTreeRoot - 1 full validator 63.486 us/op 62.558 us/op 1.01
BeaconState.hashTreeRoot - 32 full validator 646.48 us/op 593.82 us/op 1.09
BeaconState.hashTreeRoot - 512 full validator 6.7044 ms/op 6.5376 ms/op 1.03
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 84.218 us/op 74.927 us/op 1.12
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1373 ms/op 1.0272 ms/op 1.11
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 14.863 ms/op 14.099 ms/op 1.05
BeaconState.hashTreeRoot - 1 balances 60.777 us/op 57.905 us/op 1.05
BeaconState.hashTreeRoot - 32 balances 563.64 us/op 531.17 us/op 1.06
BeaconState.hashTreeRoot - 512 balances 5.1184 ms/op 5.0664 ms/op 1.01
BeaconState.hashTreeRoot - 250000 balances 114.59 ms/op 106.00 ms/op 1.08
processSlot - 1 slots 13.267 us/op 10.788 us/op 1.23
processSlot - 32 slots 1.8892 ms/op 1.7022 ms/op 1.11
getCommitteeAssignments - req 1 vs - 250000 vc 4.8730 ms/op 5.7377 ms/op 0.85
getCommitteeAssignments - req 100 vs - 250000 vc 6.7835 ms/op 8.0990 ms/op 0.84
getCommitteeAssignments - req 1000 vs - 250000 vc 7.2657 ms/op 8.9318 ms/op 0.81
computeProposers - vc 250000 17.542 ms/op 18.436 ms/op 0.95
computeEpochShuffling - vc 250000 141.19 ms/op 182.63 ms/op 0.77
getNextSyncCommittee - vc 250000 292.11 ms/op 304.64 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei normalcase 4.1380 ms/op 4.3105 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei worstcase 5.5387 ms/op 5.7937 ms/op 0.96
altair processAttestation - setStatus - 1/6 committees join 215.93 us/op 219.59 us/op 0.98
altair processAttestation - setStatus - 1/3 committees join 389.06 us/op 404.79 us/op 0.96
altair processAttestation - setStatus - 1/2 committees join 555.02 us/op 588.66 us/op 0.94
altair processAttestation - setStatus - 2/3 committees join 724.07 us/op 756.83 us/op 0.96
altair processAttestation - setStatus - 4/5 committees join 960.92 us/op 1.0578 ms/op 0.91
altair processAttestation - setStatus - 100% committees join 1.2261 ms/op 1.2015 ms/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase 22.305 ms/op 26.164 ms/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase hashState 37.657 ms/op 36.027 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase 80.980 ms/op 82.000 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase hashState 116.15 ms/op 99.397 ms/op 1.17
altair processEth1Data - 250000 vs - 7PWei normalcase 795.35 us/op 905.56 us/op 0.88
altair processEpoch - mainnet_e81889 559.51 ms/op 572.25 ms/op 0.98
mainnet_e81889 - altair beforeProcessEpoch 111.26 ms/op 151.78 ms/op 0.73
mainnet_e81889 - altair processJustificationAndFinalization 77.201 us/op 39.915 us/op 1.93
mainnet_e81889 - altair processInactivityUpdates 10.677 ms/op 12.482 ms/op 0.86
mainnet_e81889 - altair processRewardsAndPenalties 150.26 ms/op 94.590 ms/op 1.59
mainnet_e81889 - altair processRegistryUpdates 17.544 us/op 10.567 us/op 1.66
mainnet_e81889 - altair processSlashings 7.2270 us/op 3.3780 us/op 2.14
mainnet_e81889 - altair processEth1DataReset 7.1910 us/op 3.1860 us/op 2.26
mainnet_e81889 - altair processEffectiveBalanceUpdates 7.2290 ms/op 7.6855 ms/op 0.94
mainnet_e81889 - altair processSlashingsReset 24.911 us/op 10.642 us/op 2.34
mainnet_e81889 - altair processRandaoMixesReset 30.285 us/op 12.981 us/op 2.33
mainnet_e81889 - altair processHistoricalRootsUpdate 9.7970 us/op 3.5670 us/op 2.75
mainnet_e81889 - altair processParticipationFlagUpdates 16.470 us/op 14.986 us/op 1.10
mainnet_e81889 - altair processSyncCommitteeUpdates 6.3310 us/op 3.0110 us/op 2.10
mainnet_e81889 - altair afterProcessEpoch 181.92 ms/op 242.75 ms/op 0.75
altair processInactivityUpdates - 250000 normalcase 39.992 ms/op 36.892 ms/op 1.08
altair processInactivityUpdates - 250000 worstcase 35.682 ms/op 30.941 ms/op 1.15
altair processRewardsAndPenalties - 250000 normalcase 139.00 ms/op 114.19 ms/op 1.22
altair processRewardsAndPenalties - 250000 worstcase 86.593 ms/op 113.70 ms/op 0.76
altair processSyncCommitteeUpdates - 250000 330.91 ms/op 315.54 ms/op 1.05
Tree 40 250000 create 794.10 ms/op 781.87 ms/op 1.02
Tree 40 250000 get(125000) 321.62 ns/op 330.19 ns/op 0.97
Tree 40 250000 set(125000) 2.5666 us/op 2.5294 us/op 1.01
Tree 40 250000 toArray() 33.764 ms/op 36.777 ms/op 0.92
Tree 40 250000 iterate all - toArray() + loop 35.133 ms/op 37.225 ms/op 0.94
Tree 40 250000 iterate all - get(i) 125.67 ms/op 130.52 ms/op 0.96
MutableVector 250000 create 18.016 ms/op 21.373 ms/op 0.84
MutableVector 250000 get(125000) 13.384 ns/op 18.105 ns/op 0.74
MutableVector 250000 set(125000) 785.70 ns/op 759.32 ns/op 1.03
MutableVector 250000 toArray() 5.7240 ms/op 8.3366 ms/op 0.69
MutableVector 250000 iterate all - toArray() + loop 6.0040 ms/op 8.4130 ms/op 0.71
MutableVector 250000 iterate all - get(i) 3.5106 ms/op 4.1466 ms/op 0.85
Array 250000 create 5.3648 ms/op 7.5249 ms/op 0.71
Array 250000 clone - spread 2.6101 ms/op 3.5252 ms/op 0.74
Array 250000 get(125000) 1.2340 ns/op 1.4930 ns/op 0.83
Array 250000 set(125000) 1.2250 ns/op 1.5150 ns/op 0.81
Array 250000 iterate all - loop 139.52 us/op 198.69 us/op 0.70
effectiveBalanceIncrements clone Uint8Array 300000 171.15 us/op 100.70 us/op 1.70
effectiveBalanceIncrements clone MutableVector 300000 544.00 ns/op 1.0220 us/op 0.53
effectiveBalanceIncrements rw all Uint8Array 300000 189.09 us/op 358.19 us/op 0.53
effectiveBalanceIncrements rw all MutableVector 300000 180.62 ms/op 207.34 ms/op 0.87
aggregationBits - 2048 els - zipIndexesInBitList 24.167 us/op 32.528 us/op 0.74
regular array get 100000 times 55.534 us/op 78.265 us/op 0.71
wrappedArray get 100000 times 55.516 us/op 79.609 us/op 0.70
arrayWithProxy get 100000 times 38.343 ms/op 34.627 ms/op 1.11
ssz.Root.equals 479.00 ns/op 546.00 ns/op 0.88
byteArrayEquals 437.00 ns/op 525.00 ns/op 0.83
phase0 processBlock - 250000 vs - 7PWei normalcase 3.6901 ms/op 4.1946 ms/op 0.88
phase0 processBlock - 250000 vs - 7PWei worstcase 50.374 ms/op 53.246 ms/op 0.95
phase0 afterProcessEpoch - 250000 vs - 7PWei 164.72 ms/op 202.25 ms/op 0.81
phase0 beforeProcessEpoch - 250000 vs - 7PWei 82.634 ms/op 80.941 ms/op 1.02
phase0 processEpoch - mainnet_e58758 539.33 ms/op 585.77 ms/op 0.92
mainnet_e58758 - phase0 beforeProcessEpoch 250.41 ms/op 254.12 ms/op 0.99
mainnet_e58758 - phase0 processJustificationAndFinalization 71.520 us/op 41.753 us/op 1.71
mainnet_e58758 - phase0 processRewardsAndPenalties 125.74 ms/op 145.84 ms/op 0.86
mainnet_e58758 - phase0 processRegistryUpdates 36.276 us/op 21.124 us/op 1.72
mainnet_e58758 - phase0 processSlashings 7.1730 us/op 3.4080 us/op 2.10
mainnet_e58758 - phase0 processEth1DataReset 6.0990 us/op 3.4900 us/op 1.75
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 6.5637 ms/op 6.6354 ms/op 0.99
mainnet_e58758 - phase0 processSlashingsReset 23.016 us/op 11.589 us/op 1.99
mainnet_e58758 - phase0 processRandaoMixesReset 27.914 us/op 12.539 us/op 2.23
mainnet_e58758 - phase0 processHistoricalRootsUpdate 8.0280 us/op 5.2410 us/op 1.53
mainnet_e58758 - phase0 processParticipationRecordUpdates 24.761 us/op 15.425 us/op 1.61
mainnet_e58758 - phase0 afterProcessEpoch 151.02 ms/op 179.54 ms/op 0.84
phase0 processEffectiveBalanceUpdates - 250000 normalcase 6.9599 ms/op 7.3132 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 6.9029 ms/op 8.0808 ms/op 0.85
phase0 processRegistryUpdates - 250000 normalcase 30.986 us/op 14.789 us/op 2.10
phase0 processRegistryUpdates - 250000 badcase_full_deposits 459.44 us/op 529.11 us/op 0.87
phase0 processRegistryUpdates - 250000 worstcase 0.5 221.89 ms/op 242.99 ms/op 0.91
phase0 getAttestationDeltas - 250000 normalcase 13.771 ms/op 17.274 ms/op 0.80
phase0 getAttestationDeltas - 250000 worstcase 13.864 ms/op 17.348 ms/op 0.80
phase0 processSlashings - 250000 worstcase 6.1875 ms/op 6.4251 ms/op 0.96
shuffle list - 16384 els 10.357 ms/op 12.450 ms/op 0.83
shuffle list - 250000 els 141.12 ms/op 180.67 ms/op 0.78
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 392.70 us/op 422.52 us/op 0.93
pass gossip attestations to forkchoice per slot 3.5351 ms/op 4.4262 ms/op 0.80
computeDeltas 3.3978 ms/op 4.1948 ms/op 0.81
computeProposerBoostScoreFromBalances 435.14 us/op 583.91 us/op 0.75
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.3014 ms/op 2.1584 ms/op 1.07
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 77.440 us/op 82.715 us/op 0.94
BLS verify - blst-native 1.9476 ms/op 2.1731 ms/op 0.90
BLS verifyMultipleSignatures 3 - blst-native 4.1161 ms/op 4.3870 ms/op 0.94
BLS verifyMultipleSignatures 8 - blst-native 8.7852 ms/op 9.2702 ms/op 0.95
BLS verifyMultipleSignatures 32 - blst-native 31.235 ms/op 33.649 ms/op 0.93
BLS aggregatePubkeys 32 - blst-native 41.811 us/op 45.022 us/op 0.93
BLS aggregatePubkeys 128 - blst-native 156.64 us/op 174.09 us/op 0.90
getAttestationsForBlock 64.384 ms/op 70.175 ms/op 0.92
CheckpointStateCache - add get delete 13.257 us/op 11.416 us/op 1.16
validate gossip signedAggregateAndProof - struct 4.9144 ms/op 4.7772 ms/op 1.03
validate gossip attestation - struct 2.2900 ms/op 2.3383 ms/op 0.98
pickEth1Vote - no votes 2.3820 ms/op 2.4892 ms/op 0.96
pickEth1Vote - max votes 21.875 ms/op 20.097 ms/op 1.09
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.661 ms/op 11.793 ms/op 1.07
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.943 ms/op 22.021 ms/op 1.00
pickEth1Vote - Eth1Data fastSerialize value x2048 1.7765 ms/op 1.7855 ms/op 0.99
pickEth1Vote - Eth1Data fastSerialize tree x2048 13.422 ms/op 13.357 ms/op 1.00
bytes32 toHexString 1.0200 us/op 1.0530 us/op 0.97
bytes32 Buffer.toString(hex) 632.00 ns/op 777.00 ns/op 0.81
bytes32 Buffer.toString(hex) from Uint8Array 941.00 ns/op 990.00 ns/op 0.95
bytes32 Buffer.toString(hex) + 0x 676.00 ns/op 722.00 ns/op 0.94
Object access 1 prop 0.33800 ns/op 0.36800 ns/op 0.92
Map access 1 prop 0.28500 ns/op 0.33300 ns/op 0.86
Object get x1000 15.525 ns/op 19.029 ns/op 0.82
Map get x1000 0.93200 ns/op 1.1380 ns/op 0.82
Object set x1000 91.939 ns/op 119.28 ns/op 0.77
Map set x1000 69.660 ns/op 72.176 ns/op 0.97
Return object 10000 times 0.42100 ns/op 0.41310 ns/op 1.02
Throw Error 10000 times 6.8896 us/op 6.4503 us/op 1.07
enrSubnets - fastDeserialize 64 bits 3.1150 us/op 2.9750 us/op 1.05
enrSubnets - ssz BitVector 64 bits 858.00 ns/op 882.00 ns/op 0.97
enrSubnets - fastDeserialize 4 bits 430.00 ns/op 447.00 ns/op 0.96
enrSubnets - ssz BitVector 4 bits 936.00 ns/op 806.00 ns/op 1.16
RateTracker 1000000 limit, 1 obj count per request 203.90 ns/op 202.72 ns/op 1.01
RateTracker 1000000 limit, 2 obj count per request 154.02 ns/op 153.81 ns/op 1.00
RateTracker 1000000 limit, 4 obj count per request 121.18 ns/op 127.65 ns/op 0.95
RateTracker 1000000 limit, 8 obj count per request 111.26 ns/op 112.49 ns/op 0.99
RateTracker with prune 3.9870 us/op 4.3350 us/op 0.92
array of 16000 items push then shift 4.6017 us/op 3.6745 us/op 1.25
LinkedList of 16000 items push then shift 16.200 ns/op 19.185 ns/op 0.84
array of 16000 items push then pop 230.35 ns/op 235.49 ns/op 0.98
LinkedList of 16000 items push then pop 14.979 ns/op 17.340 ns/op 0.86
array of 24000 items push then shift 7.0405 us/op 5.1463 us/op 1.37
LinkedList of 24000 items push then shift 18.120 ns/op 20.965 ns/op 0.86
array of 24000 items push then pop 209.12 ns/op 203.04 ns/op 1.03
LinkedList of 24000 items push then pop 15.115 ns/op 18.936 ns/op 0.80

by benchmarkbot/action

return passphrase;
} catch (e) {
console.log(`Imported passphrase ${passphraseFile}, but it's invalid: ${(e as Error).message}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Logging the error is very important, does codeql complain about that too?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll check if the error message does not contain any information regarding the file path. Wanted to be on the safe side by removing it, but I'll confirm and if its safe and include.

Copy link
Contributor

Choose a reason for hiding this comment

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

Updated to Include the error message

…r contain info relateing to location of passphrase file
@wemeetagain wemeetagain merged commit eb8db44 into master May 5, 2022
@wemeetagain wemeetagain deleted the dapplion-patch-1 branch May 5, 2022 19:33
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.

None yet

3 participants