Author

Topic: Help wanted: QA test spendfrom.py (coin control utility) (Read 1770 times)

legendary
Activity: 1792
Merit: 1008
/dev/null
If you're interested in coin control, and you're comfortable with python and the command-line, then I could use your help.

I've written a little utility called 'spendfrom.py' that uses the raw transactions JSON-RPC api to send coins received on particular addresses that I'd like to ship in the contrib/ directory.

But since it touches the wallet it needs thorough testing.

I've written a test plan; who is willing to run through the test plan with their -testnet wallet and then try to break it?

Test plan:
  https://github.com/gavinandresen/QA/blob/master/SpendFrom.md

Code:
  https://github.com/gavinandresen/bitcoin-git/tree/spendfrom/contrib/spendfrom

thanks for planning to support coin-control, this was a long missing feature since the old patches from coderrr Smiley
legendary
Activity: 1120
Merit: 1149
Dunno why github says 'authored 6 days ago', commit 2e922 was pushed yesterday and definitely has the changes (see lines 107-108 of spendfrom.py).


Oh I know why, you've been using rebase. git commit --amend and git rebase don't update the commit timestamp and github must be going by commit timestamp to determine when the code was last changed. The --reset-author flag would reset the timestamp, but of course people don't care much about commit timestamps in general anyway.
legendary
Activity: 1652
Merit: 2216
Chief Scientist
Dunno why github says 'authored 6 days ago', commit 2e922 was pushed yesterday and definitely has the changes (see lines 107-108 of spendfrom.py).
legendary
Activity: 1120
Merit: 1149
Thanks for helping test!  Latest version fixes the p2sh issue.

I think you haven't pushed it to github yet; https://github.com/gavinandresen/bitcoin-git/tree/spendfrom/contrib/spendfrom shows HEAD as 2e9224d9f2 from 6 days ago.
legendary
Activity: 1652
Merit: 2216
Chief Scientist
The only issues are 1) Balances in my P2SH Addresses don't show up, even though the key to spend them is in the wallet and Bitcoin-QT sends transactions from it just fine and they show up in listunspent (though I certainly understand if it isn't in the first version), and 2) The display of amounts seems to round to 4 decimal places, even when the actual amount is something to the full 8 places.

Thanks for helping test!  Latest version fixes the p2sh issue.

I had it 4-decimal-places because I personally don't care about less than 0.0001 BTC right now. It is 8 now, just because I know you won't be the last person to ask "why does it round."

Quote
It does seem to have easy_install, but I got a "cannot import name ServiceProxy" when I tried that.

If there are python command-line-tool packaging experts, suggestions on how to package this better are welcome.  I thought all versions of jsonrpc had a ServiceProxy class, but I guess I'm wrong.
pc
sr. member
Activity: 253
Merit: 250
It does seem to have easy_install, but I got a "cannot import name ServiceProxy" when I tried that. I deleted that, and put jgarzik's "jsonrpc" folder in the directory with spendfrom.py, and it seems to work now.

I've run through the test plan, and it seems to work great. The only issues are 1) Balances in my P2SH Addresses don't show up, even though the key to spend them is in the wallet and Bitcoin-QT sends transactions from it just fine and they show up in listunspent (though I certainly understand if it isn't in the first version), and 2) The display of amounts seems to round to 4 decimal places, even when the actual amount is something to the full 8 places.

Thanks!
legendary
Activity: 1652
Merit: 2216
Chief Scientist
If you've got easy_install (does OSX 10.6 comes with easy_install ?), then try:

    easy_install jsonrpc

Or grab jgarzik's version from github:
   https://github.com/jgarzik/python-bitcoinrpc
pc
sr. member
Activity: 253
Merit: 250
I'd love to test, though I'm not very familiar with python. I'm on Mac OS X 10.6.8, and I regularly use the rawtransaction commands to do coin control manually and hope I don't screw it up too much, so I'm excited to see this. Is all I need the spendfrom.py file? I tried executing it, and got "No module named jsonrpc", so I assume I need to install it from somewhere?
legendary
Activity: 1652
Merit: 2216
Chief Scientist
If you're interested in coin control, and you're comfortable with python and the command-line, then I could use your help.

I've written a little utility called 'spendfrom.py' that uses the raw transactions JSON-RPC api to send coins received on particular addresses that I'd like to ship in the contrib/ directory.

But since it touches the wallet it needs thorough testing.

I've written a test plan; who is willing to run through the test plan with their -testnet wallet and then try to break it?

Test plan:
  https://github.com/gavinandresen/QA/blob/master/SpendFrom.md

Code:
  https://github.com/gavinandresen/bitcoin-git/tree/spendfrom/contrib/spendfrom
Jump to: