-
Notifications
You must be signed in to change notification settings - Fork 182
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
fix(ai): improve AI selection algorithm #3030
Conversation
640fd85
to
a69500c
Compare
This commit modifies the selection algorithm to continue retrying for a duration of one second instead of stopping after four attempts. This change addresses issues encountered with the current algorithm's performance in environments with 15 nodes on the network, ensuring more robust and reliable operation until further optimizations can be implemented.
a69500c
to
5a08c6d
Compare
This commit replaces the time-based for-loop in the selection algorithm's retry logic with a more context-aware approach.
87d8213
to
a3007cf
Compare
Here's @yondonfu; this straightforward solution might help ease the situation. I have several other PRs lined up to fix the double selection, but this one is ready for merging if there are no objections. I also am finishing a tech spec explaining all the improvements that can be made. The only downside I see is the increased cost because we pay orch's for returning an |
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.
Changes look good to me. This will make the selection process much more efficient
What does this pull request do? Explain your changes. (required)
This pull request modifies the selection algorithm to continue retrying for a duration of one second instead of stopping after four attempts. This change addresses issues encountered with the current algorithm's performance in environments with 15 nodes on the network, ensuring more robust and reliable operation until further optimizations can be implemented.
Specific updates (required)
How did you test each of these updates (required)
I tested it offchain/onchain on my development Gateway.
Does this pull request close any open issues?
Checklist:
make
runs successfully./test.sh
pass