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: do not throw error when trying to prune missing directory #7257

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Nov 28, 2024

Motivation

Noticed the following warning

Nov-28 10:42:04.700[]                 warn: Error pruning invalid SSZ objects persistInvalidSszObjectsDir=/data/lodestar/beacon-data/invalidSszObjects - ENOENT: no such file or directory, scandir '/data/lodestar/beacon-data/invalidSszObjects'
Error: ENOENT: no such file or directory, scandir '/data/lodestar/beacon-data/invalidSszObjects'
    at Object.readdirSync (node:fs:1503:26)
    at pruneOldFilesInDir (file:///usr/app/packages/cli/src/util/pruneOldFilesInDir.ts:6:30)
    at Timeout._onTimeout (file:///usr/app/packages/cli/src/cmds/beacon/handler.ts:100:40)
    at listOnTimeout (node:internal/timers:581:17)
    at processTimers (node:internal/timers:519:7)

This happens because we don't check if the directory actually exists before pruning it which can happen in case of invalid ssz objects dir.

Description

Do not throw error when trying to prune missing directory

@nflaig nflaig requested a review from a team as a code owner November 28, 2024 11:10
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.51%. Comparing base (48dea55) to head (c1cfeef).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7257   +/-   ##
=========================================
  Coverage     48.50%   48.51%           
=========================================
  Files           600      600           
  Lines         40135    40138    +3     
  Branches       2054     2058    +4     
=========================================
+ Hits          19468    19471    +3     
  Misses        20629    20629           
  Partials         38       38           

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b1e5a72 Previous: 48dea55 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.1211 ms/op 2.1125 ms/op 1.00
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 70.453 us/op 50.888 us/op 1.38
BLS verify - blst 1.0133 ms/op 885.98 us/op 1.14
BLS verifyMultipleSignatures 3 - blst 1.4215 ms/op 1.2725 ms/op 1.12
BLS verifyMultipleSignatures 8 - blst 2.1898 ms/op 1.8208 ms/op 1.20
BLS verifyMultipleSignatures 32 - blst 6.2006 ms/op 5.2491 ms/op 1.18
BLS verifyMultipleSignatures 64 - blst 11.017 ms/op 9.3187 ms/op 1.18
BLS verifyMultipleSignatures 128 - blst 18.938 ms/op 17.729 ms/op 1.07
BLS deserializing 10000 signatures 702.98 ms/op 697.94 ms/op 1.01
BLS deserializing 100000 signatures 7.0520 s/op 7.1905 s/op 0.98
BLS verifyMultipleSignatures - same message - 3 - blst 1.0466 ms/op 896.04 us/op 1.17
BLS verifyMultipleSignatures - same message - 8 - blst 1.2364 ms/op 1.1463 ms/op 1.08
BLS verifyMultipleSignatures - same message - 32 - blst 1.9915 ms/op 1.8390 ms/op 1.08
BLS verifyMultipleSignatures - same message - 64 - blst 2.8856 ms/op 2.8271 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.8336 ms/op 4.6000 ms/op 1.05
BLS aggregatePubkeys 32 - blst 20.826 us/op 20.473 us/op 1.02
BLS aggregatePubkeys 128 - blst 71.345 us/op 72.146 us/op 0.99
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 61.318 ms/op 107.90 ms/op 0.57
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 60.429 ms/op 48.986 ms/op 1.23
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 48.777 ms/op 38.349 ms/op 1.27
getSlashingsAndExits - default max 137.32 us/op 93.982 us/op 1.46
getSlashingsAndExits - 2k 309.10 us/op 277.89 us/op 1.11
proposeBlockBody type=full, size=empty 6.6020 ms/op 6.5349 ms/op 1.01
isKnown best case - 1 super set check 354.00 ns/op 318.00 ns/op 1.11
isKnown normal case - 2 super set checks 308.00 ns/op 283.00 ns/op 1.09
isKnown worse case - 16 super set checks 316.00 ns/op 289.00 ns/op 1.09
InMemoryCheckpointStateCache - add get delete 2.9470 us/op 3.0020 us/op 0.98
validate api signedAggregateAndProof - struct 1.5047 ms/op 1.3914 ms/op 1.08
validate gossip signedAggregateAndProof - struct 1.5157 ms/op 1.4154 ms/op 1.07
batch validate gossip attestation - vc 640000 - chunk 32 140.91 us/op 127.17 us/op 1.11
batch validate gossip attestation - vc 640000 - chunk 64 123.54 us/op 112.51 us/op 1.10
batch validate gossip attestation - vc 640000 - chunk 128 117.58 us/op 106.56 us/op 1.10
batch validate gossip attestation - vc 640000 - chunk 256 110.75 us/op 101.63 us/op 1.09
pickEth1Vote - no votes 1.1306 ms/op 1.0816 ms/op 1.05
pickEth1Vote - max votes 5.9226 ms/op 6.3004 ms/op 0.94
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.949 ms/op 11.353 ms/op 1.14
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.779 ms/op 15.111 ms/op 1.31
pickEth1Vote - Eth1Data fastSerialize value x2048 529.48 us/op 510.25 us/op 1.04
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.9674 ms/op 2.4554 ms/op 1.62
bytes32 toHexString 464.00 ns/op 432.00 ns/op 1.07
bytes32 Buffer.toString(hex) 248.00 ns/op 257.00 ns/op 0.96
bytes32 Buffer.toString(hex) from Uint8Array 383.00 ns/op 371.00 ns/op 1.03
bytes32 Buffer.toString(hex) + 0x 248.00 ns/op 257.00 ns/op 0.96
Object access 1 prop 0.15100 ns/op 0.14100 ns/op 1.07
Map access 1 prop 0.12700 ns/op 0.13000 ns/op 0.98
Object get x1000 5.9550 ns/op 6.0310 ns/op 0.99
Map get x1000 6.2660 ns/op 6.7890 ns/op 0.92
Object set x1000 33.523 ns/op 34.194 ns/op 0.98
Map set x1000 24.243 ns/op 27.808 ns/op 0.87
Return object 10000 times 0.29190 ns/op 0.30940 ns/op 0.94
Throw Error 10000 times 3.3355 us/op 3.5651 us/op 0.94
toHex 162.43 ns/op 187.48 ns/op 0.87
Buffer.from 142.18 ns/op 153.95 ns/op 0.92
shared Buffer 89.252 ns/op 100.14 ns/op 0.89
fastMsgIdFn sha256 / 200 bytes 2.3750 us/op 2.2510 us/op 1.06
fastMsgIdFn h32 xxhash / 200 bytes 267.00 ns/op 231.00 ns/op 1.16
fastMsgIdFn h64 xxhash / 200 bytes 275.00 ns/op 275.00 ns/op 1.00
fastMsgIdFn sha256 / 1000 bytes 7.3710 us/op 7.4380 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 392.00 ns/op 405.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 341.00 ns/op 356.00 ns/op 0.96
fastMsgIdFn sha256 / 10000 bytes 65.068 us/op 67.663 us/op 0.96
fastMsgIdFn h32 xxhash / 10000 bytes 1.8730 us/op 1.9280 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 1.2070 us/op 1.2630 us/op 0.96
send data - 1000 256B messages 13.006 ms/op 12.660 ms/op 1.03
send data - 1000 512B messages 17.758 ms/op 18.450 ms/op 0.96
send data - 1000 1024B messages 31.044 ms/op 26.961 ms/op 1.15
send data - 1000 1200B messages 27.112 ms/op 26.953 ms/op 1.01
send data - 1000 2048B messages 20.557 ms/op 31.838 ms/op 0.65
send data - 1000 4096B messages 31.434 ms/op 31.987 ms/op 0.98
send data - 1000 16384B messages 75.566 ms/op 69.161 ms/op 1.09
send data - 1000 65536B messages 217.49 ms/op 208.04 ms/op 1.05
enrSubnets - fastDeserialize 64 bits 1.2640 us/op 1.1360 us/op 1.11
enrSubnets - ssz BitVector 64 bits 377.00 ns/op 400.00 ns/op 0.94
enrSubnets - fastDeserialize 4 bits 162.00 ns/op 161.00 ns/op 1.01
enrSubnets - ssz BitVector 4 bits 422.00 ns/op 367.00 ns/op 1.15
prioritizePeers score -10:0 att 32-0.1 sync 2-0 161.23 us/op 139.29 us/op 1.16
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 155.12 us/op 163.00 us/op 0.95
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 250.43 us/op 235.69 us/op 1.06
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 405.47 us/op 441.00 us/op 0.92
prioritizePeers score 0:0 att 64-1 sync 4-1 668.20 us/op 523.49 us/op 1.28
array of 16000 items push then shift 1.6766 us/op 1.6648 us/op 1.01
LinkedList of 16000 items push then shift 7.6530 ns/op 7.3300 ns/op 1.04
array of 16000 items push then pop 132.37 ns/op 127.61 ns/op 1.04
LinkedList of 16000 items push then pop 7.6490 ns/op 7.1010 ns/op 1.08
array of 24000 items push then shift 2.4446 us/op 2.4795 us/op 0.99
LinkedList of 24000 items push then shift 7.7520 ns/op 7.3150 ns/op 1.06
array of 24000 items push then pop 158.58 ns/op 175.31 ns/op 0.90
LinkedList of 24000 items push then pop 7.4230 ns/op 7.2410 ns/op 1.03
intersect bitArray bitLen 8 6.4840 ns/op 6.5310 ns/op 0.99
intersect array and set length 8 49.341 ns/op 45.165 ns/op 1.09
intersect bitArray bitLen 128 30.103 ns/op 30.552 ns/op 0.99
intersect array and set length 128 785.27 ns/op 676.52 ns/op 1.16
bitArray.getTrueBitIndexes() bitLen 128 1.9000 us/op 1.3210 us/op 1.44
bitArray.getTrueBitIndexes() bitLen 248 3.1980 us/op 2.2070 us/op 1.45
bitArray.getTrueBitIndexes() bitLen 512 6.6240 us/op 4.6030 us/op 1.44
Buffer.concat 32 items 958.00 ns/op 866.00 ns/op 1.11
Uint8Array.set 32 items 1.4600 us/op 1.8500 us/op 0.79
Buffer.copy 1.8070 us/op 2.1880 us/op 0.83
Uint8Array.set - with subarray 2.8870 us/op 2.6500 us/op 1.09
Uint8Array.set - without subarray 1.4590 us/op 1.8100 us/op 0.81
getUint32 - dataview 246.00 ns/op 232.00 ns/op 1.06
getUint32 - manual 193.00 ns/op 150.00 ns/op 1.29
Set add up to 64 items then delete first 2.2418 us/op 2.2332 us/op 1.00
OrderedSet add up to 64 items then delete first 3.4587 us/op 3.2748 us/op 1.06
Set add up to 64 items then delete last 2.6014 us/op 2.5069 us/op 1.04
OrderedSet add up to 64 items then delete last 3.8944 us/op 3.7002 us/op 1.05
Set add up to 64 items then delete middle 2.6332 us/op 2.5313 us/op 1.04
OrderedSet add up to 64 items then delete middle 5.4730 us/op 5.2799 us/op 1.04
Set add up to 128 items then delete first 5.7162 us/op 5.1327 us/op 1.11
OrderedSet add up to 128 items then delete first 8.9202 us/op 7.8726 us/op 1.13
Set add up to 128 items then delete last 5.1474 us/op 4.8791 us/op 1.05
OrderedSet add up to 128 items then delete last 7.6425 us/op 7.3796 us/op 1.04
Set add up to 128 items then delete middle 5.1239 us/op 4.8267 us/op 1.06
OrderedSet add up to 128 items then delete middle 14.408 us/op 14.159 us/op 1.02
Set add up to 256 items then delete first 10.772 us/op 10.600 us/op 1.02
OrderedSet add up to 256 items then delete first 18.510 us/op 16.185 us/op 1.14
Set add up to 256 items then delete last 9.9276 us/op 9.8137 us/op 1.01
OrderedSet add up to 256 items then delete last 15.177 us/op 15.139 us/op 1.00
Set add up to 256 items then delete middle 9.9560 us/op 9.7807 us/op 1.02
OrderedSet add up to 256 items then delete middle 48.332 us/op 41.879 us/op 1.15
transfer serialized Status (84 B) 1.4150 us/op 1.4490 us/op 0.98
copy serialized Status (84 B) 1.3260 us/op 1.2000 us/op 1.10
transfer serialized SignedVoluntaryExit (112 B) 1.4690 us/op 1.6160 us/op 0.91
copy serialized SignedVoluntaryExit (112 B) 1.3530 us/op 1.2520 us/op 1.08
transfer serialized ProposerSlashing (416 B) 2.7380 us/op 2.2570 us/op 1.21
copy serialized ProposerSlashing (416 B) 2.3840 us/op 2.5770 us/op 0.93
transfer serialized Attestation (485 B) 2.2240 us/op 2.0310 us/op 1.10
copy serialized Attestation (485 B) 2.7430 us/op 2.1240 us/op 1.29
transfer serialized AttesterSlashing (33232 B) 3.0640 us/op 2.3980 us/op 1.28
copy serialized AttesterSlashing (33232 B) 7.9070 us/op 5.6350 us/op 1.40
transfer serialized Small SignedBeaconBlock (128000 B) 3.8590 us/op 3.0080 us/op 1.28
copy serialized Small SignedBeaconBlock (128000 B) 23.775 us/op 14.463 us/op 1.64
transfer serialized Avg SignedBeaconBlock (200000 B) 4.2760 us/op 3.1160 us/op 1.37
copy serialized Avg SignedBeaconBlock (200000 B) 31.798 us/op 19.449 us/op 1.63
transfer serialized BlobsSidecar (524380 B) 3.9390 us/op 3.1240 us/op 1.26
copy serialized BlobsSidecar (524380 B) 100.20 us/op 85.056 us/op 1.18
transfer serialized Big SignedBeaconBlock (1000000 B) 4.0940 us/op 2.9500 us/op 1.39
copy serialized Big SignedBeaconBlock (1000000 B) 150.69 us/op 139.01 us/op 1.08
pass gossip attestations to forkchoice per slot 2.8487 ms/op 2.9520 ms/op 0.96
forkChoice updateHead vc 100000 bc 64 eq 0 498.43 us/op 460.01 us/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 0 2.8569 ms/op 2.8931 ms/op 0.99
forkChoice updateHead vc 1000000 bc 64 eq 0 6.0070 ms/op 5.0609 ms/op 1.19
forkChoice updateHead vc 600000 bc 320 eq 0 2.8418 ms/op 2.9204 ms/op 0.97
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9140 ms/op 2.8921 ms/op 1.01
forkChoice updateHead vc 600000 bc 7200 eq 0 3.9361 ms/op 3.8625 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 1000 10.392 ms/op 10.581 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 10000 10.544 ms/op 10.578 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 13.457 ms/op 14.356 ms/op 0.94
computeDeltas 500000 validators 300 proto nodes 4.2321 ms/op 4.0634 ms/op 1.04
computeDeltas 500000 validators 1200 proto nodes 4.3601 ms/op 4.1973 ms/op 1.04
computeDeltas 500000 validators 7200 proto nodes 4.3888 ms/op 4.2933 ms/op 1.02
computeDeltas 750000 validators 300 proto nodes 6.2980 ms/op 6.1494 ms/op 1.02
computeDeltas 750000 validators 1200 proto nodes 6.3085 ms/op 5.9527 ms/op 1.06
computeDeltas 750000 validators 7200 proto nodes 6.4195 ms/op 6.1230 ms/op 1.05
computeDeltas 1400000 validators 300 proto nodes 11.891 ms/op 11.537 ms/op 1.03
computeDeltas 1400000 validators 1200 proto nodes 11.733 ms/op 11.816 ms/op 0.99
computeDeltas 1400000 validators 7200 proto nodes 11.622 ms/op 11.843 ms/op 0.98
computeDeltas 2100000 validators 300 proto nodes 17.822 ms/op 16.894 ms/op 1.05
computeDeltas 2100000 validators 1200 proto nodes 18.144 ms/op 17.203 ms/op 1.05
computeDeltas 2100000 validators 7200 proto nodes 17.370 ms/op 17.115 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.1015 ms/op 1.7832 ms/op 1.18
altair processAttestation - 250000 vs - 7PWei worstcase 3.2871 ms/op 2.5515 ms/op 1.29
altair processAttestation - setStatus - 1/6 committees join 95.089 us/op 86.326 us/op 1.10
altair processAttestation - setStatus - 1/3 committees join 183.26 us/op 175.82 us/op 1.04
altair processAttestation - setStatus - 1/2 committees join 246.70 us/op 261.65 us/op 0.94
altair processAttestation - setStatus - 2/3 committees join 324.03 us/op 327.80 us/op 0.99
altair processAttestation - setStatus - 4/5 committees join 478.75 us/op 470.28 us/op 1.02
altair processAttestation - setStatus - 100% committees join 566.94 us/op 615.38 us/op 0.92
altair processBlock - 250000 vs - 7PWei normalcase 4.7776 ms/op 6.3380 ms/op 0.75
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.388 ms/op 24.561 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase 39.025 ms/op 32.817 ms/op 1.19
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.137 ms/op 66.667 ms/op 1.13
phase0 processBlock - 250000 vs - 7PWei normalcase 2.1106 ms/op 1.7438 ms/op 1.21
phase0 processBlock - 250000 vs - 7PWei worstcase 22.673 ms/op 20.958 ms/op 1.08
altair processEth1Data - 250000 vs - 7PWei normalcase 339.27 us/op 359.07 us/op 0.94
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.4240 us/op 5.6170 us/op 1.14
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 42.319 us/op 38.278 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.059 us/op 10.642 us/op 1.04
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.8550 us/op 5.6060 us/op 1.22
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 161.01 us/op 115.15 us/op 1.40
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1337 ms/op 988.91 us/op 1.15
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5320 ms/op 1.4472 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8894 ms/op 1.4657 ms/op 1.29
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9644 ms/op 3.6525 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6773 ms/op 1.4458 ms/op 1.16
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8225 ms/op 3.7370 ms/op 1.02
Tree 40 250000 create 250.83 ms/op 235.69 ms/op 1.06
Tree 40 250000 get(125000) 164.36 ns/op 151.97 ns/op 1.08
Tree 40 250000 set(125000) 806.65 ns/op 763.59 ns/op 1.06
Tree 40 250000 toArray() 24.158 ms/op 18.323 ms/op 1.32
Tree 40 250000 iterate all - toArray() + loop 24.379 ms/op 17.414 ms/op 1.40
Tree 40 250000 iterate all - get(i) 63.043 ms/op 55.832 ms/op 1.13
Array 250000 create 4.2178 ms/op 2.9905 ms/op 1.41
Array 250000 clone - spread 1.6483 ms/op 1.5610 ms/op 1.06
Array 250000 get(125000) 0.44900 ns/op 0.40400 ns/op 1.11
Array 250000 set(125000) 0.50100 ns/op 0.42600 ns/op 1.18
Array 250000 iterate all - loop 95.769 us/op 84.149 us/op 1.14
phase0 afterProcessEpoch - 250000 vs - 7PWei 53.540 ms/op 52.032 ms/op 1.03
Array.fill - length 1000000 4.0454 ms/op 3.8185 ms/op 1.06
Array push - length 1000000 19.880 ms/op 12.829 ms/op 1.55
Array.get 0.29210 ns/op 0.28656 ns/op 1.02
Uint8Array.get 0.44933 ns/op 0.43689 ns/op 1.03
phase0 beforeProcessEpoch - 250000 vs - 7PWei 21.400 ms/op 16.257 ms/op 1.32
altair processEpoch - mainnet_e81889 303.34 ms/op 281.57 ms/op 1.08
mainnet_e81889 - altair beforeProcessEpoch 20.966 ms/op 19.281 ms/op 1.09
mainnet_e81889 - altair processJustificationAndFinalization 14.032 us/op 12.022 us/op 1.17
mainnet_e81889 - altair processInactivityUpdates 7.0520 ms/op 5.2746 ms/op 1.34
mainnet_e81889 - altair processRewardsAndPenalties 42.737 ms/op 44.940 ms/op 0.95
mainnet_e81889 - altair processRegistryUpdates 2.0740 us/op 1.9920 us/op 1.04
mainnet_e81889 - altair processSlashings 378.00 ns/op 398.00 ns/op 0.95
mainnet_e81889 - altair processEth1DataReset 423.00 ns/op 339.00 ns/op 1.25
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5869 ms/op 1.9188 ms/op 0.83
mainnet_e81889 - altair processSlashingsReset 6.3400 us/op 2.6250 us/op 2.42
mainnet_e81889 - altair processRandaoMixesReset 4.7130 us/op 7.9700 us/op 0.59
mainnet_e81889 - altair processHistoricalRootsUpdate 522.00 ns/op 593.00 ns/op 0.88
mainnet_e81889 - altair processParticipationFlagUpdates 2.6020 us/op 2.3300 us/op 1.12
mainnet_e81889 - altair processSyncCommitteeUpdates 431.00 ns/op 432.00 ns/op 1.00
mainnet_e81889 - altair afterProcessEpoch 52.722 ms/op 49.608 ms/op 1.06
capella processEpoch - mainnet_e217614 1.0866 s/op 1.0928 s/op 0.99
mainnet_e217614 - capella beforeProcessEpoch 78.256 ms/op 82.689 ms/op 0.95
mainnet_e217614 - capella processJustificationAndFinalization 15.805 us/op 13.437 us/op 1.18
mainnet_e217614 - capella processInactivityUpdates 18.394 ms/op 16.739 ms/op 1.10
mainnet_e217614 - capella processRewardsAndPenalties 225.24 ms/op 218.76 ms/op 1.03
mainnet_e217614 - capella processRegistryUpdates 14.944 us/op 13.539 us/op 1.10
mainnet_e217614 - capella processSlashings 464.00 ns/op 461.00 ns/op 1.01
mainnet_e217614 - capella processEth1DataReset 342.00 ns/op 335.00 ns/op 1.02
mainnet_e217614 - capella processEffectiveBalanceUpdates 17.208 ms/op 12.279 ms/op 1.40
mainnet_e217614 - capella processSlashingsReset 2.5230 us/op 3.5280 us/op 0.72
mainnet_e217614 - capella processRandaoMixesReset 4.7690 us/op 3.6850 us/op 1.29
mainnet_e217614 - capella processHistoricalRootsUpdate 613.00 ns/op 1.4610 us/op 0.42
mainnet_e217614 - capella processParticipationFlagUpdates 1.8140 us/op 1.7670 us/op 1.03
mainnet_e217614 - capella afterProcessEpoch 125.41 ms/op 122.22 ms/op 1.03
phase0 processEpoch - mainnet_e58758 330.60 ms/op 339.57 ms/op 0.97
mainnet_e58758 - phase0 beforeProcessEpoch 73.820 ms/op 71.514 ms/op 1.03
mainnet_e58758 - phase0 processJustificationAndFinalization 15.518 us/op 14.341 us/op 1.08
mainnet_e58758 - phase0 processRewardsAndPenalties 37.571 ms/op 27.494 ms/op 1.37
mainnet_e58758 - phase0 processRegistryUpdates 8.6210 us/op 7.8410 us/op 1.10
mainnet_e58758 - phase0 processSlashings 377.00 ns/op 464.00 ns/op 0.81
mainnet_e58758 - phase0 processEth1DataReset 314.00 ns/op 288.00 ns/op 1.09
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2385 ms/op 1.2182 ms/op 1.02
mainnet_e58758 - phase0 processSlashingsReset 3.8300 us/op 3.0360 us/op 1.26
mainnet_e58758 - phase0 processRandaoMixesReset 3.8700 us/op 4.1890 us/op 0.92
mainnet_e58758 - phase0 processHistoricalRootsUpdate 347.00 ns/op 269.00 ns/op 1.29
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.0170 us/op 2.7140 us/op 1.11
mainnet_e58758 - phase0 afterProcessEpoch 44.125 ms/op 42.294 ms/op 1.04
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4276 ms/op 1.9372 ms/op 0.74
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.2729 ms/op 2.4464 ms/op 0.93
altair processInactivityUpdates - 250000 normalcase 16.945 ms/op 14.092 ms/op 1.20
altair processInactivityUpdates - 250000 worstcase 16.332 ms/op 14.782 ms/op 1.10
phase0 processRegistryUpdates - 250000 normalcase 7.9490 us/op 5.8490 us/op 1.36
phase0 processRegistryUpdates - 250000 badcase_full_deposits 271.06 us/op 263.86 us/op 1.03
phase0 processRegistryUpdates - 250000 worstcase 0.5 116.07 ms/op 130.76 ms/op 0.89
altair processRewardsAndPenalties - 250000 normalcase 29.069 ms/op 42.937 ms/op 0.68
altair processRewardsAndPenalties - 250000 worstcase 42.219 ms/op 26.036 ms/op 1.62
phase0 getAttestationDeltas - 250000 normalcase 7.9106 ms/op 7.9639 ms/op 0.99
phase0 getAttestationDeltas - 250000 worstcase 7.7754 ms/op 7.6734 ms/op 1.01
phase0 processSlashings - 250000 worstcase 104.89 us/op 96.404 us/op 1.09
altair processSyncCommitteeUpdates - 250000 136.25 ms/op 131.75 ms/op 1.03
BeaconState.hashTreeRoot - No change 242.00 ns/op 227.00 ns/op 1.07
BeaconState.hashTreeRoot - 1 full validator 125.10 us/op 91.433 us/op 1.37
BeaconState.hashTreeRoot - 32 full validator 1.5950 ms/op 972.06 us/op 1.64
BeaconState.hashTreeRoot - 512 full validator 12.739 ms/op 9.1708 ms/op 1.39
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 167.41 us/op 113.09 us/op 1.48
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9649 ms/op 1.6110 ms/op 1.22
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 29.912 ms/op 18.433 ms/op 1.62
BeaconState.hashTreeRoot - 1 balances 138.25 us/op 81.372 us/op 1.70
BeaconState.hashTreeRoot - 32 balances 1.3032 ms/op 773.26 us/op 1.69
BeaconState.hashTreeRoot - 512 balances 9.7374 ms/op 6.8891 ms/op 1.41
BeaconState.hashTreeRoot - 250000 balances 160.64 ms/op 163.54 ms/op 0.98
aggregationBits - 2048 els - zipIndexesInBitList 26.481 us/op 26.739 us/op 0.99
byteArrayEquals 32 54.037 ns/op 55.495 ns/op 0.97
Buffer.compare 32 17.447 ns/op 17.788 ns/op 0.98
byteArrayEquals 1024 1.6072 us/op 1.5926 us/op 1.01
Buffer.compare 1024 25.802 ns/op 25.710 ns/op 1.00
byteArrayEquals 16384 25.404 us/op 25.554 us/op 0.99
Buffer.compare 16384 185.05 ns/op 205.28 ns/op 0.90
byteArrayEquals 123687377 194.25 ms/op 193.89 ms/op 1.00
Buffer.compare 123687377 7.6313 ms/op 7.5312 ms/op 1.01
byteArrayEquals 32 - diff last byte 52.513 ns/op 53.143 ns/op 0.99
Buffer.compare 32 - diff last byte 16.993 ns/op 17.453 ns/op 0.97
byteArrayEquals 1024 - diff last byte 1.5815 us/op 1.5979 us/op 0.99
Buffer.compare 1024 - diff last byte 25.662 ns/op 26.180 ns/op 0.98
byteArrayEquals 16384 - diff last byte 25.247 us/op 25.438 us/op 0.99
Buffer.compare 16384 - diff last byte 201.70 ns/op 206.51 ns/op 0.98
byteArrayEquals 123687377 - diff last byte 191.60 ms/op 192.92 ms/op 0.99
Buffer.compare 123687377 - diff last byte 8.4558 ms/op 7.5775 ms/op 1.12
byteArrayEquals 32 - random bytes 5.2410 ns/op 5.2610 ns/op 1.00
Buffer.compare 32 - random bytes 17.250 ns/op 17.574 ns/op 0.98
byteArrayEquals 1024 - random bytes 5.2890 ns/op 5.2850 ns/op 1.00
Buffer.compare 1024 - random bytes 17.361 ns/op 17.505 ns/op 0.99
byteArrayEquals 16384 - random bytes 5.3550 ns/op 5.2610 ns/op 1.02
Buffer.compare 16384 - random bytes 17.519 ns/op 17.528 ns/op 1.00
byteArrayEquals 123687377 - random bytes 6.6800 ns/op 6.5000 ns/op 1.03
Buffer.compare 123687377 - random bytes 19.240 ns/op 19.210 ns/op 1.00
regular array get 100000 times 33.672 us/op 34.191 us/op 0.98
wrappedArray get 100000 times 33.185 us/op 33.082 us/op 1.00
arrayWithProxy get 100000 times 13.173 ms/op 14.745 ms/op 0.89
ssz.Root.equals 46.164 ns/op 46.236 ns/op 1.00
byteArrayEquals 45.355 ns/op 45.491 ns/op 1.00
Buffer.compare 10.561 ns/op 10.595 ns/op 1.00
processSlot - 1 slots 19.884 us/op 16.505 us/op 1.20
processSlot - 32 slots 3.3576 ms/op 2.5903 ms/op 1.30
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.129 ms/op 36.732 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 2.0864 ms/op 2.1249 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 4.1453 ms/op 4.1173 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4074 ms/op 4.5224 ms/op 0.97
findModifiedValidators - 10000 modified validators 284.26 ms/op 245.87 ms/op 1.16
findModifiedValidators - 1000 modified validators 222.15 ms/op 172.95 ms/op 1.28
findModifiedValidators - 100 modified validators 187.81 ms/op 158.86 ms/op 1.18
findModifiedValidators - 10 modified validators 206.04 ms/op 149.07 ms/op 1.38
findModifiedValidators - 1 modified validators 191.01 ms/op 188.88 ms/op 1.01
findModifiedValidators - no difference 193.59 ms/op 158.62 ms/op 1.22
compare ViewDUs 3.2997 s/op 3.1971 s/op 1.03
compare each validator Uint8Array 1.1288 s/op 1.5487 s/op 0.73
compare ViewDU to Uint8Array 1.1669 s/op 1.1603 s/op 1.01
migrate state 1000000 validators, 24 modified, 0 new 802.61 ms/op 728.86 ms/op 1.10
migrate state 1000000 validators, 1700 modified, 1000 new 1.0192 s/op 919.09 ms/op 1.11
migrate state 1000000 validators, 3400 modified, 2000 new 1.2396 s/op 1.1242 s/op 1.10
migrate state 1500000 validators, 24 modified, 0 new 735.69 ms/op 728.03 ms/op 1.01
migrate state 1500000 validators, 1700 modified, 1000 new 1.0408 s/op 941.46 ms/op 1.11
migrate state 1500000 validators, 3400 modified, 2000 new 1.2583 s/op 1.1639 s/op 1.08
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6100 ns/op 4.4500 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 821.39 ns/op 495.82 ns/op 1.66
computeProposers - vc 250000 8.0991 ms/op 6.9763 ms/op 1.16
computeEpochShuffling - vc 250000 42.047 ms/op 43.036 ms/op 0.98
getNextSyncCommittee - vc 250000 130.45 ms/op 121.24 ms/op 1.08
computeSigningRoot for AttestationData 21.793 us/op 18.052 us/op 1.21
hash AttestationData serialized data then Buffer.toString(base64) 1.6116 us/op 1.5862 us/op 1.02
toHexString serialized data 915.00 ns/op 914.21 ns/op 1.00
Buffer.toString(base64) 185.23 ns/op 195.30 ns/op 0.95
nodejs block root to RootHex using toHex 165.34 ns/op 173.81 ns/op 0.95
nodejs block root to RootHex using toRootHex 98.498 ns/op 106.03 ns/op 0.93
browser block root to RootHex using the deprecated toHexString 248.27 ns/op 236.77 ns/op 1.05
browser block root to RootHex using toHex 186.01 ns/op 187.49 ns/op 0.99
browser block root to RootHex using toRootHex 166.56 ns/op 170.88 ns/op 0.97

by benchmarkbot/action

@nflaig nflaig merged commit aaac34a into unstable Nov 29, 2024
20 checks passed
@nflaig nflaig deleted the nflaig/fix-prune-missing-directory branch November 29, 2024 10:18
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.

2 participants