-
Notifications
You must be signed in to change notification settings - Fork 0
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
Broadcaster code review + an alternative #4
Conversation
service/header/core_listener.go
Outdated
log.Errorw("core-listener: getting next header", "err", err) | ||
return | ||
log.Errorw("core-listener: getting block info", "err", err) | ||
continue |
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.
This is an arguable moment, so we can either:
- Error and go zombie
- Error and continue, hoping that the next one is ok.
Both ways have bad and good points. We can decide together.
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.
for now, we should error out, this will cause issues with trying to store the next block (height adjacency)
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.
All looks great to me, thanks for the detailed comments - left one comment re: failing out of listener. We can discuss.
service/header/core_listener.go
Outdated
log.Errorw("core-listener: getting next header", "err", err) | ||
return | ||
log.Errorw("core-listener: getting block info", "err", err) | ||
continue |
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.
for now, we should error out, this will cause issues with trying to store the next block (height adjacency)
Ok, I am removing continues and taking returns back. |
…casting new `ExtendedHeader`s to the gossipsub network (#327) * core listener * set ctx and cancelfunc to nil after stopped service * changelog * changelog remove todod * feat(core): add GetBlockInfo to Fetcher (#3) feat(service/header): make a helper to assemble ExtendedHeaders refactor(service/header): make core exchange to rely on new helpers refactor(service/header): make core listener to rely on new helpers refactor(node/core): rework construction of core exchange refactor(service): remove erasure as redudandant chore: lint * chore: lint * Broadcaster code review + an alternative (#4) * fix(core): wrap errors instead of logging them * fix(service/header): fix lifecylces issues and make listener more minimal * fix(service/header): core listener should stop if at least one error happens * log(service/header): make annoying 'validation error' a warning * use commit height in GetBlockInfo Co-authored-by: Hlib Kanunnikov <hlibwondertan@gmail.com>
No description provided.