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

Revert Offset sync period by ALTAIR_FORK_EPOCH #3477 #3614

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

dapplion
Copy link
Contributor

Motivation

ALTAIR_FORK_EPOCH does not necessarily start on a sync committee period boundary.

Closes #3494

Description

@codeclimate
Copy link

codeclimate bot commented Jan 13, 2022

Code Climate has analyzed commit ca682ca and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

View more on Code Climate.

@dapplion dapplion force-pushed the dapplion/revert-sync-period-offset branch from 37349e0 to 458278d Compare January 13, 2022 07:30
@wemeetagain
Copy link
Member

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 7b1fc58 Previous: b384249 Ratio
BeaconState.hashTreeRoot - No change 637.00 ns/op 538.00 ns/op 1.18
BeaconState.hashTreeRoot - 1 full validator 143.82 us/op 116.68 us/op 1.23
BeaconState.hashTreeRoot - 32 full validator 2.2813 ms/op 1.9430 ms/op 1.17
BeaconState.hashTreeRoot - 512 full validator 27.485 ms/op 25.937 ms/op 1.06
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 146.70 us/op 122.16 us/op 1.20
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.3439 ms/op 2.0456 ms/op 1.15
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.563 ms/op 26.216 ms/op 1.24
BeaconState.hashTreeRoot - 1 balances 98.861 us/op 86.979 us/op 1.14
BeaconState.hashTreeRoot - 32 balances 851.11 us/op 768.36 us/op 1.11
BeaconState.hashTreeRoot - 512 balances 8.6024 ms/op 7.4022 ms/op 1.16
BeaconState.hashTreeRoot - 250000 balances 150.62 ms/op 131.04 ms/op 1.15
processSlot - 1 slots 64.853 us/op 58.536 us/op 1.11
processSlot - 32 slots 3.4271 ms/op 2.8403 ms/op 1.21
getCommitteeAssignments - req 1 vs - 250000 vc 5.8633 ms/op 5.3308 ms/op 1.10
getCommitteeAssignments - req 100 vs - 250000 vc 8.1272 ms/op 7.4284 ms/op 1.09
getCommitteeAssignments - req 1000 vs - 250000 vc 8.9193 ms/op 7.9342 ms/op 1.12
computeProposers - vc 250000 24.209 ms/op 20.952 ms/op 1.16
computeEpochShuffling - vc 250000 206.53 ms/op 187.99 ms/op 1.10
getNextSyncCommittee - vc 250000 381.87 ms/op 342.88 ms/op 1.11
altair processAttestation - 250000 vs - 7PWei normalcase 47.800 ms/op 40.947 ms/op 1.17
altair processAttestation - 250000 vs - 7PWei worstcase 49.072 ms/op 44.958 ms/op 1.09
altair processAttestation - setStatus - 1/6 committees join 12.677 ms/op 12.881 ms/op 0.98
altair processAttestation - setStatus - 1/3 committees join 28.753 ms/op 23.268 ms/op 1.24
altair processAttestation - setStatus - 1/2 committees join 41.605 ms/op 37.280 ms/op 1.12
altair processAttestation - setStatus - 2/3 committees join 52.606 ms/op 51.892 ms/op 1.01
altair processAttestation - setStatus - 4/5 committees join 61.841 ms/op 54.386 ms/op 1.14
altair processAttestation - setStatus - 100% committees join 70.119 ms/op 69.204 ms/op 1.01
altair processAttestation - updateEpochParticipants - 1/6 committees join 12.461 ms/op 12.762 ms/op 0.98
altair processAttestation - updateEpochParticipants - 1/3 committees join 24.091 ms/op 25.137 ms/op 0.96
altair processAttestation - updateEpochParticipants - 1/2 committees join 34.482 ms/op 31.327 ms/op 1.10
altair processAttestation - updateEpochParticipants - 2/3 committees join 29.143 ms/op 28.982 ms/op 1.01
altair processAttestation - updateEpochParticipants - 4/5 committees join 32.336 ms/op 28.957 ms/op 1.12
altair processAttestation - updateEpochParticipants - 100% committees join 33.579 ms/op 30.989 ms/op 1.08
altair processAttestation - updateAllStatus 28.611 ms/op 25.807 ms/op 1.11
altair processBlock - 250000 vs - 7PWei normalcase 49.511 ms/op 43.650 ms/op 1.13
altair processBlock - 250000 vs - 7PWei worstcase 130.24 ms/op 112.36 ms/op 1.16
altair processEpoch - mainnet_e81889 1.1134 s/op 1.0292 s/op 1.08
mainnet_e81889 - altair beforeProcessEpoch 379.34 ms/op 337.54 ms/op 1.12
mainnet_e81889 - altair processJustificationAndFinalization 74.409 us/op 75.550 us/op 0.98
mainnet_e81889 - altair processInactivityUpdates 19.392 ms/op 17.926 ms/op 1.08
mainnet_e81889 - altair processRewardsAndPenalties 159.79 ms/op 145.58 ms/op 1.10
mainnet_e81889 - altair processRegistryUpdates 12.098 us/op 7.4430 us/op 1.63
mainnet_e81889 - altair processSlashings 5.0110 us/op 2.5360 us/op 1.98
mainnet_e81889 - altair processEth1DataReset 3.3980 us/op 2.3770 us/op 1.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 13.594 ms/op 11.283 ms/op 1.20
mainnet_e81889 - altair processSlashingsReset 16.240 us/op 13.732 us/op 1.18
mainnet_e81889 - altair processRandaoMixesReset 18.966 us/op 16.475 us/op 1.15
mainnet_e81889 - altair processHistoricalRootsUpdate 3.8750 us/op 2.5900 us/op 1.50
mainnet_e81889 - altair processParticipationFlagUpdates 110.91 ms/op 108.01 ms/op 1.03
mainnet_e81889 - altair processSyncCommitteeUpdates 2.5740 us/op 2.0640 us/op 1.25
mainnet_e81889 - altair afterProcessEpoch 247.49 ms/op 222.58 ms/op 1.11
altair processInactivityUpdates - 250000 normalcase 69.816 ms/op 76.717 ms/op 0.91
altair processInactivityUpdates - 250000 worstcase 80.649 ms/op 76.961 ms/op 1.05
altair processParticipationFlagUpdates - 250000 anycase 99.948 ms/op 106.42 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 145.65 ms/op 151.22 ms/op 0.96
altair processRewardsAndPenalties - 250000 worstcase 143.59 ms/op 148.61 ms/op 0.97
altair processSyncCommitteeUpdates - 250000 405.27 ms/op 367.91 ms/op 1.10
Tree 40 250000 create 871.32 ms/op 840.36 ms/op 1.04
Tree 40 250000 get(125000) 357.38 ns/op 330.80 ns/op 1.08
Tree 40 250000 set(125000) 1.8497 us/op 1.8991 us/op 0.97
Tree 40 250000 toArray() 40.360 ms/op 44.133 ms/op 0.91
Tree 40 250000 iterate all - toArray() + loop 46.588 ms/op 37.653 ms/op 1.24
Tree 40 250000 iterate all - get(i) 133.33 ms/op 118.24 ms/op 1.13
MutableVector 250000 create 23.123 ms/op 24.701 ms/op 0.94
MutableVector 250000 get(125000) 14.944 ns/op 14.187 ns/op 1.05
MutableVector 250000 set(125000) 502.62 ns/op 563.16 ns/op 0.89
MutableVector 250000 toArray() 9.5425 ms/op 9.2721 ms/op 1.03
MutableVector 250000 iterate all - toArray() + loop 9.6411 ms/op 9.3202 ms/op 1.03
MutableVector 250000 iterate all - get(i) 3.8637 ms/op 3.1293 ms/op 1.23
Array 250000 create 6.1480 ms/op 5.6058 ms/op 1.10
Array 250000 clone - spread 2.1591 ms/op 2.5288 ms/op 0.85
Array 250000 get(125000) 1.0400 ns/op 1.1300 ns/op 0.92
Array 250000 set(125000) 1.0270 ns/op 1.1230 ns/op 0.91
Array 250000 iterate all - loop 186.14 us/op 169.07 us/op 1.10
aggregationBits - 2048 els - readonlyValues 241.90 us/op 254.06 us/op 0.95
aggregationBits - 2048 els - zipIndexesInBitList 49.691 us/op 43.851 us/op 1.13
regular array get 100000 times 75.585 us/op 67.420 us/op 1.12
wrappedArray get 100000 times 75.256 us/op 67.463 us/op 1.12
arrayWithProxy get 100000 times 37.985 ms/op 28.727 ms/op 1.32
ssz.Root.equals 1.3870 us/op 1.1890 us/op 1.17
ssz.Root.equals with valueOf() 1.4630 us/op 1.5040 us/op 0.97
byteArrayEquals with valueOf() 1.4220 us/op 1.4170 us/op 1.00
phase0 processBlock - 250000 vs - 7PWei normalcase 11.375 ms/op 10.528 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei worstcase 82.324 ms/op 77.711 ms/op 1.06
phase0 afterProcessEpoch - 250000 vs - 7PWei 235.66 ms/op 210.68 ms/op 1.12
phase0 beforeProcessEpoch - 250000 vs - 7PWei 572.58 ms/op 562.04 ms/op 1.02
phase0 processEpoch - mainnet_e58758 916.33 ms/op 761.62 ms/op 1.20
mainnet_e58758 - phase0 beforeProcessEpoch 483.69 ms/op 414.33 ms/op 1.17
mainnet_e58758 - phase0 processJustificationAndFinalization 60.172 us/op 71.533 us/op 0.84
mainnet_e58758 - phase0 processRewardsAndPenalties 136.52 ms/op 101.64 ms/op 1.34
mainnet_e58758 - phase0 processRegistryUpdates 54.168 us/op 41.200 us/op 1.31
mainnet_e58758 - phase0 processSlashings 3.7770 us/op 2.4220 us/op 1.56
mainnet_e58758 - phase0 processEth1DataReset 2.8940 us/op 2.3280 us/op 1.24
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 10.361 ms/op 9.1174 ms/op 1.14
mainnet_e58758 - phase0 processSlashingsReset 12.954 us/op 11.686 us/op 1.11
mainnet_e58758 - phase0 processRandaoMixesReset 18.374 us/op 17.039 us/op 1.08
mainnet_e58758 - phase0 processHistoricalRootsUpdate 4.1790 us/op 2.6160 us/op 1.60
mainnet_e58758 - phase0 processParticipationRecordUpdates 17.579 us/op 11.892 us/op 1.48
mainnet_e58758 - phase0 afterProcessEpoch 200.64 ms/op 182.54 ms/op 1.10
phase0 processEffectiveBalanceUpdates - 250000 normalcase 11.410 ms/op 10.244 ms/op 1.11
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.3547 s/op 1.3345 s/op 1.02
phase0 processRegistryUpdates - 250000 normalcase 41.273 us/op 46.779 us/op 0.88
phase0 processRegistryUpdates - 250000 badcase_full_deposits 3.1474 ms/op 2.8874 ms/op 1.09
phase0 processRegistryUpdates - 250000 worstcase 0.5 1.8896 s/op 1.7112 s/op 1.10
phase0 getAttestationDeltas - 250000 normalcase 39.320 ms/op 31.712 ms/op 1.24
phase0 getAttestationDeltas - 250000 worstcase 36.158 ms/op 36.164 ms/op 1.00
phase0 processSlashings - 250000 worstcase 36.801 ms/op 34.554 ms/op 1.07
shuffle list - 16384 els 14.767 ms/op 12.767 ms/op 1.16
shuffle list - 250000 els 205.09 ms/op 185.23 ms/op 1.11
getEffectiveBalances - 250000 vs - 7PWei 10.532 ms/op 11.828 ms/op 0.89
computeDeltas 3.9418 ms/op 3.6852 ms/op 1.07
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.2127 ms/op 2.3846 ms/op 0.93
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 709.33 us/op 739.08 us/op 0.96
BLS verify - blst-native 2.0055 ms/op 1.8574 ms/op 1.08
BLS verifyMultipleSignatures 3 - blst-native 4.3561 ms/op 3.8165 ms/op 1.14
BLS verifyMultipleSignatures 8 - blst-native 8.7677 ms/op 8.2461 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst-native 33.807 ms/op 29.937 ms/op 1.13
BLS aggregatePubkeys 32 - blst-native 42.133 us/op 39.280 us/op 1.07
BLS aggregatePubkeys 128 - blst-native 155.91 us/op 153.94 us/op 1.01
getAttestationsForBlock 84.724 ms/op 84.124 ms/op 1.01
CheckpointStateCache - add get delete 17.582 us/op 15.188 us/op 1.16
validate gossip signedAggregateAndProof - struct 4.9202 ms/op 4.4553 ms/op 1.10
validate gossip signedAggregateAndProof - treeBacked 4.7234 ms/op 4.4862 ms/op 1.05
validate gossip attestation - struct 2.3034 ms/op 2.0875 ms/op 1.10
validate gossip attestation - treeBacked 2.3389 ms/op 2.1128 ms/op 1.11
bytes32 toHexString 1.8340 us/op 1.8250 us/op 1.00
bytes32 Buffer.toString(hex) 759.00 ns/op 676.00 ns/op 1.12
bytes32 Buffer.toString(hex) from Uint8Array 968.00 ns/op 869.00 ns/op 1.11
bytes32 Buffer.toString(hex) + 0x 707.00 ns/op 688.00 ns/op 1.03
Object access 1 prop 0.34200 ns/op 0.32500 ns/op 1.05
Map access 1 prop 0.32300 ns/op 0.28400 ns/op 1.14
Object get x1000 19.831 ns/op 17.306 ns/op 1.15
Map get x1000 1.1000 ns/op 0.98700 ns/op 1.11
Object set x1000 129.97 ns/op 111.26 ns/op 1.17
Map set x1000 70.132 ns/op 68.838 ns/op 1.02
Return object 10000 times 0.41870 ns/op 0.37310 ns/op 1.12
Throw Error 10000 times 6.8334 us/op 6.0798 us/op 1.12
enrSubnets - fastDeserialize 64 bits 1.4720 us/op 1.2960 us/op 1.14
enrSubnets - ssz BitVector 64 bits 17.499 us/op 16.385 us/op 1.07
enrSubnets - fastDeserialize 4 bits 490.00 ns/op 448.00 ns/op 1.09
enrSubnets - ssz BitVector 4 bits 3.1270 us/op 2.8250 us/op 1.11
RateTracker 1000000 limit, 1 obj count per request 197.18 ns/op 183.36 ns/op 1.08
RateTracker 1000000 limit, 2 obj count per request 146.44 ns/op 138.05 ns/op 1.06
RateTracker 1000000 limit, 4 obj count per request 125.15 ns/op 115.18 ns/op 1.09
RateTracker 1000000 limit, 8 obj count per request 115.03 ns/op 102.43 ns/op 1.12
RateTracker with prune 4.1340 us/op 4.3630 us/op 0.95

by benchmarkbot/action

@dapplion dapplion force-pushed the dapplion/revert-sync-period-offset branch from 44534d6 to ca682ca Compare January 13, 2022 17:19
@codecov
Copy link

codecov bot commented Jan 13, 2022

Codecov Report

Merging #3614 (ca682ca) into master (b384249) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3614      +/-   ##
==========================================
- Coverage   37.50%   37.47%   -0.03%     
==========================================
  Files         311      311              
  Lines        8357     8354       -3     
  Branches     1295     1295              
==========================================
- Hits         3134     3131       -3     
  Misses       5074     5074              
  Partials      149      149              

@wemeetagain wemeetagain merged commit 0d00e1b into master Jan 14, 2022
@wemeetagain wemeetagain deleted the dapplion/revert-sync-period-offset branch January 14, 2022 06:12
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.

Revert sync period offset
2 participants