I’ve looked through the Peercoin daemon help information, and given a cursory study to the code, but so far, reporting on a (seemingly) fundamental aspect of the Peercoin protocol, “stake available to mint with,” continues to eludes me.
Does anyone have recommendations for how to approach this problem? I’m considering how I could use a bash script to list transactions, grab their time stamps and then use those to generate a display of mature transactions and their accrued coin age, but I’m worried that it won’t be accurate because there isn’t an obvious way to tie inputs to outputs (coins A and B come in, but in a future output, was coin A or B used?). Sigmike’s post the other day about coin selection order shed a little light on this topic, but it’s still pretty murky to be honest, at least to me.
I know that the client does this calculation, and it’s feasible to get it other ways (ABE and the other block viewers can dig into the raw transaction data), but is this something that could be done only with information available to ppcoind/peercoind?
If not, it would be interesting to see if this could be added to one of the block chain explorers; where you could enter an address and it would return the coins available along with their accumulated coin age.
I guess you meant online stake available to mint with. Theoretical stake available to mint with we can find in the blockchain (see also the model I posted) based on average coinage).
Not sure, are you hoping that there is data in the blockchain about coins online (online stake available to mint)? That would be contradictory to my understanding of the blockchain, but in this case I’m happy to be convinced otherwise. The best thing you could hope for is that all clients advertise a value (accrued coinage for each transaction in wallet) and that this accumulated or calculated value somehow goes into the raw transaction data of the minted block. If not, then I’m afraid we would always have to rely on the best guess as in the posted model.
I’d like to see a way to report on the age of all the coins in my wallet, by address.
This is in the block chain, so I could try to approach it by listing the incoming/outgoing transactions, and then using the current time to show their age, but I’m not sure how to tie together old inputs with any outputs that used the time.
[quote=“Ben, post:3, topic:1696”]I’d like to see a way to report on the age of all the coins in my wallet, by address.
This is in the block chain, so I could try to approach it by listing the incoming/outgoing transactions, and then using the current time to show their age, but I’m not sure how to tie together old inputs with any outputs that used the time.[/quote]
Ok, you are on a different path than I thought, but still interesting.
Just some thoughts which might help:
In the blockchain you would be able to get the balance of each address, you wouldn’t need time for that.
You only need to introduce time after the last transaction happened, because only then it starts counting coinage.
Exception is for minting as that uses the same address apparently, but it generates a specific type of transaction which you might look for when looking for the last transaction.
Edit: you can get a list of all addresses to check from your own wallet, I believe.