Testing peerunity_coin-control and peerunity-rc

I hope this is the correct forum to post this thread.

I have downloaded peerunity_coin-control Pennybreaker compiled in http://www.peercointalk.org/index.php?topic=2648.75

  • unzip contents of peerunity_coin-control.zip in D:\bin

  • To run (on windows 7 professional) it I used this command

D:\bin\Peerunity_coin-control\peerunity_coin-control-qt -conf=D:\bin\Peerunity_coin-control

The config file D:\bin\Peerunity_coin-control\ppcoin.conf has the following contents


(Note for future upgrade: with 0.9.1 btc wallet, datadir must be specified in the command line, not in the config file)

  • peerunity_coin-control started and started to sync with the network. “D:\bin\Peerunity_coin-control\testnet” subdirectory is created with downloaded block chain. There were only two nodes. It took about two hours to sync.
  • In the debug window, Information tab, “On testnet” box is checked.
  • I renamed the “Receive coins” tab I renamed the existing address msX75Fp5MRv52aNmjjjx4Jr55FNXUBRQic to “faucet”.
  • On the testnet faucet page http://testnet.peercoinfaucet.com/ have 10 testnet PPC sent to the address above.
  • In settings->options check “Display coin control features (expert only!)”.
  • In the “Receive coins” tab I generate another address mwYYXeZkNY1f1hxCoCKqNQzLXmZdTpDmaX (named faucet2) and used the faucet to get another 10 testnet PPC in order to have coins received at different time. Unfortuantely the two sets of coins arrived at the same time.
  • Try the step above again (from a different IP) and sucessfully received 10 testnet PPC at a different time. Address is "faucet3 mq3P59FHPs597JZmJDJFYRHUn1kNUKnzQM
  • In command console enter setgenerate true and mined some testnet PPCs. However these coins were not used in the test because by the time the tests were done, the coins were still not matured.

The above starts peerunity_coin-control and prepares the coins for testing.

Now I follow the functions listed here for further testing.

  • These pass OK (GUI only. Functions such as setting up a custom change address and check if it works not tested)

[ul][li] Settings checkbox “Display coin control features (experts only!)” (default=no)[/li][/ul]

Tab Send coins

[ul][li] Button Inputs
[li] click on this button opens actual coin control dialog. If no Inputs are selected “automatically selected” is shown.[/li]
[li] Change Checkbox[/li]
[list][li] checked -> provide custom change address[/li][/list][/ul]

  • Send 3 PPC from faucet2 to faucet1 to 1) create change 2) to confirm if in coin control, if no boxes
are selected -> coin control inactive (just as normal)

txid 8c1a65708126efb9c48535a4a1db049684745e78b72dd0f095e34151e9a346db

In Coin Control Dialog The following are confirmed

[ul][li]Shows a list of all unspent outputs with two view modes [list] [li]tree mode: outputs including change are grouped by wallet address[/li][/list] tree can be opened showing the actual outputs for this wallet address including change if change, the change bitcoin address is shown in column "address", otherwise the column "address" is empty, because its a direct output of the wallet address having the bitcoin address already shown in the parent node (same with label) [list][li]list mode: simple list of all unspent outputs[/li] [/list] [/li][/ul]
  • Select faucet3 address in coin control and send 2PPC to faucet2. Examine the results in coin control confirming
[ul][li]select outputs by checkbox -> only the checked outputs are used when sending a transaction[/li][/ul]
(a strict confirmation should come from a block explorer) txid 04494cd36def0b679dc264d8cf359089fcb38f9a32b8d0fc218f7fca57cc4901
  • Confirm functions of the following
[ul][li]check/uncheck all by clicking on "(Un)select all"[/li] [li]sort colums[/li] [li]tooltip available in column list mode in column label for the change (shows from which address the change came from)[/li][/ul]
Note for the last item: the tooltip not only shows in list mode but also in tree mode.
  • The following are verified except I do not see “lock” and “unlock”
[ul][li]Context menu [list]Copy to clipboard (amount,label,address,transaction id,lock,unlock)[/list] [/li][/ul]

These labels are tested except I cannot verify priorities because I do not know how priority levels are assigned.

[ul][li]Labels at the top [list]Quantity: number of selected outputs Amount: sum of selected unspent outputs Fee: see "Calculation of fee and transaction size" below minus fee: simply the amount shown is "Selected" minus the amount shown in "Fee" Bytes: see "Calculation of fee and transaction size" below Priority: priority = coinage / transactionsize. coinage = value * confirmations. miners order transactions by priority when selecting which go into a block Low Output: "yes" if any recipient receives an amount < 0.01BTC Change: shows the change you get back [/list] [/li][/ul]
Low Output is yes when the amount is less than 0.01 PPC.
  • I cannot copy amount to clipboard by direct right clicking the labels
[ul][li]direct right click the labels for copy amount to clipboard [/li][/ul]

The following are verified except that “The amount exceeds your balance” is “Insufficient funds!”

[b]Selection[/b] In this version of coin control, all selected outputs are going into the transaction for sure!! Of course, if you select more than you actually send, the bitcoin core will send the rest back to you as change, just as normal. And of course, if you select less than you send you will get "The amount exceeds your balance". And as already mentioned, if none are selected, coin control is inactive, this means everything is just the same as without coin control.

If the sum of selected outputs minus the amount you are going to send is smaller than the required fee, you will probably get
“The total exceeds your balance when the transaction fee is included”
This is because you didnt select enough outputs to pay the fee.
You always must select enough outputs, so that those outputs can pay the fee.

  • I do not know how to independently calculate transaction size so I didn’t test transaction size calculation
  • Peercoin has a fixed transaction fee so the part about fee and free transaction calculation shouldn’t apply.
