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

Broadcaster code review + an alternative #4

Merged
merged 4 commits into from
Jan 9, 2022

Conversation

Wondertan
Copy link
Collaborator

No description provided.

@Wondertan Wondertan requested a review from renaynay as a code owner January 8, 2022 21:32
log.Errorw("core-listener: getting next header", "err", err)
return
log.Errorw("core-listener: getting block info", "err", err)
continue
Copy link
Collaborator Author

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.

Copy link
Owner

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)

Copy link
Owner

@renaynay renaynay left a 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.

log.Errorw("core-listener: getting next header", "err", err)
return
log.Errorw("core-listener: getting block info", "err", err)
continue
Copy link
Owner

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)

@Wondertan
Copy link
Collaborator Author

Ok, I am removing continues and taking returns back.

@renaynay renaynay merged commit b7f82c2 into broadcaster Jan 9, 2022
@renaynay renaynay deleted the broadcaster-listen branch January 9, 2022 14:36
renaynay added a commit that referenced this pull request Jan 10, 2022
…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>
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.

2 participants