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

block: create Fetcher interface #59

Merged
merged 5 commits into from
Sep 20, 2021

Conversation

renaynay
Copy link
Member

@renaynay renaynay commented Sep 13, 2021

This PR introduces a block Fetcher interface that will encompass the behaviour necessary for the BlockService to get new blocks either directly from a Core node or from the Celestia network.

It also adds an implementation of Fetcher for the Core Client

TODO

  • Add BlockService to Full node

Related to #25 and #26

@renaynay renaynay added the area:block Raw blocks and erasure coded blocks label Sep 13, 2021
@renaynay renaynay force-pushed the block-service-fetcher branch 4 times, most recently from dbcccac to bfa5c45 Compare September 14, 2021 14:59
@renaynay renaynay changed the title [ --DRAFT-- ] block: create Fetcher interface block: create Fetcher interface Sep 14, 2021
@renaynay renaynay marked this pull request as ready for review September 14, 2021 16:18
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
node/full.go Outdated Show resolved Hide resolved
node/node.go Show resolved Hide resolved
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

This PR looks good to me for the most part. I don't understand why that channel should be guarded by a mutex? (cc @Wondertan) Otherwise left some minor suggestions.

core/fetcher.go Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
node/node.go Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
@renaynay
Copy link
Member Author

re #59 (comment) @Wondertan -- because this channel is specifically to listen for new block events.

liamsi
liamsi previously approved these changes Sep 16, 2021
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

👍🏼

Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

Should be the final change requestor.

core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
core/fetcher.go Show resolved Hide resolved
core/fetcher.go Outdated Show resolved Hide resolved
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

Approve from :shipit: department

Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

Great work @renaynay and thanks for the thorough reviews @Wondertan 👏🏼

@renaynay renaynay merged commit a7f403a into celestiaorg:main Sep 20, 2021
@renaynay renaynay deleted the block-service-fetcher branch September 20, 2021 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:block Raw blocks and erasure coded blocks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

block: Implement NewBlockEventSubscription block: Implement BlockService
4 participants