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: remove explicit exit after beacon node closed #5735

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jul 7, 2023

Motivation

Issue seems to be resolved

Description

Remove explicit exit after beacon node closed.

Reverts temporary fix

@nflaig nflaig requested a review from a team as a code owner July 7, 2023 10:36
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: f17951e Previous: 7280234 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0124 ms/op 812.56 us/op 1.25
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 58.756 us/op 44.131 us/op 1.33
BLS verify - blst-native 1.2828 ms/op 1.1792 ms/op 1.09
BLS verifyMultipleSignatures 3 - blst-native 2.5870 ms/op 2.4386 ms/op 1.06
BLS verifyMultipleSignatures 8 - blst-native 5.5625 ms/op 5.2570 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst-native 20.081 ms/op 18.932 ms/op 1.06
BLS aggregatePubkeys 32 - blst-native 27.575 us/op 25.128 us/op 1.10
BLS aggregatePubkeys 128 - blst-native 106.69 us/op 97.730 us/op 1.09
getAttestationsForBlock 70.893 ms/op 50.857 ms/op 1.39
isKnown best case - 1 super set check 288.00 ns/op 244.00 ns/op 1.18
isKnown normal case - 2 super set checks 266.00 ns/op 239.00 ns/op 1.11
isKnown worse case - 16 super set checks 264.00 ns/op 240.00 ns/op 1.10
CheckpointStateCache - add get delete 6.1140 us/op 5.0240 us/op 1.22
validate gossip signedAggregateAndProof - struct 2.9277 ms/op 2.7377 ms/op 1.07
validate gossip attestation - struct 1.3728 ms/op 1.2973 ms/op 1.06
pickEth1Vote - no votes 1.4136 ms/op 1.1931 ms/op 1.18
pickEth1Vote - max votes 12.875 ms/op 9.3161 ms/op 1.38
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.239 ms/op 8.8012 ms/op 1.16
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.044 ms/op 14.635 ms/op 1.23
pickEth1Vote - Eth1Data fastSerialize value x2048 794.83 us/op 641.03 us/op 1.24
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.1140 ms/op 7.7108 ms/op 0.79
bytes32 toHexString 786.00 ns/op 475.00 ns/op 1.65
bytes32 Buffer.toString(hex) 436.00 ns/op 345.00 ns/op 1.26
bytes32 Buffer.toString(hex) from Uint8Array 671.00 ns/op 546.00 ns/op 1.23
bytes32 Buffer.toString(hex) + 0x 458.00 ns/op 345.00 ns/op 1.33
Object access 1 prop 0.20100 ns/op 0.16000 ns/op 1.26
Map access 1 prop 0.16800 ns/op 0.15600 ns/op 1.08
Object get x1000 7.1940 ns/op 6.5690 ns/op 1.10
Map get x1000 0.62500 ns/op 0.53100 ns/op 1.18
Object set x1000 75.281 ns/op 50.499 ns/op 1.49
Map set x1000 58.545 ns/op 42.182 ns/op 1.39
Return object 10000 times 0.26790 ns/op 0.23020 ns/op 1.16
Throw Error 10000 times 4.4959 us/op 4.1203 us/op 1.09
fastMsgIdFn sha256 / 200 bytes 3.7410 us/op 3.3560 us/op 1.11
fastMsgIdFn h32 xxhash / 200 bytes 351.00 ns/op 283.00 ns/op 1.24
fastMsgIdFn h64 xxhash / 200 bytes 538.00 ns/op 384.00 ns/op 1.40
fastMsgIdFn sha256 / 1000 bytes 13.710 us/op 11.266 us/op 1.22
fastMsgIdFn h32 xxhash / 1000 bytes 537.00 ns/op 408.00 ns/op 1.32
fastMsgIdFn h64 xxhash / 1000 bytes 609.00 ns/op 448.00 ns/op 1.36
fastMsgIdFn sha256 / 10000 bytes 111.88 us/op 101.00 us/op 1.11
fastMsgIdFn h32 xxhash / 10000 bytes 2.1320 us/op 1.8730 us/op 1.14
fastMsgIdFn h64 xxhash / 10000 bytes 1.6080 us/op 1.3180 us/op 1.22
enrSubnets - fastDeserialize 64 bits 1.9560 us/op 1.2340 us/op 1.59
enrSubnets - ssz BitVector 64 bits 662.00 ns/op 493.00 ns/op 1.34
enrSubnets - fastDeserialize 4 bits 244.00 ns/op 168.00 ns/op 1.45
enrSubnets - ssz BitVector 4 bits 688.00 ns/op 474.00 ns/op 1.45
prioritizePeers score -10:0 att 32-0.1 sync 2-0 144.14 us/op 106.36 us/op 1.36
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 178.01 us/op 129.73 us/op 1.37
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 212.33 us/op 167.02 us/op 1.27
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 389.18 us/op 303.27 us/op 1.28
prioritizePeers score 0:0 att 64-1 sync 4-1 454.33 us/op 369.17 us/op 1.23
array of 16000 items push then shift 1.7493 us/op 1.6265 us/op 1.08
LinkedList of 16000 items push then shift 9.9640 ns/op 8.7660 ns/op 1.14
array of 16000 items push then pop 126.97 ns/op 79.978 ns/op 1.59
LinkedList of 16000 items push then pop 11.219 ns/op 8.4240 ns/op 1.33
array of 24000 items push then shift 2.5780 us/op 2.2852 us/op 1.13
LinkedList of 24000 items push then shift 12.613 ns/op 8.7510 ns/op 1.44
array of 24000 items push then pop 98.020 ns/op 73.563 ns/op 1.33
LinkedList of 24000 items push then pop 10.481 ns/op 8.4590 ns/op 1.24
intersect bitArray bitLen 8 15.276 ns/op 13.126 ns/op 1.16
intersect array and set length 8 120.95 ns/op 76.548 ns/op 1.58
intersect bitArray bitLen 128 51.287 ns/op 43.577 ns/op 1.18
intersect array and set length 128 1.3918 us/op 1.0429 us/op 1.33
Buffer.concat 32 items 3.7330 us/op 2.8940 us/op 1.29
Uint8Array.set 32 items 3.3230 us/op 2.6410 us/op 1.26
transfer serialized Status (84 B) 2.4390 us/op 2.1530 us/op 1.13
copy serialized Status (84 B) 1.9870 us/op 1.8490 us/op 1.07
transfer serialized SignedVoluntaryExit (112 B) 2.6060 us/op 2.1450 us/op 1.21
copy serialized SignedVoluntaryExit (112 B) 2.0620 us/op 1.8860 us/op 1.09
transfer serialized ProposerSlashing (416 B) 3.0080 us/op 2.4460 us/op 1.23
copy serialized ProposerSlashing (416 B) 2.5750 us/op 2.7020 us/op 0.95
transfer serialized Attestation (485 B) 3.4660 us/op 2.6650 us/op 1.30
copy serialized Attestation (485 B) 2.8160 us/op 2.5130 us/op 1.12
transfer serialized AttesterSlashing (33232 B) 3.3530 us/op 2.6320 us/op 1.27
copy serialized AttesterSlashing (33232 B) 10.511 us/op 5.5260 us/op 1.90
transfer serialized Small SignedBeaconBlock (128000 B) 3.9370 us/op 3.4740 us/op 1.13
copy serialized Small SignedBeaconBlock (128000 B) 39.100 us/op 14.640 us/op 2.67
transfer serialized Avg SignedBeaconBlock (200000 B) 4.6290 us/op 3.9030 us/op 1.19
copy serialized Avg SignedBeaconBlock (200000 B) 53.523 us/op 20.665 us/op 2.59
transfer serialized BlobsSidecar (524380 B) 5.5870 us/op 3.6540 us/op 1.53
copy serialized BlobsSidecar (524380 B) 149.66 us/op 162.59 us/op 0.92
transfer serialized Big SignedBeaconBlock (1000000 B) 5.9270 us/op 4.0420 us/op 1.47
copy serialized Big SignedBeaconBlock (1000000 B) 487.44 us/op 290.78 us/op 1.68
pass gossip attestations to forkchoice per slot 2.9869 ms/op 2.6150 ms/op 1.14
forkChoice updateHead vc 100000 bc 64 eq 0 2.2114 ms/op 2.0258 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 0 15.296 ms/op 11.615 ms/op 1.32
forkChoice updateHead vc 1000000 bc 64 eq 0 30.300 ms/op 21.879 ms/op 1.38
forkChoice updateHead vc 600000 bc 320 eq 0 23.338 ms/op 16.181 ms/op 1.44
forkChoice updateHead vc 600000 bc 1200 eq 0 117.67 ms/op 78.970 ms/op 1.49
forkChoice updateHead vc 600000 bc 64 eq 1000 27.062 ms/op 20.653 ms/op 1.31
forkChoice updateHead vc 600000 bc 64 eq 10000 25.664 ms/op 23.202 ms/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 300000 75.434 ms/op 32.051 ms/op 2.35
computeDeltas 3.9082 ms/op 3.2616 ms/op 1.20
computeProposerBoostScoreFromBalances 1.8024 ms/op 1.7945 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 2.1305 ms/op 2.1414 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei worstcase 3.3037 ms/op 3.3209 ms/op 0.99
altair processAttestation - setStatus - 1/6 committees join 141.01 us/op 148.69 us/op 0.95
altair processAttestation - setStatus - 1/3 committees join 272.38 us/op 293.80 us/op 0.93
altair processAttestation - setStatus - 1/2 committees join 370.67 us/op 380.35 us/op 0.97
altair processAttestation - setStatus - 2/3 committees join 463.68 us/op 471.12 us/op 0.98
altair processAttestation - setStatus - 4/5 committees join 639.45 us/op 667.56 us/op 0.96
altair processAttestation - setStatus - 100% committees join 734.15 us/op 773.69 us/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 18.767 ms/op 17.322 ms/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.710 ms/op 25.538 ms/op 1.01
altair processBlock - 250000 vs - 7PWei worstcase 46.163 ms/op 48.813 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase hashState 65.366 ms/op 74.062 ms/op 0.88
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0897 ms/op 2.2865 ms/op 0.91
phase0 processBlock - 250000 vs - 7PWei worstcase 27.604 ms/op 30.244 ms/op 0.91
altair processEth1Data - 250000 vs - 7PWei normalcase 466.23 us/op 528.83 us/op 0.88
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.9230 us/op 8.4510 us/op 0.82
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 19.301 us/op 26.369 us/op 0.73
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.7800 us/op 10.376 us/op 0.85
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.6000 us/op 7.8560 us/op 0.84
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 74.313 us/op 96.095 us/op 0.77
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 615.96 us/op 641.75 us/op 0.96
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 907.12 us/op 898.00 us/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 885.45 us/op 880.80 us/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3681 ms/op 2.3355 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.7039 ms/op 1.5642 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8993 ms/op 4.0209 ms/op 0.97
Tree 40 250000 create 296.86 ms/op 323.25 ms/op 0.92
Tree 40 250000 get(125000) 174.53 ns/op 191.10 ns/op 0.91
Tree 40 250000 set(125000) 883.40 ns/op 990.34 ns/op 0.89
Tree 40 250000 toArray() 17.111 ms/op 21.304 ms/op 0.80
Tree 40 250000 iterate all - toArray() + loop 17.219 ms/op 20.367 ms/op 0.85
Tree 40 250000 iterate all - get(i) 68.124 ms/op 73.760 ms/op 0.92
MutableVector 250000 create 10.750 ms/op 11.141 ms/op 0.96
MutableVector 250000 get(125000) 6.2760 ns/op 6.3670 ns/op 0.99
MutableVector 250000 set(125000) 245.16 ns/op 262.45 ns/op 0.93
MutableVector 250000 toArray() 2.6691 ms/op 3.0939 ms/op 0.86
MutableVector 250000 iterate all - toArray() + loop 2.7867 ms/op 3.3476 ms/op 0.83
MutableVector 250000 iterate all - get(i) 1.5281 ms/op 1.6137 ms/op 0.95
Array 250000 create 3.1813 ms/op 2.7015 ms/op 1.18
Array 250000 clone - spread 1.2540 ms/op 1.2445 ms/op 1.01
Array 250000 get(125000) 0.63200 ns/op 0.62100 ns/op 1.02
Array 250000 set(125000) 0.70700 ns/op 0.69800 ns/op 1.01
Array 250000 iterate all - loop 111.51 us/op 101.49 us/op 1.10
effectiveBalanceIncrements clone Uint8Array 300000 37.128 us/op 36.199 us/op 1.03
effectiveBalanceIncrements clone MutableVector 300000 399.00 ns/op 389.00 ns/op 1.03
effectiveBalanceIncrements rw all Uint8Array 300000 170.75 us/op 166.53 us/op 1.03
effectiveBalanceIncrements rw all MutableVector 300000 88.214 ms/op 86.132 ms/op 1.02
phase0 afterProcessEpoch - 250000 vs - 7PWei 116.83 ms/op 120.87 ms/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 34.876 ms/op 34.815 ms/op 1.00
altair processEpoch - mainnet_e81889 323.91 ms/op 330.33 ms/op 0.98
mainnet_e81889 - altair beforeProcessEpoch 54.837 ms/op 64.746 ms/op 0.85
mainnet_e81889 - altair processJustificationAndFinalization 16.276 us/op 19.988 us/op 0.81
mainnet_e81889 - altair processInactivityUpdates 5.4359 ms/op 5.4461 ms/op 1.00
mainnet_e81889 - altair processRewardsAndPenalties 64.856 ms/op 47.303 ms/op 1.37
mainnet_e81889 - altair processRegistryUpdates 3.4280 us/op 2.7740 us/op 1.24
mainnet_e81889 - altair processSlashings 476.00 ns/op 443.00 ns/op 1.07
mainnet_e81889 - altair processEth1DataReset 543.00 ns/op 519.00 ns/op 1.05
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2480 ms/op 1.2514 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 10.941 us/op 4.5120 us/op 2.42
mainnet_e81889 - altair processRandaoMixesReset 4.5860 us/op 4.6690 us/op 0.98
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0910 us/op 1.2520 us/op 0.87
mainnet_e81889 - altair processParticipationFlagUpdates 2.2850 us/op 2.3480 us/op 0.97
mainnet_e81889 - altair processSyncCommitteeUpdates 670.00 ns/op 459.00 ns/op 1.46
mainnet_e81889 - altair afterProcessEpoch 129.38 ms/op 128.23 ms/op 1.01
phase0 processEpoch - mainnet_e58758 378.23 ms/op 347.03 ms/op 1.09
mainnet_e58758 - phase0 beforeProcessEpoch 145.77 ms/op 139.95 ms/op 1.04
mainnet_e58758 - phase0 processJustificationAndFinalization 17.762 us/op 18.467 us/op 0.96
mainnet_e58758 - phase0 processRewardsAndPenalties 63.940 ms/op 67.737 ms/op 0.94
mainnet_e58758 - phase0 processRegistryUpdates 7.3730 us/op 9.1230 us/op 0.81
mainnet_e58758 - phase0 processSlashings 516.00 ns/op 516.00 ns/op 1.00
mainnet_e58758 - phase0 processEth1DataReset 522.00 ns/op 594.00 ns/op 0.88
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 980.17 us/op 1.2629 ms/op 0.78
mainnet_e58758 - phase0 processSlashingsReset 3.3120 us/op 3.8650 us/op 0.86
mainnet_e58758 - phase0 processRandaoMixesReset 5.2410 us/op 5.0810 us/op 1.03
mainnet_e58758 - phase0 processHistoricalRootsUpdate 836.00 ns/op 700.00 ns/op 1.19
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.4160 us/op 3.9170 us/op 1.13
mainnet_e58758 - phase0 afterProcessEpoch 94.676 ms/op 98.907 ms/op 0.96
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1968 ms/op 1.2668 ms/op 0.94
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5264 ms/op 1.5338 ms/op 1.00
altair processInactivityUpdates - 250000 normalcase 24.446 ms/op 23.714 ms/op 1.03
altair processInactivityUpdates - 250000 worstcase 26.095 ms/op 26.503 ms/op 0.98
phase0 processRegistryUpdates - 250000 normalcase 6.9050 us/op 7.9770 us/op 0.87
phase0 processRegistryUpdates - 250000 badcase_full_deposits 220.16 us/op 263.92 us/op 0.83
phase0 processRegistryUpdates - 250000 worstcase 0.5 124.03 ms/op 131.83 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 64.632 ms/op 68.738 ms/op 0.94
altair processRewardsAndPenalties - 250000 worstcase 68.756 ms/op 68.709 ms/op 1.00
phase0 getAttestationDeltas - 250000 normalcase 6.5202 ms/op 7.1081 ms/op 0.92
phase0 getAttestationDeltas - 250000 worstcase 6.3586 ms/op 7.1083 ms/op 0.89
phase0 processSlashings - 250000 worstcase 3.5267 ms/op 3.4215 ms/op 1.03
altair processSyncCommitteeUpdates - 250000 174.50 ms/op 180.97 ms/op 0.96
BeaconState.hashTreeRoot - No change 327.00 ns/op 323.00 ns/op 1.01
BeaconState.hashTreeRoot - 1 full validator 50.713 us/op 51.916 us/op 0.98
BeaconState.hashTreeRoot - 32 full validator 517.55 us/op 479.09 us/op 1.08
BeaconState.hashTreeRoot - 512 full validator 4.8590 ms/op 5.4644 ms/op 0.89
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 61.197 us/op 62.493 us/op 0.98
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 872.42 us/op 919.07 us/op 0.95
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.039 ms/op 11.323 ms/op 0.97
BeaconState.hashTreeRoot - 1 balances 46.175 us/op 47.948 us/op 0.96
BeaconState.hashTreeRoot - 32 balances 455.10 us/op 447.93 us/op 1.02
BeaconState.hashTreeRoot - 512 balances 4.3546 ms/op 4.4318 ms/op 0.98
BeaconState.hashTreeRoot - 250000 balances 74.542 ms/op 74.324 ms/op 1.00
aggregationBits - 2048 els - zipIndexesInBitList 14.608 us/op 15.770 us/op 0.93
regular array get 100000 times 31.716 us/op 42.880 us/op 0.74
wrappedArray get 100000 times 31.605 us/op 32.593 us/op 0.97
arrayWithProxy get 100000 times 15.206 ms/op 15.356 ms/op 0.99
ssz.Root.equals 518.00 ns/op 534.00 ns/op 0.97
byteArrayEquals 505.00 ns/op 529.00 ns/op 0.95
shuffle list - 16384 els 6.6333 ms/op 6.7706 ms/op 0.98
shuffle list - 250000 els 97.412 ms/op 99.294 ms/op 0.98
processSlot - 1 slots 8.4270 us/op 8.6510 us/op 0.97
processSlot - 32 slots 1.3142 ms/op 1.3138 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.137 ms/op 34.984 ms/op 1.06
getCommitteeAssignments - req 1 vs - 250000 vc 2.8795 ms/op 2.8906 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 4.0928 ms/op 4.1416 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4239 ms/op 4.5048 ms/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5500 ns/op 4.8500 ns/op 0.94
state getBlockRootAtSlot - 250000 vs - 7PWei 696.88 ns/op 841.47 ns/op 0.83
computeProposers - vc 250000 10.416 ms/op 11.276 ms/op 0.92
computeEpochShuffling - vc 250000 103.50 ms/op 103.83 ms/op 1.00
getNextSyncCommittee - vc 250000 175.82 ms/op 181.93 ms/op 0.97
computeSigningRoot for AttestationData 13.543 us/op 14.057 us/op 0.96
hash AttestationData serialized data then Buffer.toString(base64) 2.3545 us/op 2.5242 us/op 0.93
toHexString serialized data 1.0434 us/op 1.0898 us/op 0.96
Buffer.toString(base64) 307.47 ns/op 340.46 ns/op 0.90

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 1de881b into unstable Jul 7, 2023
11 checks passed
@wemeetagain wemeetagain deleted the nflaig/no-explicit-exit branch July 7, 2023 12:13
@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