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

Add merge fork types #3090

Merged
merged 6 commits into from
Sep 14, 2021
Merged

Add merge fork types #3090

merged 6 commits into from
Sep 14, 2021

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Sep 6, 2021

Motivation

Part of #3076

Requires ChainSafe/ssz#185

Description

  • Add merge fork types
  • Run ssz_static spec tests

Closes #3093

@codeclimate
Copy link

codeclimate bot commented Sep 6, 2021

Code Climate has analyzed commit c75b325 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

View more on Code Climate.

@dapplion dapplion force-pushed the dapplion/merge-types branch from f7e2ce7 to 6a97d19 Compare September 14, 2021 20:00
@github-actions github-actions bot added mod1-beaconchain scope-networking All issues related to networking, gossip, and libp2p. labels Sep 14, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 14, 2021

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 4f82e12 Previous: c65dc37 Ratio
BeaconState.hashTreeRoot - No change 696.00 ns/op 878.00 ns/op 0.79
BeaconState.hashTreeRoot - 1 full validator 72.830 us/op 115.97 us/op 0.63
BeaconState.hashTreeRoot - 32 full validator 1.1609 ms/op 1.5439 ms/op 0.75
BeaconState.hashTreeRoot - 512 full validator 15.129 ms/op 17.881 ms/op 0.85
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 72.294 us/op 101.40 us/op 0.71
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.0736 ms/op 1.3509 ms/op 0.79
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.348 ms/op 22.040 ms/op 0.79
BeaconState.hashTreeRoot - 1 balances 56.801 us/op 75.190 us/op 0.76
BeaconState.hashTreeRoot - 32 balances 495.77 us/op 647.30 us/op 0.77
BeaconState.hashTreeRoot - 512 balances 4.9198 ms/op 6.1787 ms/op 0.80
BeaconState.hashTreeRoot - 250000 balances 89.235 ms/op 125.55 ms/op 0.71
processSlot - 1 slots 41.025 us/op 64.799 us/op 0.63
processSlot - 32 slots 2.2514 ms/op 2.7669 ms/op 0.81
getCommitteeAssignments - req 1 vs - 250000 vc 5.1947 ms/op 5.4811 ms/op 0.95
getCommitteeAssignments - req 100 vs - 250000 vc 7.1855 ms/op 8.1511 ms/op 0.88
getCommitteeAssignments - req 1000 vs - 250000 vc 7.7067 ms/op 8.6921 ms/op 0.89
computeProposers - vc 250000 21.361 ms/op 28.339 ms/op 0.75
computeEpochShuffling - vc 250000 182.30 ms/op 199.66 ms/op 0.91
getNextSyncCommittee - vc 250000 331.18 ms/op 469.65 ms/op 0.71
altair processBlock - 250000 vs - 7PWei normalcase 80.919 ms/op 98.802 ms/op 0.82
altair processBlock - 250000 vs - 7PWei worstcase 211.52 ms/op 270.92 ms/op 0.78
altair processEpoch - pyrmont_e62330 495.87 ms/op 598.03 ms/op 0.83
pyrmont_e62330 - altair beforeProcessEpoch 141.42 ms/op 176.55 ms/op 0.80
pyrmont_e62330 - altair processJustificationAndFinalization 80.993 us/op 129.00 us/op 0.63
pyrmont_e62330 - altair processInactivityUpdates 68.125 ms/op 74.583 ms/op 0.91
pyrmont_e62330 - altair processRewardsAndPenalties 57.396 ms/op 65.789 ms/op 0.87
pyrmont_e62330 - altair processRegistryUpdates 8.1220 us/op 28.019 us/op 0.29
pyrmont_e62330 - altair processSlashings 1.8420 us/op 7.1830 us/op 0.26
pyrmont_e62330 - altair processEth1DataReset 1.2590 us/op 5.9800 us/op 0.21
pyrmont_e62330 - altair processEffectiveBalanceUpdates 5.7686 ms/op 6.8572 ms/op 0.84
pyrmont_e62330 - altair processSlashingsReset 9.3360 us/op 34.997 us/op 0.27
pyrmont_e62330 - altair processRandaoMixesReset 15.916 us/op 47.289 us/op 0.34
pyrmont_e62330 - altair processHistoricalRootsUpdate 1.7270 us/op 7.2610 us/op 0.24
pyrmont_e62330 - altair processParticipationFlagUpdates 44.177 ms/op 49.459 ms/op 0.89
pyrmont_e62330 - altair processSyncCommitteeUpdates 1.4670 us/op 5.1480 us/op 0.28
pyrmont_e62330 - altair afterProcessEpoch 112.33 ms/op 136.71 ms/op 0.82
altair processInactivityUpdates - 250000 normalcase 191.52 ms/op 239.21 ms/op 0.80
altair processInactivityUpdates - 250000 worstcase 185.72 ms/op 225.38 ms/op 0.82
altair processParticipationFlagUpdates - 250000 anycase 84.126 ms/op 104.35 ms/op 0.81
altair processRewardsAndPenalties - 250000 normalcase 114.76 ms/op 117.67 ms/op 0.98
altair processRewardsAndPenalties - 250000 worstcase 123.65 ms/op 142.42 ms/op 0.87
altair processSyncCommitteeUpdates - 250000 349.23 ms/op 491.41 ms/op 0.71
Tree 40 250000 create 492.08 ms/op 647.40 ms/op 0.76
Tree 40 250000 get(125000) 272.56 ns/op 279.60 ns/op 0.97
Tree 40 250000 set(125000) 1.6618 us/op 1.8460 us/op 0.90
Tree 40 250000 toArray() 40.571 ms/op 44.637 ms/op 0.91
Tree 40 250000 iterate all - toArray() + loop 40.543 ms/op 45.493 ms/op 0.89
Tree 40 250000 iterate all - get(i) 105.84 ms/op 125.34 ms/op 0.84
MutableVector 250000 create 22.860 ms/op 26.501 ms/op 0.86
MutableVector 250000 get(125000) 11.477 ns/op 16.234 ns/op 0.71
MutableVector 250000 set(125000) 544.60 ns/op 830.14 ns/op 0.66
MutableVector 250000 toArray() 7.2727 ms/op 10.047 ms/op 0.72
MutableVector 250000 iterate all - toArray() + loop 7.8297 ms/op 8.9919 ms/op 0.87
MutableVector 250000 iterate all - get(i) 3.2326 ms/op 4.2426 ms/op 0.76
Array 250000 create 5.3241 ms/op 6.1652 ms/op 0.86
Array 250000 clone - spread 1.8641 ms/op 2.1745 ms/op 0.86
Array 250000 get(125000) 1.1120 ns/op 0.99500 ns/op 1.12
Array 250000 set(125000) 1.1020 ns/op 0.97100 ns/op 1.13
Array 250000 iterate all - loop 167.84 us/op 150.51 us/op 1.12
aggregationBits - 2048 els - readonlyValues 238.21 us/op 262.85 us/op 0.91
aggregationBits - 2048 els - zipIndexesInBitList 42.443 us/op 45.643 us/op 0.93
ssz.Root.equals 1.3260 us/op 1.7030 us/op 0.78
ssz.Root.equals with valueOf() 1.5150 us/op 1.6580 us/op 0.91
byteArrayEquals with valueOf() 1.4610 us/op 1.6710 us/op 0.87
phase0 processBlock - 250000 vs - 7PWei normalcase 11.861 ms/op 16.869 ms/op 0.70
phase0 processBlock - 250000 vs - 7PWei worstcase 70.969 ms/op 104.55 ms/op 0.68
phase0 afterProcessEpoch - 250000 vs - 7PWei 198.96 ms/op 223.33 ms/op 0.89
phase0 beforeProcessEpoch - 250000 vs - 7PWei 569.22 ms/op 796.63 ms/op 0.71
phase0 processEpoch - mainnet_e58758 780.13 ms/op 987.59 ms/op 0.79
mainnet_e58758 - phase0 beforeProcessEpoch 494.77 ms/op 641.18 ms/op 0.77
mainnet_e58758 - phase0 processJustificationAndFinalization 57.762 us/op 125.40 us/op 0.46
mainnet_e58758 - phase0 processRewardsAndPenalties 81.286 ms/op 94.700 ms/op 0.86
mainnet_e58758 - phase0 processRegistryUpdates 38.716 us/op 92.863 us/op 0.42
mainnet_e58758 - phase0 processSlashings 1.5320 us/op 6.9450 us/op 0.22
mainnet_e58758 - phase0 processEth1DataReset 1.1900 us/op 6.0370 us/op 0.20
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 8.7459 ms/op 11.474 ms/op 0.76
mainnet_e58758 - phase0 processSlashingsReset 10.483 us/op 31.702 us/op 0.33
mainnet_e58758 - phase0 processRandaoMixesReset 19.981 us/op 46.262 us/op 0.43
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.7370 us/op 7.5000 us/op 0.23
mainnet_e58758 - phase0 processParticipationRecordUpdates 11.481 us/op 28.674 us/op 0.40
mainnet_e58758 - phase0 afterProcessEpoch 178.87 ms/op 213.51 ms/op 0.84
phase0 processEffectiveBalanceUpdates - 250000 normalcase 9.2351 ms/op 13.461 ms/op 0.69
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.2363 s/op 1.7489 s/op 0.71
phase0 processRegistryUpdates - 250000 normalcase 46.484 us/op 99.988 us/op 0.46
phase0 processRegistryUpdates - 250000 badcase_full_deposits 3.4753 ms/op 4.7898 ms/op 0.73
phase0 processRegistryUpdates - 250000 worstcase 0.5 1.6642 s/op 2.3755 s/op 0.70
phase0 getAttestationDeltas - 250000 normalcase 36.206 ms/op 38.651 ms/op 0.94
phase0 getAttestationDeltas - 250000 worstcase 36.374 ms/op 38.067 ms/op 0.96
phase0 processSlashings - 250000 worstcase 34.503 ms/op 46.863 ms/op 0.74
shuffle list - 16384 els 11.633 ms/op 14.961 ms/op 0.78
shuffle list - 250000 els 166.39 ms/op 200.65 ms/op 0.83
getEffectiveBalances - 250000 vs - 7PWei 9.7258 ms/op 12.353 ms/op 0.79
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.1495 ms/op 2.8945 ms/op 0.74
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 918.91 us/op 1.2613 ms/op 0.73
BLS verify - blst-native 1.6392 ms/op 2.2364 ms/op 0.73
BLS verifyMultipleSignatures 3 - blst-native 3.3600 ms/op 4.4136 ms/op 0.76
BLS verifyMultipleSignatures 8 - blst-native 7.2476 ms/op 9.3837 ms/op 0.77
BLS verifyMultipleSignatures 32 - blst-native 26.273 ms/op 34.693 ms/op 0.76
BLS aggregatePubkeys 32 - blst-native 35.755 us/op 47.872 us/op 0.75
BLS aggregatePubkeys 128 - blst-native 137.67 us/op 200.87 us/op 0.69
getAttestationsForBlock 77.343 ms/op 89.489 ms/op 0.86
CheckpointStateCache - add get delete 14.796 us/op 19.194 us/op 0.77
validate gossip signedAggregateAndProof - struct 4.4799 ms/op 5.5582 ms/op 0.81
validate gossip signedAggregateAndProof - treeBacked 4.4587 ms/op 5.8896 ms/op 0.76
validate gossip attestation - struct 2.0797 ms/op 2.7010 ms/op 0.77
validate gossip attestation - treeBacked 2.1024 ms/op 2.6189 ms/op 0.80

by benchmarkbot/action

@dapplion dapplion marked this pull request as ready for review September 14, 2021 20:16
@codecov
Copy link

codecov bot commented Sep 14, 2021

Codecov Report

Merging #3090 (c75b325) into master (796e56d) will decrease coverage by 0.47%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3090      +/-   ##
==========================================
- Coverage   58.78%   58.31%   -0.48%     
==========================================
  Files         374      374              
  Lines        9091     9509     +418     
  Branches     1348     1489     +141     
==========================================
+ Hits         5344     5545     +201     
- Misses       3365     3581     +216     
- Partials      382      383       +1     

wemeetagain
wemeetagain previously approved these changes Sep 14, 2021
@dapplion dapplion merged commit 54b95c2 into master Sep 14, 2021
@dapplion dapplion deleted the dapplion/merge-types branch September 14, 2021 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-networking All issues related to networking, gossip, and libp2p.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement merge types
3 participants