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

Add support for EL Clients to sim tests #4710

Merged
merged 34 commits into from
Nov 7, 2022
Merged

Conversation

nazarhussain
Copy link
Contributor

@nazarhussain nazarhussain commented Nov 1, 2022

Motivation

Add support for the EL Clients to the SIM tests.

Description

Partially Resolves #4275

Steps to test or reproduce

Run sim tests

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d002575 Previous: e1d4b1a Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.3251 ms/op 1.8031 ms/op 1.29
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 86.162 us/op 62.067 us/op 1.39
BLS verify - blst-native 2.6093 ms/op 2.1630 ms/op 1.21
BLS verifyMultipleSignatures 3 - blst-native 5.4199 ms/op 4.4749 ms/op 1.21
BLS verifyMultipleSignatures 8 - blst-native 10.856 ms/op 9.6722 ms/op 1.12
BLS verifyMultipleSignatures 32 - blst-native 39.538 ms/op 35.151 ms/op 1.12
BLS aggregatePubkeys 32 - blst-native 55.767 us/op 46.796 us/op 1.19
BLS aggregatePubkeys 128 - blst-native 211.69 us/op 182.54 us/op 1.16
getAttestationsForBlock 101.01 ms/op 78.210 ms/op 1.29
isKnown best case - 1 super set check 547.00 ns/op 484.00 ns/op 1.13
isKnown normal case - 2 super set checks 529.00 ns/op 474.00 ns/op 1.12
isKnown worse case - 16 super set checks 511.00 ns/op 473.00 ns/op 1.08
CheckpointStateCache - add get delete 10.057 us/op 8.5620 us/op 1.17
validate gossip signedAggregateAndProof - struct 5.6334 ms/op 5.0209 ms/op 1.12
validate gossip attestation - struct 2.7459 ms/op 2.3704 ms/op 1.16
pickEth1Vote - no votes 2.2490 ms/op 2.0745 ms/op 1.08
pickEth1Vote - max votes 20.664 ms/op 18.507 ms/op 1.12
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.875 ms/op 11.984 ms/op 1.16
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.826 ms/op 19.826 ms/op 1.15
pickEth1Vote - Eth1Data fastSerialize value x2048 1.7067 ms/op 1.4296 ms/op 1.19
pickEth1Vote - Eth1Data fastSerialize tree x2048 14.981 ms/op 12.460 ms/op 1.20
bytes32 toHexString 1.1790 us/op 931.00 ns/op 1.27
bytes32 Buffer.toString(hex) 769.00 ns/op 715.00 ns/op 1.08
bytes32 Buffer.toString(hex) from Uint8Array 1.0330 us/op 920.00 ns/op 1.12
bytes32 Buffer.toString(hex) + 0x 778.00 ns/op 712.00 ns/op 1.09
Object access 1 prop 0.39900 ns/op 0.33800 ns/op 1.18
Map access 1 prop 0.33300 ns/op 0.31000 ns/op 1.07
Object get x1000 15.144 ns/op 10.935 ns/op 1.38
Map get x1000 0.94400 ns/op 0.95500 ns/op 0.99
Object set x1000 102.82 ns/op 74.027 ns/op 1.39
Map set x1000 83.081 ns/op 47.159 ns/op 1.76
Return object 10000 times 0.43190 ns/op 0.44120 ns/op 0.98
Throw Error 10000 times 6.9433 us/op 5.8416 us/op 1.19
fastMsgIdFn sha256 / 200 bytes 5.4050 us/op 4.9480 us/op 1.09
fastMsgIdFn h32 xxhash / 200 bytes 625.00 ns/op 581.00 ns/op 1.08
fastMsgIdFn h64 xxhash / 200 bytes 901.00 ns/op 773.00 ns/op 1.17
fastMsgIdFn sha256 / 1000 bytes 17.264 us/op 15.550 us/op 1.11
fastMsgIdFn h32 xxhash / 1000 bytes 829.00 ns/op 751.00 ns/op 1.10
fastMsgIdFn h64 xxhash / 1000 bytes 929.00 ns/op 935.00 ns/op 0.99
fastMsgIdFn sha256 / 10000 bytes 146.94 us/op 133.39 us/op 1.10
fastMsgIdFn h32 xxhash / 10000 bytes 2.8570 us/op 2.6680 us/op 1.07
fastMsgIdFn h64 xxhash / 10000 bytes 2.2260 us/op 2.0260 us/op 1.10
enrSubnets - fastDeserialize 64 bits 3.3720 us/op 2.6340 us/op 1.28
enrSubnets - ssz BitVector 64 bits 917.00 ns/op 818.00 ns/op 1.12
enrSubnets - fastDeserialize 4 bits 477.00 ns/op 388.00 ns/op 1.23
enrSubnets - ssz BitVector 4 bits 893.00 ns/op 828.00 ns/op 1.08
prioritizePeers score -10:0 att 32-0.1 sync 2-0 133.49 us/op 82.258 us/op 1.62
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 171.34 us/op 123.45 us/op 1.39
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 297.56 us/op 198.57 us/op 1.50
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 556.03 us/op 383.64 us/op 1.45
prioritizePeers score 0:0 att 64-1 sync 4-1 684.06 us/op 446.15 us/op 1.53
RateTracker 1000000 limit, 1 obj count per request 227.56 ns/op 187.09 ns/op 1.22
RateTracker 1000000 limit, 2 obj count per request 162.87 ns/op 134.94 ns/op 1.21
RateTracker 1000000 limit, 4 obj count per request 132.67 ns/op 110.33 ns/op 1.20
RateTracker 1000000 limit, 8 obj count per request 125.67 ns/op 97.607 ns/op 1.29
RateTracker with prune 6.5000 us/op 4.0010 us/op 1.62
array of 16000 items push then shift 5.2903 us/op 51.581 us/op 0.10
LinkedList of 16000 items push then shift 19.437 ns/op 12.370 ns/op 1.57
array of 16000 items push then pop 255.47 ns/op 210.59 ns/op 1.21
LinkedList of 16000 items push then pop 18.982 ns/op 12.107 ns/op 1.57
array of 24000 items push then shift 8.1158 us/op 77.349 us/op 0.10
LinkedList of 24000 items push then shift 21.580 ns/op 12.681 ns/op 1.70
array of 24000 items push then pop 237.71 ns/op 193.72 ns/op 1.23
LinkedList of 24000 items push then pop 16.973 ns/op 12.343 ns/op 1.38
intersect bitArray bitLen 8 11.959 ns/op 10.680 ns/op 1.12
intersect array and set length 8 188.42 ns/op 129.70 ns/op 1.45
intersect bitArray bitLen 128 67.799 ns/op 55.483 ns/op 1.22
intersect array and set length 128 2.1603 us/op 1.9221 us/op 1.12
Buffer.concat 32 items 2.9600 ns/op 1.8000 ns/op 1.64
pass gossip attestations to forkchoice per slot 9.0131 ms/op 5.7000 ms/op 1.58
computeDeltas 5.6916 ms/op 4.5936 ms/op 1.24
computeProposerBoostScoreFromBalances 926.65 us/op 803.73 us/op 1.15
altair processAttestation - 250000 vs - 7PWei normalcase 5.9897 ms/op 3.3053 ms/op 1.81
altair processAttestation - 250000 vs - 7PWei worstcase 8.4718 ms/op 5.3210 ms/op 1.59
altair processAttestation - setStatus - 1/6 committees join 242.42 us/op 181.03 us/op 1.34
altair processAttestation - setStatus - 1/3 committees join 478.20 us/op 355.75 us/op 1.34
altair processAttestation - setStatus - 1/2 committees join 668.06 us/op 505.69 us/op 1.32
altair processAttestation - setStatus - 2/3 committees join 846.24 us/op 661.22 us/op 1.28
altair processAttestation - setStatus - 4/5 committees join 1.1475 ms/op 923.91 us/op 1.24
altair processAttestation - setStatus - 100% committees join 1.3785 ms/op 1.1106 ms/op 1.24
altair processBlock - 250000 vs - 7PWei normalcase 28.393 ms/op 23.915 ms/op 1.19
altair processBlock - 250000 vs - 7PWei normalcase hashState 40.518 ms/op 37.126 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase 95.075 ms/op 81.719 ms/op 1.16
altair processBlock - 250000 vs - 7PWei worstcase hashState 119.95 ms/op 103.82 ms/op 1.16
phase0 processBlock - 250000 vs - 7PWei normalcase 4.5411 ms/op 3.0768 ms/op 1.48
phase0 processBlock - 250000 vs - 7PWei worstcase 58.247 ms/op 50.148 ms/op 1.16
altair processEth1Data - 250000 vs - 7PWei normalcase 1.0691 ms/op 683.83 us/op 1.56
Tree 40 250000 create 1.0949 s/op 685.52 ms/op 1.60
Tree 40 250000 get(125000) 302.16 ns/op 238.66 ns/op 1.27
Tree 40 250000 set(125000) 3.5031 us/op 2.0214 us/op 1.73
Tree 40 250000 toArray() 34.714 ms/op 26.052 ms/op 1.33
Tree 40 250000 iterate all - toArray() + loop 37.152 ms/op 26.240 ms/op 1.42
Tree 40 250000 iterate all - get(i) 140.60 ms/op 110.03 ms/op 1.28
MutableVector 250000 create 18.394 ms/op 12.345 ms/op 1.49
MutableVector 250000 get(125000) 13.338 ns/op 11.137 ns/op 1.20
MutableVector 250000 set(125000) 987.11 ns/op 571.48 ns/op 1.73
MutableVector 250000 toArray() 8.3787 ms/op 5.6437 ms/op 1.48
MutableVector 250000 iterate all - toArray() + loop 8.5689 ms/op 5.9398 ms/op 1.44
MutableVector 250000 iterate all - get(i) 3.2318 ms/op 2.7201 ms/op 1.19
Array 250000 create 6.4191 ms/op 5.5392 ms/op 1.16
Array 250000 clone - spread 2.8945 ms/op 3.3520 ms/op 0.86
Array 250000 get(125000) 1.1500 ns/op 1.5140 ns/op 0.76
Array 250000 set(125000) 1.2640 ns/op 1.5100 ns/op 0.84
Array 250000 iterate all - loop 140.81 us/op 153.65 us/op 0.92
effectiveBalanceIncrements clone Uint8Array 300000 89.882 us/op 46.001 us/op 1.95
effectiveBalanceIncrements clone MutableVector 300000 824.00 ns/op 1.0750 us/op 0.77
effectiveBalanceIncrements rw all Uint8Array 300000 282.97 us/op 247.66 us/op 1.14
effectiveBalanceIncrements rw all MutableVector 300000 218.32 ms/op 182.60 ms/op 1.20
phase0 afterProcessEpoch - 250000 vs - 7PWei 196.53 ms/op 190.24 ms/op 1.03
phase0 beforeProcessEpoch - 250000 vs - 7PWei 72.190 ms/op 57.069 ms/op 1.26
altair processEpoch - mainnet_e81889 666.70 ms/op 546.91 ms/op 1.22
mainnet_e81889 - altair beforeProcessEpoch 107.22 ms/op 126.13 ms/op 0.85
mainnet_e81889 - altair processJustificationAndFinalization 62.270 us/op 17.378 us/op 3.58
mainnet_e81889 - altair processInactivityUpdates 11.718 ms/op 8.5566 ms/op 1.37
mainnet_e81889 - altair processRewardsAndPenalties 192.23 ms/op 79.205 ms/op 2.43
mainnet_e81889 - altair processRegistryUpdates 14.192 us/op 2.5890 us/op 5.48
mainnet_e81889 - altair processSlashings 2.8920 us/op 632.00 ns/op 4.58
mainnet_e81889 - altair processEth1DataReset 3.2250 us/op 645.00 ns/op 5.00
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.3806 ms/op 1.9557 ms/op 1.73
mainnet_e81889 - altair processSlashingsReset 20.275 us/op 4.3190 us/op 4.69
mainnet_e81889 - altair processRandaoMixesReset 22.510 us/op 4.2030 us/op 5.36
mainnet_e81889 - altair processHistoricalRootsUpdate 5.0270 us/op 602.00 ns/op 8.35
mainnet_e81889 - altair processParticipationFlagUpdates 14.376 us/op 2.1720 us/op 6.62
mainnet_e81889 - altair processSyncCommitteeUpdates 3.4040 us/op 534.00 ns/op 6.37
mainnet_e81889 - altair afterProcessEpoch 223.90 ms/op 199.20 ms/op 1.12
phase0 processEpoch - mainnet_e58758 650.12 ms/op 483.80 ms/op 1.34
mainnet_e58758 - phase0 beforeProcessEpoch 278.33 ms/op 178.33 ms/op 1.56
mainnet_e58758 - phase0 processJustificationAndFinalization 53.385 us/op 15.906 us/op 3.36
mainnet_e58758 - phase0 processRewardsAndPenalties 87.386 ms/op 103.01 ms/op 0.85
mainnet_e58758 - phase0 processRegistryUpdates 30.872 us/op 7.9880 us/op 3.86
mainnet_e58758 - phase0 processSlashings 2.6140 us/op 574.00 ns/op 4.55
mainnet_e58758 - phase0 processEth1DataReset 2.9200 us/op 564.00 ns/op 5.18
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0510 ms/op 1.9871 ms/op 1.03
mainnet_e58758 - phase0 processSlashingsReset 16.479 us/op 3.7110 us/op 4.44
mainnet_e58758 - phase0 processRandaoMixesReset 22.153 us/op 4.3910 us/op 5.05
mainnet_e58758 - phase0 processHistoricalRootsUpdate 3.6140 us/op 605.00 ns/op 5.97
mainnet_e58758 - phase0 processParticipationRecordUpdates 22.382 us/op 3.2760 us/op 6.83
mainnet_e58758 - phase0 afterProcessEpoch 176.82 ms/op 163.02 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4420 ms/op 1.9978 ms/op 1.22
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.7610 ms/op 2.2226 ms/op 1.24
altair processInactivityUpdates - 250000 normalcase 50.568 ms/op 33.810 ms/op 1.50
altair processInactivityUpdates - 250000 worstcase 49.023 ms/op 32.553 ms/op 1.51
phase0 processRegistryUpdates - 250000 normalcase 25.767 us/op 6.4780 us/op 3.98
phase0 processRegistryUpdates - 250000 badcase_full_deposits 497.43 us/op 372.09 us/op 1.34
phase0 processRegistryUpdates - 250000 worstcase 0.5 241.38 ms/op 177.27 ms/op 1.36
altair processRewardsAndPenalties - 250000 normalcase 151.11 ms/op 103.95 ms/op 1.45
altair processRewardsAndPenalties - 250000 worstcase 97.086 ms/op 75.058 ms/op 1.29
phase0 getAttestationDeltas - 250000 normalcase 16.506 ms/op 11.951 ms/op 1.38
phase0 getAttestationDeltas - 250000 worstcase 16.821 ms/op 12.125 ms/op 1.39
phase0 processSlashings - 250000 worstcase 7.0424 ms/op 5.0196 ms/op 1.40
altair processSyncCommitteeUpdates - 250000 366.84 ms/op 290.71 ms/op 1.26
BeaconState.hashTreeRoot - No change 592.00 ns/op 529.00 ns/op 1.12
BeaconState.hashTreeRoot - 1 full validator 76.845 us/op 65.721 us/op 1.17
BeaconState.hashTreeRoot - 32 full validator 785.66 us/op 703.99 us/op 1.12
BeaconState.hashTreeRoot - 512 full validator 9.5849 ms/op 8.7485 ms/op 1.10
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 102.05 us/op 87.556 us/op 1.17
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5608 ms/op 1.2747 ms/op 1.22
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.809 ms/op 17.053 ms/op 1.16
BeaconState.hashTreeRoot - 1 balances 75.266 us/op 63.184 us/op 1.19
BeaconState.hashTreeRoot - 32 balances 735.35 us/op 635.43 us/op 1.16
BeaconState.hashTreeRoot - 512 balances 7.3098 ms/op 6.1411 ms/op 1.19
BeaconState.hashTreeRoot - 250000 balances 117.79 ms/op 104.71 ms/op 1.12
aggregationBits - 2048 els - zipIndexesInBitList 44.534 us/op 26.747 us/op 1.67
regular array get 100000 times 59.119 us/op 61.597 us/op 0.96
wrappedArray get 100000 times 59.341 us/op 61.071 us/op 0.97
arrayWithProxy get 100000 times 36.593 ms/op 28.370 ms/op 1.29
ssz.Root.equals 658.00 ns/op 471.00 ns/op 1.40
byteArrayEquals 667.00 ns/op 478.00 ns/op 1.40
shuffle list - 16384 els 11.924 ms/op 11.589 ms/op 1.03
shuffle list - 250000 els 181.93 ms/op 169.25 ms/op 1.07
processSlot - 1 slots 17.917 us/op 12.997 us/op 1.38
processSlot - 32 slots 2.3723 ms/op 1.9938 ms/op 1.19
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 767.62 us/op 391.11 us/op 1.96
getCommitteeAssignments - req 1 vs - 250000 vc 6.1550 ms/op 5.4118 ms/op 1.14
getCommitteeAssignments - req 100 vs - 250000 vc 8.1944 ms/op 8.0007 ms/op 1.02
getCommitteeAssignments - req 1000 vs - 250000 vc 9.0097 ms/op 8.5585 ms/op 1.05
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 10.090 ns/op 8.1100 ns/op 1.24
state getBlockRootAtSlot - 250000 vs - 7PWei 1.3302 us/op 984.18 ns/op 1.35
computeProposers - vc 250000 23.723 ms/op 17.402 ms/op 1.36
computeEpochShuffling - vc 250000 186.01 ms/op 171.34 ms/op 1.09
getNextSyncCommittee - vc 250000 363.20 ms/op 289.35 ms/op 1.26

by benchmarkbot/action

@nazarhussain nazarhussain marked this pull request as ready for review November 1, 2022 20:42
@nazarhussain nazarhussain requested a review from a team as a code owner November 1, 2022 20:42
@nazarhussain nazarhussain self-assigned this Nov 1, 2022
@nazarhussain nazarhussain marked this pull request as draft November 1, 2022 22:21
@nazarhussain nazarhussain marked this pull request as ready for review November 7, 2022 10:58
@nazarhussain nazarhussain marked this pull request as draft November 7, 2022 15:08
@nazarhussain nazarhussain marked this pull request as ready for review November 7, 2022 15:45
@wemeetagain wemeetagain merged commit 1d0b7d5 into unstable Nov 7, 2022
@wemeetagain wemeetagain deleted the nh/4275-sim-tests-el branch November 7, 2022 18:47
@wemeetagain
Copy link
Member

great work

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.

Sim tests overhaul
4 participants