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

deps: update bls-keystore to v3.0.0 #6253

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jan 5, 2024

Motivation

Fixes issue with node 21 mentioned in #6251 and significantly improves performance of keystore decryption by 3x

Description

Updates @chainsafe/bls-keystore to v3.0.0 which now uses Uint8Array instead of Buffer in all public APIs (ChainSafe/bls-keystore#28) and updates underlying cryptography library.

This change allows to use transfer object between worker and main thread without creating a copy of the keystore. There might also be other performance improvements done in the underlying ethereum-cryptography package which result in a significant performance improvement.

Previous performance: 102.2 keys/m (from #5357 (comment))

Apr-15 13:51:55.473[]                 info: Lodestar network=goerli, version=v1.6.0/65a8668, commit=65a86684c54005c935e99e5eeab7497801dab1d7
Apr-15 13:51:55.476[]                 info: Connecting to LevelDB database path=/home/devops/goerli/data/validator/validator-db
Apr-15 13:52:05.507[]                 info: 100% of keystores imported. current=0 total=2000 rate=0.00keys/m
Apr-15 13:52:15.507[]                 info: 1% of keystores imported. current=24 total=2000 rate=144.00keys/m
Apr-15 13:52:25.509[]                 info: 2% of keystores imported. current=36 total=2000 rate=71.99keys/m
Apr-15 13:52:35.508[]                 info: 3% of keystores imported. current=60 total=2000 rate=144.01keys/m
Apr-15 13:52:45.509[]                 info: 4% of keystores imported. current=72 total=2000 rate=71.99keys/m
Apr-15 13:52:55.509[]                 info: 5% of keystores imported. current=91 total=2000 rate=114.01keys/m
Apr-15 13:53:05.521[]                 info: 5% of keystores imported. current=108 total=2000 rate=101.87keys/m
Apr-15 13:53:15.520[]                 info: 6% of keystores imported. current=122 total=2000 rate=84.01keys/m
Apr-15 13:53:25.521[]                 info: 7% of keystores imported. current=141 total=2000 rate=113.99keys/m
Apr-15 13:53:35.521[]                 info: 8% of keystores imported. current=167 total=2000 rate=156.00keys/m
Apr-15 13:53:45.523[]                 info: 9% of keystores imported. current=178 total=2000 rate=65.99keys/m

Performance after update: 315.6 keys/m (more than 3x faster)

Jan-05 11:48:26.963[]                 info: Lodestar network=goerli, version=v1.13.0/nflaig/update-bls-keystore/6962f72, commit=6962f72a92379bc3d947b72cabf9cf1205c43088
Jan-05 11:48:26.965[]                 info: Connecting to LevelDB database path=/home/devops/goerli/data/validator/validator-db
Jan-05 11:48:37.002[]                 info: 2% of keystores imported. current=48 total=2000 rate=287.94keys/m
Jan-05 11:48:47.004[]                 info: 5% of keystores imported. current=95 total=2000 rate=281.97keys/m
Jan-05 11:48:57.004[]                 info: 7% of keystores imported. current=148 total=2000 rate=317.97keys/m
Jan-05 11:49:07.004[]                 info: 11% of keystores imported. current=213 total=2000 rate=390.00keys/m
Jan-05 11:49:17.005[]                 info: 13% of keystores imported. current=261 total=2000 rate=287.97keys/m
Jan-05 11:49:27.005[]                 info: 16% of keystores imported. current=322 total=2000 rate=366.00keys/m
Jan-05 11:49:37.005[]                 info: 19% of keystores imported. current=381 total=2000 rate=354.00keys/m
Jan-05 11:49:47.006[]                 info: 21% of keystores imported. current=424 total=2000 rate=257.97keys/m
Jan-05 11:49:57.006[]                 info: 24% of keystores imported. current=470 total=2000 rate=276.00keys/m
Jan-05 11:50:07.006[]                 info: 26% of keystores imported. current=526 total=2000 rate=336.00keys/m
Jan-05 11:50:17.006[]                 info: 29% of keystores imported. current=582 total=2000 rate=336.00keys/m
Jan-05 11:50:27.006[]                 info: 32% of keystores imported. current=637 total=2000 rate=330.00keys/m

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Merging #6253 (6962f72) into unstable (9262064) will not change coverage.
Report is 1 commits behind head on unstable.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6253   +/-   ##
=========================================
  Coverage     80.31%   80.31%           
=========================================
  Files           202      202           
  Lines         19543    19543           
  Branches       1169     1169           
=========================================
  Hits          15695    15695           
  Misses         3820     3820           
  Partials         28       28           

Copy link
Contributor

github-actions bot commented Jan 5, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: e09c6af Previous: b92ff14 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 842.44 us/op 811.23 us/op 1.04
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 85.540 us/op 96.417 us/op 0.89
BLS verify - blst-native 1.2788 ms/op 1.3615 ms/op 0.94
BLS verifyMultipleSignatures 3 - blst-native 2.6914 ms/op 2.7749 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst-native 5.9025 ms/op 6.0845 ms/op 0.97
BLS verifyMultipleSignatures 32 - blst-native 21.566 ms/op 22.798 ms/op 0.95
BLS verifyMultipleSignatures 64 - blst-native 42.877 ms/op 43.715 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst-native 85.437 ms/op 86.817 ms/op 0.98
BLS deserializing 10000 signatures 912.77 ms/op 944.84 ms/op 0.97
BLS deserializing 100000 signatures 9.2327 s/op 9.3795 s/op 0.98
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3094 ms/op 1.3424 ms/op 0.98
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4680 ms/op 1.4593 ms/op 1.01
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2667 ms/op 2.2531 ms/op 1.01
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.4166 ms/op 4.4840 ms/op 0.98
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.7039 ms/op 5.6847 ms/op 1.00
BLS aggregatePubkeys 32 - blst-native 25.894 us/op 25.706 us/op 1.01
BLS aggregatePubkeys 128 - blst-native 101.97 us/op 99.719 us/op 1.02
getAttestationsForBlock 43.216 ms/op 41.922 ms/op 1.03
getSlashingsAndExits - default max 154.59 us/op 158.98 us/op 0.97
getSlashingsAndExits - 2k 381.64 us/op 370.52 us/op 1.03
proposeBlockBody type=full, size=empty 5.0212 ms/op 4.9690 ms/op 1.01
isKnown best case - 1 super set check 365.00 ns/op 315.00 ns/op 1.16
isKnown normal case - 2 super set checks 365.00 ns/op 304.00 ns/op 1.20
isKnown worse case - 16 super set checks 318.00 ns/op 300.00 ns/op 1.06
CheckpointStateCache - add get delete 5.2580 us/op 4.9560 us/op 1.06
validate api signedAggregateAndProof - struct 2.9222 ms/op 2.7248 ms/op 1.07
validate gossip signedAggregateAndProof - struct 2.7953 ms/op 2.7198 ms/op 1.03
validate gossip attestation - vc 640000 1.3688 ms/op 1.3265 ms/op 1.03
batch validate gossip attestation - vc 640000 - chunk 32 161.10 us/op 157.33 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 64 154.24 us/op 138.14 us/op 1.12
batch validate gossip attestation - vc 640000 - chunk 128 136.16 us/op 134.17 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 256 140.71 us/op 125.90 us/op 1.12
pickEth1Vote - no votes 1.2956 ms/op 1.1848 ms/op 1.09
pickEth1Vote - max votes 10.913 ms/op 10.496 ms/op 1.04
pickEth1Vote - Eth1Data hashTreeRoot value x2048 23.212 ms/op 21.569 ms/op 1.08
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.163 ms/op 27.369 ms/op 1.03
pickEth1Vote - Eth1Data fastSerialize value x2048 600.38 us/op 600.11 us/op 1.00
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.1872 ms/op 7.4428 ms/op 0.83
bytes32 toHexString 473.00 ns/op 497.00 ns/op 0.95
bytes32 Buffer.toString(hex) 277.00 ns/op 279.00 ns/op 0.99
bytes32 Buffer.toString(hex) from Uint8Array 414.00 ns/op 406.00 ns/op 1.02
bytes32 Buffer.toString(hex) + 0x 283.00 ns/op 275.00 ns/op 1.03
Object access 1 prop 0.16500 ns/op 0.14800 ns/op 1.11
Map access 1 prop 0.14800 ns/op 0.13600 ns/op 1.09
Object get x1000 7.9580 ns/op 7.4000 ns/op 1.08
Map get x1000 0.80700 ns/op 0.75400 ns/op 1.07
Object set x1000 56.447 ns/op 51.166 ns/op 1.10
Map set x1000 43.247 ns/op 38.568 ns/op 1.12
Return object 10000 times 0.25080 ns/op 0.23300 ns/op 1.08
Throw Error 10000 times 3.9814 us/op 3.8298 us/op 1.04
fastMsgIdFn sha256 / 200 bytes 3.3400 us/op 3.2270 us/op 1.04
fastMsgIdFn h32 xxhash / 200 bytes 312.00 ns/op 271.00 ns/op 1.15
fastMsgIdFn h64 xxhash / 200 bytes 363.00 ns/op 335.00 ns/op 1.08
fastMsgIdFn sha256 / 1000 bytes 11.504 us/op 11.142 us/op 1.03
fastMsgIdFn h32 xxhash / 1000 bytes 414.00 ns/op 392.00 ns/op 1.06
fastMsgIdFn h64 xxhash / 1000 bytes 425.00 ns/op 402.00 ns/op 1.06
fastMsgIdFn sha256 / 10000 bytes 104.35 us/op 102.11 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 1.9560 us/op 1.9130 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.2770 us/op 1.3060 us/op 0.98
send data - 1000 256B messages 19.021 ms/op 18.569 ms/op 1.02
send data - 1000 512B messages 25.710 ms/op 25.403 ms/op 1.01
send data - 1000 1024B messages 40.407 ms/op 39.606 ms/op 1.02
send data - 1000 1200B messages 40.143 ms/op 34.816 ms/op 1.15
send data - 1000 2048B messages 45.420 ms/op 42.405 ms/op 1.07
send data - 1000 4096B messages 45.389 ms/op 40.603 ms/op 1.12
send data - 1000 16384B messages 122.64 ms/op 110.19 ms/op 1.11
send data - 1000 65536B messages 458.97 ms/op 501.32 ms/op 0.92
enrSubnets - fastDeserialize 64 bits 1.3360 us/op 1.3520 us/op 0.99
enrSubnets - ssz BitVector 64 bits 508.00 ns/op 446.00 ns/op 1.14
enrSubnets - fastDeserialize 4 bits 188.00 ns/op 166.00 ns/op 1.13
enrSubnets - ssz BitVector 4 bits 470.00 ns/op 427.00 ns/op 1.10
prioritizePeers score -10:0 att 32-0.1 sync 2-0 107.86 us/op 107.04 us/op 1.01
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 131.28 us/op 144.46 us/op 0.91
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 178.68 us/op 167.59 us/op 1.07
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 367.28 us/op 286.74 us/op 1.28
prioritizePeers score 0:0 att 64-1 sync 4-1 360.43 us/op 341.35 us/op 1.06
array of 16000 items push then shift 1.7171 us/op 1.6471 us/op 1.04
LinkedList of 16000 items push then shift 9.5310 ns/op 9.1890 ns/op 1.04
array of 16000 items push then pop 101.17 ns/op 93.437 ns/op 1.08
LinkedList of 16000 items push then pop 9.1160 ns/op 9.0700 ns/op 1.01
array of 24000 items push then shift 2.4637 us/op 2.4752 us/op 1.00
LinkedList of 24000 items push then shift 8.8030 ns/op 9.1300 ns/op 0.96
array of 24000 items push then pop 96.621 ns/op 116.12 ns/op 0.83
LinkedList of 24000 items push then pop 8.5570 ns/op 8.9910 ns/op 0.95
intersect bitArray bitLen 8 6.3830 ns/op 6.6550 ns/op 0.96
intersect array and set length 8 64.814 ns/op 66.080 ns/op 0.98
intersect bitArray bitLen 128 33.759 ns/op 35.302 ns/op 0.96
intersect array and set length 128 914.37 ns/op 895.41 ns/op 1.02
bitArray.getTrueBitIndexes() bitLen 128 1.5550 us/op 1.5390 us/op 1.01
bitArray.getTrueBitIndexes() bitLen 248 2.4610 us/op 2.5160 us/op 0.98
bitArray.getTrueBitIndexes() bitLen 512 4.7740 us/op 5.0960 us/op 0.94
Buffer.concat 32 items 967.00 ns/op 1.0140 us/op 0.95
Uint8Array.set 32 items 1.8880 us/op 1.9460 us/op 0.97
Set add up to 64 items then delete first 4.5284 us/op 4.4991 us/op 1.01
OrderedSet add up to 64 items then delete first 5.7127 us/op 5.6190 us/op 1.02
Set add up to 64 items then delete last 4.8617 us/op 4.7886 us/op 1.02
OrderedSet add up to 64 items then delete last 5.8441 us/op 5.8514 us/op 1.00
Set add up to 64 items then delete middle 4.6394 us/op 4.5690 us/op 1.02
OrderedSet add up to 64 items then delete middle 7.7361 us/op 7.1061 us/op 1.09
Set add up to 128 items then delete first 10.408 us/op 9.4065 us/op 1.11
OrderedSet add up to 128 items then delete first 13.258 us/op 12.699 us/op 1.04
Set add up to 128 items then delete last 10.028 us/op 9.4386 us/op 1.06
OrderedSet add up to 128 items then delete last 12.026 us/op 11.580 us/op 1.04
Set add up to 128 items then delete middle 9.7008 us/op 9.0854 us/op 1.07
OrderedSet add up to 128 items then delete middle 18.280 us/op 16.894 us/op 1.08
Set add up to 256 items then delete first 20.117 us/op 18.775 us/op 1.07
OrderedSet add up to 256 items then delete first 25.459 us/op 25.469 us/op 1.00
Set add up to 256 items then delete last 19.427 us/op 18.556 us/op 1.05
OrderedSet add up to 256 items then delete last 24.469 us/op 23.237 us/op 1.05
Set add up to 256 items then delete middle 18.898 us/op 18.915 us/op 1.00
OrderedSet add up to 256 items then delete middle 50.098 us/op 45.251 us/op 1.11
transfer serialized Status (84 B) 1.7960 us/op 1.7480 us/op 1.03
copy serialized Status (84 B) 1.5780 us/op 1.4580 us/op 1.08
transfer serialized SignedVoluntaryExit (112 B) 1.8980 us/op 1.8750 us/op 1.01
copy serialized SignedVoluntaryExit (112 B) 1.5750 us/op 1.5350 us/op 1.03
transfer serialized ProposerSlashing (416 B) 2.0220 us/op 1.9970 us/op 1.01
copy serialized ProposerSlashing (416 B) 2.9010 us/op 1.7300 us/op 1.68
transfer serialized Attestation (485 B) 3.2950 us/op 2.3740 us/op 1.39
copy serialized Attestation (485 B) 2.6570 us/op 2.0120 us/op 1.32
transfer serialized AttesterSlashing (33232 B) 2.6790 us/op 2.3180 us/op 1.16
copy serialized AttesterSlashing (33232 B) 7.2710 us/op 5.6870 us/op 1.28
transfer serialized Small SignedBeaconBlock (128000 B) 3.1850 us/op 2.8420 us/op 1.12
copy serialized Small SignedBeaconBlock (128000 B) 18.512 us/op 14.654 us/op 1.26
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6930 us/op 3.2980 us/op 1.12
copy serialized Avg SignedBeaconBlock (200000 B) 23.665 us/op 21.135 us/op 1.12
transfer serialized BlobsSidecar (524380 B) 3.2140 us/op 3.2110 us/op 1.00
copy serialized BlobsSidecar (524380 B) 147.44 us/op 97.861 us/op 1.51
transfer serialized Big SignedBeaconBlock (1000000 B) 3.3190 us/op 3.3740 us/op 0.98
copy serialized Big SignedBeaconBlock (1000000 B) 364.18 us/op 172.99 us/op 2.11
pass gossip attestations to forkchoice per slot 3.8525 ms/op 4.5629 ms/op 0.84
forkChoice updateHead vc 100000 bc 64 eq 0 688.08 us/op 738.61 us/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 0 4.2821 ms/op 4.5931 ms/op 0.93
forkChoice updateHead vc 1000000 bc 64 eq 0 7.0220 ms/op 7.4474 ms/op 0.94
forkChoice updateHead vc 600000 bc 320 eq 0 4.2213 ms/op 4.4440 ms/op 0.95
forkChoice updateHead vc 600000 bc 1200 eq 0 4.3679 ms/op 4.4554 ms/op 0.98
forkChoice updateHead vc 600000 bc 7200 eq 0 5.3647 ms/op 5.5052 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 1000 11.557 ms/op 11.742 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 10000 11.945 ms/op 12.377 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 300000 17.896 ms/op 15.779 ms/op 1.13
computeDeltas 500000 validators 300 proto nodes 6.6349 ms/op 6.6198 ms/op 1.00
computeDeltas 500000 validators 1200 proto nodes 6.5403 ms/op 6.6711 ms/op 0.98
computeDeltas 500000 validators 7200 proto nodes 6.4920 ms/op 6.4304 ms/op 1.01
computeDeltas 750000 validators 300 proto nodes 9.7164 ms/op 9.9644 ms/op 0.98
computeDeltas 750000 validators 1200 proto nodes 9.9202 ms/op 10.108 ms/op 0.98
computeDeltas 750000 validators 7200 proto nodes 9.8782 ms/op 10.104 ms/op 0.98
computeDeltas 1400000 validators 300 proto nodes 19.438 ms/op 19.646 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 20.426 ms/op 19.448 ms/op 1.05
computeDeltas 1400000 validators 7200 proto nodes 20.042 ms/op 20.024 ms/op 1.00
computeDeltas 2100000 validators 300 proto nodes 31.294 ms/op 29.708 ms/op 1.05
computeDeltas 2100000 validators 1200 proto nodes 30.956 ms/op 29.515 ms/op 1.05
computeDeltas 2100000 validators 7200 proto nodes 30.742 ms/op 28.303 ms/op 1.09
computeProposerBoostScoreFromBalances 500000 validators 3.8731 ms/op 3.7500 ms/op 1.03
computeProposerBoostScoreFromBalances 750000 validators 3.9566 ms/op 4.0117 ms/op 0.99
computeProposerBoostScoreFromBalances 1400000 validators 3.8722 ms/op 4.0162 ms/op 0.96
computeProposerBoostScoreFromBalances 2100000 validators 3.8300 ms/op 3.8246 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 2.6850 ms/op 2.5620 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei worstcase 4.4731 ms/op 3.6130 ms/op 1.24
altair processAttestation - setStatus - 1/6 committees join 195.60 us/op 153.97 us/op 1.27
altair processAttestation - setStatus - 1/3 committees join 362.96 us/op 288.85 us/op 1.26
altair processAttestation - setStatus - 1/2 committees join 490.47 us/op 394.20 us/op 1.24
altair processAttestation - setStatus - 2/3 committees join 626.37 us/op 503.40 us/op 1.24
altair processAttestation - setStatus - 4/5 committees join 841.45 us/op 692.12 us/op 1.22
altair processAttestation - setStatus - 100% committees join 961.68 us/op 799.16 us/op 1.20
altair processBlock - 250000 vs - 7PWei normalcase 8.7394 ms/op 10.404 ms/op 0.84
altair processBlock - 250000 vs - 7PWei normalcase hashState 36.748 ms/op 36.938 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase 45.793 ms/op 41.491 ms/op 1.10
altair processBlock - 250000 vs - 7PWei worstcase hashState 97.302 ms/op 89.805 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei normalcase 2.8877 ms/op 2.4942 ms/op 1.16
phase0 processBlock - 250000 vs - 7PWei worstcase 33.359 ms/op 31.524 ms/op 1.06
altair processEth1Data - 250000 vs - 7PWei normalcase 584.85 us/op 562.51 us/op 1.04
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.1410 us/op 10.059 us/op 0.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 74.330 us/op 51.404 us/op 1.45
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.419 us/op 20.656 us/op 0.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 14.243 us/op 8.7940 us/op 1.62
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 175.13 us/op 192.59 us/op 0.91
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4252 ms/op 1.2918 ms/op 1.10
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8172 ms/op 1.5660 ms/op 1.16
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5358 ms/op 1.5771 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8378 ms/op 3.6380 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.6412 ms/op 2.2938 ms/op 1.15
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.6421 ms/op 5.4119 ms/op 1.04
Tree 40 250000 create 360.78 ms/op 351.75 ms/op 1.03
Tree 40 250000 get(125000) 196.19 ns/op 195.94 ns/op 1.00
Tree 40 250000 set(125000) 1.0983 us/op 1.0389 us/op 1.06
Tree 40 250000 toArray() 23.126 ms/op 19.716 ms/op 1.17
Tree 40 250000 iterate all - toArray() + loop 19.589 ms/op 19.847 ms/op 0.99
Tree 40 250000 iterate all - get(i) 66.517 ms/op 67.517 ms/op 0.99
MutableVector 250000 create 13.377 ms/op 14.433 ms/op 0.93
MutableVector 250000 get(125000) 6.5760 ns/op 6.6500 ns/op 0.99
MutableVector 250000 set(125000) 310.99 ns/op 284.06 ns/op 1.09
MutableVector 250000 toArray() 4.1943 ms/op 3.1916 ms/op 1.31
MutableVector 250000 iterate all - toArray() + loop 4.5639 ms/op 3.3464 ms/op 1.36
MutableVector 250000 iterate all - get(i) 1.5407 ms/op 1.5375 ms/op 1.00
Array 250000 create 4.2124 ms/op 3.1447 ms/op 1.34
Array 250000 clone - spread 1.3077 ms/op 1.2492 ms/op 1.05
Array 250000 get(125000) 1.1080 ns/op 1.0500 ns/op 1.06
Array 250000 set(125000) 4.6930 ns/op 4.1210 ns/op 1.14
Array 250000 iterate all - loop 166.03 us/op 165.16 us/op 1.01
effectiveBalanceIncrements clone Uint8Array 300000 42.520 us/op 26.920 us/op 1.58
effectiveBalanceIncrements clone MutableVector 300000 377.00 ns/op 368.00 ns/op 1.02
effectiveBalanceIncrements rw all Uint8Array 300000 200.14 us/op 199.46 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 89.379 ms/op 83.267 ms/op 1.07
phase0 afterProcessEpoch - 250000 vs - 7PWei 118.92 ms/op 112.99 ms/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 56.098 ms/op 52.786 ms/op 1.06
altair processEpoch - mainnet_e81889 489.54 ms/op 483.47 ms/op 1.01
mainnet_e81889 - altair beforeProcessEpoch 88.445 ms/op 80.255 ms/op 1.10
mainnet_e81889 - altair processJustificationAndFinalization 15.341 us/op 15.020 us/op 1.02
mainnet_e81889 - altair processInactivityUpdates 6.4155 ms/op 6.0824 ms/op 1.05
mainnet_e81889 - altair processRewardsAndPenalties 67.430 ms/op 59.585 ms/op 1.13
mainnet_e81889 - altair processRegistryUpdates 2.6770 us/op 2.3620 us/op 1.13
mainnet_e81889 - altair processSlashings 424.00 ns/op 425.00 ns/op 1.00
mainnet_e81889 - altair processEth1DataReset 721.00 ns/op 487.00 ns/op 1.48
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.8983 ms/op 1.5816 ms/op 1.20
mainnet_e81889 - altair processSlashingsReset 3.7230 us/op 3.3860 us/op 1.10
mainnet_e81889 - altair processRandaoMixesReset 5.2620 us/op 5.0300 us/op 1.05
mainnet_e81889 - altair processHistoricalRootsUpdate 708.00 ns/op 892.00 ns/op 0.79
mainnet_e81889 - altair processParticipationFlagUpdates 2.3850 us/op 1.6230 us/op 1.47
mainnet_e81889 - altair processSyncCommitteeUpdates 669.00 ns/op 763.00 ns/op 0.88
mainnet_e81889 - altair afterProcessEpoch 118.70 ms/op 119.50 ms/op 0.99
capella processEpoch - mainnet_e217614 2.6403 s/op 2.0837 s/op 1.27
mainnet_e217614 - capella beforeProcessEpoch 630.38 ms/op 492.27 ms/op 1.28
mainnet_e217614 - capella processJustificationAndFinalization 36.986 us/op 15.649 us/op 2.36
mainnet_e217614 - capella processInactivityUpdates 32.087 ms/op 21.631 ms/op 1.48
mainnet_e217614 - capella processRewardsAndPenalties 490.95 ms/op 427.01 ms/op 1.15
mainnet_e217614 - capella processRegistryUpdates 40.746 us/op 19.467 us/op 2.09
mainnet_e217614 - capella processSlashings 881.00 ns/op 536.00 ns/op 1.64
mainnet_e217614 - capella processEth1DataReset 791.00 ns/op 351.00 ns/op 2.25
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.7625 ms/op 4.8000 ms/op 1.20
mainnet_e217614 - capella processSlashingsReset 3.9360 us/op 2.9420 us/op 1.34
mainnet_e217614 - capella processRandaoMixesReset 5.3900 us/op 5.0300 us/op 1.07
mainnet_e217614 - capella processHistoricalRootsUpdate 648.00 ns/op 532.00 ns/op 1.22
mainnet_e217614 - capella processParticipationFlagUpdates 1.8740 us/op 1.6040 us/op 1.17
mainnet_e217614 - capella afterProcessEpoch 366.97 ms/op 304.65 ms/op 1.20
phase0 processEpoch - mainnet_e58758 563.23 ms/op 444.70 ms/op 1.27
mainnet_e58758 - phase0 beforeProcessEpoch 180.91 ms/op 122.10 ms/op 1.48
mainnet_e58758 - phase0 processJustificationAndFinalization 22.863 us/op 16.170 us/op 1.41
mainnet_e58758 - phase0 processRewardsAndPenalties 60.638 ms/op 53.794 ms/op 1.13
mainnet_e58758 - phase0 processRegistryUpdates 13.528 us/op 12.406 us/op 1.09
mainnet_e58758 - phase0 processSlashings 747.00 ns/op 537.00 ns/op 1.39
mainnet_e58758 - phase0 processEth1DataReset 791.00 ns/op 373.00 ns/op 2.12
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2623 ms/op 1.1142 ms/op 1.13
mainnet_e58758 - phase0 processSlashingsReset 3.8370 us/op 2.5400 us/op 1.51
mainnet_e58758 - phase0 processRandaoMixesReset 5.9920 us/op 3.9220 us/op 1.53
mainnet_e58758 - phase0 processHistoricalRootsUpdate 472.00 ns/op 367.00 ns/op 1.29
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.6480 us/op 3.1390 us/op 1.80
mainnet_e58758 - phase0 afterProcessEpoch 114.41 ms/op 93.159 ms/op 1.23
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.5932 ms/op 1.3436 ms/op 1.19
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.7761 ms/op 1.4459 ms/op 1.92
altair processInactivityUpdates - 250000 normalcase 30.187 ms/op 27.163 ms/op 1.11
altair processInactivityUpdates - 250000 worstcase 25.155 ms/op 19.926 ms/op 1.26
phase0 processRegistryUpdates - 250000 normalcase 12.645 us/op 7.4760 us/op 1.69
phase0 processRegistryUpdates - 250000 badcase_full_deposits 360.06 us/op 332.16 us/op 1.08
phase0 processRegistryUpdates - 250000 worstcase 0.5 132.03 ms/op 134.29 ms/op 0.98
altair processRewardsAndPenalties - 250000 normalcase 60.310 ms/op 55.698 ms/op 1.08
altair processRewardsAndPenalties - 250000 worstcase 40.326 ms/op 54.534 ms/op 0.74
phase0 getAttestationDeltas - 250000 normalcase 9.8536 ms/op 8.7347 ms/op 1.13
phase0 getAttestationDeltas - 250000 worstcase 10.055 ms/op 8.6841 ms/op 1.16
phase0 processSlashings - 250000 worstcase 113.09 us/op 79.338 us/op 1.43
altair processSyncCommitteeUpdates - 250000 179.33 ms/op 153.63 ms/op 1.17
BeaconState.hashTreeRoot - No change 255.00 ns/op 242.00 ns/op 1.05
BeaconState.hashTreeRoot - 1 full validator 148.38 us/op 156.50 us/op 0.95
BeaconState.hashTreeRoot - 32 full validator 1.6398 ms/op 1.7762 ms/op 0.92
BeaconState.hashTreeRoot - 512 full validator 14.694 ms/op 16.327 ms/op 0.90
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 158.58 us/op 157.77 us/op 1.01
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0620 ms/op 2.0170 ms/op 1.02
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 30.467 ms/op 23.213 ms/op 1.31
BeaconState.hashTreeRoot - 1 balances 163.00 us/op 150.87 us/op 1.08
BeaconState.hashTreeRoot - 32 balances 1.2714 ms/op 1.2548 ms/op 1.01
BeaconState.hashTreeRoot - 512 balances 12.926 ms/op 13.519 ms/op 0.96
BeaconState.hashTreeRoot - 250000 balances 203.36 ms/op 208.07 ms/op 0.98
aggregationBits - 2048 els - zipIndexesInBitList 50.479 us/op 16.119 us/op 3.13
byteArrayEquals 32 77.963 ns/op 74.629 ns/op 1.04
Buffer.compare 32 80.729 ns/op 55.606 ns/op 1.45
byteArrayEquals 1024 2.1252 us/op 2.0393 us/op 1.04
Buffer.compare 1024 100.49 ns/op 71.501 ns/op 1.41
byteArrayEquals 16384 33.600 us/op 32.378 us/op 1.04
Buffer.compare 16384 242.84 ns/op 271.14 ns/op 0.90
byteArrayEquals 123687377 318.00 ms/op 245.04 ms/op 1.30
Buffer.compare 123687377 11.016 ms/op 6.0524 ms/op 1.82
byteArrayEquals 32 - diff last byte 91.878 ns/op 72.096 ns/op 1.27
Buffer.compare 32 - diff last byte 69.300 ns/op 56.639 ns/op 1.22
byteArrayEquals 1024 - diff last byte 2.5122 us/op 2.0354 us/op 1.23
Buffer.compare 1024 - diff last byte 90.141 ns/op 72.259 ns/op 1.25
byteArrayEquals 16384 - diff last byte 36.269 us/op 32.437 us/op 1.12
Buffer.compare 16384 - diff last byte 302.96 ns/op 280.75 ns/op 1.08
byteArrayEquals 123687377 - diff last byte 299.09 ms/op 244.48 ms/op 1.22
Buffer.compare 123687377 - diff last byte 9.0736 ms/op 6.1078 ms/op 1.49
byteArrayEquals 32 - random bytes 6.8420 ns/op 5.4690 ns/op 1.25
Buffer.compare 32 - random bytes 68.184 ns/op 61.333 ns/op 1.11
byteArrayEquals 1024 - random bytes 6.8620 ns/op 5.2310 ns/op 1.31
Buffer.compare 1024 - random bytes 69.374 ns/op 60.935 ns/op 1.14
byteArrayEquals 16384 - random bytes 7.5940 ns/op 5.2390 ns/op 1.45
Buffer.compare 16384 - random bytes 69.471 ns/op 60.637 ns/op 1.15
byteArrayEquals 123687377 - random bytes 18.390 ns/op 8.3900 ns/op 2.19
Buffer.compare 123687377 - random bytes 84.580 ns/op 63.840 ns/op 1.32
regular array get 100000 times 50.174 us/op 44.563 us/op 1.13
wrappedArray get 100000 times 49.222 us/op 44.513 us/op 1.11
arrayWithProxy get 100000 times 15.748 ms/op 14.295 ms/op 1.10
ssz.Root.equals 60.849 ns/op 53.727 ns/op 1.13
byteArrayEquals 59.423 ns/op 52.561 ns/op 1.13
Buffer.compare 14.017 ns/op 10.724 ns/op 1.31
shuffle list - 16384 els 8.0484 ms/op 6.9559 ms/op 1.16
shuffle list - 250000 els 118.07 ms/op 102.01 ms/op 1.16
processSlot - 1 slots 19.526 us/op 16.057 us/op 1.22
processSlot - 32 slots 4.2772 ms/op 3.7778 ms/op 1.13
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 56.677 ms/op 57.690 ms/op 0.98
getCommitteeAssignments - req 1 vs - 250000 vc 2.5319 ms/op 2.4901 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 3.7332 ms/op 3.6917 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.1383 ms/op 4.0425 ms/op 1.02
findModifiedValidators - 10000 modified validators 508.48 ms/op 539.08 ms/op 0.94
findModifiedValidators - 1000 modified validators 449.02 ms/op 411.49 ms/op 1.09
findModifiedValidators - 100 modified validators 402.97 ms/op 411.29 ms/op 0.98
findModifiedValidators - 10 modified validators 389.67 ms/op 413.49 ms/op 0.94
findModifiedValidators - 1 modified validators 410.47 ms/op 390.69 ms/op 1.05
findModifiedValidators - no difference 417.74 ms/op 411.29 ms/op 1.02
compare ViewDUs 4.3666 s/op 4.3617 s/op 1.00
compare each validator Uint8Array 1.5950 s/op 1.4603 s/op 1.09
compare ViewDU to Uint8Array 1.1406 s/op 1.1286 s/op 1.01
migrate state 1000000 validators, 24 modified, 0 new 806.33 ms/op 756.53 ms/op 1.07
migrate state 1000000 validators, 1700 modified, 1000 new 1.0922 s/op 1.0907 s/op 1.00
migrate state 1000000 validators, 3400 modified, 2000 new 1.7095 s/op 1.3677 s/op 1.25
migrate state 1500000 validators, 24 modified, 0 new 1.0960 s/op 787.75 ms/op 1.39
migrate state 1500000 validators, 1700 modified, 1000 new 1.4228 s/op 1.1156 s/op 1.28
migrate state 1500000 validators, 3400 modified, 2000 new 1.4215 s/op 1.4648 s/op 0.97
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6400 ns/op 5.0300 ns/op 0.92
state getBlockRootAtSlot - 250000 vs - 7PWei 733.33 ns/op 682.53 ns/op 1.07
computeProposers - vc 250000 9.8224 ms/op 10.312 ms/op 0.95
computeEpochShuffling - vc 250000 109.51 ms/op 110.65 ms/op 0.99
getNextSyncCommittee - vc 250000 170.01 ms/op 175.44 ms/op 0.97
computeSigningRoot for AttestationData 26.039 us/op 31.793 us/op 0.82
hash AttestationData serialized data then Buffer.toString(base64) 2.4413 us/op 2.6228 us/op 0.93
toHexString serialized data 1.1018 us/op 1.1734 us/op 0.94
Buffer.toString(base64) 231.52 ns/op 235.50 ns/op 0.98

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 48dbc58 into unstable Jan 5, 2024
14 of 15 checks passed
@wemeetagain wemeetagain deleted the nflaig/update-bls-keystore branch January 5, 2024 17:10
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.14.0 🎉

ensi321 pushed a commit to ensi321/lodestar that referenced this pull request Jan 22, 2024
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