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: improve error if lockfile exists but not a directory #6450

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Feb 18, 2024

Motivation

We have upgraded the locking library in 1.15.1 (#6363) which now uses directories as .lock "files" this leads to a misleading error if users upgraded from previous versions and for some reason their previous .lock files are not cleaned up, see #6449.

There is also another case, where a user runs another client such as Teku which implements its own file locking but might also use files for locking instead of directories.

P.S. In case you wonder why proper-lockfile uses directories

This library utilizes the mkdir strategy which works atomically on any kind of file system, even network based ones.

Description

Improve error if lockfile exists but not a directory

@nflaig nflaig requested a review from a team as a code owner February 18, 2024 10:34
Copy link

codecov bot commented Feb 18, 2024

Codecov Report

Merging #6450 (4b1da59) into unstable (290c301) will decrease coverage by 0.07%.
Report is 1 commits behind head on unstable.
The diff coverage is 50.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6450      +/-   ##
============================================
- Coverage     61.71%   61.65%   -0.07%     
============================================
  Files           553      553              
  Lines         57900    57958      +58     
  Branches       1832     1833       +1     
============================================
- Hits          35733    35732       -1     
- Misses        22130    22189      +59     
  Partials         37       37              

@nflaig nflaig force-pushed the nflaig/lockfile-errors branch from 525a557 to 4b1da59 Compare February 18, 2024 11:10
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 8e09aca Previous: c7c9941 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 667.46 us/op 561.71 us/op 1.19
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 79.048 us/op 83.106 us/op 0.95
BLS verify - blst-native 1.2609 ms/op 1.3023 ms/op 0.97
BLS verifyMultipleSignatures 3 - blst-native 2.6459 ms/op 2.7374 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst-native 5.8058 ms/op 6.0057 ms/op 0.97
BLS verifyMultipleSignatures 32 - blst-native 21.230 ms/op 21.950 ms/op 0.97
BLS verifyMultipleSignatures 64 - blst-native 41.771 ms/op 43.011 ms/op 0.97
BLS verifyMultipleSignatures 128 - blst-native 82.856 ms/op 85.354 ms/op 0.97
BLS deserializing 10000 signatures 921.93 ms/op 933.11 ms/op 0.99
BLS deserializing 100000 signatures 9.1426 s/op 9.2569 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2732 ms/op 1.2990 ms/op 0.98
BLS verifyMultipleSignatures - same message - 8 - blst-native 3.5447 ms/op 1.4706 ms/op 2.41
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2953 ms/op 2.2590 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3687 ms/op 4.4515 ms/op 0.76
BLS verifyMultipleSignatures - same message - 128 - blst-native 7.6159 ms/op 7.1547 ms/op 1.06
BLS aggregatePubkeys 32 - blst-native 26.689 us/op 26.740 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 96.359 us/op 95.693 us/op 1.01
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 47.184 ms/op 47.654 ms/op 0.99
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 52.750 ms/op 52.193 ms/op 1.01
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 31.512 ms/op 32.527 ms/op 0.97
getSlashingsAndExits - default max 201.81 us/op 175.93 us/op 1.15
getSlashingsAndExits - 2k 393.54 us/op 437.22 us/op 0.90
proposeBlockBody type=full, size=empty 4.9228 ms/op 5.1834 ms/op 0.95
isKnown best case - 1 super set check 316.00 ns/op 327.00 ns/op 0.97
isKnown normal case - 2 super set checks 294.00 ns/op 340.00 ns/op 0.86
isKnown worse case - 16 super set checks 294.00 ns/op 443.00 ns/op 0.66
CheckpointStateCache - add get delete 5.0560 us/op 6.3970 us/op 0.79
validate api signedAggregateAndProof - struct 2.7622 ms/op 2.8640 ms/op 0.96
validate gossip signedAggregateAndProof - struct 2.7603 ms/op 2.8838 ms/op 0.96
validate gossip attestation - vc 640000 1.3455 ms/op 1.3811 ms/op 0.97
batch validate gossip attestation - vc 640000 - chunk 32 157.89 us/op 165.59 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 64 140.65 us/op 145.36 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 128 132.46 us/op 144.89 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 256 125.22 us/op 132.02 us/op 0.95
pickEth1Vote - no votes 1.1560 ms/op 1.1672 ms/op 0.99
pickEth1Vote - max votes 9.8888 ms/op 8.1547 ms/op 1.21
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.018 ms/op 16.757 ms/op 1.13
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.706 ms/op 22.299 ms/op 1.29
pickEth1Vote - Eth1Data fastSerialize value x2048 576.81 us/op 625.60 us/op 0.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.1530 ms/op 4.2888 ms/op 1.43
bytes32 toHexString 463.00 ns/op 504.00 ns/op 0.92
bytes32 Buffer.toString(hex) 286.00 ns/op 287.00 ns/op 1.00
bytes32 Buffer.toString(hex) from Uint8Array 400.00 ns/op 410.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 291.00 ns/op 286.00 ns/op 1.02
Object access 1 prop 0.16200 ns/op 0.16000 ns/op 1.01
Map access 1 prop 0.14800 ns/op 0.14100 ns/op 1.05
Object get x1000 7.4970 ns/op 7.6010 ns/op 0.99
Map get x1000 0.72300 ns/op 0.75600 ns/op 0.96
Object set x1000 49.501 ns/op 52.189 ns/op 0.95
Map set x1000 38.526 ns/op 39.561 ns/op 0.97
Return object 10000 times 0.23510 ns/op 0.24130 ns/op 0.97
Throw Error 10000 times 3.8271 us/op 3.7721 us/op 1.01
fastMsgIdFn sha256 / 200 bytes 3.2210 us/op 3.3260 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 265.00 ns/op 278.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 200 bytes 323.00 ns/op 358.00 ns/op 0.90
fastMsgIdFn sha256 / 1000 bytes 10.848 us/op 11.249 us/op 0.96
fastMsgIdFn h32 xxhash / 1000 bytes 386.00 ns/op 407.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 1000 bytes 387.00 ns/op 464.00 ns/op 0.83
fastMsgIdFn sha256 / 10000 bytes 99.342 us/op 102.03 us/op 0.97
fastMsgIdFn h32 xxhash / 10000 bytes 1.8130 us/op 1.9550 us/op 0.93
fastMsgIdFn h64 xxhash / 10000 bytes 1.2430 us/op 1.3960 us/op 0.89
send data - 1000 256B messages 18.430 ms/op 20.303 ms/op 0.91
send data - 1000 512B messages 24.717 ms/op 26.034 ms/op 0.95
send data - 1000 1024B messages 36.940 ms/op 41.328 ms/op 0.89
send data - 1000 1200B messages 38.917 ms/op 39.289 ms/op 0.99
send data - 1000 2048B messages 47.140 ms/op 53.243 ms/op 0.89
send data - 1000 4096B messages 42.425 ms/op 46.001 ms/op 0.92
send data - 1000 16384B messages 117.99 ms/op 118.35 ms/op 1.00
send data - 1000 65536B messages 439.05 ms/op 472.56 ms/op 0.93
enrSubnets - fastDeserialize 64 bits 1.2850 us/op 1.3100 us/op 0.98
enrSubnets - ssz BitVector 64 bits 430.00 ns/op 462.00 ns/op 0.93
enrSubnets - fastDeserialize 4 bits 175.00 ns/op 184.00 ns/op 0.95
enrSubnets - ssz BitVector 4 bits 471.00 ns/op 463.00 ns/op 1.02
prioritizePeers score -10:0 att 32-0.1 sync 2-0 105.53 us/op 105.97 us/op 1.00
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 133.24 us/op 133.56 us/op 1.00
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 181.66 us/op 165.92 us/op 1.09
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 303.76 us/op 326.39 us/op 0.93
prioritizePeers score 0:0 att 64-1 sync 4-1 350.20 us/op 353.99 us/op 0.99
array of 16000 items push then shift 1.6394 us/op 1.6421 us/op 1.00
LinkedList of 16000 items push then shift 8.9910 ns/op 8.8420 ns/op 1.02
array of 16000 items push then pop 89.910 ns/op 103.07 ns/op 0.87
LinkedList of 16000 items push then pop 8.7420 ns/op 8.7260 ns/op 1.00
array of 24000 items push then shift 2.5552 us/op 2.5572 us/op 1.00
LinkedList of 24000 items push then shift 8.9260 ns/op 9.2230 ns/op 0.97
array of 24000 items push then pop 122.44 ns/op 142.61 ns/op 0.86
LinkedList of 24000 items push then pop 8.6980 ns/op 8.8830 ns/op 0.98
intersect bitArray bitLen 8 5.9960 ns/op 5.9250 ns/op 1.01
intersect array and set length 8 64.112 ns/op 65.596 ns/op 0.98
intersect bitArray bitLen 128 35.709 ns/op 36.386 ns/op 0.98
intersect array and set length 128 907.64 ns/op 955.43 ns/op 0.95
bitArray.getTrueBitIndexes() bitLen 128 1.6010 us/op 1.7960 us/op 0.89
bitArray.getTrueBitIndexes() bitLen 248 2.6190 us/op 2.8710 us/op 0.91
bitArray.getTrueBitIndexes() bitLen 512 5.0240 us/op 5.8470 us/op 0.86
Buffer.concat 32 items 997.00 ns/op 1.0800 us/op 0.92
Uint8Array.set 32 items 1.6390 us/op 2.0260 us/op 0.81
Set add up to 64 items then delete first 4.3404 us/op 4.5649 us/op 0.95
OrderedSet add up to 64 items then delete first 5.5066 us/op 5.4670 us/op 1.01
Set add up to 64 items then delete last 4.6219 us/op 4.6406 us/op 1.00
OrderedSet add up to 64 items then delete last 5.8574 us/op 6.0001 us/op 0.98
Set add up to 64 items then delete middle 4.7248 us/op 4.6677 us/op 1.01
OrderedSet add up to 64 items then delete middle 7.4275 us/op 7.0890 us/op 1.05
Set add up to 128 items then delete first 9.5908 us/op 9.3397 us/op 1.03
OrderedSet add up to 128 items then delete first 12.468 us/op 12.118 us/op 1.03
Set add up to 128 items then delete last 9.2156 us/op 9.0913 us/op 1.01
OrderedSet add up to 128 items then delete last 11.503 us/op 11.440 us/op 1.01
Set add up to 128 items then delete middle 9.6790 us/op 9.3655 us/op 1.03
OrderedSet add up to 128 items then delete middle 18.579 us/op 16.881 us/op 1.10
Set add up to 256 items then delete first 20.597 us/op 18.877 us/op 1.09
OrderedSet add up to 256 items then delete first 28.225 us/op 26.511 us/op 1.06
Set add up to 256 items then delete last 20.034 us/op 18.986 us/op 1.06
OrderedSet add up to 256 items then delete last 25.869 us/op 24.490 us/op 1.06
Set add up to 256 items then delete middle 21.137 us/op 18.671 us/op 1.13
OrderedSet add up to 256 items then delete middle 51.054 us/op 47.258 us/op 1.08
transfer serialized Status (84 B) 1.9150 us/op 1.8510 us/op 1.03
copy serialized Status (84 B) 1.4590 us/op 1.4620 us/op 1.00
transfer serialized SignedVoluntaryExit (112 B) 2.1100 us/op 1.8180 us/op 1.16
copy serialized SignedVoluntaryExit (112 B) 1.4970 us/op 1.5150 us/op 0.99
transfer serialized ProposerSlashing (416 B) 2.4550 us/op 3.0830 us/op 0.80
copy serialized ProposerSlashing (416 B) 2.1670 us/op 2.7160 us/op 0.80
transfer serialized Attestation (485 B) 2.8840 us/op 2.7060 us/op 1.07
copy serialized Attestation (485 B) 2.4740 us/op 2.4740 us/op 1.00
transfer serialized AttesterSlashing (33232 B) 3.2320 us/op 3.0590 us/op 1.06
copy serialized AttesterSlashing (33232 B) 9.1270 us/op 7.8790 us/op 1.16
transfer serialized Small SignedBeaconBlock (128000 B) 3.4610 us/op 2.9990 us/op 1.15
copy serialized Small SignedBeaconBlock (128000 B) 18.961 us/op 18.320 us/op 1.03
transfer serialized Avg SignedBeaconBlock (200000 B) 3.9680 us/op 2.5650 us/op 1.55
copy serialized Avg SignedBeaconBlock (200000 B) 27.604 us/op 24.594 us/op 1.12
transfer serialized BlobsSidecar (524380 B) 4.2910 us/op 3.5980 us/op 1.19
copy serialized BlobsSidecar (524380 B) 90.579 us/op 100.52 us/op 0.90
transfer serialized Big SignedBeaconBlock (1000000 B) 4.6220 us/op 3.4380 us/op 1.34
copy serialized Big SignedBeaconBlock (1000000 B) 176.44 us/op 378.89 us/op 0.47
pass gossip attestations to forkchoice per slot 5.3271 ms/op 3.9021 ms/op 1.37
forkChoice updateHead vc 100000 bc 64 eq 0 687.46 us/op 677.00 us/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 0 5.7048 ms/op 5.7737 ms/op 0.99
forkChoice updateHead vc 1000000 bc 64 eq 0 7.6977 ms/op 7.4788 ms/op 1.03
forkChoice updateHead vc 600000 bc 320 eq 0 4.4097 ms/op 4.2940 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 4.6622 ms/op 4.5638 ms/op 1.02
forkChoice updateHead vc 600000 bc 7200 eq 0 5.7152 ms/op 5.9001 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 1000 11.625 ms/op 11.793 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 10000 12.823 ms/op 12.815 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 20.296 ms/op 15.808 ms/op 1.28
computeDeltas 500000 validators 300 proto nodes 7.0079 ms/op 6.7263 ms/op 1.04
computeDeltas 500000 validators 1200 proto nodes 6.9998 ms/op 6.5039 ms/op 1.08
computeDeltas 500000 validators 7200 proto nodes 6.7839 ms/op 6.5082 ms/op 1.04
computeDeltas 750000 validators 300 proto nodes 9.8509 ms/op 10.082 ms/op 0.98
computeDeltas 750000 validators 1200 proto nodes 10.403 ms/op 9.9742 ms/op 1.04
computeDeltas 750000 validators 7200 proto nodes 9.8727 ms/op 10.129 ms/op 0.97
computeDeltas 1400000 validators 300 proto nodes 19.285 ms/op 19.008 ms/op 1.01
computeDeltas 1400000 validators 1200 proto nodes 19.626 ms/op 19.264 ms/op 1.02
computeDeltas 1400000 validators 7200 proto nodes 18.866 ms/op 18.627 ms/op 1.01
computeDeltas 2100000 validators 300 proto nodes 28.809 ms/op 28.166 ms/op 1.02
computeDeltas 2100000 validators 1200 proto nodes 28.477 ms/op 28.478 ms/op 1.00
computeDeltas 2100000 validators 7200 proto nodes 29.243 ms/op 28.684 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei normalcase 2.1129 ms/op 2.0987 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei worstcase 3.2018 ms/op 3.1010 ms/op 1.03
altair processAttestation - setStatus - 1/6 committees join 142.11 us/op 178.57 us/op 0.80
altair processAttestation - setStatus - 1/3 committees join 284.74 us/op 337.30 us/op 0.84
altair processAttestation - setStatus - 1/2 committees join 376.26 us/op 462.93 us/op 0.81
altair processAttestation - setStatus - 2/3 committees join 480.51 us/op 575.53 us/op 0.83
altair processAttestation - setStatus - 4/5 committees join 669.53 us/op 761.57 us/op 0.88
altair processAttestation - setStatus - 100% committees join 781.33 us/op 911.62 us/op 0.86
altair processBlock - 250000 vs - 7PWei normalcase 11.319 ms/op 9.6714 ms/op 1.17
altair processBlock - 250000 vs - 7PWei normalcase hashState 37.104 ms/op 34.113 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase 37.347 ms/op 37.133 ms/op 1.01
altair processBlock - 250000 vs - 7PWei worstcase hashState 95.917 ms/op 91.820 ms/op 1.04
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4395 ms/op 2.7887 ms/op 0.87
phase0 processBlock - 250000 vs - 7PWei worstcase 28.010 ms/op 28.903 ms/op 0.97
altair processEth1Data - 250000 vs - 7PWei normalcase 559.90 us/op 506.64 us/op 1.11
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 11.657 us/op 10.181 us/op 1.14
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 43.384 us/op 33.006 us/op 1.31
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.649 us/op 10.958 us/op 1.43
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.048 us/op 7.5610 us/op 1.33
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 127.95 us/op 164.13 us/op 0.78
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1564 ms/op 1.0731 ms/op 1.08
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5886 ms/op 1.5780 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5803 ms/op 1.5660 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.2920 ms/op 4.0046 ms/op 0.82
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3362 ms/op 2.2143 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.2392 ms/op 5.2113 ms/op 1.01
Tree 40 250000 create 331.76 ms/op 337.42 ms/op 0.98
Tree 40 250000 get(125000) 187.27 ns/op 195.09 ns/op 0.96
Tree 40 250000 set(125000) 962.94 ns/op 970.66 ns/op 0.99
Tree 40 250000 toArray() 18.412 ms/op 18.493 ms/op 1.00
Tree 40 250000 iterate all - toArray() + loop 18.629 ms/op 18.345 ms/op 1.02
Tree 40 250000 iterate all - get(i) 66.746 ms/op 64.684 ms/op 1.03
MutableVector 250000 create 14.889 ms/op 14.318 ms/op 1.04
MutableVector 250000 get(125000) 6.2740 ns/op 6.3340 ns/op 0.99
MutableVector 250000 set(125000) 257.83 ns/op 272.21 ns/op 0.95
MutableVector 250000 toArray() 3.0338 ms/op 3.2061 ms/op 0.95
MutableVector 250000 iterate all - toArray() + loop 3.2407 ms/op 3.3745 ms/op 0.96
MutableVector 250000 iterate all - get(i) 1.4920 ms/op 1.5080 ms/op 0.99
Array 250000 create 2.6154 ms/op 2.7730 ms/op 0.94
Array 250000 clone - spread 1.2980 ms/op 1.3839 ms/op 0.94
Array 250000 get(125000) 1.0460 ns/op 1.0990 ns/op 0.95
Array 250000 set(125000) 3.9940 ns/op 4.1470 ns/op 0.96
Array 250000 iterate all - loop 158.65 us/op 164.18 us/op 0.97
effectiveBalanceIncrements clone Uint8Array 300000 29.172 us/op 31.528 us/op 0.93
effectiveBalanceIncrements clone MutableVector 300000 427.00 ns/op 427.00 ns/op 1.00
effectiveBalanceIncrements rw all Uint8Array 300000 192.04 us/op 198.54 us/op 0.97
effectiveBalanceIncrements rw all MutableVector 300000 83.606 ms/op 87.532 ms/op 0.96
phase0 afterProcessEpoch - 250000 vs - 7PWei 112.95 ms/op 112.91 ms/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 50.422 ms/op 36.100 ms/op 1.40
altair processEpoch - mainnet_e81889 515.52 ms/op 494.67 ms/op 1.04
mainnet_e81889 - altair beforeProcessEpoch 81.845 ms/op 79.993 ms/op 1.02
mainnet_e81889 - altair processJustificationAndFinalization 14.623 us/op 14.773 us/op 0.99
mainnet_e81889 - altair processInactivityUpdates 5.6242 ms/op 5.3382 ms/op 1.05
mainnet_e81889 - altair processRewardsAndPenalties 60.274 ms/op 61.062 ms/op 0.99
mainnet_e81889 - altair processRegistryUpdates 2.5250 us/op 2.4970 us/op 1.01
mainnet_e81889 - altair processSlashings 467.00 ns/op 432.00 ns/op 1.08
mainnet_e81889 - altair processEth1DataReset 478.00 ns/op 462.00 ns/op 1.03
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3868 ms/op 1.4072 ms/op 0.99
mainnet_e81889 - altair processSlashingsReset 2.6820 us/op 3.5950 us/op 0.75
mainnet_e81889 - altair processRandaoMixesReset 3.7400 us/op 3.7750 us/op 0.99
mainnet_e81889 - altair processHistoricalRootsUpdate 654.00 ns/op 692.00 ns/op 0.95
mainnet_e81889 - altair processParticipationFlagUpdates 1.3790 us/op 1.4550 us/op 0.95
mainnet_e81889 - altair processSyncCommitteeUpdates 621.00 ns/op 437.00 ns/op 1.42
mainnet_e81889 - altair afterProcessEpoch 114.60 ms/op 115.09 ms/op 1.00
capella processEpoch - mainnet_e217614 2.0867 s/op 2.0669 s/op 1.01
mainnet_e217614 - capella beforeProcessEpoch 495.29 ms/op 478.19 ms/op 1.04
mainnet_e217614 - capella processJustificationAndFinalization 14.358 us/op 13.775 us/op 1.04
mainnet_e217614 - capella processInactivityUpdates 19.084 ms/op 20.524 ms/op 0.93
mainnet_e217614 - capella processRewardsAndPenalties 414.06 ms/op 406.52 ms/op 1.02
mainnet_e217614 - capella processRegistryUpdates 16.744 us/op 16.481 us/op 1.02
mainnet_e217614 - capella processSlashings 546.00 ns/op 525.00 ns/op 1.04
mainnet_e217614 - capella processEth1DataReset 486.00 ns/op 431.00 ns/op 1.13
mainnet_e217614 - capella processEffectiveBalanceUpdates 6.2986 ms/op 4.3815 ms/op 1.44
mainnet_e217614 - capella processSlashingsReset 3.8230 us/op 2.8110 us/op 1.36
mainnet_e217614 - capella processRandaoMixesReset 4.5330 us/op 3.8670 us/op 1.17
mainnet_e217614 - capella processHistoricalRootsUpdate 665.00 ns/op 663.00 ns/op 1.00
mainnet_e217614 - capella processParticipationFlagUpdates 1.4850 us/op 2.0840 us/op 0.71
mainnet_e217614 - capella afterProcessEpoch 333.32 ms/op 316.91 ms/op 1.05
phase0 processEpoch - mainnet_e58758 486.34 ms/op 464.41 ms/op 1.05
mainnet_e58758 - phase0 beforeProcessEpoch 148.36 ms/op 114.71 ms/op 1.29
mainnet_e58758 - phase0 processJustificationAndFinalization 14.601 us/op 14.190 us/op 1.03
mainnet_e58758 - phase0 processRewardsAndPenalties 56.767 ms/op 52.270 ms/op 1.09
mainnet_e58758 - phase0 processRegistryUpdates 9.3430 us/op 10.534 us/op 0.89
mainnet_e58758 - phase0 processSlashings 516.00 ns/op 436.00 ns/op 1.18
mainnet_e58758 - phase0 processEth1DataReset 448.00 ns/op 427.00 ns/op 1.05
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1223 ms/op 1.1133 ms/op 1.01
mainnet_e58758 - phase0 processSlashingsReset 2.4590 us/op 3.2080 us/op 0.77
mainnet_e58758 - phase0 processRandaoMixesReset 3.7340 us/op 3.8950 us/op 0.96
mainnet_e58758 - phase0 processHistoricalRootsUpdate 419.00 ns/op 473.00 ns/op 0.89
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.7280 us/op 2.9750 us/op 1.25
mainnet_e58758 - phase0 afterProcessEpoch 90.703 ms/op 93.058 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3546 ms/op 1.3903 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5041 ms/op 1.4787 ms/op 1.02
altair processInactivityUpdates - 250000 normalcase 31.130 ms/op 29.616 ms/op 1.05
altair processInactivityUpdates - 250000 worstcase 29.042 ms/op 22.824 ms/op 1.27
phase0 processRegistryUpdates - 250000 normalcase 8.4640 us/op 8.3530 us/op 1.01
phase0 processRegistryUpdates - 250000 badcase_full_deposits 367.53 us/op 400.16 us/op 0.92
phase0 processRegistryUpdates - 250000 worstcase 0.5 136.34 ms/op 137.29 ms/op 0.99
altair processRewardsAndPenalties - 250000 normalcase 42.999 ms/op 58.370 ms/op 0.74
altair processRewardsAndPenalties - 250000 worstcase 58.243 ms/op 59.723 ms/op 0.98
phase0 getAttestationDeltas - 250000 normalcase 10.047 ms/op 8.1121 ms/op 1.24
phase0 getAttestationDeltas - 250000 worstcase 10.014 ms/op 7.9861 ms/op 1.25
phase0 processSlashings - 250000 worstcase 80.171 us/op 80.041 us/op 1.00
altair processSyncCommitteeUpdates - 250000 151.71 ms/op 153.93 ms/op 0.99
BeaconState.hashTreeRoot - No change 345.00 ns/op 382.00 ns/op 0.90
BeaconState.hashTreeRoot - 1 full validator 156.83 us/op 159.77 us/op 0.98
BeaconState.hashTreeRoot - 32 full validator 1.7345 ms/op 1.7276 ms/op 1.00
BeaconState.hashTreeRoot - 512 full validator 18.040 ms/op 18.139 ms/op 0.99
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 191.44 us/op 180.94 us/op 1.06
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.6133 ms/op 2.2161 ms/op 1.18
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 31.821 ms/op 29.390 ms/op 1.08
BeaconState.hashTreeRoot - 1 balances 135.81 us/op 133.94 us/op 1.01
BeaconState.hashTreeRoot - 32 balances 1.2251 ms/op 1.0971 ms/op 1.12
BeaconState.hashTreeRoot - 512 balances 12.109 ms/op 10.073 ms/op 1.20
BeaconState.hashTreeRoot - 250000 balances 212.06 ms/op 212.24 ms/op 1.00
aggregationBits - 2048 els - zipIndexesInBitList 16.565 us/op 17.141 us/op 0.97
byteArrayEquals 32 75.415 ns/op 74.566 ns/op 1.01
Buffer.compare 32 55.816 ns/op 55.866 ns/op 1.00
byteArrayEquals 1024 2.0536 us/op 2.0483 us/op 1.00
Buffer.compare 1024 70.312 ns/op 71.526 ns/op 0.98
byteArrayEquals 16384 32.715 us/op 33.016 us/op 0.99
Buffer.compare 16384 258.26 ns/op 274.85 ns/op 0.94
byteArrayEquals 123687377 246.24 ms/op 246.78 ms/op 1.00
Buffer.compare 123687377 6.2724 ms/op 6.0346 ms/op 1.04
byteArrayEquals 32 - diff last byte 72.271 ns/op 71.383 ns/op 1.01
Buffer.compare 32 - diff last byte 57.474 ns/op 55.588 ns/op 1.03
byteArrayEquals 1024 - diff last byte 2.0435 us/op 2.0184 us/op 1.01
Buffer.compare 1024 - diff last byte 72.053 ns/op 71.025 ns/op 1.01
byteArrayEquals 16384 - diff last byte 32.593 us/op 32.186 us/op 1.01
Buffer.compare 16384 - diff last byte 267.25 ns/op 270.46 ns/op 0.99
byteArrayEquals 123687377 - diff last byte 246.41 ms/op 242.81 ms/op 1.01
Buffer.compare 123687377 - diff last byte 6.1253 ms/op 6.2715 ms/op 0.98
byteArrayEquals 32 - random bytes 5.3160 ns/op 5.2320 ns/op 1.02
Buffer.compare 32 - random bytes 62.207 ns/op 60.034 ns/op 1.04
byteArrayEquals 1024 - random bytes 5.2140 ns/op 5.1400 ns/op 1.01
Buffer.compare 1024 - random bytes 60.677 ns/op 59.564 ns/op 1.02
byteArrayEquals 16384 - random bytes 5.2200 ns/op 5.1530 ns/op 1.01
Buffer.compare 16384 - random bytes 61.036 ns/op 59.525 ns/op 1.03
byteArrayEquals 123687377 - random bytes 8.5900 ns/op 8.4500 ns/op 1.02
Buffer.compare 123687377 - random bytes 64.320 ns/op 62.770 ns/op 1.02
regular array get 100000 times 44.776 us/op 43.750 us/op 1.02
wrappedArray get 100000 times 44.559 us/op 43.790 us/op 1.02
arrayWithProxy get 100000 times 14.212 ms/op 13.912 ms/op 1.02
ssz.Root.equals 53.848 ns/op 52.969 ns/op 1.02
byteArrayEquals 52.954 ns/op 52.158 ns/op 1.02
Buffer.compare 10.849 ns/op 13.978 ns/op 0.78
shuffle list - 16384 els 6.9638 ms/op 6.8798 ms/op 1.01
shuffle list - 250000 els 101.39 ms/op 100.81 ms/op 1.01
processSlot - 1 slots 16.867 us/op 16.628 us/op 1.01
processSlot - 32 slots 3.2297 ms/op 3.5959 ms/op 0.90
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 61.387 ms/op 61.820 ms/op 0.99
getCommitteeAssignments - req 1 vs - 250000 vc 2.4957 ms/op 2.4539 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 3.6860 ms/op 3.6604 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0198 ms/op 3.9821 ms/op 1.01
findModifiedValidators - 10000 modified validators 556.89 ms/op 539.65 ms/op 1.03
findModifiedValidators - 1000 modified validators 434.36 ms/op 399.69 ms/op 1.09
findModifiedValidators - 100 modified validators 444.77 ms/op 419.67 ms/op 1.06
findModifiedValidators - 10 modified validators 427.30 ms/op 400.23 ms/op 1.07
findModifiedValidators - 1 modified validators 421.79 ms/op 385.56 ms/op 1.09
findModifiedValidators - no difference 400.26 ms/op 400.23 ms/op 1.00
compare ViewDUs 4.3885 s/op 4.3362 s/op 1.01
compare each validator Uint8Array 1.5527 s/op 1.7219 s/op 0.90
compare ViewDU to Uint8Array 1.0754 s/op 1.1492 s/op 0.94
migrate state 1000000 validators, 24 modified, 0 new 829.09 ms/op 843.29 ms/op 0.98
migrate state 1000000 validators, 1700 modified, 1000 new 1.1154 s/op 1.1630 s/op 0.96
migrate state 1000000 validators, 3400 modified, 2000 new 1.3446 s/op 1.3873 s/op 0.97
migrate state 1500000 validators, 24 modified, 0 new 833.18 ms/op 859.36 ms/op 0.97
migrate state 1500000 validators, 1700 modified, 1000 new 1.1038 s/op 1.1647 s/op 0.95
migrate state 1500000 validators, 3400 modified, 2000 new 1.3490 s/op 1.3693 s/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2000 ns/op 4.2200 ns/op 1.00
state getBlockRootAtSlot - 250000 vs - 7PWei 676.71 ns/op 543.59 ns/op 1.24
computeProposers - vc 250000 9.5418 ms/op 9.1067 ms/op 1.05
computeEpochShuffling - vc 250000 102.91 ms/op 100.78 ms/op 1.02
getNextSyncCommittee - vc 250000 156.57 ms/op 151.92 ms/op 1.03
computeSigningRoot for AttestationData 26.280 us/op 28.179 us/op 0.93
hash AttestationData serialized data then Buffer.toString(base64) 2.2832 us/op 2.2601 us/op 1.01
toHexString serialized data 1.0519 us/op 1.0260 us/op 1.03
Buffer.toString(base64) 221.60 ns/op 226.82 ns/op 0.98

by benchmarkbot/action

if (isLockfileError(e) && e.code === "ELOCKED") {
e.message = `${filepath} is already in use by another process`;
if (isLockfileError(e) && (e.code === "ELOCKED" || e.code === "ENOTDIR")) {
e.message = `'${filepath}' already in use by another process`;
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this error message is not descriptive enough for the case of ENOTDIR.

Maybe have a separate error message like "Non-directory lockfile is deprecated. Most likely '${filepath}' is in use by another process running an old version, or orphaned lockfile during the upgrade"

Copy link
Member Author

@nflaig nflaig Feb 19, 2024

Choose a reason for hiding this comment

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

There a few cases where we would get error cde ENOTDIR

  1. A second Lodestar instance is running with version < 1.15.1
  2. Another client such as Teku is running
  3. Leftover files during upgrade

I do agree your suggested message is better for case 3. but this is very unlikely and the user will have to manually delete .lock files either way, even before 1.15.1 (but this issue is finally resolved from 1.15.1 onwards)

For cases 1. and 2. I think the current error is better and includes all details a user has to know and for case 3. the error message is better than what we had before.

@nflaig nflaig merged commit 0e9fc49 into unstable Feb 20, 2024
17 of 20 checks passed
@nflaig nflaig deleted the nflaig/lockfile-errors branch February 20, 2024 09:12
@wemeetagain
Copy link
Member

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