-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
beacon-chain/rpc/validator/status.go
Outdated
@@ -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 { |
There was a problem hiding this comment.
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 Report
@@ 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 |
… into val-active-fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
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.