livepeer / go-livepeer

Official Go implementation of the Livepeer protocol
http://livepeer.org
MIT License
538 stars 168 forks source link

fix(ai): prevent insufficient capacity payments #3035

Closed rickstaa closed 4 months ago

rickstaa commented 4 months ago

[!WARNING] Depends on https://github.com/livepeer/ai-worker/pull/73 to be merged. Additionally the mod.go file should be updated to poitn to the right worker commit.

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

This commit enhances the Orchestrator's capacity handling by returningan error prior to processing payments when capacity is insufficient. This prevents that the Gateway overpays for requests.

Specific updates (required)

How did you test each of these updates (required)

Does this pull request close any open issues?

https://linear.app/livepeer-ai-spe/issue/LIV-175/orchestrators-get-paid-for-unsuccessful-jobs

Checklist:

rickstaa commented 4 months ago

@yondonfu, I've reviewed the payment workflow and it appears to be functioning as expected. Could you quickly confirm if you see any issues with this fix?

yondonfu commented 4 months ago

@yondonfu, I've reviewed the payment workflow and it appears to be functioning as expected. Could you quickly confirm if you see any issues with this fix?

Looks reasonable!