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

Fix property merging in publishAttestations attestationNoCommittee #3919

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Apr 13, 2022

Motivation

Fixes regression from #3917 which prevents validators from attesting if they are in committee != 0.

It's worrying that our sim testing did not catch this issue. @tuyennhv @wemeetagain could it be that since the testnet is so small there is only 1 committee in each slot?

Description

Fix property merging in publishAttestations attestationNoCommittee

@dapplion dapplion added the prio-critical Drop everything to resolve this immediately. Examples: consensus bug, un-usable CLI label Apr 13, 2022
@dapplion dapplion requested a review from a team as a code owner April 13, 2022 14:04
@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #3919 (c42740d) into master (1f3bb75) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3919   +/-   ##
=======================================
  Coverage   36.53%   36.53%           
=======================================
  Files         324      324           
  Lines        8982     8982           
  Branches     1410     1410           
=======================================
  Hits         3282     3282           
  Misses       5556     5556           
  Partials      144      144           

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: e7cf8c0 Previous: 1f3bb75 Ratio
BeaconState.hashTreeRoot - No change 535.00 ns/op 610.00 ns/op 0.88
BeaconState.hashTreeRoot - 1 full validator 56.811 us/op 55.176 us/op 1.03
BeaconState.hashTreeRoot - 32 full validator 565.25 us/op 544.38 us/op 1.04
BeaconState.hashTreeRoot - 512 full validator 5.9913 ms/op 6.0441 ms/op 0.99
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 69.818 us/op 70.105 us/op 1.00
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 960.75 us/op 961.29 us/op 1.00
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.477 ms/op 13.422 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 52.570 us/op 53.401 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 481.02 us/op 495.88 us/op 0.97
BeaconState.hashTreeRoot - 512 balances 4.5812 ms/op 4.6346 ms/op 0.99
BeaconState.hashTreeRoot - 250000 balances 104.23 ms/op 101.88 ms/op 1.02
processSlot - 1 slots 9.8710 us/op 9.7810 us/op 1.01
processSlot - 32 slots 1.6083 ms/op 1.5868 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 5.2671 ms/op 5.2976 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 7.3526 ms/op 7.3813 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 7.8642 ms/op 7.8781 ms/op 1.00
computeProposers - vc 250000 16.766 ms/op 16.725 ms/op 1.00
computeEpochShuffling - vc 250000 160.35 ms/op 159.03 ms/op 1.01
getNextSyncCommittee - vc 250000 277.61 ms/op 279.43 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei normalcase 4.2103 ms/op 3.9408 ms/op 1.07
altair processAttestation - 250000 vs - 7PWei worstcase 6.0387 ms/op 6.0807 ms/op 0.99
altair processAttestation - setStatus - 1/6 committees join 196.67 us/op 200.70 us/op 0.98
altair processAttestation - setStatus - 1/3 committees join 374.17 us/op 382.99 us/op 0.98
altair processAttestation - setStatus - 1/2 committees join 528.87 us/op 539.81 us/op 0.98
altair processAttestation - setStatus - 2/3 committees join 682.60 us/op 691.81 us/op 0.99
altair processAttestation - setStatus - 4/5 committees join 951.96 us/op 959.64 us/op 0.99
altair processAttestation - setStatus - 100% committees join 1.1286 ms/op 1.1372 ms/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase 24.969 ms/op 29.842 ms/op 0.84
altair processBlock - 250000 vs - 7PWei normalcase hashState 37.755 ms/op 36.792 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase 74.776 ms/op 75.481 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase hashState 101.84 ms/op 108.64 ms/op 0.94
altair processEth1Data - 250000 vs - 7PWei normalcase 763.90 us/op 887.18 us/op 0.86
altair processEpoch - mainnet_e81889 488.41 ms/op 482.39 ms/op 1.01
mainnet_e81889 - altair beforeProcessEpoch 138.99 ms/op 145.18 ms/op 0.96
mainnet_e81889 - altair processJustificationAndFinalization 25.745 us/op 26.654 us/op 0.97
mainnet_e81889 - altair processInactivityUpdates 12.098 ms/op 11.269 ms/op 1.07
mainnet_e81889 - altair processRewardsAndPenalties 86.879 ms/op 84.070 ms/op 1.03
mainnet_e81889 - altair processRegistryUpdates 4.8820 us/op 3.2660 us/op 1.49
mainnet_e81889 - altair processSlashings 1.4560 us/op 964.00 ns/op 1.51
mainnet_e81889 - altair processEth1DataReset 1.4560 us/op 1.1050 us/op 1.32
mainnet_e81889 - altair processEffectiveBalanceUpdates 7.2181 ms/op 6.6141 ms/op 1.09
mainnet_e81889 - altair processSlashingsReset 5.4970 us/op 5.0750 us/op 1.08
mainnet_e81889 - altair processRandaoMixesReset 7.5290 us/op 6.1150 us/op 1.23
mainnet_e81889 - altair processHistoricalRootsUpdate 1.8090 us/op 1.2030 us/op 1.50
mainnet_e81889 - altair processParticipationFlagUpdates 6.7890 us/op 4.4280 us/op 1.53
mainnet_e81889 - altair processSyncCommitteeUpdates 1.2110 us/op 1.1820 us/op 1.02
mainnet_e81889 - altair afterProcessEpoch 209.77 ms/op 211.43 ms/op 0.99
altair processInactivityUpdates - 250000 normalcase 35.370 ms/op 34.160 ms/op 1.04
altair processInactivityUpdates - 250000 worstcase 28.592 ms/op 28.986 ms/op 0.99
altair processRewardsAndPenalties - 250000 normalcase 118.41 ms/op 128.10 ms/op 0.92
altair processRewardsAndPenalties - 250000 worstcase 79.166 ms/op 78.719 ms/op 1.01
altair processSyncCommitteeUpdates - 250000 289.52 ms/op 299.07 ms/op 0.97
Tree 40 250000 create 755.69 ms/op 841.65 ms/op 0.90
Tree 40 250000 get(125000) 293.05 ns/op 292.09 ns/op 1.00
Tree 40 250000 set(125000) 2.3650 us/op 2.3209 us/op 1.02
Tree 40 250000 toArray() 33.799 ms/op 32.628 ms/op 1.04
Tree 40 250000 iterate all - toArray() + loop 34.432 ms/op 32.561 ms/op 1.06
Tree 40 250000 iterate all - get(i) 113.42 ms/op 110.73 ms/op 1.02
MutableVector 250000 create 17.737 ms/op 15.065 ms/op 1.18
MutableVector 250000 get(125000) 13.085 ns/op 13.086 ns/op 1.00
MutableVector 250000 set(125000) 623.53 ns/op 590.63 ns/op 1.06
MutableVector 250000 toArray() 6.6644 ms/op 6.8504 ms/op 0.97
MutableVector 250000 iterate all - toArray() + loop 7.0057 ms/op 7.0108 ms/op 1.00
MutableVector 250000 iterate all - get(i) 3.6411 ms/op 3.4401 ms/op 1.06
Array 250000 create 5.7769 ms/op 6.1578 ms/op 0.94
Array 250000 clone - spread 2.6401 ms/op 2.8397 ms/op 0.93
Array 250000 get(125000) 1.2370 ns/op 1.3010 ns/op 0.95
Array 250000 set(125000) 1.2310 ns/op 1.2280 ns/op 1.00
Array 250000 iterate all - loop 167.76 us/op 167.92 us/op 1.00
effectiveBalanceIncrements clone Uint8Array 300000 80.327 us/op 85.613 us/op 0.94
effectiveBalanceIncrements clone MutableVector 300000 519.00 ns/op 820.00 ns/op 0.63
effectiveBalanceIncrements rw all Uint8Array 300000 301.85 us/op 301.90 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 159.46 ms/op 198.54 ms/op 0.80
aggregationBits - 2048 els - zipIndexesInBitList 26.806 us/op 31.405 us/op 0.85
regular array get 100000 times 67.410 us/op 67.523 us/op 1.00
wrappedArray get 100000 times 67.468 us/op 67.448 us/op 1.00
arrayWithProxy get 100000 times 32.720 ms/op 29.183 ms/op 1.12
ssz.Root.equals 449.00 ns/op 494.00 ns/op 0.91
byteArrayEquals 437.00 ns/op 468.00 ns/op 0.93
phase0 processBlock - 250000 vs - 7PWei normalcase 3.4980 ms/op 3.7567 ms/op 0.93
phase0 processBlock - 250000 vs - 7PWei worstcase 45.175 ms/op 46.717 ms/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 175.34 ms/op 194.93 ms/op 0.90
phase0 beforeProcessEpoch - 250000 vs - 7PWei 77.584 ms/op 75.153 ms/op 1.03
phase0 processEpoch - mainnet_e58758 550.06 ms/op 628.56 ms/op 0.88
mainnet_e58758 - phase0 beforeProcessEpoch 225.63 ms/op 221.24 ms/op 1.02
mainnet_e58758 - phase0 processJustificationAndFinalization 27.069 us/op 25.661 us/op 1.05
mainnet_e58758 - phase0 processRewardsAndPenalties 72.878 ms/op 120.25 ms/op 0.61
mainnet_e58758 - phase0 processRegistryUpdates 11.971 us/op 9.7880 us/op 1.22
mainnet_e58758 - phase0 processSlashings 1.5290 us/op 1.0710 us/op 1.43
mainnet_e58758 - phase0 processEth1DataReset 1.3120 us/op 1.0330 us/op 1.27
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 5.4841 ms/op 5.5518 ms/op 0.99
mainnet_e58758 - phase0 processSlashingsReset 5.7360 us/op 5.5190 us/op 1.04
mainnet_e58758 - phase0 processRandaoMixesReset 5.9430 us/op 6.2940 us/op 0.94
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.4640 us/op 1.2640 us/op 1.16
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.5620 us/op 5.4290 us/op 1.02
mainnet_e58758 - phase0 afterProcessEpoch 156.57 ms/op 155.48 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 6.3801 ms/op 6.4087 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 6.8187 ms/op 6.8497 ms/op 1.00
phase0 processRegistryUpdates - 250000 normalcase 8.8260 us/op 8.2670 us/op 1.07
phase0 processRegistryUpdates - 250000 badcase_full_deposits 415.78 us/op 413.27 us/op 1.01
phase0 processRegistryUpdates - 250000 worstcase 0.5 235.25 ms/op 220.90 ms/op 1.06
phase0 getAttestationDeltas - 250000 normalcase 15.045 ms/op 16.025 ms/op 0.94
phase0 getAttestationDeltas - 250000 worstcase 15.220 ms/op 16.010 ms/op 0.95
phase0 processSlashings - 250000 worstcase 5.6368 ms/op 5.7049 ms/op 0.99
shuffle list - 16384 els 10.817 ms/op 10.684 ms/op 1.01
shuffle list - 250000 els 154.56 ms/op 154.71 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 380.58 us/op 366.98 us/op 1.04
pass gossip attestations to forkchoice per slot 3.6515 ms/op 4.2411 ms/op 0.86
computeDeltas 3.8056 ms/op 3.8415 ms/op 0.99
computeProposerBoostScoreFromBalances 503.05 us/op 502.99 us/op 1.00
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.9663 ms/op 2.4281 ms/op 0.81
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 75.613 us/op 89.384 us/op 0.85
BLS verify - blst-native 1.8589 ms/op 1.8523 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 3.8052 ms/op 3.7898 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 8.1905 ms/op 8.1613 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 29.675 ms/op 30.079 ms/op 0.99
BLS aggregatePubkeys 32 - blst-native 39.360 us/op 39.213 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 153.31 us/op 153.24 us/op 1.00
getAttestationsForBlock 59.006 ms/op 66.354 ms/op 0.89
CheckpointStateCache - add get delete 10.287 us/op 10.898 us/op 0.94
validate gossip signedAggregateAndProof - struct 4.2678 ms/op 4.2436 ms/op 1.01
validate gossip attestation - struct 2.0276 ms/op 2.0286 ms/op 1.00
pickEth1Vote - no votes 2.1917 ms/op 2.2451 ms/op 0.98
pickEth1Vote - max votes 18.948 ms/op 21.846 ms/op 0.87
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.831 ms/op 12.307 ms/op 0.96
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.660 ms/op 22.359 ms/op 0.92
pickEth1Vote - Eth1Data fastSerialize value x2048 1.7293 ms/op 1.7744 ms/op 0.97
pickEth1Vote - Eth1Data fastSerialize tree x2048 13.629 ms/op 14.755 ms/op 0.92
bytes32 toHexString 950.00 ns/op 1.0530 us/op 0.90
bytes32 Buffer.toString(hex) 692.00 ns/op 700.00 ns/op 0.99
bytes32 Buffer.toString(hex) from Uint8Array 900.00 ns/op 870.00 ns/op 1.03
bytes32 Buffer.toString(hex) + 0x 699.00 ns/op 705.00 ns/op 0.99
Object access 1 prop 0.34100 ns/op 0.35100 ns/op 0.97
Map access 1 prop 0.30100 ns/op 0.29800 ns/op 1.01
Object get x1000 17.492 ns/op 17.636 ns/op 0.99
Map get x1000 1.0700 ns/op 0.98100 ns/op 1.09
Object set x1000 111.50 ns/op 110.50 ns/op 1.01
Map set x1000 65.139 ns/op 68.825 ns/op 0.95
Return object 10000 times 0.36850 ns/op 0.37420 ns/op 0.98
Throw Error 10000 times 5.8466 us/op 5.8199 us/op 1.00
enrSubnets - fastDeserialize 64 bits 895.00 ns/op 963.00 ns/op 0.93
enrSubnets - ssz BitVector 64 bits 584.00 ns/op 629.00 ns/op 0.93
enrSubnets - fastDeserialize 4 bits 407.00 ns/op 414.00 ns/op 0.98
enrSubnets - ssz BitVector 4 bits 569.00 ns/op 622.00 ns/op 0.91
RateTracker 1000000 limit, 1 obj count per request 179.50 ns/op 185.91 ns/op 0.97
RateTracker 1000000 limit, 2 obj count per request 131.79 ns/op 139.90 ns/op 0.94
RateTracker 1000000 limit, 4 obj count per request 110.26 ns/op 116.37 ns/op 0.95
RateTracker 1000000 limit, 8 obj count per request 98.903 ns/op 104.74 ns/op 0.94
RateTracker with prune 3.8110 us/op 4.3290 us/op 0.88
array of 16000 items push then shift 3.0915 us/op 3.1665 us/op 0.98
LinkedList of 16000 items push then shift 17.292 ns/op 17.437 ns/op 0.99
array of 16000 items push then pop 215.52 ns/op 214.69 ns/op 1.00
LinkedList of 16000 items push then pop 16.968 ns/op 17.076 ns/op 0.99
array of 24000 items push then shift 4.5635 us/op 4.5697 us/op 1.00
LinkedList of 24000 items push then shift 22.318 ns/op 21.415 ns/op 1.04
array of 24000 items push then pop 197.63 ns/op 206.71 ns/op 0.96
LinkedList of 24000 items push then pop 19.389 ns/op 19.183 ns/op 1.01

by benchmarkbot/action

@wemeetagain wemeetagain merged commit efa138b into master Apr 13, 2022
@wemeetagain wemeetagain deleted the dapplion/fix-attestation-committee-prop branch April 13, 2022 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio-critical Drop everything to resolve this immediately. Examples: consensus bug, un-usable CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants