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: wrap libp2p stop call with a timeout #6062

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 25, 2023

Motivation

In some cases, libp2p.stop never resolves, it is required to wrap the call with a timeout to allow for a timely shutdown

Description

Apply workaround suggested in #6053 (comment)

This will throw the following error on timeout (after 5s)

Oct-25 11:53:58.086[]                error: Error closing beacon node - Timeout
Error: Timeout
    at timeoutPromise (file:///home/nico/projects/ethereum/lodestar/packages/utils/lib/timeout.js:9:15)
    at async withTimeout (file:///home/nico/projects/ethereum/lodestar/packages/utils/lib/timeout.js:12:16)
    at async NetworkCore.close (file:///home/nico/projects/ethereum/lodestar/packages/beacon-node/lib/network/core/networkCore.js:233:9)
    at async close (file:///home/nico/projects/ethereum/lodestar/packages/beacon-node/lib/network/core/networkCoreWorker.js:93:9)

and the beacon handler will ensure the db is closed gracefully and process is force exited

await db.close();
// Must explicitly exit process due to potential active handles
process.exit(1);

Note: This is just a temporary fix to unblock the v1.12 release

@nflaig nflaig requested a review from a team as a code owner October 25, 2023 10:04
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 28a9d8a Previous: 499fd09 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 641.23 us/op 746.50 us/op 0.86
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 78.577 us/op 105.83 us/op 0.74
BLS verify - blst-native 1.3520 ms/op 1.4475 ms/op 0.93
BLS verifyMultipleSignatures 3 - blst-native 2.8028 ms/op 3.2223 ms/op 0.87
BLS verifyMultipleSignatures 8 - blst-native 6.1059 ms/op 6.8206 ms/op 0.90
BLS verifyMultipleSignatures 32 - blst-native 22.649 ms/op 25.088 ms/op 0.90
BLS verifyMultipleSignatures 64 - blst-native 44.025 ms/op 48.837 ms/op 0.90
BLS verifyMultipleSignatures 128 - blst-native 89.161 ms/op 96.667 ms/op 0.92
BLS deserializing 10000 signatures 903.99 ms/op 1.0225 s/op 0.88
BLS deserializing 100000 signatures 9.0314 s/op 9.9880 s/op 0.90
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3580 ms/op 1.5044 ms/op 0.90
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5276 ms/op 1.8499 ms/op 0.83
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3609 ms/op 2.7286 ms/op 0.87
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.4876 ms/op 3.9314 ms/op 0.89
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.6117 ms/op 6.8814 ms/op 0.82
BLS aggregatePubkeys 32 - blst-native 26.119 us/op 29.276 us/op 0.89
BLS aggregatePubkeys 128 - blst-native 101.95 us/op 109.98 us/op 0.93
getAttestationsForBlock 39.617 ms/op 62.162 ms/op 0.64
isKnown best case - 1 super set check 317.00 ns/op 646.00 ns/op 0.49
isKnown normal case - 2 super set checks 281.00 ns/op 725.00 ns/op 0.39
isKnown worse case - 16 super set checks 327.00 ns/op 688.00 ns/op 0.48
CheckpointStateCache - add get delete 6.5040 us/op 6.6580 us/op 0.98
validate api signedAggregateAndProof - struct 2.8062 ms/op 4.1758 ms/op 0.67
validate gossip signedAggregateAndProof - struct 2.7781 ms/op 3.4621 ms/op 0.80
validate gossip attestation - vc 640000 1.3536 ms/op 1.5896 ms/op 0.85
batch validate gossip attestation - vc 640000 - chunk 32 165.67 us/op 194.61 us/op 0.85
batch validate gossip attestation - vc 640000 - chunk 64 147.60 us/op 176.96 us/op 0.83
batch validate gossip attestation - vc 640000 - chunk 128 149.96 us/op 161.19 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 256 139.91 us/op 154.45 us/op 0.91
pickEth1Vote - no votes 1.3616 ms/op 1.5244 ms/op 0.89
pickEth1Vote - max votes 10.361 ms/op 13.759 ms/op 0.75
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.993 ms/op 21.495 ms/op 0.93
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 27.910 ms/op 34.472 ms/op 0.81
pickEth1Vote - Eth1Data fastSerialize value x2048 691.61 us/op 752.52 us/op 0.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.6144 ms/op 5.7302 ms/op 0.98
bytes32 toHexString 666.00 ns/op 665.00 ns/op 1.00
bytes32 Buffer.toString(hex) 306.00 ns/op 333.00 ns/op 0.92
bytes32 Buffer.toString(hex) from Uint8Array 503.00 ns/op 537.00 ns/op 0.94
bytes32 Buffer.toString(hex) + 0x 318.00 ns/op 335.00 ns/op 0.95
Object access 1 prop 0.20100 ns/op 0.25800 ns/op 0.78
Map access 1 prop 0.14900 ns/op 0.17700 ns/op 0.84
Object get x1000 9.2970 ns/op 8.7450 ns/op 1.06
Map get x1000 0.61200 ns/op 0.71400 ns/op 0.86
Object set x1000 68.792 ns/op 70.256 ns/op 0.98
Map set x1000 49.672 ns/op 54.571 ns/op 0.91
Return object 10000 times 0.32250 ns/op 0.28460 ns/op 1.13
Throw Error 10000 times 4.1080 us/op 4.1327 us/op 0.99
fastMsgIdFn sha256 / 200 bytes 3.4250 us/op 3.6030 us/op 0.95
fastMsgIdFn h32 xxhash / 200 bytes 337.00 ns/op 340.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 200 bytes 390.00 ns/op 415.00 ns/op 0.94
fastMsgIdFn sha256 / 1000 bytes 11.795 us/op 13.625 us/op 0.87
fastMsgIdFn h32 xxhash / 1000 bytes 438.00 ns/op 467.00 ns/op 0.94
fastMsgIdFn h64 xxhash / 1000 bytes 441.00 ns/op 471.00 ns/op 0.94
fastMsgIdFn sha256 / 10000 bytes 108.32 us/op 109.38 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 2.1020 us/op 2.0640 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.3970 us/op 1.4660 us/op 0.95
send data - 1000 256B messages 20.562 ms/op 21.751 ms/op 0.95
send data - 1000 512B messages 27.932 ms/op 30.001 ms/op 0.93
send data - 1000 1024B messages 44.404 ms/op 47.554 ms/op 0.93
send data - 1000 1200B messages 24.224 ms/op 43.024 ms/op 0.56
send data - 1000 2048B messages 33.830 ms/op 41.288 ms/op 0.82
send data - 1000 4096B messages 34.455 ms/op 46.616 ms/op 0.74
send data - 1000 16384B messages 79.521 ms/op 91.717 ms/op 0.87
send data - 1000 65536B messages 281.36 ms/op 322.35 ms/op 0.87
enrSubnets - fastDeserialize 64 bits 1.2990 us/op 1.4200 us/op 0.91
enrSubnets - ssz BitVector 64 bits 410.00 ns/op 530.00 ns/op 0.77
enrSubnets - fastDeserialize 4 bits 162.00 ns/op 215.00 ns/op 0.75
enrSubnets - ssz BitVector 4 bits 403.00 ns/op 529.00 ns/op 0.76
prioritizePeers score -10:0 att 32-0.1 sync 2-0 100.50 us/op 113.56 us/op 0.89
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 124.51 us/op 143.04 us/op 0.87
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 175.90 us/op 204.70 us/op 0.86
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 304.88 us/op 350.43 us/op 0.87
prioritizePeers score 0:0 att 64-1 sync 4-1 342.50 us/op 404.65 us/op 0.85
array of 16000 items push then shift 1.6223 us/op 1.7937 us/op 0.90
LinkedList of 16000 items push then shift 9.0280 ns/op 9.9580 ns/op 0.91
array of 16000 items push then pop 91.823 ns/op 113.80 ns/op 0.81
LinkedList of 16000 items push then pop 8.9410 ns/op 9.9590 ns/op 0.90
array of 24000 items push then shift 2.4183 us/op 2.6708 us/op 0.91
LinkedList of 24000 items push then shift 9.0240 ns/op 10.096 ns/op 0.89
array of 24000 items push then pop 119.61 ns/op 169.02 ns/op 0.71
LinkedList of 24000 items push then pop 8.6740 ns/op 10.122 ns/op 0.86
intersect bitArray bitLen 8 6.8540 ns/op 7.3770 ns/op 0.93
intersect array and set length 8 55.517 ns/op 75.992 ns/op 0.73
intersect bitArray bitLen 128 31.811 ns/op 38.877 ns/op 0.82
intersect array and set length 128 748.62 ns/op 982.24 ns/op 0.76
bitArray.getTrueBitIndexes() bitLen 128 1.3540 us/op 1.8620 us/op 0.73
bitArray.getTrueBitIndexes() bitLen 248 2.4480 us/op 3.3180 us/op 0.74
bitArray.getTrueBitIndexes() bitLen 512 4.6890 us/op 6.7420 us/op 0.70
Buffer.concat 32 items 911.00 ns/op 1.1300 us/op 0.81
Uint8Array.set 32 items 1.7680 us/op 2.4490 us/op 0.72
Set add up to 64 items then delete first 4.3590 us/op 5.1750 us/op 0.84
OrderedSet add up to 64 items then delete first 5.3953 us/op 7.2951 us/op 0.74
Set add up to 64 items then delete last 4.6614 us/op 5.6227 us/op 0.83
OrderedSet add up to 64 items then delete last 5.6750 us/op 7.5673 us/op 0.75
Set add up to 64 items then delete middle 4.5812 us/op 5.6080 us/op 0.82
OrderedSet add up to 64 items then delete middle 6.9839 us/op 8.9775 us/op 0.78
Set add up to 128 items then delete first 9.3133 us/op 11.339 us/op 0.82
OrderedSet add up to 128 items then delete first 12.195 us/op 14.127 us/op 0.86
Set add up to 128 items then delete last 9.3277 us/op 11.035 us/op 0.85
OrderedSet add up to 128 items then delete last 12.008 us/op 14.714 us/op 0.82
Set add up to 128 items then delete middle 9.2891 us/op 11.294 us/op 0.82
OrderedSet add up to 128 items then delete middle 17.165 us/op 20.249 us/op 0.85
Set add up to 256 items then delete first 18.958 us/op 21.957 us/op 0.86
OrderedSet add up to 256 items then delete first 24.925 us/op 30.647 us/op 0.81
Set add up to 256 items then delete last 18.286 us/op 21.929 us/op 0.83
OrderedSet add up to 256 items then delete last 23.513 us/op 30.038 us/op 0.78
Set add up to 256 items then delete middle 18.386 us/op 22.199 us/op 0.83
OrderedSet add up to 256 items then delete middle 45.977 us/op 57.692 us/op 0.80
transfer serialized Status (84 B) 1.8310 us/op 2.1550 us/op 0.85
copy serialized Status (84 B) 1.5970 us/op 1.7970 us/op 0.89
transfer serialized SignedVoluntaryExit (112 B) 2.0530 us/op 2.0250 us/op 1.01
copy serialized SignedVoluntaryExit (112 B) 1.6990 us/op 1.6610 us/op 1.02
transfer serialized ProposerSlashing (416 B) 2.8680 us/op 2.2900 us/op 1.25
copy serialized ProposerSlashing (416 B) 2.8180 us/op 2.4050 us/op 1.17
transfer serialized Attestation (485 B) 2.1300 us/op 2.5090 us/op 0.85
copy serialized Attestation (485 B) 1.8380 us/op 2.9890 us/op 0.61
transfer serialized AttesterSlashing (33232 B) 2.2140 us/op 2.5430 us/op 0.87
copy serialized AttesterSlashing (33232 B) 6.1050 us/op 8.2390 us/op 0.74
transfer serialized Small SignedBeaconBlock (128000 B) 3.0160 us/op 3.4890 us/op 0.86
copy serialized Small SignedBeaconBlock (128000 B) 14.804 us/op 24.145 us/op 0.61
transfer serialized Avg SignedBeaconBlock (200000 B) 3.0370 us/op 3.6250 us/op 0.84
copy serialized Avg SignedBeaconBlock (200000 B) 21.011 us/op 41.011 us/op 0.51
transfer serialized BlobsSidecar (524380 B) 3.1220 us/op 3.9210 us/op 0.80
copy serialized BlobsSidecar (524380 B) 81.728 us/op 130.38 us/op 0.63
transfer serialized Big SignedBeaconBlock (1000000 B) 3.3400 us/op 4.4390 us/op 0.75
copy serialized Big SignedBeaconBlock (1000000 B) 165.79 us/op 213.09 us/op 0.78
pass gossip attestations to forkchoice per slot 3.6755 ms/op 4.2029 ms/op 0.87
forkChoice updateHead vc 100000 bc 64 eq 0 733.72 us/op 754.92 us/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 0 4.2762 ms/op 7.0627 ms/op 0.61
forkChoice updateHead vc 1000000 bc 64 eq 0 7.4219 ms/op 8.6591 ms/op 0.86
forkChoice updateHead vc 600000 bc 320 eq 0 4.2854 ms/op 4.7324 ms/op 0.91
forkChoice updateHead vc 600000 bc 1200 eq 0 4.3125 ms/op 5.5739 ms/op 0.77
forkChoice updateHead vc 600000 bc 7200 eq 0 5.4145 ms/op 7.2751 ms/op 0.74
forkChoice updateHead vc 600000 bc 64 eq 1000 11.414 ms/op 14.963 ms/op 0.76
forkChoice updateHead vc 600000 bc 64 eq 10000 12.281 ms/op 15.623 ms/op 0.79
forkChoice updateHead vc 600000 bc 64 eq 300000 16.521 ms/op 29.506 ms/op 0.56
computeDeltas 500000 validators 300 proto nodes 6.4178 ms/op 7.1305 ms/op 0.90
computeDeltas 500000 validators 1200 proto nodes 6.2713 ms/op 6.8235 ms/op 0.92
computeDeltas 500000 validators 7200 proto nodes 6.2554 ms/op 6.5971 ms/op 0.95
computeDeltas 750000 validators 300 proto nodes 9.5472 ms/op 10.177 ms/op 0.94
computeDeltas 750000 validators 1200 proto nodes 9.8585 ms/op 10.734 ms/op 0.92
computeDeltas 750000 validators 7200 proto nodes 9.9443 ms/op 10.853 ms/op 0.92
computeDeltas 1400000 validators 300 proto nodes 19.570 ms/op 19.785 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 19.552 ms/op 19.562 ms/op 1.00
computeDeltas 1400000 validators 7200 proto nodes 18.386 ms/op 19.630 ms/op 0.94
computeDeltas 2100000 validators 300 proto nodes 27.405 ms/op 30.498 ms/op 0.90
computeDeltas 2100000 validators 1200 proto nodes 27.960 ms/op 29.296 ms/op 0.95
computeDeltas 2100000 validators 7200 proto nodes 26.653 ms/op 27.860 ms/op 0.96
computeProposerBoostScoreFromBalances 500000 validators 3.2862 ms/op 3.5776 ms/op 0.92
computeProposerBoostScoreFromBalances 750000 validators 3.3142 ms/op 4.0576 ms/op 0.82
computeProposerBoostScoreFromBalances 1400000 validators 3.3681 ms/op 4.0266 ms/op 0.84
computeProposerBoostScoreFromBalances 2100000 validators 3.3599 ms/op 3.7501 ms/op 0.90
altair processAttestation - 250000 vs - 7PWei normalcase 3.7487 ms/op 4.5459 ms/op 0.82
altair processAttestation - 250000 vs - 7PWei worstcase 3.3897 ms/op 5.3913 ms/op 0.63
altair processAttestation - setStatus - 1/6 committees join 179.41 us/op 212.08 us/op 0.85
altair processAttestation - setStatus - 1/3 committees join 358.25 us/op 392.74 us/op 0.91
altair processAttestation - setStatus - 1/2 committees join 474.24 us/op 531.06 us/op 0.89
altair processAttestation - setStatus - 2/3 committees join 625.95 us/op 683.12 us/op 0.92
altair processAttestation - setStatus - 4/5 committees join 811.19 us/op 883.96 us/op 0.92
altair processAttestation - setStatus - 100% committees join 956.41 us/op 1.0927 ms/op 0.88
altair processBlock - 250000 vs - 7PWei normalcase 9.7829 ms/op 13.348 ms/op 0.73
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.171 ms/op 38.934 ms/op 0.83
altair processBlock - 250000 vs - 7PWei worstcase 42.758 ms/op 46.097 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 94.692 ms/op 99.852 ms/op 0.95
phase0 processBlock - 250000 vs - 7PWei normalcase 3.1268 ms/op 3.6707 ms/op 0.85
phase0 processBlock - 250000 vs - 7PWei worstcase 30.764 ms/op 38.908 ms/op 0.79
altair processEth1Data - 250000 vs - 7PWei normalcase 459.80 us/op 712.05 us/op 0.65
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 12.986 us/op 16.051 us/op 0.81
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 60.682 us/op 99.127 us/op 0.61
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 12.425 us/op 26.713 us/op 0.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.6010 us/op 22.144 us/op 0.39
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 194.83 us/op 174.12 us/op 1.12
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4191 ms/op 1.6588 ms/op 0.86
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8324 ms/op 2.4364 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8309 ms/op 2.0146 ms/op 0.91
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.0568 ms/op 4.6262 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4574 ms/op 2.9238 ms/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 7.5555 ms/op 7.5654 ms/op 1.00
Tree 40 250000 create 372.00 ms/op 409.68 ms/op 0.91
Tree 40 250000 get(125000) 215.31 ns/op 212.58 ns/op 1.01
Tree 40 250000 set(125000) 1.0696 us/op 961.78 ns/op 1.11
Tree 40 250000 toArray() 23.327 ms/op 21.569 ms/op 1.08
Tree 40 250000 iterate all - toArray() + loop 24.069 ms/op 21.933 ms/op 1.10
Tree 40 250000 iterate all - get(i) 76.143 ms/op 75.015 ms/op 1.02
MutableVector 250000 create 14.804 ms/op 14.053 ms/op 1.05
MutableVector 250000 get(125000) 6.5770 ns/op 6.7510 ns/op 0.97
MutableVector 250000 set(125000) 265.17 ns/op 290.83 ns/op 0.91
MutableVector 250000 toArray() 4.0666 ms/op 4.0221 ms/op 1.01
MutableVector 250000 iterate all - toArray() + loop 4.2595 ms/op 3.6098 ms/op 1.18
MutableVector 250000 iterate all - get(i) 1.5524 ms/op 1.5954 ms/op 0.97
Array 250000 create 3.7461 ms/op 2.6882 ms/op 1.39
Array 250000 clone - spread 1.1917 ms/op 1.0158 ms/op 1.17
Array 250000 get(125000) 0.56600 ns/op 0.48600 ns/op 1.16
Array 250000 set(125000) 0.64200 ns/op 0.56800 ns/op 1.13
Array 250000 iterate all - loop 84.417 us/op 83.378 us/op 1.01
effectiveBalanceIncrements clone Uint8Array 300000 44.800 us/op 20.434 us/op 2.19
effectiveBalanceIncrements clone MutableVector 300000 310.00 ns/op 255.00 ns/op 1.22
effectiveBalanceIncrements rw all Uint8Array 300000 178.45 us/op 180.85 us/op 0.99
effectiveBalanceIncrements rw all MutableVector 300000 96.356 ms/op 75.690 ms/op 1.27
phase0 afterProcessEpoch - 250000 vs - 7PWei 117.72 ms/op 115.74 ms/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 47.262 ms/op 38.673 ms/op 1.22
altair processEpoch - mainnet_e81889 443.01 ms/op 455.46 ms/op 0.97
mainnet_e81889 - altair beforeProcessEpoch 66.141 ms/op 60.555 ms/op 1.09
mainnet_e81889 - altair processJustificationAndFinalization 15.712 us/op 15.175 us/op 1.04
mainnet_e81889 - altair processInactivityUpdates 5.1033 ms/op 6.1707 ms/op 0.83
mainnet_e81889 - altair processRewardsAndPenalties 66.139 ms/op 49.282 ms/op 1.34
mainnet_e81889 - altair processRegistryUpdates 2.6000 us/op 2.6560 us/op 0.98
mainnet_e81889 - altair processSlashings 567.00 ns/op 450.00 ns/op 1.26
mainnet_e81889 - altair processEth1DataReset 597.00 ns/op 560.00 ns/op 1.07
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2845 ms/op 1.2772 ms/op 1.01
mainnet_e81889 - altair processSlashingsReset 4.3830 us/op 3.4480 us/op 1.27
mainnet_e81889 - altair processRandaoMixesReset 4.7910 us/op 6.2910 us/op 0.76
mainnet_e81889 - altair processHistoricalRootsUpdate 680.00 ns/op 843.00 ns/op 0.81
mainnet_e81889 - altair processParticipationFlagUpdates 1.9480 us/op 1.6740 us/op 1.16
mainnet_e81889 - altair processSyncCommitteeUpdates 546.00 ns/op 695.00 ns/op 0.79
mainnet_e81889 - altair afterProcessEpoch 125.92 ms/op 129.40 ms/op 0.97
capella processEpoch - mainnet_e217614 1.6689 s/op 1.5271 s/op 1.09
mainnet_e217614 - capella beforeProcessEpoch 339.92 ms/op 269.62 ms/op 1.26
mainnet_e217614 - capella processJustificationAndFinalization 28.384 us/op 16.609 us/op 1.71
mainnet_e217614 - capella processInactivityUpdates 23.888 ms/op 18.832 ms/op 1.27
mainnet_e217614 - capella processRewardsAndPenalties 351.43 ms/op 317.34 ms/op 1.11
mainnet_e217614 - capella processRegistryUpdates 22.710 us/op 26.355 us/op 0.86
mainnet_e217614 - capella processSlashings 693.00 ns/op 608.00 ns/op 1.14
mainnet_e217614 - capella processEth1DataReset 780.00 ns/op 665.00 ns/op 1.17
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.1665 ms/op 4.2818 ms/op 0.97
mainnet_e217614 - capella processSlashingsReset 3.4400 us/op 3.4260 us/op 1.00
mainnet_e217614 - capella processRandaoMixesReset 10.354 us/op 6.1230 us/op 1.69
mainnet_e217614 - capella processHistoricalRootsUpdate 890.00 ns/op 642.00 ns/op 1.39
mainnet_e217614 - capella processParticipationFlagUpdates 2.8690 us/op 2.3710 us/op 1.21
mainnet_e217614 - capella afterProcessEpoch 349.77 ms/op 312.34 ms/op 1.12
phase0 processEpoch - mainnet_e58758 471.34 ms/op 460.20 ms/op 1.02
mainnet_e58758 - phase0 beforeProcessEpoch 137.16 ms/op 116.81 ms/op 1.17
mainnet_e58758 - phase0 processJustificationAndFinalization 29.442 us/op 18.265 us/op 1.61
mainnet_e58758 - phase0 processRewardsAndPenalties 55.716 ms/op 55.473 ms/op 1.00
mainnet_e58758 - phase0 processRegistryUpdates 19.148 us/op 12.308 us/op 1.56
mainnet_e58758 - phase0 processSlashings 1000.0 ns/op 498.00 ns/op 2.01
mainnet_e58758 - phase0 processEth1DataReset 1.2850 us/op 481.00 ns/op 2.67
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.7850 ms/op 1.0523 ms/op 1.70
mainnet_e58758 - phase0 processSlashingsReset 6.2090 us/op 2.5330 us/op 2.45
mainnet_e58758 - phase0 processRandaoMixesReset 10.848 us/op 6.4540 us/op 1.68
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.9500 us/op 621.00 ns/op 3.14
mainnet_e58758 - phase0 processParticipationRecordUpdates 9.4570 us/op 3.8630 us/op 2.45
mainnet_e58758 - phase0 afterProcessEpoch 129.25 ms/op 106.93 ms/op 1.21
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.5196 ms/op 1.9464 ms/op 1.29
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.0515 ms/op 1.5249 ms/op 2.00
altair processInactivityUpdates - 250000 normalcase 32.349 ms/op 19.051 ms/op 1.70
altair processInactivityUpdates - 250000 worstcase 33.204 ms/op 19.571 ms/op 1.70
phase0 processRegistryUpdates - 250000 normalcase 20.059 us/op 8.4770 us/op 2.37
phase0 processRegistryUpdates - 250000 badcase_full_deposits 521.55 us/op 406.76 us/op 1.28
phase0 processRegistryUpdates - 250000 worstcase 0.5 162.46 ms/op 128.20 ms/op 1.27
altair processRewardsAndPenalties - 250000 normalcase 74.859 ms/op 59.826 ms/op 1.25
altair processRewardsAndPenalties - 250000 worstcase 80.168 ms/op 60.167 ms/op 1.33
phase0 getAttestationDeltas - 250000 normalcase 14.074 ms/op 9.0275 ms/op 1.56
phase0 getAttestationDeltas - 250000 worstcase 12.917 ms/op 8.6461 ms/op 1.49
phase0 processSlashings - 250000 worstcase 3.2452 ms/op 2.3443 ms/op 1.38
altair processSyncCommitteeUpdates - 250000 177.05 ms/op 162.83 ms/op 1.09
BeaconState.hashTreeRoot - No change 336.00 ns/op 324.00 ns/op 1.04
BeaconState.hashTreeRoot - 1 full validator 170.63 us/op 159.99 us/op 1.07
BeaconState.hashTreeRoot - 32 full validator 1.9079 ms/op 1.5499 ms/op 1.23
BeaconState.hashTreeRoot - 512 full validator 23.512 ms/op 20.213 ms/op 1.16
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 216.83 us/op 210.53 us/op 1.03
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 3.2517 ms/op 2.7667 ms/op 1.18
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 49.076 ms/op 34.597 ms/op 1.42
BeaconState.hashTreeRoot - 1 balances 205.94 us/op 141.68 us/op 1.45
BeaconState.hashTreeRoot - 32 balances 1.7166 ms/op 1.3419 ms/op 1.28
BeaconState.hashTreeRoot - 512 balances 16.358 ms/op 11.549 ms/op 1.42
BeaconState.hashTreeRoot - 250000 balances 266.87 ms/op 251.48 ms/op 1.06
aggregationBits - 2048 els - zipIndexesInBitList 30.542 us/op 21.311 us/op 1.43
regular array get 100000 times 54.250 us/op 45.915 us/op 1.18
wrappedArray get 100000 times 51.087 us/op 49.081 us/op 1.04
arrayWithProxy get 100000 times 18.122 ms/op 15.216 ms/op 1.19
ssz.Root.equals 326.00 ns/op 260.00 ns/op 1.25
byteArrayEquals 326.00 ns/op 238.00 ns/op 1.37
shuffle list - 16384 els 7.9673 ms/op 7.9405 ms/op 1.00
shuffle list - 250000 els 123.45 ms/op 106.29 ms/op 1.16
processSlot - 1 slots 24.239 us/op 16.886 us/op 1.44
processSlot - 32 slots 4.5591 ms/op 3.2862 ms/op 1.39
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 68.728 ms/op 54.991 ms/op 1.25
getCommitteeAssignments - req 1 vs - 250000 vc 2.7938 ms/op 2.5900 ms/op 1.08
getCommitteeAssignments - req 100 vs - 250000 vc 4.1483 ms/op 3.8022 ms/op 1.09
getCommitteeAssignments - req 1000 vs - 250000 vc 4.7055 ms/op 4.1011 ms/op 1.15
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.7700 ns/op 4.6100 ns/op 1.25
state getBlockRootAtSlot - 250000 vs - 7PWei 705.16 ns/op 666.24 ns/op 1.06
computeProposers - vc 250000 10.205 ms/op 9.7646 ms/op 1.05
computeEpochShuffling - vc 250000 127.72 ms/op 110.03 ms/op 1.16
getNextSyncCommittee - vc 250000 171.79 ms/op 159.65 ms/op 1.08
computeSigningRoot for AttestationData 30.827 us/op 33.416 us/op 0.92
hash AttestationData serialized data then Buffer.toString(base64) 2.4499 us/op 2.4187 us/op 1.01
toHexString serialized data 1.7342 us/op 1.1190 us/op 1.55
Buffer.toString(base64) 281.62 ns/op 241.10 ns/op 1.17

by benchmarkbot/action

@philknows philknows added this to the v1.12.0 milestone Oct 25, 2023
@wemeetagain wemeetagain merged commit 421fd1a into unstable Oct 25, 2023
@wemeetagain wemeetagain deleted the nflaig/libp2p-stop-with-timeout branch October 25, 2023 21:12
@wemeetagain
Copy link
Member

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

3 participants