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: start clock last when initializing validator client #6973

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jul 23, 2024

Motivation

Clock needs to be started as late as possible when initializing validator client to ensure all functions are being scheduled.

for (const {timeItem, fn} of this.fns) {
this.runAtMostEvery(timeItem, signal, fn).catch((e: Error) => {

Description

Start clock last when initializing validator client

@nflaig nflaig requested a review from a team as a code owner July 23, 2024 10:04
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 62.49%. Comparing base (27012f9) to head (77c0488).

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6973   +/-   ##
=========================================
  Coverage     62.49%   62.49%           
=========================================
  Files           576      576           
  Lines         61180    61178    -2     
  Branches       2131     2134    +3     
=========================================
+ Hits          38234    38235    +1     
+ Misses        22907    22904    -3     
  Partials         39       39           

Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: e4f9d85 Previous: 81f9d97 Ratio
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1738 ms/op 4.7661 ms/op 0.25
Full benchmark results
Benchmark suite Current: e4f9d85 Previous: 81f9d97 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 766.15 us/op 923.08 us/op 0.83
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 40.389 us/op 65.173 us/op 0.62
BLS verify - blst-native 1.1144 ms/op 1.3357 ms/op 0.83
BLS verifyMultipleSignatures 3 - blst-native 2.3797 ms/op 2.7298 ms/op 0.87
BLS verifyMultipleSignatures 8 - blst-native 5.2567 ms/op 5.9857 ms/op 0.88
BLS verifyMultipleSignatures 32 - blst-native 19.300 ms/op 23.442 ms/op 0.82
BLS verifyMultipleSignatures 64 - blst-native 38.047 ms/op 43.330 ms/op 0.88
BLS verifyMultipleSignatures 128 - blst-native 75.519 ms/op 88.224 ms/op 0.86
BLS deserializing 10000 signatures 778.97 ms/op 929.60 ms/op 0.84
BLS deserializing 100000 signatures 7.8217 s/op 9.0080 s/op 0.87
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1047 ms/op 1.2604 ms/op 0.88
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2200 ms/op 1.5067 ms/op 0.81
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2342 ms/op 2.5793 ms/op 0.87
BLS verifyMultipleSignatures - same message - 64 - blst-native 2.8437 ms/op 3.3823 ms/op 0.84
BLS verifyMultipleSignatures - same message - 128 - blst-native 4.7682 ms/op 5.5757 ms/op 0.86
BLS aggregatePubkeys 32 - blst-native 21.767 us/op 25.712 us/op 0.85
BLS aggregatePubkeys 128 - blst-native 83.986 us/op 99.790 us/op 0.84
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 56.068 ms/op 59.422 ms/op 0.94
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 51.489 ms/op 65.156 ms/op 0.79
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 31.184 ms/op 33.814 ms/op 0.92
getSlashingsAndExits - default max 70.879 us/op 101.71 us/op 0.70
getSlashingsAndExits - 2k 355.67 us/op 333.85 us/op 1.07
proposeBlockBody type=full, size=empty 5.2805 ms/op 6.1905 ms/op 0.85
isKnown best case - 1 super set check 812.00 ns/op 433.00 ns/op 1.88
isKnown normal case - 2 super set checks 861.00 ns/op 503.00 ns/op 1.71
isKnown worse case - 16 super set checks 759.00 ns/op 496.00 ns/op 1.53
InMemoryCheckpointStateCache - add get delete 5.0000 us/op 6.2080 us/op 0.81
validate api signedAggregateAndProof - struct 2.4555 ms/op 2.7102 ms/op 0.91
validate gossip signedAggregateAndProof - struct 2.4403 ms/op 2.6639 ms/op 0.92
validate gossip attestation - vc 640000 1.1811 ms/op 1.3466 ms/op 0.88
batch validate gossip attestation - vc 640000 - chunk 32 143.22 us/op 150.55 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 64 122.31 us/op 128.68 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 128 113.86 us/op 124.55 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 256 108.06 us/op 124.14 us/op 0.87
pickEth1Vote - no votes 891.59 us/op 1.2267 ms/op 0.73
pickEth1Vote - max votes 8.6046 ms/op 8.9511 ms/op 0.96
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.815 ms/op 14.359 ms/op 1.24
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.848 ms/op 24.246 ms/op 0.90
pickEth1Vote - Eth1Data fastSerialize value x2048 350.15 us/op 603.98 us/op 0.58
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.4988 ms/op 5.0402 ms/op 0.89
bytes32 toHexString 805.00 ns/op 588.00 ns/op 1.37
bytes32 Buffer.toString(hex) 514.00 ns/op 253.00 ns/op 2.03
bytes32 Buffer.toString(hex) from Uint8Array 645.00 ns/op 421.00 ns/op 1.53
bytes32 Buffer.toString(hex) + 0x 508.00 ns/op 262.00 ns/op 1.94
Object access 1 prop 0.38200 ns/op 0.17900 ns/op 2.13
Map access 1 prop 0.35300 ns/op 0.13500 ns/op 2.61
Object get x1000 5.0400 ns/op 6.1160 ns/op 0.82
Map get x1000 5.9330 ns/op 6.5550 ns/op 0.91
Object set x1000 29.085 ns/op 41.495 ns/op 0.70
Map set x1000 23.293 ns/op 29.822 ns/op 0.78
Return object 10000 times 0.29850 ns/op 0.30210 ns/op 0.99
Throw Error 10000 times 2.6831 us/op 3.4256 us/op 0.78
fastMsgIdFn sha256 / 200 bytes 2.0940 us/op 2.2690 us/op 0.92
fastMsgIdFn h32 xxhash / 200 bytes 484.00 ns/op 252.00 ns/op 1.92
fastMsgIdFn h64 xxhash / 200 bytes 486.00 ns/op 279.00 ns/op 1.74
fastMsgIdFn sha256 / 1000 bytes 5.9250 us/op 7.2890 us/op 0.81
fastMsgIdFn h32 xxhash / 1000 bytes 607.00 ns/op 370.00 ns/op 1.64
fastMsgIdFn h64 xxhash / 1000 bytes 565.00 ns/op 354.00 ns/op 1.60
fastMsgIdFn sha256 / 10000 bytes 49.333 us/op 64.750 us/op 0.76
fastMsgIdFn h32 xxhash / 10000 bytes 1.9960 us/op 1.8910 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.3770 us/op 1.2390 us/op 1.11
send data - 1000 256B messages 12.052 ms/op 14.876 ms/op 0.81
send data - 1000 512B messages 15.844 ms/op 18.087 ms/op 0.88
send data - 1000 1024B messages 22.649 ms/op 28.873 ms/op 0.78
send data - 1000 1200B messages 24.594 ms/op 27.020 ms/op 0.91
send data - 1000 2048B messages 32.975 ms/op 30.948 ms/op 1.07
send data - 1000 4096B messages 28.821 ms/op 28.793 ms/op 1.00
send data - 1000 16384B messages 79.526 ms/op 69.766 ms/op 1.14
send data - 1000 65536B messages 298.76 ms/op 219.06 ms/op 1.36
enrSubnets - fastDeserialize 64 bits 1.3430 us/op 1.0970 us/op 1.22
enrSubnets - ssz BitVector 64 bits 608.00 ns/op 412.00 ns/op 1.48
enrSubnets - fastDeserialize 4 bits 378.00 ns/op 194.00 ns/op 1.95
enrSubnets - ssz BitVector 4 bits 573.00 ns/op 443.00 ns/op 1.29
prioritizePeers score -10:0 att 32-0.1 sync 2-0 166.59 us/op 156.32 us/op 1.07
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 163.17 us/op 157.55 us/op 1.04
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 264.82 us/op 279.62 us/op 0.95
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 475.89 us/op 436.16 us/op 1.09
prioritizePeers score 0:0 att 64-1 sync 4-1 611.31 us/op 848.97 us/op 0.72
array of 16000 items push then shift 1.3950 us/op 1.6690 us/op 0.84
LinkedList of 16000 items push then shift 7.0580 ns/op 7.9410 ns/op 0.89
array of 16000 items push then pop 105.01 ns/op 143.67 ns/op 0.73
LinkedList of 16000 items push then pop 6.4080 ns/op 7.5970 ns/op 0.84
array of 24000 items push then shift 1.9200 us/op 2.4541 us/op 0.78
LinkedList of 24000 items push then shift 6.9370 ns/op 8.1410 ns/op 0.85
array of 24000 items push then pop 158.84 ns/op 187.03 ns/op 0.85
LinkedList of 24000 items push then pop 6.3100 ns/op 7.0600 ns/op 0.89
intersect bitArray bitLen 8 5.6670 ns/op 6.3940 ns/op 0.89
intersect array and set length 8 39.026 ns/op 49.337 ns/op 0.79
intersect bitArray bitLen 128 27.231 ns/op 30.048 ns/op 0.91
intersect array and set length 128 586.39 ns/op 689.39 ns/op 0.85
bitArray.getTrueBitIndexes() bitLen 128 1.8580 us/op 2.1840 us/op 0.85
bitArray.getTrueBitIndexes() bitLen 248 2.9670 us/op 3.3750 us/op 0.88
bitArray.getTrueBitIndexes() bitLen 512 7.1050 us/op 7.8790 us/op 0.90
Buffer.concat 32 items 1.1330 us/op 962.00 ns/op 1.18
Uint8Array.set 32 items 2.2960 us/op 1.7500 us/op 1.31
Buffer.copy 2.3160 us/op 2.5360 us/op 0.91
Uint8Array.set - with subarray 2.6200 us/op 2.9340 us/op 0.89
Uint8Array.set - without subarray 1.9170 us/op 2.1410 us/op 0.90
getUint32 - dataview 471.00 ns/op 267.00 ns/op 1.76
getUint32 - manual 452.00 ns/op 233.00 ns/op 1.94
Set add up to 64 items then delete first 2.2056 us/op 2.5003 us/op 0.88
OrderedSet add up to 64 items then delete first 3.0969 us/op 3.3079 us/op 0.94
Set add up to 64 items then delete last 2.4013 us/op 2.7056 us/op 0.89
OrderedSet add up to 64 items then delete last 3.8118 us/op 4.2453 us/op 0.90
Set add up to 64 items then delete middle 2.4310 us/op 2.5779 us/op 0.94
OrderedSet add up to 64 items then delete middle 5.0820 us/op 5.3635 us/op 0.95
Set add up to 128 items then delete first 4.0646 us/op 5.1824 us/op 0.78
OrderedSet add up to 128 items then delete first 7.5557 us/op 7.4088 us/op 1.02
Set add up to 128 items then delete last 5.4769 us/op 5.1600 us/op 1.06
OrderedSet add up to 128 items then delete last 8.4905 us/op 7.8429 us/op 1.08
Set add up to 128 items then delete middle 5.3951 us/op 4.9907 us/op 1.08
OrderedSet add up to 128 items then delete middle 15.275 us/op 13.804 us/op 1.11
Set add up to 256 items then delete first 11.365 us/op 10.238 us/op 1.11
OrderedSet add up to 256 items then delete first 16.588 us/op 15.480 us/op 1.07
Set add up to 256 items then delete last 10.198 us/op 10.078 us/op 1.01
OrderedSet add up to 256 items then delete last 19.065 us/op 15.863 us/op 1.20
Set add up to 256 items then delete middle 10.979 us/op 9.9542 us/op 1.10
OrderedSet add up to 256 items then delete middle 41.344 us/op 40.945 us/op 1.01
transfer serialized Status (84 B) 1.7210 us/op 1.3110 us/op 1.31
copy serialized Status (84 B) 1.5000 us/op 1.0980 us/op 1.37
transfer serialized SignedVoluntaryExit (112 B) 1.7140 us/op 1.4210 us/op 1.21
copy serialized SignedVoluntaryExit (112 B) 1.5780 us/op 1.1090 us/op 1.42
transfer serialized ProposerSlashing (416 B) 3.0150 us/op 1.5220 us/op 1.98
copy serialized ProposerSlashing (416 B) 1.8880 us/op 1.2830 us/op 1.47
transfer serialized Attestation (485 B) 1.8430 us/op 1.5840 us/op 1.16
copy serialized Attestation (485 B) 1.6780 us/op 1.7040 us/op 0.98
transfer serialized AttesterSlashing (33232 B) 2.9040 us/op 1.7620 us/op 1.65
copy serialized AttesterSlashing (33232 B) 10.125 us/op 6.4340 us/op 1.57
transfer serialized Small SignedBeaconBlock (128000 B) 3.9450 us/op 2.5010 us/op 1.58
copy serialized Small SignedBeaconBlock (128000 B) 12.855 us/op 20.305 us/op 0.63
transfer serialized Avg SignedBeaconBlock (200000 B) 2.8340 us/op 3.8400 us/op 0.74
copy serialized Avg SignedBeaconBlock (200000 B) 13.884 us/op 34.563 us/op 0.40
transfer serialized BlobsSidecar (524380 B) 3.4910 us/op 4.3650 us/op 0.80
copy serialized BlobsSidecar (524380 B) 112.74 us/op 90.663 us/op 1.24
transfer serialized Big SignedBeaconBlock (1000000 B) 3.5010 us/op 4.5080 us/op 0.78
copy serialized Big SignedBeaconBlock (1000000 B) 160.38 us/op 161.32 us/op 0.99
pass gossip attestations to forkchoice per slot 2.9755 ms/op 3.3996 ms/op 0.88
forkChoice updateHead vc 100000 bc 64 eq 0 650.62 us/op 522.67 us/op 1.24
forkChoice updateHead vc 600000 bc 64 eq 0 2.6043 ms/op 3.1395 ms/op 0.83
forkChoice updateHead vc 1000000 bc 64 eq 0 4.6514 ms/op 5.4606 ms/op 0.85
forkChoice updateHead vc 600000 bc 320 eq 0 2.5123 ms/op 3.6198 ms/op 0.69
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7937 ms/op 3.3399 ms/op 0.84
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2810 ms/op 3.5661 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 1000 9.8295 ms/op 10.673 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 10000 9.6972 ms/op 10.775 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 300000 12.064 ms/op 15.062 ms/op 0.80
computeDeltas 500000 validators 300 proto nodes 3.3218 ms/op 3.6065 ms/op 0.92
computeDeltas 500000 validators 1200 proto nodes 3.1040 ms/op 3.7602 ms/op 0.83
computeDeltas 500000 validators 7200 proto nodes 3.1506 ms/op 3.8015 ms/op 0.83
computeDeltas 750000 validators 300 proto nodes 4.7432 ms/op 5.5084 ms/op 0.86
computeDeltas 750000 validators 1200 proto nodes 4.5739 ms/op 5.2731 ms/op 0.87
computeDeltas 750000 validators 7200 proto nodes 4.3339 ms/op 5.3149 ms/op 0.82
computeDeltas 1400000 validators 300 proto nodes 7.9349 ms/op 9.7728 ms/op 0.81
computeDeltas 1400000 validators 1200 proto nodes 8.1909 ms/op 9.8580 ms/op 0.83
computeDeltas 1400000 validators 7200 proto nodes 7.8116 ms/op 9.6054 ms/op 0.81
computeDeltas 2100000 validators 300 proto nodes 12.035 ms/op 14.345 ms/op 0.84
computeDeltas 2100000 validators 1200 proto nodes 12.248 ms/op 14.141 ms/op 0.87
computeDeltas 2100000 validators 7200 proto nodes 11.841 ms/op 14.330 ms/op 0.83
altair processAttestation - 250000 vs - 7PWei normalcase 1.3527 ms/op 1.6059 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei worstcase 2.0145 ms/op 2.3765 ms/op 0.85
altair processAttestation - setStatus - 1/6 committees join 73.769 us/op 84.231 us/op 0.88
altair processAttestation - setStatus - 1/3 committees join 132.52 us/op 172.68 us/op 0.77
altair processAttestation - setStatus - 1/2 committees join 190.23 us/op 233.53 us/op 0.81
altair processAttestation - setStatus - 2/3 committees join 257.83 us/op 306.84 us/op 0.84
altair processAttestation - setStatus - 4/5 committees join 412.82 us/op 441.48 us/op 0.94
altair processAttestation - setStatus - 100% committees join 487.62 us/op 527.66 us/op 0.92
altair processBlock - 250000 vs - 7PWei normalcase 3.7078 ms/op 4.7806 ms/op 0.78
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.592 ms/op 25.148 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase 39.830 ms/op 40.265 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase hashState 89.281 ms/op 75.866 ms/op 1.18
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2600 ms/op 1.6818 ms/op 1.34
phase0 processBlock - 250000 vs - 7PWei worstcase 26.142 ms/op 24.757 ms/op 1.06
altair processEth1Data - 250000 vs - 7PWei normalcase 364.08 us/op 282.56 us/op 1.29
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.9530 us/op 4.8860 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 20.226 us/op 17.913 us/op 1.13
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 6.8960 us/op 6.9480 us/op 0.99
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 3.4580 us/op 4.9540 us/op 0.70
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 77.640 us/op 72.485 us/op 1.07
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 765.47 us/op 640.25 us/op 1.20
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 699.57 us/op 923.08 us/op 0.76
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 643.67 us/op 917.50 us/op 0.70
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.0909 ms/op 2.4412 ms/op 0.86
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.0766 ms/op 1.6480 ms/op 0.65
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.0397 ms/op 3.7640 ms/op 0.81
Tree 40 250000 create 180.39 ms/op 218.10 ms/op 0.83
Tree 40 250000 get(125000) 105.52 ns/op 140.05 ns/op 0.75
Tree 40 250000 set(125000) 526.01 ns/op 633.41 ns/op 0.83
Tree 40 250000 toArray() 13.670 ms/op 14.777 ms/op 0.93
Tree 40 250000 iterate all - toArray() + loop 12.623 ms/op 14.914 ms/op 0.85
Tree 40 250000 iterate all - get(i) 39.851 ms/op 49.582 ms/op 0.80
MutableVector 250000 create 9.2071 ms/op 8.2070 ms/op 1.12
MutableVector 250000 get(125000) 5.5100 ns/op 6.1160 ns/op 0.90
MutableVector 250000 set(125000) 154.35 ns/op 187.02 ns/op 0.83
MutableVector 250000 toArray() 2.6934 ms/op 3.4581 ms/op 0.78
MutableVector 250000 iterate all - toArray() + loop 2.8654 ms/op 3.5375 ms/op 0.81
MutableVector 250000 iterate all - get(i) 1.3288 ms/op 1.6755 ms/op 0.79
Array 250000 create 2.3527 ms/op 2.8738 ms/op 0.82
Array 250000 clone - spread 1.1938 ms/op 1.4204 ms/op 0.84
Array 250000 get(125000) 0.55600 ns/op 0.39700 ns/op 1.40
Array 250000 set(125000) 0.56300 ns/op 0.41900 ns/op 1.34
Array 250000 iterate all - loop 72.607 us/op 106.59 us/op 0.68
effectiveBalanceIncrements clone Uint8Array 300000 18.658 us/op 27.409 us/op 0.68
effectiveBalanceIncrements clone MutableVector 300000 300.00 ns/op 116.00 ns/op 2.59
effectiveBalanceIncrements rw all Uint8Array 300000 157.55 us/op 196.70 us/op 0.80
effectiveBalanceIncrements rw all MutableVector 300000 51.442 ms/op 63.863 ms/op 0.81
phase0 afterProcessEpoch - 250000 vs - 7PWei 72.057 ms/op 87.473 ms/op 0.82
Array.fill - length 1000000 2.4601 ms/op 3.5084 ms/op 0.70
Array push - length 1000000 9.2705 ms/op 16.243 ms/op 0.57
Array.get 0.25996 ns/op 0.26186 ns/op 0.99
Uint8Array.get 0.34490 ns/op 0.42136 ns/op 0.82
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.842 ms/op 21.134 ms/op 0.80
altair processEpoch - mainnet_e81889 296.02 ms/op 317.67 ms/op 0.93
mainnet_e81889 - altair beforeProcessEpoch 26.676 ms/op 26.875 ms/op 0.99
mainnet_e81889 - altair processJustificationAndFinalization 11.193 us/op 11.578 us/op 0.97
mainnet_e81889 - altair processInactivityUpdates 4.8194 ms/op 5.0488 ms/op 0.95
mainnet_e81889 - altair processRewardsAndPenalties 46.519 ms/op 36.184 ms/op 1.29
mainnet_e81889 - altair processRegistryUpdates 1.8330 us/op 1.8850 us/op 0.97
mainnet_e81889 - altair processSlashings 738.00 ns/op 394.00 ns/op 1.87
mainnet_e81889 - altair processEth1DataReset 660.00 ns/op 352.00 ns/op 1.88
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3585 ms/op 1.0208 ms/op 1.33
mainnet_e81889 - altair processSlashingsReset 2.4080 us/op 2.6020 us/op 0.93
mainnet_e81889 - altair processRandaoMixesReset 3.0810 us/op 4.1810 us/op 0.74
mainnet_e81889 - altair processHistoricalRootsUpdate 793.00 ns/op 440.00 ns/op 1.80
mainnet_e81889 - altair processParticipationFlagUpdates 1.5300 us/op 1.7480 us/op 0.88
mainnet_e81889 - altair processSyncCommitteeUpdates 683.00 ns/op 400.00 ns/op 1.71
mainnet_e81889 - altair afterProcessEpoch 75.317 ms/op 90.825 ms/op 0.83
capella processEpoch - mainnet_e217614 1.0688 s/op 1.1045 s/op 0.97
mainnet_e217614 - capella beforeProcessEpoch 102.19 ms/op 112.51 ms/op 0.91
mainnet_e217614 - capella processJustificationAndFinalization 5.6350 us/op 14.466 us/op 0.39
mainnet_e217614 - capella processInactivityUpdates 15.080 ms/op 18.114 ms/op 0.83
mainnet_e217614 - capella processRewardsAndPenalties 263.59 ms/op 228.22 ms/op 1.15
mainnet_e217614 - capella processRegistryUpdates 12.123 us/op 13.065 us/op 0.93
mainnet_e217614 - capella processSlashings 809.00 ns/op 456.00 ns/op 1.77
mainnet_e217614 - capella processEth1DataReset 734.00 ns/op 441.00 ns/op 1.66
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.7007 ms/op 16.095 ms/op 0.29
mainnet_e217614 - capella processSlashingsReset 2.3320 us/op 7.0560 us/op 0.33
mainnet_e217614 - capella processRandaoMixesReset 2.8520 us/op 5.9470 us/op 0.48
mainnet_e217614 - capella processHistoricalRootsUpdate 700.00 ns/op 1.2230 us/op 0.57
mainnet_e217614 - capella processParticipationFlagUpdates 1.6980 us/op 2.4170 us/op 0.70
mainnet_e217614 - capella afterProcessEpoch 235.70 ms/op 248.74 ms/op 0.95
phase0 processEpoch - mainnet_e58758 291.03 ms/op 322.39 ms/op 0.90
mainnet_e58758 - phase0 beforeProcessEpoch 67.495 ms/op 73.640 ms/op 0.92
mainnet_e58758 - phase0 processJustificationAndFinalization 7.5550 us/op 16.448 us/op 0.46
mainnet_e58758 - phase0 processRewardsAndPenalties 36.358 ms/op 28.001 ms/op 1.30
mainnet_e58758 - phase0 processRegistryUpdates 6.4170 us/op 9.1590 us/op 0.70
mainnet_e58758 - phase0 processSlashings 907.00 ns/op 515.00 ns/op 1.76
mainnet_e58758 - phase0 processEth1DataReset 813.00 ns/op 502.00 ns/op 1.62
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 748.23 us/op 1.0703 ms/op 0.70
mainnet_e58758 - phase0 processSlashingsReset 2.3220 us/op 2.9080 us/op 0.80
mainnet_e58758 - phase0 processRandaoMixesReset 3.1790 us/op 5.0380 us/op 0.63
mainnet_e58758 - phase0 processHistoricalRootsUpdate 823.00 ns/op 528.00 ns/op 1.56
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.7870 us/op 4.7910 us/op 0.58
mainnet_e58758 - phase0 afterProcessEpoch 68.661 ms/op 85.047 ms/op 0.81
phase0 processEffectiveBalanceUpdates - 250000 normalcase 828.13 us/op 1.5969 ms/op 0.52
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1738 ms/op 4.7661 ms/op 0.25
altair processInactivityUpdates - 250000 normalcase 15.875 ms/op 29.972 ms/op 0.53
altair processInactivityUpdates - 250000 worstcase 17.200 ms/op 29.224 ms/op 0.59
phase0 processRegistryUpdates - 250000 normalcase 6.1170 us/op 18.131 us/op 0.34
phase0 processRegistryUpdates - 250000 badcase_full_deposits 291.54 us/op 428.09 us/op 0.68
phase0 processRegistryUpdates - 250000 worstcase 0.5 107.47 ms/op 171.49 ms/op 0.63
altair processRewardsAndPenalties - 250000 normalcase 35.543 ms/op 54.560 ms/op 0.65
altair processRewardsAndPenalties - 250000 worstcase 35.499 ms/op 61.459 ms/op 0.58
phase0 getAttestationDeltas - 250000 normalcase 6.2059 ms/op 10.563 ms/op 0.59
phase0 getAttestationDeltas - 250000 worstcase 7.0020 ms/op 11.594 ms/op 0.60
phase0 processSlashings - 250000 worstcase 91.471 us/op 153.82 us/op 0.59
altair processSyncCommitteeUpdates - 250000 93.771 ms/op 159.95 ms/op 0.59
BeaconState.hashTreeRoot - No change 486.00 ns/op 420.00 ns/op 1.16
BeaconState.hashTreeRoot - 1 full validator 76.526 us/op 128.35 us/op 0.60
BeaconState.hashTreeRoot - 32 full validator 727.52 us/op 1.3955 ms/op 0.52
BeaconState.hashTreeRoot - 512 full validator 7.9306 ms/op 20.943 ms/op 0.38
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 91.834 us/op 216.02 us/op 0.43
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3263 ms/op 2.6831 ms/op 0.49
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 14.863 ms/op 37.902 ms/op 0.39
BeaconState.hashTreeRoot - 1 balances 72.736 us/op 146.93 us/op 0.50
BeaconState.hashTreeRoot - 32 balances 616.28 us/op 1.2594 ms/op 0.49
BeaconState.hashTreeRoot - 512 balances 5.7703 ms/op 14.823 ms/op 0.39
BeaconState.hashTreeRoot - 250000 balances 105.80 ms/op 253.71 ms/op 0.42
aggregationBits - 2048 els - zipIndexesInBitList 19.393 us/op 58.064 us/op 0.33
byteArrayEquals 32 47.685 ns/op 64.832 ns/op 0.74
Buffer.compare 32 16.023 ns/op 21.940 ns/op 0.73
byteArrayEquals 1024 1.2620 us/op 2.0745 us/op 0.61
Buffer.compare 1024 23.308 ns/op 31.989 ns/op 0.73
byteArrayEquals 16384 20.007 us/op 28.445 us/op 0.70
Buffer.compare 16384 173.43 ns/op 262.97 ns/op 0.66
byteArrayEquals 123687377 152.66 ms/op 203.25 ms/op 0.75
Buffer.compare 123687377 5.6660 ms/op 12.180 ms/op 0.47
byteArrayEquals 32 - diff last byte 47.364 ns/op 55.598 ns/op 0.85
Buffer.compare 32 - diff last byte 15.346 ns/op 18.459 ns/op 0.83
byteArrayEquals 1024 - diff last byte 1.2654 us/op 1.6452 us/op 0.77
Buffer.compare 1024 - diff last byte 25.327 ns/op 27.007 ns/op 0.94
byteArrayEquals 16384 - diff last byte 20.062 us/op 26.604 us/op 0.75
Buffer.compare 16384 - diff last byte 190.01 ns/op 203.99 ns/op 0.93
byteArrayEquals 123687377 - diff last byte 153.95 ms/op 214.50 ms/op 0.72
Buffer.compare 123687377 - diff last byte 6.1275 ms/op 10.093 ms/op 0.61
byteArrayEquals 32 - random bytes 4.9830 ns/op 5.5220 ns/op 0.90
Buffer.compare 32 - random bytes 15.981 ns/op 18.163 ns/op 0.88
byteArrayEquals 1024 - random bytes 5.0370 ns/op 5.5100 ns/op 0.91
Buffer.compare 1024 - random bytes 15.944 ns/op 17.967 ns/op 0.89
byteArrayEquals 16384 - random bytes 5.0050 ns/op 5.3850 ns/op 0.93
Buffer.compare 16384 - random bytes 15.875 ns/op 17.878 ns/op 0.89
byteArrayEquals 123687377 - random bytes 7.9600 ns/op 6.7700 ns/op 1.18
Buffer.compare 123687377 - random bytes 18.990 ns/op 19.620 ns/op 0.97
regular array get 100000 times 31.076 us/op 41.711 us/op 0.75
wrappedArray get 100000 times 31.104 us/op 34.020 us/op 0.91
arrayWithProxy get 100000 times 10.719 ms/op 14.583 ms/op 0.74
ssz.Root.equals 44.703 ns/op 47.546 ns/op 0.94
byteArrayEquals 44.316 ns/op 46.579 ns/op 0.95
Buffer.compare 9.0820 ns/op 10.742 ns/op 0.85
shuffle list - 16384 els 5.7840 ms/op 6.4729 ms/op 0.89
shuffle list - 250000 els 82.057 ms/op 94.109 ms/op 0.87
processSlot - 1 slots 12.396 us/op 17.398 us/op 0.71
processSlot - 32 slots 2.0801 ms/op 2.1278 ms/op 0.98
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.903 ms/op 36.580 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 1.7601 ms/op 2.1770 ms/op 0.81
getCommitteeAssignments - req 100 vs - 250000 vc 3.4913 ms/op 4.1787 ms/op 0.84
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7549 ms/op 4.5280 ms/op 0.83
findModifiedValidators - 10000 modified validators 321.59 ms/op 235.81 ms/op 1.36
findModifiedValidators - 1000 modified validators 187.83 ms/op 188.86 ms/op 0.99
findModifiedValidators - 100 modified validators 200.93 ms/op 162.02 ms/op 1.24
findModifiedValidators - 10 modified validators 188.03 ms/op 162.24 ms/op 1.16
findModifiedValidators - 1 modified validators 179.71 ms/op 180.74 ms/op 0.99
findModifiedValidators - no difference 185.90 ms/op 159.02 ms/op 1.17
compare ViewDUs 3.6908 s/op 2.9672 s/op 1.24
compare each validator Uint8Array 1.9252 s/op 1.5194 s/op 1.27
compare ViewDU to Uint8Array 849.71 ms/op 1.0585 s/op 0.80
migrate state 1000000 validators, 24 modified, 0 new 482.70 ms/op 556.46 ms/op 0.87
migrate state 1000000 validators, 1700 modified, 1000 new 716.17 ms/op 775.82 ms/op 0.92
migrate state 1000000 validators, 3400 modified, 2000 new 976.15 ms/op 985.16 ms/op 0.99
migrate state 1500000 validators, 24 modified, 0 new 535.26 ms/op 539.79 ms/op 0.99
migrate state 1500000 validators, 1700 modified, 1000 new 751.38 ms/op 770.37 ms/op 0.98
migrate state 1500000 validators, 3400 modified, 2000 new 858.40 ms/op 924.35 ms/op 0.93
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.2400 ns/op 4.2300 ns/op 1.48
state getBlockRootAtSlot - 250000 vs - 7PWei 373.19 ns/op 651.15 ns/op 0.57
computeProposers - vc 250000 5.3701 ms/op 6.7191 ms/op 0.80
computeEpochShuffling - vc 250000 82.400 ms/op 89.925 ms/op 0.92
getNextSyncCommittee - vc 250000 96.875 ms/op 112.44 ms/op 0.86
computeSigningRoot for AttestationData 17.667 us/op 19.352 us/op 0.91
hash AttestationData serialized data then Buffer.toString(base64) 1.1622 us/op 1.5007 us/op 0.77
toHexString serialized data 738.28 ns/op 881.74 ns/op 0.84
Buffer.toString(base64) 140.99 ns/op 179.09 ns/op 0.79

by benchmarkbot/action

@nflaig nflaig added this to the v1.21.0 milestone Jul 23, 2024
@wemeetagain
Copy link
Member

is the problem that we could miss the first slot?

@nflaig
Copy link
Member Author

nflaig commented Jul 23, 2024

is the problem that we could miss the first slot?

No, it's just that after clock.start is called, all runEveryX calls after that won't be registered anymore

@wemeetagain
Copy link
Member

Oh, right!
So we currently aren't logging on unhealthy primary beacon node or setting metrics.beaconHealth?

@nflaig
Copy link
Member Author

nflaig commented Jul 23, 2024

Oh, right! So we currently aren't logging on unhealthy primary beacon node or setting metrics.beaconHealth?

yeah, I have not retested the unhealthy log after moving it in constructor (from init previously) and was kinda blindly trusting that it should work there because the beacon health was there as well but noticed this yesterday when experimenting with my multi node setup.

@nflaig nflaig merged commit a187851 into unstable Jul 24, 2024
22 checks passed
@nflaig nflaig deleted the nflaig/validator-clock-start branch July 24, 2024 07:40
@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.

3 participants