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

Remove peer penalization even on INVALID execution status #3756

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Feb 14, 2022

Motivation
As per the optimistic sync spec,
https://github.com/ethereum/consensus-specs/pull/2770/files#diff-2b75236a9ab74fc85d4ce0967032deeea2faad9b1eafd93ac2b327c4d0d30cf2R117-R124
even INVALID shouldn't downscore the peers as it might cause network split because of the faulty ELs.

This PR now treats the INVALIDs same as other execution errors and throws EXECUTION_ENGINE_ERROR , which isn't meant to downscore the peers.
Description
Part of #3731

@codecov
Copy link

codecov bot commented Feb 14, 2022

Codecov Report

Merging #3756 (304c71f) into master (512498f) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3756   +/-   ##
=======================================
  Coverage   37.06%   37.06%           
=======================================
  Files         319      319           
  Lines        8712     8711    -1     
  Branches     1354     1354           
=======================================
  Hits         3229     3229           
+ Misses       5341     5340    -1     
  Partials      142      142           

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 616d756 Previous: 512498f Ratio
BeaconState.hashTreeRoot - No change 551.00 ns/op 557.00 ns/op 0.99
BeaconState.hashTreeRoot - 1 full validator 127.45 us/op 143.28 us/op 0.89
BeaconState.hashTreeRoot - 32 full validator 1.8857 ms/op 2.1236 ms/op 0.89
BeaconState.hashTreeRoot - 512 full validator 24.999 ms/op 28.368 ms/op 0.88
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 124.22 us/op 132.32 us/op 0.94
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0600 ms/op 2.2473 ms/op 0.92
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.353 ms/op 30.028 ms/op 0.91
BeaconState.hashTreeRoot - 1 balances 87.962 us/op 93.545 us/op 0.94
BeaconState.hashTreeRoot - 32 balances 748.73 us/op 827.10 us/op 0.91
BeaconState.hashTreeRoot - 512 balances 7.2380 ms/op 7.7866 ms/op 0.93
BeaconState.hashTreeRoot - 250000 balances 133.05 ms/op 142.06 ms/op 0.94
processSlot - 1 slots 46.454 us/op 48.669 us/op 0.95
processSlot - 32 slots 2.8624 ms/op 3.0157 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 5.3360 ms/op 5.2065 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 7.3935 ms/op 7.0175 ms/op 1.05
getCommitteeAssignments - req 1000 vs - 250000 vc 7.9646 ms/op 7.7526 ms/op 1.03
computeProposers - vc 250000 20.222 ms/op 21.274 ms/op 0.95
computeEpochShuffling - vc 250000 185.93 ms/op 181.67 ms/op 1.02
getNextSyncCommittee - vc 250000 332.35 ms/op 348.44 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei normalcase 33.431 ms/op 35.880 ms/op 0.93
altair processAttestation - 250000 vs - 7PWei worstcase 33.581 ms/op 39.531 ms/op 0.85
altair processAttestation - setStatus - 1/6 committees join 10.336 ms/op 10.116 ms/op 1.02
altair processAttestation - setStatus - 1/3 committees join 21.332 ms/op 20.664 ms/op 1.03
altair processAttestation - setStatus - 1/2 committees join 31.968 ms/op 32.731 ms/op 0.98
altair processAttestation - setStatus - 2/3 committees join 43.726 ms/op 43.820 ms/op 1.00
altair processAttestation - setStatus - 4/5 committees join 51.173 ms/op 61.046 ms/op 0.84
altair processAttestation - setStatus - 100% committees join 66.434 ms/op 74.297 ms/op 0.89
altair processAttestation - updateEpochParticipants - 1/6 committees join 10.637 ms/op 10.087 ms/op 1.05
altair processAttestation - updateEpochParticipants - 1/3 committees join 22.964 ms/op 25.104 ms/op 0.91
altair processAttestation - updateEpochParticipants - 1/2 committees join 24.484 ms/op 20.052 ms/op 1.22
altair processAttestation - updateEpochParticipants - 2/3 committees join 22.068 ms/op 24.020 ms/op 0.92
altair processAttestation - updateEpochParticipants - 4/5 committees join 23.146 ms/op 23.053 ms/op 1.00
altair processAttestation - updateEpochParticipants - 100% committees join 28.326 ms/op 28.279 ms/op 1.00
altair processAttestation - updateAllStatus 18.716 ms/op 19.406 ms/op 0.96
altair processBlock - 250000 vs - 7PWei normalcase 33.144 ms/op 32.676 ms/op 1.01
altair processBlock - 250000 vs - 7PWei worstcase 103.19 ms/op 98.956 ms/op 1.04
altair processEpoch - mainnet_e81889 894.41 ms/op 910.63 ms/op 0.98
mainnet_e81889 - altair beforeProcessEpoch 325.33 ms/op 331.69 ms/op 0.98
mainnet_e81889 - altair processJustificationAndFinalization 120.22 us/op 123.67 us/op 0.97
mainnet_e81889 - altair processInactivityUpdates 17.666 ms/op 17.863 ms/op 0.99
mainnet_e81889 - altair processRewardsAndPenalties 96.743 ms/op 94.562 ms/op 1.02
mainnet_e81889 - altair processRegistryUpdates 10.924 us/op 15.757 us/op 0.69
mainnet_e81889 - altair processSlashings 2.5530 us/op 4.2400 us/op 0.60
mainnet_e81889 - altair processEth1DataReset 2.4780 us/op 3.7040 us/op 0.67
mainnet_e81889 - altair processEffectiveBalanceUpdates 6.8245 ms/op 6.9750 ms/op 0.98
mainnet_e81889 - altair processSlashingsReset 17.013 us/op 21.392 us/op 0.80
mainnet_e81889 - altair processRandaoMixesReset 24.435 us/op 34.248 us/op 0.71
mainnet_e81889 - altair processHistoricalRootsUpdate 2.9240 us/op 5.7430 us/op 0.51
mainnet_e81889 - altair processParticipationFlagUpdates 68.659 ms/op 68.701 ms/op 1.00
mainnet_e81889 - altair processSyncCommitteeUpdates 2.6660 us/op 4.1270 us/op 0.65
mainnet_e81889 - altair afterProcessEpoch 221.24 ms/op 221.04 ms/op 1.00
altair processInactivityUpdates - 250000 normalcase 69.135 ms/op 73.692 ms/op 0.94
altair processInactivityUpdates - 250000 worstcase 68.775 ms/op 97.546 ms/op 0.71
altair processParticipationFlagUpdates - 250000 anycase 69.882 ms/op 73.054 ms/op 0.96
altair processRewardsAndPenalties - 250000 normalcase 81.709 ms/op 87.199 ms/op 0.94
altair processRewardsAndPenalties - 250000 worstcase 85.830 ms/op 99.283 ms/op 0.86
altair processSyncCommitteeUpdates - 250000 344.81 ms/op 352.57 ms/op 0.98
Tree 40 250000 create 824.98 ms/op 803.45 ms/op 1.03
Tree 40 250000 get(125000) 323.58 ns/op 301.28 ns/op 1.07
Tree 40 250000 set(125000) 1.9489 us/op 1.6833 us/op 1.16
Tree 40 250000 toArray() 37.961 ms/op 43.671 ms/op 0.87
Tree 40 250000 iterate all - toArray() + loop 42.512 ms/op 36.494 ms/op 1.16
Tree 40 250000 iterate all - get(i) 117.72 ms/op 121.53 ms/op 0.97
MutableVector 250000 create 23.501 ms/op 24.187 ms/op 0.97
MutableVector 250000 get(125000) 13.159 ns/op 11.855 ns/op 1.11
MutableVector 250000 set(125000) 512.05 ns/op 484.60 ns/op 1.06
MutableVector 250000 toArray() 8.3791 ms/op 8.4633 ms/op 0.99
MutableVector 250000 iterate all - toArray() + loop 8.5638 ms/op 8.6100 ms/op 0.99
MutableVector 250000 iterate all - get(i) 3.7790 ms/op 3.7787 ms/op 1.00
Array 250000 create 5.1019 ms/op 4.8263 ms/op 1.06
Array 250000 clone - spread 2.2504 ms/op 2.4369 ms/op 0.92
Array 250000 get(125000) 1.0500 ns/op 1.0420 ns/op 1.01
Array 250000 set(125000) 1.0440 ns/op 1.0660 ns/op 0.98
Array 250000 iterate all - loop 170.14 us/op 167.29 us/op 1.02
effectiveBalanceIncrements clone Uint8Array 300000 74.732 us/op 65.720 us/op 1.14
effectiveBalanceIncrements clone MutableVector 300000 22.310 us/op 671.00 ns/op 33.25
effectiveBalanceIncrements rw all Uint8Array 300000 318.43 us/op 292.88 us/op 1.09
effectiveBalanceIncrements rw all MutableVector 300000 174.00 ms/op 169.70 ms/op 1.03
aggregationBits - 2048 els - readonlyValues 209.04 us/op 178.81 us/op 1.17
aggregationBits - 2048 els - zipIndexesInBitList 34.869 us/op 33.665 us/op 1.04
regular array get 100000 times 67.525 us/op 65.749 us/op 1.03
wrappedArray get 100000 times 67.396 us/op 64.811 us/op 1.04
arrayWithProxy get 100000 times 33.522 ms/op 27.192 ms/op 1.23
ssz.Root.equals 1.1750 us/op 1.0100 us/op 1.16
ssz.Root.equals with valueOf() 1.2900 us/op 1.2080 us/op 1.07
byteArrayEquals with valueOf() 1.2710 us/op 1.1960 us/op 1.06
phase0 processBlock - 250000 vs - 7PWei normalcase 8.1996 ms/op 7.4414 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei worstcase 74.180 ms/op 73.003 ms/op 1.02
phase0 afterProcessEpoch - 250000 vs - 7PWei 206.28 ms/op 216.64 ms/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 571.84 ms/op 516.38 ms/op 1.11
phase0 processEpoch - mainnet_e58758 828.26 ms/op 810.89 ms/op 1.02
mainnet_e58758 - phase0 beforeProcessEpoch 469.45 ms/op 500.64 ms/op 0.94
mainnet_e58758 - phase0 processJustificationAndFinalization 49.198 us/op 54.130 us/op 0.91
mainnet_e58758 - phase0 processRewardsAndPenalties 119.61 ms/op 80.626 ms/op 1.48
mainnet_e58758 - phase0 processRegistryUpdates 55.827 us/op 43.135 us/op 1.29
mainnet_e58758 - phase0 processSlashings 1.9000 us/op 3.1070 us/op 0.61
mainnet_e58758 - phase0 processEth1DataReset 2.0350 us/op 2.8820 us/op 0.71
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 5.7252 ms/op 5.5446 ms/op 1.03
mainnet_e58758 - phase0 processSlashingsReset 7.3480 us/op 12.148 us/op 0.60
mainnet_e58758 - phase0 processRandaoMixesReset 19.632 us/op 16.250 us/op 1.21
mainnet_e58758 - phase0 processHistoricalRootsUpdate 2.5290 us/op 3.7300 us/op 0.68
mainnet_e58758 - phase0 processParticipationRecordUpdates 15.648 us/op 11.768 us/op 1.33
mainnet_e58758 - phase0 afterProcessEpoch 180.07 ms/op 196.93 ms/op 0.91
phase0 processEffectiveBalanceUpdates - 250000 normalcase 6.5980 ms/op 7.3064 ms/op 0.90
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 6.5723 ms/op 7.4585 ms/op 0.88
phase0 processRegistryUpdates - 250000 normalcase 57.426 us/op 69.158 us/op 0.83
phase0 processRegistryUpdates - 250000 badcase_full_deposits 3.0593 ms/op 3.1668 ms/op 0.97
phase0 processRegistryUpdates - 250000 worstcase 0.5 1.7163 s/op 1.6794 s/op 1.02
phase0 getAttestationDeltas - 250000 normalcase 12.938 ms/op 14.607 ms/op 0.89
phase0 getAttestationDeltas - 250000 worstcase 12.894 ms/op 13.756 ms/op 0.94
phase0 processSlashings - 250000 worstcase 31.228 ms/op 31.827 ms/op 0.98
shuffle list - 16384 els 12.859 ms/op 12.720 ms/op 1.01
shuffle list - 250000 els 182.37 ms/op 191.01 ms/op 0.95
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 424.51 us/op 427.36 us/op 0.99
pass gossip attestations to forkchoice per slot 22.332 ms/op 17.956 ms/op 1.24
computeDeltas 3.5110 ms/op 3.1020 ms/op 1.13
computeProposerBoostScoreFromBalances 503.32 us/op 500.59 us/op 1.01
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.9144 ms/op 2.0837 ms/op 0.92
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 695.95 us/op 685.37 us/op 1.02
BLS verify - blst-native 1.8621 ms/op 1.9619 ms/op 0.95
BLS verifyMultipleSignatures 3 - blst-native 3.8139 ms/op 3.9865 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst-native 8.2285 ms/op 8.6444 ms/op 0.95
BLS verifyMultipleSignatures 32 - blst-native 29.855 ms/op 31.792 ms/op 0.94
BLS aggregatePubkeys 32 - blst-native 40.039 us/op 38.876 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 153.32 us/op 154.07 us/op 1.00
getAttestationsForBlock 66.113 ms/op 67.870 ms/op 0.97
CheckpointStateCache - add get delete 17.578 us/op 17.689 us/op 0.99
validate gossip signedAggregateAndProof - struct 4.4413 ms/op 4.3117 ms/op 1.03
validate gossip signedAggregateAndProof - treeBacked 4.3964 ms/op 4.6320 ms/op 0.95
validate gossip attestation - struct 2.0892 ms/op 2.0245 ms/op 1.03
validate gossip attestation - treeBacked 2.1200 ms/op 2.0815 ms/op 1.02
pickEth1Vote - no votes 8.4593 ms/op 8.4852 ms/op 1.00
pickEth1Vote - max votes 48.830 ms/op 47.862 ms/op 1.02
pickEth1Vote - Eth1Data hashTreeRoot value x2048 24.195 ms/op 23.363 ms/op 1.04
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 9.3441 ms/op 9.0621 ms/op 1.03
pickEth1Vote - Eth1Data fastSerialize value x2048 5.1155 ms/op 4.9625 ms/op 1.03
pickEth1Vote - Eth1Data fastSerialize tree x2048 23.497 ms/op 22.196 ms/op 1.06
bytes32 toHexString 1.5660 us/op 1.5460 us/op 1.01
bytes32 Buffer.toString(hex) 695.00 ns/op 623.00 ns/op 1.12
bytes32 Buffer.toString(hex) from Uint8Array 931.00 ns/op 825.00 ns/op 1.13
bytes32 Buffer.toString(hex) + 0x 695.00 ns/op 597.00 ns/op 1.16
Object access 1 prop 0.31600 ns/op 0.28100 ns/op 1.12
Map access 1 prop 0.28300 ns/op 0.26600 ns/op 1.06
Object get x1000 18.150 ns/op 17.432 ns/op 1.04
Map get x1000 1.0510 ns/op 0.97800 ns/op 1.07
Object set x1000 107.91 ns/op 96.494 ns/op 1.12
Map set x1000 58.618 ns/op 59.414 ns/op 0.99
Return object 10000 times 0.37470 ns/op 0.35720 ns/op 1.05
Throw Error 10000 times 5.9145 us/op 5.6964 us/op 1.04
enrSubnets - fastDeserialize 64 bits 1.1710 us/op 1.1430 us/op 1.02
enrSubnets - ssz BitVector 64 bits 16.686 us/op 15.995 us/op 1.04
enrSubnets - fastDeserialize 4 bits 423.00 ns/op 411.00 ns/op 1.03
enrSubnets - ssz BitVector 4 bits 2.9130 us/op 2.8170 us/op 1.03
RateTracker 1000000 limit, 1 obj count per request 172.75 ns/op 170.09 ns/op 1.02
RateTracker 1000000 limit, 2 obj count per request 128.96 ns/op 128.22 ns/op 1.01
RateTracker 1000000 limit, 4 obj count per request 105.85 ns/op 103.37 ns/op 1.02
RateTracker 1000000 limit, 8 obj count per request 94.781 ns/op 94.532 ns/op 1.00
RateTracker with prune 3.6290 us/op 3.4750 us/op 1.04

by benchmarkbot/action

@g11tech g11tech merged commit 4354d4a into master Feb 17, 2022
@g11tech g11tech deleted the g11tech/nodownscoreforexecution branch February 17, 2022 09:15
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.

3 participants