Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: cli: Avoid disputing WindowedPoSt messages when the target miner has no balance to pay rewards #11800

Conversation

Nagaprasadvr
Copy link
Contributor

Avoid disputing WindowedPoSt messages when the target Miner has no balance to pay rewards

Related Issues

fixes #11715

Proposed Changes

In #11703, a user came across an edge case where an SP:

  1. Submitted a bad PoSt.
  2. Terminated their sectors.
  3. Withdrew all funds (after paying all fees).

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.

So add a check to fetch miner wallet balance and only send disputing messages if balance is non zero.

Additional Info

look at disputer.go line no 241 onwards

@Nagaprasadvr Nagaprasadvr changed the title refactor: cli: avoid-disputing-windowedPoSt-messages-when-the-target-miner-has-no-balance-to-pay-rewards refactor: cli: Avoid disputing WindowedPoSt messages when the target miner has no balance to pay rewards Mar 31, 2024
cli/disputer.go Outdated Show resolved Hide resolved
@Nagaprasadvr Nagaprasadvr force-pushed the refactor-cli-avoid-disputing-windowedPoSt-messages-when-the-target-miner-has-no-balance-to-pay-rewards branch from 5ac6b25 to 46b45f6 Compare April 4, 2024 14:02
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

cli/disputer.go Outdated Show resolved Hide resolved
cli/disputer.go Outdated Show resolved Hide resolved
cli/disputer.go Outdated Show resolved Hide resolved
@Stebalien Stebalien merged commit a67e7ad into filecoin-project:master Apr 10, 2024
184 checks passed
@Stebalien
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ☑️ Done (Archive)
Development

Successfully merging this pull request may close these issues.

Avoid disputing WindowedPoSt messages when the target Miner has no balance to pay rewards
2 participants