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

Compute totalActiveBalance in existing validators loop #2929

Merged
merged 2 commits into from
Aug 9, 2021

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Aug 9, 2021

Motivation

Noticed that we run an extra unnecessary loop over validators in epochCtx creation

Description

Compute total active balance on the existing loop over validators

@codeclimate
Copy link

codeclimate bot commented Aug 9, 2021

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

View more on Code Climate.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2021

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: a251bfe Previous: d0ffc01 Ratio
getCommitteeAssignments - req 1000 vs - 250000 vc 7.8675 ms/op 7.8031 ms/op 1.01
epoch altair - 250000 vs - 7PWei - processInactivityUpdates 1.7411 s/op 1.8623 s/op 0.93
epoch altair - 250000 vs - 7PWei - processRewardsAndPenalties 870.64 ms/op 840.01 ms/op 1.04
epoch altair - 250000 vs - 7PWei - processParticipationFlagUpdates 351.50 ms/op 302.03 ms/op 1.16
Process block - 250000 vs - 7PWei - with 0 validator exit 391.47 us/op 402.99 us/op 0.97
Process block - 250000 vs - 7PWei - with 1 validator exit 41.212 ms/op 42.090 ms/op 0.98
Process block - 250000 vs - 7PWei - with 16 validator exits 26.040 ms/op 23.059 ms/op 1.13
epoch phase0 - 250000 vs - 7PWei - beforeProcessEpoch 617.74 ms/op
epoch phase0 - 250000 vs - 7PWei - processRewardsAndPenalties 417.34 ms/op 531.49 ms/op 0.79
epoch phase0 - 250000 vs - 7PWei - processEffectiveBalanceUpdates 99.818 ms/op 104.08 ms/op 0.96
getAttestationDeltas - 250000 vs - 7PWei 83.088 ms/op 84.388 ms/op 0.98
processSlots - 250000 vs - 7PWei - 32 empty slots 4.7766 s/op 4.7108 s/op 1.01
shuffle list - 16384 els 2.4522 ms/op 1.6742 ms/op 1.46
shuffle list - 250000 els 34.955 ms/op 23.911 ms/op 1.46
getPubkeys - persistent - req 1000 vs - 250000 vc 19.388 us/op 17.650 us/op 1.10
BLS verify - blst-native 1.8677 ms/op 1.8594 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 3.8346 ms/op 3.8101 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst-native 8.2569 ms/op 8.2137 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 29.947 ms/op 32.379 ms/op 0.92
BLS aggregatePubkeys 32 - blst-native 42.120 us/op 40.073 us/op 1.05
BLS aggregatePubkeys 128 - blst-native 155.53 us/op 155.41 us/op 1.00
getAttestationsForBlock 107.91 ms/op 85.200 ms/op 1.27
validate gossip signedAggregateAndProof - struct 3.9287 ms/op 6.1898 ms/op 0.63
validate gossip signedAggregateAndProof - treeBacked 3.8866 ms/op 4.5662 ms/op 0.85
validate gossip attestation - struct 1.8061 ms/op 2.1206 ms/op 0.85
validate gossip attestation - treeBacked 1.8782 ms/op 2.1627 ms/op 0.87

by benchmarkbot/action

wemeetagain
wemeetagain previously approved these changes Aug 9, 2021
@wemeetagain wemeetagain merged commit c9e92a7 into master Aug 9, 2021
@wemeetagain wemeetagain deleted the dapplion/totalActiveBalance branch August 9, 2021 20:33
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