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

Create payload->blob type system #1119

Closed
wants to merge 2 commits into from

Conversation

litt3
Copy link
Contributor

@litt3 litt3 commented Jan 16, 2025

Why are these changes needed?

  • This PR introduces a strict type system to govern the data pipeline, from payloads to blobs

Checks

  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

litt3 added 2 commits January 16, 2025 12:34
Signed-off-by: litt3 <102969658+litt3@users.noreply.github.com>
Signed-off-by: litt3 <102969658+litt3@users.noreply.github.com>
@litt3 litt3 self-assigned this Jan 16, 2025
Comment on lines +9 to +13
// A Blob will contain either an encodedPayload, or a coeffPoly. Whether the Blob contains the former or the latter
// is determined by how the dispersing client has been configured.
type Blob struct {
encodedPayload *encodedPayload
coeffPoly *coeffPoly
Copy link
Contributor

Choose a reason for hiding this comment

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

rip go and its lack of a sum type... what a shame

// followed by the encoded data [0x00, 31 bytes of data, 0x00, 31 bytes of data,...]
DefaultBlobEncoding BlobEncodingVersion = 0x0
// NOTE: this encoding will soon be updated, such that the result will be padded to align to 32 bytes
Copy link
Contributor

Choose a reason for hiding this comment

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

yes please!

@litt3 litt3 closed this Jan 16, 2025
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.

2 participants