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: run sync notifier once every slot pre-genesis #6002

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Sep 26, 2023

Motivation

Sync notifier is not working as expected pre-genesis, it logs only every other slot

Sep-26 20:55:30.000[]                 info: Synced - slot: -12323 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 30
Sep-26 20:55:54.001[]                 info: Synced - slot: -12321 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 30
Sep-26 20:56:18.000[]                 info: Synced - slot: -12319 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 30
Sep-26 20:56:42.001[]                 info: Synced - slot: -12317 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 31
Sep-26 20:57:05.999[]                 info: Synced - slot: -12315 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 31

Description

Run sync notifier once every slot pre-genesis

  • For future genesis time, calculate time left in the slot
  • For past genesis time, calculate time until the next slot
Sep-26 21:58:30.001[]                 info: Synced - slot: -12008 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 1
Sep-26 21:58:42.001[]                 info: Synced - slot: -12007 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 2
Sep-26 21:58:54.001[]                 info: Synced - slot: -12006 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 2
Sep-26 21:59:06.000[]                 info: Synced - slot: -12005 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 2
Sep-26 21:59:18.002[]                 info: Synced - slot: -12004 - head: 0xab09…f889 - finalized: 0x0000…0000:0 - peers: 2

@nflaig nflaig requested a review from a team as a code owner September 26, 2023 20:14
@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 5b286ce Previous: 1397834 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 639.51 us/op 828.51 us/op 0.77
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 81.832 us/op 128.68 us/op 0.64
BLS verify - blst-native 1.3140 ms/op 1.5866 ms/op 0.83
BLS verifyMultipleSignatures 3 - blst-native 2.8223 ms/op 3.0682 ms/op 0.92
BLS verifyMultipleSignatures 8 - blst-native 6.5091 ms/op 6.7124 ms/op 0.97
BLS verifyMultipleSignatures 32 - blst-native 22.531 ms/op 23.545 ms/op 0.96
BLS verifyMultipleSignatures 64 - blst-native 44.304 ms/op 45.354 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst-native 89.533 ms/op 95.974 ms/op 0.93
BLS deserializing 10000 signatures 921.38 ms/op 946.52 ms/op 0.97
BLS deserializing 100000 signatures 9.5284 s/op 9.7745 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3996 ms/op 1.5306 ms/op 0.91
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.7282 ms/op 1.6814 ms/op 1.03
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4506 ms/op 2.7240 ms/op 0.90
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.6918 ms/op 3.8760 ms/op 0.95
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.1288 ms/op 6.9272 ms/op 0.88
BLS aggregatePubkeys 32 - blst-native 28.397 us/op 30.980 us/op 0.92
BLS aggregatePubkeys 128 - blst-native 105.74 us/op 115.05 us/op 0.92
getAttestationsForBlock 50.078 ms/op 105.10 ms/op 0.48
isKnown best case - 1 super set check 403.00 ns/op 1.0820 us/op 0.37
isKnown normal case - 2 super set checks 485.00 ns/op 944.00 ns/op 0.51
isKnown worse case - 16 super set checks 498.00 ns/op 923.00 ns/op 0.54
CheckpointStateCache - add get delete 5.9810 us/op 10.801 us/op 0.55
validate api signedAggregateAndProof - struct 2.9774 ms/op 3.4226 ms/op 0.87
validate gossip signedAggregateAndProof - struct 2.9704 ms/op 3.3552 ms/op 0.89
validate gossip attestation - vc 640000 1.4673 ms/op 1.5228 ms/op 0.96
batch validate gossip attestation - vc 640000 - chunk 32 190.32 us/op 221.22 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 64 182.45 us/op 183.34 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 128 161.99 us/op 165.57 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 256 136.55 us/op 144.67 us/op 0.94
pickEth1Vote - no votes 1.2487 ms/op 1.3427 ms/op 0.93
pickEth1Vote - max votes 10.583 ms/op 10.995 ms/op 0.96
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.170 ms/op 18.569 ms/op 0.92
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 26.958 ms/op 27.534 ms/op 0.98
pickEth1Vote - Eth1Data fastSerialize value x2048 593.81 us/op 691.28 us/op 0.86
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.4737 ms/op 8.2330 ms/op 0.54
bytes32 toHexString 480.00 ns/op 631.00 ns/op 0.76
bytes32 Buffer.toString(hex) 313.00 ns/op 310.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 511.00 ns/op 555.00 ns/op 0.92
bytes32 Buffer.toString(hex) + 0x 299.00 ns/op 326.00 ns/op 0.92
Object access 1 prop 0.16200 ns/op 0.20600 ns/op 0.79
Map access 1 prop 0.14600 ns/op 0.15400 ns/op 0.95
Object get x1000 7.6750 ns/op 7.9840 ns/op 0.96
Map get x1000 0.62300 ns/op 0.67400 ns/op 0.92
Object set x1000 61.983 ns/op 65.025 ns/op 0.95
Map set x1000 48.131 ns/op 49.129 ns/op 0.98
Return object 10000 times 0.25250 ns/op 0.25030 ns/op 1.01
Throw Error 10000 times 4.0611 us/op 3.9370 us/op 1.03
fastMsgIdFn sha256 / 200 bytes 3.4750 us/op 3.4240 us/op 1.01
fastMsgIdFn h32 xxhash / 200 bytes 291.00 ns/op 325.00 ns/op 0.90
fastMsgIdFn h64 xxhash / 200 bytes 356.00 ns/op 378.00 ns/op 0.94
fastMsgIdFn sha256 / 1000 bytes 11.854 us/op 11.672 us/op 1.02
fastMsgIdFn h32 xxhash / 1000 bytes 434.00 ns/op 454.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 1000 bytes 441.00 ns/op 450.00 ns/op 0.98
fastMsgIdFn sha256 / 10000 bytes 105.70 us/op 106.62 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 2.0230 us/op 2.0450 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 1.3860 us/op 1.4150 us/op 0.98
send data - 1000 256B messages 22.946 ms/op 21.634 ms/op 1.06
send data - 1000 512B messages 29.524 ms/op 29.872 ms/op 0.99
send data - 1000 1024B messages 40.664 ms/op 45.085 ms/op 0.90
send data - 1000 1200B messages 23.688 ms/op 34.476 ms/op 0.69
send data - 1000 2048B messages 25.052 ms/op 39.902 ms/op 0.63
send data - 1000 4096B messages 35.081 ms/op 39.309 ms/op 0.89
send data - 1000 16384B messages 79.087 ms/op 80.061 ms/op 0.99
send data - 1000 65536B messages 285.61 ms/op 297.29 ms/op 0.96
enrSubnets - fastDeserialize 64 bits 1.2110 us/op 1.3630 us/op 0.89
enrSubnets - ssz BitVector 64 bits 423.00 ns/op 483.00 ns/op 0.88
enrSubnets - fastDeserialize 4 bits 165.00 ns/op 194.00 ns/op 0.85
enrSubnets - ssz BitVector 4 bits 423.00 ns/op 457.00 ns/op 0.93
prioritizePeers score -10:0 att 32-0.1 sync 2-0 104.91 us/op 114.67 us/op 0.91
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 125.47 us/op 139.84 us/op 0.90
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 167.76 us/op 194.59 us/op 0.86
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 291.67 us/op 341.80 us/op 0.85
prioritizePeers score 0:0 att 64-1 sync 4-1 347.62 us/op 372.49 us/op 0.93
array of 16000 items push then shift 1.6605 us/op 1.7216 us/op 0.96
LinkedList of 16000 items push then shift 9.0800 ns/op 10.233 ns/op 0.89
array of 16000 items push then pop 90.404 ns/op 112.72 ns/op 0.80
LinkedList of 16000 items push then pop 9.5500 ns/op 9.7800 ns/op 0.98
array of 24000 items push then shift 2.6644 us/op 2.4651 us/op 1.08
LinkedList of 24000 items push then shift 9.1160 ns/op 10.731 ns/op 0.85
array of 24000 items push then pop 111.78 ns/op 167.62 ns/op 0.67
LinkedList of 24000 items push then pop 8.7710 ns/op 10.111 ns/op 0.87
intersect bitArray bitLen 8 6.8400 ns/op 6.8320 ns/op 1.00
intersect array and set length 8 54.823 ns/op 72.088 ns/op 0.76
intersect bitArray bitLen 128 32.350 ns/op 33.380 ns/op 0.97
intersect array and set length 128 760.59 ns/op 950.42 ns/op 0.80
bitArray.getTrueBitIndexes() bitLen 128 1.4230 us/op 1.7040 us/op 0.84
bitArray.getTrueBitIndexes() bitLen 248 2.3440 us/op 3.0530 us/op 0.77
bitArray.getTrueBitIndexes() bitLen 512 4.6920 us/op 6.2470 us/op 0.75
Buffer.concat 32 items 972.00 ns/op 1.0450 us/op 0.93
Uint8Array.set 32 items 1.9440 us/op 2.0830 us/op 0.93
Set add up to 64 items then delete first 4.3714 us/op 4.7453 us/op 0.92
OrderedSet add up to 64 items then delete first 5.4634 us/op 6.0750 us/op 0.90
Set add up to 64 items then delete last 4.7488 us/op 5.1108 us/op 0.93
OrderedSet add up to 64 items then delete last 5.8801 us/op 5.8796 us/op 1.00
Set add up to 64 items then delete middle 4.6142 us/op 4.9476 us/op 0.93
OrderedSet add up to 64 items then delete middle 7.0767 us/op 7.6051 us/op 0.93
Set add up to 128 items then delete first 9.4457 us/op 10.356 us/op 0.91
OrderedSet add up to 128 items then delete first 12.318 us/op 13.891 us/op 0.89
Set add up to 128 items then delete last 9.5581 us/op 10.195 us/op 0.94
OrderedSet add up to 128 items then delete last 12.353 us/op 13.721 us/op 0.90
Set add up to 128 items then delete middle 9.3110 us/op 10.188 us/op 0.91
OrderedSet add up to 128 items then delete middle 17.747 us/op 18.833 us/op 0.94
Set add up to 256 items then delete first 19.457 us/op 20.752 us/op 0.94
OrderedSet add up to 256 items then delete first 25.964 us/op 27.985 us/op 0.93
Set add up to 256 items then delete last 19.800 us/op 20.300 us/op 0.98
OrderedSet add up to 256 items then delete last 25.122 us/op 27.826 us/op 0.90
Set add up to 256 items then delete middle 19.914 us/op 20.253 us/op 0.98
OrderedSet add up to 256 items then delete middle 49.587 us/op 50.698 us/op 0.98
transfer serialized Status (84 B) 1.8920 us/op 2.0880 us/op 0.91
copy serialized Status (84 B) 1.7140 us/op 1.7470 us/op 0.98
transfer serialized SignedVoluntaryExit (112 B) 2.2060 us/op 2.0630 us/op 1.07
copy serialized SignedVoluntaryExit (112 B) 1.8170 us/op 1.7230 us/op 1.05
transfer serialized ProposerSlashing (416 B) 2.6410 us/op 2.4110 us/op 1.10
copy serialized ProposerSlashing (416 B) 2.4390 us/op 2.6710 us/op 0.91
transfer serialized Attestation (485 B) 2.2370 us/op 2.4080 us/op 0.93
copy serialized Attestation (485 B) 1.9690 us/op 2.4490 us/op 0.80
transfer serialized AttesterSlashing (33232 B) 2.2790 us/op 2.6500 us/op 0.86
copy serialized AttesterSlashing (33232 B) 4.8780 us/op 9.3130 us/op 0.52
transfer serialized Small SignedBeaconBlock (128000 B) 2.6100 us/op 3.1820 us/op 0.82
copy serialized Small SignedBeaconBlock (128000 B) 15.046 us/op 22.289 us/op 0.68
transfer serialized Avg SignedBeaconBlock (200000 B) 3.0730 us/op 3.2040 us/op 0.96
copy serialized Avg SignedBeaconBlock (200000 B) 22.822 us/op 33.244 us/op 0.69
transfer serialized BlobsSidecar (524380 B) 3.3820 us/op 4.1740 us/op 0.81
copy serialized BlobsSidecar (524380 B) 87.708 us/op 164.49 us/op 0.53
transfer serialized Big SignedBeaconBlock (1000000 B) 4.1850 us/op 5.4120 us/op 0.77
copy serialized Big SignedBeaconBlock (1000000 B) 214.88 us/op 192.39 us/op 1.12
pass gossip attestations to forkchoice per slot 4.0002 ms/op 4.5761 ms/op 0.87
forkChoice updateHead vc 100000 bc 64 eq 0 698.86 us/op 756.51 us/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 0 5.3956 ms/op 5.2527 ms/op 1.03
forkChoice updateHead vc 1000000 bc 64 eq 0 7.7148 ms/op 8.4244 ms/op 0.92
forkChoice updateHead vc 600000 bc 320 eq 0 4.4460 ms/op 5.3494 ms/op 0.83
forkChoice updateHead vc 600000 bc 1200 eq 0 4.5346 ms/op 4.7779 ms/op 0.95
forkChoice updateHead vc 600000 bc 7200 eq 0 5.9703 ms/op 6.0353 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 1000 11.579 ms/op 11.952 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 10000 12.520 ms/op 13.228 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 300000 16.502 ms/op 27.170 ms/op 0.61
computeDeltas 500000 validators 300 proto nodes 6.6239 ms/op 6.9671 ms/op 0.95
computeDeltas 500000 validators 1200 proto nodes 6.5694 ms/op 6.9986 ms/op 0.94
computeDeltas 500000 validators 7200 proto nodes 6.7022 ms/op 6.8772 ms/op 0.97
computeDeltas 750000 validators 300 proto nodes 10.095 ms/op 10.049 ms/op 1.00
computeDeltas 750000 validators 1200 proto nodes 10.180 ms/op 10.003 ms/op 1.02
computeDeltas 750000 validators 7200 proto nodes 9.8769 ms/op 10.168 ms/op 0.97
computeDeltas 1400000 validators 300 proto nodes 18.896 ms/op 20.538 ms/op 0.92
computeDeltas 1400000 validators 1200 proto nodes 18.974 ms/op 20.998 ms/op 0.90
computeDeltas 1400000 validators 7200 proto nodes 18.925 ms/op 21.379 ms/op 0.89
computeDeltas 2100000 validators 300 proto nodes 28.714 ms/op 29.434 ms/op 0.98
computeDeltas 2100000 validators 1200 proto nodes 29.353 ms/op 29.961 ms/op 0.98
computeDeltas 2100000 validators 7200 proto nodes 28.899 ms/op 29.121 ms/op 0.99
computeProposerBoostScoreFromBalances 500000 validators 3.5956 ms/op 3.6451 ms/op 0.99
computeProposerBoostScoreFromBalances 750000 validators 3.5823 ms/op 3.7563 ms/op 0.95
computeProposerBoostScoreFromBalances 1400000 validators 3.6100 ms/op 3.7417 ms/op 0.96
computeProposerBoostScoreFromBalances 2100000 validators 3.4283 ms/op 3.6235 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei normalcase 3.3823 ms/op 3.1421 ms/op 1.08
altair processAttestation - 250000 vs - 7PWei worstcase 4.2708 ms/op 4.3240 ms/op 0.99
altair processAttestation - setStatus - 1/6 committees join 174.67 us/op 224.94 us/op 0.78
altair processAttestation - setStatus - 1/3 committees join 343.60 us/op 353.56 us/op 0.97
altair processAttestation - setStatus - 1/2 committees join 463.87 us/op 515.41 us/op 0.90
altair processAttestation - setStatus - 2/3 committees join 573.23 us/op 635.66 us/op 0.90
altair processAttestation - setStatus - 4/5 committees join 816.07 us/op 907.56 us/op 0.90
altair processAttestation - setStatus - 100% committees join 916.52 us/op 1.0572 ms/op 0.87
altair processBlock - 250000 vs - 7PWei normalcase 10.181 ms/op 9.6032 ms/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase hashState 35.807 ms/op 37.180 ms/op 0.96
altair processBlock - 250000 vs - 7PWei worstcase 42.426 ms/op 49.435 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase hashState 102.38 ms/op 122.50 ms/op 0.84
phase0 processBlock - 250000 vs - 7PWei normalcase 3.0498 ms/op 3.7449 ms/op 0.81
phase0 processBlock - 250000 vs - 7PWei worstcase 34.535 ms/op 35.576 ms/op 0.97
altair processEth1Data - 250000 vs - 7PWei normalcase 623.25 us/op 671.65 us/op 0.93
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 17.150 us/op 16.589 us/op 1.03
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 76.603 us/op 83.131 us/op 0.92
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 30.254 us/op 31.937 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 19.396 us/op 18.251 us/op 1.06
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 244.90 us/op 200.24 us/op 1.22
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.7412 ms/op 1.8173 ms/op 0.96
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8938 ms/op 1.8878 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.0302 ms/op 1.8931 ms/op 1.07
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.3147 ms/op 4.7054 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.0272 ms/op 3.5388 ms/op 0.86
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.9798 ms/op 8.6424 ms/op 0.81
Tree 40 250000 create 427.17 ms/op 612.16 ms/op 0.70
Tree 40 250000 get(125000) 228.65 ns/op 256.78 ns/op 0.89
Tree 40 250000 set(125000) 1.1618 us/op 2.7537 us/op 0.42
Tree 40 250000 toArray() 24.432 ms/op 31.202 ms/op 0.78
Tree 40 250000 iterate all - toArray() + loop 23.548 ms/op 29.589 ms/op 0.80
Tree 40 250000 iterate all - get(i) 76.945 ms/op 90.211 ms/op 0.85
MutableVector 250000 create 14.823 ms/op 12.321 ms/op 1.20
MutableVector 250000 get(125000) 9.7070 ns/op 7.1340 ns/op 1.36
MutableVector 250000 set(125000) 337.90 ns/op 286.53 ns/op 1.18
MutableVector 250000 toArray() 3.9413 ms/op 4.1770 ms/op 0.94
MutableVector 250000 iterate all - toArray() + loop 3.7938 ms/op 3.5924 ms/op 1.06
MutableVector 250000 iterate all - get(i) 1.6994 ms/op 1.6053 ms/op 1.06
Array 250000 create 3.4027 ms/op 3.6538 ms/op 0.93
Array 250000 clone - spread 1.0914 ms/op 1.1270 ms/op 0.97
Array 250000 get(125000) 0.52500 ns/op 0.53500 ns/op 0.98
Array 250000 set(125000) 0.61200 ns/op 0.59500 ns/op 1.03
Array 250000 iterate all - loop 85.622 us/op 114.58 us/op 0.75
effectiveBalanceIncrements clone Uint8Array 300000 30.386 us/op 43.954 us/op 0.69
effectiveBalanceIncrements clone MutableVector 300000 289.00 ns/op 261.00 ns/op 1.11
effectiveBalanceIncrements rw all Uint8Array 300000 182.79 us/op 180.53 us/op 1.01
effectiveBalanceIncrements rw all MutableVector 300000 83.515 ms/op 87.111 ms/op 0.96
phase0 afterProcessEpoch - 250000 vs - 7PWei 118.35 ms/op 117.62 ms/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 40.245 ms/op 45.211 ms/op 0.89
altair processEpoch - mainnet_e81889 462.70 ms/op 539.26 ms/op 0.86
mainnet_e81889 - altair beforeProcessEpoch 75.296 ms/op 73.030 ms/op 1.03
mainnet_e81889 - altair processJustificationAndFinalization 37.919 us/op 26.734 us/op 1.42
mainnet_e81889 - altair processInactivityUpdates 9.2166 ms/op 9.2618 ms/op 1.00
mainnet_e81889 - altair processRewardsAndPenalties 65.010 ms/op 72.098 ms/op 0.90
mainnet_e81889 - altair processRegistryUpdates 6.3700 us/op 3.5140 us/op 1.81
mainnet_e81889 - altair processSlashings 1.5070 us/op 483.00 ns/op 3.12
mainnet_e81889 - altair processEth1DataReset 1.3200 us/op 616.00 ns/op 2.14
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9106 ms/op 1.2717 ms/op 1.50
mainnet_e81889 - altair processSlashingsReset 8.7120 us/op 3.0380 us/op 2.87
mainnet_e81889 - altair processRandaoMixesReset 15.120 us/op 5.4130 us/op 2.79
mainnet_e81889 - altair processHistoricalRootsUpdate 3.1070 us/op 675.00 ns/op 4.60
mainnet_e81889 - altair processParticipationFlagUpdates 6.1320 us/op 2.1690 us/op 2.83
mainnet_e81889 - altair processSyncCommitteeUpdates 1.7390 us/op 566.00 ns/op 3.07
mainnet_e81889 - altair afterProcessEpoch 162.18 ms/op 127.72 ms/op 1.27
capella processEpoch - mainnet_e217614 1.8462 s/op 1.4948 s/op 1.24
mainnet_e217614 - capella beforeProcessEpoch 272.86 ms/op 248.44 ms/op 1.10
mainnet_e217614 - capella processJustificationAndFinalization 19.615 us/op 13.190 us/op 1.49
mainnet_e217614 - capella processInactivityUpdates 26.290 ms/op 20.880 ms/op 1.26
mainnet_e217614 - capella processRewardsAndPenalties 285.50 ms/op 267.86 ms/op 1.07
mainnet_e217614 - capella processRegistryUpdates 22.362 us/op 21.471 us/op 1.04
mainnet_e217614 - capella processSlashings 533.00 ns/op 488.00 ns/op 1.09
mainnet_e217614 - capella processEth1DataReset 482.00 ns/op 686.00 ns/op 0.70
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.2146 ms/op 4.1244 ms/op 1.02
mainnet_e217614 - capella processSlashingsReset 3.0120 us/op 2.6250 us/op 1.15
mainnet_e217614 - capella processRandaoMixesReset 5.8320 us/op 3.8080 us/op 1.53
mainnet_e217614 - capella processHistoricalRootsUpdate 847.00 ns/op 820.00 ns/op 1.03
mainnet_e217614 - capella processParticipationFlagUpdates 2.0010 us/op 3.5180 us/op 0.57
mainnet_e217614 - capella afterProcessEpoch 306.76 ms/op 305.07 ms/op 1.01
phase0 processEpoch - mainnet_e58758 420.17 ms/op 457.66 ms/op 0.92
mainnet_e58758 - phase0 beforeProcessEpoch 139.91 ms/op 105.88 ms/op 1.32
mainnet_e58758 - phase0 processJustificationAndFinalization 18.583 us/op 24.355 us/op 0.76
mainnet_e58758 - phase0 processRewardsAndPenalties 42.967 ms/op 50.684 ms/op 0.85
mainnet_e58758 - phase0 processRegistryUpdates 16.210 us/op 10.551 us/op 1.54
mainnet_e58758 - phase0 processSlashings 578.00 ns/op 602.00 ns/op 0.96
mainnet_e58758 - phase0 processEth1DataReset 460.00 ns/op 593.00 ns/op 0.78
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1047 ms/op 1.0484 ms/op 1.05
mainnet_e58758 - phase0 processSlashingsReset 4.4270 us/op 3.5800 us/op 1.24
mainnet_e58758 - phase0 processRandaoMixesReset 6.1170 us/op 5.7860 us/op 1.06
mainnet_e58758 - phase0 processHistoricalRootsUpdate 573.00 ns/op 405.00 ns/op 1.41
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.5740 us/op 4.0090 us/op 1.14
mainnet_e58758 - phase0 afterProcessEpoch 108.19 ms/op 106.61 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2909 ms/op 1.2626 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4905 ms/op 1.9395 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 17.512 ms/op 22.712 ms/op 0.77
altair processInactivityUpdates - 250000 worstcase 17.566 ms/op 21.091 ms/op 0.83
phase0 processRegistryUpdates - 250000 normalcase 13.956 us/op 9.6820 us/op 1.44
phase0 processRegistryUpdates - 250000 badcase_full_deposits 434.78 us/op 340.64 us/op 1.28
phase0 processRegistryUpdates - 250000 worstcase 0.5 162.67 ms/op 129.89 ms/op 1.25
altair processRewardsAndPenalties - 250000 normalcase 55.829 ms/op 65.411 ms/op 0.85
altair processRewardsAndPenalties - 250000 worstcase 46.153 ms/op 64.909 ms/op 0.71
phase0 getAttestationDeltas - 250000 normalcase 9.7501 ms/op 9.5013 ms/op 1.03
phase0 getAttestationDeltas - 250000 worstcase 10.321 ms/op 9.5946 ms/op 1.08
phase0 processSlashings - 250000 worstcase 2.6698 ms/op 2.5712 ms/op 1.04
altair processSyncCommitteeUpdates - 250000 162.45 ms/op 153.09 ms/op 1.06
BeaconState.hashTreeRoot - No change 445.00 ns/op 385.00 ns/op 1.16
BeaconState.hashTreeRoot - 1 full validator 137.45 us/op 177.07 us/op 0.78
BeaconState.hashTreeRoot - 32 full validator 1.5152 ms/op 1.8060 ms/op 0.84
BeaconState.hashTreeRoot - 512 full validator 16.616 ms/op 13.170 ms/op 1.26
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 169.60 us/op 147.54 us/op 1.15
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2980 ms/op 1.9974 ms/op 1.15
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 30.254 ms/op 33.619 ms/op 0.90
BeaconState.hashTreeRoot - 1 balances 160.72 us/op 125.59 us/op 1.28
BeaconState.hashTreeRoot - 32 balances 1.3862 ms/op 1.1438 ms/op 1.21
BeaconState.hashTreeRoot - 512 balances 12.793 ms/op 9.7644 ms/op 1.31
BeaconState.hashTreeRoot - 250000 balances 199.73 ms/op 177.21 ms/op 1.13
aggregationBits - 2048 els - zipIndexesInBitList 17.942 us/op 15.743 us/op 1.14
regular array get 100000 times 46.228 us/op 43.631 us/op 1.06
wrappedArray get 100000 times 46.229 us/op 33.569 us/op 1.38
arrayWithProxy get 100000 times 14.839 ms/op 15.936 ms/op 0.93
ssz.Root.equals 253.00 ns/op 224.00 ns/op 1.13
byteArrayEquals 267.00 ns/op 221.00 ns/op 1.21
shuffle list - 16384 els 7.3185 ms/op 7.1860 ms/op 1.02
shuffle list - 250000 els 107.67 ms/op 106.29 ms/op 1.01
processSlot - 1 slots 20.051 us/op 16.702 us/op 1.20
processSlot - 32 slots 3.5568 ms/op 4.1911 ms/op 0.85
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 52.846 ms/op 61.869 ms/op 0.85
getCommitteeAssignments - req 1 vs - 250000 vc 2.8352 ms/op 2.6481 ms/op 1.07
getCommitteeAssignments - req 100 vs - 250000 vc 3.9844 ms/op 3.8053 ms/op 1.05
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3801 ms/op 4.2163 ms/op 1.04
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.5000 ns/op 5.1500 ns/op 1.07
state getBlockRootAtSlot - 250000 vs - 7PWei 617.36 ns/op 725.73 ns/op 0.85
computeProposers - vc 250000 9.6395 ms/op 9.7152 ms/op 0.99
computeEpochShuffling - vc 250000 112.46 ms/op 109.02 ms/op 1.03
getNextSyncCommittee - vc 250000 162.93 ms/op 164.06 ms/op 0.99
computeSigningRoot for AttestationData 26.300 us/op 29.969 us/op 0.88
hash AttestationData serialized data then Buffer.toString(base64) 2.4722 us/op 2.4455 us/op 1.01
toHexString serialized data 1.2627 us/op 1.2606 us/op 1.00
Buffer.toString(base64) 260.22 ns/op 240.19 ns/op 1.08

