Avoid disputing WindowedPoSt messages when the target Miner has no balance to pay rewards #11715
Closed
3 of 9 tasks
Labels
effort/hours
Effort: Hours
good first issue
Good for newcomers
help wanted
Extra attention is needed
kind/feature
Kind: Feature
Checklist
Ideas
.Lotus component
What is the motivation behind this feature request? Is your feature request related to a problem? Please describe.
In #11703, a user came across an edge case where an SP:
This left the SP's miner actor with a bad proof but without any funds to pay for disputes. On the other hand, given that the sectors have been terminated and termination fees were already paid we don't really care about fining the SP for the bad proofs anyways.
But... we still don't want to submit dispute messages in this case because doing so isn't free and doesn't really serve a purpose.
Describe the solution you'd like
Before sending a dispute to a miner actor, validate that the miner actor has a non-zero balance. If it has a zero balance, skip it.
We'll likely want to skip/check at the top of this loop by calling
api.WalletBalance
on the target miner actor's address:lotus/cli/disputer.go
Line 240 in 81e65db
Describe alternatives you've considered
It would be better to determine if sending the dispute is likely to be profitable, but that's significantly more challenging (we'd need to look at gas costs, calculate expected fines/rewards, etc.). Simply checking if the balance is 0 should be sufficient in most cases.
Additional context
No response
The text was updated successfully, but these errors were encountered: