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

Skip processSlashings early if there is no one to slash #2943

Merged
merged 1 commit into from
Aug 11, 2021

Conversation

dapplion
Copy link
Contributor

Motivation

Small optimization

Description

Skip processSlashings early if there is no one to slash

@codeclimate
Copy link

codeclimate bot commented Aug 10, 2021

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

View more on Code Climate.

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: c2e2d06 Previous: c09ea9a Ratio
getCommitteeAssignments - req 1000 vs - 250000 vc 9.0485 ms/op 9.2084 ms/op 0.98
processBlock altair 250000 vs - 7PWei - maxed ops 430.09 ms/op 563.59 ms/op 0.76
processBlock altair 250000 vs - 7PWei - average 164.43 ms/op 220.05 ms/op 0.75
epoch altair - 250000 vs - 7PWei - processInactivityUpdates 2.5361 s/op 2.6754 s/op 0.95
epoch altair - 250000 vs - 7PWei - processRewardsAndPenalties 1.1352 s/op 1.1298 s/op 1.00
epoch altair - 250000 vs - 7PWei - processParticipationFlagUpdates 519.38 ms/op 578.71 ms/op 0.90
processBlock phase0 250000 vs - 7PWei - maxed ops 201.35 ms/op 240.26 ms/op 0.84
processBlock phase0 250000 vs - 7PWei - average 32.710 ms/op 30.951 ms/op 1.06
epoch phase0 - 250000 vs - 7PWei - beforeProcessEpoch 1.7747 s/op 2.0031 s/op 0.89
epoch phase0 - 250000 vs - 7PWei - processRewardsAndPenalties 862.78 ms/op 918.98 ms/op 0.94
epoch phase0 - 250000 vs - 7PWei - processEffectiveBalanceUpdates 115.53 ms/op 135.53 ms/op 0.85
getAttestationDeltas - 250000 vs - 7PWei 118.91 ms/op 124.54 ms/op 0.95
processSlots - 250000 vs - 7PWei - 32 empty slots 3.2036 s/op 3.6104 s/op 0.89
shuffle list - 16384 els 17.173 ms/op 30.941 ms/op 0.56
shuffle list - 250000 els 249.41 ms/op 298.32 ms/op 0.84
getPubkeys - persistent - req 1000 vs - 250000 vc 19.768 us/op 20.070 us/op 0.98
BLS verify - blst-native 2.1393 ms/op 2.3405 ms/op 0.91
BLS verifyMultipleSignatures 3 - blst-native 4.3672 ms/op 4.8100 ms/op 0.91
BLS verifyMultipleSignatures 8 - blst-native 9.4149 ms/op 10.355 ms/op 0.91
BLS verifyMultipleSignatures 32 - blst-native 34.228 ms/op 37.961 ms/op 0.90
BLS aggregatePubkeys 32 - blst-native 46.618 us/op 78.616 us/op 0.59
BLS aggregatePubkeys 128 - blst-native 179.48 us/op 210.14 us/op 0.85
getAttestationsForBlock 81.213 ms/op 89.045 ms/op 0.91
validate gossip signedAggregateAndProof - struct 5.1296 ms/op 5.7115 ms/op 0.90
validate gossip signedAggregateAndProof - treeBacked 5.2784 ms/op 5.6947 ms/op 0.93
validate gossip attestation - struct 2.4693 ms/op 2.6666 ms/op 0.93
validate gossip attestation - treeBacked 2.4483 ms/op 2.6806 ms/op 0.91

by benchmarkbot/action

@twoeths twoeths merged commit 0e0b5da into master Aug 11, 2021
@twoeths twoeths deleted the dapplion/process-slashings-skip branch August 11, 2021 00:42
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