by benchmarkbot/action

@nflaig nflaig force-pushed the nflaig/sync-notifier-pre-genesis branch 2 times, most recently from 848e1f6 to d49487a Compare September 27, 2023 09:00
@g11tech
Copy link
Contributor

g11tech commented Sep 27, 2023

may be printing the log every other slot is good before genesis there is no useful information at play pre genesis every slot

@nflaig
Copy link
Member Author

nflaig commented Sep 27, 2023

may be printing the log every other slot is good before genesis there is no useful information at play pre genesis every slot

The variable says msToNextSlot but the current calculation does not consider a negative genesis time (msFromGenesis).

There can be the argument to have less frequent sync notifier logs pre-genesis but that should be done intentionally and not just because the calculation is done incorrectly.

This was brought up by rocknet in discord a while back as well.

The other thing that seems unusual is the logs only report "syncing" every other negative slot. That is, only the odd-numbered slots. That doesn't seem good.

In my opinion we should just log once every slot no matter if pre / post-genesis.

@nflaig nflaig force-pushed the nflaig/sync-notifier-pre-genesis branch from d49487a to ecdde04 Compare September 29, 2023 13:03
@wemeetagain wemeetagain merged commit ce54e32 into unstable Sep 29, 2023
14 of 15 checks passed
@wemeetagain wemeetagain deleted the nflaig/sync-notifier-pre-genesis branch September 29, 2023 14:02
@wemeetagain
Copy link
Member

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