-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add runtime scheduling constraints #3689
Conversation
5a061e4
to
96db053
Compare
Codecov Report
@@ Coverage Diff @@
## master #3689 +/- ##
==========================================
+ Coverage 66.62% 66.80% +0.18%
==========================================
Files 400 400
Lines 39660 39769 +109
==========================================
+ Hits 26424 26569 +145
+ Misses 9460 9418 -42
- Partials 3776 3782 +6
Continue to review full report at Codecov.
|
96db053
to
c443d15
Compare
e5da82b
to
81a07c4
Compare
entropy, | ||
stakeAcc, | ||
entitiesEligibleForReward, | ||
validatorEntities, |
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.
ℹ️ this is the one that's added
@@ -113,10 +111,6 @@ func (e *ExecutorParameters) ValidateBasic() error { | |||
return fmt.Errorf("round timeout too small") | |||
} | |||
|
|||
if e.MinPoolSize < e.GroupSize+e.GroupBackupSize { | |||
return fmt.Errorf("minimum pool size too small") |
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.
do these checks get reinstated elsewhere?
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.
No, we could add them back to catch nonsensical configs.
backupSize = int(rt.Executor.GroupBackupSize) | ||
minPoolSize = int(rt.Executor.MinPoolSize) | ||
groupSizes[scheduler.RoleWorker] = int(rt.Executor.GroupSize) | ||
groupSizes[scheduler.RoleBackupWorker] = int(rt.Executor.GroupBackupSize) |
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.
this makes me wonder about moving the GroupSize and GroupBackupSize into the SchedulingConstraints, like this change does with MinPoolSize. are there other places where we like having it separate like this?
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.
He he, I had the exact same thought as well. It would definitely make things nicer.
21271e9
to
8abb171
Compare
Attribute(KeyExecutionDiscrepancyDetected, cbor.Marshal(tagV)). | ||
Attribute(KeyRuntimeID, ValueRuntimeID(runtime.ID)), | ||
) | ||
// This was already handled above, so it should not happen. |
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.
control shouldn't reach here, or just nothing left to do? we don't return early in the if
added above
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.
The branch added above will overwrite err
and the repeated TryFinalize
cannot (currently) return the "discrepancy detected" error. So control shouldn't reach here.
@@ -1095,6 +1120,7 @@ func setupDiscrepancy( | |||
sks []signature.Signer, | |||
committee *scheduler.Committee, | |||
nl NodeLookup, | |||
enoughBackupCommits bool, |
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.
ℹ️ due to some overlap between the worker and backup committees, some tests for worker bad behavior also result in missing backup commits
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.
'worker' and 'backup' roles are no longer exclusive with each other. that results in pretty extensive changes.
8abb171
to
8e04fa2
Compare
8e04fa2
to
c4d1f0b
Compare
Fixes #3644
TODO