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

feat(blocksync): share.WriteEDS #1139

Merged
merged 18 commits into from
Oct 19, 2022

Conversation

distractedm1nd
Copy link
Member

@distractedm1nd distractedm1nd commented Sep 21, 2022

Closes #1105

Still a few todos to be solved and comments to be added, but its ready for the first round of reviews now

Will change the base branch of the PR to the feature branch when it is set up (I will wait until there is preliminary work on it)

@distractedm1nd distractedm1nd added area:shares Shares and samples kind:feat Attached to feature PRs labels Sep 21, 2022
@distractedm1nd distractedm1nd self-assigned this Sep 21, 2022
@distractedm1nd distractedm1nd changed the title feat(blocksync): share.WriteEDS feat(blocksync): share.WriteEDS Sep 22, 2022
@distractedm1nd distractedm1nd marked this pull request as ready for review September 22, 2022 12:54
@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2022

Codecov Report

Merging #1139 (79c5409) into main (d239616) will increase coverage by 0.05%.
The diff coverage is 61.80%.

@@            Coverage Diff             @@
##             main    #1139      +/-   ##
==========================================
+ Coverage   55.86%   55.92%   +0.05%     
==========================================
  Files         160      161       +1     
  Lines        9725     9869     +144     
==========================================
+ Hits         5433     5519      +86     
- Misses       3756     3796      +40     
- Partials      536      554      +18     
Impacted Files Coverage Δ
share/ipld/nmt_adder.go 74.50% <58.33%> (-4.98%) ⬇️
share/eds/eds.go 62.12% <62.12%> (ø)
fraud/bad_encoding.go 63.00% <0.00%> (-3.00%) ⬇️

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

service/share/eds.go Outdated Show resolved Hide resolved
service/share/eds.go Outdated Show resolved Hide resolved
service/share/eds.go Outdated Show resolved Hide resolved
service/share/eds.go Outdated Show resolved Hide resolved
service/share/eds.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.

Looks correct(besides that byte removal) There is a bunch of optimization that we will have to do eventually, but it's fine for now. Tmrw I will take a deep dive into that bytes mystery and how it works without it. Also, fmt needs to be done in here.

We need to test if it is indexable by DAGStore. Doesn't have to import the whole DAGStore for now and the test can only use car stuff.

service/share/eds.go Outdated Show resolved Hide resolved
service/share/eds.go Outdated Show resolved Hide resolved
service/share/eds.go Outdated Show resolved Hide resolved
Wondertan added a commit that referenced this pull request Oct 4, 2022
The code has a special case for the data with type byte and without. However, it truncates the type byte like it always there.
The #1139 is the first user of data without type byte which uncovered the bug. The type byte causes issues for us again.
Wondertan added a commit that referenced this pull request Oct 4, 2022
The code has a special case for the share data with type byte and without. However, it truncates the type byte like it is always there.
The #1139 is the first user of share data without a type byte, which uncovered the bug. The type byte causes issues for us again.
Wondertan added a commit that referenced this pull request Oct 5, 2022
The code has a special case for the share data with type byte and without. However, it truncates the type byte like it is always there.
The #1139 is the first user of share data without a type byte, which uncovered the bug. The type byte causes issues for us again.

refactor(ipld/plugin): extract namespaceHasher into a separate file with some additional cleanups

In preparation for the upcoming test for the namespaceHasher, we extract it into a separate file. Also, some additional cosmetics were done
reducing the API surfuce of the pkg, hiding things that are not supposed to be used outside.

test(ipld/plugin): write dummy unit test for the namespaceHasher
Wondertan added a commit that referenced this pull request Oct 5, 2022
The code has a special case for the share data with type byte and without. However, it truncates the type byte like it is always there.
The #1139 is the first user of share data without a type byte, which uncovered the bug. The type byte causes issues for us again.

refactor(ipld/plugin): extract namespaceHasher into a separate file with some additional cleanups

In preparation for the upcoming test for the namespaceHasher, we extract it into a separate file. Also, some additional cosmetics were done
reducing the API surfuce of the pkg, hiding things that are not supposed to be used outside.

test(ipld/plugin): write dummy unit test for the namespaceHasher

docs(ipld/plugin): godocs for the namespaceHasher

perf(ipld/plugin): use sha256-simd to gain 40% speedup for hash computations
Wondertan added a commit that referenced this pull request Oct 5, 2022
The code has a special case for the share data with type byte and without. However, it truncates the type byte like it is always there.
The #1139 is the first user of share data without a type byte, which uncovered the bug. The type byte causes issues for us again.

refactor(ipld/plugin): extract namespaceHasher into a separate file with some additional cleanups

In preparation for the upcoming test for the namespaceHasher, we extract it into a separate file. Also, some additional cosmetics were done
reducing the API surfuce of the pkg, hiding things that are not supposed to be used outside.

test(ipld/plugin): write dummy unit test for the namespaceHasher

docs(ipld/plugin): godocs for the namespaceHasher

perf(ipld/plugin): use sha256-simd to gain 40% speedup for hash computations
share/eds.go Outdated Show resolved Hide resolved
Wondertan
Wondertan previously approved these changes Oct 10, 2022
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.

LGTM. Really have no comments here. Great work.

  • We need to hold it off before consolidation is merged and then rebase it on top
  • I would still suggest testing indexing explicitly here, but definitely not blocking
  • There is a bunch of optimizations(and related refactorings) we can do here, but they are also not blocking and can be done much further

Wondertan
Wondertan previously approved these changes Oct 14, 2022
share/eds/eds.go Outdated Show resolved Hide resolved
share/eds/eds.go Outdated Show resolved Hide resolved
share/eds/eds.go Outdated Show resolved Hide resolved
share/eds/eds.go Outdated Show resolved Hide resolved
share/eds/eds.go Outdated Show resolved Hide resolved
share/eds/eds.go Outdated Show resolved Hide resolved
share/eds/eds.go Outdated Show resolved Hide resolved
share/eds/eds.go Outdated Show resolved Hide resolved
share/eds/eds_test.go Show resolved Hide resolved
share/eds/eds_test.go Outdated Show resolved Hide resolved
Co-authored-by: rene <41963722+renaynay@users.noreply.github.com>
share/eds/eds_test.go Show resolved Hide resolved
Copy link
Member

@vgonkivs vgonkivs left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

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.

Great work, looks good and clean.

share/eds.go Outdated Show resolved Hide resolved
share/eds/eds.go Show resolved Hide resolved
@distractedm1nd distractedm1nd merged commit a1ca665 into celestiaorg:main Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:shares Shares and samples kind:feat Attached to feature PRs
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

share: WriteEDS
6 participants