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: properly handle exit signal if binary is used with systemd #7453

Merged
merged 7 commits into from
Feb 12, 2025

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Feb 11, 2025

Closes #7447

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.25%. Comparing base (3a27149) to head (59b55ba).
Report is 7 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7453   +/-   ##
=========================================
  Coverage     50.25%   50.25%           
=========================================
  Files           602      602           
  Lines         40403    40401    -2     
  Branches       2204     2204           
=========================================
- Hits          20306    20305    -1     
+ Misses        20057    20056    -1     
  Partials         40       40           

Copy link
Contributor

github-actions bot commented Feb 11, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 32e3c5d Previous: 2247c16 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 972.67 us/op 1.0426 ms/op 0.93
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 36.711 us/op 38.958 us/op 0.94
BLS verify - blst 1.2966 ms/op 916.83 us/op 1.41
BLS verifyMultipleSignatures 3 - blst 2.2410 ms/op 1.3465 ms/op 1.66
BLS verifyMultipleSignatures 8 - blst 1.8536 ms/op 1.8293 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst 7.3812 ms/op 5.6742 ms/op 1.30
BLS verifyMultipleSignatures 64 - blst 10.735 ms/op 9.6522 ms/op 1.11
BLS verifyMultipleSignatures 128 - blst 17.206 ms/op 17.555 ms/op 0.98
BLS deserializing 10000 signatures 670.72 ms/op 703.82 ms/op 0.95
BLS deserializing 100000 signatures 6.6784 s/op 6.9929 s/op 0.96
BLS verifyMultipleSignatures - same message - 3 - blst 1.0565 ms/op 944.91 us/op 1.12
BLS verifyMultipleSignatures - same message - 8 - blst 1.0982 ms/op 1.1131 ms/op 0.99
BLS verifyMultipleSignatures - same message - 32 - blst 1.6797 ms/op 1.7942 ms/op 0.94
BLS verifyMultipleSignatures - same message - 64 - blst 2.6588 ms/op 2.6465 ms/op 1.00
BLS verifyMultipleSignatures - same message - 128 - blst 4.4587 ms/op 4.4026 ms/op 1.01
BLS aggregatePubkeys 32 - blst 19.306 us/op 22.347 us/op 0.86
BLS aggregatePubkeys 128 - blst 69.213 us/op 78.363 us/op 0.88
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 54.194 ms/op 47.783 ms/op 1.13
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 50.724 ms/op 43.681 ms/op 1.16
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 41.359 ms/op 36.444 ms/op 1.13
getSlashingsAndExits - default max 74.387 us/op 74.540 us/op 1.00
getSlashingsAndExits - 2k 281.22 us/op 359.27 us/op 0.78
proposeBlockBody type=full, size=empty 5.1758 ms/op 5.2584 ms/op 0.98
isKnown best case - 1 super set check 196.00 ns/op 206.00 ns/op 0.95
isKnown normal case - 2 super set checks 193.00 ns/op 202.00 ns/op 0.96
isKnown worse case - 16 super set checks 192.00 ns/op 203.00 ns/op 0.95
InMemoryCheckpointStateCache - add get delete 2.3550 us/op 2.3980 us/op 0.98
validate api signedAggregateAndProof - struct 2.0308 ms/op 1.6108 ms/op 1.26
validate gossip signedAggregateAndProof - struct 2.5956 ms/op 1.9862 ms/op 1.31
batch validate gossip attestation - vc 640000 - chunk 32 121.17 us/op 132.71 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 64 106.75 us/op 119.47 us/op 0.89
batch validate gossip attestation - vc 640000 - chunk 128 93.490 us/op 113.54 us/op 0.82
batch validate gossip attestation - vc 640000 - chunk 256 94.906 us/op 116.68 us/op 0.81
pickEth1Vote - no votes 923.21 us/op 992.75 us/op 0.93
pickEth1Vote - max votes 5.2499 ms/op 9.7866 ms/op 0.54
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.704 ms/op 14.323 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.126 ms/op 21.023 ms/op 1.34
pickEth1Vote - Eth1Data fastSerialize value x2048 434.80 us/op 451.43 us/op 0.96
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.4078 ms/op 2.5039 ms/op 1.76
bytes32 toHexString 346.00 ns/op 415.00 ns/op 0.83
bytes32 Buffer.toString(hex) 232.00 ns/op 238.00 ns/op 0.97
bytes32 Buffer.toString(hex) from Uint8Array 328.00 ns/op 331.00 ns/op 0.99
bytes32 Buffer.toString(hex) + 0x 234.00 ns/op 243.00 ns/op 0.96
Object access 1 prop 0.12000 ns/op 0.12200 ns/op 0.98
Map access 1 prop 0.12300 ns/op 0.12800 ns/op 0.96
Object get x1000 5.9840 ns/op 7.9000 ns/op 0.76
Map get x1000 6.1040 ns/op 6.6300 ns/op 0.92
Object set x1000 27.142 ns/op 39.903 ns/op 0.68
Map set x1000 18.467 ns/op 24.799 ns/op 0.74
Return object 10000 times 0.27700 ns/op 0.37520 ns/op 0.74
Throw Error 10000 times 4.1134 us/op 4.5829 us/op 0.90
toHex 134.74 ns/op 140.44 ns/op 0.96
Buffer.from 121.88 ns/op 127.53 ns/op 0.96
shared Buffer 77.919 ns/op 118.81 ns/op 0.66
fastMsgIdFn sha256 / 200 bytes 2.1560 us/op 2.3530 us/op 0.92
fastMsgIdFn h32 xxhash / 200 bytes 216.00 ns/op 217.00 ns/op 1.00
fastMsgIdFn h64 xxhash / 200 bytes 267.00 ns/op 264.00 ns/op 1.01
fastMsgIdFn sha256 / 1000 bytes 6.9190 us/op 8.0020 us/op 0.86
fastMsgIdFn h32 xxhash / 1000 bytes 329.00 ns/op 346.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 1000 bytes 337.00 ns/op 340.00 ns/op 0.99
fastMsgIdFn sha256 / 10000 bytes 62.231 us/op 67.665 us/op 0.92
fastMsgIdFn h32 xxhash / 10000 bytes 1.7650 us/op 1.9150 us/op 0.92
fastMsgIdFn h64 xxhash / 10000 bytes 1.1820 us/op 1.2610 us/op 0.94
send data - 1000 256B messages 16.969 ms/op 17.389 ms/op 0.98
send data - 1000 512B messages 14.355 ms/op 22.451 ms/op 0.64
send data - 1000 1024B messages 23.134 ms/op 36.683 ms/op 0.63
send data - 1000 1200B messages 21.394 ms/op 25.647 ms/op 0.83
send data - 1000 2048B messages 20.219 ms/op 33.076 ms/op 0.61
send data - 1000 4096B messages 26.025 ms/op 35.968 ms/op 0.72
send data - 1000 16384B messages 64.836 ms/op 84.595 ms/op 0.77
send data - 1000 65536B messages 213.69 ms/op 239.71 ms/op 0.89
enrSubnets - fastDeserialize 64 bits 920.00 ns/op 1.3570 us/op 0.68
enrSubnets - ssz BitVector 64 bits 342.00 ns/op 338.00 ns/op 1.01
enrSubnets - fastDeserialize 4 bits 140.00 ns/op 131.00 ns/op 1.07
enrSubnets - ssz BitVector 4 bits 341.00 ns/op 338.00 ns/op 1.01
prioritizePeers score -10:0 att 32-0.1 sync 2-0 115.72 us/op 149.23 us/op 0.78
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 137.06 us/op 151.77 us/op 0.90
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 195.19 us/op 240.61 us/op 0.81
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 368.32 us/op 416.90 us/op 0.88
prioritizePeers score 0:0 att 64-1 sync 4-1 447.68 us/op 541.13 us/op 0.83
array of 16000 items push then shift 1.5800 us/op 1.7054 us/op 0.93
LinkedList of 16000 items push then shift 6.8480 ns/op 9.0680 ns/op 0.76
array of 16000 items push then pop 73.972 ns/op 87.250 ns/op 0.85
LinkedList of 16000 items push then pop 6.8050 ns/op 7.9960 ns/op 0.85
array of 24000 items push then shift 2.3555 us/op 2.5163 us/op 0.94
LinkedList of 24000 items push then shift 6.6630 ns/op 8.6250 ns/op 0.77
array of 24000 items push then pop 95.274 ns/op 140.69 ns/op 0.68
LinkedList of 24000 items push then pop 6.5720 ns/op 8.2900 ns/op 0.79
intersect bitArray bitLen 8 6.1920 ns/op 6.6470 ns/op 0.93
intersect array and set length 8 36.109 ns/op 41.233 ns/op 0.88
intersect bitArray bitLen 128 28.419 ns/op 31.083 ns/op 0.91
intersect array and set length 128 590.29 ns/op 645.25 ns/op 0.91
bitArray.getTrueBitIndexes() bitLen 128 964.00 ns/op 1.1720 us/op 0.82
bitArray.getTrueBitIndexes() bitLen 248 1.6980 us/op 2.0510 us/op 0.83
bitArray.getTrueBitIndexes() bitLen 512 3.4960 us/op 4.8810 us/op 0.72
Buffer.concat 32 items 597.00 ns/op 879.00 ns/op 0.68
Uint8Array.set 32 items 1.4110 us/op 2.0040 us/op 0.70
Buffer.copy 3.0870 us/op 3.3390 us/op 0.92
Uint8Array.set - with subarray 1.7510 us/op 3.0880 us/op 0.57
Uint8Array.set - without subarray 1.1550 us/op 2.1650 us/op 0.53
getUint32 - dataview 260.00 ns/op 206.00 ns/op 1.26
getUint32 - manual 117.00 ns/op 122.00 ns/op 0.96
Set add up to 64 items then delete first 2.0742 us/op 2.8261 us/op 0.73
OrderedSet add up to 64 items then delete first 3.1136 us/op 4.5830 us/op 0.68
Set add up to 64 items then delete last 2.3765 us/op 2.4343 us/op 0.98
OrderedSet add up to 64 items then delete last 3.4179 us/op 5.0662 us/op 0.67
Set add up to 64 items then delete middle 2.3849 us/op 3.2853 us/op 0.73
OrderedSet add up to 64 items then delete middle 5.0068 us/op 6.5742 us/op 0.76
Set add up to 128 items then delete first 4.9225 us/op 6.2201 us/op 0.79
OrderedSet add up to 128 items then delete first 7.5137 us/op 10.035 us/op 0.75
Set add up to 128 items then delete last 4.7243 us/op 6.4750 us/op 0.73
OrderedSet add up to 128 items then delete last 7.0131 us/op 10.686 us/op 0.66
Set add up to 128 items then delete middle 4.7679 us/op 6.2271 us/op 0.77
OrderedSet add up to 128 items then delete middle 13.367 us/op 17.686 us/op 0.76
Set add up to 256 items then delete first 10.746 us/op 13.168 us/op 0.82
OrderedSet add up to 256 items then delete first 15.592 us/op 21.148 us/op 0.74
Set add up to 256 items then delete last 9.7105 us/op 13.171 us/op 0.74
OrderedSet add up to 256 items then delete last 20.748 us/op 21.280 us/op 0.97
Set add up to 256 items then delete middle 10.168 us/op 13.582 us/op 0.75
OrderedSet add up to 256 items then delete middle 39.939 us/op 51.669 us/op 0.77
transfer serialized Status (84 B) 2.2480 us/op 3.2430 us/op 0.69
copy serialized Status (84 B) 1.1740 us/op 1.8510 us/op 0.63
transfer serialized SignedVoluntaryExit (112 B) 2.2870 us/op 3.3760 us/op 0.68
copy serialized SignedVoluntaryExit (112 B) 1.2100 us/op 2.1650 us/op 0.56
transfer serialized ProposerSlashing (416 B) 2.2940 us/op 3.4750 us/op 0.66
copy serialized ProposerSlashing (416 B) 1.2370 us/op 2.6790 us/op 0.46
transfer serialized Attestation (485 B) 2.2820 us/op 3.3270 us/op 0.69
copy serialized Attestation (485 B) 1.2620 us/op 2.8750 us/op 0.44
transfer serialized AttesterSlashing (33232 B) 2.8940 us/op 3.9500 us/op 0.73
copy serialized AttesterSlashing (33232 B) 3.7710 us/op 5.3330 us/op 0.71
transfer serialized Small SignedBeaconBlock (128000 B) 3.2550 us/op 3.4610 us/op 0.94
copy serialized Small SignedBeaconBlock (128000 B) 9.7460 us/op 14.020 us/op 0.70
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5170 us/op 4.3650 us/op 0.81
copy serialized Avg SignedBeaconBlock (200000 B) 13.363 us/op 22.069 us/op 0.61
transfer serialized BlobsSidecar (524380 B) 3.7120 us/op 7.2290 us/op 0.51
copy serialized BlobsSidecar (524380 B) 58.787 us/op 82.784 us/op 0.71
transfer serialized Big SignedBeaconBlock (1000000 B) 4.0060 us/op 7.5070 us/op 0.53
copy serialized Big SignedBeaconBlock (1000000 B) 150.25 us/op 315.67 us/op 0.48
pass gossip attestations to forkchoice per slot 2.7320 ms/op 3.2016 ms/op 0.85
forkChoice updateHead vc 100000 bc 64 eq 0 441.40 us/op 482.57 us/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 0 2.7913 ms/op 3.1835 ms/op 0.88
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7312 ms/op 5.5528 ms/op 0.85
forkChoice updateHead vc 600000 bc 320 eq 0 2.8156 ms/op 3.0783 ms/op 0.91
forkChoice updateHead vc 600000 bc 1200 eq 0 4.0573 ms/op 3.1670 ms/op 1.28
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2164 ms/op 3.4243 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 1000 10.065 ms/op 11.042 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 10000 10.252 ms/op 10.828 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 300000 13.768 ms/op 17.320 ms/op 0.79
computeDeltas 500000 validators 300 proto nodes 3.8045 ms/op 4.3250 ms/op 0.88
computeDeltas 500000 validators 1200 proto nodes 3.9554 ms/op 4.1917 ms/op 0.94
computeDeltas 500000 validators 7200 proto nodes 4.1391 ms/op 4.2428 ms/op 0.98
computeDeltas 750000 validators 300 proto nodes 6.0096 ms/op 6.1886 ms/op 0.97
computeDeltas 750000 validators 1200 proto nodes 5.9893 ms/op 6.2034 ms/op 0.97
computeDeltas 750000 validators 7200 proto nodes 6.0538 ms/op 6.0376 ms/op 1.00
computeDeltas 1400000 validators 300 proto nodes 11.134 ms/op 11.302 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 11.009 ms/op 11.375 ms/op 0.97
computeDeltas 1400000 validators 7200 proto nodes 10.932 ms/op 11.482 ms/op 0.95
computeDeltas 2100000 validators 300 proto nodes 16.879 ms/op 16.457 ms/op 1.03
computeDeltas 2100000 validators 1200 proto nodes 17.203 ms/op 17.452 ms/op 0.99
computeDeltas 2100000 validators 7200 proto nodes 16.542 ms/op 16.789 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei normalcase 2.4901 ms/op 2.8055 ms/op 0.89
altair processAttestation - 250000 vs - 7PWei worstcase 3.1675 ms/op 3.2710 ms/op 0.97
altair processAttestation - setStatus - 1/6 committees join 129.12 us/op 131.26 us/op 0.98
altair processAttestation - setStatus - 1/3 committees join 249.02 us/op 257.73 us/op 0.97
altair processAttestation - setStatus - 1/2 committees join 334.81 us/op 348.31 us/op 0.96
altair processAttestation - setStatus - 2/3 committees join 427.31 us/op 451.81 us/op 0.95
altair processAttestation - setStatus - 4/5 committees join 580.00 us/op 609.69 us/op 0.95
altair processAttestation - setStatus - 100% committees join 703.49 us/op 743.80 us/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 10.943 ms/op 4.9060 ms/op 2.23
altair processBlock - 250000 vs - 7PWei normalcase hashState 35.274 ms/op 33.148 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase 41.258 ms/op 39.061 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase hashState 99.256 ms/op 89.425 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8906 ms/op 1.7999 ms/op 1.05
phase0 processBlock - 250000 vs - 7PWei worstcase 25.895 ms/op 25.336 ms/op 1.02
altair processEth1Data - 250000 vs - 7PWei normalcase 346.90 us/op 349.04 us/op 0.99
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.1120 us/op 5.9860 us/op 1.52
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 39.480 us/op 38.251 us/op 1.03
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.9140 us/op 10.543 us/op 0.94
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.3910 us/op 8.4970 us/op 0.99
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 130.34 us/op 157.87 us/op 0.83
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1127 ms/op 1.0048 ms/op 1.11
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7649 ms/op 1.6963 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.7663 ms/op 1.4305 ms/op 1.23
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.4551 ms/op 3.5717 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.8110 ms/op 1.4560 ms/op 1.24
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.4804 ms/op 3.7358 ms/op 0.93
Tree 40 250000 create 463.77 ms/op 449.43 ms/op 1.03
Tree 40 250000 get(125000) 141.80 ns/op 144.59 ns/op 0.98
Tree 40 250000 set(125000) 1.4204 us/op 1.6787 us/op 0.85
Tree 40 250000 toArray() 15.845 ms/op 21.365 ms/op 0.74
Tree 40 250000 iterate all - toArray() + loop 17.230 ms/op 22.821 ms/op 0.76
Tree 40 250000 iterate all - get(i) 54.494 ms/op 58.742 ms/op 0.93
Array 250000 create 2.5098 ms/op 2.6263 ms/op 0.96
Array 250000 clone - spread 1.3837 ms/op 837.23 us/op 1.65
Array 250000 get(125000) 0.42100 ns/op 0.41400 ns/op 1.02
Array 250000 set(125000) 0.44200 ns/op 0.44000 ns/op 1.00
Array 250000 iterate all - loop 98.112 us/op 113.47 us/op 0.86
phase0 afterProcessEpoch - 250000 vs - 7PWei 49.660 ms/op 51.340 ms/op 0.97
Array.fill - length 1000000 3.3899 ms/op 3.5576 ms/op 0.95
Array push - length 1000000 15.448 ms/op 15.448 ms/op 1.00
Array.get 0.28153 ns/op 0.28820 ns/op 0.98
Uint8Array.get 0.44232 ns/op 0.44829 ns/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.476 ms/op 19.146 ms/op 0.91
altair processEpoch - mainnet_e81889 311.94 ms/op 314.47 ms/op 0.99
mainnet_e81889 - altair beforeProcessEpoch 19.271 ms/op 19.001 ms/op 1.01
mainnet_e81889 - altair processJustificationAndFinalization 5.3860 us/op 5.5270 us/op 0.97
mainnet_e81889 - altair processInactivityUpdates 4.0283 ms/op 4.8721 ms/op 0.83
mainnet_e81889 - altair processRewardsAndPenalties 58.284 ms/op 40.282 ms/op 1.45
mainnet_e81889 - altair processRegistryUpdates 688.00 ns/op 714.00 ns/op 0.96
mainnet_e81889 - altair processSlashings 187.00 ns/op 177.00 ns/op 1.06
mainnet_e81889 - altair processEth1DataReset 260.00 ns/op 170.00 ns/op 1.53
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2485 ms/op 1.2829 ms/op 0.97
mainnet_e81889 - altair processSlashingsReset 951.00 ns/op 885.00 ns/op 1.07
mainnet_e81889 - altair processRandaoMixesReset 1.1010 us/op 1.4220 us/op 0.77
mainnet_e81889 - altair processHistoricalRootsUpdate 182.00 ns/op 174.00 ns/op 1.05
mainnet_e81889 - altair processParticipationFlagUpdates 572.00 ns/op 521.00 ns/op 1.10
mainnet_e81889 - altair processSyncCommitteeUpdates 140.00 ns/op 133.00 ns/op 1.05
mainnet_e81889 - altair afterProcessEpoch 52.095 ms/op 53.626 ms/op 0.97
capella processEpoch - mainnet_e217614 954.14 ms/op 957.19 ms/op 1.00
mainnet_e217614 - capella beforeProcessEpoch 61.672 ms/op 68.207 ms/op 0.90
mainnet_e217614 - capella processJustificationAndFinalization 6.2490 us/op 5.2350 us/op 1.19
mainnet_e217614 - capella processInactivityUpdates 16.492 ms/op 16.202 ms/op 1.02
mainnet_e217614 - capella processRewardsAndPenalties 209.90 ms/op 166.65 ms/op 1.26
mainnet_e217614 - capella processRegistryUpdates 6.6640 us/op 6.5570 us/op 1.02
mainnet_e217614 - capella processSlashings 172.00 ns/op 172.00 ns/op 1.00
mainnet_e217614 - capella processEth1DataReset 171.00 ns/op 169.00 ns/op 1.01
mainnet_e217614 - capella processEffectiveBalanceUpdates 10.694 ms/op 11.024 ms/op 0.97
mainnet_e217614 - capella processSlashingsReset 1.2780 us/op 864.00 ns/op 1.48
mainnet_e217614 - capella processRandaoMixesReset 1.3710 us/op 1.1640 us/op 1.18
mainnet_e217614 - capella processHistoricalRootsUpdate 171.00 ns/op 175.00 ns/op 0.98
mainnet_e217614 - capella processParticipationFlagUpdates 640.00 ns/op 538.00 ns/op 1.19
mainnet_e217614 - capella afterProcessEpoch 125.65 ms/op 126.33 ms/op 0.99
phase0 processEpoch - mainnet_e58758 324.32 ms/op 268.63 ms/op 1.21
mainnet_e58758 - phase0 beforeProcessEpoch 85.302 ms/op 71.592 ms/op 1.19
mainnet_e58758 - phase0 processJustificationAndFinalization 6.9160 us/op 5.5150 us/op 1.25
mainnet_e58758 - phase0 processRewardsAndPenalties 43.567 ms/op 33.827 ms/op 1.29
mainnet_e58758 - phase0 processRegistryUpdates 3.3400 us/op 3.1280 us/op 1.07
mainnet_e58758 - phase0 processSlashings 211.00 ns/op 170.00 ns/op 1.24
mainnet_e58758 - phase0 processEth1DataReset 175.00 ns/op 168.00 ns/op 1.04
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0073 ms/op 1.0449 ms/op 0.96
mainnet_e58758 - phase0 processSlashingsReset 1.2090 us/op 965.00 ns/op 1.25
mainnet_e58758 - phase0 processRandaoMixesReset 1.4920 us/op 1.1810 us/op 1.26
mainnet_e58758 - phase0 processHistoricalRootsUpdate 173.00 ns/op 173.00 ns/op 1.00
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.0280 us/op 872.00 ns/op 1.18
mainnet_e58758 - phase0 afterProcessEpoch 41.485 ms/op 43.099 ms/op 0.96
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8720 ms/op 1.3953 ms/op 1.34
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6599 ms/op 1.9463 ms/op 0.85
altair processInactivityUpdates - 250000 normalcase 20.204 ms/op 17.147 ms/op 1.18
altair processInactivityUpdates - 250000 worstcase 21.755 ms/op 17.974 ms/op 1.21
phase0 processRegistryUpdates - 250000 normalcase 10.789 us/op 6.1590 us/op 1.75
phase0 processRegistryUpdates - 250000 badcase_full_deposits 437.80 us/op 272.46 us/op 1.61
phase0 processRegistryUpdates - 250000 worstcase 0.5 115.84 ms/op 109.64 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 40.952 ms/op 44.976 ms/op 0.91
altair processRewardsAndPenalties - 250000 worstcase 41.138 ms/op 38.642 ms/op 1.06
phase0 getAttestationDeltas - 250000 normalcase 6.9867 ms/op 7.7438 ms/op 0.90
phase0 getAttestationDeltas - 250000 worstcase 7.2955 ms/op 7.3174 ms/op 1.00
phase0 processSlashings - 250000 worstcase 125.17 us/op 100.08 us/op 1.25
altair processSyncCommitteeUpdates - 250000 119.82 ms/op 129.38 ms/op 0.93
BeaconState.hashTreeRoot - No change 222.00 ns/op 213.00 ns/op 1.04
BeaconState.hashTreeRoot - 1 full validator 75.638 us/op 77.375 us/op 0.98
BeaconState.hashTreeRoot - 32 full validator 783.64 us/op 1.0309 ms/op 0.76
BeaconState.hashTreeRoot - 512 full validator 8.9818 ms/op 11.634 ms/op 0.77
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 140.26 us/op 109.96 us/op 1.28
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4624 ms/op 1.5950 ms/op 0.92
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.268 ms/op 25.579 ms/op 0.71
BeaconState.hashTreeRoot - 1 balances 81.958 us/op 71.572 us/op 1.15
BeaconState.hashTreeRoot - 32 balances 668.21 us/op 680.15 us/op 0.98
BeaconState.hashTreeRoot - 512 balances 7.8752 ms/op 9.7339 ms/op 0.81
BeaconState.hashTreeRoot - 250000 balances 160.95 ms/op 166.64 ms/op 0.97
aggregationBits - 2048 els - zipIndexesInBitList 21.686 us/op 23.989 us/op 0.90
byteArrayEquals 32 53.048 ns/op 54.796 ns/op 0.97
Buffer.compare 32 16.983 ns/op 17.390 ns/op 0.98
byteArrayEquals 1024 1.5815 us/op 1.6155 us/op 0.98
Buffer.compare 1024 24.183 ns/op 25.247 ns/op 0.96
byteArrayEquals 16384 25.456 us/op 26.183 us/op 0.97
Buffer.compare 16384 201.16 ns/op 194.21 ns/op 1.04
byteArrayEquals 123687377 184.11 ms/op 196.55 ms/op 0.94
Buffer.compare 123687377 6.1878 ms/op 7.9354 ms/op 0.78
byteArrayEquals 32 - diff last byte 50.582 ns/op 53.214 ns/op 0.95
Buffer.compare 32 - diff last byte 16.531 ns/op 17.286 ns/op 0.96
byteArrayEquals 1024 - diff last byte 1.5284 us/op 1.6088 us/op 0.95
Buffer.compare 1024 - diff last byte 25.061 ns/op 25.294 ns/op 0.99
byteArrayEquals 16384 - diff last byte 24.358 us/op 25.607 us/op 0.95
Buffer.compare 16384 - diff last byte 182.34 ns/op 188.28 ns/op 0.97
byteArrayEquals 123687377 - diff last byte 184.14 ms/op 196.84 ms/op 0.94
Buffer.compare 123687377 - diff last byte 6.2691 ms/op 8.0725 ms/op 0.78
byteArrayEquals 32 - random bytes 4.9280 ns/op 5.2480 ns/op 0.94
Buffer.compare 32 - random bytes 16.544 ns/op 17.627 ns/op 0.94
byteArrayEquals 1024 - random bytes 4.9360 ns/op 5.2780 ns/op 0.94
Buffer.compare 1024 - random bytes 16.573 ns/op 17.757 ns/op 0.93
byteArrayEquals 16384 - random bytes 4.9410 ns/op 5.7510 ns/op 0.86
Buffer.compare 16384 - random bytes 16.519 ns/op 17.695 ns/op 0.93
byteArrayEquals 123687377 - random bytes 8.9400 ns/op 6.5300 ns/op 1.37
Buffer.compare 123687377 - random bytes 17.940 ns/op 18.840 ns/op 0.95
regular array get 100000 times 42.390 us/op 33.629 us/op 1.26
wrappedArray get 100000 times 31.745 us/op 33.587 us/op 0.95
arrayWithProxy get 100000 times 12.268 ms/op 12.684 ms/op 0.97
ssz.Root.equals 44.647 ns/op 47.304 ns/op 0.94
byteArrayEquals 43.702 ns/op 46.411 ns/op 0.94
Buffer.compare 9.9720 ns/op 10.560 ns/op 0.94
processSlot - 1 slots 9.8450 us/op 10.211 us/op 0.96
processSlot - 32 slots 3.2850 ms/op 3.3036 ms/op 0.99
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 61.379 ms/op 51.504 ms/op 1.19
getCommitteeAssignments - req 1 vs - 250000 vc 2.1276 ms/op 2.1848 ms/op 0.97
getCommitteeAssignments - req 100 vs - 250000 vc 4.1597 ms/op 4.2753 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4390 ms/op 4.5500 ms/op 0.98
findModifiedValidators - 10000 modified validators 754.44 ms/op 776.93 ms/op 0.97
findModifiedValidators - 1000 modified validators 739.27 ms/op 730.88 ms/op 1.01
findModifiedValidators - 100 modified validators 315.39 ms/op 237.86 ms/op 1.33
findModifiedValidators - 10 modified validators 182.09 ms/op 170.25 ms/op 1.07
findModifiedValidators - 1 modified validators 142.81 ms/op 174.24 ms/op 0.82
findModifiedValidators - no difference 145.52 ms/op 152.33 ms/op 0.96
compare ViewDUs 6.1979 s/op 6.3076 s/op 0.98
compare each validator Uint8Array 1.8511 s/op 1.4564 s/op 1.27
compare ViewDU to Uint8Array 939.15 ms/op 1.2927 s/op 0.73
migrate state 1000000 validators, 24 modified, 0 new 851.24 ms/op 884.68 ms/op 0.96
migrate state 1000000 validators, 1700 modified, 1000 new 1.2497 s/op 1.0814 s/op 1.16
migrate state 1000000 validators, 3400 modified, 2000 new 1.2833 s/op 1.2855 s/op 1.00
migrate state 1500000 validators, 24 modified, 0 new 870.59 ms/op 822.87 ms/op 1.06
migrate state 1500000 validators, 1700 modified, 1000 new 1.1634 s/op 1.1078 s/op 1.05
migrate state 1500000 validators, 3400 modified, 2000 new 1.3050 s/op 1.4144 s/op 0.92
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2500 ns/op 4.3100 ns/op 0.99
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0086 us/op 570.81 ns/op 1.77
computeProposers - vc 250000 8.2728 ms/op 8.9277 ms/op 0.93
computeEpochShuffling - vc 250000 42.154 ms/op 43.284 ms/op 0.97
getNextSyncCommittee - vc 250000 125.37 ms/op 148.75 ms/op 0.84
computeSigningRoot for AttestationData 24.369 us/op 30.997 us/op 0.79
hash AttestationData serialized data then Buffer.toString(base64) 1.4647 us/op 1.5454 us/op 0.95
toHexString serialized data 777.02 ns/op 1.0265 us/op 0.76
Buffer.toString(base64) 132.91 ns/op 156.73 ns/op 0.85
nodejs block root to RootHex using toHex 134.43 ns/op 148.82 ns/op 0.90
nodejs block root to RootHex using toRootHex 81.071 ns/op 85.215 ns/op 0.95
browser block root to RootHex using the deprecated toHexString 202.47 ns/op 215.48 ns/op 0.94
browser block root to RootHex using toHex 164.34 ns/op 172.22 ns/op 0.95
browser block root to RootHex using toRootHex 153.60 ns/op 160.72 ns/op 0.96

by benchmarkbot/action

@nflaig nflaig marked this pull request as ready for review February 12, 2025 00:39
@nflaig nflaig requested a review from a team as a code owner February 12, 2025 00:39
@nflaig
Copy link
Member Author

nflaig commented Feb 12, 2025

turns out the proper fix for this was to exec out of the stub as systemd would not wait for process to shut down otherwise by default even if exit signal is properly forwarded

this is also much cleaner now as we don't spawn two processes for no reason

the relevant change can be found here ChainSafe/caxa@0e64e72

@philknows philknows added this to the v1.27.0 milestone Feb 12, 2025
@nflaig nflaig changed the title fix: properly forward exit signal if binary is used with systemd fix: properly handle exit signal if binary is used with systemd Feb 12, 2025
Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

LGTM 🎸

@matthewkeil matthewkeil merged commit e45e0eb into unstable Feb 12, 2025
23 checks passed
@matthewkeil matthewkeil deleted the nflaig/binary-exit-signal branch February 12, 2025 12:35
@wemeetagain
Copy link
Member

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

Lodestar binary does not receive exit signal if used with systemd
4 participants