Skip to content

docs: update contribution.md for conventional commits - #5419

Merged
wemeetagain merged 3 commits into
unstablefrom
philknows/conventional-commits-update
Apr 27, 2023
Merged

docs: update contribution.md for conventional commits#5419
wemeetagain merged 3 commits into
unstablefrom
philknows/conventional-commits-update

Conversation

@philknows

Copy link
Copy Markdown
Member

Motivation

As of #5342 , we now enforce conventional commits on our PR titles.

Description

This PR adds the requirement to contributions.md for future contributors.

@philknows
philknows requested a review from a team as a code owner April 25, 2023 15:05
@github-actions

github-actions Bot commented Apr 25, 2023

Copy link
Copy Markdown
Contributor

Performance Report

鉁旓笍 no performance regression detected

Full benchmark results
Benchmark suite Current: 61f25cd Previous: 05c93ba Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 871.39 us/op 974.33 us/op 0.89
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 64.159 us/op 49.607 us/op 1.29
BLS verify - blst-native 1.3949 ms/op 1.2217 ms/op 1.14
BLS verifyMultipleSignatures 3 - blst-native 2.8127 ms/op 2.4873 ms/op 1.13
BLS verifyMultipleSignatures 8 - blst-native 6.0614 ms/op 5.5251 ms/op 1.10
BLS verifyMultipleSignatures 32 - blst-native 21.680 ms/op 19.451 ms/op 1.11
BLS aggregatePubkeys 32 - blst-native 30.689 us/op 26.368 us/op 1.16
BLS aggregatePubkeys 128 - blst-native 119.11 us/op 102.30 us/op 1.16
getAttestationsForBlock 71.791 ms/op 53.632 ms/op 1.34
isKnown best case - 1 super set check 309.00 ns/op 262.00 ns/op 1.18
isKnown normal case - 2 super set checks 294.00 ns/op 254.00 ns/op 1.16
isKnown worse case - 16 super set checks 279.00 ns/op 255.00 ns/op 1.09
CheckpointStateCache - add get delete 6.4640 us/op 5.0700 us/op 1.27
validate gossip signedAggregateAndProof - struct 2.9950 ms/op 2.8550 ms/op 1.05
validate gossip attestation - struct 1.4142 ms/op 1.3671 ms/op 1.03
pickEth1Vote - no votes 1.5982 ms/op 1.2638 ms/op 1.26
pickEth1Vote - max votes 13.807 ms/op 11.955 ms/op 1.15
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.084 ms/op 9.2578 ms/op 1.20
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.925 ms/op 15.715 ms/op 1.27
pickEth1Vote - Eth1Data fastSerialize value x2048 868.96 us/op 656.46 us/op 1.32
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.0147 ms/op 7.0556 ms/op 0.85
bytes32 toHexString 744.00 ns/op 497.00 ns/op 1.50
bytes32 Buffer.toString(hex) 486.00 ns/op 366.00 ns/op 1.33
bytes32 Buffer.toString(hex) from Uint8Array 688.00 ns/op 562.00 ns/op 1.22
bytes32 Buffer.toString(hex) + 0x 486.00 ns/op 368.00 ns/op 1.32
Object access 1 prop 0.21600 ns/op 0.16500 ns/op 1.31
Map access 1 prop 0.19000 ns/op 0.16200 ns/op 1.17
Object get x1000 7.7270 ns/op 6.8320 ns/op 1.13
Map get x1000 0.75900 ns/op 0.60700 ns/op 1.25
Object set x1000 81.872 ns/op 52.739 ns/op 1.55
Map set x1000 55.660 ns/op 43.626 ns/op 1.28
Return object 10000 times 0.25960 ns/op 0.24060 ns/op 1.08
Throw Error 10000 times 4.7019 us/op 4.3829 us/op 1.07
fastMsgIdFn sha256 / 200 bytes 3.9100 us/op 3.5760 us/op 1.09
fastMsgIdFn h32 xxhash / 200 bytes 337.00 ns/op 289.00 ns/op 1.17
fastMsgIdFn h64 xxhash / 200 bytes 511.00 ns/op 419.00 ns/op 1.22
fastMsgIdFn sha256 / 1000 bytes 12.946 us/op 12.030 us/op 1.08
fastMsgIdFn h32 xxhash / 1000 bytes 472.00 ns/op 424.00 ns/op 1.11
fastMsgIdFn h64 xxhash / 1000 bytes 603.00 ns/op 482.00 ns/op 1.25
fastMsgIdFn sha256 / 10000 bytes 113.76 us/op 106.52 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 2.1140 us/op 2.0200 us/op 1.05
fastMsgIdFn h64 xxhash / 10000 bytes 1.5200 us/op 1.3880 us/op 1.10
enrSubnets - fastDeserialize 64 bits 1.7290 us/op 1.3240 us/op 1.31
enrSubnets - ssz BitVector 64 bits 635.00 ns/op 490.00 ns/op 1.30
enrSubnets - fastDeserialize 4 bits 225.00 ns/op 167.00 ns/op 1.35
enrSubnets - ssz BitVector 4 bits 635.00 ns/op 493.00 ns/op 1.29
prioritizePeers score -10:0 att 32-0.1 sync 2-0 136.25 us/op 106.89 us/op 1.27
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 194.02 us/op 151.52 us/op 1.28
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 233.23 us/op 177.25 us/op 1.32
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 485.00 us/op 310.34 us/op 1.56
prioritizePeers score 0:0 att 64-1 sync 4-1 512.78 us/op 382.77 us/op 1.34
array of 16000 items push then shift 1.8562 us/op 1.6483 us/op 1.13
LinkedList of 16000 items push then shift 11.267 ns/op 8.8650 ns/op 1.27
array of 16000 items push then pop 138.12 ns/op 84.471 ns/op 1.64
LinkedList of 16000 items push then pop 10.039 ns/op 8.7900 ns/op 1.14
array of 24000 items push then shift 2.6297 us/op 2.3618 us/op 1.11
LinkedList of 24000 items push then shift 14.030 ns/op 8.8100 ns/op 1.59
array of 24000 items push then pop 96.686 ns/op 72.940 ns/op 1.33
LinkedList of 24000 items push then pop 10.547 ns/op 8.6290 ns/op 1.22
intersect bitArray bitLen 8 15.554 ns/op 13.630 ns/op 1.14
intersect array and set length 8 125.03 ns/op 79.247 ns/op 1.58
intersect bitArray bitLen 128 49.565 ns/op 45.285 ns/op 1.09
intersect array and set length 128 1.4808 us/op 1.0767 us/op 1.38
Buffer.concat 32 items 3.7840 us/op 2.8820 us/op 1.31
Uint8Array.set 32 items 2.7080 us/op 2.8230 us/op 0.96
pass gossip attestations to forkchoice per slot 3.8784 ms/op 3.0429 ms/op 1.27
computeDeltas 3.4412 ms/op 2.9551 ms/op 1.16
computeProposerBoostScoreFromBalances 1.9476 ms/op 1.8010 ms/op 1.08
altair processAttestation - 250000 vs - 7PWei normalcase 4.2060 ms/op 2.2894 ms/op 1.84
altair processAttestation - 250000 vs - 7PWei worstcase 5.2795 ms/op 3.5874 ms/op 1.47
altair processAttestation - setStatus - 1/6 committees join 161.59 us/op 145.68 us/op 1.11
altair processAttestation - setStatus - 1/3 committees join 308.30 us/op 278.65 us/op 1.11
altair processAttestation - setStatus - 1/2 committees join 402.07 us/op 375.38 us/op 1.07
altair processAttestation - setStatus - 2/3 committees join 535.76 us/op 465.88 us/op 1.15
altair processAttestation - setStatus - 4/5 committees join 778.03 us/op 676.17 us/op 1.15
altair processAttestation - setStatus - 100% committees join 955.14 us/op 788.83 us/op 1.21
altair processBlock - 250000 vs - 7PWei normalcase 22.120 ms/op 19.890 ms/op 1.11
altair processBlock - 250000 vs - 7PWei normalcase hashState 31.898 ms/op 25.580 ms/op 1.25
altair processBlock - 250000 vs - 7PWei worstcase 62.083 ms/op 51.272 ms/op 1.21
altair processBlock - 250000 vs - 7PWei worstcase hashState 87.100 ms/op 65.965 ms/op 1.32
phase0 processBlock - 250000 vs - 7PWei normalcase 3.0722 ms/op 2.0125 ms/op 1.53
phase0 processBlock - 250000 vs - 7PWei worstcase 35.683 ms/op 30.569 ms/op 1.17
altair processEth1Data - 250000 vs - 7PWei normalcase 624.93 us/op 479.91 us/op 1.30
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 12.502 us/op 7.9410 us/op 1.57
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 30.666 us/op 26.373 us/op 1.16
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 15.881 us/op 9.5250 us/op 1.67
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 11.772 us/op 7.4760 us/op 1.57
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 123.49 us/op 101.97 us/op 1.21
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 959.92 us/op 645.40 us/op 1.49
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 941.71 us/op 949.98 us/op 0.99
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 1.1943 ms/op 1.0076 ms/op 1.19
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 3.3785 ms/op 2.4338 ms/op 1.39
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.9335 ms/op 1.5356 ms/op 1.26
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 5.3180 ms/op 4.0388 ms/op 1.32
Tree 40 250000 create 418.45 ms/op 380.83 ms/op 1.10
Tree 40 250000 get(125000) 212.63 ns/op 196.23 ns/op 1.08
Tree 40 250000 set(125000) 1.2260 us/op 969.71 ns/op 1.26
Tree 40 250000 toArray() 25.298 ms/op 19.150 ms/op 1.32
Tree 40 250000 iterate all - toArray() + loop 24.683 ms/op 20.397 ms/op 1.21
Tree 40 250000 iterate all - get(i) 80.915 ms/op 74.160 ms/op 1.09
MutableVector 250000 create 13.016 ms/op 11.149 ms/op 1.17
MutableVector 250000 get(125000) 7.9220 ns/op 6.4330 ns/op 1.23
MutableVector 250000 set(125000) 365.23 ns/op 269.88 ns/op 1.35
MutableVector 250000 toArray() 4.0984 ms/op 3.7597 ms/op 1.09
MutableVector 250000 iterate all - toArray() + loop 4.8601 ms/op 4.0087 ms/op 1.21
MutableVector 250000 iterate all - get(i) 1.8421 ms/op 1.6260 ms/op 1.13
Array 250000 create 3.5236 ms/op 3.8892 ms/op 0.91
Array 250000 clone - spread 1.2649 ms/op 1.2317 ms/op 1.03
Array 250000 get(125000) 0.61600 ns/op 0.57500 ns/op 1.07
Array 250000 set(125000) 0.71900 ns/op 0.64600 ns/op 1.11
Array 250000 iterate all - loop 117.55 us/op 89.102 us/op 1.32
effectiveBalanceIncrements clone Uint8Array 300000 33.962 us/op 37.301 us/op 0.91
effectiveBalanceIncrements clone MutableVector 300000 362.00 ns/op 328.00 ns/op 1.10
effectiveBalanceIncrements rw all Uint8Array 300000 186.13 us/op 176.68 us/op 1.05
effectiveBalanceIncrements rw all MutableVector 300000 92.008 ms/op 94.482 ms/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 123.98 ms/op 122.09 ms/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 44.782 ms/op 43.677 ms/op 1.03
altair processEpoch - mainnet_e81889 344.85 ms/op 327.11 ms/op 1.05
mainnet_e81889 - altair beforeProcessEpoch 56.433 ms/op 55.296 ms/op 1.02
mainnet_e81889 - altair processJustificationAndFinalization 17.848 us/op 22.000 us/op 0.81
mainnet_e81889 - altair processInactivityUpdates 6.5319 ms/op 7.1660 ms/op 0.91
mainnet_e81889 - altair processRewardsAndPenalties 81.695 ms/op 74.015 ms/op 1.10
mainnet_e81889 - altair processRegistryUpdates 3.1850 us/op 3.3490 us/op 0.95
mainnet_e81889 - altair processSlashings 625.00 ns/op 716.00 ns/op 0.87
mainnet_e81889 - altair processEth1DataReset 481.00 ns/op 617.00 ns/op 0.78
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2826 ms/op 1.3497 ms/op 0.95
mainnet_e81889 - altair processSlashingsReset 4.6930 us/op 5.4340 us/op 0.86
mainnet_e81889 - altair processRandaoMixesReset 4.7570 us/op 7.4600 us/op 0.64
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0590 us/op 1.1890 us/op 0.89
mainnet_e81889 - altair processParticipationFlagUpdates 2.7930 us/op 2.5220 us/op 1.11
mainnet_e81889 - altair processSyncCommitteeUpdates 886.00 ns/op 677.00 ns/op 1.31
mainnet_e81889 - altair afterProcessEpoch 130.56 ms/op 131.79 ms/op 0.99
phase0 processEpoch - mainnet_e58758 399.11 ms/op 362.26 ms/op 1.10
mainnet_e58758 - phase0 beforeProcessEpoch 143.91 ms/op 131.00 ms/op 1.10
mainnet_e58758 - phase0 processJustificationAndFinalization 26.417 us/op 19.038 us/op 1.39
mainnet_e58758 - phase0 processRewardsAndPenalties 68.731 ms/op 56.895 ms/op 1.21
mainnet_e58758 - phase0 processRegistryUpdates 7.7810 us/op 11.314 us/op 0.69
mainnet_e58758 - phase0 processSlashings 538.00 ns/op 792.00 ns/op 0.68
mainnet_e58758 - phase0 processEth1DataReset 498.00 ns/op 562.00 ns/op 0.89
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9442 ms/op 1.0964 ms/op 1.77
mainnet_e58758 - phase0 processSlashingsReset 6.3560 us/op 5.8590 us/op 1.08
mainnet_e58758 - phase0 processRandaoMixesReset 7.4110 us/op 14.056 us/op 0.53
mainnet_e58758 - phase0 processHistoricalRootsUpdate 744.00 ns/op 946.00 ns/op 0.79
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.5390 us/op 5.8840 us/op 0.60
mainnet_e58758 - phase0 afterProcessEpoch 101.81 ms/op 99.194 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2674 ms/op 1.3049 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.8307 ms/op 1.6107 ms/op 1.14
altair processInactivityUpdates - 250000 normalcase 30.584 ms/op 28.739 ms/op 1.06
altair processInactivityUpdates - 250000 worstcase 30.156 ms/op 27.249 ms/op 1.11
phase0 processRegistryUpdates - 250000 normalcase 7.4210 us/op 8.0210 us/op 0.93
phase0 processRegistryUpdates - 250000 badcase_full_deposits 347.18 us/op 293.42 us/op 1.18
phase0 processRegistryUpdates - 250000 worstcase 0.5 141.62 ms/op 130.15 ms/op 1.09
altair processRewardsAndPenalties - 250000 normalcase 72.070 ms/op 70.816 ms/op 1.02
altair processRewardsAndPenalties - 250000 worstcase 77.769 ms/op 69.181 ms/op 1.12
phase0 getAttestationDeltas - 250000 normalcase 6.7723 ms/op 7.3144 ms/op 0.93
phase0 getAttestationDeltas - 250000 worstcase 6.4348 ms/op 7.3269 ms/op 0.88
phase0 processSlashings - 250000 worstcase 3.4875 ms/op 3.5365 ms/op 0.99
altair processSyncCommitteeUpdates - 250000 186.74 ms/op 193.02 ms/op 0.97
BeaconState.hashTreeRoot - No change 277.00 ns/op 273.00 ns/op 1.01
BeaconState.hashTreeRoot - 1 full validator 62.930 us/op 53.394 us/op 1.18
BeaconState.hashTreeRoot - 32 full validator 585.90 us/op 539.49 us/op 1.09
BeaconState.hashTreeRoot - 512 full validator 7.2485 ms/op 5.3724 ms/op 1.35
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 63.527 us/op 62.340 us/op 1.02
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 973.82 us/op 928.12 us/op 1.05
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.030 ms/op 12.484 ms/op 1.04
BeaconState.hashTreeRoot - 1 balances 60.887 us/op 52.162 us/op 1.17
BeaconState.hashTreeRoot - 32 balances 559.32 us/op 445.41 us/op 1.26
BeaconState.hashTreeRoot - 512 balances 4.8632 ms/op 4.6729 ms/op 1.04
BeaconState.hashTreeRoot - 250000 balances 88.490 ms/op 71.098 ms/op 1.24
aggregationBits - 2048 els - zipIndexesInBitList 15.440 us/op 15.820 us/op 0.98
regular array get 100000 times 33.235 us/op 34.410 us/op 0.97
wrappedArray get 100000 times 33.215 us/op 32.984 us/op 1.01
arrayWithProxy get 100000 times 15.902 ms/op 16.923 ms/op 0.94
ssz.Root.equals 549.00 ns/op 579.00 ns/op 0.95
byteArrayEquals 545.00 ns/op 567.00 ns/op 0.96
shuffle list - 16384 els 6.9896 ms/op 7.3034 ms/op 0.96
shuffle list - 250000 els 102.65 ms/op 104.74 ms/op 0.98
processSlot - 1 slots 9.3510 us/op 9.3840 us/op 1.00
processSlot - 32 slots 1.3915 ms/op 1.4516 ms/op 0.96
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 41.633 ms/op 36.780 ms/op 1.13
getCommitteeAssignments - req 1 vs - 250000 vc 2.8857 ms/op 2.9790 ms/op 0.97
getCommitteeAssignments - req 100 vs - 250000 vc 4.2154 ms/op 4.2250 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5610 ms/op 4.6470 ms/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.1700 ns/op 5.0300 ns/op 1.03
state getBlockRootAtSlot - 250000 vs - 7PWei 866.85 ns/op 675.78 ns/op 1.28
computeProposers - vc 250000 11.190 ms/op 11.277 ms/op 0.99
computeEpochShuffling - vc 250000 104.93 ms/op 112.91 ms/op 0.93
getNextSyncCommittee - vc 250000 181.67 ms/op 190.92 ms/op 0.95
computeSigningRoot for AttestationData 13.922 us/op 14.883 us/op 0.94
hash AttestationData serialized data then Buffer.toString(base64) 2.5183 us/op 2.6264 us/op 0.96
toHexString serialized data 1.0894 us/op 1.2541 us/op 0.87
Buffer.toString(base64) 331.11 ns/op 371.75 ns/op 0.89

by benchmarkbot/action

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
philknows and others added 2 commits April 26, 2023 17:23
@philknows philknows changed the title docs: Update contribution.md for conventional commits docs: update contribution.md for conventional commits Apr 26, 2023

@nflaig nflaig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me as an initial version. Might wanna add more guidelines/recommendations later, such as

  • define how the commit is structured type(scope?): subject and explain different parts in few bullet points (2-3)
  • when to use which type, feat vs fix vs refactor
  • advocate for using scope, this is especially useful in case of Lodestar monorepo, each package can be a scope (or also sub categories like metrics/monitoring), allows to quickly identify what part of the code base the commit modifies and makes the commit history more searchable

@wemeetagain
wemeetagain merged commit 1d7b238 into unstable Apr 27, 2023
@wemeetagain
wemeetagain deleted the philknows/conventional-commits-update branch April 27, 2023 20:16
@nflaig

nflaig commented Apr 27, 2023

Copy link
Copy Markdown
Member

the formatting of examples seems to be messed up, might be better to use bullet points

image

@wemeetagain

Copy link
Copy Markdown
Member

馃帀 This PR is included in v1.8.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.

3 participants