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

Dynamic ticket EV validation on startup

Open eliteprox opened this issue 1 year ago • 0 comments
trafficstars

What does this pull request do? Explain your changes. (required)

This change validates the ticket EV of an orchestrator to ensure it is sufficient for the prices that are set during startup.

Specific updates (required)

  • Adds getLargestPrice to startup.go. This determines the largest price across all models, gateway prices and default price to verify if the -ticketEV is large enough.

How did you test each of these updates (required)

Started orchestrator:

  • Without -ticketEV 2999999999999 and with model price at 4768372. Verified it failed validation.
  • With -ticketEV 2999999999999 and verified it passed validation.

However, larger price values will not pass validation without a larger ticket EV being set. I added a recommendation in the log entry based on the current formula.

This change currently does not prevent dynamic price changes outside of valid ticketEV while the orchestrator is running.

Does this pull request close any open issues?

AI-461

Checklist:

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

eliteprox avatar Jun 24 '24 23:06 eliteprox