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

docs(adr): BlockSync Overhaul ADR #011 - Part 1 #1037

Merged
merged 16 commits into from
Sep 20, 2022
Merged

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented Aug 23, 2022

@Wondertan Wondertan added the docs:adr ADR label Aug 23, 2022
@Wondertan Wondertan self-assigned this Aug 23, 2022
@Wondertan Wondertan added the kind:misc Attached to miscellaneous PRs label Aug 23, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2022

Codecov Report

Merging #1037 (e6fda67) into main (190e4d0) will decrease coverage by 0.50%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1037      +/-   ##
==========================================
- Coverage   57.39%   56.89%   -0.51%     
==========================================
  Files         133      136       +3     
  Lines        8307     9063     +756     
==========================================
+ Hits         4768     5156     +388     
- Misses       3067     3368     +301     
- Partials      472      539      +67     
Impacted Files Coverage Δ
cmd/flags_node.go 66.66% <0.00%> (-10.26%) ⬇️
params/default.go 13.88% <0.00%> (-0.82%) ⬇️
fraud/service.go 76.00% <0.00%> (-0.09%) ⬇️
node/node.go 62.50% <0.00%> (ø)
params/genesis.go 33.33% <0.00%> (ø)
params/bootstrap.go 30.76% <0.00%> (ø)
service/state/core_access.go 11.59% <0.00%> (ø)
ipld/get_namespaced_shares.go 90.51% <0.00%> (ø)
header/sync/sync_head.go 58.77% <0.00%> (ø)
fraud/sync.go 59.43% <0.00%> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Wondertan Wondertan marked this pull request as ready for review September 2, 2022 14:06
Copy link
Collaborator

@distractedm1nd distractedm1nd left a comment

Choose a reason for hiding this comment

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

Absolutely amazing! Looking great. Excited for the diagrams as well

I mainly have questions, but also had some comments from what I learned from my experiments. And some opinions I want to debate on

Still some open questions on my mind but I will think about them and extend my review later

@Wondertan Wondertan force-pushed the hlib/docs/adr-11 branch 6 times, most recently from 2d41034 to e6fda67 Compare September 14, 2022 16:51
@distractedm1nd distractedm1nd self-requested a review September 15, 2022 08:19
Copy link
Collaborator

@distractedm1nd distractedm1nd left a comment

Choose a reason for hiding this comment

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

Best ADR yet!

@Wondertan Wondertan mentioned this pull request Sep 15, 2022
45 tasks
@walldiss walldiss self-requested a review September 15, 2022 16:19
Copy link
Member

@walldiss walldiss left a comment

Choose a reason for hiding this comment

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

Awesome work!

Copy link
Member

@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.

This ADR is awesome and should be used as an example for writing ADRs org-wide :)

One nit/question: have you considered extracting EDSStore into a subpkg of share module? eds.Store ?

@Wondertan
Copy link
Member Author

Wondertan commented Sep 16, 2022

@renaynay

One nit/question: have you considered extracting EDSStore into a subpkg of share module? eds.Store ?

I thought that the share pkg would likely become too bloated and made a point about restructuring it in the EPIC. I like your idea to have a subpackage named as share/eds. Wil add it to the issue.

@Wondertan Wondertan changed the title docs(adr): BlockSync Overhaul ADR #011 docs(adr): BlockSync Overhaul ADR #011 - Part 1 Sep 20, 2022
@Wondertan Wondertan enabled auto-merge (rebase) September 20, 2022 08:16
@Wondertan Wondertan disabled auto-merge September 20, 2022 08:16
@Wondertan Wondertan merged commit 016c3d8 into main Sep 20, 2022
@Wondertan Wondertan deleted the hlib/docs/adr-11 branch September 20, 2022 09:23
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.

Awesome work!

- LN - Light Node
- FN - Full Node
- BN - Bridge Node
- [EDS(Extended Data Square)](https://github.com/celestiaorg/rsmt2d/blob/master/extendeddatasquare.go#L10) - plain Block
Copy link
Member

Choose a reason for hiding this comment

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

- [EDS(Extended Data Square)](https://github.com/celestiaorg/rsmt2d/blob/master/extendeddatasquare.go#L10) - plain Block
data omitting headers and other block metadata.
- [NMT](https://github.com/celestiaorg/nmt) - Namespaced Merkle Tree
- [DataRoot](https://github.com/celestiaorg/celestia-node/blob/main/service/share/share.go#L35) - alias for
Copy link
Member

Choose a reason for hiding this comment

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

Same, use permalink.

data omitting headers and other block metadata.
- [NMT](https://github.com/celestiaorg/nmt) - Namespaced Merkle Tree
- [DataRoot](https://github.com/celestiaorg/celestia-node/blob/main/service/share/share.go#L35) - alias for
[DAHeader](https://github.com/celestiaorg/celestia-core/blob/v0.34.x-celestia/pkg/da/data_availability_header.go#L29)
Copy link
Member

Choose a reason for hiding this comment

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

Same as above.

Comment on lines +34 to +36
The DASing, on the other hand, shows acceptable metrics for the block sizes we are aiming for initially. In the case of
the same block, a DAS operation takes 50ms * 8(technically 9) blocking requests, which is ~400ms in an ideal scenario
(excluding disk IO).
Copy link
Member

Choose a reason for hiding this comment

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

This may sounds as if we won't be touching/improving DASing at all. Though my understandig is that why it is acceptable initially, we still will want to optimize DASing as well (I think that is sth @derrandz will look into among other things AFIU).
Nothing to change here but just double-checking that we are aligned.


This ADR intends to outline design decisions for block data storage. In a nutshell, the decision is to use
___[CAR format](https://ipld.io/specs/transport/car/carv2/)___ and ___[Dagstore](https://github.com/filecoin-project/dagstore)___
for ___extended block storage___ and ___custom p2p Req/Resp protocol for block data syncing___(whole block and data by
Copy link
Member

Choose a reason for hiding this comment

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

nit: whitespaces between words and ( in general. No need to change anything but something to watch out in the future.

is focused around storing entire EDSes as a whole rather than a set of individual chunks, s.t. storage subsystem
can handle storing and streaming/serving blocks of 4MB and more.

#### EDS Serde
Copy link
Member

Choose a reason for hiding this comment

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

What does serde stand for? Shouldn't the title here be:

EDS (De-)Serialization

- [Writes](https://github.com/ipld/go-car/blob/master/car.go#L118) the shares in row-by-row order
- Iterates over in-memory Blockstore and [writes]((https://github.com/ipld/go-car/blob/master/car.go#L118)) NMT Merkle
proofs stored in it

Copy link
Member

Choose a reason for hiding this comment

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

All above links should be perma-links. Otherwise they will be out of date shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs:adr ADR kind:misc Attached to miscellaneous PRs
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants