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

Solve -1 ActivationEpoch in validator logging #5569

Merged
merged 17 commits into from Apr 22, 2020
Merged

Conversation

0xKiwi
Copy link
Contributor

@0xKiwi 0xKiwi commented Apr 21, 2020

Not sure entirely what causes this specific code path, but there may be a case where a PENDING validator gets -1 for its ActivationEpoch on its logs. This solves the problem by removing all int64s which would lead to FarFutureEpoch being -1.

@0xKiwi 0xKiwi requested a review from a team as a code owner April 21, 2020 19:32
@0xKiwi 0xKiwi changed the title Solve -1 ActivationEpoch in logging Solve -1 ActivationEpoch in validator logging Apr 21, 2020
@0xKiwi 0xKiwi added the Ready For Review A pull request ready for code review label Apr 21, 2020
rauljordan
rauljordan previously approved these changes Apr 21, 2020
@@ -91,7 +90,9 @@ func (vs *Server) validatorStatus(ctx context.Context, pubKey []byte, headState
traceutil.AnnotateError(span, err)
return resp
}
resp.ActivationEpoch = int64(val.ActivationEpoch)
if val.ActivationEpoch != params.BeaconConfig().FarFutureEpoch {
Copy link
Member

Choose a reason for hiding this comment

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

Please change this back. Far future epoch is the new "zero".

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #5569 into master will increase coverage by 33.88%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master    #5569       +/-   ##
===========================================
+ Coverage   19.98%   53.87%   +33.88%     
===========================================
  Files         239      310       +71     
  Lines       20637    25391     +4754     
===========================================
+ Hits         4125    13680     +9555     
+ Misses      15718     9730     -5988     
- Partials      794     1981     +1187     

Copy link
Member

@prestonvanloon prestonvanloon left a comment

Choose a reason for hiding this comment

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

Nice

@rauljordan rauljordan merged commit 8b058b5 into master Apr 22, 2020
@delete-merged-branch delete-merged-branch bot deleted the val-active-fix branch April 22, 2020 22:47
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