dreamwatcher, thanks for the free service and for keeping my donation address on the pages!
I am curious to see your changes to Abe, it would be nice to integrate them upstream... eventually in my copious spare time.
Also, would you mind sharing the database tweak intended to stop the deadlocks, and does it still appear to work? If I were doing it all over, I would decide on a transaction isolation level at the outset and code to that. I think READ COMMITTED ought to be sufficient for this app, though it would have been worth the effort to retry deadlocks in order to support stricter isolation. Maybe still worth the effort.
Given my time constraints, I really don't adequately test Abe but do appreciate bug reports.
For the most part, I needed to add variables to the deserialize module to account for extra fields in the transactions. Besides setting Name, 3 code, address version and "magic numbers",
in all cases I disabled the merkle tree check. If it becomes necessary I will fix it the "right way"
I also had to change the parameters for the SCRYPT_PUBKEY_RE in all cases to "\x21(.{33})\xac\\Z"
PPC:
Extra timestamp on the Txin
Added the ability to tell the difference between POW and POS blocks, and change the webpage header and block display accordingly.
FRC:
Extra field "Block Reference" in TXout.
TO DO: Account for demurrage in the account balance page.
TRC:
Not much, although ABE does produce a non-fatal error when trying to calculate the current block difficulty.
Traceback (most recent call last):
File "/home/xxxxx/terracoin/Abe/DataStore.py", line 2389, in catch_up
store.catch_up_dir(dircfg)
File "/home/xxxxx/terracoin/Abe/DataStore.py", line 2442, in catch_up_dir
store.import_blkdat(dircfg, ds, filename[0])
File "/home/xxxxx/terracoin/Abe/DataStore.py", line 2566, in import_blkdat
store.import_block(b, chain_ids = chain_ids)
File "/home/xxxxx/terracoin/Abe/DataStore.py", line 1655, in import_block
b['chain_work'] = util.calculate_work(prev_work, b['nBits'])
File "/home/xxxxx/terracoin/Abe/util.py", line 74, in calculate_work
return prev_work + target_to_work(calculate_target(nBits))
File "/home/xxxxx/terracoin/Abe/util.py", line 56, in calculate_target
return (nBits & 0xffffff) << (8 * ((nBits >> 24) - 3))
ValueError: negative shift count
Datastore is sending a "0" nbits, causing the error. ABE does correct the difficulty once the block is solved and is placed in the database.
This is also the issue I have with "deadlock" after a long catch up and this error. The error delays ABE long enough that the database will close the connection and ABE will lock due to a broken pipe. The error only occurs on the current block, so the catch up in relation to past blocks runs normal.
I think the correct way to solve the problem is to use a bitcoinrpc module and just get the difficulty directly from the daemon. Ultimately this will be my solution, but for now I have opened up the database parameters to allow more time before closing the connection.
There were a couple of more tweaks to the database that were done, but it was over a period of months and I had forgotten what they were...
(I know, I know...document).
That was the reason for the current lock-ups with the Hosting switch, I tried to tweak the database from memory. I have since copied over the config file from the old host and hopefully it will start to run smooth again.
I could put the current explorers up on git hub, though there would be quite a bit of repetitive data between the repositories.
vedalken254:
As mentioned above, I have replaced the database config with the config from the old server. Hopefully this will solve the "deadlock" issue on TRC for now.