go-livepeer icon indicating copy to clipboard operation
go-livepeer copied to clipboard

fix(ai): improve AI selection algorithm

Open rickstaa opened this issue 1 year ago • 1 comments

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)

  • The range based AI select logic was replaced by a timeout to ensure more Orchstrators get selected.

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:

  • [x] Read the contribution guide
  • [ ] make runs successfully
  • [ ] All tests in ./test.sh pass
  • [x] README and other documentation updated
  • [ ] Pending changelog updated

rickstaa avatar Apr 23 '24 12:04 rickstaa

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 insufficient capacity error. To address this, I've created a new pull request, which you can review here: PR #3035.

rickstaa avatar Apr 29 '24 19:04 rickstaa