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

cmd, eth, server: remove claim earnings option #1637

Merged
merged 3 commits into from
Oct 21, 2020
Merged

Conversation

kyriediculous
Copy link
Contributor

What does this pull request do? Explain your changes. (required)
Removes the option from the CLI to manually claim earnings

Specific updates (required)

  • 46e7eee >> Removes the manual claim option from the CLI
  • 105a575 >> Removes autoClaimEarnings function from the ETH client and unwraps most functions that made use of it to now use the BondingManager contract bindings directly
  • 170f099 >> Keep the /claimEarnings endpoint around but no longer require an endRound field , ignore it if it is provided and just claim through currentRound

How did you test each of these updates (required)

Does this pull request close any open issues?
Fixes #1635

Checklist:

  • README and other documentation updated
  • Node runs in OSX and devenv
  • All tests in ./test.sh pass

server/webserver.go Outdated Show resolved Hide resolved
glog.Errorf("Need to provide amount")
return
}
endRound, err := lpcommon.ParseBigInt(endRoundStr)
Copy link
Member

Choose a reason for hiding this comment

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

Seems like it might be ok to allow a user to still specify an endRound. Don't imagine users needing to do this, but if they have tools that depend on being able to do this for whatever reason it might be good to not break that expectation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think there's much tooling using this, however it might be okay to force a user's hand in changing their expectation of how this functionality truly behaves currently. If those expectations are not altered somehow it will just end up incurring additional costs for those users and their expectations misalign with what optimal behaviour would be.

Copy link
Member

@yondonfu yondonfu Oct 21, 2020

Choose a reason for hiding this comment

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

I believe there are a few users that have automated claimEarnings calls via this webserver endpoint in the past. Generally, we should avoid breaking API compatibility and we should avoid making assumptions around how users use an API when we can, but I see your point about a user not realizing that there is basically no benefit in calling claimEarnings with an endRound set to anything besides the current round. Will leave this case up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually think it's fine because the API itself doesn't change. Users can still call the same endpoint with an argument (it will just be ignored).

If there are tools out there that automate claimEarnings they have become rather obsolete anyway even it's for up until the current round.

If a user needs funds it's more economical to perform a staking action for example unbond, or withdraw fees directly.
From that perspective it make even make sense to just remove the endpoint entirely, while it might misalign with user expectations (we can clarify this in the release notes) it protects users from operating inefficiently.

server/webserver.go Outdated Show resolved Hide resolved
Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

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

LGTM after squashing fixup commits

@kyriediculous kyriediculous merged commit 9aff751 into master Oct 21, 2020
@kyriediculous kyriediculous deleted the nv/remove-claim branch October 21, 2020 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove manual claim earnings option in livepeer_cli
2 participants