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

Return READY on getHealth pre-genesis #4676

Merged
merged 1 commit into from
Oct 20, 2022
Merged

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Oct 20, 2022

Return READY on getHealth pre-genesis

Closes #4619

@g11tech g11tech requested a review from a team as a code owner October 20, 2022 11:07
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: fa613e0 Previous: 7e5c8d4 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.3634 ms/op 2.6166 ms/op 0.90
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 86.739 us/op 85.226 us/op 1.02
BLS verify - blst-native 2.2266 ms/op 1.8577 ms/op 1.20
BLS verifyMultipleSignatures 3 - blst-native 4.5681 ms/op 3.8046 ms/op 1.20
BLS verifyMultipleSignatures 8 - blst-native 9.8262 ms/op 8.1975 ms/op 1.20
BLS verifyMultipleSignatures 32 - blst-native 35.647 ms/op 29.696 ms/op 1.20
BLS aggregatePubkeys 32 - blst-native 47.371 us/op 40.701 us/op 1.16
BLS aggregatePubkeys 128 - blst-native 183.56 us/op 157.12 us/op 1.17
getAttestationsForBlock 104.08 ms/op 101.16 ms/op 1.03
isKnown best case - 1 super set check 520.00 ns/op 432.00 ns/op 1.20
isKnown normal case - 2 super set checks 507.00 ns/op 417.00 ns/op 1.22
isKnown worse case - 16 super set checks 512.00 ns/op 437.00 ns/op 1.17
CheckpointStateCache - add get delete 10.407 us/op 9.3750 us/op 1.11
validate gossip signedAggregateAndProof - struct 5.1047 ms/op 4.2730 ms/op 1.19
validate gossip attestation - struct 2.4515 ms/op 2.0532 ms/op 1.19
pickEth1Vote - no votes 2.5899 ms/op 2.2442 ms/op 1.15
pickEth1Vote - max votes 22.869 ms/op 24.486 ms/op 0.93
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.083 ms/op 11.846 ms/op 1.10
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 23.553 ms/op 23.284 ms/op 1.01
pickEth1Vote - Eth1Data fastSerialize value x2048 1.7421 ms/op 1.6128 ms/op 1.08
pickEth1Vote - Eth1Data fastSerialize tree x2048 14.853 ms/op 16.264 ms/op 0.91
bytes32 toHexString 1.2030 us/op 1.1960 us/op 1.01
bytes32 Buffer.toString(hex) 829.00 ns/op 737.00 ns/op 1.12
bytes32 Buffer.toString(hex) from Uint8Array 1.0910 us/op 997.00 ns/op 1.09
bytes32 Buffer.toString(hex) + 0x 824.00 ns/op 738.00 ns/op 1.12
Object access 1 prop 0.42000 ns/op 0.42500 ns/op 0.99
Map access 1 prop 0.35900 ns/op 0.29700 ns/op 1.21
Object get x1000 21.536 ns/op 18.262 ns/op 1.18
Map get x1000 1.1790 ns/op 0.99400 ns/op 1.19
Object set x1000 141.09 ns/op 132.36 ns/op 1.07
Map set x1000 85.249 ns/op 82.456 ns/op 1.03
Return object 10000 times 0.44970 ns/op 0.37830 ns/op 1.19
Throw Error 10000 times 7.0705 us/op 5.9837 us/op 1.18
fastMsgIdFn sha256 / 200 bytes 5.0040 us/op 4.2840 us/op 1.17
fastMsgIdFn h32 xxhash / 200 bytes 619.00 ns/op 594.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 200 bytes 892.00 ns/op 793.00 ns/op 1.12
fastMsgIdFn sha256 / 1000 bytes 15.871 us/op 13.306 us/op 1.19
fastMsgIdFn h32 xxhash / 1000 bytes 821.00 ns/op 749.00 ns/op 1.10
fastMsgIdFn h64 xxhash / 1000 bytes 877.00 ns/op 788.00 ns/op 1.11
fastMsgIdFn sha256 / 10000 bytes 134.85 us/op 113.52 us/op 1.19
fastMsgIdFn h32 xxhash / 10000 bytes 2.9300 us/op 2.2630 us/op 1.29
fastMsgIdFn h64 xxhash / 10000 bytes 2.1300 us/op 1.7230 us/op 1.24
enrSubnets - fastDeserialize 64 bits 2.9660 us/op 3.2490 us/op 0.91
enrSubnets - ssz BitVector 64 bits 859.00 ns/op 813.00 ns/op 1.06
enrSubnets - fastDeserialize 4 bits 448.00 ns/op 437.00 ns/op 1.03
enrSubnets - ssz BitVector 4 bits 873.00 ns/op 822.00 ns/op 1.06
prioritizePeers score -10:0 att 32-0.1 sync 2-0 111.88 us/op 103.44 us/op 1.08
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 145.79 us/op 124.73 us/op 1.17
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 250.04 us/op 234.45 us/op 1.07
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 531.31 us/op 496.94 us/op 1.07
prioritizePeers score 0:0 att 64-1 sync 4-1 550.08 us/op 467.96 us/op 1.18
RateTracker 1000000 limit, 1 obj count per request 219.36 ns/op 201.68 ns/op 1.09
RateTracker 1000000 limit, 2 obj count per request 165.13 ns/op 153.60 ns/op 1.08
RateTracker 1000000 limit, 4 obj count per request 137.67 ns/op 136.19 ns/op 1.01
RateTracker 1000000 limit, 8 obj count per request 123.65 ns/op 118.88 ns/op 1.04
RateTracker with prune 4.9870 us/op 5.6020 us/op 0.89
array of 16000 items push then shift 3.7713 us/op 3.1995 us/op 1.18
LinkedList of 16000 items push then shift 20.484 ns/op 19.703 ns/op 1.04
array of 16000 items push then pop 263.78 ns/op 253.09 ns/op 1.04
LinkedList of 16000 items push then pop 19.674 ns/op 18.075 ns/op 1.09
array of 24000 items push then shift 5.4672 us/op 4.5659 us/op 1.20
LinkedList of 24000 items push then shift 23.280 ns/op 24.381 ns/op 0.95
array of 24000 items push then pop 239.91 ns/op 216.37 ns/op 1.11
LinkedList of 24000 items push then pop 20.899 ns/op 20.197 ns/op 1.03
intersect bitArray bitLen 8 14.064 ns/op 11.779 ns/op 1.19
intersect array and set length 8 232.85 ns/op 195.16 ns/op 1.19
intersect bitArray bitLen 128 75.264 ns/op 62.240 ns/op 1.21
intersect array and set length 128 2.7949 us/op 2.4457 us/op 1.14
Buffer.concat 32 items 2.8180 ns/op 2.0100 ns/op 1.40
pass gossip attestations to forkchoice per slot 4.8295 ms/op 7.0308 ms/op 0.69
computeDeltas 6.2866 ms/op 6.2228 ms/op 1.01
computeProposerBoostScoreFromBalances 1.0834 ms/op 922.43 us/op 1.17
altair processAttestation - 250000 vs - 7PWei normalcase 4.0624 ms/op 4.6915 ms/op 0.87
altair processAttestation - 250000 vs - 7PWei worstcase 6.3986 ms/op 6.8842 ms/op 0.93
altair processAttestation - setStatus - 1/6 committees join 250.92 us/op 224.37 us/op 1.12
altair processAttestation - setStatus - 1/3 committees join 478.83 us/op 420.17 us/op 1.14
altair processAttestation - setStatus - 1/2 committees join 676.33 us/op 593.29 us/op 1.14
altair processAttestation - setStatus - 2/3 committees join 893.96 us/op 744.61 us/op 1.20
altair processAttestation - setStatus - 4/5 committees join 1.2277 ms/op 1.0502 ms/op 1.17
altair processAttestation - setStatus - 100% committees join 1.4350 ms/op 1.2515 ms/op 1.15
altair processBlock - 250000 vs - 7PWei normalcase 31.698 ms/op 30.262 ms/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase hashState 44.055 ms/op 39.594 ms/op 1.11
altair processBlock - 250000 vs - 7PWei worstcase 93.774 ms/op 88.717 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase hashState 112.96 ms/op 101.74 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei normalcase 4.4200 ms/op 4.0513 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei worstcase 55.762 ms/op 48.464 ms/op 1.15
altair processEth1Data - 250000 vs - 7PWei normalcase 1.0380 ms/op 1.0186 ms/op 1.02
Tree 40 250000 create 879.83 ms/op 969.48 ms/op 0.91
Tree 40 250000 get(125000) 349.95 ns/op 292.08 ns/op 1.20
Tree 40 250000 set(125000) 2.6918 us/op 3.1073 us/op 0.87
Tree 40 250000 toArray() 36.483 ms/op 35.044 ms/op 1.04
Tree 40 250000 iterate all - toArray() + loop 36.611 ms/op 35.303 ms/op 1.04
Tree 40 250000 iterate all - get(i) 129.41 ms/op 115.00 ms/op 1.13
MutableVector 250000 create 16.872 ms/op 17.334 ms/op 0.97
MutableVector 250000 get(125000) 15.913 ns/op 13.101 ns/op 1.21
MutableVector 250000 set(125000) 659.58 ns/op 837.12 ns/op 0.79
MutableVector 250000 toArray() 8.1386 ms/op 8.3316 ms/op 0.98
MutableVector 250000 iterate all - toArray() + loop 8.5504 ms/op 8.5088 ms/op 1.00
MutableVector 250000 iterate all - get(i) 3.9398 ms/op 3.4460 ms/op 1.14
Array 250000 create 8.1646 ms/op 7.8461 ms/op 1.04
Array 250000 clone - spread 4.4553 ms/op 4.5257 ms/op 0.98
Array 250000 get(125000) 1.8160 ns/op 1.9240 ns/op 0.94
Array 250000 set(125000) 1.7640 ns/op 1.9330 ns/op 0.91
Array 250000 iterate all - loop 201.44 us/op 168.18 us/op 1.20
effectiveBalanceIncrements clone Uint8Array 300000 106.26 us/op 121.48 us/op 0.87
effectiveBalanceIncrements clone MutableVector 300000 1.3590 us/op 1.4420 us/op 0.94
effectiveBalanceIncrements rw all Uint8Array 300000 303.20 us/op 252.76 us/op 1.20
effectiveBalanceIncrements rw all MutableVector 300000 240.99 ms/op 291.14 ms/op 0.83
phase0 afterProcessEpoch - 250000 vs - 7PWei 225.94 ms/op 185.75 ms/op 1.22
phase0 beforeProcessEpoch - 250000 vs - 7PWei 117.75 ms/op 122.38 ms/op 0.96
altair processEpoch - mainnet_e81889 680.99 ms/op 615.53 ms/op 1.11
mainnet_e81889 - altair beforeProcessEpoch 199.52 ms/op 159.07 ms/op 1.25
mainnet_e81889 - altair processJustificationAndFinalization 35.315 us/op 26.972 us/op 1.31
mainnet_e81889 - altair processInactivityUpdates 12.729 ms/op 11.973 ms/op 1.06
mainnet_e81889 - altair processRewardsAndPenalties 106.28 ms/op 97.928 ms/op 1.09
mainnet_e81889 - altair processRegistryUpdates 6.7430 us/op 6.3320 us/op 1.06
mainnet_e81889 - altair processSlashings 1.8230 us/op 1.2460 us/op 1.46
mainnet_e81889 - altair processEth1DataReset 1.7280 us/op 1.4940 us/op 1.16
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.9317 ms/op 2.2850 ms/op 1.28
mainnet_e81889 - altair processSlashingsReset 13.714 us/op 6.0210 us/op 2.28
mainnet_e81889 - altair processRandaoMixesReset 11.477 us/op 5.3890 us/op 2.13
mainnet_e81889 - altair processHistoricalRootsUpdate 1.8740 us/op 1.5090 us/op 1.24
mainnet_e81889 - altair processParticipationFlagUpdates 7.1530 us/op 4.0720 us/op 1.76
mainnet_e81889 - altair processSyncCommitteeUpdates 1.6550 us/op 1.0460 us/op 1.58
mainnet_e81889 - altair afterProcessEpoch 236.99 ms/op 195.42 ms/op 1.21
phase0 processEpoch - mainnet_e58758 621.70 ms/op 570.08 ms/op 1.09
mainnet_e58758 - phase0 beforeProcessEpoch 265.13 ms/op 264.97 ms/op 1.00
mainnet_e58758 - phase0 processJustificationAndFinalization 27.522 us/op 28.047 us/op 0.98
mainnet_e58758 - phase0 processRewardsAndPenalties 146.86 ms/op 152.64 ms/op 0.96
mainnet_e58758 - phase0 processRegistryUpdates 16.259 us/op 14.778 us/op 1.10
mainnet_e58758 - phase0 processSlashings 1.7040 us/op 1.1650 us/op 1.46
mainnet_e58758 - phase0 processEth1DataReset 1.8420 us/op 1.4370 us/op 1.28
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.4199 ms/op 2.1436 ms/op 1.13
mainnet_e58758 - phase0 processSlashingsReset 9.1080 us/op 7.0620 us/op 1.29
mainnet_e58758 - phase0 processRandaoMixesReset 11.619 us/op 9.9870 us/op 1.16
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.9500 us/op 1.0090 us/op 1.93
mainnet_e58758 - phase0 processParticipationRecordUpdates 10.987 us/op 8.1310 us/op 1.35
mainnet_e58758 - phase0 afterProcessEpoch 192.46 ms/op 160.29 ms/op 1.20
phase0 processEffectiveBalanceUpdates - 250000 normalcase 3.1135 ms/op 2.5569 ms/op 1.22
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 4.2361 ms/op 3.5229 ms/op 1.20
altair processInactivityUpdates - 250000 normalcase 45.192 ms/op 45.097 ms/op 1.00
altair processInactivityUpdates - 250000 worstcase 54.585 ms/op 58.283 ms/op 0.94
phase0 processRegistryUpdates - 250000 normalcase 15.976 us/op 11.308 us/op 1.41
phase0 processRegistryUpdates - 250000 badcase_full_deposits 520.54 us/op 413.19 us/op 1.26
phase0 processRegistryUpdates - 250000 worstcase 0.5 259.73 ms/op 233.59 ms/op 1.11
altair processRewardsAndPenalties - 250000 normalcase 146.76 ms/op 134.75 ms/op 1.09
altair processRewardsAndPenalties - 250000 worstcase 98.847 ms/op 110.84 ms/op 0.89
phase0 getAttestationDeltas - 250000 normalcase 15.583 ms/op 14.994 ms/op 1.04
phase0 getAttestationDeltas - 250000 worstcase 15.648 ms/op 16.157 ms/op 0.97
phase0 processSlashings - 250000 worstcase 6.5628 ms/op 5.4379 ms/op 1.21
altair processSyncCommitteeUpdates - 250000 331.42 ms/op 298.78 ms/op 1.11
BeaconState.hashTreeRoot - No change 554.00 ns/op 523.00 ns/op 1.06
BeaconState.hashTreeRoot - 1 full validator 72.430 us/op 64.494 us/op 1.12
BeaconState.hashTreeRoot - 32 full validator 1.0316 ms/op 923.22 us/op 1.12
BeaconState.hashTreeRoot - 512 full validator 8.0179 ms/op 6.3268 ms/op 1.27
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 89.190 us/op 77.395 us/op 1.15
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3400 ms/op 1.1836 ms/op 1.13
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.680 ms/op 16.725 ms/op 1.06
BeaconState.hashTreeRoot - 1 balances 67.664 us/op 61.301 us/op 1.10
BeaconState.hashTreeRoot - 32 balances 684.35 us/op 561.27 us/op 1.22
BeaconState.hashTreeRoot - 512 balances 6.8016 ms/op 6.0578 ms/op 1.12
BeaconState.hashTreeRoot - 250000 balances 106.32 ms/op 95.708 ms/op 1.11
aggregationBits - 2048 els - zipIndexesInBitList 37.878 us/op 36.761 us/op 1.03
regular array get 100000 times 80.803 us/op 67.450 us/op 1.20
wrappedArray get 100000 times 80.906 us/op 67.441 us/op 1.20
arrayWithProxy get 100000 times 34.312 ms/op 27.556 ms/op 1.25
ssz.Root.equals 567.00 ns/op 493.00 ns/op 1.15
byteArrayEquals 588.00 ns/op 492.00 ns/op 1.20
shuffle list - 16384 els 13.660 ms/op 11.048 ms/op 1.24
shuffle list - 250000 els 200.43 ms/op 163.04 ms/op 1.23
processSlot - 1 slots 16.372 us/op 13.003 us/op 1.26
processSlot - 32 slots 1.9895 ms/op 1.8369 ms/op 1.08
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 399.69 us/op 402.18 us/op 0.99
getCommitteeAssignments - req 1 vs - 250000 vc 6.3924 ms/op 5.2935 ms/op 1.21
getCommitteeAssignments - req 100 vs - 250000 vc 8.7869 ms/op 7.3363 ms/op 1.20
getCommitteeAssignments - req 1000 vs - 250000 vc 9.4397 ms/op 7.8122 ms/op 1.21
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 12.160 ns/op 9.6300 ns/op 1.26
state getBlockRootAtSlot - 250000 vs - 7PWei 1.3731 us/op 1.3126 us/op 1.05
computeProposers - vc 250000 19.391 ms/op 18.086 ms/op 1.07
computeEpochShuffling - vc 250000 205.35 ms/op 166.38 ms/op 1.23
getNextSyncCommittee - vc 250000 321.27 ms/op 297.63 ms/op 1.08

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 5cec5c6 into unstable Oct 20, 2022
@wemeetagain wemeetagain deleted the g11tech/health-status branch October 20, 2022 17:57
@dapplion
Copy link
Contributor

@g11tech Not sure if that's a proper solution. Why is the internal status syncing? The fact that the return value of the API no longer aligns with what the node has internally could be a real headache when debugging

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.

Lodestar /health endpoint returns SYNCING pre-genesis
3 participants