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

feat: add option to disable thread pool for keystore decryption #6949

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jul 15, 2024

Motivation

During testing in ChainSafe/bls-keystore#61 (see benchmarks) I noticed that spawning worker threads to decrypt keystores is quite slow in some environments like docker and it takes a few seconds for decrypt operations to speed up.

It takes around ~10-16 seconds in kurtosis to decrypt 64 keystores

Jul-14 10:03:14.591[]                 info: 0% of local keystores imported. current=0 total=64 rate=0.00keys/m
Jul-14 10:03:24.589[]                 info: 0% of local keystores imported. current=0 total=64 rate=0.00keys/m
Jul-14 10:03:28.690[]                 info: 100% of local keystores imported. current=64 total=64 rate=936.59keys/m

The reason for this seems to be that 1) spawning workers takes a bit of time, and 2) there seems to be a warm up period (especially inside docker) which leads to bad results. More details in ChainSafe/bls-keystore#61 (comment).

Looking at the keystores used by Kurtosis, those are pbkdf2 and in addition set c=2 in kdf params which is insecure but much faster and good for testing while most normal users use scrypt which is much slower per decrypt operation, like 1000x slower than that.

This means ideally, we wanna keep workers for normal usage but disable the thread pool for testing environments like Kurtosis.

Disabling the worker pool, it takes ~1 sec to decrypt 64 keys in Kurtosis

Jul-15 09:11:56.107[]                 info: Connecting to LevelDB database path=/root/.local/share/lodestar/testnet/validator-db
Jul-15 09:11:56.614[]                 info: 100% of local keystores imported. current=64 total=64 rate=7664.67keys/m
Jul-15 09:11:57.514[]                 info: 64 local keystores

This is on par with other clients, as noted in #6946.

Description

Add option --disableKeystoresThreadPool to disable thread pool for keystore decryption.

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 62.52%. Comparing base (6ab2697) to head (a8ef40e).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6949      +/-   ##
============================================
+ Coverage     62.51%   62.52%   +0.01%     
============================================
  Files           575      575              
  Lines         61015    61050      +35     
  Branches       2120     2138      +18     
============================================
+ Hits          38141    38170      +29     
- Misses        22835    22841       +6     
  Partials         39       39              

@nflaig
Copy link
Member Author

nflaig commented Jul 15, 2024

Rebasing this branch on top of updating bls-kestore library, we are sub 1 second in Kurtosis

Jul-15 11:45:14.429[]                 info: Connecting to LevelDB database path=/root/.local/share/lodestar/testnet/validator-db
Jul-15 11:45:14.721[]                 info: 100% of local keystores imported. current=64 total=64 rate=13287.20keys/m
Jul-15 11:45:15.316[]                 info: 64 local keystores

@nflaig nflaig marked this pull request as ready for review July 15, 2024 11:46
@nflaig nflaig requested a review from a team as a code owner July 15, 2024 11:46
Copy link
Contributor

