Post
Topic
Board Announcements (Altcoins)
Re: [ANN][CLAM] CLAMs, Proof-Of-Chain, Proof-Of-Pearl
by
dooglus
on 18/02/2015, 18:00:09 UTC
Here's some of the debugging info... does "fail" mean it simply didn't find a suitable result that round, or that there's some issue?

The "fail" just means it failed to stake that time.

Both your outputs are trying to stake:

Quote
2015-02-18 09:37:37 [STAKE] checking 2 output(s)

2015-02-18 09:37:37 [STAKE] check c18663[...]:1   (0.00037299 CLAM)
[STAKE] fail: hash a2659a05a7ecda7e4d8bf2ca7a1b72b92d6a62d8c3dcf515923e9fd6fd86a655
[STAKE]   > target        117158c07000000000000000000000000000000000000000000000000

2015-02-18 09:37:37 [STAKE] check c18663[...]:2   (98.24 CLAM)
[STAKE] fail: hash e87e1b115cf92df97624cefd872057718a3015219810186cec8449c8fada2475
[STAKE]   > target    4619f2d25f800000000000000000000000000000000000000000000000000

You'll see that the "target" that the hash must be smaller than is much smaller for the dust output than for the bigger output, but that the hash is much bigger than both. The hash changes every 16 seconds, and is usually 64 hex digits. There's a 1-in-16 chance that it will start with a 0, and so will appear to be 63 or less characters long, 1-in-256 chance it will be 62 or less, etc. The target for the 98 CLAM output is 61 characters long, and starts with a 4, So for your random hash to be lower than it is about a 1 in 4*16^3=16384 chance (or to be more precise, 0x100000000 / 0x4619f = 14958)

That gives you about a 30% chance of staking in any particular day.

The chance of that going 23 days without staking is:

>>> (1 - 1.0/14958) ** (60*60*24*23/16.0)
0.0002476419358953318

ie. about 1 in 4038.

That seems low, but not impossible. People roll losing streaks longer than that with a 50% chance of winning - and you only have a 30% chance of winning each day.

Note that the network difficulty tends to swing up and down by a factor of 4 regularly which causes the "target" to do the same and so where it was in that cycle will change your chances dramatically.

I'm pretty confident now that things are working right, and that you're simply experiencing variance. You can stick with the extra-logging version and check periodically to make sure it's still doing that "fail : target < hash" thing every 16 seconds" - because that's what you expect to see when it's trying.

The only time it's showing PASS is when a network block arrives... I presume that's because the debug info is printed in AcceptBlock() (or whatever it's called).

Right. The same logic is used to check other people's blocks as to check your potential blocks.

Edit: I reworked a bunch of this post because I realised I had some stuff wrong.

Also, I notice that your 98 CLAM output was created on 7th February - just 11 days ago. Maybe you had a similar amount before and were just moving things around, but note that each time you move an output it stops trying to stake for 4 hours.