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!: create native blob struct #74

Merged
merged 11 commits into from
Jun 19, 2024
Merged

feat!: create native blob struct #74

merged 11 commits into from
Jun 19, 2024

Conversation

cmwaters
Copy link
Collaborator

This builds on #72

Closes: #70

Note: this does not touch any of the share construction yet

Base automatically changed from cal/blob-proto to main June 18, 2024 13:26
@cmwaters cmwaters marked this pull request as ready for review June 18, 2024 13:30
@cmwaters cmwaters requested review from a team as code owners June 18, 2024 13:30
@cmwaters cmwaters requested review from rootulp, staheri14, ramin and Wondertan and removed request for a team June 18, 2024 13:30
@cmwaters
Copy link
Collaborator Author

I haven't added a maximum size check to the length of the signer. sdk.AccAddress is usually 20 bytes (the first 20 of a users public key), but in the SDK, I see a check of up to 255 bytes. Should I add one in here. Note that in celestia-app, we will have a specific check to see if it's a valid sdk.AccAddress and matches the signer of the PFB

@celestia-bot celestia-bot requested review from a team June 18, 2024 13:34
rootulp
rootulp previously approved these changes Jun 18, 2024
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

LGTM, great work

blob/blob.go Outdated Show resolved Hide resolved
shares/split_sparse_shares.go Outdated Show resolved Hide resolved
@cmwaters cmwaters marked this pull request as draft June 18, 2024 15:45
Co-authored-by: Rootul P <[email protected]>
@cmwaters cmwaters marked this pull request as ready for review June 18, 2024 15:53
@cmwaters cmwaters requested a review from rootulp June 18, 2024 15:58
Comment on lines +101 to +105
if err != nil {
// TODO: we should look at having a go native BlobTx type
// that we have already verified instead of doing it twice here
panic(fmt.Sprintf("invalid blob %d: %v", idx, err))
}
Copy link
Member

Choose a reason for hiding this comment

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

Turning this into an issue

if err != nil {
// TODO: we should look at having a go native BlobTx type
// that we have already verified instead of doing it twice here
panic(fmt.Sprintf("invalid blob %d: %v", idx, err))
Copy link
Member

Choose a reason for hiding this comment

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

[not blocking nit]

can we add add a comment to this issue to indicate that it requires that all blobs passed to it are valid?

either that or add a new method / break this api that allows for error handling. my personal preference is that we panic as high in the stack as possible as that makes the problem that much clearer.

square/builder.go Show resolved Hide resolved
shares/parse_sparse_shares.go Show resolved Hide resolved
@cmwaters cmwaters merged commit 54314fc into main Jun 19, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a local blob type
4 participants