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

Properly Return Finalized Epoch in GetValidatorParticipation Archival Endpoint #4091

Merged
merged 12 commits into from
Nov 25, 2019

Conversation

rauljordan
Copy link
Contributor

No tracking issue


Description

Write why you are making the changes in this pull request

We currently face a problem that the GetValidatorParticipation archival endpoint always returns true for the value of Finalized bool in the response. It turns out that was hardcoded.

Write a summary of the changes you are making

Instead, we set the value of finalized in the response as:

Finalized:     requestedEpoch <= headState.FinalizedCheckpoint.Epoch,

An invariant of finality is that any epoch <= a finalized epoch is also finalized by definition. Thanks @terencechain for the suggestion.

terencechain
terencechain previously approved these changes Nov 22, 2019
prestonvanloon
prestonvanloon previously approved these changes Nov 23, 2019
@@ -371,7 +371,7 @@ func (bs *Server) GetValidatorParticipation(
}
return &ethpb.ValidatorParticipationResponse{
Epoch: requestedEpoch,
Finalized: true,
Copy link
Member

Choose a reason for hiding this comment

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

🤦‍♂️

@codecov
Copy link

codecov bot commented Nov 25, 2019

Codecov Report

Merging #4091 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4091   +/-   ##
=======================================
  Coverage   10.74%   10.74%           
=======================================
  Files         165      165           
  Lines       10873    10873           
=======================================
  Hits         1168     1168           
  Misses       9557     9557           
  Partials      148      148

@prylabs-bulldozer prylabs-bulldozer bot merged commit feb1267 into master Nov 25, 2019
@delete-merged-branch delete-merged-branch bot deleted the archive-finality branch November 25, 2019 15:26
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 24, 2020
… Endpoint (prysmaticlabs#4091)

* properly handle retrieving archived finalized epochs
* test passes for determining if epoch finalized
* Merge branch 'master' into archive-finality
* Merge refs/heads/master into archive-finality
* Merge refs/heads/master into archive-finality
* Merge refs/heads/master into archive-finality
* Merge refs/heads/master into archive-finality
* Merge refs/heads/master into archive-finality
* Merge branch 'master' into archive-finality
* prevent setup panic
* Merge branch 'archive-finality' of github.com:prysmaticlabs/prysm into archive-finality
* Merge refs/heads/master into archive-finality
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 28, 2020
… Endpoint (prysmaticlabs#4091)

* properly handle retrieving archived finalized epochs
* test passes for determining if epoch finalized
* Merge branch 'master' into archive-finality
* Merge refs/heads/master into archive-finality
* Merge refs/heads/master into archive-finality
* Merge refs/heads/master into archive-finality
* Merge refs/heads/master into archive-finality
* Merge refs/heads/master into archive-finality
* Merge branch 'master' into archive-finality
* prevent setup panic
* Merge branch 'archive-finality' of github.com:prysmaticlabs/prysm into archive-finality
* Merge refs/heads/master into archive-finality
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.

4 participants