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

CL spec 1.1.6: Rename merge transition fields #3606

Merged
merged 2 commits into from
Jan 12, 2022
Merged

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jan 12, 2022

Motivation
As part of CL spec 1.1.6 (ethereum/consensus-specs#2738) , two fields were renamed for better clarity:

  • is_merge_complete -> is_merge_transition_complete
  • is_merge_block -> is_merge_transition_block

This PR implements those renaming in lodestar

@codecov
Copy link

codecov bot commented Jan 12, 2022

Codecov Report

Merging #3606 (00e0de4) into master (e1fb2fa) will not change coverage.
The diff coverage is n/a.

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 650b658 Previous: e1fb2fa Ratio
BeaconState.hashTreeRoot - No change 684.00 ns/op 699.00 ns/op 0.98
BeaconState.hashTreeRoot - 1 full validator 155.76 us/op 176.37 us/op 0.88
BeaconState.hashTreeRoot - 32 full validator 2.4169 ms/op 2.6454 ms/op 0.91
BeaconState.hashTreeRoot - 512 full validator 32.524 ms/op 35.498 ms/op 0.92
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 158.59 us/op 170.40 us/op 0.93
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5558 ms/op 2.6968 ms/op 0.95
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 34.494 ms/op 37.106 ms/op 0.93
BeaconState.hashTreeRoot - 1 balances 104.66 us/op 117.11 us/op 0.89
BeaconState.hashTreeRoot - 32 balances 944.85 us/op 1.0190 ms/op 0.93
BeaconState.hashTreeRoot - 512 balances 9.0248 ms/op 9.0367 ms/op 1.00
BeaconState.hashTreeRoot - 250000 balances 163.69 ms/op 186.17 ms/op 0.88
processSlot - 1 slots 55.851 us/op 72.906 us/op 0.77
processSlot - 32 slots 3.4889 ms/op 3.8086 ms/op 0.92
getCommitteeAssignments - req 1 vs - 250000 vc 6.5850 ms/op 5.6659 ms/op 1.16
getCommitteeAssignments - req 100 vs - 250000 vc 9.1218 ms/op 7.7201 ms/op 1.18
getCommitteeAssignments - req 1000 vs - 250000 vc 9.7718 ms/op 9.2187 ms/op 1.06
computeProposers - vc 250000 26.599 ms/op 27.957 ms/op 0.95
computeEpochShuffling - vc 250000 239.52 ms/op 212.43 ms/op 1.13
getNextSyncCommittee - vc 250000 432.95 ms/op 446.40 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei normalcase 51.707 ms/op 57.138 ms/op 0.90
altair processAttestation - 250000 vs - 7PWei worstcase 55.049 ms/op 56.445 ms/op 0.98
altair processAttestation - setStatus - 1/6 committees join 12.909 ms/op 19.010 ms/op 0.68
altair processAttestation - setStatus - 1/3 committees join 26.445 ms/op 32.976 ms/op 0.80
altair processAttestation - setStatus - 1/2 committees join 39.205 ms/op 49.074 ms/op 0.80
altair processAttestation - setStatus - 2/3 committees join 52.314 ms/op 61.736 ms/op 0.85
altair processAttestation - setStatus - 4/5 committees join 61.576 ms/op 86.483 ms/op 0.71
altair processAttestation - setStatus - 100% committees join 74.824 ms/op 88.749 ms/op 0.84
altair processAttestation - updateEpochParticipants - 1/6 committees join 13.474 ms/op 18.999 ms/op 0.71
altair processAttestation - updateEpochParticipants - 1/3 committees join 28.303 ms/op 29.959 ms/op 0.94
altair processAttestation - updateEpochParticipants - 1/2 committees join 31.335 ms/op 41.188 ms/op 0.76
altair processAttestation - updateEpochParticipants - 2/3 committees join 34.175 ms/op 35.210 ms/op 0.97
altair processAttestation - updateEpochParticipants - 4/5 committees join 42.567 ms/op 36.576 ms/op 1.16
altair processAttestation - updateEpochParticipants - 100% committees join 35.613 ms/op 37.129 ms/op 0.96
altair processAttestation - updateAllStatus 26.003 ms/op 27.250 ms/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 53.872 ms/op 56.636 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase 142.48 ms/op 177.70 ms/op 0.80
altair processEpoch - mainnet_e81889 1.2725 s/op 1.3092 s/op 0.97
mainnet_e81889 - altair beforeProcessEpoch 319.08 ms/op 361.26 ms/op 0.88
mainnet_e81889 - altair processJustificationAndFinalization 79.220 us/op 126.07 us/op 0.63
mainnet_e81889 - altair processInactivityUpdates 22.064 ms/op 26.149 ms/op 0.84
mainnet_e81889 - altair processRewardsAndPenalties 229.70 ms/op 210.22 ms/op 1.09
mainnet_e81889 - altair processRegistryUpdates 9.6500 us/op 21.305 us/op 0.45
mainnet_e81889 - altair processSlashings 3.0620 us/op 5.6600 us/op 0.54
mainnet_e81889 - altair processEth1DataReset 3.3510 us/op 5.9930 us/op 0.56
mainnet_e81889 - altair processEffectiveBalanceUpdates 15.022 ms/op 14.929 ms/op 1.01
mainnet_e81889 - altair processSlashingsReset 18.834 us/op 37.040 us/op 0.51
mainnet_e81889 - altair processRandaoMixesReset 20.467 us/op 43.306 us/op 0.47
mainnet_e81889 - altair processHistoricalRootsUpdate 4.3250 us/op 8.8460 us/op 0.49
mainnet_e81889 - altair processParticipationFlagUpdates 124.08 ms/op 130.49 ms/op 0.95
mainnet_e81889 - altair processSyncCommitteeUpdates 2.6290 us/op 5.5440 us/op 0.47
mainnet_e81889 - altair afterProcessEpoch 312.58 ms/op 256.15 ms/op 1.22
altair processInactivityUpdates - 250000 normalcase 88.593 ms/op 97.693 ms/op 0.91
altair processInactivityUpdates - 250000 worstcase 80.494 ms/op 97.360 ms/op 0.83
altair processParticipationFlagUpdates - 250000 anycase 108.85 ms/op 113.28 ms/op 0.96
altair processRewardsAndPenalties - 250000 normalcase 158.37 ms/op 177.74 ms/op 0.89
altair processRewardsAndPenalties - 250000 worstcase 189.45 ms/op 169.13 ms/op 1.12
altair processSyncCommitteeUpdates - 250000 451.87 ms/op 467.13 ms/op 0.97
Tree 40 250000 create 944.39 ms/op 1.2458 s/op 0.76
Tree 40 250000 get(125000) 406.53 ns/op 354.82 ns/op 1.15
Tree 40 250000 set(125000) 2.0570 us/op 2.8529 us/op 0.72
Tree 40 250000 toArray() 42.834 ms/op 104.48 ms/op 0.41
Tree 40 250000 iterate all - toArray() + loop 52.097 ms/op 48.623 ms/op 1.07
Tree 40 250000 iterate all - get(i) 145.33 ms/op 136.35 ms/op 1.07
MutableVector 250000 create 32.424 ms/op 24.208 ms/op 1.34
MutableVector 250000 get(125000) 17.039 ns/op 15.762 ns/op 1.08
MutableVector 250000 set(125000) 587.84 ns/op 746.83 ns/op 0.79
MutableVector 250000 toArray() 10.502 ms/op 10.226 ms/op 1.03
MutableVector 250000 iterate all - toArray() + loop 10.658 ms/op 10.419 ms/op 1.02
MutableVector 250000 iterate all - get(i) 3.9284 ms/op 3.8348 ms/op 1.02
Array 250000 create 6.5091 ms/op 6.5439 ms/op 0.99
Array 250000 clone - spread 2.6356 ms/op 2.3198 ms/op 1.14
Array 250000 get(125000) 1.2450 ns/op 1.1090 ns/op 1.12
Array 250000 set(125000) 1.2620 ns/op 1.1970 ns/op 1.05
Array 250000 iterate all - loop 209.78 us/op 153.38 us/op 1.37
aggregationBits - 2048 els - readonlyValues 286.65 us/op 256.38 us/op 1.12
aggregationBits - 2048 els - zipIndexesInBitList 54.492 us/op 43.718 us/op 1.25
regular array get 100000 times 84.278 us/op 61.213 us/op 1.38
wrappedArray get 100000 times 84.336 us/op 61.461 us/op 1.37
arrayWithProxy get 100000 times 36.674 ms/op 42.054 ms/op 0.87
ssz.Root.equals 1.4780 us/op 1.8200 us/op 0.81
ssz.Root.equals with valueOf() 1.6570 us/op 1.7940 us/op 0.92
byteArrayEquals with valueOf() 1.6060 us/op 1.6560 us/op 0.97
phase0 processBlock - 250000 vs - 7PWei normalcase 12.705 ms/op 13.811 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei worstcase 94.599 ms/op 100.37 ms/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 266.16 ms/op 225.86 ms/op 1.18
phase0 beforeProcessEpoch - 250000 vs - 7PWei 684.96 ms/op 753.79 ms/op 0.91
phase0 processEpoch - mainnet_e58758 937.71 ms/op 1.0793 s/op 0.87
mainnet_e58758 - phase0 beforeProcessEpoch 486.11 ms/op 629.93 ms/op 0.77
mainnet_e58758 - phase0 processJustificationAndFinalization 777.94 us/op 145.16 us/op 5.36
mainnet_e58758 - phase0 processRewardsAndPenalties 128.16 ms/op 121.89 ms/op 1.05
mainnet_e58758 - phase0 processRegistryUpdates 47.985 us/op 85.221 us/op 0.56
mainnet_e58758 - phase0 processSlashings 3.3970 us/op 6.5610 us/op 0.52
mainnet_e58758 - phase0 processEth1DataReset 3.1530 us/op 5.1740 us/op 0.61
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 11.639 ms/op 12.370 ms/op 0.94
mainnet_e58758 - phase0 processSlashingsReset 14.679 us/op 31.186 us/op 0.47
mainnet_e58758 - phase0 processRandaoMixesReset 21.266 us/op 40.848 us/op 0.52
mainnet_e58758 - phase0 processHistoricalRootsUpdate 4.6720 us/op 7.1180 us/op 0.66
mainnet_e58758 - phase0 processParticipationRecordUpdates 15.267 us/op 28.688 us/op 0.53
mainnet_e58758 - phase0 afterProcessEpoch 230.00 ms/op 204.82 ms/op 1.12
phase0 processEffectiveBalanceUpdates - 250000 normalcase 14.237 ms/op 12.695 ms/op 1.12
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5500 s/op 1.9621 s/op 0.79
phase0 processRegistryUpdates - 250000 normalcase 56.848 us/op 91.709 us/op 0.62
phase0 processRegistryUpdates - 250000 badcase_full_deposits 3.5337 ms/op 4.4800 ms/op 0.79
phase0 processRegistryUpdates - 250000 worstcase 0.5 1.7644 s/op 2.8298 s/op 0.62
phase0 getAttestationDeltas - 250000 normalcase 54.628 ms/op 39.676 ms/op 1.38
phase0 getAttestationDeltas - 250000 worstcase 44.924 ms/op 38.961 ms/op 1.15
phase0 processSlashings - 250000 worstcase 41.115 ms/op 56.657 ms/op 0.73
shuffle list - 16384 els 16.413 ms/op 14.665 ms/op 1.12
shuffle list - 250000 els 234.37 ms/op 201.91 ms/op 1.16
getEffectiveBalances - 250000 vs - 7PWei 12.775 ms/op 12.771 ms/op 1.00
computeDeltas 4.5078 ms/op 4.4196 ms/op 1.02
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.1734 ms/op 2.8055 ms/op 0.77
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 872.74 us/op 784.58 us/op 1.11
BLS verify - blst-native 2.3157 ms/op 2.2850 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 4.7616 ms/op 4.6401 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst-native 10.275 ms/op 10.105 ms/op 1.02
BLS verifyMultipleSignatures 32 - blst-native 37.236 ms/op 36.765 ms/op 1.01
BLS aggregatePubkeys 32 - blst-native 49.497 us/op 47.533 us/op 1.04
BLS aggregatePubkeys 128 - blst-native 191.69 us/op 187.52 us/op 1.02
getAttestationsForBlock 91.517 ms/op 100.68 ms/op 0.91
CheckpointStateCache - add get delete 18.373 us/op 19.779 us/op 0.93
validate gossip signedAggregateAndProof - struct 5.5732 ms/op 5.4343 ms/op 1.03
validate gossip signedAggregateAndProof - treeBacked 5.5167 ms/op 5.4913 ms/op 1.00
validate gossip attestation - struct 2.6094 ms/op 2.6449 ms/op 0.99
validate gossip attestation - treeBacked 2.6280 ms/op 2.5691 ms/op 1.02
bytes32 toHexString 2.1730 us/op 1.9660 us/op 1.11
bytes32 Buffer.toString(hex) 830.00 ns/op 819.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 1.0720 us/op 1.0630 us/op 1.01
bytes32 Buffer.toString(hex) + 0x 856.00 ns/op 793.00 ns/op 1.08
Object access 1 prop 0.41000 ns/op 0.45100 ns/op 0.91
Map access 1 prop 0.34700 ns/op 0.33700 ns/op 1.03
Object get x1000 22.031 ns/op 17.280 ns/op 1.27
Map get x1000 1.2110 ns/op 0.94900 ns/op 1.28
Object set x1000 133.16 ns/op 122.23 ns/op 1.09
Map set x1000 80.672 ns/op 84.224 ns/op 0.96
Return object 10000 times 0.45850 ns/op 0.43130 ns/op 1.06
Throw Error 10000 times 7.3246 us/op 7.1744 us/op 1.02
enrSubnets - fastDeserialize 64 bits 1.4940 us/op 1.5750 us/op 0.95
enrSubnets - ssz BitVector 64 bits 20.424 us/op 17.788 us/op 1.15
enrSubnets - fastDeserialize 4 bits 564.00 ns/op 544.00 ns/op 1.04
enrSubnets - ssz BitVector 4 bits 3.5120 us/op 3.4690 us/op 1.01
RateTracker 1000000 limit, 1 obj count per request 227.41 ns/op 218.75 ns/op 1.04
RateTracker 1000000 limit, 2 obj count per request 166.19 ns/op 159.47 ns/op 1.04
RateTracker 1000000 limit, 4 obj count per request 139.36 ns/op 129.19 ns/op 1.08
RateTracker 1000000 limit, 8 obj count per request 126.25 ns/op 115.50 ns/op 1.09
RateTracker with prune 4.8660 us/op 5.1220 us/op 0.95

by benchmarkbot/action

@g11tech g11tech merged commit f0f8f0f into master Jan 12, 2022
@g11tech g11tech deleted the g11tech/mtransrename branch January 12, 2022 07:41
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

2 participants