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: reject promise on file stream error when writing heap snapshot #6603

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Mar 27, 2024

Motivation

Writing a heap snapshot might fail due to missing permissions to write the file or misconfigured dirpath passed via query param.

In any case, we should reject and return a response to the caller but currently it results in an uncaught expection

Mar-27 20:40:32.388[network]         error: uncaughtException: EACCES: permission denied, open './network_thread_2024-03-27T20:40:32.037Z.heapsnapshot'
Error: EACCES: permission denied, open './network_thread_2024-03-27T20:40:32.037Z.heapsnapshot' - EACCES: permission denied, open './network_thread_2024-03-27T20:40:32.037Z.heapsnapshot'
Error: EACCES: permission denied, open './network_thread_2024-03-27T20:40:32.037Z.heapsnapshot'

Another issue is also that it is not possible to write another snapshot if the previous one failed as promise is stuck forever until process is restarted

curl -X POST http://localhost:5052/eth/v1/lodestar/write_heapdump?thread=network
{"statusCode":500,"error":"Internal Server Error","message":"Already writing heapdump"}

Description

Reject promise on file stream error when writing heap snapshot

@nflaig nflaig requested a review from a team as a code owner March 27, 2024 21:15
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Merging #6603 (22c3a2a) into unstable (4b17640) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6603   +/-   ##
=========================================
  Coverage     61.49%   61.49%           
=========================================
  Files           556      556           
  Lines         58903    58903           
  Branches       1857     1857           