[b]Calculation of fee and transaction size[/b] The fee is calculated according to the fee set in the Settings menu. The calculation assumes 2 outputs in total. One for the destination address and one for the change. The formula is nBytesOutputs + (2 * 34) + 10. nBytesOutputs is the sum of selected outputs, 148 or 180 bytes per output, depending if compressed public key. Due to the inner workings of bitcoin the size per output is actually +/- 1 byte. Meaning the shown calculation is not always 100% correct. If you send exactly "selected minus fee" then you will not have change (1 output only). The transaction will then be 34 bytes smaller as what was calculated before.

Free Transactions
In order to be able to send a free transaction, you need to follow the rules:
- transaction size must be < 10000 bytes
- priority must be at least “medium”
- any recipient must receive at least 0.01BTC
- change must be either zero or at least 0.01BTC
If you violate one rule you will see a min-fee and also the labels turn red:
Bytes.Priority,Low Output,Change. Depending which rule you violated.
Those 4 labels also have tool tips explaining this.
Also remember that violating one of the first 2 rules means 0.0005 PER kilobyte min-fee,
while violating one of the last 2 means 0.0005 min-fee only.

The coin control implmented in peerunity_coin-control passed tests of all main function items specified by cozz. Three minor items did not pass test and are marked in red above. One untested item is marked in blue.

Good job glv!

The following is not related to coin control. Not sure if this is a bug … I have mined four blocks on test net. They are not mature yet. They don’t show on the Overview page as immature coins. But they should, shouldn’t they?

The coin control code is being rolled into a new branch and a new build. Please stop testing the current build and switch to the build posted here: http://www.peercointalk.org/index.php?topic=2648.msg23426#msg23426

I have installed peerunity-rc and confirms that it starts, syncs, and I was able to send coins between my addresses.

Not sure if this is a problem with peerunity-rc-qt or with ppcoin-qt.

After the client finds a POS block, the stake amount in the Overview pane is not changed until I restart the client.

After the client finds a POS block, the stake amount in the Overview pane is not changed until I restart the client.

I’ve seen this in PPCoin-Qt, so I do not believe it’s a regression. Usually it “catches up” eventually, but it isn’t as quick (read: instantaneous) as it probably should be.

I find some coin-control features that was not in the function list of cozz obviously because they are POS related (and perhaps were added by YAC developers?)

Once a transaction finds a POS block, the transaction amount plus the POS reward is splitted into two transactions in the same address. This is not news and is not part of coin control feature. Before they can be spent again coin control 1) display these new transactions in grey, 2) gives a red background in the “confirmations” column and 3) does not allow these coins to be selected.

Why I recive this ?
your peercoin balance is -5.01

This seems to be related to Peershares, not PeerUnity. Did you use the coin control feature?

Peershares calls the RPC command “getbalance” on the default account to get that value. If you run this RPC command yourself what does it return? And what does the “listaccounts” RPC command return?

“getbalance” in peershares return “0.000000”
“listaccounts” return “Peershares:0.000000”…
How to add shares from peercoin wallet ?

[quote=“Vitalicus, post:10, topic:2253”]“getbalance” in peershares return “0.000000”
“listaccounts” return “Peershares:0.000000”…[/quote]

And from peercoin?

You can’t. You must receive shares from someone who have some. Post your peershares address in this thread: http://www.peercointalk.org/index.php?topic=2694.0

In peercoin wallet I recive 9.99
Thanks for link.


Are you still experiencing this problem? If so we need to turn it into a bug. I’ve run into RPC bugs before as well(empty fields).

please let me know.

thx, -jmz

getbalance ""

[quote=“irritant, post:14, topic:2253”] getbalance 23.55488300 getbalance "" -5.01000000 [/quote]

this is only in PeerShares?


here’s what I’m getting:

given we can reproduce this, what is the expected behavior?

if this is just Peershares, we need to start opening bug tickets on GitHub. The community can really help speed up the process with proper reporting. It takes us a lot longer to read through these forum posts to regress bugs. thanks!


[quote=“jmzeidner, post:15, topic:2253”][quote=“irritant, post:14, topic:2253”][code]
getbalance “”
getbalance " "

getbalance “”
getbalance " "

this is only in PeerShares?


sorry for confusing

[quote=“irritant, post:14, topic:2253”] [b]Peerunity:[/b] getbalance 23.55488300 getbalance "" -5.01000000 [/quote]

Peercoin has a problem with the balance of your accounts. What does “listaccounts” say?

Apparently the negative balance of the “” account seems to be the expected behaviour when you send coins without specifying the address from which you want the coins to be taken (https://github.com/bitcoin/bitcoin/issues/2191).
By default, the “” account is debited when you send coins, so if you send more coins than what is in the “” account it will go negative, but another of your accounts will show a higher balance than what it should be. So in any case the sum of all the balances of all the accounts gives you the right final balance.

You can move coins between your accounts with the ‘move’ RPC command to set the “” account balance to 0 or any amount you think it should be.

i first received 10 ppc from the faucet, than again 10, than i sent 5 to myself (test3)


[quote=“sigmike, post:18, topic:2253”][quote=“irritant, post:14, topic:2253”] [b]Peerunity:[/b] getbalance 23.55488300 getbalance "" -5.01000000 [/quote]

Peercoin has a problem with the balance of your accounts. What does “listaccounts” say?[/quote]