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: close REST API server before closing network #6061

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 24, 2023

Motivation

Some APIs depend on the network to be operational, e.g. submitPoolAttestations and publishAggregateAndProofs but the network itself has no dependency to the REST API server, hence it is better if we close the REST API server first and stop accepting new requests before starting to close the network.

Errors that might happen due to current close sequence

Oct-24 08:56:52.194[api]             error: Error on submitPoolAttestations [22] slot=6802484, index=17 - PublishError.InsufficientPeers
Error: PublishError.InsufficientPeers
    at Eth2Gossipsub.publish (file:///home/devops/goerli/lodestar/node_modules/@chainsafe/libp2p-gossipsub/dist/src/index.js:1547:19)
    at async NetworkCore.publishGossip (file:///home/devops/goerli/lodestar/packages/beacon-node/lib/network/core/networkCore.js:290:32)
Oct-24 08:56:56.163[rest]            error: Req req-54t0 publishAggregateAndProofs error - Multiple errors on publishAggregateAndProofs
PublishError.InsufficientPeers
PublishError.InsufficientPeers
Error: Multiple errors on publishAggregateAndProofs
PublishError.InsufficientPeers
PublishError.InsufficientPeers
    at Object.publishAggregateAndProofs (file:///home/devops/goerli/lodestar/packages/beacon-node/src/api/impl/validator/index.ts:668:15)
    at Object.handler (file:///home/devops/goerli/lodestar/packages/api/src/utils/server/genericJsonServer.ts:45:23)

Note that these errors are really rare in normal circumstances as the time between closing the network and the REST API server is usually just a few milliseconds but due to current libp2p issue #6053 this issue becomes more apparent.

Description

Close REST API server before closing network

The only reason I see why we would close the network first is that some APIs are still functional if they only rely on chain data but we are already closing the connections gracefully (#5786) which gives pending requests some time to complete.

@nflaig nflaig requested a review from a team as a code owner October 24, 2023 09:56
@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 9b9c75e Previous: 18dc0c9 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 470.07 us/op 629.07 us/op 0.75
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 74.086 us/op 103.44 us/op 0.72
BLS verify - blst-native 1.2881 ms/op 1.3631 ms/op 0.95
BLS verifyMultipleSignatures 3 - blst-native 2.7058 ms/op 2.9763 ms/op 0.91
BLS verifyMultipleSignatures 8 - blst-native 5.9658 ms/op 6.5568 ms/op 0.91
BLS verifyMultipleSignatures 32 - blst-native 22.033 ms/op 23.254 ms/op 0.95
BLS verifyMultipleSignatures 64 - blst-native 42.602 ms/op 45.033 ms/op 0.95
BLS verifyMultipleSignatures 128 - blst-native 84.523 ms/op 90.560 ms/op 0.93
BLS deserializing 10000 signatures 861.77 ms/op 923.04 ms/op 0.93
BLS deserializing 100000 signatures 8.8516 s/op 9.6705 s/op 0.92
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3109 ms/op 1.4379 ms/op 0.91
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5841 ms/op 1.6182 ms/op 0.98
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4571 ms/op 2.5321 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3454 ms/op 3.7155 ms/op 0.90
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.4697 ms/op 5.9923 ms/op 0.91
BLS aggregatePubkeys 32 - blst-native 25.320 us/op 27.498 us/op 0.92
BLS aggregatePubkeys 128 - blst-native 98.827 us/op 107.27 us/op 0.92
getAttestationsForBlock 33.661 ms/op 59.460 ms/op 0.57
isKnown best case - 1 super set check 271.00 ns/op 582.00 ns/op 0.47
isKnown normal case - 2 super set checks 255.00 ns/op 556.00 ns/op 0.46
isKnown worse case - 16 super set checks 258.00 ns/op 532.00 ns/op 0.48
CheckpointStateCache - add get delete 4.6060 us/op 6.2580 us/op 0.74
validate api signedAggregateAndProof - struct 2.6798 ms/op 2.9136 ms/op 0.92
validate gossip signedAggregateAndProof - struct 2.7240 ms/op 2.8943 ms/op 0.94
validate gossip attestation - vc 640000 1.3134 ms/op 1.4641 ms/op 0.90
batch validate gossip attestation - vc 640000 - chunk 32 156.23 us/op 178.41 us/op 0.88
batch validate gossip attestation - vc 640000 - chunk 64 137.60 us/op 154.17 us/op 0.89
batch validate gossip attestation - vc 640000 - chunk 128 128.90 us/op 150.07 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 256 120.17 us/op 141.27 us/op 0.85
pickEth1Vote - no votes 1.1210 ms/op 1.3322 ms/op 0.84
pickEth1Vote - max votes 10.829 ms/op 12.296 ms/op 0.88
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.555 ms/op 24.423 ms/op 0.68
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 25.053 ms/op 27.282 ms/op 0.92
pickEth1Vote - Eth1Data fastSerialize value x2048 567.80 us/op 753.69 us/op 0.75
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.0813 ms/op 5.6982 ms/op 1.24
bytes32 toHexString 457.00 ns/op 558.00 ns/op 0.82
bytes32 Buffer.toString(hex) 274.00 ns/op 318.00 ns/op 0.86
bytes32 Buffer.toString(hex) from Uint8Array 405.00 ns/op 518.00 ns/op 0.78
bytes32 Buffer.toString(hex) + 0x 281.00 ns/op 308.00 ns/op 0.91
Object access 1 prop 0.15000 ns/op 0.19700 ns/op 0.76
Map access 1 prop 0.14200 ns/op 0.15900 ns/op 0.89
Object get x1000 7.0990 ns/op 7.9110 ns/op 0.90
Map get x1000 0.57100 ns/op 0.66300 ns/op 0.86
Object set x1000 46.170 ns/op 66.462 ns/op 0.69
Map set x1000 36.937 ns/op 47.350 ns/op 0.78
Return object 10000 times 0.23040 ns/op 0.33090 ns/op 0.70
Throw Error 10000 times 3.7881 us/op 4.1895 us/op 0.90
fastMsgIdFn sha256 / 200 bytes 3.1940 us/op 3.4460 us/op 0.93
fastMsgIdFn h32 xxhash / 200 bytes 257.00 ns/op 313.00 ns/op 0.82
fastMsgIdFn h64 xxhash / 200 bytes 326.00 ns/op 396.00 ns/op 0.82
fastMsgIdFn sha256 / 1000 bytes 11.302 us/op 11.997 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 389.00 ns/op 456.00 ns/op 0.85
fastMsgIdFn h64 xxhash / 1000 bytes 399.00 ns/op 458.00 ns/op 0.87
fastMsgIdFn sha256 / 10000 bytes 102.37 us/op 108.95 us/op 0.94
fastMsgIdFn h32 xxhash / 10000 bytes 1.8810 us/op 2.0630 us/op 0.91
fastMsgIdFn h64 xxhash / 10000 bytes 1.3160 us/op 1.4040 us/op 0.94
send data - 1000 256B messages 17.762 ms/op 21.228 ms/op 0.84
send data - 1000 512B messages 25.429 ms/op 35.421 ms/op 0.72
send data - 1000 1024B messages 41.196 ms/op 46.769 ms/op 0.88
send data - 1000 1200B messages 24.338 ms/op 38.599 ms/op 0.63
send data - 1000 2048B messages 31.518 ms/op 38.694 ms/op 0.81
send data - 1000 4096B messages 26.718 ms/op 40.838 ms/op 0.65
send data - 1000 16384B messages 76.875 ms/op 88.521 ms/op 0.87
send data - 1000 65536B messages 279.79 ms/op 306.26 ms/op 0.91
enrSubnets - fastDeserialize 64 bits 1.1120 us/op 1.4650 us/op 0.76
enrSubnets - ssz BitVector 64 bits 386.00 ns/op 497.00 ns/op 0.78
enrSubnets - fastDeserialize 4 bits 150.00 ns/op 197.00 ns/op 0.76
enrSubnets - ssz BitVector 4 bits 396.00 ns/op 482.00 ns/op 0.82
prioritizePeers score -10:0 att 32-0.1 sync 2-0 94.163 us/op 117.61 us/op 0.80
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 116.50 us/op 138.47 us/op 0.84
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 150.53 us/op 183.87 us/op 0.82
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 266.15 us/op 318.62 us/op 0.84
prioritizePeers score 0:0 att 64-1 sync 4-1 352.93 us/op 386.00 us/op 0.91
array of 16000 items push then shift 1.5558 us/op 1.7930 us/op 0.87
LinkedList of 16000 items push then shift 8.4770 ns/op 9.8960 ns/op 0.86
array of 16000 items push then pop 76.896 ns/op 105.89 ns/op 0.73
LinkedList of 16000 items push then pop 8.5830 ns/op 9.3530 ns/op 0.92
array of 24000 items push then shift 2.4029 us/op 2.6981 us/op 0.89
LinkedList of 24000 items push then shift 8.7570 ns/op 9.6380 ns/op 0.91
array of 24000 items push then pop 90.251 ns/op 128.72 ns/op 0.70
LinkedList of 24000 items push then pop 8.6310 ns/op 10.342 ns/op 0.83
intersect bitArray bitLen 8 6.7280 ns/op 7.3520 ns/op 0.92
intersect array and set length 8 53.046 ns/op 71.129 ns/op 0.75
intersect bitArray bitLen 128 31.505 ns/op 34.823 ns/op 0.90
intersect array and set length 128 734.29 ns/op 881.68 ns/op 0.83
bitArray.getTrueBitIndexes() bitLen 128 1.3200 us/op 1.8670 us/op 0.71
bitArray.getTrueBitIndexes() bitLen 248 2.2500 us/op 2.8900 us/op 0.78
bitArray.getTrueBitIndexes() bitLen 512 4.4640 us/op 5.6600 us/op 0.79
Buffer.concat 32 items 892.00 ns/op 1.0260 us/op 0.87
Uint8Array.set 32 items 2.5450 us/op 2.2540 us/op 1.13
Set add up to 64 items then delete first 4.0002 us/op 4.7115 us/op 0.85
OrderedSet add up to 64 items then delete first 5.0162 us/op 6.0943 us/op 0.82
Set add up to 64 items then delete last 4.2982 us/op 4.9848 us/op 0.86
OrderedSet add up to 64 items then delete last 5.3257 us/op 6.2697 us/op 0.85
Set add up to 64 items then delete middle 4.2762 us/op 5.0118 us/op 0.85
OrderedSet add up to 64 items then delete middle 6.5332 us/op 8.0286 us/op 0.81
Set add up to 128 items then delete first 8.7484 us/op 10.242 us/op 0.85
OrderedSet add up to 128 items then delete first 11.329 us/op 13.739 us/op 0.82
Set add up to 128 items then delete last 8.5263 us/op 10.116 us/op 0.84
OrderedSet add up to 128 items then delete last 10.924 us/op 13.804 us/op 0.79
Set add up to 128 items then delete middle 8.4354 us/op 10.336 us/op 0.82
OrderedSet add up to 128 items then delete middle 15.760 us/op 19.302 us/op 0.82
Set add up to 256 items then delete first 17.724 us/op 20.682 us/op 0.86
OrderedSet add up to 256 items then delete first 23.413 us/op 29.073 us/op 0.81
Set add up to 256 items then delete last 16.993 us/op 20.830 us/op 0.82
OrderedSet add up to 256 items then delete last 21.793 us/op 26.549 us/op 0.82
Set add up to 256 items then delete middle 16.850 us/op 20.491 us/op 0.82
OrderedSet add up to 256 items then delete middle 42.423 us/op 51.000 us/op 0.83
transfer serialized Status (84 B) 1.7790 us/op 2.1600 us/op 0.82
copy serialized Status (84 B) 1.5050 us/op 2.0240 us/op 0.74
transfer serialized SignedVoluntaryExit (112 B) 2.0160 us/op 2.1940 us/op 0.92
copy serialized SignedVoluntaryExit (112 B) 1.5950 us/op 1.7310 us/op 0.92
transfer serialized ProposerSlashing (416 B) 2.9850 us/op 2.4290 us/op 1.23
copy serialized ProposerSlashing (416 B) 2.9490 us/op 2.2520 us/op 1.31
transfer serialized Attestation (485 B) 3.0830 us/op 2.3150 us/op 1.33
copy serialized Attestation (485 B) 2.9450 us/op 2.2340 us/op 1.32
transfer serialized AttesterSlashing (33232 B) 2.9180 us/op 2.4100 us/op 1.21
copy serialized AttesterSlashing (33232 B) 5.5930 us/op 7.4720 us/op 0.75
transfer serialized Small SignedBeaconBlock (128000 B) 2.9540 us/op 2.9500 us/op 1.00
copy serialized Small SignedBeaconBlock (128000 B) 12.142 us/op 24.809 us/op 0.49
transfer serialized Avg SignedBeaconBlock (200000 B) 3.1260 us/op 3.4430 us/op 0.91
copy serialized Avg SignedBeaconBlock (200000 B) 17.695 us/op 33.624 us/op 0.53
transfer serialized BlobsSidecar (524380 B) 3.0410 us/op 4.4430 us/op 0.68
copy serialized BlobsSidecar (524380 B) 75.427 us/op 88.603 us/op 0.85
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1430 us/op 4.0170 us/op 0.78
copy serialized Big SignedBeaconBlock (1000000 B) 151.26 us/op 234.66 us/op 0.64
pass gossip attestations to forkchoice per slot 3.5916 ms/op 4.3323 ms/op 0.83
forkChoice updateHead vc 100000 bc 64 eq 0 644.91 us/op 802.71 us/op 0.80
forkChoice updateHead vc 600000 bc 64 eq 0 4.3624 ms/op 4.5464 ms/op 0.96
forkChoice updateHead vc 1000000 bc 64 eq 0 6.9286 ms/op 7.5403 ms/op 0.92
forkChoice updateHead vc 600000 bc 320 eq 0 4.1568 ms/op 4.5231 ms/op 0.92
forkChoice updateHead vc 600000 bc 1200 eq 0 4.3697 ms/op 4.9208 ms/op 0.89
forkChoice updateHead vc 600000 bc 7200 eq 0 5.3263 ms/op 5.9760 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 1000 10.770 ms/op 12.018 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 10000 11.955 ms/op 13.255 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 300000 16.152 ms/op 21.566 ms/op 0.75
computeDeltas 500000 validators 300 proto nodes 6.1955 ms/op 6.7270 ms/op 0.92
computeDeltas 500000 validators 1200 proto nodes 6.0619 ms/op 6.6330 ms/op 0.91
computeDeltas 500000 validators 7200 proto nodes 6.2254 ms/op 6.4443 ms/op 0.97
computeDeltas 750000 validators 300 proto nodes 9.3857 ms/op 9.6814 ms/op 0.97
computeDeltas 750000 validators 1200 proto nodes 9.2953 ms/op 9.7910 ms/op 0.95
computeDeltas 750000 validators 7200 proto nodes 9.4299 ms/op 9.7575 ms/op 0.97
computeDeltas 1400000 validators 300 proto nodes 17.513 ms/op 18.550 ms/op 0.94
computeDeltas 1400000 validators 1200 proto nodes 17.769 ms/op 18.570 ms/op 0.96
computeDeltas 1400000 validators 7200 proto nodes 17.896 ms/op 18.567 ms/op 0.96
computeDeltas 2100000 validators 300 proto nodes 26.807 ms/op 27.908 ms/op 0.96
computeDeltas 2100000 validators 1200 proto nodes 26.510 ms/op 27.026 ms/op 0.98
computeDeltas 2100000 validators 7200 proto nodes 26.607 ms/op 27.022 ms/op 0.98
computeProposerBoostScoreFromBalances 500000 validators 3.2776 ms/op 3.3379 ms/op 0.98
computeProposerBoostScoreFromBalances 750000 validators 3.2557 ms/op 3.3870 ms/op 0.96
computeProposerBoostScoreFromBalances 1400000 validators 3.2187 ms/op 3.4797 ms/op 0.92
computeProposerBoostScoreFromBalances 2100000 validators 3.2662 ms/op 3.5773 ms/op 0.91
altair processAttestation - 250000 vs - 7PWei normalcase 2.2714 ms/op 3.2266 ms/op 0.70
altair processAttestation - 250000 vs - 7PWei worstcase 3.3145 ms/op 4.3033 ms/op 0.77
altair processAttestation - setStatus - 1/6 committees join 181.66 us/op 141.85 us/op 1.28
altair processAttestation - setStatus - 1/3 committees join 344.89 us/op 272.02 us/op 1.27
altair processAttestation - setStatus - 1/2 committees join 476.83 us/op 378.82 us/op 1.26
altair processAttestation - setStatus - 2/3 committees join 578.88 us/op 470.79 us/op 1.23
altair processAttestation - setStatus - 4/5 committees join 788.83 us/op 718.19 us/op 1.10
altair processAttestation - setStatus - 100% committees join 941.58 us/op 829.94 us/op 1.13
altair processBlock - 250000 vs - 7PWei normalcase 10.177 ms/op 10.694 ms/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase hashState 33.632 ms/op 40.016 ms/op 0.84
altair processBlock - 250000 vs - 7PWei worstcase 41.635 ms/op 44.477 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 91.096 ms/op 96.239 ms/op 0.95
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4405 ms/op 3.3341 ms/op 0.73
phase0 processBlock - 250000 vs - 7PWei worstcase 29.948 ms/op 41.891 ms/op 0.71
altair processEth1Data - 250000 vs - 7PWei normalcase 491.57 us/op 759.92 us/op 0.65
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.0800 us/op 17.090 us/op 0.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 61.252 us/op 60.605 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.412 us/op 24.789 us/op 0.74
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 11.068 us/op 11.712 us/op 0.95
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 138.81 us/op 158.51 us/op 0.88
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0386 ms/op 1.2437 ms/op 0.84
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5455 ms/op 1.7397 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6904 ms/op 1.8508 ms/op 0.91
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.3722 ms/op 4.0630 ms/op 0.83
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4818 ms/op 2.6218 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.1124 ms/op 6.1503 ms/op 0.83
Tree 40 250000 create 325.36 ms/op 396.46 ms/op 0.82
Tree 40 250000 get(125000) 200.36 ns/op 220.50 ns/op 0.91
Tree 40 250000 set(125000) 975.15 ns/op 1.1316 us/op 0.86
Tree 40 250000 toArray() 18.719 ms/op 22.910 ms/op 0.82
Tree 40 250000 iterate all - toArray() + loop 18.192 ms/op 23.009 ms/op 0.79
Tree 40 250000 iterate all - get(i) 71.041 ms/op 75.380 ms/op 0.94
MutableVector 250000 create 12.325 ms/op 14.857 ms/op 0.83
MutableVector 250000 get(125000) 6.5780 ns/op 7.0030 ns/op 0.94
MutableVector 250000 set(125000) 259.82 ns/op 310.00 ns/op 0.84
MutableVector 250000 toArray() 2.9613 ms/op 4.0517 ms/op 0.73
MutableVector 250000 iterate all - toArray() + loop 3.1406 ms/op 4.5561 ms/op 0.69
MutableVector 250000 iterate all - get(i) 1.5484 ms/op 1.7044 ms/op 0.91
Array 250000 create 2.8680 ms/op 4.0030 ms/op 0.72
Array 250000 clone - spread 1.2645 ms/op 1.1700 ms/op 1.08
Array 250000 get(125000) 0.62300 ns/op 0.57600 ns/op 1.08
Array 250000 set(125000) 0.69300 ns/op 0.63700 ns/op 1.09
Array 250000 iterate all - loop 83.632 us/op 85.534 us/op 0.98
effectiveBalanceIncrements clone Uint8Array 300000 29.751 us/op 46.468 us/op 0.64
effectiveBalanceIncrements clone MutableVector 300000 369.00 ns/op 247.00 ns/op 1.49
effectiveBalanceIncrements rw all Uint8Array 300000 180.11 us/op 182.35 us/op 0.99
effectiveBalanceIncrements rw all MutableVector 300000 88.373 ms/op 81.721 ms/op 1.08
phase0 afterProcessEpoch - 250000 vs - 7PWei 113.89 ms/op 117.21 ms/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 35.966 ms/op 41.263 ms/op 0.87
altair processEpoch - mainnet_e81889 415.11 ms/op 504.72 ms/op 0.82
mainnet_e81889 - altair beforeProcessEpoch 49.652 ms/op 69.064 ms/op 0.72
mainnet_e81889 - altair processJustificationAndFinalization 18.625 us/op 20.696 us/op 0.90
mainnet_e81889 - altair processInactivityUpdates 6.4896 ms/op 6.4504 ms/op 1.01
mainnet_e81889 - altair processRewardsAndPenalties 70.437 ms/op 55.658 ms/op 1.27
mainnet_e81889 - altair processRegistryUpdates 2.6020 us/op 4.6460 us/op 0.56
mainnet_e81889 - altair processSlashings 549.00 ns/op 984.00 ns/op 0.56
mainnet_e81889 - altair processEth1DataReset 605.00 ns/op 1.0120 us/op 0.60
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2733 ms/op 1.3299 ms/op 0.96
mainnet_e81889 - altair processSlashingsReset 3.8790 us/op 6.7160 us/op 0.58
mainnet_e81889 - altair processRandaoMixesReset 6.0700 us/op 7.2680 us/op 0.84
mainnet_e81889 - altair processHistoricalRootsUpdate 835.00 ns/op 965.00 ns/op 0.87
mainnet_e81889 - altair processParticipationFlagUpdates 2.0490 us/op 3.6260 us/op 0.57
mainnet_e81889 - altair processSyncCommitteeUpdates 638.00 ns/op 1.9560 us/op 0.33
mainnet_e81889 - altair afterProcessEpoch 129.79 ms/op 139.92 ms/op 0.93
capella processEpoch - mainnet_e217614 1.4829 s/op 1.8699 s/op 0.79
mainnet_e217614 - capella beforeProcessEpoch 243.87 ms/op 301.29 ms/op 0.81
mainnet_e217614 - capella processJustificationAndFinalization 13.490 us/op 31.603 us/op 0.43
mainnet_e217614 - capella processInactivityUpdates 16.494 ms/op 20.429 ms/op 0.81
mainnet_e217614 - capella processRewardsAndPenalties 275.54 ms/op 364.09 ms/op 0.76
mainnet_e217614 - capella processRegistryUpdates 22.261 us/op 33.141 us/op 0.67
mainnet_e217614 - capella processSlashings 489.00 ns/op 1.7410 us/op 0.28
mainnet_e217614 - capella processEth1DataReset 790.00 ns/op 1.1410 us/op 0.69
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.1183 ms/op 4.3939 ms/op 0.94
mainnet_e217614 - capella processSlashingsReset 2.6580 us/op 7.3880 us/op 0.36
mainnet_e217614 - capella processRandaoMixesReset 5.6200 us/op 12.129 us/op 0.46
mainnet_e217614 - capella processHistoricalRootsUpdate 639.00 ns/op 1.5440 us/op 0.41
mainnet_e217614 - capella processParticipationFlagUpdates 1.8880 us/op 4.6840 us/op 0.40
mainnet_e217614 - capella afterProcessEpoch 300.37 ms/op 333.31 ms/op 0.90
phase0 processEpoch - mainnet_e58758 444.15 ms/op 577.07 ms/op 0.77
mainnet_e58758 - phase0 beforeProcessEpoch 107.29 ms/op 176.54 ms/op 0.61
mainnet_e58758 - phase0 processJustificationAndFinalization 17.145 us/op 26.705 us/op 0.64
mainnet_e58758 - phase0 processRewardsAndPenalties 57.816 ms/op 69.583 ms/op 0.83
mainnet_e58758 - phase0 processRegistryUpdates 10.188 us/op 17.924 us/op 0.57
mainnet_e58758 - phase0 processSlashings 609.00 ns/op 1.1120 us/op 0.55
mainnet_e58758 - phase0 processEth1DataReset 404.00 ns/op 882.00 ns/op 0.46
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0460 ms/op 1.3915 ms/op 0.75
mainnet_e58758 - phase0 processSlashingsReset 2.3630 us/op 3.9670 us/op 0.60
mainnet_e58758 - phase0 processRandaoMixesReset 4.8510 us/op 7.7080 us/op 0.63
mainnet_e58758 - phase0 processHistoricalRootsUpdate 420.00 ns/op 1.4120 us/op 0.30
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.0180 us/op 6.2330 us/op 0.64
mainnet_e58758 - phase0 afterProcessEpoch 101.66 ms/op 112.34 ms/op 0.90
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2679 ms/op 2.0094 ms/op 0.63
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4373 ms/op 2.4581 ms/op 0.58
altair processInactivityUpdates - 250000 normalcase 20.723 ms/op 31.061 ms/op 0.67
altair processInactivityUpdates - 250000 worstcase 21.155 ms/op 29.946 ms/op 0.71
phase0 processRegistryUpdates - 250000 normalcase 8.0750 us/op 14.384 us/op 0.56
phase0 processRegistryUpdates - 250000 badcase_full_deposits 343.55 us/op 442.02 us/op 0.78
phase0 processRegistryUpdates - 250000 worstcase 0.5 122.95 ms/op 160.49 ms/op 0.77
altair processRewardsAndPenalties - 250000 normalcase 58.071 ms/op 55.371 ms/op 1.05
altair processRewardsAndPenalties - 250000 worstcase 53.395 ms/op 60.040 ms/op 0.89
phase0 getAttestationDeltas - 250000 normalcase 7.9797 ms/op 11.888 ms/op 0.67
phase0 getAttestationDeltas - 250000 worstcase 7.7275 ms/op 9.5069 ms/op 0.81
phase0 processSlashings - 250000 worstcase 2.3687 ms/op 2.6537 ms/op 0.89
altair processSyncCommitteeUpdates - 250000 155.32 ms/op 165.84 ms/op 0.94
BeaconState.hashTreeRoot - No change 267.00 ns/op 303.00 ns/op 0.88
BeaconState.hashTreeRoot - 1 full validator 123.62 us/op 146.21 us/op 0.85
BeaconState.hashTreeRoot - 32 full validator 1.2653 ms/op 1.6209 ms/op 0.78
BeaconState.hashTreeRoot - 512 full validator 12.945 ms/op 18.809 ms/op 0.69
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 140.76 us/op 264.69 us/op 0.53
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8933 ms/op 3.0104 ms/op 0.63
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.920 ms/op 34.705 ms/op 0.80
BeaconState.hashTreeRoot - 1 balances 174.39 us/op 151.26 us/op 1.15
BeaconState.hashTreeRoot - 32 balances 1.1676 ms/op 1.4498 ms/op 0.81
BeaconState.hashTreeRoot - 512 balances 12.456 ms/op 18.002 ms/op 0.69
BeaconState.hashTreeRoot - 250000 balances 205.54 ms/op 231.68 ms/op 0.89
aggregationBits - 2048 els - zipIndexesInBitList 24.938 us/op 28.434 us/op 0.88
regular array get 100000 times 46.778 us/op 45.196 us/op 1.04
wrappedArray get 100000 times 45.877 us/op 36.441 us/op 1.26
arrayWithProxy get 100000 times 15.269 ms/op 16.237 ms/op 0.94
ssz.Root.equals 237.00 ns/op 278.00 ns/op 0.85
byteArrayEquals 244.00 ns/op 281.00 ns/op 0.87
shuffle list - 16384 els 7.1178 ms/op 7.3257 ms/op 0.97
shuffle list - 250000 els 104.22 ms/op 108.50 ms/op 0.96
processSlot - 1 slots 17.844 us/op 22.606 us/op 0.79
processSlot - 32 slots 4.3255 ms/op 3.8682 ms/op 1.12
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 52.620 ms/op 58.786 ms/op 0.90
getCommitteeAssignments - req 1 vs - 250000 vc 2.7721 ms/op 2.6304 ms/op 1.05
getCommitteeAssignments - req 100 vs - 250000 vc 3.9264 ms/op 3.8459 ms/op 1.02
getCommitteeAssignments - req 1000 vs - 250000 vc 4.2521 ms/op 4.3580 ms/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.2400 ns/op 6.2900 ns/op 0.83
state getBlockRootAtSlot - 250000 vs - 7PWei 685.72 ns/op 702.85 ns/op 0.98
computeProposers - vc 250000 9.8426 ms/op 9.9194 ms/op 0.99
computeEpochShuffling - vc 250000 110.27 ms/op 111.94 ms/op 0.99
getNextSyncCommittee - vc 250000 176.33 ms/op 178.92 ms/op 0.99
computeSigningRoot for AttestationData 31.156 us/op 34.675 us/op 0.90
hash AttestationData serialized data then Buffer.toString(base64) 2.4115 us/op 2.5321 us/op 0.95
toHexString serialized data 1.2480 us/op 1.7548 us/op 0.71
Buffer.toString(base64) 232.78 ns/op 302.04 ns/op 0.77

by benchmarkbot/action

@wemeetagain wemeetagain merged commit ace85ff into unstable Oct 24, 2023
15 checks passed
@wemeetagain wemeetagain deleted the nflaig/close-rest-api-before-network branch October 24, 2023 14:22
@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