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

chore: add note in CONTRIBUTING about external test deps #5471

Merged
merged 2 commits into from
May 8, 2023

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented May 8, 2023

Motivation

Add to CONTRIBUTING general guidelines to make tests deterministic

@dapplion dapplion requested a review from a team as a code owner May 8, 2023 00:02
@dapplion dapplion changed the title Add note in CONTRIBUTING about external test deps chore: add note in CONTRIBUTING about external test deps May 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: 4679bdc Previous: a14bf0d Ratio
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 11.921 ms/op 3.5874 ms/op 3.32
Full benchmark results
Benchmark suite Current: 4679bdc Previous: a14bf0d Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 592.28 us/op 984.75 us/op 0.60
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 74.258 us/op 51.851 us/op 1.43
BLS verify - blst-native 1.2934 ms/op 1.2691 ms/op 1.02
BLS verifyMultipleSignatures 3 - blst-native 2.6424 ms/op 2.5051 ms/op 1.05
BLS verifyMultipleSignatures 8 - blst-native 5.6092 ms/op 5.4944 ms/op 1.02
BLS verifyMultipleSignatures 32 - blst-native 20.503 ms/op 19.610 ms/op 1.05
BLS aggregatePubkeys 32 - blst-native 27.923 us/op 26.183 us/op 1.07
BLS aggregatePubkeys 128 - blst-native 108.38 us/op 101.79 us/op 1.06
getAttestationsForBlock 81.000 ms/op 59.398 ms/op 1.36
isKnown best case - 1 super set check 288.00 ns/op 262.00 ns/op 1.10
isKnown normal case - 2 super set checks 282.00 ns/op 255.00 ns/op 1.11
isKnown worse case - 16 super set checks 281.00 ns/op 251.00 ns/op 1.12
CheckpointStateCache - add get delete 7.0870 us/op 5.5130 us/op 1.29
validate gossip signedAggregateAndProof - struct 3.3211 ms/op 2.8334 ms/op 1.17
validate gossip attestation - struct 1.3940 ms/op 1.3489 ms/op 1.03
pickEth1Vote - no votes 1.4941 ms/op 1.3482 ms/op 1.11
pickEth1Vote - max votes 14.023 ms/op 10.658 ms/op 1.32
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.744 ms/op 9.1161 ms/op 1.18
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.532 ms/op 14.097 ms/op 1.60
pickEth1Vote - Eth1Data fastSerialize value x2048 1.0617 ms/op 721.29 us/op 1.47
pickEth1Vote - Eth1Data fastSerialize tree x2048 10.448 ms/op 4.6550 ms/op 2.24
bytes32 toHexString 898.00 ns/op 498.00 ns/op 1.80
bytes32 Buffer.toString(hex) 473.00 ns/op 355.00 ns/op 1.33
bytes32 Buffer.toString(hex) from Uint8Array 706.00 ns/op 543.00 ns/op 1.30
bytes32 Buffer.toString(hex) + 0x 486.00 ns/op 346.00 ns/op 1.40
Object access 1 prop 0.23800 ns/op 0.16500 ns/op 1.44
Map access 1 prop 0.19200 ns/op 0.16200 ns/op 1.19
Object get x1000 10.745 ns/op 6.6040 ns/op 1.63
Map get x1000 0.75000 ns/op 0.61000 ns/op 1.23
Object set x1000 89.690 ns/op 53.901 ns/op 1.66
Map set x1000 63.861 ns/op 44.866 ns/op 1.42
Return object 10000 times 0.37800 ns/op 0.24160 ns/op 1.56
Throw Error 10000 times 4.9801 us/op 4.2699 us/op 1.17
fastMsgIdFn sha256 / 200 bytes 3.8990 us/op 3.5170 us/op 1.11
fastMsgIdFn h32 xxhash / 200 bytes 350.00 ns/op 304.00 ns/op 1.15
fastMsgIdFn h64 xxhash / 200 bytes 521.00 ns/op 426.00 ns/op 1.22
fastMsgIdFn sha256 / 1000 bytes 13.122 us/op 11.690 us/op 1.12
fastMsgIdFn h32 xxhash / 1000 bytes 490.00 ns/op 462.00 ns/op 1.06
fastMsgIdFn h64 xxhash / 1000 bytes 616.00 ns/op 548.00 ns/op 1.12
fastMsgIdFn sha256 / 10000 bytes 111.54 us/op 104.52 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 2.1870 us/op 1.9860 us/op 1.10
fastMsgIdFn h64 xxhash / 10000 bytes 1.6300 us/op 1.4640 us/op 1.11
enrSubnets - fastDeserialize 64 bits 2.0120 us/op 1.7130 us/op 1.17
enrSubnets - ssz BitVector 64 bits 683.00 ns/op 586.00 ns/op 1.17
enrSubnets - fastDeserialize 4 bits 243.00 ns/op 192.00 ns/op 1.27
enrSubnets - ssz BitVector 4 bits 712.00 ns/op 611.00 ns/op 1.17
prioritizePeers score -10:0 att 32-0.1 sync 2-0 160.67 us/op 126.77 us/op 1.27
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 223.62 us/op 156.86 us/op 1.43
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 251.21 us/op 192.40 us/op 1.31
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 440.38 us/op 362.98 us/op 1.21
prioritizePeers score 0:0 att 64-1 sync 4-1 490.15 us/op 427.65 us/op 1.15
array of 16000 items push then shift 2.1862 us/op 1.6526 us/op 1.32
LinkedList of 16000 items push then shift 13.743 ns/op 9.0980 ns/op 1.51
array of 16000 items push then pop 128.35 ns/op 115.81 ns/op 1.11
LinkedList of 16000 items push then pop 12.608 ns/op 8.8830 ns/op 1.42
array of 24000 items push then shift 2.9408 us/op 2.4483 us/op 1.20
LinkedList of 24000 items push then shift 14.786 ns/op 9.4050 ns/op 1.57
array of 24000 items push then pop 95.117 ns/op 78.453 ns/op 1.21
LinkedList of 24000 items push then pop 12.188 ns/op 8.6550 ns/op 1.41
intersect bitArray bitLen 8 21.706 ns/op 14.352 ns/op 1.51
intersect array and set length 8 121.19 ns/op 80.821 ns/op 1.50
intersect bitArray bitLen 128 67.376 ns/op 44.499 ns/op 1.51
intersect array and set length 128 1.6362 us/op 1.1501 us/op 1.42
Buffer.concat 32 items 3.8290 us/op 3.3960 us/op 1.13
Uint8Array.set 32 items 3.0350 us/op 2.7070 us/op 1.12
pass gossip attestations to forkchoice per slot 4.8475 ms/op 2.8860 ms/op 1.68
computeDeltas 4.7378 ms/op 2.8906 ms/op 1.64
computeProposerBoostScoreFromBalances 2.4145 ms/op 1.7748 ms/op 1.36
altair processAttestation - 250000 vs - 7PWei normalcase 4.3032 ms/op 2.2028 ms/op 1.95
altair processAttestation - 250000 vs - 7PWei worstcase 5.8398 ms/op 3.3339 ms/op 1.75
altair processAttestation - setStatus - 1/6 committees join 179.03 us/op 142.43 us/op 1.26
altair processAttestation - setStatus - 1/3 committees join 323.71 us/op 285.07 us/op 1.14
altair processAttestation - setStatus - 1/2 committees join 500.69 us/op 375.00 us/op 1.34
altair processAttestation - setStatus - 2/3 committees join 552.64 us/op 463.61 us/op 1.19
altair processAttestation - setStatus - 4/5 committees join 760.14 us/op 649.73 us/op 1.17
altair processAttestation - setStatus - 100% committees join 983.94 us/op 746.08 us/op 1.32
altair processBlock - 250000 vs - 7PWei normalcase 22.914 ms/op 15.066 ms/op 1.52
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.470 ms/op 29.437 ms/op 1.10
altair processBlock - 250000 vs - 7PWei worstcase 73.353 ms/op 45.823 ms/op 1.60
altair processBlock - 250000 vs - 7PWei worstcase hashState 95.783 ms/op 65.755 ms/op 1.46
phase0 processBlock - 250000 vs - 7PWei normalcase 3.6440 ms/op 2.0091 ms/op 1.81
phase0 processBlock - 250000 vs - 7PWei worstcase 35.357 ms/op 27.984 ms/op 1.26
altair processEth1Data - 250000 vs - 7PWei normalcase 886.49 us/op 428.72 us/op 2.07
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 15.540 us/op 6.8880 us/op 2.26
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 42.362 us/op 19.540 us/op 2.17
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 18.945 us/op 8.2600 us/op 2.29
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 15.359 us/op 6.5580 us/op 2.34
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 147.53 us/op 74.101 us/op 1.99
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 1.0591 ms/op 614.66 us/op 1.72
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 1.4652 ms/op 883.37 us/op 1.66
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 1.4912 ms/op 826.26 us/op 1.80
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 4.2527 ms/op 2.3044 ms/op 1.85
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 2.6843 ms/op 1.5677 ms/op 1.71
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 11.921 ms/op 3.5874 ms/op 3.32
Tree 40 250000 create 790.94 ms/op 276.33 ms/op 2.86
Tree 40 250000 get(125000) 220.45 ns/op 171.51 ns/op 1.29
Tree 40 250000 set(125000) 2.5334 us/op 833.66 ns/op 3.04
Tree 40 250000 toArray() 33.488 ms/op 16.894 ms/op 1.98
Tree 40 250000 iterate all - toArray() + loop 33.717 ms/op 17.106 ms/op 1.97
Tree 40 250000 iterate all - get(i) 102.07 ms/op 63.729 ms/op 1.60
MutableVector 250000 create 17.749 ms/op 10.149 ms/op 1.75
MutableVector 250000 get(125000) 8.4150 ns/op 6.2850 ns/op 1.34
MutableVector 250000 set(125000) 900.93 ns/op 256.08 ns/op 3.52
MutableVector 250000 toArray() 6.0999 ms/op 2.8111 ms/op 2.17
MutableVector 250000 iterate all - toArray() + loop 6.0343 ms/op 2.8084 ms/op 2.15
MutableVector 250000 iterate all - get(i) 2.1345 ms/op 1.4398 ms/op 1.48
Array 250000 create 4.8661 ms/op 2.7772 ms/op 1.75
Array 250000 clone - spread 2.6055 ms/op 1.0880 ms/op 2.39
Array 250000 get(125000) 1.8000 ns/op 0.52100 ns/op 3.45
Array 250000 set(125000) 2.3190 ns/op 0.60500 ns/op 3.83
Array 250000 iterate all - loop 181.38 us/op 80.040 us/op 2.27
effectiveBalanceIncrements clone Uint8Array 300000 87.202 us/op 23.878 us/op 3.65
effectiveBalanceIncrements clone MutableVector 300000 1.7960 us/op 324.00 ns/op 5.54
effectiveBalanceIncrements rw all Uint8Array 300000 232.14 us/op 165.29 us/op 1.40
effectiveBalanceIncrements rw all MutableVector 300000 235.17 ms/op 75.321 ms/op 3.12
phase0 afterProcessEpoch - 250000 vs - 7PWei 174.19 ms/op 111.56 ms/op 1.56
phase0 beforeProcessEpoch - 250000 vs - 7PWei 74.027 ms/op 40.088 ms/op 1.85
altair processEpoch - mainnet_e81889 476.82 ms/op 333.33 ms/op 1.43
mainnet_e81889 - altair beforeProcessEpoch 103.66 ms/op 65.681 ms/op 1.58
mainnet_e81889 - altair processJustificationAndFinalization 40.011 us/op 17.693 us/op 2.26
mainnet_e81889 - altair processInactivityUpdates 13.138 ms/op 5.1674 ms/op 2.54
mainnet_e81889 - altair processRewardsAndPenalties 110.85 ms/op 48.111 ms/op 2.30
mainnet_e81889 - altair processRegistryUpdates 8.0580 us/op 2.8620 us/op 2.82
mainnet_e81889 - altair processSlashings 1.6190 us/op 474.00 ns/op 3.42
mainnet_e81889 - altair processEth1DataReset 2.0440 us/op 498.00 ns/op 4.10
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.0573 ms/op 1.2355 ms/op 2.47
mainnet_e81889 - altair processSlashingsReset 12.473 us/op 4.9290 us/op 2.53
mainnet_e81889 - altair processRandaoMixesReset 13.996 us/op 4.6320 us/op 3.02
mainnet_e81889 - altair processHistoricalRootsUpdate 2.6570 us/op 587.00 ns/op 4.53
mainnet_e81889 - altair processParticipationFlagUpdates 8.6590 us/op 2.4400 us/op 3.55
mainnet_e81889 - altair processSyncCommitteeUpdates 1.5620 us/op 455.00 ns/op 3.43
mainnet_e81889 - altair afterProcessEpoch 156.42 ms/op 116.92 ms/op 1.34
phase0 processEpoch - mainnet_e58758 519.88 ms/op 317.39 ms/op 1.64
mainnet_e58758 - phase0 beforeProcessEpoch 246.10 ms/op 123.21 ms/op 2.00
mainnet_e58758 - phase0 processJustificationAndFinalization 38.099 us/op 15.067 us/op 2.53
mainnet_e58758 - phase0 processRewardsAndPenalties 81.382 ms/op 56.773 ms/op 1.43
mainnet_e58758 - phase0 processRegistryUpdates 18.704 us/op 7.9130 us/op 2.36
mainnet_e58758 - phase0 processSlashings 1.7590 us/op 422.00 ns/op 4.17
mainnet_e58758 - phase0 processEth1DataReset 1.8110 us/op 434.00 ns/op 4.17
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.4315 ms/op 941.73 us/op 2.58
mainnet_e58758 - phase0 processSlashingsReset 11.215 us/op 3.2730 us/op 3.43
mainnet_e58758 - phase0 processRandaoMixesReset 14.776 us/op 6.6070 us/op 2.24
mainnet_e58758 - phase0 processHistoricalRootsUpdate 2.4630 us/op 705.00 ns/op 3.49
mainnet_e58758 - phase0 processParticipationRecordUpdates 15.756 us/op 4.4950 us/op 3.51
mainnet_e58758 - phase0 afterProcessEpoch 141.50 ms/op 94.513 ms/op 1.50
phase0 processEffectiveBalanceUpdates - 250000 normalcase 3.0839 ms/op 1.1843 ms/op 2.60
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.0447 ms/op 1.4405 ms/op 2.11
altair processInactivityUpdates - 250000 normalcase 56.625 ms/op 22.136 ms/op 2.56
altair processInactivityUpdates - 250000 worstcase 41.163 ms/op 20.496 ms/op 2.01
phase0 processRegistryUpdates - 250000 normalcase 18.390 us/op 5.7750 us/op 3.18
phase0 processRegistryUpdates - 250000 badcase_full_deposits 498.50 us/op 224.20 us/op 2.22
phase0 processRegistryUpdates - 250000 worstcase 0.5 266.66 ms/op 119.27 ms/op 2.24
altair processRewardsAndPenalties - 250000 normalcase 81.245 ms/op 46.467 ms/op 1.75
altair processRewardsAndPenalties - 250000 worstcase 98.588 ms/op 47.994 ms/op 2.05
phase0 getAttestationDeltas - 250000 normalcase 14.210 ms/op 6.4677 ms/op 2.20
phase0 getAttestationDeltas - 250000 worstcase 13.880 ms/op 6.6074 ms/op 2.10
phase0 processSlashings - 250000 worstcase 5.8572 ms/op 3.3379 ms/op 1.75
altair processSyncCommitteeUpdates - 250000 260.82 ms/op 173.98 ms/op 1.50
BeaconState.hashTreeRoot - No change 446.00 ns/op 266.00 ns/op 1.68
BeaconState.hashTreeRoot - 1 full validator 69.604 us/op 52.757 us/op 1.32
BeaconState.hashTreeRoot - 32 full validator 753.04 us/op 517.27 us/op 1.46
BeaconState.hashTreeRoot - 512 full validator 7.8538 ms/op 5.2669 ms/op 1.49
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 80.813 us/op 61.216 us/op 1.32
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1753 ms/op 855.00 us/op 1.37
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.125 ms/op 11.092 ms/op 1.63
BeaconState.hashTreeRoot - 1 balances 63.881 us/op 48.595 us/op 1.31
BeaconState.hashTreeRoot - 32 balances 663.04 us/op 446.26 us/op 1.49
BeaconState.hashTreeRoot - 512 balances 7.7090 ms/op 4.3998 ms/op 1.75
BeaconState.hashTreeRoot - 250000 balances 117.67 ms/op 73.057 ms/op 1.61
aggregationBits - 2048 els - zipIndexesInBitList 47.965 us/op 15.795 us/op 3.04
regular array get 100000 times 66.348 us/op 31.478 us/op 2.11
wrappedArray get 100000 times 58.637 us/op 31.353 us/op 1.87
arrayWithProxy get 100000 times 27.096 ms/op 15.493 ms/op 1.75
ssz.Root.equals 943.00 ns/op 525.00 ns/op 1.80
byteArrayEquals 928.00 ns/op 514.00 ns/op 1.81
shuffle list - 16384 els 8.9365 ms/op 6.6280 ms/op 1.35
shuffle list - 250000 els 121.10 ms/op 95.815 ms/op 1.26
processSlot - 1 slots 12.033 us/op 8.3640 us/op 1.44
processSlot - 32 slots 1.5604 ms/op 1.3065 ms/op 1.19
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 35.155 ms/op 33.231 ms/op 1.06
getCommitteeAssignments - req 1 vs - 250000 vc 3.0322 ms/op 2.8689 ms/op 1.06
getCommitteeAssignments - req 100 vs - 250000 vc 4.3346 ms/op 4.0586 ms/op 1.07
getCommitteeAssignments - req 1000 vs - 250000 vc 4.7944 ms/op 4.4145 ms/op 1.09
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.4600 ns/op 4.3600 ns/op 1.25
state getBlockRootAtSlot - 250000 vs - 7PWei 792.68 ns/op 997.69 ns/op 0.79
computeProposers - vc 250000 11.771 ms/op 10.302 ms/op 1.14
computeEpochShuffling - vc 250000 109.52 ms/op 101.75 ms/op 1.08
getNextSyncCommittee - vc 250000 187.74 ms/op 172.88 ms/op 1.09
computeSigningRoot for AttestationData 15.017 us/op 13.130 us/op 1.14
hash AttestationData serialized data then Buffer.toString(base64) 2.7259 us/op 2.4019 us/op 1.13
toHexString serialized data 1.6836 us/op 1.1000 us/op 1.53
Buffer.toString(base64) 426.81 ns/op 313.72 ns/op 1.36

by benchmarkbot/action

CONTRIBUTING.md Outdated Show resolved Hide resolved
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
@wemeetagain wemeetagain merged commit 28efaea into unstable May 8, 2023
@wemeetagain wemeetagain deleted the dapplion/contributing-tests branch May 8, 2023 14:00
@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.

3 participants