-
Notifications
You must be signed in to change notification settings - Fork 989
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
Initial algorithm for nominating valid 'parallel' tx sets. #4486
base: master
Are you sure you want to change the base?
Conversation
f911313
to
46e2e52
Compare
46e2e52
to
ba6137b
Compare
This is a relatively simple algorithm, but it should be serviceable for traffic with relatively low amount of transitive IO conflicts.
ba6137b
to
8afa754
Compare
{ | ||
ZoneScoped; | ||
// A fast-fail condition to ensure that adding the transaction won't | ||
// exceed the theorethical limit of instructions per stage. |
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.
// exceed the theorethical limit of instructions per stage. | |
// exceed the theoretical limit of instructions per stage. |
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.
Fixed
std::vector<std::shared_ptr<Cluster const>> | ||
createNewClusters(BuilderTx const& tx, | ||
std::unordered_set<Cluster const*> const& txConflicts, | ||
bool& packed) |
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.
Instead of returning packed
as a ref parameter, why not return a pair eg. std::pair<std::vector<std::shared_ptr<Cluster const>>, 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.
That works as well, I just wanted to avoid copying the vector unnecessarily.
// This is not configurable for now. It doesn't need to be a network-wide | ||
// setting, but on the other hand there aren't many good values for it and | ||
// it's not clear what the right way to configure it would be, if at all. | ||
SOROBAN_PHASE_STAGE_COUNT = 1; |
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 you've mentioned this setting should be dynamically determined by the contents of the tx queue instead of hardcoded. What's the plan wrt that?
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 that would be a separate PR. But I think we could make a few tx sets in parallel and use the one with the smallest amount of stages that provides roughly the same utilization.
Initial algorithm for nominating valid 'parallel' tx sets.
This is a relatively simple algorithm, but it should be serviceable for traffic with relatively low amount of transitive IO conflicts.