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: re-add explicit exit after beacon node closed #5748

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jul 12, 2023

Motivation

#5642 is not yet resolved, see #5642 (comment)

Description

Re-adds explicit exit after beacon node closed

This reverts commit 1de881b.

@nflaig nflaig requested a review from a team as a code owner July 12, 2023 07:35
@nflaig nflaig added this to the v1.10.0 milestone Jul 12, 2023
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 1787286 Previous: 0640e06 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 780.25 us/op 722.55 us/op 1.08
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 46.022 us/op 50.966 us/op 0.90
BLS verify - blst-native 1.2201 ms/op 1.2099 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 2.4819 ms/op 2.4622 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst-native 5.4333 ms/op 5.2961 ms/op 1.03
BLS verifyMultipleSignatures 32 - blst-native 19.346 ms/op 18.973 ms/op 1.02
BLS aggregatePubkeys 32 - blst-native 25.877 us/op 25.404 us/op 1.02
BLS aggregatePubkeys 128 - blst-native 101.14 us/op 99.279 us/op 1.02
getAttestationsForBlock 54.736 ms/op 51.664 ms/op 1.06
isKnown best case - 1 super set check 264.00 ns/op 250.00 ns/op 1.06
isKnown normal case - 2 super set checks 251.00 ns/op 245.00 ns/op 1.02
isKnown worse case - 16 super set checks 254.00 ns/op 242.00 ns/op 1.05
CheckpointStateCache - add get delete 5.4770 us/op 5.2940 us/op 1.03
validate gossip signedAggregateAndProof - struct 2.8093 ms/op 2.7449 ms/op 1.02
validate gossip attestation - struct 1.3385 ms/op 1.3171 ms/op 1.02
pickEth1Vote - no votes 1.3132 ms/op 1.2706 ms/op 1.03
pickEth1Vote - max votes 8.8488 ms/op 8.6658 ms/op 1.02
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.6936 ms/op 8.5978 ms/op 1.01
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 15.081 ms/op 13.923 ms/op 1.08
pickEth1Vote - Eth1Data fastSerialize value x2048 664.91 us/op 764.24 us/op 0.87
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.4396 ms/op 4.6987 ms/op 1.80
bytes32 toHexString 591.00 ns/op 488.00 ns/op 1.21
bytes32 Buffer.toString(hex) 411.00 ns/op 352.00 ns/op 1.17
bytes32 Buffer.toString(hex) from Uint8Array 590.00 ns/op 547.00 ns/op 1.08
bytes32 Buffer.toString(hex) + 0x 401.00 ns/op 369.00 ns/op 1.09
Object access 1 prop 0.17100 ns/op 0.16300 ns/op 1.05
Map access 1 prop 0.15600 ns/op 0.15400 ns/op 1.01
Object get x1000 6.2650 ns/op 6.4560 ns/op 0.97
Map get x1000 0.53400 ns/op 0.60600 ns/op 0.88
Object set x1000 51.213 ns/op 52.820 ns/op 0.97
Map set x1000 42.378 ns/op 43.186 ns/op 0.98
Return object 10000 times 0.23790 ns/op 0.23750 ns/op 1.00
Throw Error 10000 times 4.2228 us/op 4.2003 us/op 1.01
fastMsgIdFn sha256 / 200 bytes 3.4220 us/op 3.4860 us/op 0.98
fastMsgIdFn h32 xxhash / 200 bytes 301.00 ns/op 279.00 ns/op 1.08
fastMsgIdFn h64 xxhash / 200 bytes 399.00 ns/op 416.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 11.544 us/op 11.820 us/op 0.98
fastMsgIdFn h32 xxhash / 1000 bytes 423.00 ns/op 430.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 1000 bytes 466.00 ns/op 518.00 ns/op 0.90
fastMsgIdFn sha256 / 10000 bytes 103.46 us/op 102.70 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.9430 us/op 1.9350 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.3850 us/op 1.4120 us/op 0.98
enrSubnets - fastDeserialize 64 bits 1.2720 us/op 1.4150 us/op 0.90
enrSubnets - ssz BitVector 64 bits 480.00 ns/op 508.00 ns/op 0.94
enrSubnets - fastDeserialize 4 bits 170.00 ns/op 167.00 ns/op 1.02
enrSubnets - ssz BitVector 4 bits 487.00 ns/op 504.00 ns/op 0.97
prioritizePeers score -10:0 att 32-0.1 sync 2-0 101.03 us/op 108.56 us/op 0.93
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 126.47 us/op 149.56 us/op 0.85
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 166.28 us/op 184.06 us/op 0.90
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 295.46 us/op 326.56 us/op 0.90
prioritizePeers score 0:0 att 64-1 sync 4-1 348.74 us/op 387.94 us/op 0.90
array of 16000 items push then shift 1.6428 us/op 1.6208 us/op 1.01
LinkedList of 16000 items push then shift 8.8860 ns/op 8.7260 ns/op 1.02
array of 16000 items push then pop 95.745 ns/op 89.386 ns/op 1.07
LinkedList of 16000 items push then pop 8.8510 ns/op 8.5470 ns/op 1.04
array of 24000 items push then shift 2.3932 us/op 2.3338 us/op 1.03
LinkedList of 24000 items push then shift 8.9930 ns/op 8.8320 ns/op 1.02
array of 24000 items push then pop 80.203 ns/op 78.095 ns/op 1.03
LinkedList of 24000 items push then pop 8.8220 ns/op 8.5960 ns/op 1.03
intersect bitArray bitLen 8 13.534 ns/op 12.992 ns/op 1.04
intersect array and set length 8 81.829 ns/op 76.948 ns/op 1.06
intersect bitArray bitLen 128 44.622 ns/op 43.307 ns/op 1.03
intersect array and set length 128 1.0997 us/op 1.0523 us/op 1.05
Buffer.concat 32 items 2.9720 us/op 2.8600 us/op 1.04
Uint8Array.set 32 items 2.5750 us/op 2.6600 us/op 0.97
transfer serialized Status (84 B) 2.0590 us/op 2.1710 us/op 0.95
copy serialized Status (84 B) 1.8740 us/op 1.7290 us/op 1.08
transfer serialized SignedVoluntaryExit (112 B) 2.1520 us/op 2.2310 us/op 0.96
copy serialized SignedVoluntaryExit (112 B) 1.8710 us/op 1.7660 us/op 1.06
transfer serialized ProposerSlashing (416 B) 2.5330 us/op 2.7450 us/op 0.92
copy serialized ProposerSlashing (416 B) 2.7410 us/op 2.9390 us/op 0.93
transfer serialized Attestation (485 B) 3.3140 us/op 2.6330 us/op 1.26
copy serialized Attestation (485 B) 3.5450 us/op 2.8340 us/op 1.25
transfer serialized AttesterSlashing (33232 B) 3.0710 us/op 3.1610 us/op 0.97
copy serialized AttesterSlashing (33232 B) 5.6300 us/op 6.4320 us/op 0.88
transfer serialized Small SignedBeaconBlock (128000 B) 3.2670 us/op 3.3160 us/op 0.99
copy serialized Small SignedBeaconBlock (128000 B) 13.021 us/op 13.398 us/op 0.97
transfer serialized Avg SignedBeaconBlock (200000 B) 3.2260 us/op 3.8530 us/op 0.84
copy serialized Avg SignedBeaconBlock (200000 B) 53.519 us/op 20.728 us/op 2.58
transfer serialized BlobsSidecar (524380 B) 3.2040 us/op 3.1600 us/op 1.01
copy serialized BlobsSidecar (524380 B) 72.025 us/op 162.67 us/op 0.44
transfer serialized Big SignedBeaconBlock (1000000 B) 3.5640 us/op 3.2430 us/op 1.10
copy serialized Big SignedBeaconBlock (1000000 B) 295.21 us/op 334.35 us/op 0.88
pass gossip attestations to forkchoice per slot 2.5296 ms/op 2.7074 ms/op 0.93
forkChoice updateHead vc 100000 bc 64 eq 0 1.9532 ms/op 2.0839 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 0 10.902 ms/op 12.041 ms/op 0.91
forkChoice updateHead vc 1000000 bc 64 eq 0 20.445 ms/op 23.433 ms/op 0.87
forkChoice updateHead vc 600000 bc 320 eq 0 15.680 ms/op 17.425 ms/op 0.90
forkChoice updateHead vc 600000 bc 1200 eq 0 80.316 ms/op 82.391 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 1000 20.254 ms/op 20.712 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 10000 21.760 ms/op 22.637 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 300000 30.662 ms/op 31.471 ms/op 0.97
computeDeltas 3.7614 ms/op 3.4441 ms/op 1.09
computeProposerBoostScoreFromBalances 1.7868 ms/op 1.7941 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 2.3343 ms/op 2.2630 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei worstcase 3.3217 ms/op 4.1173 ms/op 0.81
altair processAttestation - setStatus - 1/6 committees join 138.74 us/op 160.38 us/op 0.87
altair processAttestation - setStatus - 1/3 committees join 278.46 us/op 326.01 us/op 0.85
altair processAttestation - setStatus - 1/2 committees join 379.24 us/op 423.07 us/op 0.90
altair processAttestation - setStatus - 2/3 committees join 469.00 us/op 529.87 us/op 0.89
altair processAttestation - setStatus - 4/5 committees join 655.72 us/op 732.29 us/op 0.90
altair processAttestation - setStatus - 100% committees join 762.62 us/op 863.09 us/op 0.88
altair processBlock - 250000 vs - 7PWei normalcase 17.249 ms/op 19.676 ms/op 0.88
altair processBlock - 250000 vs - 7PWei normalcase hashState 27.494 ms/op 27.022 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase 49.345 ms/op 52.374 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 73.374 ms/op 67.690 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3734 ms/op 2.1362 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei worstcase 30.612 ms/op 29.766 ms/op 1.03
altair processEth1Data - 250000 vs - 7PWei normalcase 557.85 us/op 591.62 us/op 0.94
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.6470 us/op 8.4080 us/op 1.03
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 28.604 us/op 28.059 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.330 us/op 11.063 us/op 0.93
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.1060 us/op 8.5360 us/op 1.07
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 105.84 us/op 103.63 us/op 1.02
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 628.00 us/op 738.66 us/op 0.85
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 900.08 us/op 945.04 us/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 869.52 us/op 944.23 us/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3429 ms/op 2.5559 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6295 ms/op 1.7676 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8150 ms/op 4.4739 ms/op 0.85
Tree 40 250000 create 290.12 ms/op 337.13 ms/op 0.86
Tree 40 250000 get(125000) 181.93 ns/op 203.34 ns/op 0.89
Tree 40 250000 set(125000) 925.89 ns/op 992.90 ns/op 0.93
Tree 40 250000 toArray() 16.987 ms/op 23.676 ms/op 0.72
Tree 40 250000 iterate all - toArray() + loop 17.039 ms/op 23.708 ms/op 0.72
Tree 40 250000 iterate all - get(i) 67.791 ms/op 81.862 ms/op 0.83
MutableVector 250000 create 10.586 ms/op 11.138 ms/op 0.95
MutableVector 250000 get(125000) 6.3510 ns/op 6.2370 ns/op 1.02
MutableVector 250000 set(125000) 241.12 ns/op 292.70 ns/op 0.82
MutableVector 250000 toArray() 2.7236 ms/op 3.7693 ms/op 0.72
MutableVector 250000 iterate all - toArray() + loop 2.8009 ms/op 3.5122 ms/op 0.80
MutableVector 250000 iterate all - get(i) 1.5102 ms/op 1.5488 ms/op 0.98
Array 250000 create 2.5097 ms/op 3.1029 ms/op 0.81
Array 250000 clone - spread 1.0706 ms/op 1.0942 ms/op 0.98
Array 250000 get(125000) 0.53900 ns/op 0.54600 ns/op 0.99
Array 250000 set(125000) 0.60700 ns/op 0.63500 ns/op 0.96
Array 250000 iterate all - loop 100.47 us/op 105.85 us/op 0.95
effectiveBalanceIncrements clone Uint8Array 300000 25.167 us/op 36.549 us/op 0.69
effectiveBalanceIncrements clone MutableVector 300000 327.00 ns/op 320.00 ns/op 1.02
effectiveBalanceIncrements rw all Uint8Array 300000 165.96 us/op 169.52 us/op 0.98
effectiveBalanceIncrements rw all MutableVector 300000 77.357 ms/op 79.809 ms/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 111.57 ms/op 115.54 ms/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 40.395 ms/op 44.318 ms/op 0.91
altair processEpoch - mainnet_e81889 298.51 ms/op 331.06 ms/op 0.90
mainnet_e81889 - altair beforeProcessEpoch 63.834 ms/op 71.388 ms/op 0.89
mainnet_e81889 - altair processJustificationAndFinalization 16.648 us/op 18.892 us/op 0.88
mainnet_e81889 - altair processInactivityUpdates 4.9896 ms/op 5.1671 ms/op 0.97
mainnet_e81889 - altair processRewardsAndPenalties 67.952 ms/op 49.696 ms/op 1.37
mainnet_e81889 - altair processRegistryUpdates 2.8190 us/op 2.8790 us/op 0.98
mainnet_e81889 - altair processSlashings 590.00 ns/op 638.00 ns/op 0.92
mainnet_e81889 - altair processEth1DataReset 597.00 ns/op 705.00 ns/op 0.85
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2127 ms/op 1.2588 ms/op 0.96
mainnet_e81889 - altair processSlashingsReset 3.6960 us/op 4.9450 us/op 0.75
mainnet_e81889 - altair processRandaoMixesReset 4.8570 us/op 5.0720 us/op 0.96
mainnet_e81889 - altair processHistoricalRootsUpdate 777.00 ns/op 1.3220 us/op 0.59
mainnet_e81889 - altair processParticipationFlagUpdates 2.6830 us/op 5.1570 us/op 0.52
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0490 us/op 732.00 ns/op 1.43
mainnet_e81889 - altair afterProcessEpoch 115.06 ms/op 126.64 ms/op 0.91
phase0 processEpoch - mainnet_e58758 353.40 ms/op 419.58 ms/op 0.84
mainnet_e58758 - phase0 beforeProcessEpoch 129.24 ms/op 190.70 ms/op 0.68
mainnet_e58758 - phase0 processJustificationAndFinalization 17.066 us/op 32.517 us/op 0.52
mainnet_e58758 - phase0 processRewardsAndPenalties 64.152 ms/op 78.813 ms/op 0.81
mainnet_e58758 - phase0 processRegistryUpdates 7.9470 us/op 15.317 us/op 0.52
mainnet_e58758 - phase0 processSlashings 523.00 ns/op 1.4340 us/op 0.36
mainnet_e58758 - phase0 processEth1DataReset 518.00 ns/op 1.6720 us/op 0.31
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 941.90 us/op 1.7791 ms/op 0.53
mainnet_e58758 - phase0 processSlashingsReset 4.4050 us/op 9.8430 us/op 0.45
mainnet_e58758 - phase0 processRandaoMixesReset 4.7740 us/op 11.827 us/op 0.40
mainnet_e58758 - phase0 processHistoricalRootsUpdate 731.00 ns/op 1.8140 us/op 0.40
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.2370 us/op 11.853 us/op 0.36
mainnet_e58758 - phase0 afterProcessEpoch 97.634 ms/op 114.29 ms/op 0.85
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1965 ms/op 1.4476 ms/op 0.83
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4666 ms/op 1.6061 ms/op 0.91
altair processInactivityUpdates - 250000 normalcase 24.904 ms/op 32.683 ms/op 0.76
altair processInactivityUpdates - 250000 worstcase 26.506 ms/op 28.364 ms/op 0.93
phase0 processRegistryUpdates - 250000 normalcase 6.8410 us/op 8.0280 us/op 0.85
phase0 processRegistryUpdates - 250000 badcase_full_deposits 232.32 us/op 268.56 us/op 0.87
phase0 processRegistryUpdates - 250000 worstcase 0.5 132.92 ms/op 126.41 ms/op 1.05
altair processRewardsAndPenalties - 250000 normalcase 68.862 ms/op 68.237 ms/op 1.01
altair processRewardsAndPenalties - 250000 worstcase 69.444 ms/op 66.482 ms/op 1.04
phase0 getAttestationDeltas - 250000 normalcase 6.7285 ms/op 6.9815 ms/op 0.96
phase0 getAttestationDeltas - 250000 worstcase 6.5442 ms/op 6.6758 ms/op 0.98
phase0 processSlashings - 250000 worstcase 3.5188 ms/op 4.1016 ms/op 0.86
altair processSyncCommitteeUpdates - 250000 172.07 ms/op 188.68 ms/op 0.91
BeaconState.hashTreeRoot - No change 317.00 ns/op 329.00 ns/op 0.96
BeaconState.hashTreeRoot - 1 full validator 51.548 us/op 54.817 us/op 0.94
BeaconState.hashTreeRoot - 32 full validator 484.77 us/op 511.89 us/op 0.95
BeaconState.hashTreeRoot - 512 full validator 5.5039 ms/op 5.4587 ms/op 1.01
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 59.693 us/op 64.516 us/op 0.93
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 923.25 us/op 917.89 us/op 1.01
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.265 ms/op 12.179 ms/op 0.92
BeaconState.hashTreeRoot - 1 balances 50.743 us/op 49.807 us/op 1.02
BeaconState.hashTreeRoot - 32 balances 417.76 us/op 488.40 us/op 0.86
BeaconState.hashTreeRoot - 512 balances 4.2351 ms/op 4.6945 ms/op 0.90
BeaconState.hashTreeRoot - 250000 balances 75.081 ms/op 75.573 ms/op 0.99
aggregationBits - 2048 els - zipIndexesInBitList 14.977 us/op 18.932 us/op 0.79
regular array get 100000 times 31.930 us/op 41.191 us/op 0.78
wrappedArray get 100000 times 31.877 us/op 40.435 us/op 0.79
arrayWithProxy get 100000 times 15.970 ms/op 17.372 ms/op 0.92
ssz.Root.equals 544.00 ns/op 608.00 ns/op 0.89
byteArrayEquals 534.00 ns/op 552.00 ns/op 0.97
shuffle list - 16384 els 6.6645 ms/op 6.8656 ms/op 0.97
shuffle list - 250000 els 100.27 ms/op 102.53 ms/op 0.98
processSlot - 1 slots 7.9750 us/op 8.8260 us/op 0.90
processSlot - 32 slots 1.3382 ms/op 1.3445 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.630 ms/op 36.833 ms/op 1.02
getCommitteeAssignments - req 1 vs - 250000 vc 2.8763 ms/op 2.9121 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 4.1590 ms/op 4.1207 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4816 ms/op 4.4535 ms/op 1.01
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7700 ns/op 4.6900 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 620.97 ns/op 608.17 ns/op 1.02
computeProposers - vc 250000 10.655 ms/op 10.644 ms/op 1.00
computeEpochShuffling - vc 250000 102.98 ms/op 102.21 ms/op 1.01
getNextSyncCommittee - vc 250000 176.51 ms/op 175.05 ms/op 1.01
computeSigningRoot for AttestationData 13.415 us/op 13.191 us/op 1.02
hash AttestationData serialized data then Buffer.toString(base64) 2.4793 us/op 2.5016 us/op 0.99
toHexString serialized data 1.1170 us/op 1.1660 us/op 0.96
Buffer.toString(base64) 358.35 ns/op 349.85 ns/op 1.02

by benchmarkbot/action

@nflaig nflaig merged commit 7e34c46 into unstable Jul 12, 2023
12 checks passed
@nflaig nflaig deleted the nflaig/readd-explicit-exit branch July 12, 2023 13:51
@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.

None yet

3 participants