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

Allow an RPC style coin control options as well #1260

Open
iFoggz opened this issue Aug 12, 2018 · 5 comments
Open

Allow an RPC style coin control options as well #1260

iFoggz opened this issue Aug 12, 2018 · 5 comments

Comments

@iFoggz
Copy link
Member

iFoggz commented Aug 12, 2018

Kind of a thinking out of the box style from #1240. I've recently done some coding in these areas so I have understanding etc on this. Currently any coin control ability is mainly done via GUI in ease for users. When it comes to RPC you can do utxos in a createrawtransaction, etc which can be challenging and not-error free for even more advanced users and if not handled correctly change can be burned as a miner fee.

I propose some more gridcoin based RPC commands to allow usage in a more user friendly way. perhaps since @denravonska wants more separation of gridcoin code from main files this could be done in a utxo.cpp/h

I'd like to assign myself this task of course if there is support for such functionality.

Propose to add:

  • RPC to send funds from one or more utxos to one or more addresses with option to set custom change address (kind of a sendmany in some way but with control of input addresses and optional control of output change address -- and sent as a bulk transactions versus single transactions like sendmany does)
  • RPC to consolidate multi utxos into a single output address inputted by the user if they wish to consolidate funds from multiple utxos or addresses into a single output.

I've done work in unspent area, also have made a custom rpc for burning dust utxos as well and of course the changing of the sendmany to use no account specified. so I have the understanding and know how to get this moving along. With these kind of commands it would make things more at ease for users instead of resorting to a manual raw transaction creation.

I'd like more user friendly options available to the common user.

@jamescowens
Copy link
Member

I think this is a great idea and is very complimentary to the stake splitter/side staking work I am doing!

@tomasbrod
Copy link
Member

If those rpc inputs were JSON formatted, this could be nicely implemented.

@tomasbrod
Copy link
Member

This could easily become a giant command with many arguments and crazy formatting.
The RPC api should allow "building" the transaction in steps. Each step would do one thing to the transaction until it is submitted in sendrawtransaction kind of way.

@iFoggz
Copy link
Member Author

iFoggz commented Aug 12, 2018

I was thinking 3 arguments 1 optional. 2 objects 1 string. String is optional change address specified by user

@jamescowens
Copy link
Member

Note that consolidateunspent partially addresses this issue.

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

No branches or pull requests

3 participants