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

Keep chunk length less than blob length #702

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

mooselumph
Copy link
Contributor

Why are these changes needed?

Updates chunk length proposal logic so that chunk lengths are never greater than blob lengths.

Checks

  • I've made sure the lint is passing in this PR.
  • 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.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@@ -234,6 +235,10 @@ func (c *StdAssignmentCoordinator) CalculateChunkLength(state *OperatorState, bl

for {

if chunkLength > blobLength {
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to place this check as a condition in ValidateChunkLength?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's essential, but it probably makes sense. I'll add it.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I was thinking if we moved this to ValidateChunkLength, we wouldn't even need to validate it here as its done in L256

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Changed it.

@@ -230,10 +236,18 @@ func (c *StdAssignmentCoordinator) ValidateChunkLength(state *OperatorState, blo
// too large for the constraint in ValidateChunkLength
func (c *StdAssignmentCoordinator) CalculateChunkLength(state *OperatorState, blobLength, targetNumChunks uint, param *SecurityParam) (uint, error) {

if targetNumChunks != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why target num chunks has to be zero? Actually it's not used below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should deprecate this feature:

  • It's currently not used.
  • It's insufficient for the intended purpose (DAS)

New design here: https://www.notion.so/eigen-labs/Data-Allocation-v3-a75080bd7d334365809bbb2cfcaae538

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.

3 participants