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

refactor: clean up validator import options #5689

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jun 23, 2023

Motivation

The validator import docs show all options that are available to validator which does not make sense as the only essential (non-hidden) options are --importKeystores and importKeystoresPassword.

Description

Fix validator import docs to only show relevant options. Validator options and global options are still available as parent args but do not need to be specifically documented for the sub-command.

image

@nflaig nflaig requested a review from a team as a code owner June 23, 2023 15:49
@github-actions
Copy link
Contributor

github-actions bot commented Jun 23, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 9725bc9 Previous: 7483c39 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 660.88 us/op 544.66 us/op 1.21
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 64.214 us/op 48.024 us/op 1.34
BLS verify - blst-native 1.2676 ms/op 1.2105 ms/op 1.05
BLS verifyMultipleSignatures 3 - blst-native 2.5638 ms/op 2.4787 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst-native 5.6538 ms/op 5.2917 ms/op 1.07
BLS verifyMultipleSignatures 32 - blst-native 19.955 ms/op 19.283 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 26.866 us/op 26.038 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 105.10 us/op 100.50 us/op 1.05
getAttestationsForBlock 76.792 ms/op 59.995 ms/op 1.28
isKnown best case - 1 super set check 283.00 ns/op 265.00 ns/op 1.07
isKnown normal case - 2 super set checks 274.00 ns/op 254.00 ns/op 1.08
isKnown worse case - 16 super set checks 276.00 ns/op 264.00 ns/op 1.05
CheckpointStateCache - add get delete 6.3640 us/op 5.4310 us/op 1.17
validate gossip signedAggregateAndProof - struct 3.0458 ms/op 2.7702 ms/op 1.10
validate gossip attestation - struct 1.3961 ms/op 1.3678 ms/op 1.02
pickEth1Vote - no votes 1.4496 ms/op 1.2879 ms/op 1.13
pickEth1Vote - max votes 10.776 ms/op 13.542 ms/op 0.80
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.5969 ms/op 8.7550 ms/op 1.10
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 15.638 ms/op 17.409 ms/op 0.90
pickEth1Vote - Eth1Data fastSerialize value x2048 802.75 us/op 671.43 us/op 1.20
pickEth1Vote - Eth1Data fastSerialize tree x2048 9.3454 ms/op 8.0300 ms/op 1.16
bytes32 toHexString 701.00 ns/op 480.00 ns/op 1.46
bytes32 Buffer.toString(hex) 434.00 ns/op 337.00 ns/op 1.29
bytes32 Buffer.toString(hex) from Uint8Array 622.00 ns/op 550.00 ns/op 1.13
bytes32 Buffer.toString(hex) + 0x 443.00 ns/op 336.00 ns/op 1.32
Object access 1 prop 0.20700 ns/op 0.16900 ns/op 1.22
Map access 1 prop 0.17600 ns/op 0.16700 ns/op 1.05
Object get x1000 7.3460 ns/op 6.6090 ns/op 1.11
Map get x1000 0.66100 ns/op 0.62400 ns/op 1.06
Object set x1000 55.827 ns/op 50.757 ns/op 1.10
Map set x1000 44.808 ns/op 43.280 ns/op 1.04
Return object 10000 times 0.24820 ns/op 0.23490 ns/op 1.06
Throw Error 10000 times 4.3252 us/op 4.2347 us/op 1.02
fastMsgIdFn sha256 / 200 bytes 3.6110 us/op 3.4160 us/op 1.06
fastMsgIdFn h32 xxhash / 200 bytes 301.00 ns/op 293.00 ns/op 1.03
fastMsgIdFn h64 xxhash / 200 bytes 421.00 ns/op 391.00 ns/op 1.08
fastMsgIdFn sha256 / 1000 bytes 11.864 us/op 11.640 us/op 1.02
fastMsgIdFn h32 xxhash / 1000 bytes 427.00 ns/op 420.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 481.00 ns/op 473.00 ns/op 1.02
fastMsgIdFn sha256 / 10000 bytes 108.05 us/op 104.17 us/op 1.04
fastMsgIdFn h32 xxhash / 10000 bytes 2.0410 us/op 1.9230 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.4220 us/op 1.3260 us/op 1.07
enrSubnets - fastDeserialize 64 bits 1.4780 us/op 1.2450 us/op 1.19
enrSubnets - ssz BitVector 64 bits 585.00 ns/op 482.00 ns/op 1.21
enrSubnets - fastDeserialize 4 bits 206.00 ns/op 170.00 ns/op 1.21
enrSubnets - ssz BitVector 4 bits 558.00 ns/op 493.00 ns/op 1.13
prioritizePeers score -10:0 att 32-0.1 sync 2-0 120.50 us/op 106.86 us/op 1.13
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 138.00 us/op 129.17 us/op 1.07
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 178.36 us/op 165.01 us/op 1.08
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 319.65 us/op 302.84 us/op 1.06
prioritizePeers score 0:0 att 64-1 sync 4-1 409.21 us/op 361.97 us/op 1.13
array of 16000 items push then shift 1.6762 us/op 1.6522 us/op 1.01
LinkedList of 16000 items push then shift 9.0790 ns/op 8.8310 ns/op 1.03
array of 16000 items push then pop 95.775 ns/op 86.234 ns/op 1.11
LinkedList of 16000 items push then pop 8.9790 ns/op 8.1760 ns/op 1.10
array of 24000 items push then shift 2.4421 us/op 2.2474 us/op 1.09
LinkedList of 24000 items push then shift 9.5260 ns/op 9.1310 ns/op 1.04
array of 24000 items push then pop 77.534 ns/op 80.433 ns/op 0.96
LinkedList of 24000 items push then pop 8.7380 ns/op 8.6050 ns/op 1.02
intersect bitArray bitLen 8 13.457 ns/op 13.011 ns/op 1.03
intersect array and set length 8 80.486 ns/op 74.851 ns/op 1.08
intersect bitArray bitLen 128 44.399 ns/op 43.368 ns/op 1.02
intersect array and set length 128 1.0920 us/op 1.0265 us/op 1.06
Buffer.concat 32 items 2.9350 us/op 2.6090 us/op 1.12
Uint8Array.set 32 items 2.2930 us/op 2.6880 us/op 0.85
transfer serialized Status (84 B) 1.9910 us/op 2.2120 us/op 0.90
copy serialized Status (84 B) 1.7530 us/op 1.8140 us/op 0.97
transfer serialized SignedVoluntaryExit (112 B) 2.1620 us/op 2.2030 us/op 0.98
copy serialized SignedVoluntaryExit (112 B) 1.8330 us/op 1.8230 us/op 1.01
transfer serialized ProposerSlashing (416 B) 2.2340 us/op 2.7120 us/op 0.82
copy serialized ProposerSlashing (416 B) 2.9280 us/op 2.5980 us/op 1.13
transfer serialized Attestation (485 B) 2.7650 us/op 3.1520 us/op 0.88
copy serialized Attestation (485 B) 2.9420 us/op 2.7140 us/op 1.08
transfer serialized AttesterSlashing (33232 B) 3.3440 us/op 3.4260 us/op 0.98
copy serialized AttesterSlashing (33232 B) 6.8360 us/op 8.8710 us/op 0.77
transfer serialized Small SignedBeaconBlock (128000 B) 3.4630 us/op 3.5360 us/op 0.98
copy serialized Small SignedBeaconBlock (128000 B) 41.873 us/op 13.974 us/op 3.00
transfer serialized Avg SignedBeaconBlock (200000 B) 3.9340 us/op 3.6650 us/op 1.07
copy serialized Avg SignedBeaconBlock (200000 B) 19.350 us/op 19.960 us/op 0.97
transfer serialized BlobsSidecar (524380 B) 3.8070 us/op 3.2430 us/op 1.17
copy serialized BlobsSidecar (524380 B) 163.21 us/op 143.28 us/op 1.14
transfer serialized Big SignedBeaconBlock (1000000 B) 4.1110 us/op 3.5050 us/op 1.17
copy serialized Big SignedBeaconBlock (1000000 B) 254.82 us/op 335.01 us/op 0.76
pass gossip attestations to forkchoice per slot 2.7257 ms/op 2.7041 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 2.1451 ms/op 2.0816 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 0 12.105 ms/op 11.166 ms/op 1.08
forkChoice updateHead vc 1000000 bc 64 eq 0 22.041 ms/op 18.478 ms/op 1.19
forkChoice updateHead vc 600000 bc 320 eq 0 16.993 ms/op 16.479 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 83.229 ms/op 82.708 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 1000 21.345 ms/op 20.930 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 10000 23.032 ms/op 22.886 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 31.459 ms/op 31.149 ms/op 1.01
computeDeltas 3.7658 ms/op 4.2374 ms/op 0.89
computeProposerBoostScoreFromBalances 1.8009 ms/op 1.7843 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.2117 ms/op 2.1689 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei worstcase 3.6578 ms/op 3.4050 ms/op 1.07
altair processAttestation - setStatus - 1/6 committees join 141.79 us/op 145.74 us/op 0.97
altair processAttestation - setStatus - 1/3 committees join 278.63 us/op 277.46 us/op 1.00
altair processAttestation - setStatus - 1/2 committees join 375.62 us/op 355.75 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 470.35 us/op 465.06 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 657.11 us/op 645.98 us/op 1.02
altair processAttestation - setStatus - 100% committees join 776.97 us/op 752.35 us/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase 17.284 ms/op 21.864 ms/op 0.79
altair processBlock - 250000 vs - 7PWei normalcase hashState 27.500 ms/op 29.633 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase 45.693 ms/op 67.675 ms/op 0.68
altair processBlock - 250000 vs - 7PWei worstcase hashState 71.521 ms/op 86.292 ms/op 0.83
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0053 ms/op 2.1660 ms/op 0.93
phase0 processBlock - 250000 vs - 7PWei worstcase 28.000 ms/op 27.487 ms/op 1.02
altair processEth1Data - 250000 vs - 7PWei normalcase 474.52 us/op 508.41 us/op 0.93
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.9750 us/op 12.503 us/op 0.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 25.208 us/op 32.343 us/op 0.78
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.8790 us/op 15.518 us/op 0.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.5030 us/op 11.957 us/op 0.63
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 98.510 us/op 129.21 us/op 0.76
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 644.12 us/op 1.1931 ms/op 0.54
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 900.42 us/op 1.6593 ms/op 0.54
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 870.09 us/op 1.6601 ms/op 0.52
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3257 ms/op 2.3049 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5506 ms/op 1.5111 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8781 ms/op 3.8331 ms/op 1.01
Tree 40 250000 create 297.70 ms/op 314.71 ms/op 0.95
Tree 40 250000 get(125000) 180.96 ns/op 181.50 ns/op 1.00
Tree 40 250000 set(125000) 940.43 ns/op 892.89 ns/op 1.05
Tree 40 250000 toArray() 17.654 ms/op 17.298 ms/op 1.02
Tree 40 250000 iterate all - toArray() + loop 18.108 ms/op 18.122 ms/op 1.00
Tree 40 250000 iterate all - get(i) 67.908 ms/op 68.186 ms/op 1.00
MutableVector 250000 create 10.132 ms/op 15.197 ms/op 0.67
MutableVector 250000 get(125000) 6.5020 ns/op 6.8220 ns/op 0.95
MutableVector 250000 set(125000) 291.06 ns/op 244.11 ns/op 1.19
MutableVector 250000 toArray() 3.0072 ms/op 2.8547 ms/op 1.05
MutableVector 250000 iterate all - toArray() + loop 3.2114 ms/op 3.1496 ms/op 1.02
MutableVector 250000 iterate all - get(i) 1.5480 ms/op 1.5456 ms/op 1.00
Array 250000 create 2.6275 ms/op 2.5914 ms/op 1.01
Array 250000 clone - spread 1.0990 ms/op 1.0950 ms/op 1.00
Array 250000 get(125000) 0.56000 ns/op 0.52600 ns/op 1.06
Array 250000 set(125000) 0.63500 ns/op 0.60800 ns/op 1.04
Array 250000 iterate all - loop 87.860 us/op 83.004 us/op 1.06
effectiveBalanceIncrements clone Uint8Array 300000 27.457 us/op 26.909 us/op 1.02
effectiveBalanceIncrements clone MutableVector 300000 334.00 ns/op 327.00 ns/op 1.02
effectiveBalanceIncrements rw all Uint8Array 300000 170.53 us/op 166.97 us/op 1.02
effectiveBalanceIncrements rw all MutableVector 300000 78.807 ms/op 81.513 ms/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 112.00 ms/op 110.47 ms/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 40.886 ms/op 45.805 ms/op 0.89
altair processEpoch - mainnet_e81889 325.50 ms/op 369.46 ms/op 0.88
mainnet_e81889 - altair beforeProcessEpoch 64.540 ms/op 68.100 ms/op 0.95
mainnet_e81889 - altair processJustificationAndFinalization 15.342 us/op 27.095 us/op 0.57
mainnet_e81889 - altair processInactivityUpdates 5.8500 ms/op 6.2763 ms/op 0.93
mainnet_e81889 - altair processRewardsAndPenalties 64.817 ms/op 73.689 ms/op 0.88
mainnet_e81889 - altair processRegistryUpdates 3.0680 us/op 2.7480 us/op 1.12
mainnet_e81889 - altair processSlashings 441.00 ns/op 684.00 ns/op 0.64
mainnet_e81889 - altair processEth1DataReset 497.00 ns/op 743.00 ns/op 0.67
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2150 ms/op 1.7359 ms/op 0.70
mainnet_e81889 - altair processSlashingsReset 4.2530 us/op 6.8540 us/op 0.62
mainnet_e81889 - altair processRandaoMixesReset 4.1610 us/op 10.930 us/op 0.38
mainnet_e81889 - altair processHistoricalRootsUpdate 747.00 ns/op 1.1270 us/op 0.66
mainnet_e81889 - altair processParticipationFlagUpdates 2.4460 us/op 5.3440 us/op 0.46
mainnet_e81889 - altair processSyncCommitteeUpdates 471.00 ns/op 718.00 ns/op 0.66
mainnet_e81889 - altair afterProcessEpoch 117.93 ms/op 130.00 ms/op 0.91
phase0 processEpoch - mainnet_e58758 318.02 ms/op 387.13 ms/op 0.82
mainnet_e58758 - phase0 beforeProcessEpoch 118.10 ms/op 151.83 ms/op 0.78
mainnet_e58758 - phase0 processJustificationAndFinalization 15.271 us/op 18.084 us/op 0.84
mainnet_e58758 - phase0 processRewardsAndPenalties 54.529 ms/op 69.872 ms/op 0.78
mainnet_e58758 - phase0 processRegistryUpdates 8.0260 us/op 7.6350 us/op 1.05
mainnet_e58758 - phase0 processSlashings 521.00 ns/op 517.00 ns/op 1.01
mainnet_e58758 - phase0 processEth1DataReset 544.00 ns/op 483.00 ns/op 1.13
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 978.26 us/op 1.0244 ms/op 0.95
mainnet_e58758 - phase0 processSlashingsReset 3.4370 us/op 4.1020 us/op 0.84
mainnet_e58758 - phase0 processRandaoMixesReset 4.6530 us/op 6.1630 us/op 0.75
mainnet_e58758 - phase0 processHistoricalRootsUpdate 739.00 ns/op 744.00 ns/op 0.99
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.2440 us/op 3.9280 us/op 1.08
mainnet_e58758 - phase0 afterProcessEpoch 96.652 ms/op 100.93 ms/op 0.96
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2189 ms/op 1.4771 ms/op 0.83
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5742 ms/op 1.4490 ms/op 1.09
altair processInactivityUpdates - 250000 normalcase 23.151 ms/op 28.954 ms/op 0.80
altair processInactivityUpdates - 250000 worstcase 23.455 ms/op 29.510 ms/op 0.79
phase0 processRegistryUpdates - 250000 normalcase 6.8330 us/op 10.755 us/op 0.64
phase0 processRegistryUpdates - 250000 badcase_full_deposits 271.26 us/op 473.10 us/op 0.57
phase0 processRegistryUpdates - 250000 worstcase 0.5 110.95 ms/op 145.31 ms/op 0.76
altair processRewardsAndPenalties - 250000 normalcase 56.366 ms/op 74.827 ms/op 0.75
altair processRewardsAndPenalties - 250000 worstcase 45.851 ms/op 78.565 ms/op 0.58
phase0 getAttestationDeltas - 250000 normalcase 6.6558 ms/op 7.0458 ms/op 0.94
phase0 getAttestationDeltas - 250000 worstcase 6.6956 ms/op 6.9072 ms/op 0.97
phase0 processSlashings - 250000 worstcase 3.6219 ms/op 3.2654 ms/op 1.11
altair processSyncCommitteeUpdates - 250000 177.17 ms/op 177.25 ms/op 1.00
BeaconState.hashTreeRoot - No change 265.00 ns/op 270.00 ns/op 0.98
BeaconState.hashTreeRoot - 1 full validator 50.804 us/op 58.900 us/op 0.86
BeaconState.hashTreeRoot - 32 full validator 564.08 us/op 577.06 us/op 0.98
BeaconState.hashTreeRoot - 512 full validator 5.2970 ms/op 7.1467 ms/op 0.74
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 62.592 us/op 63.411 us/op 0.99
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 874.89 us/op 893.96 us/op 0.98
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.438 ms/op 12.874 ms/op 0.89
BeaconState.hashTreeRoot - 1 balances 49.703 us/op 59.671 us/op 0.83
BeaconState.hashTreeRoot - 32 balances 446.83 us/op 580.48 us/op 0.77
BeaconState.hashTreeRoot - 512 balances 4.2991 ms/op 4.1142 ms/op 1.04
BeaconState.hashTreeRoot - 250000 balances 73.436 ms/op 90.464 ms/op 0.81
aggregationBits - 2048 els - zipIndexesInBitList 15.807 us/op 15.403 us/op 1.03
regular array get 100000 times 42.613 us/op 42.953 us/op 0.99
wrappedArray get 100000 times 32.858 us/op 32.869 us/op 1.00
arrayWithProxy get 100000 times 15.256 ms/op 15.713 ms/op 0.97
ssz.Root.equals 548.00 ns/op 552.00 ns/op 0.99
byteArrayEquals 551.00 ns/op 540.00 ns/op 1.02
shuffle list - 16384 els 6.7600 ms/op 6.6511 ms/op 1.02
shuffle list - 250000 els 99.810 ms/op 97.411 ms/op 1.02
processSlot - 1 slots 8.6870 us/op 8.2130 us/op 1.06
processSlot - 32 slots 1.3618 ms/op 1.3395 ms/op 1.02
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 31.115 ms/op 43.404 ms/op 0.72
getCommitteeAssignments - req 1 vs - 250000 vc 2.9049 ms/op 2.8372 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 4.1602 ms/op 4.0491 ms/op 1.03
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4474 ms/op 4.2099 ms/op 1.06
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4000 ns/op 4.6800 ns/op 0.94
state getBlockRootAtSlot - 250000 vs - 7PWei 539.35 ns/op 1.0348 us/op 0.52
computeProposers - vc 250000 10.256 ms/op 9.9886 ms/op 1.03
computeEpochShuffling - vc 250000 101.65 ms/op 100.92 ms/op 1.01
getNextSyncCommittee - vc 250000 167.21 ms/op 170.51 ms/op 0.98
computeSigningRoot for AttestationData 12.537 us/op 13.071 us/op 0.96
hash AttestationData serialized data then Buffer.toString(base64) 2.4668 us/op 2.3078 us/op 1.07
toHexString serialized data 1.1056 us/op 1.0063 us/op 1.10
Buffer.toString(base64) 330.79 ns/op 316.54 ns/op 1.05

by benchmarkbot/action

@wemeetagain wemeetagain merged commit ad971c6 into unstable Jun 26, 2023
@wemeetagain wemeetagain deleted the nflaig/cleanup-validator-import branch June 26, 2023 16:37
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.10.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.

2 participants