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

service/block: new block listener + erasure coding #77

Merged
merged 4 commits into from
Sep 28, 2021

Conversation

renaynay
Copy link
Member

@renaynay renaynay commented Sep 21, 2021

This PR implements a new block listener loops that, upon receiving a new block from the fetcher, will handle it by doing the following:

  1. erasure coding the raw block
  2. generating the DataAvailabilityHeader from the extended block data
  3. doing a bad encoding fraud proof check
  4. storing the extended block

Number 3 and 4 are stubbed out at the moment, but will be implemented at a later time. Number 3 is optional to implement before Devnet.

Related to celestiaorg/celestia-specs#26, celestiaorg/celestia-specs#25
Resolves celestiaorg/celestia-specs#56

TODO

  • figure out error handling (what deserves a fatal out vs a retry)
  • unit test
  • add logging

@renaynay renaynay force-pushed the block-service-erasure-coding branch 3 times, most recently from 22ba323 to 2ad2cf7 Compare September 22, 2021 09:48
@renaynay renaynay linked an issue Sep 22, 2021 that may be closed by this pull request
@renaynay renaynay marked this pull request as ready for review September 23, 2021 14:17
@renaynay renaynay added the area:block Raw blocks and erasure coded blocks label Sep 23, 2021
@renaynay renaynay changed the title [-- DRAFT --] service/block: new block listener + erasure coding service/block: new block listener + erasure coding Sep 23, 2021
@renaynay renaynay linked an issue Sep 23, 2021 that may be closed by this pull request
8 tasks
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.

First pass, looks good so far. Some comments.

go.mod Outdated Show resolved Hide resolved
service/block/erasure.go Outdated Show resolved Hide resolved
service/block/fraud.go Outdated Show resolved Hide resolved
service/block/types.go 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.

Looks good!

go.mod Outdated Show resolved Hide resolved
service/block/event.go Show resolved Hide resolved
service/block/event.go Show resolved Hide resolved
service/block/event.go Outdated Show resolved Hide resolved
service/block/erasure.go Show resolved Hide resolved
service/block/erasure.go Outdated 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.

👏🏼

service/block/event.go Show resolved Hide resolved
service/block/types.go Show resolved Hide resolved
@renaynay renaynay merged commit dfc9d74 into celestiaorg:main Sep 28, 2021
@renaynay renaynay deleted the block-service-erasure-coding branch September 28, 2021 15:44
@ghost ghost mentioned this pull request Apr 26, 2023
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.

3 participants