-
Notifications
You must be signed in to change notification settings - Fork 165
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
V2 chunk assignment #736
base: master
Are you sure you want to change the base?
V2 chunk assignment #736
Conversation
type StdAssignmentCoordinatorV2 struct { | ||
} | ||
|
||
var _ AssignmentCoordinatorV2 = (*StdAssignmentCoordinatorV2)(nil) | ||
|
||
func (c *StdAssignmentCoordinatorV2) GetAssignments(state *OperatorState, blobVersion byte, quorum QuorumID) (map[OperatorID]Assignment, error) { |
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 do we need this struct (as opposed to having methods that don't operate on a struct)? Is the idea that we may end up having multiple algorithms, and we can toggle between which algorithm we use by using a different struct that implements AssignmentCoordinatorV2
?
|
||
func (c *StdAssignmentCoordinatorV2) GetAssignment(state *OperatorState, blobVersion byte, quorum QuorumID, id OperatorID) (Assignment, error) { | ||
|
||
assignments, err := c.GetAssignments(state, blobVersion, quorum) |
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'm not sure on the planned call patterns for these methods, so it's possible what I'm about to suggest is premature optimization. Would it make sense to cache the value of GetAssignments()
instead of recomputing it each time?
Why are these changes needed?
Checks