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

Optimize ListBeaconCommittees to use committees cache #4464

Merged
merged 2 commits into from Jan 9, 2020

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Jan 9, 2020

ListBeaconCommittees uses method ComputeCommittee which bypasses the committee cache. Instead it should use method BeaconCommittee (where the cache is) and BeaconCommittee calls ComputeCommittee underneath.

It also cleans up code path where we don't need to recalculate epochOffset and totalCount, it's already taken care of by BeaconCommittee

@@ -195,7 +195,7 @@ func (s *Service) initializeBeaconChain(
eth1data *ethpb.Eth1Data) error {
_, span := trace.StartSpan(context.Background(), "beacon-chain.Service.initializeBeaconChain")
defer span.End()
log.Info("Genesis time reached, starting the beacon chain")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this log where it says genesis time reached but it hasn't reach. The log is meant for initializing beacon genesis state

@terencechain terencechain changed the title Optimize ListBeaconCommittees Optimize ListBeaconCommittees to use committees cache Jan 9, 2020
@codecov
Copy link

codecov bot commented Jan 9, 2020

Codecov Report

Merging #4464 into master will increase coverage by 22.21%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           master    #4464       +/-   ##
===========================================
+ Coverage   17.93%   40.14%   +22.21%     
===========================================
  Files         193      193               
  Lines       13037    12825      -212     
===========================================
+ Hits         2338     5149     +2811     
+ Misses      10410     6800     -3610     
- Partials      289      876      +587

@terencechain terencechain merged commit 0dd0e23 into master Jan 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix-ListBeaconCommittees branch January 9, 2020 16:28
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 24, 2020
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 28, 2020
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