=========================================
  Hits          36222    36222           
  Misses        22640    22640           
  Partials         41       41           

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 72f484c Previous: 4b17640 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 355.86 us/op 690.87 us/op 0.52
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 48.620 us/op 50.652 us/op 0.96
BLS verify - blst-native 1.1357 ms/op 1.1117 ms/op 1.02
BLS verifyMultipleSignatures 3 - blst-native 2.4303 ms/op 2.3910 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst-native 5.3452 ms/op 5.2584 ms/op 1.02
BLS verifyMultipleSignatures 32 - blst-native 19.718 ms/op 19.332 ms/op 1.02
BLS verifyMultipleSignatures 64 - blst-native 37.625 ms/op 38.149 ms/op 0.99
BLS verifyMultipleSignatures 128 - blst-native 74.886 ms/op 75.638 ms/op 0.99
BLS deserializing 10000 signatures 801.84 ms/op 799.19 ms/op 1.00
BLS deserializing 100000 signatures 8.1950 s/op 8.3121 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1440 ms/op 1.1314 ms/op 1.01
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.3097 ms/op 1.2319 ms/op 1.06
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.0089 ms/op 2.5892 ms/op 0.78
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.7829 ms/op 2.9470 ms/op 1.28
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.3631 ms/op 6.6690 ms/op 0.95
BLS aggregatePubkeys 32 - blst-native 24.665 us/op 23.897 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 90.189 us/op 89.533 us/op 1.01
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 55.417 ms/op 50.794 ms/op 1.09
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 51.350 ms/op 44.020 ms/op 1.17
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 25.258 ms/op 25.554 ms/op 0.99
getSlashingsAndExits - default max 124.37 us/op 148.86 us/op 0.84
getSlashingsAndExits - 2k 341.95 us/op 307.26 us/op 1.11
proposeBlockBody type=full, size=empty 4.6484 ms/op 4.5313 ms/op 1.03
isKnown best case - 1 super set check 359.00 ns/op 318.00 ns/op 1.13
isKnown normal case - 2 super set checks 354.00 ns/op 321.00 ns/op 1.10
isKnown worse case - 16 super set checks 335.00 ns/op 333.00 ns/op 1.01
CheckpointStateCache - add get delete 4.4220 us/op 4.3320 us/op 1.02
validate api signedAggregateAndProof - struct 2.3142 ms/op 2.4342 ms/op 0.95
validate gossip signedAggregateAndProof - struct 2.3523 ms/op 2.4289 ms/op 0.97
validate gossip attestation - vc 640000 1.1832 ms/op 1.1839 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 143.43 us/op 138.87 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 64 123.73 us/op 125.84 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 128 122.71 us/op 115.24 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 256 116.49 us/op 104.03 us/op 1.12
pickEth1Vote - no votes 973.62 us/op 863.31 us/op 1.13
pickEth1Vote - max votes 9.5274 ms/op 9.4333 ms/op 1.01
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.891 ms/op 16.537 ms/op 1.02
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 29.276 ms/op 25.447 ms/op 1.15
pickEth1Vote - Eth1Data fastSerialize value x2048 510.99 us/op 448.96 us/op 1.14
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.2089 ms/op 5.8484 ms/op 0.89
bytes32 toHexString 505.00 ns/op 440.00 ns/op 1.15
bytes32 Buffer.toString(hex) 332.00 ns/op 332.00 ns/op 1.00
bytes32 Buffer.toString(hex) from Uint8Array 517.00 ns/op 422.00 ns/op 1.23
bytes32 Buffer.toString(hex) + 0x 314.00 ns/op 320.00 ns/op 0.98
Object access 1 prop 0.23500 ns/op 0.19900 ns/op 1.18
Map access 1 prop 0.18700 ns/op 0.20000 ns/op 0.93
Object get x1000 4.9580 ns/op 4.8920 ns/op 1.01
Map get x1000 0.81600 ns/op 0.78000 ns/op 1.05
Object set x1000 26.946 ns/op 25.058 ns/op 1.08
Map set x1000 19.841 ns/op 17.110 ns/op 1.16
Return object 10000 times 0.22910 ns/op 0.23460 ns/op 0.98
Throw Error 10000 times 2.6640 us/op 2.7242 us/op 0.98
fastMsgIdFn sha256 / 200 bytes 2.0100 us/op 1.9630 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 347.00 ns/op 300.00 ns/op 1.16
fastMsgIdFn h64 xxhash / 200 bytes 391.00 ns/op 347.00 ns/op 1.13
fastMsgIdFn sha256 / 1000 bytes 6.2620 us/op 6.2240 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 482.00 ns/op 414.00 ns/op 1.16
fastMsgIdFn h64 xxhash / 1000 bytes 429.00 ns/op 405.00 ns/op 1.06
fastMsgIdFn sha256 / 10000 bytes 53.624 us/op 53.255 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.8200 us/op 1.8550 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 1.2570 us/op 1.2590 us/op 1.00
send data - 1000 256B messages 11.722 ms/op 11.500 ms/op 1.02
send data - 1000 512B messages 15.610 ms/op 14.869 ms/op 1.05
send data - 1000 1024B messages 30.469 ms/op 24.667 ms/op 1.24
send data - 1000 1200B messages 30.486 ms/op 26.150 ms/op 1.17
send data - 1000 2048B messages 38.222 ms/op 34.636 ms/op 1.10
send data - 1000 4096B messages 30.769 ms/op 33.569 ms/op 0.92
send data - 1000 16384B messages 90.480 ms/op 86.347 ms/op 1.05
send data - 1000 65536B messages 395.27 ms/op 399.03 ms/op 0.99
enrSubnets - fastDeserialize 64 bits 953.00 ns/op 952.00 ns/op 1.00
enrSubnets - ssz BitVector 64 bits 460.00 ns/op 427.00 ns/op 1.08
enrSubnets - fastDeserialize 4 bits 224.00 ns/op 205.00 ns/op 1.09
enrSubnets - ssz BitVector 4 bits 502.00 ns/op 428.00 ns/op 1.17
prioritizePeers score -10:0 att 32-0.1 sync 2-0 74.882 us/op 68.552 us/op 1.09
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 84.386 us/op 78.651 us/op 1.07
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 113.85 us/op 109.34 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 179.62 us/op 182.20 us/op 0.99
prioritizePeers score 0:0 att 64-1 sync 4-1 208.85 us/op 206.64 us/op 1.01
array of 16000 items push then shift 1.3360 us/op 1.3124 us/op 1.02
LinkedList of 16000 items push then shift 6.1670 ns/op 5.9810 ns/op 1.03
array of 16000 items push then pop 53.906 ns/op 47.899 ns/op 1.13
LinkedList of 16000 items push then pop 5.8420 ns/op 5.7190 ns/op 1.02
array of 24000 items push then shift 1.9627 us/op 1.8850 us/op 1.04
LinkedList of 24000 items push then shift 6.0920 ns/op 5.9150 ns/op 1.03
array of 24000 items push then pop 123.12 ns/op 81.817 ns/op 1.50
LinkedList of 24000 items push then pop 5.9990 ns/op 6.0370 ns/op 0.99
intersect bitArray bitLen 8 4.9930 ns/op 4.6450 ns/op 1.07
intersect array and set length 8 52.710 ns/op 47.092 ns/op 1.12
intersect bitArray bitLen 128 29.558 ns/op 27.956 ns/op 1.06
intersect array and set length 128 702.12 ns/op 647.94 ns/op 1.08
bitArray.getTrueBitIndexes() bitLen 128 1.2370 us/op 1.2700 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 248 2.2150 us/op 2.2840 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 512 4.0050 us/op 4.1620 us/op 0.96
Buffer.concat 32 items 907.00 ns/op 958.00 ns/op 0.95
Uint8Array.set 32 items 1.6860 us/op 2.2440 us/op 0.75
Set add up to 64 items then delete first 1.7918 us/op 1.6471 us/op 1.09
OrderedSet add up to 64 items then delete first 2.7461 us/op 2.5164 us/op 1.09
Set add up to 64 items then delete last 2.0901 us/op 1.8810 us/op 1.11
OrderedSet add up to 64 items then delete last 3.0705 us/op 2.8224 us/op 1.09
Set add up to 64 items then delete middle 2.0408 us/op 1.8855 us/op 1.08
OrderedSet add up to 64 items then delete middle 4.3240 us/op 4.0279 us/op 1.07
Set add up to 128 items then delete first 4.0448 us/op 3.6663 us/op 1.10
OrderedSet add up to 128 items then delete first 6.3883 us/op 6.0289 us/op 1.06
Set add up to 128 items then delete last 3.8991 us/op 3.5462 us/op 1.10
OrderedSet add up to 128 items then delete last 6.2910 us/op 5.4074 us/op 1.16
Set add up to 128 items then delete middle 3.9105 us/op 3.5413 us/op 1.10
OrderedSet add up to 128 items then delete middle 11.135 us/op 10.189 us/op 1.09
Set add up to 256 items then delete first 8.0643 us/op 7.1735 us/op 1.12
OrderedSet add up to 256 items then delete first 12.822 us/op 11.708 us/op 1.10
Set add up to 256 items then delete last 7.6988 us/op 6.9915 us/op 1.10
OrderedSet add up to 256 items then delete last 12.091 us/op 11.319 us/op 1.07
Set add up to 256 items then delete middle 7.7193 us/op 7.3384 us/op 1.05
OrderedSet add up to 256 items then delete middle 32.757 us/op 30.256 us/op 1.08
transfer serialized Status (84 B) 1.3510 us/op 1.2910 us/op 1.05
copy serialized Status (84 B) 1.0600 us/op 1.0380 us/op 1.02
transfer serialized SignedVoluntaryExit (112 B) 1.4130 us/op 1.3950 us/op 1.01
copy serialized SignedVoluntaryExit (112 B) 1.1620 us/op 1.1200 us/op 1.04
transfer serialized ProposerSlashing (416 B) 1.5550 us/op 1.7570 us/op 0.89
copy serialized ProposerSlashing (416 B) 1.3570 us/op 1.6280 us/op 0.83
transfer serialized Attestation (485 B) 1.6070 us/op 1.8380 us/op 0.87
copy serialized Attestation (485 B) 1.4300 us/op 1.6450 us/op 0.87
transfer serialized AttesterSlashing (33232 B) 1.7000 us/op 2.3030 us/op 0.74
copy serialized AttesterSlashing (33232 B) 3.4620 us/op 5.5580 us/op 0.62
transfer serialized Small SignedBeaconBlock (128000 B) 1.7280 us/op 3.0880 us/op 0.56
copy serialized Small SignedBeaconBlock (128000 B) 8.8360 us/op 12.477 us/op 0.71
transfer serialized Avg SignedBeaconBlock (200000 B) 1.9720 us/op 2.3720 us/op 0.83
copy serialized Avg SignedBeaconBlock (200000 B) 13.463 us/op 11.667 us/op 1.15
transfer serialized BlobsSidecar (524380 B) 2.2980 us/op 2.4450 us/op 0.94
copy serialized BlobsSidecar (524380 B) 78.940 us/op 74.337 us/op 1.06
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9640 us/op 2.7100 us/op 1.09
copy serialized Big SignedBeaconBlock (1000000 B) 143.65 us/op 127.34 us/op 1.13
pass gossip attestations to forkchoice per slot 3.1739 ms/op 2.7699 ms/op 1.15
forkChoice updateHead vc 100000 bc 64 eq 0 535.67 us/op 476.84 us/op 1.12
forkChoice updateHead vc 600000 bc 64 eq 0 2.9698 ms/op 2.7540 ms/op 1.08
forkChoice updateHead vc 1000000 bc 64 eq 0 5.1293 ms/op 4.4146 ms/op 1.16
forkChoice updateHead vc 600000 bc 320 eq 0 2.6895 ms/op 2.6106 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9922 ms/op 2.7044 ms/op 1.11
forkChoice updateHead vc 600000 bc 7200 eq 0 4.1971 ms/op 3.2804 ms/op 1.28
forkChoice updateHead vc 600000 bc 64 eq 1000 10.059 ms/op 9.9735 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 10000 9.8373 ms/op 9.9092 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 300000 12.405 ms/op 12.081 ms/op 1.03
computeDeltas 500000 validators 300 proto nodes 3.3671 ms/op 3.0604 ms/op 1.10
computeDeltas 500000 validators 1200 proto nodes 3.7168 ms/op 2.9784 ms/op 1.25
computeDeltas 500000 validators 7200 proto nodes 3.5543 ms/op 3.0305 ms/op 1.17
computeDeltas 750000 validators 300 proto nodes 6.2360 ms/op 4.6457 ms/op 1.34
computeDeltas 750000 validators 1200 proto nodes 6.1618 ms/op 4.9362 ms/op 1.25
computeDeltas 750000 validators 7200 proto nodes 6.3688 ms/op 4.6787 ms/op 1.36
computeDeltas 1400000 validators 300 proto nodes 12.339 ms/op 9.1820 ms/op 1.34
computeDeltas 1400000 validators 1200 proto nodes 12.687 ms/op 8.8804 ms/op 1.43
computeDeltas 1400000 validators 7200 proto nodes 11.693 ms/op 8.5795 ms/op 1.36
computeDeltas 2100000 validators 300 proto nodes 16.607 ms/op 13.151 ms/op 1.26
computeDeltas 2100000 validators 1200 proto nodes 14.772 ms/op 13.317 ms/op 1.11
computeDeltas 2100000 validators 7200 proto nodes 13.288 ms/op 13.085 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei normalcase 1.8245 ms/op 2.1708 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei worstcase 2.6334 ms/op 2.3025 ms/op 1.14
altair processAttestation - setStatus - 1/6 committees join 73.947 us/op 74.253 us/op 1.00
altair processAttestation - setStatus - 1/3 committees join 152.53 us/op 157.16 us/op 0.97
altair processAttestation - setStatus - 1/2 committees join 214.74 us/op 212.29 us/op 1.01
altair processAttestation - setStatus - 2/3 committees join 277.18 us/op 309.35 us/op 0.90
altair processAttestation - setStatus - 4/5 committees join 419.56 us/op 402.37 us/op 1.04
altair processAttestation - setStatus - 100% committees join 491.93 us/op 501.10 us/op 0.98
altair processBlock - 250000 vs - 7PWei normalcase 9.1245 ms/op 8.4164 ms/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.012 ms/op 36.637 ms/op 0.82
altair processBlock - 250000 vs - 7PWei worstcase 32.964 ms/op 35.407 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 74.112 ms/op 78.204 ms/op 0.95
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3687 ms/op 2.5946 ms/op 0.91
phase0 processBlock - 250000 vs - 7PWei worstcase 23.577 ms/op 28.165 ms/op 0.84
altair processEth1Data - 250000 vs - 7PWei normalcase 294.59 us/op 484.28 us/op 0.61
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 11.452 us/op 9.8540 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 31.108 us/op 64.188 us/op 0.48
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.0260 us/op 16.679 us/op 0.54
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.380 us/op 9.8240 us/op 1.06
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 182.79 us/op 158.27 us/op 1.15
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2832 ms/op 922.42 us/op 1.39
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1266 ms/op 1.2738 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 996.86 us/op 1.4029 ms/op 0.71
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.8972 ms/op 3.2526 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6524 ms/op 1.9484 ms/op 0.85
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0052 ms/op 4.4251 ms/op 0.91
Tree 40 250000 create 249.56 ms/op 255.90 ms/op 0.98
Tree 40 250000 get(125000) 114.31 ns/op 115.47 ns/op 0.99
Tree 40 250000 set(125000) 757.15 ns/op 785.32 ns/op 0.96
Tree 40 250000 toArray() 9.4889 ms/op 17.426 ms/op 0.54
Tree 40 250000 iterate all - toArray() + loop 10.008 ms/op 16.103 ms/op 0.62
Tree 40 250000 iterate all - get(i) 38.534 ms/op 54.551 ms/op 0.71
MutableVector 250000 create 11.289 ms/op 13.670 ms/op 0.83
MutableVector 250000 get(125000) 5.6980 ns/op 5.8290 ns/op 0.98
MutableVector 250000 set(125000) 212.71 ns/op 319.14 ns/op 0.67
MutableVector 250000 toArray() 2.1241 ms/op 2.7514 ms/op 0.77
MutableVector 250000 iterate all - toArray() + loop 2.2769 ms/op 2.4872 ms/op 0.92
MutableVector 250000 iterate all - get(i) 1.3515 ms/op 1.3265 ms/op 1.02
Array 250000 create 2.0235 ms/op 3.2270 ms/op 0.63
Array 250000 clone - spread 1.2016 ms/op 1.1442 ms/op 1.05
Array 250000 get(125000) 1.1030 ns/op 1.0400 ns/op 1.06
Array 250000 set(125000) 1.3200 ns/op 1.2550 ns/op 1.05
Array 250000 iterate all - loop 157.35 us/op 152.53 us/op 1.03
effectiveBalanceIncrements clone Uint8Array 300000 14.608 us/op 29.854 us/op 0.49
effectiveBalanceIncrements clone MutableVector 300000 460.00 ns/op 424.00 ns/op 1.08
effectiveBalanceIncrements rw all Uint8Array 300000 187.92 us/op 182.61 us/op 1.03
effectiveBalanceIncrements rw all MutableVector 300000 68.929 ms/op 73.478 ms/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 77.804 ms/op 78.536 ms/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 43.318 ms/op 49.510 ms/op 0.87
altair processEpoch - mainnet_e81889 366.08 ms/op 469.68 ms/op 0.78
mainnet_e81889 - altair beforeProcessEpoch 62.644 ms/op 73.062 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 12.689 us/op 12.933 us/op 0.98
mainnet_e81889 - altair processInactivityUpdates 3.9129 ms/op 6.6985 ms/op 0.58
mainnet_e81889 - altair processRewardsAndPenalties 63.716 ms/op 58.746 ms/op 1.08
mainnet_e81889 - altair processRegistryUpdates 1.8440 us/op 2.3850 us/op 0.77
mainnet_e81889 - altair processSlashings 529.00 ns/op 583.00 ns/op 0.91
mainnet_e81889 - altair processEth1DataReset 706.00 ns/op 682.00 ns/op 1.04
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7711 ms/op 1.7574 ms/op 1.01
mainnet_e81889 - altair processSlashingsReset 2.5900 us/op 4.0330 us/op 0.64
mainnet_e81889 - altair processRandaoMixesReset 5.5020 us/op 4.3260 us/op 1.27
mainnet_e81889 - altair processHistoricalRootsUpdate 757.00 ns/op 739.00 ns/op 1.02
mainnet_e81889 - altair processParticipationFlagUpdates 1.1070 us/op 1.6790 us/op 0.66
mainnet_e81889 - altair processSyncCommitteeUpdates 607.00 ns/op 648.00 ns/op 0.94
mainnet_e81889 - altair afterProcessEpoch 82.112 ms/op 82.632 ms/op 0.99
capella processEpoch - mainnet_e217614 1.6631 s/op 1.6568 s/op 1.00
mainnet_e217614 - capella beforeProcessEpoch 396.86 ms/op 423.22 ms/op 0.94
mainnet_e217614 - capella processJustificationAndFinalization 15.537 us/op 14.367 us/op 1.08
mainnet_e217614 - capella processInactivityUpdates 18.195 ms/op 15.178 ms/op 1.20
mainnet_e217614 - capella processRewardsAndPenalties 420.97 ms/op 521.37 ms/op 0.81
mainnet_e217614 - capella processRegistryUpdates 25.955 us/op 24.011 us/op 1.08
mainnet_e217614 - capella processSlashings 1.0900 us/op 852.00 ns/op 1.28
mainnet_e217614 - capella processEth1DataReset 781.00 ns/op 603.00 ns/op 1.30
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.4633 ms/op 3.5395 ms/op 0.98
mainnet_e217614 - capella processSlashingsReset 3.3250 us/op 2.6570 us/op 1.25
mainnet_e217614 - capella processRandaoMixesReset 4.8380 us/op 3.7000 us/op 1.31
mainnet_e217614 - capella processHistoricalRootsUpdate 737.00 ns/op 762.00 ns/op 0.97
mainnet_e217614 - capella processParticipationFlagUpdates 1.3990 us/op 1.8660 us/op 0.75
mainnet_e217614 - capella afterProcessEpoch 214.26 ms/op 244.17 ms/op 0.88
phase0 processEpoch - mainnet_e58758 392.45 ms/op 418.50 ms/op 0.94
mainnet_e58758 - phase0 beforeProcessEpoch 109.86 ms/op 120.62 ms/op 0.91
mainnet_e58758 - phase0 processJustificationAndFinalization 15.584 us/op 11.696 us/op 1.33
mainnet_e58758 - phase0 processRewardsAndPenalties 63.179 ms/op 52.542 ms/op 1.20
mainnet_e58758 - phase0 processRegistryUpdates 9.1810 us/op 10.525 us/op 0.87
mainnet_e58758 - phase0 processSlashings 709.00 ns/op 557.00 ns/op 1.27
mainnet_e58758 - phase0 processEth1DataReset 606.00 ns/op 558.00 ns/op 1.09
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.5025 ms/op 1.4643 ms/op 1.03
mainnet_e58758 - phase0 processSlashingsReset 3.8250 us/op 3.2020 us/op 1.19
mainnet_e58758 - phase0 processRandaoMixesReset 3.1580 us/op 2.9970 us/op 1.05
mainnet_e58758 - phase0 processHistoricalRootsUpdate 770.00 ns/op 588.00 ns/op 1.31
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.1940 us/op 3.4530 us/op 1.21
mainnet_e58758 - phase0 afterProcessEpoch 68.124 ms/op 69.933 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 normalcase 982.61 us/op 1.0543 ms/op 0.93
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1983 ms/op 1.1524 ms/op 1.04
altair processInactivityUpdates - 250000 normalcase 27.367 ms/op 24.883 ms/op 1.10
altair processInactivityUpdates - 250000 worstcase 23.657 ms/op 21.565 ms/op 1.10
phase0 processRegistryUpdates - 250000 normalcase 9.3790 us/op 8.9710 us/op 1.05
phase0 processRegistryUpdates - 250000 badcase_full_deposits 475.31 us/op 483.11 us/op 0.98
phase0 processRegistryUpdates - 250000 worstcase 0.5 123.43 ms/op 124.76 ms/op 0.99
altair processRewardsAndPenalties - 250000 normalcase 70.310 ms/op 65.518 ms/op 1.07
altair processRewardsAndPenalties - 250000 worstcase 57.952 ms/op 55.591 ms/op 1.04
phase0 getAttestationDeltas - 250000 normalcase 6.2821 ms/op 5.2129 ms/op 1.21
phase0 getAttestationDeltas - 250000 worstcase 5.9854 ms/op 6.9865 ms/op 0.86
phase0 processSlashings - 250000 worstcase 85.077 us/op 83.114 us/op 1.02
altair processSyncCommitteeUpdates - 250000 119.03 ms/op 105.80 ms/op 1.13
BeaconState.hashTreeRoot - No change 402.00 ns/op 333.00 ns/op 1.21
BeaconState.hashTreeRoot - 1 full validator 85.891 us/op 93.164 us/op 0.92
BeaconState.hashTreeRoot - 32 full validator 920.41 us/op 1.3167 ms/op 0.70
BeaconState.hashTreeRoot - 512 full validator 9.2240 ms/op 16.866 ms/op 0.55
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 105.12 us/op 185.59 us/op 0.57
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4073 ms/op 2.6298 ms/op 0.54
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.724 ms/op 34.037 ms/op 0.52
BeaconState.hashTreeRoot - 1 balances 87.456 us/op 152.39 us/op 0.57
BeaconState.hashTreeRoot - 32 balances 743.69 us/op 1.4635 ms/op 0.51
BeaconState.hashTreeRoot - 512 balances 7.0184 ms/op 10.832 ms/op 0.65
BeaconState.hashTreeRoot - 250000 balances 124.21 ms/op 140.15 ms/op 0.89
aggregationBits - 2048 els - zipIndexesInBitList 20.565 us/op 20.380 us/op 1.01
byteArrayEquals 32 65.266 ns/op 65.455 ns/op 1.00
Buffer.compare 32 41.793 ns/op 39.425 ns/op 1.06
byteArrayEquals 1024 1.7754 us/op 1.8223 us/op 0.97
Buffer.compare 1024 46.667 ns/op 48.343 ns/op 0.97
byteArrayEquals 16384 28.875 us/op 28.685 us/op 1.01
Buffer.compare 16384 212.52 ns/op 220.87 ns/op 0.96
byteArrayEquals 123687377 205.76 ms/op 212.09 ms/op 0.97
Buffer.compare 123687377 6.2401 ms/op 4.5287 ms/op 1.38
byteArrayEquals 32 - diff last byte 73.233 ns/op 63.555 ns/op 1.15
Buffer.compare 32 - diff last byte 38.500 ns/op 38.604 ns/op 1.00
byteArrayEquals 1024 - diff last byte 1.7217 us/op 1.7397 us/op 0.99
Buffer.compare 1024 - diff last byte 44.593 ns/op 44.565 ns/op 1.00
byteArrayEquals 16384 - diff last byte 26.747 us/op 28.581 us/op 0.94
Buffer.compare 16384 - diff last byte 219.66 ns/op 218.08 ns/op 1.01
byteArrayEquals 123687377 - diff last byte 214.80 ms/op 206.72 ms/op 1.04
Buffer.compare 123687377 - diff last byte 5.7029 ms/op 3.8058 ms/op 1.50
byteArrayEquals 32 - random bytes 4.8390 ns/op 4.4840 ns/op 1.08
Buffer.compare 32 - random bytes 40.073 ns/op 38.944 ns/op 1.03
byteArrayEquals 1024 - random bytes 5.1740 ns/op 4.4040 ns/op 1.17
Buffer.compare 1024 - random bytes 38.016 ns/op 37.483 ns/op 1.01
byteArrayEquals 16384 - random bytes 5.4480 ns/op 4.4150 ns/op 1.23
Buffer.compare 16384 - random bytes 39.922 ns/op 37.512 ns/op 1.06
byteArrayEquals 123687377 - random bytes 8.2100 ns/op 8.0300 ns/op 1.02
Buffer.compare 123687377 - random bytes 44.040 ns/op 41.350 ns/op 1.07
regular array get 100000 times 43.428 us/op 40.678 us/op 1.07
wrappedArray get 100000 times 43.462 us/op 40.664 us/op 1.07
arrayWithProxy get 100000 times 11.509 ms/op 9.7402 ms/op 1.18
ssz.Root.equals 61.041 ns/op 54.370 ns/op 1.12
byteArrayEquals 60.812 ns/op 53.495 ns/op 1.14
Buffer.compare 9.9910 ns/op 9.4880 ns/op 1.05
shuffle list - 16384 els 6.0787 ms/op 5.6885 ms/op 1.07
shuffle list - 250000 els 91.036 ms/op 82.357 ms/op 1.11
processSlot - 1 slots 14.538 us/op 16.160 us/op 0.90
processSlot - 32 slots 2.4165 ms/op 2.4065 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 49.660 ms/op 44.558 ms/op 1.11
getCommitteeAssignments - req 1 vs - 250000 vc 2.4176 ms/op 2.3460 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 3.7343 ms/op 3.4595 ms/op 1.08
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0198 ms/op 3.7611 ms/op 1.07
findModifiedValidators - 10000 modified validators 435.95 ms/op 405.01 ms/op 1.08
findModifiedValidators - 1000 modified validators 368.80 ms/op 331.74 ms/op 1.11
findModifiedValidators - 100 modified validators 342.81 ms/op 323.69 ms/op 1.06
findModifiedValidators - 10 modified validators 336.66 ms/op 308.31 ms/op 1.09
findModifiedValidators - 1 modified validators 307.76 ms/op 337.19 ms/op 0.91
findModifiedValidators - no difference 334.15 ms/op 343.13 ms/op 0.97
compare ViewDUs 4.0978 s/op 4.0072 s/op 1.02
compare each validator Uint8Array 1.1746 s/op 1.6995 s/op 0.69
compare ViewDU to Uint8Array 813.37 ms/op 958.67 ms/op 0.85
migrate state 1000000 validators, 24 modified, 0 new 648.97 ms/op 693.60 ms/op 0.94
migrate state 1000000 validators, 1700 modified, 1000 new 966.52 ms/op 933.79 ms/op 1.04
migrate state 1000000 validators, 3400 modified, 2000 new 1.1535 s/op 1.0192 s/op 1.13
migrate state 1500000 validators, 24 modified, 0 new 676.68 ms/op 652.27 ms/op 1.04
migrate state 1500000 validators, 1700 modified, 1000 new 984.93 ms/op 906.14 ms/op 1.09
migrate state 1500000 validators, 3400 modified, 2000 new 1.1161 s/op 1.1303 s/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.2700 ns/op 4.5600 ns/op 1.16
state getBlockRootAtSlot - 250000 vs - 7PWei 543.32 ns/op 429.93 ns/op 1.26
computeProposers - vc 250000 6.5001 ms/op 6.1723 ms/op 1.05
computeEpochShuffling - vc 250000 85.605 ms/op 84.459 ms/op 1.01
getNextSyncCommittee - vc 250000 109.15 ms/op 105.37 ms/op 1.04
computeSigningRoot for AttestationData 19.020 us/op 20.928 us/op 0.91
hash AttestationData serialized data then Buffer.toString(base64) 1.2694 us/op 1.2640 us/op 1.00
toHexString serialized data 795.53 ns/op 805.07 ns/op 0.99
Buffer.toString(base64) 161.08 ns/op 159.11 ns/op 1.01

by benchmarkbot/action

@nflaig nflaig merged commit 20bc193 into unstable Mar 28, 2024
20 of 21 checks passed
@nflaig nflaig deleted the nflaig/reject-on-filestream-error branch March 28, 2024 03:37
@wemeetagain
Copy link
Member

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