github-actions bot commented Jul 15, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b885d15 Previous: 6ab2697 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 799.86 us/op 518.91 us/op 1.54
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 52.000 us/op 54.965 us/op 0.95
BLS verify - blst-native 1.2267 ms/op 1.2238 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 2.6727 ms/op 2.6068 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst-native 5.8951 ms/op 5.7385 ms/op 1.03
BLS verifyMultipleSignatures 32 - blst-native 21.366 ms/op 21.080 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst-native 42.089 ms/op 41.548 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst-native 85.576 ms/op 82.586 ms/op 1.04
BLS deserializing 10000 signatures 892.47 ms/op 885.36 ms/op 1.01
BLS deserializing 100000 signatures 9.1410 s/op 8.5756 s/op 1.07
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2762 ms/op 1.2246 ms/op 1.04
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4523 ms/op 1.4011 ms/op 1.04
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3316 ms/op 2.1983 ms/op 1.06
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.9739 ms/op 3.3846 ms/op 1.17
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.5924 ms/op 5.9969 ms/op 0.93
BLS aggregatePubkeys 32 - blst-native 25.630 us/op 24.774 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 100.97 us/op 97.276 us/op 1.04
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 65.058 ms/op 55.820 ms/op 1.17
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 51.129 ms/op 49.741 ms/op 1.03
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 35.097 ms/op 31.733 ms/op 1.11
getSlashingsAndExits - default max 135.77 us/op 92.110 us/op 1.47
getSlashingsAndExits - 2k 286.68 us/op 289.99 us/op 0.99
proposeBlockBody type=full, size=empty 5.9481 ms/op 5.7864 ms/op 1.03
isKnown best case - 1 super set check 455.00 ns/op 303.00 ns/op 1.50
isKnown normal case - 2 super set checks 411.00 ns/op 283.00 ns/op 1.45
isKnown worse case - 16 super set checks 353.00 ns/op 279.00 ns/op 1.27
InMemoryCheckpointStateCache - add get delete 5.4880 us/op 5.0600 us/op 1.08
validate api signedAggregateAndProof - struct 2.6995 ms/op 2.6356 ms/op 1.02
validate gossip signedAggregateAndProof - struct 2.6908 ms/op 2.6518 ms/op 1.01
validate gossip attestation - vc 640000 1.3230 ms/op 1.2797 ms/op 1.03
batch validate gossip attestation - vc 640000 - chunk 32 161.74 us/op 150.81 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 64 143.85 us/op 134.79 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 128 132.95 us/op 122.20 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 126.33 us/op 120.67 us/op 1.05
pickEth1Vote - no votes 1.1702 ms/op 1.0999 ms/op 1.06
pickEth1Vote - max votes 7.9077 ms/op 8.4193 ms/op 0.94
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.914 ms/op 12.868 ms/op 0.93
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.288 ms/op 17.388 ms/op 1.22
pickEth1Vote - Eth1Data fastSerialize value x2048 523.11 us/op 532.40 us/op 0.98
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.0887 ms/op 3.7685 ms/op 1.88
bytes32 toHexString 477.00 ns/op 469.00 ns/op 1.02
bytes32 Buffer.toString(hex) 263.00 ns/op 260.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 383.00 ns/op 368.00 ns/op 1.04
bytes32 Buffer.toString(hex) + 0x 263.00 ns/op 258.00 ns/op 1.02
Object access 1 prop 0.14400 ns/op 0.13500 ns/op 1.07
Map access 1 prop 0.13900 ns/op 0.13800 ns/op 1.01
Object get x1000 6.1070 ns/op 6.0670 ns/op 1.01
Map get x1000 6.3460 ns/op 6.5280 ns/op 0.97
Object set x1000 33.425 ns/op 35.641 ns/op 0.94
Map set x1000 22.196 ns/op 26.327 ns/op 0.84
Return object 10000 times 0.29430 ns/op 0.30100 ns/op 0.98
Throw Error 10000 times 3.4132 us/op 3.4539 us/op 0.99
fastMsgIdFn sha256 / 200 bytes 2.2380 us/op 2.3120 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 236.00 ns/op 256.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 200 bytes 279.00 ns/op 286.00 ns/op 0.98
fastMsgIdFn sha256 / 1000 bytes 7.3460 us/op 7.7180 us/op 0.95
fastMsgIdFn h32 xxhash / 1000 bytes 367.00 ns/op 422.00 ns/op 0.87
fastMsgIdFn h64 xxhash / 1000 bytes 355.00 ns/op 382.00 ns/op 0.93
fastMsgIdFn sha256 / 10000 bytes 64.795 us/op 64.852 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 1.8710 us/op 1.9180 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 1.2110 us/op 1.2570 us/op 0.96
send data - 1000 256B messages 12.015 ms/op 12.429 ms/op 0.97
send data - 1000 512B messages 16.331 ms/op 16.949 ms/op 0.96
send data - 1000 1024B messages 25.462 ms/op 28.131 ms/op 0.91
send data - 1000 1200B messages 24.849 ms/op 26.033 ms/op 0.95
send data - 1000 2048B messages 31.263 ms/op 33.181 ms/op 0.94
send data - 1000 4096B messages 28.805 ms/op 32.264 ms/op 0.89
send data - 1000 16384B messages 67.523 ms/op 74.794 ms/op 0.90
send data - 1000 65536B messages 197.42 ms/op 214.29 ms/op 0.92
enrSubnets - fastDeserialize 64 bits 1.1280 us/op 1.0770 us/op 1.05
enrSubnets - ssz BitVector 64 bits 322.00 ns/op 358.00 ns/op 0.90
enrSubnets - fastDeserialize 4 bits 151.00 ns/op 161.00 ns/op 0.94
enrSubnets - ssz BitVector 4 bits 327.00 ns/op 362.00 ns/op 0.90
prioritizePeers score -10:0 att 32-0.1 sync 2-0 166.35 us/op 148.56 us/op 1.12
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 166.85 us/op 165.16 us/op 1.01
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 265.36 us/op 236.93 us/op 1.12
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 418.72 us/op 409.70 us/op 1.02
prioritizePeers score 0:0 att 64-1 sync 4-1 627.87 us/op 585.00 us/op 1.07
array of 16000 items push then shift 1.6572 us/op 1.6668 us/op 0.99
LinkedList of 16000 items push then shift 7.3470 ns/op 7.9150 ns/op 0.93
array of 16000 items push then pop 111.65 ns/op 125.54 ns/op 0.89
LinkedList of 16000 items push then pop 7.2010 ns/op 7.5740 ns/op 0.95
array of 24000 items push then shift 2.4375 us/op 2.4831 us/op 0.98
LinkedList of 24000 items push then shift 7.3050 ns/op 7.1990 ns/op 1.01
array of 24000 items push then pop 148.59 ns/op 141.14 ns/op 1.05
LinkedList of 24000 items push then pop 7.2690 ns/op 7.0670 ns/op 1.03
intersect bitArray bitLen 8 6.4070 ns/op 9.8180 ns/op 0.65
intersect array and set length 8 48.407 ns/op 45.301 ns/op 1.07
intersect bitArray bitLen 128 30.100 ns/op 32.617 ns/op 0.92
intersect array and set length 128 691.37 ns/op 767.35 ns/op 0.90
bitArray.getTrueBitIndexes() bitLen 128 1.8130 us/op 1.9520 us/op 0.93
bitArray.getTrueBitIndexes() bitLen 248 3.3720 us/op 3.5120 us/op 0.96
bitArray.getTrueBitIndexes() bitLen 512 6.5130 us/op 9.7140 us/op 0.67
Buffer.concat 32 items 900.00 ns/op 1.0670 us/op 0.84
Uint8Array.set 32 items 1.2840 us/op 1.8270 us/op 0.70
Buffer.copy 1.4520 us/op 1.7100 us/op 0.85
Uint8Array.set - with subarray 2.2720 us/op 2.8090 us/op 0.81
Uint8Array.set - without subarray 1.1950 us/op 1.3750 us/op 0.87
getUint32 - dataview 239.00 ns/op 277.00 ns/op 0.86
getUint32 - manual 155.00 ns/op 203.00 ns/op 0.76
Set add up to 64 items then delete first 2.1902 us/op 2.7639 us/op 0.79
OrderedSet add up to 64 items then delete first 3.3120 us/op 4.0149 us/op 0.82
Set add up to 64 items then delete last 2.5447 us/op 3.0501 us/op 0.83
OrderedSet add up to 64 items then delete last 4.0385 us/op 4.8644 us/op 0.83
Set add up to 64 items then delete middle 2.5839 us/op 3.8259 us/op 0.68
OrderedSet add up to 64 items then delete middle 5.3387 us/op 7.4127 us/op 0.72
Set add up to 128 items then delete first 5.0518 us/op 7.2724 us/op 0.69
OrderedSet add up to 128 items then delete first 7.4350 us/op 10.860 us/op 0.68
Set add up to 128 items then delete last 5.1215 us/op 6.2012 us/op 0.83
OrderedSet add up to 128 items then delete last 7.8218 us/op 10.818 us/op 0.72
Set add up to 128 items then delete middle 5.0367 us/op 8.0648 us/op 0.62
OrderedSet add up to 128 items then delete middle 13.828 us/op 18.096 us/op 0.76
Set add up to 256 items then delete first 10.313 us/op 13.567 us/op 0.76
OrderedSet add up to 256 items then delete first 15.522 us/op 20.642 us/op 0.75
Set add up to 256 items then delete last 10.165 us/op 11.637 us/op 0.87
OrderedSet add up to 256 items then delete last 16.130 us/op 19.221 us/op 0.84
Set add up to 256 items then delete middle 10.116 us/op 12.614 us/op 0.80
OrderedSet add up to 256 items then delete middle 40.768 us/op 50.380 us/op 0.81
transfer serialized Status (84 B) 1.4340 us/op 1.4990 us/op 0.96
copy serialized Status (84 B) 1.2220 us/op 1.4060 us/op 0.87
transfer serialized SignedVoluntaryExit (112 B) 1.6070 us/op 1.8010 us/op 0.89
copy serialized SignedVoluntaryExit (112 B) 1.2590 us/op 1.4670 us/op 0.86
transfer serialized ProposerSlashing (416 B) 2.2630 us/op 2.2540 us/op 1.00
copy serialized ProposerSlashing (416 B) 1.8020 us/op 1.9810 us/op 0.91
transfer serialized Attestation (485 B) 2.2430 us/op 2.7350 us/op 0.82
copy serialized Attestation (485 B) 1.8940 us/op 2.9920 us/op 0.63
transfer serialized AttesterSlashing (33232 B) 2.4250 us/op 3.3000 us/op 0.73
copy serialized AttesterSlashing (33232 B) 5.5620 us/op 12.267 us/op 0.45
transfer serialized Small SignedBeaconBlock (128000 B) 3.1080 us/op 4.4260 us/op 0.70
copy serialized Small SignedBeaconBlock (128000 B) 16.372 us/op 30.308 us/op 0.54
transfer serialized Avg SignedBeaconBlock (200000 B) 3.7150 us/op 4.1160 us/op 0.90
copy serialized Avg SignedBeaconBlock (200000 B) 28.420 us/op 38.166 us/op 0.74
transfer serialized BlobsSidecar (524380 B) 3.7910 us/op 3.9580 us/op 0.96
copy serialized BlobsSidecar (524380 B) 78.771 us/op 132.94 us/op 0.59
transfer serialized Big SignedBeaconBlock (1000000 B) 3.4490 us/op 3.8840 us/op 0.89
copy serialized Big SignedBeaconBlock (1000000 B) 207.93 us/op 277.03 us/op 0.75
pass gossip attestations to forkchoice per slot 3.3020 ms/op 3.4718 ms/op 0.95
forkChoice updateHead vc 100000 bc 64 eq 0 508.38 us/op 501.49 us/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 0 3.2031 ms/op 3.4180 ms/op 0.94
forkChoice updateHead vc 1000000 bc 64 eq 0 5.4148 ms/op 5.7096 ms/op 0.95
forkChoice updateHead vc 600000 bc 320 eq 0 3.0907 ms/op 3.2031 ms/op 0.96
forkChoice updateHead vc 600000 bc 1200 eq 0 3.2469 ms/op 3.2316 ms/op 1.00
forkChoice updateHead vc 600000 bc 7200 eq 0 3.6620 ms/op 3.8087 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 1000 11.382 ms/op 10.881 ms/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 10000 11.150 ms/op 10.899 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 300000 15.161 ms/op 16.617 ms/op 0.91
computeDeltas 500000 validators 300 proto nodes 3.7019 ms/op 3.8475 ms/op 0.96
computeDeltas 500000 validators 1200 proto nodes 3.8268 ms/op 4.3051 ms/op 0.89
computeDeltas 500000 validators 7200 proto nodes 3.8368 ms/op 4.3346 ms/op 0.89
computeDeltas 750000 validators 300 proto nodes 5.4591 ms/op 5.3784 ms/op 1.02
computeDeltas 750000 validators 1200 proto nodes 5.4990 ms/op 5.1419 ms/op 1.07
computeDeltas 750000 validators 7200 proto nodes 5.4659 ms/op 5.0829 ms/op 1.08
computeDeltas 1400000 validators 300 proto nodes 10.378 ms/op 9.8479 ms/op 1.05
computeDeltas 1400000 validators 1200 proto nodes 10.347 ms/op 9.4734 ms/op 1.09
computeDeltas 1400000 validators 7200 proto nodes 10.002 ms/op 9.8064 ms/op 1.02
computeDeltas 2100000 validators 300 proto nodes 15.707 ms/op 15.664 ms/op 1.00
computeDeltas 2100000 validators 1200 proto nodes 16.379 ms/op 15.715 ms/op 1.04
computeDeltas 2100000 validators 7200 proto nodes 17.513 ms/op 16.380 ms/op 1.07
altair processAttestation - 250000 vs - 7PWei normalcase 3.0281 ms/op 2.1560 ms/op 1.40
altair processAttestation - 250000 vs - 7PWei worstcase 4.5139 ms/op 3.0342 ms/op 1.49
altair processAttestation - setStatus - 1/6 committees join 143.87 us/op 105.28 us/op 1.37
altair processAttestation - setStatus - 1/3 committees join 251.03 us/op 204.94 us/op 1.22
altair processAttestation - setStatus - 1/2 committees join 360.09 us/op 273.37 us/op 1.32
altair processAttestation - setStatus - 2/3 committees join 461.50 us/op 350.41 us/op 1.32
altair processAttestation - setStatus - 4/5 committees join 634.98 us/op 510.23 us/op 1.24
altair processAttestation - setStatus - 100% committees join 738.55 us/op 623.04 us/op 1.19
altair processBlock - 250000 vs - 7PWei normalcase 5.8931 ms/op 4.7356 ms/op 1.24
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.092 ms/op 25.252 ms/op 1.11
altair processBlock - 250000 vs - 7PWei worstcase 53.238 ms/op 42.758 ms/op 1.25
altair processBlock - 250000 vs - 7PWei worstcase hashState 109.70 ms/op 75.708 ms/op 1.45
phase0 processBlock - 250000 vs - 7PWei normalcase 2.9287 ms/op 2.1613 ms/op 1.36
phase0 processBlock - 250000 vs - 7PWei worstcase 34.001 ms/op 29.612 ms/op 1.15
altair processEth1Data - 250000 vs - 7PWei normalcase 614.02 us/op 427.18 us/op 1.44
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 10.939 us/op 6.6730 us/op 1.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 37.501 us/op 33.012 us/op 1.14
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 13.787 us/op 9.5980 us/op 1.44
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.3710 us/op 6.2720 us/op 1.18
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 121.78 us/op 117.82 us/op 1.03
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 702.22 us/op 747.56 us/op 0.94
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0649 ms/op 917.62 us/op 1.16
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1017 ms/op 944.30 us/op 1.17
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.8946 ms/op 2.6030 ms/op 1.11
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.8539 ms/op 1.6317 ms/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.9189 ms/op 3.9186 ms/op 1.26
Tree 40 250000 create 243.32 ms/op 222.55 ms/op 1.09
Tree 40 250000 get(125000) 174.84 ns/op 149.44 ns/op 1.17
Tree 40 250000 set(125000) 1.0113 us/op 636.50 ns/op 1.59
Tree 40 250000 toArray() 21.841 ms/op 19.160 ms/op 1.14
Tree 40 250000 iterate all - toArray() + loop 22.403 ms/op 18.434 ms/op 1.22
Tree 40 250000 iterate all - get(i) 62.664 ms/op 54.716 ms/op 1.15
MutableVector 250000 create 9.5825 ms/op 7.9821 ms/op 1.20
MutableVector 250000 get(125000) 7.1040 ns/op 6.2720 ns/op 1.13
MutableVector 250000 set(125000) 256.62 ns/op 194.93 ns/op 1.32
MutableVector 250000 toArray() 5.1373 ms/op 3.4138 ms/op 1.50
MutableVector 250000 iterate all - toArray() + loop 5.3509 ms/op 3.3611 ms/op 1.59
MutableVector 250000 iterate all - get(i) 1.7112 ms/op 1.5728 ms/op 1.09
Array 250000 create 4.7997 ms/op 2.9976 ms/op 1.60
Array 250000 clone - spread 2.9866 ms/op 1.4375 ms/op 2.08
Array 250000 get(125000) 0.48500 ns/op 0.42700 ns/op 1.14
Array 250000 set(125000) 0.57700 ns/op 0.44700 ns/op 1.29
Array 250000 iterate all - loop 102.59 us/op 92.220 us/op 1.11
effectiveBalanceIncrements clone Uint8Array 300000 63.781 us/op 26.729 us/op 2.39
effectiveBalanceIncrements clone MutableVector 300000 142.00 ns/op 131.00 ns/op 1.08
effectiveBalanceIncrements rw all Uint8Array 300000 211.54 us/op 200.41 us/op 1.06
effectiveBalanceIncrements rw all MutableVector 300000 112.44 ms/op 63.890 ms/op 1.76
phase0 afterProcessEpoch - 250000 vs - 7PWei 93.612 ms/op 86.740 ms/op 1.08
phase0 beforeProcessEpoch - 250000 vs - 7PWei 47.369 ms/op 41.110 ms/op 1.15
altair processEpoch - mainnet_e81889 421.65 ms/op 375.20 ms/op 1.12
mainnet_e81889 - altair beforeProcessEpoch 80.384 ms/op 66.430 ms/op 1.21
mainnet_e81889 - altair processJustificationAndFinalization 18.299 us/op 19.044 us/op 0.96
mainnet_e81889 - altair processInactivityUpdates 7.6108 ms/op 7.1404 ms/op 1.07
mainnet_e81889 - altair processRewardsAndPenalties 41.535 ms/op 38.237 ms/op 1.09
mainnet_e81889 - altair processRegistryUpdates 3.5790 us/op 2.6490 us/op 1.35
mainnet_e81889 - altair processSlashings 643.00 ns/op 354.00 ns/op 1.82
mainnet_e81889 - altair processEth1DataReset 627.00 ns/op 631.00 ns/op 0.99
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2595 ms/op 1.1853 ms/op 1.06
mainnet_e81889 - altair processSlashingsReset 7.1480 us/op 3.4800 us/op 2.05
mainnet_e81889 - altair processRandaoMixesReset 5.1230 us/op 5.5550 us/op 0.92
mainnet_e81889 - altair processHistoricalRootsUpdate 707.00 ns/op 618.00 ns/op 1.14
mainnet_e81889 - altair processParticipationFlagUpdates 2.8870 us/op 1.8210 us/op 1.59
mainnet_e81889 - altair processSyncCommitteeUpdates 914.00 ns/op 411.00 ns/op 2.22
mainnet_e81889 - altair afterProcessEpoch 98.113 ms/op 93.571 ms/op 1.05
capella processEpoch - mainnet_e217614 1.6115 s/op 1.2878 s/op 1.25
mainnet_e217614 - capella beforeProcessEpoch 310.73 ms/op 275.82 ms/op 1.13
mainnet_e217614 - capella processJustificationAndFinalization 16.118 us/op 14.360 us/op 1.12
mainnet_e217614 - capella processInactivityUpdates 21.987 ms/op 18.515 ms/op 1.19
mainnet_e217614 - capella processRewardsAndPenalties 257.59 ms/op 242.18 ms/op 1.06
mainnet_e217614 - capella processRegistryUpdates 20.084 us/op 17.576 us/op 1.14
mainnet_e217614 - capella processSlashings 625.00 ns/op 513.00 ns/op 1.22
mainnet_e217614 - capella processEth1DataReset 354.00 ns/op 433.00 ns/op 0.82
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.2814 ms/op 16.891 ms/op 0.31
mainnet_e217614 - capella processSlashingsReset 3.3500 us/op 3.9440 us/op 0.85
mainnet_e217614 - capella processRandaoMixesReset 4.1170 us/op 4.3050 us/op 0.96
mainnet_e217614 - capella processHistoricalRootsUpdate 773.00 ns/op 1.2000 us/op 0.64
mainnet_e217614 - capella processParticipationFlagUpdates 3.6060 us/op 1.9940 us/op 1.81
mainnet_e217614 - capella afterProcessEpoch 275.96 ms/op 286.32 ms/op 0.96
phase0 processEpoch - mainnet_e58758 439.00 ms/op 409.84 ms/op 1.07
mainnet_e58758 - phase0 beforeProcessEpoch 110.82 ms/op 123.02 ms/op 0.90
mainnet_e58758 - phase0 processJustificationAndFinalization 20.355 us/op 15.710 us/op 1.30
mainnet_e58758 - phase0 processRewardsAndPenalties 31.725 ms/op 22.266 ms/op 1.42
mainnet_e58758 - phase0 processRegistryUpdates 14.682 us/op 9.0780 us/op 1.62
mainnet_e58758 - phase0 processSlashings 569.00 ns/op 492.00 ns/op 1.16
mainnet_e58758 - phase0 processEth1DataReset 784.00 ns/op 427.00 ns/op 1.84
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1720 ms/op 977.78 us/op 1.20
mainnet_e58758 - phase0 processSlashingsReset 3.7470 us/op 4.1170 us/op 0.91
mainnet_e58758 - phase0 processRandaoMixesReset 4.4550 us/op 6.6170 us/op 0.67
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.0040 us/op 492.00 ns/op 2.04
mainnet_e58758 - phase0 processParticipationRecordUpdates 8.5400 us/op 2.8050 us/op 3.04
mainnet_e58758 - phase0 afterProcessEpoch 97.026 ms/op 80.045 ms/op 1.21
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6823 ms/op 1.2360 ms/op 1.36
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 5.2238 ms/op 2.3864 ms/op 2.19
altair processInactivityUpdates - 250000 normalcase 20.570 ms/op 20.073 ms/op 1.02
altair processInactivityUpdates - 250000 worstcase 21.148 ms/op 18.647 ms/op 1.13
phase0 processRegistryUpdates - 250000 normalcase 12.237 us/op 6.5920 us/op 1.86
phase0 processRegistryUpdates - 250000 badcase_full_deposits 415.94 us/op 282.00 us/op 1.47
phase0 processRegistryUpdates - 250000 worstcase 0.5 158.36 ms/op 116.69 ms/op 1.36
altair processRewardsAndPenalties - 250000 normalcase 53.910 ms/op 43.376 ms/op 1.24
altair processRewardsAndPenalties - 250000 worstcase 31.158 ms/op 42.948 ms/op 0.73
phase0 getAttestationDeltas - 250000 normalcase 12.082 ms/op 7.9645 ms/op 1.52
phase0 getAttestationDeltas - 250000 worstcase 11.123 ms/op 8.8043 ms/op 1.26
phase0 processSlashings - 250000 worstcase 138.14 us/op 106.11 us/op 1.30
altair processSyncCommitteeUpdates - 250000 148.40 ms/op 136.89 ms/op 1.08
BeaconState.hashTreeRoot - No change 478.00 ns/op 425.00 ns/op 1.12
BeaconState.hashTreeRoot - 1 full validator 164.02 us/op 122.61 us/op 1.34
BeaconState.hashTreeRoot - 32 full validator 1.9510 ms/op 1.1437 ms/op 1.71
BeaconState.hashTreeRoot - 512 full validator 18.330 ms/op 12.707 ms/op 1.44
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 163.28 us/op 124.68 us/op 1.31
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5677 ms/op 2.3156 ms/op 1.11
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 34.885 ms/op 31.595 ms/op 1.10
BeaconState.hashTreeRoot - 1 balances 131.58 us/op 122.28 us/op 1.08
BeaconState.hashTreeRoot - 32 balances 1.5319 ms/op 1.3544 ms/op 1.13
BeaconState.hashTreeRoot - 512 balances 15.737 ms/op 14.037 ms/op 1.12
BeaconState.hashTreeRoot - 250000 balances 244.26 ms/op 189.25 ms/op 1.29
aggregationBits - 2048 els - zipIndexesInBitList 48.371 us/op 38.120 us/op 1.27
byteArrayEquals 32 60.562 ns/op 57.394 ns/op 1.06
Buffer.compare 32 19.660 ns/op 18.855 ns/op 1.04
byteArrayEquals 1024 1.7572 us/op 1.6299 us/op 1.08
Buffer.compare 1024 28.026 ns/op 27.372 ns/op 1.02
byteArrayEquals 16384 29.063 us/op 26.258 us/op 1.11
Buffer.compare 16384 210.23 ns/op 203.25 ns/op 1.03
byteArrayEquals 123687377 218.08 ms/op 194.16 ms/op 1.12
Buffer.compare 123687377 11.360 ms/op 8.1771 ms/op 1.39
byteArrayEquals 32 - diff last byte 56.780 ns/op 52.391 ns/op 1.08
Buffer.compare 32 - diff last byte 18.529 ns/op 17.750 ns/op 1.04
byteArrayEquals 1024 - diff last byte 1.6744 us/op 1.5766 us/op 1.06
Buffer.compare 1024 - diff last byte 27.195 ns/op 26.493 ns/op 1.03
byteArrayEquals 16384 - diff last byte 26.917 us/op 25.081 us/op 1.07
Buffer.compare 16384 - diff last byte 321.46 ns/op 190.36 ns/op 1.69
byteArrayEquals 123687377 - diff last byte 210.02 ms/op 192.55 ms/op 1.09
Buffer.compare 123687377 - diff last byte 13.379 ms/op 6.3036 ms/op 2.12
byteArrayEquals 32 - random bytes 6.9250 ns/op 5.1430 ns/op 1.35
Buffer.compare 32 - random bytes 19.962 ns/op 17.781 ns/op 1.12
byteArrayEquals 1024 - random bytes 5.9910 ns/op 5.1250 ns/op 1.17
Buffer.compare 1024 - random bytes 19.434 ns/op 17.675 ns/op 1.10
byteArrayEquals 16384 - random bytes 5.9850 ns/op 5.1190 ns/op 1.17
Buffer.compare 16384 - random bytes 19.923 ns/op 17.691 ns/op 1.13
byteArrayEquals 123687377 - random bytes 7.6800 ns/op 6.5300 ns/op 1.18
Buffer.compare 123687377 - random bytes 23.070 ns/op 19.120 ns/op 1.21
regular array get 100000 times 39.024 us/op 33.213 us/op 1.17
wrappedArray get 100000 times 38.633 us/op 32.709 us/op 1.18
arrayWithProxy get 100000 times 19.490 ms/op 13.189 ms/op 1.48
ssz.Root.equals 58.678 ns/op 45.640 ns/op 1.29
byteArrayEquals 51.325 ns/op 45.031 ns/op 1.14
Buffer.compare 13.681 ns/op 10.425 ns/op 1.31
shuffle list - 16384 els 7.7298 ms/op 6.2550 ms/op 1.24
shuffle list - 250000 els 122.79 ms/op 91.230 ms/op 1.35
processSlot - 1 slots 20.272 us/op 12.869 us/op 1.58
processSlot - 32 slots 4.5963 ms/op 2.8433 ms/op 1.62
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 46.452 ms/op 36.244 ms/op 1.28
getCommitteeAssignments - req 1 vs - 250000 vc 2.3952 ms/op 2.1460 ms/op 1.12
getCommitteeAssignments - req 100 vs - 250000 vc 4.6450 ms/op 4.2215 ms/op 1.10
getCommitteeAssignments - req 1000 vs - 250000 vc 4.9281 ms/op 4.5269 ms/op 1.09
findModifiedValidators - 10000 modified validators 492.81 ms/op 251.79 ms/op 1.96
findModifiedValidators - 1000 modified validators 294.07 ms/op 196.34 ms/op 1.50
findModifiedValidators - 100 modified validators 285.28 ms/op 171.40 ms/op 1.66
findModifiedValidators - 10 modified validators 227.07 ms/op 202.65 ms/op 1.12
findModifiedValidators - 1 modified validators 206.77 ms/op 179.11 ms/op 1.15
findModifiedValidators - no difference 245.42 ms/op 167.62 ms/op 1.46
compare ViewDUs 3.6907 s/op 3.0496 s/op 1.21
compare each validator Uint8Array 1.5562 s/op 996.62 ms/op 1.56
compare ViewDU to Uint8Array 1.2293 s/op 1.0236 s/op 1.20
migrate state 1000000 validators, 24 modified, 0 new 613.28 ms/op 579.08 ms/op 1.06
migrate state 1000000 validators, 1700 modified, 1000 new 971.85 ms/op 835.89 ms/op 1.16
migrate state 1000000 validators, 3400 modified, 2000 new 1.2260 s/op 995.84 ms/op 1.23
migrate state 1500000 validators, 24 modified, 0 new 598.07 ms/op 566.09 ms/op 1.06
migrate state 1500000 validators, 1700 modified, 1000 new 846.97 ms/op 771.57 ms/op 1.10
migrate state 1500000 validators, 3400 modified, 2000 new 972.94 ms/op 952.64 ms/op 1.02
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8700 ns/op 4.7700 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 615.63 ns/op 640.17 ns/op 0.96
computeProposers - vc 250000 8.0551 ms/op 8.2538 ms/op 0.98
computeEpochShuffling - vc 250000 99.236 ms/op 94.202 ms/op 1.05
getNextSyncCommittee - vc 250000 150.26 ms/op 137.29 ms/op 1.09
computeSigningRoot for AttestationData 25.800 us/op 22.041 us/op 1.17
hash AttestationData serialized data then Buffer.toString(base64) 1.6045 us/op 1.5252 us/op 1.05
toHexString serialized data 917.02 ns/op 891.44 ns/op 1.03
Buffer.toString(base64) 197.18 ns/op 198.65 ns/op 0.99

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 1a35ee8 into unstable Jul 15, 2024
19 of 20 checks passed
@wemeetagain wemeetagain deleted the nflaig/disable-thread-pool branch July 15, 2024 14:20
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.20.2 🎉

@wemeetagain
Copy link
Member

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

2 participants