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

Upgrade to spec 1.1.6 sans proposer boost #3608

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jan 12, 2022

Motivation
Spec 1.1.6 has following changes pending apart from proposer boost

  • removing difficulty field
  • atomic updated of finalized and justified in forkchoice
    Description

Details

Part of #3483

@codeclimate
Copy link

codeclimate bot commented Jan 12, 2022

Code Climate has analyzed commit 9e505c7 and detected 0 issues on this pull request.

View more on Code Climate.

@codecov
Copy link

codecov bot commented Jan 12, 2022

Codecov Report

Merging #3608 (9e505c7) into master (f0f8f0f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3608   +/-   ##
=======================================
  Coverage   37.50%   37.50%           
=======================================
  Files         311      311           
  Lines        8357     8357           
  Branches     1295     1295           
=======================================
  Hits         3134     3134           
  Misses       5074     5074           
  Partials      149      149           

@@ -157,6 +157,11 @@ export function forkChoiceTest(fork: ForkName): void {
timeout: 10000,
// eslint-disable-next-line @typescript-eslint/no-empty-function
expectFunc: () => {},
shouldSkip: (_testCase, name, _index) => {
const ignoreTestsWithKeywords = ["proposer_boost"];
Copy link
Contributor Author

@g11tech g11tech Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This skip will be removed with the PR:#3540, has been added as part of strategy to update the spec version in easier manageable PRs

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d83ecb0 Previous: f0f8f0f Ratio
BeaconState.hashTreeRoot - No change 541.00 ns/op 558.00 ns/op 0.97
BeaconState.hashTreeRoot - 1 full validator 124.81 us/op 127.58 us/op 0.98
BeaconState.hashTreeRoot - 32 full validator 1.9372 ms/op 1.9627 ms/op 0.99
BeaconState.hashTreeRoot - 512 full validator 25.581 ms/op 26.270 ms/op 0.97
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 127.18 us/op 129.33 us/op 0.98
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0828 ms/op 2.0867 ms/op 1.00
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.445 ms/op 28.661 ms/op 0.99
BeaconState.hashTreeRoot - 1 balances 88.847 us/op 90.610 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 723.63 us/op 771.55 us/op 0.94
BeaconState.hashTreeRoot - 512 balances 7.4111 ms/op 7.6934 ms/op 0.96
BeaconState.hashTreeRoot - 250000 balances 139.66 ms/op 138.91 ms/op 1.01
processSlot - 1 slots 48.440 us/op 50.359 us/op 0.96
processSlot - 32 slots 2.9316 ms/op 2.9362 ms/op 1.00
getCommitteeAssignments - req 1 vs - 250000 vc 5.2913 ms/op 5.2354 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 7.3766 ms/op 7.2746 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 7.8589 ms/op 7.7958 ms/op 1.01
computeProposers - vc 250000 21.703 ms/op 21.475 ms/op 1.01
computeEpochShuffling - vc 250000 191.83 ms/op 205.85 ms/op 0.93
getNextSyncCommittee - vc 250000 354.63 ms/op 343.79 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 43.303 ms/op 44.829 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei worstcase 46.033 ms/op 55.216 ms/op 0.83
altair processAttestation - setStatus - 1/6 committees join 11.460 ms/op 13.337 ms/op 0.86
altair processAttestation - setStatus - 1/3 committees join 25.348 ms/op 27.689 ms/op 0.92
altair processAttestation - setStatus - 1/2 committees join 38.873 ms/op 41.528 ms/op 0.94
altair processAttestation - setStatus - 2/3 committees join 51.953 ms/op 56.750 ms/op 0.92
altair processAttestation - setStatus - 4/5 committees join 62.065 ms/op 68.362 ms/op 0.91
altair processAttestation - setStatus - 100% committees join 76.385 ms/op 85.626 ms/op 0.89
altair processAttestation - updateEpochParticipants - 1/6 committees join 14.926 ms/op 14.330 ms/op 1.04
altair processAttestation - updateEpochParticipants - 1/3 committees join 26.251 ms/op 29.321 ms/op 0.90
altair processAttestation - updateEpochParticipants - 1/2 committees join 26.459 ms/op 33.449 ms/op 0.79
altair processAttestation - updateEpochParticipants - 2/3 committees join 33.776 ms/op 29.813 ms/op 1.13
altair processAttestation - updateEpochParticipants - 4/5 committees join 29.914 ms/op 31.627 ms/op 0.95
altair processAttestation - updateEpochParticipants - 100% committees join 31.059 ms/op 32.873 ms/op 0.94
altair processAttestation - updateAllStatus 22.047 ms/op 27.529 ms/op 0.80
altair processBlock - 250000 vs - 7PWei normalcase 48.035 ms/op 46.005 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase 121.19 ms/op 120.41 ms/op 1.01
altair processEpoch - mainnet_e81889 1.0556 s/op 1.0351 s/op 1.02
mainnet_e81889 - altair beforeProcessEpoch 288.17 ms/op 287.22 ms/op 1.00
mainnet_e81889 - altair processJustificationAndFinalization 67.777 us/op 56.596 us/op 1.20
mainnet_e81889 - altair processInactivityUpdates 18.367 ms/op 18.354 ms/op 1.00
mainnet_e81889 - altair processRewardsAndPenalties 149.10 ms/op 147.34 ms/op 1.01
mainnet_e81889 - altair processRegistryUpdates 5.7870 us/op 5.7310 us/op 1.01
mainnet_e81889 - altair processSlashings 1.3830 us/op 1.1310 us/op 1.22
mainnet_e81889 - altair processEth1DataReset 1.1190 us/op 1.1170 us/op 1.00
mainnet_e81889 - altair processEffectiveBalanceUpdates 11.278 ms/op 11.302 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 8.5700 us/op 9.1210 us/op 0.94
mainnet_e81889 - altair processRandaoMixesReset 12.483 us/op 12.517 us/op 1.00
mainnet_e81889 - altair processHistoricalRootsUpdate 1.9450 us/op 1.3870 us/op 1.40
mainnet_e81889 - altair processParticipationFlagUpdates 166.11 ms/op 161.95 ms/op 1.03
mainnet_e81889 - altair processSyncCommitteeUpdates 1.3040 us/op 963.00 ns/op 1.35
mainnet_e81889 - altair afterProcessEpoch 224.70 ms/op 220.92 ms/op 1.02
altair processInactivityUpdates - 250000 normalcase 74.728 ms/op 73.796 ms/op 1.01
altair processInactivityUpdates - 250000 worstcase 75.392 ms/op 74.193 ms/op 1.02
altair processParticipationFlagUpdates - 250000 anycase 93.465 ms/op 93.417 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 135.79 ms/op 134.22 ms/op 1.01
altair processRewardsAndPenalties - 250000 worstcase 145.89 ms/op 148.28 ms/op 0.98
altair processSyncCommitteeUpdates - 250000 375.32 ms/op 365.93 ms/op 1.03
Tree 40 250000 create 794.88 ms/op 877.70 ms/op 0.91
Tree 40 250000 get(125000) 329.83 ns/op 325.43 ns/op 1.01
Tree 40 250000 set(125000) 2.5162 us/op 2.0042 us/op 1.26
Tree 40 250000 toArray() 49.197 ms/op 47.090 ms/op 1.04
Tree 40 250000 iterate all - toArray() + loop 40.775 ms/op 39.969 ms/op 1.02
Tree 40 250000 iterate all - get(i) 120.62 ms/op 119.51 ms/op 1.01
MutableVector 250000 create 27.160 ms/op 26.552 ms/op 1.02
MutableVector 250000 get(125000) 13.781 ns/op 13.720 ns/op 1.00
MutableVector 250000 set(125000) 554.69 ns/op 619.78 ns/op 0.89
MutableVector 250000 toArray() 8.9832 ms/op 9.3127 ms/op 0.96
MutableVector 250000 iterate all - toArray() + loop 9.2905 ms/op 9.3423 ms/op 0.99
MutableVector 250000 iterate all - get(i) 3.4550 ms/op 3.1204 ms/op 1.11
Array 250000 create 5.4972 ms/op 5.9157 ms/op 0.93
Array 250000 clone - spread 2.3480 ms/op 2.3918 ms/op 0.98
Array 250000 get(125000) 1.0990 ns/op 1.1210 ns/op 0.98
Array 250000 set(125000) 1.0950 ns/op 1.1180 ns/op 0.98
Array 250000 iterate all - loop 167.81 us/op 170.38 us/op 0.98
aggregationBits - 2048 els - readonlyValues 243.10 us/op 247.84 us/op 0.98
aggregationBits - 2048 els - zipIndexesInBitList 45.239 us/op 44.860 us/op 1.01
regular array get 100000 times 67.407 us/op 67.413 us/op 1.00
wrappedArray get 100000 times 67.430 us/op 67.466 us/op 1.00
arrayWithProxy get 100000 times 28.770 ms/op 28.807 ms/op 1.00
ssz.Root.equals 1.1620 us/op 1.2460 us/op 0.93
ssz.Root.equals with valueOf() 1.4140 us/op 1.4960 us/op 0.95
byteArrayEquals with valueOf() 1.3920 us/op 1.4530 us/op 0.96
phase0 processBlock - 250000 vs - 7PWei normalcase 10.699 ms/op 10.998 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei worstcase 78.895 ms/op 79.354 ms/op 0.99
phase0 afterProcessEpoch - 250000 vs - 7PWei 211.60 ms/op 206.77 ms/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 595.03 ms/op 608.79 ms/op 0.98
phase0 processEpoch - mainnet_e58758 873.12 ms/op 804.99 ms/op 1.08
mainnet_e58758 - phase0 beforeProcessEpoch 430.99 ms/op 443.05 ms/op 0.97
mainnet_e58758 - phase0 processJustificationAndFinalization 48.191 us/op 66.565 us/op 0.72
mainnet_e58758 - phase0 processRewardsAndPenalties 103.26 ms/op 100.39 ms/op 1.03
mainnet_e58758 - phase0 processRegistryUpdates 36.570 us/op 36.331 us/op 1.01
mainnet_e58758 - phase0 processSlashings 1.3680 us/op 1.2420 us/op 1.10
mainnet_e58758 - phase0 processEth1DataReset 1.2150 us/op 1.1510 us/op 1.06
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 9.0373 ms/op 8.8189 ms/op 1.02
mainnet_e58758 - phase0 processSlashingsReset 8.3470 us/op 8.1170 us/op 1.03
mainnet_e58758 - phase0 processRandaoMixesReset 11.614 us/op 11.755 us/op 0.99
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.5110 us/op 1.3140 us/op 1.15
mainnet_e58758 - phase0 processParticipationRecordUpdates 10.562 us/op 8.9500 us/op 1.18
mainnet_e58758 - phase0 afterProcessEpoch 185.38 ms/op 180.74 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 11.138 ms/op 10.602 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.2107 s/op 1.4277 s/op 0.85
phase0 processRegistryUpdates - 250000 normalcase 40.078 us/op 39.193 us/op 1.02
phase0 processRegistryUpdates - 250000 badcase_full_deposits 3.0895 ms/op 3.0164 ms/op 1.02
phase0 processRegistryUpdates - 250000 worstcase 0.5 1.6301 s/op 1.8122 s/op 0.90
phase0 getAttestationDeltas - 250000 normalcase 36.148 ms/op 35.271 ms/op 1.02
phase0 getAttestationDeltas - 250000 worstcase 44.799 ms/op 45.487 ms/op 0.98
phase0 processSlashings - 250000 worstcase 36.782 ms/op 37.381 ms/op 0.98
shuffle list - 16384 els 12.918 ms/op 12.594 ms/op 1.03
shuffle list - 250000 els 185.86 ms/op 181.54 ms/op 1.02
getEffectiveBalances - 250000 vs - 7PWei 10.414 ms/op 10.741 ms/op 0.97
computeDeltas 3.8155 ms/op 3.8619 ms/op 0.99
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.2545 ms/op 2.4828 ms/op 0.91
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 677.98 us/op 644.53 us/op 1.05
BLS verify - blst-native 1.8515 ms/op 1.8532 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 3.8041 ms/op 3.8052 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 8.2096 ms/op 8.2081 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 29.792 ms/op 29.813 ms/op 1.00
BLS aggregatePubkeys 32 - blst-native 39.251 us/op 39.173 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 153.44 us/op 153.12 us/op 1.00
getAttestationsForBlock 82.047 ms/op 81.047 ms/op 1.01
CheckpointStateCache - add get delete 15.378 us/op 15.364 us/op 1.00
validate gossip signedAggregateAndProof - struct 4.5109 ms/op 4.4647 ms/op 1.01
validate gossip signedAggregateAndProof - treeBacked 4.4112 ms/op 4.4287 ms/op 1.00
validate gossip attestation - struct 2.0870 ms/op 2.0952 ms/op 1.00
validate gossip attestation - treeBacked 2.1223 ms/op 2.1077 ms/op 1.01
bytes32 toHexString 1.7190 us/op 1.6990 us/op 1.01
bytes32 Buffer.toString(hex) 657.00 ns/op 702.00 ns/op 0.94
bytes32 Buffer.toString(hex) from Uint8Array 935.00 ns/op 885.00 ns/op 1.06
bytes32 Buffer.toString(hex) + 0x 659.00 ns/op 701.00 ns/op 0.94
Object access 1 prop 0.33300 ns/op 0.34100 ns/op 0.98
Map access 1 prop 0.28200 ns/op 0.28800 ns/op 0.98
Object get x1000 17.621 ns/op 17.375 ns/op 1.01
Map get x1000 0.97800 ns/op 0.96400 ns/op 1.01
Object set x1000 109.70 ns/op 109.35 ns/op 1.00
Map set x1000 65.784 ns/op 68.115 ns/op 0.97
Return object 10000 times 0.36570 ns/op 0.37640 ns/op 0.97
Throw Error 10000 times 5.9147 us/op 5.9004 us/op 1.00
enrSubnets - fastDeserialize 64 bits 1.3140 us/op 1.2920 us/op 1.02
enrSubnets - ssz BitVector 64 bits 16.425 us/op 16.383 us/op 1.00
enrSubnets - fastDeserialize 4 bits 440.00 ns/op 457.00 ns/op 0.96
enrSubnets - ssz BitVector 4 bits 2.9080 us/op 2.8740 us/op 1.01
RateTracker 1000000 limit, 1 obj count per request 177.09 ns/op 181.44 ns/op 0.98
RateTracker 1000000 limit, 2 obj count per request 133.50 ns/op 136.10 ns/op 0.98
RateTracker 1000000 limit, 4 obj count per request 108.35 ns/op 113.09 ns/op 0.96
RateTracker 1000000 limit, 8 obj count per request 101.08 ns/op 101.63 ns/op 0.99
RateTracker with prune 3.7960 us/op 4.0420 us/op 0.94

by benchmarkbot/action

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wemeetagain wemeetagain merged commit e6ccab3 into master Jan 12, 2022
@wemeetagain wemeetagain deleted the g11tech/spec-1.1.6-sanspboost branch January 12, 2022 16:24
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.

None yet

3 participants