-
Notifications
You must be signed in to change notification settings - Fork 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
Add a 2 second timeout to fetching eth1data #5583
Conversation
Fixing tests now |
Codecov Report
@@ Coverage Diff @@
## master #5583 +/- ##
==========================================
- Coverage 27.46% 5.02% -22.45%
==========================================
Files 239 239
Lines 20771 20655 -116
==========================================
- Hits 5705 1038 -4667
- Misses 14070 19466 +5396
+ Partials 996 151 -845 |
@@ -169,11 +175,13 @@ func (vs *Server) eth1Data(ctx context.Context, slot uint64) (*ethpb.Eth1Data, e | |||
// Look up most recent block up to timestamp | |||
blockNumber, err := vs.Eth1BlockFetcher.BlockNumberByTimestamp(ctx, eth1VotingPeriodStartTime) | |||
if err != nil { | |||
return nil, errors.Wrap(err, "could not get block number from timestamp") | |||
log.WithError(err).Error("Failed to get block number from timestamp") |
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.
We also could consider warning for these, i dont feel strongly for either, up to you!
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.
Its an error that should be monitored
This PR returns a random eth1data vote if the node has an issue retrieving data from eth1 in a timely manner.
Resolves #5521