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

Feature branch blob proof #3985

Open
wants to merge 5 commits into
base: feature/api-breaks
Choose a base branch
from

Conversation

vgonkivs
Copy link
Member

@vgonkivs vgonkivs commented Dec 6, 2024

Merge Blob Proof feature branch to api/breaks

@vgonkivs vgonkivs added kind:break! Attached to breaking PRs kind:misc Attached to miscellaneous PRs labels Dec 6, 2024
@vgonkivs vgonkivs requested a review from rach-id December 6, 2024 12:54
Copy link

mergify bot commented Dec 6, 2024

⚠️ The sha of the head commit of this PR conflicts with #3796. Mergify cannot evaluate rules on this PR. ⚠️

@vgonkivs vgonkivs marked this pull request as draft December 6, 2024 13:32
@vgonkivs vgonkivs force-pushed the feature_branch_blob_proof branch from f9a3187 to 29dcf79 Compare December 9, 2024 15:26
Copy link

mergify bot commented Dec 9, 2024

⚠️ The sha of the head commit of this PR conflicts with #3796. Mergify cannot evaluate rules on this PR. ⚠️

@vgonkivs vgonkivs force-pushed the feature_branch_blob_proof branch from 29dcf79 to 664255c Compare December 9, 2024 15:29
@vgonkivs vgonkivs marked this pull request as ready for review December 9, 2024 15:30
Copy link
Member

@rach-id rach-id left a comment

Choose a reason for hiding this comment

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

🎉 🎉
Great working fixing all the conflicts 🙏 Thanks a lot for helping with this

@@ -6,54 +6,162 @@ import (
"errors"
"fmt"

"github.com/tendermint/tendermint/crypto/merkle"
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like it should be "github.com/celestiaorg/go-square/merkle" 😉

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for other files.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I see that in go.mod github.com/celestiaorg/go-square/merkle got removed. Also, in go-square/v2 there is no merkle package anymore. So, I might be wrong about bad import.

return ErrInvalidProof
// Verify takes a data root and verifies if the
// provided proof's subtree roots were committed to the given data root.
func (p *Proof) Verify(dataRoot []byte) (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a bool return param at all? Looks like it's only true when error is nil.

}

func (com Commitment) String() string {
return string(com)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be hex or base64 ?

@@ -294,26 +290,41 @@ func TestBlobService_Get(t *testing.T) {
require.ErrorIs(t, err, ErrInvalidProof)
included, ok := res.(bool)
require.True(t, ok)
require.True(t, included)
require.False(t, included)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why it's inverted now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:break! Attached to breaking PRs kind:misc Attached to miscellaneous PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants