• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Using darkcoin-abe

Do you already have a server prepared with an spot to keep the sql database? I have set this up and can probably give you some pointers. Basically you setup the darkcoin-abe daemon to parse the blockchain from the wallet and dump it's findings into an sql database. You can then do lookup's against the database and server that info to other clicks ala block explorer.

Link to what flare is talking about: https://github.com/darkcoin/darkcoin-abe/blob/master/README-MYSQL.txt

Assuming mysql is the choice.
 
Guys, thanks a lot for offering your help. I did start working through the README-MYSQL.txt file. I already have MySQL installed and configured. I thought I was doing pretty well but when I run this command (step 7)

python -m Abe.abe --config abe-my.conf --commit-bytes 100000 --no-serve

I get this error

No module named Abe

 
Guys, thanks a lot for offering your help. I did start working through the README-MYSQL.txt file. I already have MySQL installed and configured. I thought I was doing pretty well but when I run this command (step 7)

python -m Abe.abe --config abe-my.conf --commit-bytes 100000 --no-serve

I get this error

No module named Abe
Are you in the correct working directory?
 
Flare, I'm an idiot, thanks for that. I just assumed I would be ok to run that from my home directory. I will crack on and see how I get on. Hopefully you don't mind me coming back if I have any more questions :grin:

Not there yet, but coingun, do you have any examples of the lookups you use to get info from the database please..?
 
Are you in the correct working directory?

Flare, I think I got things going now. I have a screen with block_tx then two sets of numbers and this runs down the screen over and over. I'm guessing I just leave this running until it's finished?

Do you know if there's any documentation on SQL commands to query the database?
 
Flare, I think I got things going now. I have a screen with block_tx then two sets of numbers and this runs down the screen over and over. I'm guessing I just leave this running until it's finished?

Do you know if there's any documentation on SQL commands to query the database?
Yeah, you got it :)

I don't know of any documentation on the database design though...
 
Flare, sorry to be a total pain, but would you know what this error means and how I might fix it?

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/administrator/darkcoin-abe/Abe/abe.py", line 32, in <module>
import DataStore
File "Abe/DataStore.py", line 31, in <module>
import deserialize
File "Abe/deserialize.py", line 11, in <module>
from util import short_hex, long_hex
File "Abe/util.py", line 8, in <module>
from xcoin_hash import getPoWHash
ImportError: No module named xcoin_hash


After Googling, I thought it was because I didn't have a X11Chain.py file, but that didn't work.
 
Excellent! Thank you! But now I get,

Chain not found for magic number f9beb4d9 in block file /home/administrator/.bitcoin/blocks/blk00000.dat at offset 0.

I'm guessing that I need to point a path somewhere to /home/administrator/.darkcoin/blocks/

Would that be in my abe-my.conf?
 
Excellent! Thank you! But now I get,

Chain not found for magic number f9beb4d9 in block file /home/administrator/.bitcoin/blocks/blk00000.dat at offset 0.

I'm guessing that I need to point a path somewhere to /home/administrator/.darkcoin/blocks/

Would that be in my abe-my.conf?
Yes, the path is in abe-my.conf and must point to the location where your darkcoind is storing the it's data.

Compare https://github.com/darkcoin/darkcoin-abe/blob/master/abe.conf#L109-L113

Best would be to copy the abe.conf file from darkcoin-abe repo and adjust it to your needs, it works quite out of the box.
 
It's alive!!!

fetch


The first time you helped me, it was the pure Bitcoin one, this time it's the Darkcoin-abe.

Thanks for all your help mate, have a Guiness on me :grin::grin::grin:
bc4591c2c42de2d4ef5c29ef0ef60b698a92d6e0571bfc1876ce6b5098e40330
 
Hi Flare, just wondered if you knew anyway to keep the database constantly updated. It looks like I have to keep periodically running abe to update everything.

Is there something built in or would I have to write something to keep running and checking the database?
 
I made good experience with getting RPC inteface work - i don't know if there is a "abe way" of doing it, but i patched the line

https://github.com/darkcoin/darkcoin-abe/blob/master/Abe/DataStore.py#L2665

to

Code:
                               "19998" if "testnet" in conf else "9998")

This should make you get rid of the RPC errors. If this is not sufficient to keep the DB up to date you could use "blocknotify" to call your abe instance on arrival of a new block to keep it updated.
 
Hi Flare, just wondered if you knew anyway to keep the database constantly updated. It looks like I have to keep periodically running abe to update everything.

Is there something built in or would I have to write something to keep running and checking the database?
dirty way - you can set up uptimerobot.com HTTP(s) type monitor and point it to your abe :cool:
 
Thanks Guys. I think I will keep on trying to learn about the data before I get this running.

One more quick question though, I have found out how to get a wallet balance, but the wallet identifier is the public key hash (pubkey.pubkey_hash). How do I get the public key hash for a wallet address?
 
Back
Top