The next 24 hours are extremely busy for me; I will try to check in periodically if I can.
dooglus will likely keep us updated on the progress of the UI for the users of Just-Dice.
Initially I was thinking I would allow Just-Dice users to enter any 8-digit petition-IDs they wanted to, and use those in the CLAMspeech when staking blocks. Each user would get their fair share of chances to stake a block based on their investment size.
Then I figured it would be better if I only allowed 'voting' for petition-IDs which had been correctly registered with a 'create clamour' message.
So I set about making changes to the client to have it track valid petition-IDs.
The place to track them is in the block index, so you don't have to keep re-parsing the CLAMspeech every time you start the client. That means I need to change the block index database format, and so users will need to "clam-qt -reindex" after upgrading.
Except it turns out that -reindex doesn't work, and never has. So I set about fixing that. I have some code which now does make the wallet try to reload the blk0001.dat file when you ask it to -reindex.
Except it turns out that when loading my blk0001.dat file (which I know contains all the valid blocks), it gets stuck. Like this:
2015-11-30 04:01:48 SetBestChain: new best=dcfa7e4952dc67913af4e6411136f0a944a69397fa74a2006d81d5c58961ef4a height=230252 trust=992559058268678270 blocktrust=47672287752932 date=11/29/14 19:38:24
2015-11-30 04:01:48 ProcessBlock: ACCEPTED
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xd891dd792afb83b0 at height=230252 timestamp=2014-11-29 19:38:24 UTC for block from timestamp=2014-11-19 05:09:04 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xd891dd792afb83b0 nTimeBlockFrom=1416373744 nTimeTxPrev=1416373626 nPrevout=18 nTimeTx=1417289952 hashProof=0000464a6d7fdf299d6cb552ed2183e932c3e72c686745a2d38fccd57b76dc1e
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xd891dd792afb83b0 at height=230252 timestamp=2014-11-29 19:38:24 UTC for block from timestamp=2014-11-19 05:09:04 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xd891dd792afb83b0 nTimeBlockFrom=1416373744 nTimeTxPrev=1416373626 nPrevout=18 nTimeTx=1417289952 hashProof=0000464a6d7fdf299d6cb552ed2183e932c3e72c686745a2d38fccd57b76dc1e
2015-11-30 04:01:48 SetBestChain: new best=793a7f762ea19e0960c61e7151e6103c63f4e5962493bbceae1cfe5a6c73425d height=230253 trust=992606706175219479 blocktrust=47647906541209 date=11/29/14 19:39:12
2015-11-30 04:01:48 ProcessBlock: ACCEPTED
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xd891dd792afb83b0 at height=230253 timestamp=2014-11-29 19:39:12 UTC for block from timestamp=2014-11-29 10:20:48 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xd891dd792afb83b0 nTimeBlockFrom=1417256448 nTimeTxPrev=1417256448 nPrevout=1 nTimeTx=1417290096 hashProof=0000170c754848f3ea304426c91bee86653722588093902247c03d79693d572d
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xd891dd792afb83b0 at height=230253 timestamp=2014-11-29 19:39:12 UTC for block from timestamp=2014-11-29 10:20:48 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xd891dd792afb83b0 nTimeBlockFrom=1417256448 nTimeTxPrev=1417256448 nPrevout=1 nTimeTx=1417290096 hashProof=0000170c754848f3ea304426c91bee86653722588093902247c03d79693d572d
2015-11-30 04:01:48 SetBestChain: new best=fe68e35cea86b443c9a627a23a683dfa244e3409dad55a2c980df19cd0b3e369 height=230254 trust=992654354081760688 blocktrust=47647906541209 date=11/29/14 19:41:36
2015-11-30 04:01:48 ProcessBlock: ACCEPTED
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xd891dd792afb83b0 at height=230254 timestamp=2014-11-29 19:41:36 UTC for block from timestamp=2014-11-22 14:33:52 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xd891dd792afb83b0 nTimeBlockFrom=1416666832 nTimeTxPrev=1416666832 nPrevout=1 nTimeTx=1417290112 hashProof=0000a92cb4a5e765047b4533ae01f26d97f2836f5404a733c506d617e490d66f
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xd891dd792afb83b0 at height=230254 timestamp=2014-11-29 19:41:36 UTC for block from timestamp=2014-11-22 14:33:52 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xd891dd792afb83b0 nTimeBlockFrom=1416666832 nTimeTxPrev=1416666832 nPrevout=1 nTimeTx=1417290112 hashProof=0000a92cb4a5e765047b4533ae01f26d97f2836f5404a733c506d617e490d66f
2015-11-30 04:01:48 SetBestChain: new best=7f8a17cf772ee23d824f1c691c7b5185c509aa231fcf39d1809960099fe61a87 height=230255 trust=992701953177795485 blocktrust=47599096034797 date=11/29/14 19:41:52
2015-11-30 04:01:48 ProcessBlock: ACCEPTED
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xb87513256eaf240d at height=230255 timestamp=2014-11-29 19:41:52 UTC for block from timestamp=2014-11-19 22:59:44 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xb87513256eaf240d nTimeBlockFrom=1416437984 nTimeTxPrev=1416437964 nPrevout=674 nTimeTx=1417290144 hashProof=00008f23d6df7658fd16a7c2065de6eb071e8031221ba97496de482c0620bbb0
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xb87513256eaf240d at height=230255 timestamp=2014-11-29 19:41:52 UTC for block from timestamp=2014-11-19 22:59:44 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xb87513256eaf240d nTimeBlockFrom=1416437984 nTimeTxPrev=1416437964 nPrevout=674 nTimeTx=1417290144 hashProof=00008f23d6df7658fd16a7c2065de6eb071e8031221ba97496de482c0620bbb0
2015-11-30 04:01:48 SetBestChain: new best=5812e11089399a7d41f5675bb5a1aed7f4ddf1e0c9e7ab7c78ff59738958d10f height=230256 trust=992749503563224479 blocktrust=47550385428994 date=11/29/14 19:42:24
2015-11-30 04:01:48 ProcessBlock: ACCEPTED
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xb87513256eaf240d at height=230256 timestamp=2014-11-29 19:42:24 UTC for block from timestamp=2014-11-29 04:37:52 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xb87513256eaf240d nTimeBlockFrom=1417235872 nTimeTxPrev=1417235872 nPrevout=1 nTimeTx=1417290160 hashProof=000011528c9dc4f88dbb95bf274d03b4ab654fd130cc98fe37d2f2719b3ad0d7
2015-11-30 04:01:48 CheckStakeKernelHash() : using modifier 0xb87513256eaf240d at height=230256 timestamp=2014-11-29 19:42:24 UTC for block from timestamp=2014-11-29 04:37:52 UTC
2015-11-30 04:01:48 CheckStakeKernelHash() : check modifier=0xb87513256eaf240d nTimeBlockFrom=1417235872 nTimeTxPrev=1417235872 nPrevout=1 nTimeTx=1417290160 hashProof=000011528c9dc4f88dbb95bf274d03b4ab654fd130cc98fe37d2f2719b3ad0d7
2015-11-30 04:01:48 SetBestChain: new best=b38d40e2670d3193e4fbb041ba03987e7037d2664fa44858969d07926f0979c2 height=230257 trust=992797005337641892 blocktrust=47501774417413 date=11/29/14 19:42:40
2015-11-30 04:01:48 ProcessBlock: ACCEPTED
2015-11-30 04:01:48 ERROR: ProcessBlock() : duplicate proof-of-stake (COutPoint(33bb7c7471, 1), 1417290096) for block 5db0b2b31f4f6b8ed11031c3782cf48dbbee8cae45a9d2ddedd474a72c59b947 "height" : 230254,
2015-11-30 04:01:48 ERROR: ProcessBlock() : duplicate proof-of-stake (COutPoint(41ec06a7dd, 1), 1417290112) for block 35e0d330e75dbc20a0c6f3030f13811d7a82e8c0d3568df78f6d1202521adabc "height" : 230255,
2015-11-30 04:01:48 ERROR: ProcessBlock() : duplicate proof-of-stake (COutPoint(cfbeb87f48, 674), 1417290144) for block e57018e94e9857e83eb3b0e9a4d70d2202853a076e091db342b9b19d2c1f0a32 "height" : 230256,
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=e57018e94e9857e83eb3b0e9a4d70d2202853a076e091db342b9b19d2c1f0a32 "height" : 230256 in real chain
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=c8703390494e472a59b6aabc216a7f26e57dc817e2202a98b995dd462d22f2f3 "height" : 230257 in real chain
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=074ea8da9cd6ae3a51353508f96956955cf4a13fa0be239f9b15b2081b09c610 "height" : 230258 in real chain
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=510c0f05358658783b67b2a1f5fe51828c408735848273e84eb850426f86ce41
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=91be5991b706661f1567f91c0caa8d7b7fb3f97426533dc6ca754b4a66e20ec1
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=c1bd50724722570a3c8edc9193c4e4afd60721331fb5e42077703bbbf8d65ff9
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=91be5991b706661f1567f91c0caa8d7b7fb3f97426533dc6ca754b4a66e20ec1
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=a740cbc91995360bd956aa8983fe30a35f7336dfebfbf4c2e4d9388cffcf577f
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=8451a72733e0e52cd3bbcd7a1af42d5ca1807c456e9a2f9efeff400b3214c32e
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=b59029a8485ce7887f69d38acd974b5d2b54edf830d73262d6f43ed24457ce2f
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=fd6773c2752d7340e2ce02611c17a7e13fd7cc8263a358e42a3c35d821f7441d
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=912fe8ef120f4421be4808d99b8550392aabc40241759e84a58441e9bf9f0d56
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=956e1b3fd78e7dd4d58eb6b66a9b1ea5b01096fc0ea1e7128110cb5b9dcd1eda
2015-11-30 04:01:48 ProcessBlock: ORPHAN BLOCK 0, prev=da0c90177d0f706177d6693b9504d5fb731352bdd83c7c1dbf47ea4ac08a02d6
This is very likely the same bug that was reported recently - the client is unable to sync the chain over the network without multiple restarts. It is also unable to sync from a local blk0001.dat file if it contains a few orphan blocks with duplicate proofs of stake in them.
So that's where I'm at - bogged down in the reference client's C++ code, trying to figure out how to get it to -reindex properly.