-
Notifications
You must be signed in to change notification settings - Fork 193
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
base: master
Are you sure you want to change the base?
Conversation
core/assignment.go
Outdated
@@ -234,6 +235,10 @@ func (c *StdAssignmentCoordinator) CalculateChunkLength(state *OperatorState, bl | |||
|
|||
for { | |||
|
|||
if chunkLength > blobLength { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Why are these changes needed?
Updates chunk length proposal logic so that chunk lengths are never greater than blob lengths.
Checks