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!: share.Getter and getters.IPLDGetter #1518

Merged
merged 17 commits into from
Jan 9, 2023

Conversation

distractedm1nd
Copy link
Collaborator

@distractedm1nd distractedm1nd commented Dec 20, 2022

Overview

Closes #1488

  • removes service.ShareService
  • introduces share.Getter
  • implements getters.IPLDGetter
  • Full/Light share.Availability implementations now take a share.Getter
  • Updates ADR with new interface
  • Updates share Module/API defs and mocks

TODO:

  • Different directory structure?
  • Test changes, looking forward to suggestions + improvements

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Linked issues closed with keywords

@distractedm1nd distractedm1nd added area:shares Shares and samples kind:feat Attached to feature PRs labels Dec 20, 2022
@distractedm1nd distractedm1nd self-assigned this Dec 20, 2022
@Wondertan
Copy link
Member

#1488 was updated with the final form of the Getter interface.

We don't have to implement NamespaceShares.Verify here and can live it to #1497/

@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2022

Codecov Report

Merging #1518 (af636ed) into main (bbe34a2) will increase coverage by 0.08%.
The diff coverage is 74.59%.

@@            Coverage Diff             @@
##             main    #1518      +/-   ##
==========================================
+ Coverage   55.42%   55.51%   +0.08%     
==========================================
  Files         214      215       +1     
  Lines       13123    13172      +49     
==========================================
+ Hits         7274     7313      +39     
- Misses       5107     5117      +10     
  Partials      742      742              
Impacted Files Coverage Δ
api/gateway/share.go 0.00% <0.00%> (ø)
nodebuilder/das/mocks/api.go 65.21% <0.00%> (-34.79%) ⬇️
nodebuilder/fraud/mocks/api.go 16.66% <ø> (ø)
nodebuilder/header/mocks/api.go 46.87% <0.00%> (ø)
nodebuilder/share/mocks/api.go 8.16% <0.00%> (ø)
nodebuilder/share/share.go 0.00% <0.00%> (ø)
nodebuilder/state/mocks/api.go 18.32% <ø> (ø)
share/availability/test/testing.go 81.01% <ø> (ø)
share/getter.go 84.09% <84.09%> (ø)
share/getters/ipld.go 86.30% <86.30%> (ø)
... and 10 more

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

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.

Breaking and needs some adiditonal reviewes on comments and error messages, but overall a great work + refactor.

Mostly thoughts and notes, but also a few things needs to be changed, like proof collection seems to be broken.

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.

In sync with @distractedm1nd, we decided to:

  • Remove caching out of IPLDGetter and future ShrexGetter and make this caching work via a new TeeGetter
  • Change GetShares to Getter interface to GetEDS returning full rsmt2d EDS structure
  • EDS to implement JSON(Un)Marhaller interfaces to make it compatible with RPC

Wondertan
Wondertan previously approved these changes Dec 22, 2022
vgonkivs
vgonkivs previously approved these changes Jan 3, 2023
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.

👍🏻

@Wondertan Wondertan mentioned this pull request Jan 9, 2023
4 tasks
@distractedm1nd distractedm1nd changed the title feat: share.Getter and getters.IPLDGetter feat!: share.Getter and getters.IPLDGetter Jan 9, 2023
@distractedm1nd distractedm1nd added kind:break! Attached to breaking PRs and removed kind:feat Attached to feature PRs labels Jan 9, 2023
@distractedm1nd distractedm1nd merged commit aa40a54 into celestiaorg:main Jan 9, 2023
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:break! Attached to breaking PRs
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

share: Getter interface and IPLDGetter
8 participants