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

Fix datadir CLI arg type #4643

Merged
merged 3 commits into from
Oct 5, 2022
Merged

Fix datadir CLI arg type #4643

merged 3 commits into from
Oct 5, 2022

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Oct 5, 2022

Motivation

Fix type inconsistency in datadir CLI arg

Description

  • Set dataDir to string | undefined
  • Add test to ensure dev command can start

Closes #4577

@dapplion dapplion requested a review from a team as a code owner October 5, 2022 09:40
@dapplion dapplion changed the title Dapplion/datadir bug Fix datadir CLI arg type Oct 5, 2022
@dapplion dapplion enabled auto-merge (squash) October 5, 2022 09:41
Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: f7dd5a4 Previous: 98d302d Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.4470 ms/op 1.8053 ms/op 1.36
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 89.005 us/op 64.950 us/op 1.37
BLS verify - blst-native 2.1905 ms/op 2.1629 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 4.5789 ms/op 4.4701 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst-native 9.7463 ms/op 9.6644 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 35.524 ms/op 35.126 ms/op 1.01
BLS aggregatePubkeys 32 - blst-native 46.921 us/op 46.603 us/op 1.01
BLS aggregatePubkeys 128 - blst-native 183.65 us/op 181.81 us/op 1.01
getAttestationsForBlock 106.02 ms/op 76.884 ms/op 1.38
isKnown best case - 1 super set check 513.00 ns/op 487.00 ns/op 1.05
isKnown normal case - 2 super set checks 504.00 ns/op 473.00 ns/op 1.07
isKnown worse case - 16 super set checks 505.00 ns/op 476.00 ns/op 1.06
CheckpointStateCache - add get delete 10.448 us/op 8.7230 us/op 1.20
validate gossip signedAggregateAndProof - struct 5.0324 ms/op 5.0199 ms/op 1.00
validate gossip attestation - struct 2.4148 ms/op 2.3664 ms/op 1.02
pickEth1Vote - no votes 2.7132 ms/op 2.1520 ms/op 1.26
pickEth1Vote - max votes 23.903 ms/op 17.942 ms/op 1.33
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.060 ms/op 12.517 ms/op 1.04
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 23.175 ms/op 20.281 ms/op 1.14
pickEth1Vote - Eth1Data fastSerialize value x2048 1.9473 ms/op 1.4092 ms/op 1.38
pickEth1Vote - Eth1Data fastSerialize tree x2048 16.205 ms/op 12.780 ms/op 1.27
bytes32 toHexString 1.3220 us/op 932.00 ns/op 1.42
bytes32 Buffer.toString(hex) 894.00 ns/op 771.00 ns/op 1.16
bytes32 Buffer.toString(hex) from Uint8Array 1.0940 us/op 1.0170 us/op 1.08
bytes32 Buffer.toString(hex) + 0x 802.00 ns/op 788.00 ns/op 1.02
Object access 1 prop 0.41100 ns/op 0.34900 ns/op 1.18
Map access 1 prop 0.33200 ns/op 0.30700 ns/op 1.08
Object get x1000 20.291 ns/op 11.212 ns/op 1.81
Map get x1000 1.1550 ns/op 0.93800 ns/op 1.23
Object set x1000 138.02 ns/op 71.204 ns/op 1.94
Map set x1000 80.647 ns/op 46.528 ns/op 1.73
Return object 10000 times 0.41310 ns/op 0.43920 ns/op 0.94
Throw Error 10000 times 6.6455 us/op 6.1846 us/op 1.07
enrSubnets - fastDeserialize 64 bits 2.9930 us/op 2.4790 us/op 1.21
enrSubnets - ssz BitVector 64 bits 847.00 ns/op 711.00 ns/op 1.19
enrSubnets - fastDeserialize 4 bits 442.00 ns/op 372.00 ns/op 1.19
enrSubnets - ssz BitVector 4 bits 879.00 ns/op 722.00 ns/op 1.22
prioritizePeers score -10:0 att 32-0.1 sync 2-0 109.88 us/op 81.649 us/op 1.35
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 145.36 us/op 124.50 us/op 1.17
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 258.04 us/op 204.08 us/op 1.26
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 551.08 us/op 336.23 us/op 1.64
prioritizePeers score 0:0 att 64-1 sync 4-1 544.89 us/op 408.69 us/op 1.33
RateTracker 1000000 limit, 1 obj count per request 221.78 ns/op 179.52 ns/op 1.24
RateTracker 1000000 limit, 2 obj count per request 162.51 ns/op 130.54 ns/op 1.24
RateTracker 1000000 limit, 4 obj count per request 136.15 ns/op 106.60 ns/op 1.28
RateTracker 1000000 limit, 8 obj count per request 124.62 ns/op 94.316 ns/op 1.32
RateTracker with prune 4.9680 us/op 3.7800 us/op 1.31
array of 16000 items push then shift 3.6807 us/op 51.581 us/op 0.07
LinkedList of 16000 items push then shift 20.484 ns/op 12.402 ns/op 1.65
array of 16000 items push then pop 270.75 ns/op 203.52 ns/op 1.33
LinkedList of 16000 items push then pop 18.699 ns/op 11.950 ns/op 1.56
array of 24000 items push then shift 5.3203 us/op 77.335 us/op 0.07
LinkedList of 24000 items push then shift 22.411 ns/op 12.726 ns/op 1.76
array of 24000 items push then pop 245.98 ns/op 194.97 ns/op 1.26
LinkedList of 24000 items push then pop 20.221 ns/op 11.813 ns/op 1.71
intersect bitArray bitLen 8 13.780 ns/op 10.751 ns/op 1.28
intersect array and set length 8 196.63 ns/op 128.95 ns/op 1.52
intersect bitArray bitLen 128 83.731 ns/op 55.466 ns/op 1.51
intersect array and set length 128 2.6678 us/op 1.7301 us/op 1.54
Buffer.concat 32 items 2.6140 ns/op 1.7390 ns/op 1.50
pass gossip attestations to forkchoice per slot 4.8131 ms/op 4.8781 ms/op 0.99
computeDeltas 6.2953 ms/op 5.3741 ms/op 1.17
computeProposerBoostScoreFromBalances 1.0409 ms/op 803.71 us/op 1.30
altair processAttestation - 250000 vs - 7PWei normalcase 4.3775 ms/op 3.2917 ms/op 1.33
altair processAttestation - 250000 vs - 7PWei worstcase 7.1129 ms/op 5.0770 ms/op 1.40
altair processAttestation - setStatus - 1/6 committees join 246.44 us/op 184.63 us/op 1.33
altair processAttestation - setStatus - 1/3 committees join 483.06 us/op 364.07 us/op 1.33
altair processAttestation - setStatus - 1/2 committees join 672.68 us/op 523.81 us/op 1.28
altair processAttestation - setStatus - 2/3 committees join 859.87 us/op 680.83 us/op 1.26
altair processAttestation - setStatus - 4/5 committees join 1.1583 ms/op 955.91 us/op 1.21
altair processAttestation - setStatus - 100% committees join 1.3658 ms/op 1.1546 ms/op 1.18
altair processBlock - 250000 vs - 7PWei normalcase 32.125 ms/op 24.722 ms/op 1.30
altair processBlock - 250000 vs - 7PWei normalcase hashState 43.393 ms/op 33.343 ms/op 1.30
altair processBlock - 250000 vs - 7PWei worstcase 97.177 ms/op 91.138 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase hashState 115.08 ms/op 100.62 ms/op 1.14
phase0 processBlock - 250000 vs - 7PWei normalcase 4.3836 ms/op 3.1861 ms/op 1.38
phase0 processBlock - 250000 vs - 7PWei worstcase 54.467 ms/op 51.174 ms/op 1.06
altair processEth1Data - 250000 vs - 7PWei normalcase 1.1885 ms/op 738.20 us/op 1.61
Tree 40 250000 create 932.51 ms/op 706.58 ms/op 1.32
Tree 40 250000 get(125000) 346.79 ns/op 271.29 ns/op 1.28
Tree 40 250000 set(125000) 3.1922 us/op 2.1305 us/op 1.50
Tree 40 250000 toArray() 38.298 ms/op 26.816 ms/op 1.43
Tree 40 250000 iterate all - toArray() + loop 37.776 ms/op 26.733 ms/op 1.41
Tree 40 250000 iterate all - get(i) 134.11 ms/op 108.66 ms/op 1.23
MutableVector 250000 create 21.514 ms/op 14.106 ms/op 1.53
MutableVector 250000 get(125000) 15.511 ns/op 14.917 ns/op 1.04
MutableVector 250000 set(125000) 716.99 ns/op 535.82 ns/op 1.34
MutableVector 250000 toArray() 8.7489 ms/op 5.6583 ms/op 1.55
MutableVector 250000 iterate all - toArray() + loop 8.9699 ms/op 5.9731 ms/op 1.50
MutableVector 250000 iterate all - get(i) 4.0544 ms/op 2.8401 ms/op 1.43
Array 250000 create 7.8670 ms/op 5.8906 ms/op 1.34
Array 250000 clone - spread 4.1249 ms/op 3.4005 ms/op 1.21
Array 250000 get(125000) 1.7370 ns/op 1.5280 ns/op 1.14
Array 250000 set(125000) 1.7310 ns/op 1.5280 ns/op 1.13
Array 250000 iterate all - loop 197.78 us/op 154.00 us/op 1.28
effectiveBalanceIncrements clone Uint8Array 300000 100.92 us/op 68.134 us/op 1.48
effectiveBalanceIncrements clone MutableVector 300000 1.3400 us/op 631.00 ns/op 2.12
effectiveBalanceIncrements rw all Uint8Array 300000 302.41 us/op 247.07 us/op 1.22
effectiveBalanceIncrements rw all MutableVector 300000 228.48 ms/op 127.86 ms/op 1.79
phase0 afterProcessEpoch - 250000 vs - 7PWei 215.29 ms/op 201.21 ms/op 1.07
phase0 beforeProcessEpoch - 250000 vs - 7PWei 99.877 ms/op 58.761 ms/op 1.70
altair processEpoch - mainnet_e81889 681.26 ms/op 545.81 ms/op 1.25
mainnet_e81889 - altair beforeProcessEpoch 153.34 ms/op 131.46 ms/op 1.17
mainnet_e81889 - altair processJustificationAndFinalization 35.839 us/op 21.833 us/op 1.64
mainnet_e81889 - altair processInactivityUpdates 11.945 ms/op 8.8364 ms/op 1.35
mainnet_e81889 - altair processRewardsAndPenalties 103.59 ms/op 79.875 ms/op 1.30
mainnet_e81889 - altair processRegistryUpdates 8.9290 us/op 3.1140 us/op 2.87
mainnet_e81889 - altair processSlashings 2.0090 us/op 653.00 ns/op 3.08
mainnet_e81889 - altair processEth1DataReset 2.1030 us/op 813.00 ns/op 2.59
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.8038 ms/op 2.5103 ms/op 1.12
mainnet_e81889 - altair processSlashingsReset 16.353 us/op 5.8050 us/op 2.82
mainnet_e81889 - altair processRandaoMixesReset 11.482 us/op 5.6270 us/op 2.04
mainnet_e81889 - altair processHistoricalRootsUpdate 2.2320 us/op 1.2630 us/op 1.77
mainnet_e81889 - altair processParticipationFlagUpdates 7.4660 us/op 5.4400 us/op 1.37
mainnet_e81889 - altair processSyncCommitteeUpdates 1.5660 us/op 1.4160 us/op 1.11
mainnet_e81889 - altair afterProcessEpoch 226.66 ms/op 221.58 ms/op 1.02
phase0 processEpoch - mainnet_e58758 595.38 ms/op 484.32 ms/op 1.23
mainnet_e58758 - phase0 beforeProcessEpoch 254.06 ms/op 193.05 ms/op 1.32
mainnet_e58758 - phase0 processJustificationAndFinalization 23.509 us/op 33.098 us/op 0.71
mainnet_e58758 - phase0 processRewardsAndPenalties 90.001 ms/op 67.796 ms/op 1.33
mainnet_e58758 - phase0 processRegistryUpdates 17.615 us/op 17.232 us/op 1.02
mainnet_e58758 - phase0 processSlashings 1.6980 us/op 1.2440 us/op 1.36
mainnet_e58758 - phase0 processEth1DataReset 1.8830 us/op 1.5960 us/op 1.18
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.2311 ms/op 2.1818 ms/op 1.02
mainnet_e58758 - phase0 processSlashingsReset 8.9520 us/op 7.8650 us/op 1.14
mainnet_e58758 - phase0 processRandaoMixesReset 13.192 us/op 7.7110 us/op 1.71
mainnet_e58758 - phase0 processHistoricalRootsUpdate 2.2170 us/op 1.4120 us/op 1.57
mainnet_e58758 - phase0 processParticipationRecordUpdates 11.644 us/op 6.1800 us/op 1.88
mainnet_e58758 - phase0 afterProcessEpoch 193.35 ms/op 166.53 ms/op 1.16
phase0 processEffectiveBalanceUpdates - 250000 normalcase 3.3389 ms/op 2.3737 ms/op 1.41
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.7377 ms/op 3.1075 ms/op 1.20
altair processInactivityUpdates - 250000 normalcase 45.499 ms/op 37.731 ms/op 1.21
altair processInactivityUpdates - 250000 worstcase 49.429 ms/op 37.956 ms/op 1.30
phase0 processRegistryUpdates - 250000 normalcase 15.428 us/op 10.425 us/op 1.48
phase0 processRegistryUpdates - 250000 badcase_full_deposits 517.65 us/op 494.39 us/op 1.05
phase0 processRegistryUpdates - 250000 worstcase 0.5 267.79 ms/op 178.59 ms/op 1.50
altair processRewardsAndPenalties - 250000 normalcase 140.84 ms/op 77.097 ms/op 1.83
altair processRewardsAndPenalties - 250000 worstcase 97.682 ms/op 109.74 ms/op 0.89
phase0 getAttestationDeltas - 250000 normalcase 15.028 ms/op 11.800 ms/op 1.27
phase0 getAttestationDeltas - 250000 worstcase 15.856 ms/op 11.879 ms/op 1.33
phase0 processSlashings - 250000 worstcase 6.1776 ms/op 5.1251 ms/op 1.21
altair processSyncCommitteeUpdates - 250000 324.06 ms/op 284.11 ms/op 1.14
BeaconState.hashTreeRoot - No change 545.00 ns/op 523.00 ns/op 1.04
BeaconState.hashTreeRoot - 1 full validator 68.302 us/op 71.498 us/op 0.96
BeaconState.hashTreeRoot - 32 full validator 714.74 us/op 743.58 us/op 0.96
BeaconState.hashTreeRoot - 512 full validator 7.7699 ms/op 6.8234 ms/op 1.14
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 91.044 us/op 90.272 us/op 1.01
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3998 ms/op 1.2495 ms/op 1.12
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.228 ms/op 15.962 ms/op 1.20
BeaconState.hashTreeRoot - 1 balances 69.911 us/op 63.064 us/op 1.11
BeaconState.hashTreeRoot - 32 balances 696.16 us/op 609.62 us/op 1.14
BeaconState.hashTreeRoot - 512 balances 6.9816 ms/op 6.3395 ms/op 1.10
BeaconState.hashTreeRoot - 250000 balances 112.46 ms/op 114.58 ms/op 0.98
aggregationBits - 2048 els - zipIndexesInBitList 35.047 us/op 25.145 us/op 1.39
regular array get 100000 times 77.684 us/op 61.246 us/op 1.27
wrappedArray get 100000 times 77.650 us/op 61.403 us/op 1.26
arrayWithProxy get 100000 times 33.948 ms/op 28.401 ms/op 1.20
ssz.Root.equals 564.00 ns/op 472.00 ns/op 1.19
byteArrayEquals 555.00 ns/op 440.00 ns/op 1.26
shuffle list - 16384 els 13.210 ms/op 11.354 ms/op 1.16
shuffle list - 250000 els 193.36 ms/op 171.15 ms/op 1.13
processSlot - 1 slots 15.272 us/op 12.485 us/op 1.22
processSlot - 32 slots 2.0457 ms/op 1.9391 ms/op 1.05
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 479.36 us/op 363.52 us/op 1.32
getCommitteeAssignments - req 1 vs - 250000 vc 5.8893 ms/op 5.4112 ms/op 1.09
getCommitteeAssignments - req 100 vs - 250000 vc 8.5186 ms/op 7.8216 ms/op 1.09
getCommitteeAssignments - req 1000 vs - 250000 vc 9.1650 ms/op 8.4380 ms/op 1.09
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 10.350 ns/op 8.0600 ns/op 1.28
state getBlockRootAtSlot - 250000 vs - 7PWei 1.2136 us/op 975.42 ns/op 1.24
computeProposers - vc 250000 19.612 ms/op 17.111 ms/op 1.15
computeEpochShuffling - vc 250000 196.81 ms/op 173.59 ms/op 1.13
getNextSyncCommittee - vc 250000 322.02 ms/op 286.85 ms/op 1.12

by benchmarkbot/action

@dapplion dapplion merged commit 514a253 into unstable Oct 5, 2022
@dapplion dapplion deleted the dapplion/datadir-bug branch October 5, 2022 09:55
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.

All lodestar CLI commands are broken if not setting --dataDir
2 participants