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

'withdraw-all-rewards' Transaction Creation Error on gaiacli #4870

Closed
4 tasks
Lunagram opened this issue Aug 8, 2019 · 4 comments · Fixed by #4872
Closed
4 tasks

'withdraw-all-rewards' Transaction Creation Error on gaiacli #4870

Lunagram opened this issue Aug 8, 2019 · 4 comments · Fixed by #4872
Labels
C:CLI C:x/distribution distribution module related S:needs more info This bug can't be addressed until more information is provided by the reporter. T: UX

Comments

@Lunagram
Copy link

Lunagram commented Aug 8, 2019

Summary of Bug

gaiacli outputs 'ERROR: no RPC client defined' when i create transaction 'withdraw-all-rewards' with '--generate-only' flag.

I have tested in several environments including my local pc, server, Android.

Version

gaiacli v1.0.0-rc2
gaiacli v1.0.0-rc3

Steps to Reproduce

Just use the command below.

gaiacli tx distribution withdraw-all-rewards --from={my_address} --generate-only=true --node={my_test_node} --chain-id={my_chain_id}


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

alexanderbez commented Aug 8, 2019

Hmmm, good catch. This happens because you're supplying --generate-only. This means that you wish to construct the transaction "offline" (i.e. perform no queries).

However, the withdraw-all-rewards is special here because it requires a lookup of all the validators (behind the scenes):

// retrieve the comprehensive list of all validators which the
// delegator had submitted delegations to
bz, err := QueryDelegatorValidators(cliCtx, queryRoute, delegatorAddr)
if err != nil {
	return nil, err
}

This command will obviously work without --generate-only. So I'm not sure what the best course of action is here. We probably have to disable this command when --generate-only is given 🙁

/cc @jackzampolin

@Lunagram
Copy link
Author

Lunagram commented Aug 8, 2019

Thanks for your answer.
Good luck:)

@okwme
Copy link
Contributor

okwme commented Mar 6, 2020

Re-opening to discuss further possible solutions to this problem, as it presents an opportunity to improve the user experience of secure offline signing. The PR that closed the issue originally is a fix for basically an uncaught error. I'd like to discuss further the possibility of fixing the error.

Probably changing the purpose of --generate-only from being an offline only command is not something we want to do. Some alternative options would be:

  • Modify the withdraw-all-rewards to take an optional delegator flag that could be used over the --from flag, but that's also a bit hacky.
  • Modify the withdraw-all-rewards to accept an optional list of validators to withdraw from?
  • Do nothing and explain that the only way to withdraw all rewards with offline signing is to create each withdraw manually for each validator you're delegated to, then combine them into one transaction and sign that.

@okwme okwme reopened this Mar 6, 2020
@okwme okwme added S:needs more info This bug can't be addressed until more information is provided by the reporter. T: UX and removed T:Bug labels Mar 6, 2020
@okwme
Copy link
Contributor

okwme commented Mar 16, 2020

looks like this is being addressed in #5810
i'm closing in favor of #5448

@okwme okwme closed this as completed Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI C:x/distribution distribution module related S:needs more info This bug can't be addressed until more information is provided by the reporter. T: UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants