Peershares - 1st public alpha test release for Windows and Linux

[quote=“JohnnyCryptoCoin, post:93, topic:2248”]that is odd, can you post the tx details?

it might be the time when the client added it to your tx history??[/quote]

What do you mean by tx details?

My initial 10 shares was on 21/4/14 at 16:14
The 0.25 shares was on 23/4/14 at 21:47
Both were sent to the same address - DxYZWkkn4284ZXaMn9eyAB7s3jTZWPsNd6

Everyone,

This is just a heads up that I have updated my OP with a link to the Linux builds.

Thanks for all your testing efforts!

pb

This is a very exciting project. I’m looking forward to getting a hands-on look at it!

DwWM7bjS2rBpC11eaPddz8vXKxHiLXa8CX

Just registered to try out, have been a lurker for quite awhile though, excited to try it.

E8uGdq9eJj98enKooHJPeJGnz2Px8wDoLr

DxUrTLPkypSpYXsV8vPvTS4KUhkWHjhJEx

thank u very much!

E15udcWtP2C3BCHS3NnNhXoh4xVZzhQZQH - thank you.

E8eeALby8wRTZLePYyE9SLHLBHEhKQncT5 - thanks !

EGQ5u4LCoXVwMVwbiLJugkabe2WBZhp23U

[quote=“Ben, post:85, topic:2248”]Here is how you can do it, in the alpha release client:

[ol][li]From your Peershares client, in the menu, select “Export Peercoin keys”[/li]
[li]From your Peercoin client (running on the testnet), import the privkey that you received as output of the previous step[/li]
[li]Once the import process finishes, you’ll have access to the Peercoin address in your Peercoin wallet client.[/li]
[li]Transfer test-peercoins from another address you control into the address you just imported from Peershares (or, have someone else send you (you can visit http://testnet.peercoinfaucet.com/ for coins, if you don’t have any).[/li]
[li]Once that transfer has been confirmed and is available (which should only take six network confirmations), you’ll be able to offer the dividend.[/li]
[li]Back in the Peershares client, from the menu, select “Distribute dividends”[/li]
[li]If the dividend distribution is based on the current list of shareholders, click on the “Get List of Shareholders” button; otherwise, backdate the distribution (which will traverse the block chain and only pick up the addresses that existed at that time) and then click on the button. This will populate the list, below, showing addresses and current holdings.[/li]
[li]Enter the number of peercoins that you’d like to distribute into the text field, and then click “Calculate Dividends”. The list below will update with the amount of peercoins that will be paid out to each shareholder, proportionate to their holdings.[/li]
[li]Click “Ok” in the lower right corner to complete the dividend process and send out the distribution transactions.[/li][/ol][/quote]
Peershares now always get the balance in the PPC address wrong. For example I put 1 PPC in the step before the last above. After clicking OK
After the last step I get a confirmation box asking

1 peercoins will be sent to y addresses in 1 transaction(s). Your current peercoin balance is -320702

Are you sure

In fact the address ( ECv3ec3PzpMaB7XWgB2tcbngy78AQMuzrs, mzchSBbA64xnnMYMcKM4vWHqgxUgbAGFzF ) has 55006.909999269509PPC in it. The address has a lot of tx history – in, out, and even finding a POS block.

Thanks for reporting that, mphs. I’ll see if I can replicate the condition. Would you mind opening an issue on the Peershares Github repo and include anything you think would be relevant in recreating it?

What does peercoin returns when you call this RPC command:

getbalance ""

The “” is the default account name, the account used when the dividends are sent.

What does peercoin returns when you call this RPC command:

getbalance ""

The “” is the default account name, the account used when the dividends are sent.[/quote]

I am running peerunity-rc.

getbalance “” returns -320701.93000000.

listaccounts gives

{ "" : -320701.93000000, "Peershares" : 110003.14950900, "faucet" : 11.00000000, "faucet2" : 212.00000000, "faucet3" : 12.00000000, "save1" : 614195.82000000, "save2" : 243675.50999900, "save3" : 574388.52999900, "test1" : 19.01000000, "test2" : 7.00000000, "test3" : 10.00000000 }

Note that in my Receive page of peerunity there are 7 addresses with the label “Peershares”. The addresses after the first one (mzchSBbA64xnnMYMcKM4vWHqgxUgbAGFzF the one with balance in it ) were created after I pressed “export Peercoin keys” in Peershares after some change addresses were created as a result of Peershares transactions e.g. here.

I think the negative amount in “” has something to do with that it include changes. It certainly has little to do with the above PPC address associated with peershares.

edit:
these are the address under “Peershares” label in Receive of peerunity

"Peershares","mthktkKo6vhDmRq3EgBmbBJW9HtjTMNxHq" "Peershares","mnV7rPxMCK7TyP1Na2ggcRD7JCNSm9Lx2e" "Peershares","mh77qAVeBVcgvDvQeQ3kT4vAqiG7os1c14" "Peershares","mzchSBbA64xnnMYMcKM4vWHqgxUgbAGFzF" "Peershares","mu6UaXuqHE8Xb6oBhZ9U4eDpJZHMw4YW85" "Peershares","mkdEV2ZKaYZVc7MhLSqPHMvhwo5G1YULLV" "Peershares","mfsrvMro24harZTA11pzznPGuUZngJiVJD"

If I do a getaccountaddress Peershares in peerunity console, I get mu6UaXuqHE8Xb6oBhZ9U4eDpJZHMw4YW85 , NOT mzch… the one associated with the PPC Peershares address I got for the first time when there were only one peershares address in peershares.

[quote=“mhps, post:112, topic:2248”]listaccounts gives

{ "" : -320701.93000000, "Peershares" : 110003.14950900, "faucet" : 11.00000000, "faucet2" : 212.00000000, "faucet3" : 12.00000000, "save1" : 614195.82000000, "save2" : 243675.50999900, "save3" : 574388.52999900, "test1" : 19.01000000, "test2" : 7.00000000, "test3" : 10.00000000 }[/quote]

I don’t know how you got these balances but this is the problem. I think it may happen if you change the label of addresses after you made transfers. For example if you have 2 addresses under the same label peercoin will treat them like a single account. If you make some transfers and change them to different labels, one of them may become negative if it only has sending transfers and the other one has the receiving transfers.

The way peercoin handle accounts (inherited from bitcoin) is far from ideal.

To solve your immediate problem you can use the command line (or config) “-distributionaccount” to use another account. The default is “”. For example:

peershares-qt -distributionaccount=save1

Unfortunately we cannot send dividends without providing an account name (the sendmany command requires an account name). We would have to change peercoin to do otherwise. We can do that in peerunity, but then peershares would require peerunity.

Some clues:

This address mzchSBbA64xnnMYMcKM4vWHqgxUgbAGFzF is associated with the original Peershares address. Let’s call it address1.

This is the time line of activity happened to address1

  • I sent 5000PPC that I mined to address1
  • distributed 5000PPC shares from this address There were 0.149977PPC left which is what my peershares should get. Apparently the tx fee was found to have been paid from another address.
  • In order to do the second test, I sent 55,000PPC that I mined to address1. The plan was sending 10 times more to see more digits after the decimal point in dividends, and there will be plenty balance left for tx fee. Because the number of total peershares is about 1million, I sent another 50,000PPC to address1, so the dividends is ~1/10 of peershares for every share holder.
  • I did test 2 and distributed 100,000PPC. From transaction details (with -debug on peercoin-qt command line you can see more details in the popup message box) I see 50,000 PPCs were indeed taken from address1, paid from the output of the 50,000 PPC transaction, but the other 50,000 were taken from some mined blocks even though there were enough fund in address1 ! I got 2.999532 PPC dividends as expected. So there were 55,003.149509 PPC left in the address. The transaction fee again was paid from another address.
  • After a few days the 55,000 PPC transaction found a POS block (my first ever POS block :D) and was splited into two 27501.56 PPC transactions, both were sent back to address1 according to transaction details. The total is 55006.269509, as rcalculated and agreeed by coincontrol.
  • However I find that neither listreceivedbyaddress or listreceivedbyaccount count the POS reward 3.12PPC, both commands give 110003.14950900 received total. This is the number reported in the last post.

I did nothing unusual. You can reproduce multiple addresses under the Peershares label by

  • get a new wallet in peershares
  • send it 10 peershares from somewhere else
  • send it 10 peershares again from somewhere else
  • export peercoin key, verify that peercoin has an PPC address under the label Peershares
  • transfer 5 shares to someone else to create change address
  • export peercoin key, verify that peercoin has more addresses under the label Peershares

Unless you think transfering shares to others is unusual for a share holder, I don’t know what listed above is not ordinary.

About the negative balance, I didn’t change labels, certainly didn’t change something to empty label. I can see two kinds of addresses without labels – changes and mined blocks. I have many mined blocks popping up so I regularly send them to “save” addresses to unclutter.

I am waiting for a new block to mature now to see if the correct negative balance is created by mined blocks being sent to a named account.

Peercoin does not use account addresses at all when it sends funds. It takes the coins from the most appropriate outputs whatever the account they belong to. But it correctly records the sending transaction on the appropriate account. This behavior is also inherited from bitcoin.

No this is perfectly fine. The problem is only the negative balance on the peercoin side.

Peercoin does not use account addresses at all when it sends funds. It takes the coins from the most appropriate outputs whatever the account they belong to. But it correctly records the sending transaction on the appropriate account. This behavior is also inherited from bitcoin.[/quote]

I know of this behavior of bitcoin. I thought the interaction between peershares and peercoin is address-based. So in step 4 here the fund doesn’t have to go to the peerunity-associated address. It only needs to go into the wallet.

“Accounts” in satoshi’s bitcoin wallet is really a source of confusion.

Let’s narrow the problem down a bit first.

Ok I didn’t read these steps carefully. Indeed you should not do this step 4. You actually need the funds on the default account instead (unless you change the “distributionaccount”).

The addresses labeled “Peershares” are only there to receive dividends. They are not used at all when you send dividends.

So actually the steps 1 to 5 should be replaced by something that says you should get peercoins on the default account (ie. any address without label).

And maybe there should be other steps if you want to test receiving dividends. Actually that would be the current step 1 and then just checking your balance once dividends have been distributed.

Thanks sigmike. That explains a lot. glv commented on the negative amount here http://www.peercointalk.org/index.php?topic=2699.msg24115#msg24115

The above doesn’t seem right. As recorded in my post above Cryptoblog - notícias sobre bitcoin e criptomoedas! , when I did the second test, 50,000 coins was paid from address1, reported by tx details.

Since last post my peerunity wallet mined two POW blocks and founf a POS block. All are mature now. Total coins increased is 19,816.2 . Before these coins were matured getbalance “” was -320,701.93000000
After matured getbalance “” is now 188,141.35000000

Can anybody explain this? :o

listaccounts gives

{ "" : 188141.35000000, "Peershares" : 110003.14950900, "faucet" : 11.00000000, "faucet2" : 212.00000000, "faucet3" : 12.00000000, "save1" : 614195.82000000, "save2" : 243675.50999900, "save3" : 574388.52999900, "test1" : 19.01000000, "test2" : 7.00000000, "test3" : 10.00000000 }
Compared with previous numbers I think there is a bug.