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

Add `IgnoreSenderReserveRequirements` param

Open stronk-dev opened this issue 3 months ago • 3 comments

What does this pull request do? Explain your changes. (required) Adds a parameter which, instead of doing the full check to prevent double spending (split reserve + deposit across orch pool + subtract pending tickets), does a simple check: does the current deposit cover the ticket payout?

Specific updates (required)

  • Added new param
  • Added new function to the SenderMonitor (and it's Redeemer equivalent) to retrieve only the (cached) deposit
  • Modified reserve checks to use the new or old approach
  • Added simple test cases

How did you test each of these updates (required) Not tested yet.

Does this pull request close any open issues? Related to #3746 and #3744, but a PR with the proper fix (monitor avg gas price) will also be put up as a proper solution.

Checklist:

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

stronk-dev avatar Sep 24 '25 18:09 stronk-dev

Note that we currently check if only the deposit covers the ticket face value. We could instead check if the deposit+reserve covers the ticket value.

stronk-dev avatar Sep 24 '25 18:09 stronk-dev

Considering shortening IgnoreSenderReserveRequirements to prevent the formatter shifting huge blocks of code

stronk-dev avatar Sep 24 '25 20:09 stronk-dev

Considering shortening IgnoreSenderReserveRequirements to prevent the formatter shifting huge blocks of code

Yeah, I think IgnoreSenderReserve is fine.

leszko avatar Sep 26 '25 12:09 leszko