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

Contributing.md doc Update #4289

Merged
merged 1 commit into from Jul 13, 2022
Merged

Conversation

philknows
Copy link
Member

Motivation

The contribution.md doc has been outdated for some time now and we've included some additional points for future contributors to adhere to.

Description

  • Updates Labels Guide (once confirmed with this PR, labels on Github will reflect what is laid out in this updated doc.)
  • Added Pull Request Etiquette
  • Logging verbosity guide
  • Commenting code guidelines
  • Included notes from decisions made on Code Whitespace #1774 + Discussion: unit test stubbing #1523

@philknows philknows requested a review from a team as a code owner July 13, 2022 02:28
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 44d9411 Previous: 6ed5ae0 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.1406 ms/op 1.9148 ms/op 1.12
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 74.833 us/op 51.946 us/op 1.44
BLS verify - blst-native 1.8567 ms/op 1.5646 ms/op 1.19
BLS verifyMultipleSignatures 3 - blst-native 3.7998 ms/op 3.1981 ms/op 1.19
BLS verifyMultipleSignatures 8 - blst-native 8.1882 ms/op 6.9368 ms/op 1.18
BLS verifyMultipleSignatures 32 - blst-native 29.685 ms/op 25.140 ms/op 1.18
BLS aggregatePubkeys 32 - blst-native 39.330 us/op 33.451 us/op 1.18
BLS aggregatePubkeys 128 - blst-native 152.52 us/op 132.09 us/op 1.15
getAttestationsForBlock 44.988 ms/op 34.585 ms/op 1.30
isKnown best case - 1 super set check 369.00 ns/op 353.00 ns/op 1.05
isKnown normal case - 2 super set checks 363.00 ns/op 348.00 ns/op 1.04
isKnown worse case - 16 super set checks 359.00 ns/op 345.00 ns/op 1.04
CheckpointStateCache - add get delete 9.6110 us/op 8.9240 us/op 1.08
validate gossip signedAggregateAndProof - struct 3.7652 ms/op 3.6850 ms/op 1.02
validate gossip attestation - struct 1.7823 ms/op 1.6983 ms/op 1.05
altair verifyImport mainnet_s3766816:31 5.8597 s/op 5.2897 s/op 1.11
pickEth1Vote - no votes 1.9112 ms/op 1.7027 ms/op 1.12
pickEth1Vote - max votes 26.023 ms/op 23.789 ms/op 1.09
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.337 ms/op 11.431 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.312 ms/op 16.421 ms/op 1.36
pickEth1Vote - Eth1Data fastSerialize value x2048 1.4174 ms/op 1.0732 ms/op 1.32
pickEth1Vote - Eth1Data fastSerialize tree x2048 20.499 ms/op 10.161 ms/op 2.02
bytes32 toHexString 1.0140 us/op 700.00 ns/op 1.45
bytes32 Buffer.toString(hex) 638.00 ns/op 541.00 ns/op 1.18
bytes32 Buffer.toString(hex) from Uint8Array 882.00 ns/op 734.00 ns/op 1.20
bytes32 Buffer.toString(hex) + 0x 653.00 ns/op 543.00 ns/op 1.20
Object access 1 prop 0.34800 ns/op 0.26900 ns/op 1.29
Map access 1 prop 0.26200 ns/op 0.22300 ns/op 1.17
Object get x1000 16.118 ns/op 8.9900 ns/op 1.79
Map get x1000 0.88000 ns/op 0.70100 ns/op 1.26
Object set x1000 112.46 ns/op 51.398 ns/op 2.19
Map set x1000 67.360 ns/op 35.713 ns/op 1.89
Return object 10000 times 0.32620 ns/op 0.31410 ns/op 1.04
Throw Error 10000 times 5.2457 us/op 4.2823 us/op 1.22
enrSubnets - fastDeserialize 64 bits 2.4680 us/op 2.0570 us/op 1.20
enrSubnets - ssz BitVector 64 bits 719.00 ns/op 645.00 ns/op 1.11
enrSubnets - fastDeserialize 4 bits 355.00 ns/op 298.00 ns/op 1.19
enrSubnets - ssz BitVector 4 bits 699.00 ns/op 618.00 ns/op 1.13
prioritizePeers score -10:0 att 32-0.1 sync 2-0 85.317 us/op 60.756 us/op 1.40
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 110.27 us/op 83.760 us/op 1.32
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 205.69 us/op 152.97 us/op 1.34
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 448.79 us/op 295.19 us/op 1.52
prioritizePeers score 0:0 att 64-1 sync 4-1 415.54 us/op 298.00 us/op 1.39
RateTracker 1000000 limit, 1 obj count per request 192.40 ns/op 133.06 ns/op 1.45
RateTracker 1000000 limit, 2 obj count per request 155.70 ns/op 97.998 ns/op 1.59
RateTracker 1000000 limit, 4 obj count per request 132.66 ns/op 81.323 ns/op 1.63
RateTracker 1000000 limit, 8 obj count per request 122.24 ns/op 74.347 ns/op 1.64
RateTracker with prune 4.4520 us/op 3.3450 us/op 1.33
array of 16000 items push then shift 2.7311 us/op 36.990 us/op 0.07
LinkedList of 16000 items push then shift 28.303 ns/op 13.926 ns/op 2.03
array of 16000 items push then pop 235.29 ns/op 149.80 ns/op 1.57
LinkedList of 16000 items push then pop 22.145 ns/op 11.731 ns/op 1.89
array of 24000 items push then shift 4.0409 us/op 55.465 us/op 0.07
LinkedList of 24000 items push then shift 28.580 ns/op 18.465 ns/op 1.55
array of 24000 items push then pop 183.13 ns/op 127.31 ns/op 1.44
LinkedList of 24000 items push then pop 21.806 ns/op 13.103 ns/op 1.66
intersect bitArray bitLen 8 10.368 ns/op 7.7860 ns/op 1.33
intersect array and set length 8 159.17 ns/op 110.81 ns/op 1.44
intersect bitArray bitLen 128 54.760 ns/op 41.275 ns/op 1.33
intersect array and set length 128 2.1045 us/op 1.3985 us/op 1.50
pass gossip attestations to forkchoice per slot 6.3284 ms/op 2.3413 ms/op 2.70
computeDeltas 3.6576 ms/op 2.8656 ms/op 1.28
computeProposerBoostScoreFromBalances 812.55 us/op 578.28 us/op 1.41
altair processAttestation - 250000 vs - 7PWei normalcase 4.2296 ms/op 3.0191 ms/op 1.40
altair processAttestation - 250000 vs - 7PWei worstcase 6.4944 ms/op 4.4972 ms/op 1.44
altair processAttestation - setStatus - 1/6 committees join 191.38 us/op 134.28 us/op 1.43
altair processAttestation - setStatus - 1/3 committees join 362.28 us/op 257.61 us/op 1.41
altair processAttestation - setStatus - 1/2 committees join 500.28 us/op 363.55 us/op 1.38
altair processAttestation - setStatus - 2/3 committees join 650.33 us/op 473.82 us/op 1.37
altair processAttestation - setStatus - 4/5 committees join 891.85 us/op 657.92 us/op 1.36
altair processAttestation - setStatus - 100% committees join 1.0588 ms/op 788.15 us/op 1.34
altair processBlock - 250000 vs - 7PWei normalcase 27.258 ms/op 22.096 ms/op 1.23
altair processBlock - 250000 vs - 7PWei normalcase hashState 37.639 ms/op 28.503 ms/op 1.32
altair processBlock - 250000 vs - 7PWei worstcase 74.249 ms/op 65.923 ms/op 1.13
altair processBlock - 250000 vs - 7PWei worstcase hashState 104.42 ms/op 94.593 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei normalcase 3.3940 ms/op 2.7384 ms/op 1.24
phase0 processBlock - 250000 vs - 7PWei worstcase 41.796 ms/op 38.419 ms/op 1.09
altair processEth1Data - 250000 vs - 7PWei normalcase 774.47 us/op 662.97 us/op 1.17
Tree 40 250000 create 816.72 ms/op 624.04 ms/op 1.31
Tree 40 250000 get(125000) 265.19 ns/op 174.32 ns/op 1.52
Tree 40 250000 set(125000) 2.8707 us/op 1.8270 us/op 1.57
Tree 40 250000 toArray() 31.742 ms/op 22.195 ms/op 1.43
Tree 40 250000 iterate all - toArray() + loop 31.949 ms/op 22.482 ms/op 1.42
Tree 40 250000 iterate all - get(i) 103.09 ms/op 87.130 ms/op 1.18
MutableVector 250000 create 17.319 ms/op 11.542 ms/op 1.50
MutableVector 250000 get(125000) 11.569 ns/op 7.6440 ns/op 1.51
MutableVector 250000 set(125000) 625.95 ns/op 482.68 ns/op 1.30
MutableVector 250000 toArray() 6.9002 ms/op 4.5758 ms/op 1.51
MutableVector 250000 iterate all - toArray() + loop 6.7905 ms/op 5.0312 ms/op 1.35
MutableVector 250000 iterate all - get(i) 3.0324 ms/op 1.9110 ms/op 1.59
Array 250000 create 5.9596 ms/op 4.1198 ms/op 1.45
Array 250000 clone - spread 3.7580 ms/op 1.8577 ms/op 2.02
Array 250000 get(125000) 1.4930 ns/op 0.93200 ns/op 1.60
Array 250000 set(125000) 1.4970 ns/op 0.93400 ns/op 1.60
Array 250000 iterate all - loop 148.12 us/op 108.63 us/op 1.36
effectiveBalanceIncrements clone Uint8Array 300000 94.543 us/op 123.98 us/op 0.76
effectiveBalanceIncrements clone MutableVector 300000 1.1500 us/op 514.00 ns/op 2.24
effectiveBalanceIncrements rw all Uint8Array 300000 222.91 us/op 177.19 us/op 1.26
effectiveBalanceIncrements rw all MutableVector 300000 224.69 ms/op 114.35 ms/op 1.96
phase0 afterProcessEpoch - 250000 vs - 7PWei 165.63 ms/op 148.63 ms/op 1.11
phase0 beforeProcessEpoch - 250000 vs - 7PWei 114.16 ms/op 46.696 ms/op 2.44
altair processEpoch - mainnet_e81889 547.85 ms/op 371.04 ms/op 1.48
mainnet_e81889 - altair beforeProcessEpoch 160.84 ms/op 101.87 ms/op 1.58
mainnet_e81889 - altair processJustificationAndFinalization 29.154 us/op 22.473 us/op 1.30
mainnet_e81889 - altair processInactivityUpdates 11.448 ms/op 6.7226 ms/op 1.70
mainnet_e81889 - altair processRewardsAndPenalties 88.400 ms/op 71.741 ms/op 1.23
mainnet_e81889 - altair processRegistryUpdates 5.4300 us/op 4.1590 us/op 1.31
mainnet_e81889 - altair processSlashings 1.2320 us/op 827.00 ns/op 1.49
mainnet_e81889 - altair processEth1DataReset 1.1160 us/op 991.00 ns/op 1.13
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.4645 ms/op 1.4293 ms/op 1.72
mainnet_e81889 - altair processSlashingsReset 8.8570 us/op 4.9210 us/op 1.80
mainnet_e81889 - altair processRandaoMixesReset 7.0010 us/op 6.2280 us/op 1.12
mainnet_e81889 - altair processHistoricalRootsUpdate 1.1740 us/op 931.00 ns/op 1.26
mainnet_e81889 - altair processParticipationFlagUpdates 4.7180 us/op 3.8840 us/op 1.21
mainnet_e81889 - altair processSyncCommitteeUpdates 876.00 ns/op 791.00 ns/op 1.11
mainnet_e81889 - altair afterProcessEpoch 171.67 ms/op 165.96 ms/op 1.03
phase0 processEpoch - mainnet_e58758 507.84 ms/op 391.89 ms/op 1.30
mainnet_e58758 - phase0 beforeProcessEpoch 236.63 ms/op 163.54 ms/op 1.45
mainnet_e58758 - phase0 processJustificationAndFinalization 25.431 us/op 17.582 us/op 1.45
mainnet_e58758 - phase0 processRewardsAndPenalties 130.66 ms/op 63.057 ms/op 2.07
mainnet_e58758 - phase0 processRegistryUpdates 14.043 us/op 7.6600 us/op 1.83
mainnet_e58758 - phase0 processSlashings 1.1420 us/op 841.00 ns/op 1.36
mainnet_e58758 - phase0 processEth1DataReset 1.0510 us/op 872.00 ns/op 1.21
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.8333 ms/op 1.1694 ms/op 1.57
mainnet_e58758 - phase0 processSlashingsReset 6.7940 us/op 5.2000 us/op 1.31
mainnet_e58758 - phase0 processRandaoMixesReset 8.1820 us/op 6.1010 us/op 1.34
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.6310 us/op 890.00 ns/op 1.83
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.6010 us/op 5.5050 us/op 1.20
mainnet_e58758 - phase0 afterProcessEpoch 140.26 ms/op 126.11 ms/op 1.11
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.5713 ms/op 1.4364 ms/op 1.79
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1043 ms/op 1.5832 ms/op 1.33
altair processInactivityUpdates - 250000 normalcase 39.907 ms/op 37.881 ms/op 1.05
altair processInactivityUpdates - 250000 worstcase 49.202 ms/op 30.704 ms/op 1.60
phase0 processRegistryUpdates - 250000 normalcase 8.4390 us/op 9.6090 us/op 0.88
phase0 processRegistryUpdates - 250000 badcase_full_deposits 445.78 us/op 275.81 us/op 1.62
phase0 processRegistryUpdates - 250000 worstcase 0.5 214.71 ms/op 143.52 ms/op 1.50
altair processRewardsAndPenalties - 250000 normalcase 104.48 ms/op 69.337 ms/op 1.51
altair processRewardsAndPenalties - 250000 worstcase 80.925 ms/op 105.70 ms/op 0.77
phase0 getAttestationDeltas - 250000 normalcase 12.223 ms/op 9.2822 ms/op 1.32
phase0 getAttestationDeltas - 250000 worstcase 13.088 ms/op 8.6617 ms/op 1.51
phase0 processSlashings - 250000 worstcase 4.7847 ms/op 3.7107 ms/op 1.29
altair processSyncCommitteeUpdates - 250000 263.50 ms/op 214.77 ms/op 1.23
BeaconState.hashTreeRoot - No change 452.00 ns/op 393.00 ns/op 1.15
BeaconState.hashTreeRoot - 1 full validator 50.506 us/op 48.739 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 479.73 us/op 466.86 us/op 1.03
BeaconState.hashTreeRoot - 512 full validator 5.5079 ms/op 5.1841 ms/op 1.06
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 61.726 us/op 60.800 us/op 1.02
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 923.59 us/op 866.50 us/op 1.07
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.783 ms/op 11.122 ms/op 1.06
BeaconState.hashTreeRoot - 1 balances 48.224 us/op 47.245 us/op 1.02
BeaconState.hashTreeRoot - 32 balances 437.01 us/op 426.19 us/op 1.03
BeaconState.hashTreeRoot - 512 balances 4.0383 ms/op 3.8653 ms/op 1.04
BeaconState.hashTreeRoot - 250000 balances 83.377 ms/op 73.236 ms/op 1.14
aggregationBits - 2048 els - zipIndexesInBitList 30.413 us/op 27.366 us/op 1.11
regular array get 100000 times 59.527 us/op 45.132 us/op 1.32
wrappedArray get 100000 times 59.466 us/op 47.205 us/op 1.26
arrayWithProxy get 100000 times 25.724 ms/op 19.976 ms/op 1.29
ssz.Root.equals 420.00 ns/op 418.00 ns/op 1.00
byteArrayEquals 415.00 ns/op 418.00 ns/op 0.99
shuffle list - 16384 els 9.7786 ms/op 8.3475 ms/op 1.17
shuffle list - 250000 els 155.35 ms/op 131.78 ms/op 1.18
processSlot - 1 slots 10.628 us/op 9.5210 us/op 1.12
processSlot - 32 slots 1.5084 ms/op 1.3926 ms/op 1.08
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 311.21 us/op 258.78 us/op 1.20
getCommitteeAssignments - req 1 vs - 250000 vc 4.7258 ms/op 3.9117 ms/op 1.21
getCommitteeAssignments - req 100 vs - 250000 vc 6.4684 ms/op 5.7227 ms/op 1.13
getCommitteeAssignments - req 1000 vs - 250000 vc 6.8651 ms/op 6.0893 ms/op 1.13
computeProposers - vc 250000 15.999 ms/op 12.885 ms/op 1.24
computeEpochShuffling - vc 250000 146.64 ms/op 124.59 ms/op 1.18
getNextSyncCommittee - vc 250000 262.06 ms/op 215.22 ms/op 1.22

by benchmarkbot/action

Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you

@dapplion dapplion enabled auto-merge (squash) July 13, 2022 08:58
@dapplion dapplion merged commit d84e1d9 into unstable Jul 13, 2022
@dapplion dapplion deleted the philknows/contributing-update branch July 13, 2022 09:18
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

2 participants