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

Vc to submit SyncCommitteeSignature on early block #4615

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Sep 30, 2022

Motivation

We missed a lot of SyncCommitteeMessage because we always submit them at 1/3 of slot which is a very busy time, and we got I/O some lag issue since v1.1.0 (see #4600)

Description

Submit SyncCommitteeMessage asap

Closes #4608

@twoeths twoeths requested a review from a team as a code owner September 30, 2022 03:57
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d77c2c1 Previous: 631b6e7 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.6501 ms/op 2.5178 ms/op 0.66
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 62.690 us/op 88.488 us/op 0.71
BLS verify - blst-native 2.1685 ms/op 2.7559 ms/op 0.79
BLS verifyMultipleSignatures 3 - blst-native 4.4740 ms/op 5.8292 ms/op 0.77
BLS verifyMultipleSignatures 8 - blst-native 9.6803 ms/op 12.634 ms/op 0.77
BLS verifyMultipleSignatures 32 - blst-native 35.155 ms/op 47.107 ms/op 0.75
BLS aggregatePubkeys 32 - blst-native 46.422 us/op 62.136 us/op 0.75
BLS aggregatePubkeys 128 - blst-native 181.94 us/op 242.02 us/op 0.75
getAttestationsForBlock 75.105 ms/op 120.39 ms/op 0.62
isKnown best case - 1 super set check 484.00 ns/op 527.00 ns/op 0.92
isKnown normal case - 2 super set checks 455.00 ns/op 510.00 ns/op 0.89
isKnown worse case - 16 super set checks 457.00 ns/op 510.00 ns/op 0.90
CheckpointStateCache - add get delete 8.6150 us/op 11.402 us/op 0.76
validate gossip signedAggregateAndProof - struct 5.0188 ms/op 6.4156 ms/op 0.78
validate gossip attestation - struct 2.3613 ms/op 3.1043 ms/op 0.76
pickEth1Vote - no votes 2.0934 ms/op 2.6895 ms/op 0.78
pickEth1Vote - max votes 17.635 ms/op 24.399 ms/op 0.72
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.991 ms/op 14.723 ms/op 0.81
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.320 ms/op 25.169 ms/op 0.77
pickEth1Vote - Eth1Data fastSerialize value x2048 1.4540 ms/op 1.8511 ms/op 0.79
pickEth1Vote - Eth1Data fastSerialize tree x2048 12.006 ms/op 15.722 ms/op 0.76
bytes32 toHexString 931.00 ns/op 1.3600 us/op 0.68
bytes32 Buffer.toString(hex) 742.00 ns/op 818.00 ns/op 0.91
bytes32 Buffer.toString(hex) from Uint8Array 997.00 ns/op 1.1120 us/op 0.90
bytes32 Buffer.toString(hex) + 0x 756.00 ns/op 850.00 ns/op 0.89
Object access 1 prop 0.35500 ns/op 0.46100 ns/op 0.77
Map access 1 prop 0.30400 ns/op 0.34500 ns/op 0.88
Object get x1000 10.459 ns/op 16.726 ns/op 0.63
Map get x1000 0.93700 ns/op 0.97300 ns/op 0.96
Object set x1000 69.400 ns/op 121.00 ns/op 0.57
Map set x1000 46.658 ns/op 83.230 ns/op 0.56
Return object 10000 times 0.44080 ns/op 0.42220 ns/op 1.04
Throw Error 10000 times 6.2291 us/op 8.2622 us/op 0.75
enrSubnets - fastDeserialize 64 bits 2.4900 us/op 3.2130 us/op 0.77
enrSubnets - ssz BitVector 64 bits 740.00 ns/op 882.00 ns/op 0.84
enrSubnets - fastDeserialize 4 bits 362.00 ns/op 506.00 ns/op 0.72
enrSubnets - ssz BitVector 4 bits 731.00 ns/op 914.00 ns/op 0.80
prioritizePeers score -10:0 att 32-0.1 sync 2-0 81.859 us/op 117.03 us/op 0.70
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 114.99 us/op 156.81 us/op 0.73
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 191.47 us/op 280.63 us/op 0.68
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 367.31 us/op 618.52 us/op 0.59
prioritizePeers score 0:0 att 64-1 sync 4-1 409.61 us/op 660.53 us/op 0.62
RateTracker 1000000 limit, 1 obj count per request 176.08 ns/op 223.97 ns/op 0.79
RateTracker 1000000 limit, 2 obj count per request 129.43 ns/op 167.83 ns/op 0.77
RateTracker 1000000 limit, 4 obj count per request 105.88 ns/op 138.81 ns/op 0.76
RateTracker 1000000 limit, 8 obj count per request 93.524 ns/op 122.47 ns/op 0.76
RateTracker with prune 3.8660 us/op 5.9220 us/op 0.65
array of 16000 items push then shift 51.573 us/op 5.5657 us/op 9.27
LinkedList of 16000 items push then shift 12.199 ns/op 20.520 ns/op 0.59
array of 16000 items push then pop 212.80 ns/op 265.92 ns/op 0.80
LinkedList of 16000 items push then pop 11.931 ns/op 19.384 ns/op 0.62
array of 24000 items push then shift 77.346 us/op 7.9826 us/op 9.69
LinkedList of 24000 items push then shift 12.456 ns/op 20.745 ns/op 0.60
array of 24000 items push then pop 190.84 ns/op 240.24 ns/op 0.79
LinkedList of 24000 items push then pop 12.092 ns/op 19.001 ns/op 0.64
intersect bitArray bitLen 8 10.758 ns/op 13.105 ns/op 0.82
intersect array and set length 8 134.00 ns/op 213.39 ns/op 0.63
intersect bitArray bitLen 128 57.834 ns/op 71.633 ns/op 0.81
intersect array and set length 128 1.7467 us/op 2.5736 us/op 0.68
Buffer.concat 32 items 1.7640 ns/op 2.2980 ns/op 0.77
pass gossip attestations to forkchoice per slot 4.8791 ms/op 5.0237 ms/op 0.97
computeDeltas 4.8399 ms/op 5.8283 ms/op 0.83
computeProposerBoostScoreFromBalances 803.57 us/op 906.21 us/op 0.89
altair processAttestation - 250000 vs - 7PWei normalcase 3.2667 ms/op 5.4242 ms/op 0.60
altair processAttestation - 250000 vs - 7PWei worstcase 5.0300 ms/op 7.7645 ms/op 0.65
altair processAttestation - setStatus - 1/6 committees join 165.61 us/op 254.87 us/op 0.65
altair processAttestation - setStatus - 1/3 committees join 325.40 us/op 467.44 us/op 0.70
altair processAttestation - setStatus - 1/2 committees join 472.61 us/op 670.30 us/op 0.71
altair processAttestation - setStatus - 2/3 committees join 617.59 us/op 874.48 us/op 0.71
altair processAttestation - setStatus - 4/5 committees join 870.28 us/op 1.2395 ms/op 0.70
altair processAttestation - setStatus - 100% committees join 1.0518 ms/op 1.5947 ms/op 0.66
altair processBlock - 250000 vs - 7PWei normalcase 24.517 ms/op 30.270 ms/op 0.81
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.357 ms/op 44.464 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase 76.827 ms/op 115.71 ms/op 0.66
altair processBlock - 250000 vs - 7PWei worstcase hashState 101.91 ms/op 129.83 ms/op 0.78
phase0 processBlock - 250000 vs - 7PWei normalcase 2.9510 ms/op 4.5454 ms/op 0.65
phase0 processBlock - 250000 vs - 7PWei worstcase 49.722 ms/op 64.822 ms/op 0.77
altair processEth1Data - 250000 vs - 7PWei normalcase 659.73 us/op 1.1481 ms/op 0.57
Tree 40 250000 create 658.83 ms/op 1.1148 s/op 0.59
Tree 40 250000 get(125000) 268.37 ns/op 339.30 ns/op 0.79
Tree 40 250000 set(125000) 2.1931 us/op 3.7037 us/op 0.59
Tree 40 250000 toArray() 25.772 ms/op 36.401 ms/op 0.71
Tree 40 250000 iterate all - toArray() + loop 26.587 ms/op 38.208 ms/op 0.70
Tree 40 250000 iterate all - get(i) 107.06 ms/op 139.07 ms/op 0.77
MutableVector 250000 create 12.626 ms/op 18.449 ms/op 0.68
MutableVector 250000 get(125000) 10.898 ns/op 14.793 ns/op 0.74
MutableVector 250000 set(125000) 554.21 ns/op 1.0093 us/op 0.55
MutableVector 250000 toArray() 5.6969 ms/op 9.1026 ms/op 0.63
MutableVector 250000 iterate all - toArray() + loop 6.3224 ms/op 7.6148 ms/op 0.83
MutableVector 250000 iterate all - get(i) 2.7197 ms/op 3.5671 ms/op 0.76
Array 250000 create 5.3152 ms/op 7.1128 ms/op 0.75
Array 250000 clone - spread 2.3791 ms/op 3.2954 ms/op 0.72
Array 250000 get(125000) 1.1620 ns/op 1.4700 ns/op 0.79
Array 250000 set(125000) 1.1380 ns/op 1.5060 ns/op 0.76
Array 250000 iterate all - loop 150.94 us/op 146.63 us/op 1.03
effectiveBalanceIncrements clone Uint8Array 300000 34.734 us/op 105.21 us/op 0.33
effectiveBalanceIncrements clone MutableVector 300000 706.00 ns/op 1.0370 us/op 0.68
effectiveBalanceIncrements rw all Uint8Array 300000 248.65 us/op 310.03 us/op 0.80
effectiveBalanceIncrements rw all MutableVector 300000 128.40 ms/op 245.94 ms/op 0.52
phase0 afterProcessEpoch - 250000 vs - 7PWei 186.73 ms/op 198.76 ms/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 59.115 ms/op 78.604 ms/op 0.75
altair processEpoch - mainnet_e81889 533.24 ms/op 677.31 ms/op 0.79
mainnet_e81889 - altair beforeProcessEpoch 105.79 ms/op 191.62 ms/op 0.55
mainnet_e81889 - altair processJustificationAndFinalization 31.266 us/op 66.006 us/op 0.47
mainnet_e81889 - altair processInactivityUpdates 9.3478 ms/op 13.444 ms/op 0.70
mainnet_e81889 - altair processRewardsAndPenalties 75.449 ms/op 107.34 ms/op 0.70
mainnet_e81889 - altair processRegistryUpdates 5.3930 us/op 16.249 us/op 0.33
mainnet_e81889 - altair processSlashings 1.0610 us/op 3.8470 us/op 0.28
mainnet_e81889 - altair processEth1DataReset 1.2170 us/op 4.1370 us/op 0.29
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.0617 ms/op 2.7409 ms/op 0.75
mainnet_e81889 - altair processSlashingsReset 7.5460 us/op 20.596 us/op 0.37
mainnet_e81889 - altair processRandaoMixesReset 8.1480 us/op 24.157 us/op 0.34
mainnet_e81889 - altair processHistoricalRootsUpdate 1.2890 us/op 4.3450 us/op 0.30
mainnet_e81889 - altair processParticipationFlagUpdates 5.9860 us/op 13.834 us/op 0.43
mainnet_e81889 - altair processSyncCommitteeUpdates 1.2620 us/op 3.2440 us/op 0.39
mainnet_e81889 - altair afterProcessEpoch 216.92 ms/op 214.42 ms/op 1.01
phase0 processEpoch - mainnet_e58758 478.43 ms/op 655.95 ms/op 0.73
mainnet_e58758 - phase0 beforeProcessEpoch 171.89 ms/op 323.02 ms/op 0.53
mainnet_e58758 - phase0 processJustificationAndFinalization 35.312 us/op 56.508 us/op 0.62
mainnet_e58758 - phase0 processRewardsAndPenalties 116.73 ms/op 90.012 ms/op 1.30
mainnet_e58758 - phase0 processRegistryUpdates 17.495 us/op 32.621 us/op 0.54
mainnet_e58758 - phase0 processSlashings 1.2740 us/op 3.5380 us/op 0.36
mainnet_e58758 - phase0 processEth1DataReset 1.3470 us/op 3.8230 us/op 0.35
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9387 ms/op 2.1674 ms/op 0.89
mainnet_e58758 - phase0 processSlashingsReset 7.7220 us/op 16.933 us/op 0.46
mainnet_e58758 - phase0 processRandaoMixesReset 9.6260 us/op 24.873 us/op 0.39
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.4860 us/op 4.0910 us/op 0.36
mainnet_e58758 - phase0 processParticipationRecordUpdates 7.2870 us/op 23.440 us/op 0.31
mainnet_e58758 - phase0 afterProcessEpoch 161.68 ms/op 178.63 ms/op 0.91
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.2485 ms/op 2.5436 ms/op 0.88
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5142 ms/op 2.8807 ms/op 0.87
altair processInactivityUpdates - 250000 normalcase 42.687 ms/op 58.913 ms/op 0.72
altair processInactivityUpdates - 250000 worstcase 34.319 ms/op 52.648 ms/op 0.65
phase0 processRegistryUpdates - 250000 normalcase 13.385 us/op 29.230 us/op 0.46
phase0 processRegistryUpdates - 250000 badcase_full_deposits 602.82 us/op 534.14 us/op 1.13
phase0 processRegistryUpdates - 250000 worstcase 0.5 193.12 ms/op 306.05 ms/op 0.63
altair processRewardsAndPenalties - 250000 normalcase 101.46 ms/op 150.68 ms/op 0.67
altair processRewardsAndPenalties - 250000 worstcase 73.048 ms/op 103.75 ms/op 0.70
phase0 getAttestationDeltas - 250000 normalcase 11.822 ms/op 14.988 ms/op 0.79
phase0 getAttestationDeltas - 250000 worstcase 12.061 ms/op 15.204 ms/op 0.79
phase0 processSlashings - 250000 worstcase 5.2458 ms/op 6.7230 ms/op 0.78
altair processSyncCommitteeUpdates - 250000 287.79 ms/op 356.24 ms/op 0.81
BeaconState.hashTreeRoot - No change 577.00 ns/op 755.00 ns/op 0.76
BeaconState.hashTreeRoot - 1 full validator 72.926 us/op 78.774 us/op 0.93
BeaconState.hashTreeRoot - 32 full validator 656.10 us/op 765.19 us/op 0.86
BeaconState.hashTreeRoot - 512 full validator 7.4626 ms/op 8.0122 ms/op 0.93
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 100.11 us/op 101.01 us/op 0.99
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.2392 ms/op 1.4244 ms/op 0.87
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 16.618 ms/op 18.623 ms/op 0.89
BeaconState.hashTreeRoot - 1 balances 68.109 us/op 73.398 us/op 0.93
BeaconState.hashTreeRoot - 32 balances 626.13 us/op 681.55 us/op 0.92
BeaconState.hashTreeRoot - 512 balances 6.2460 ms/op 6.1572 ms/op 1.01
BeaconState.hashTreeRoot - 250000 balances 100.64 ms/op 117.75 ms/op 0.85
aggregationBits - 2048 els - zipIndexesInBitList 28.233 us/op 40.901 us/op 0.69
regular array get 100000 times 60.545 us/op 60.941 us/op 0.99
wrappedArray get 100000 times 60.540 us/op 59.127 us/op 1.02
arrayWithProxy get 100000 times 28.886 ms/op 36.872 ms/op 0.78
ssz.Root.equals 482.00 ns/op 604.00 ns/op 0.80
byteArrayEquals 464.00 ns/op 603.00 ns/op 0.77
shuffle list - 16384 els 11.511 ms/op 12.578 ms/op 0.92
shuffle list - 250000 els 167.72 ms/op 178.11 ms/op 0.94
processSlot - 1 slots 13.573 us/op 18.611 us/op 0.73
processSlot - 32 slots 2.0462 ms/op 2.4800 ms/op 0.83
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 424.28 us/op 567.30 us/op 0.75
getCommitteeAssignments - req 1 vs - 250000 vc 5.4681 ms/op 5.5623 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 8.0292 ms/op 8.2358 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 8.6348 ms/op 8.5726 ms/op 1.01
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 8.0400 ns/op 11.440 ns/op 0.70
state getBlockRootAtSlot - 250000 vs - 7PWei 932.40 ns/op 1.4364 us/op 0.65
computeProposers - vc 250000 16.975 ms/op 21.070 ms/op 0.81
computeEpochShuffling - vc 250000 169.21 ms/op 186.96 ms/op 0.91
getNextSyncCommittee - vc 250000 283.64 ms/op 349.06 ms/op 0.81

by benchmarkbot/action

@dapplion dapplion changed the title Vc to submit SyncCommitteeSignature asap Vc to submit SyncCommitteeSignature on early block Sep 30, 2022
@dapplion dapplion merged commit f1dd76f into unstable Oct 3, 2022
@dapplion dapplion deleted the tuyen/submit_symc_committee_early branch October 3, 2022 06:39
twoeths added a commit that referenced this pull request Oct 19, 2022
Vc to submit SyncCommitteeSignature asap
wemeetagain pushed a commit that referenced this pull request Oct 19, 2022
Vc to submit SyncCommitteeSignature asap
@wemeetagain wemeetagain mentioned this pull request Oct 19, 2022
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.

Missed sync committee
2 participants