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 Archival Assignment Retrieval #4480

Merged
merged 12 commits into from Jan 11, 2020
Merged

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Jan 10, 2020

Brings down archival assignment retrieval response times by only iterating through committees once and storing them all in a map.

@nisdas nisdas added the Ready For Review A pull request ready for code review label Jan 10, 2020
@codecov
Copy link

codecov bot commented Jan 10, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@0a3d543). Click here to learn what that means.
The diff coverage is 18.34%.

@@            Coverage Diff            @@
##             master    #4480   +/-   ##
=========================================
  Coverage          ?   39.82%           
=========================================
  Files             ?      193           
  Lines             ?    13156           
  Branches          ?        0           
=========================================
  Hits              ?     5239           
  Misses            ?     7029           
  Partials          ?      888

Copy link
Contributor

@rauljordan rauljordan left a comment

Choose a reason for hiding this comment

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

Just a typo change request, nice optimization

AttesterSlot: attesterSlot,
ProposerSlot: proposerSlot,
PublicKey: headState.Validators[index].PublicKey,
assignment, ok := archivedAssingments[index]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
assignment, ok := archivedAssingments[index]
assignment, ok := archivedAssignments[index]

}
proposerIndexToSlot[i] = slot
}

assingmentMap := make(map[uint64]*ethpb.ValidatorAssignments_CommitteeAssignment)
Copy link
Member

Choose a reason for hiding this comment

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

typo

@prylabs-bulldozer prylabs-bulldozer bot merged commit f6eea8e into master Jan 11, 2020
@delete-merged-branch delete-merged-branch bot deleted the optimizeArchival branch January 11, 2020 01:19
@rauljordan rauljordan mentioned this pull request Jan 13, 2020
6 tasks
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 24, 2020
* optimize further
* remove func
* Merge branch 'master' into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* raul's review
* Merge branch 'optimizeArchival' of https://github.com/prysmaticlabs/geth-sharding into optimizeArchival
* preston's review
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 28, 2020
* optimize further
* remove func
* Merge branch 'master' into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* Merge refs/heads/master into optimizeArchival
* raul's review
* Merge branch 'optimizeArchival' of https://github.com/prysmaticlabs/geth-sharding into optimizeArchival
* preston's review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants