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): add get proof by namespace #1339

Merged

Conversation

walldiss
Copy link
Member

Resolves #1117

@walldiss walldiss added the kind:feat Attached to feature PRs label Nov 10, 2022
@walldiss walldiss self-assigned this Nov 10, 2022
@walldiss walldiss force-pushed the get_shares_with_proofs_by_namespace branch 2 times, most recently from 68ea1cb to 8c9ec98 Compare November 10, 2022 13:48
@walldiss walldiss changed the title add get proof by namespace share: add get proof by namespace Nov 10, 2022
@walldiss walldiss changed the title share: add get proof by namespace feat(share): add get proof by namespace Nov 10, 2022
@walldiss walldiss added the area:shares Shares and samples label Nov 10, 2022
@walldiss walldiss marked this pull request as ready for review November 10, 2022 14:06
@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2022

Codecov Report

Merging #1339 (24f2e83) into main (bd13b76) will increase coverage by 0.93%.
The diff coverage is 96.52%.

@@            Coverage Diff             @@
##             main    #1339      +/-   ##
==========================================
+ Coverage   55.06%   56.00%   +0.93%     
==========================================
  Files         178      186       +8     
  Lines       10689    11416     +727     
==========================================
+ Hits         5886     6393     +507     
- Misses       4227     4396     +169     
- Partials      576      627      +51     
Impacted Files Coverage Δ
share/eds/retriever.go 93.71% <ø> (ø)
share/ipld/nmt.go 48.43% <ø> (ø)
share/ipld/get.go 92.18% <95.40%> (-0.45%) ⬇️
share/eds/byzantine/share_proof.go 81.03% <100.00%> (-8.63%) ⬇️
share/get.go 90.62% <100.00%> (ø)
share/ipld/proof.go 100.00% <100.00%> (ø)
share/service/service.go 75.34% <100.00%> (ø)
nodebuilder/core/opts.go 0.00% <0.00%> (-50.00%) ⬇️
nodebuilder/core/config.go 57.14% <0.00%> (-5.36%) ⬇️
... and 45 more

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

@walldiss walldiss force-pushed the get_shares_with_proofs_by_namespace branch 2 times, most recently from 90aacb0 to 2286beb Compare November 10, 2022 15:43
@vgonkivs
Copy link
Member

vgonkivs commented Nov 10, 2022

It seems that GetSharesWithProofByNameSpace and GetSharesByNamespace are pretty similar. I'm wondering, can we leave only one implementation but pass additional param(e.g. withProof flag)

wdyt @walldiss , @Wondertan ?

@Wondertan
Copy link
Member

Yeah, we should do this. Leaving this to @walldiss to decide whether we should do in this PR or make a tech debt/refactoring issues

@walldiss
Copy link
Member Author

walldiss commented Nov 10, 2022

I think it is a very good suggestion since functions are almost similar. I'll reduce both function to single one

@walldiss walldiss force-pushed the get_shares_with_proofs_by_namespace branch 2 times, most recently from 1e672fc to 03b441c Compare November 10, 2022 16:31
Copy link
Member

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

Looks great!

share/get_proof_test.go Outdated Show resolved Hide resolved
share/get_proof_test.go Outdated Show resolved Hide resolved
share/get_proof_test.go Outdated Show resolved Hide resolved
share/get_proof_test.go Outdated Show resolved Hide resolved
share/get_proof_test.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
@walldiss walldiss force-pushed the get_shares_with_proofs_by_namespace branch from 15d61a6 to 9891efa Compare November 14, 2022 16:40
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.

intermediate comments, haven't reviewed fully.

share/get_proof.go Outdated Show resolved Hide resolved
share/get_proof.go Outdated Show resolved Hide resolved
share/get_proof.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/get_proof.go Outdated Show resolved Hide resolved
share/get_proof_test.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
@walldiss walldiss force-pushed the get_shares_with_proofs_by_namespace branch from 568b7f1 to 939717e Compare November 16, 2022 15:49
share/get_proof.go Outdated Show resolved Hide resolved
share/get_proof.go Outdated Show resolved Hide resolved
share/get_proof.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/get_test.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
distractedm1nd
distractedm1nd previously approved these changes Nov 17, 2022
Copy link
Member

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

I like this a lot, great work

share/ipld/get.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
share/get_test.go Outdated Show resolved Hide resolved
share/ipld/get.go Outdated Show resolved Hide resolved
@walldiss walldiss force-pushed the get_shares_with_proofs_by_namespace branch 3 times, most recently from 53f3594 to 15df954 Compare November 28, 2022 18:21
renaynay
renaynay previously approved these changes Nov 28, 2022
share/ipld/get.go Show resolved Hide resolved
distractedm1nd
distractedm1nd previously approved these changes Nov 29, 2022
Copy link
Member

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

great stuff!

share/ipld/proof.go Outdated Show resolved Hide resolved
@walldiss walldiss force-pushed the get_shares_with_proofs_by_namespace branch from 1cfe6e7 to cecc5bf Compare November 29, 2022 11:15
@walldiss walldiss merged commit c05065e into celestiaorg:main Nov 29, 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
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

share: Extend GetSharesByNamespace with an option to collect Merkle proofs
7 participants