Bitcoin Forum
May 26, 2024, 07:36:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 [6] 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 »
101  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 19, 2013, 01:25:31 AM
Hi, I've been away the last few days and will take a while to catch up.

Code:
datadir = /Users/thisuser/Library/Application Support/Bitcoin/blocks
Leave /blocks off.  This should be:
Code:
datadir = /Users/thisuser/Library/Application Support/Bitcoin


If I leave it off, the error message is "../Application Support/Bitcoin/blck0001.dat not found".
In case I use /blocks, the error message points correctly to "../Application Support/Bitcoin/blocks/blck0001.dat".
Now I am even more confused.

While ABE searches after blck0001.dat, blck00001.dat is existent, and would be perhaps the correct file?
Is this a misconfiguration?

Old versions of Bitcoin start with blk0001.dat, and new (0.8.x) ones start with blocks/blk00000.dat.  To accommodate all known versions, including users who upgrade, Abe first searches in datadir for the blk*.dat series, and then in the blocks subdirectory for blk00000.dat.  Since you use a new bitcoin-qt, it should not find blk0001.dat but should continue and load blocks/blk00000.dat.

The blockchain loading is still at the very beginning, I just ran bitcoin-qt once, as listed in the read me.

How many blk*.dat files are in  "../Application Support/Bitcoin/blocks" ?  Does Abe exit after the error message about blck0001.dat?  Is that a typo, and did you mean blk0001.dat?  Please paste the last several lines of output if Abe exits before it finishes loading.
102  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 15, 2013, 05:17:05 PM
Now after about 14 days of importing it's finally done Tongue Anyway everything seems to be working just fine I only got one small problem. It's only importing new blocks when I load a new webpage in the Abe interface. Should it really be like that? So if I for example stop using the web interface for about 1 hour then when I request one page load it will star importing the 6 missing blocks. Why doesn't Abe just import the block as soon my bitcoin-qt instance accepts the new block?

Yup, this is an underdocumented quirk.  There are many ways to keep Abe up to date, an no one fits every need.

You can use a script like abe_loader.  Actually, abe_loader is more complex than needed.  It watches bitcoind's debug.log for hints that a block has arrived.  Now that bitcoind supports blocknotify, we could just add something like this to bitcoin.conf:

Code:
blocknotify=python -m Abe.abe --config /etc/abe/abe.conf --no-serve

Another strategy is to run in a loop, like this:

Code:
while true; do python -m Abe.abe --config abe.conf --no-serve; sleep 10; done

I used to have a cron job that just loaded the homepage, serving as both a system monitor and a blockchain updater:

Code:
* * * * * /usr/bin/wget -q -O /dev/null http://john-edwin-tobey.org:2750/

One more question is there a way to check so the information in the mysql database is intact? (That does not take 14 days)

A complete check of all invariants does not exist.  It would be a nice feature.  Abe/verify.py does a small fraction of the work, calculating Merkle roots from stored transaction hashes.  I haven't tested it lately.
103  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 15, 2013, 01:05:24 AM
Code:
datadir = /Users/thisuser/Library/Application Support/Bitcoin/blocks
Leave /blocks off.  This should be:
Code:
datadir = /Users/thisuser/Library/Application Support/Bitcoin
104  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 14, 2013, 12:08:18 PM
Code:
ImportError: dlopen(/Users/thisuser/.python-eggs/MySQL_python-1.2.4-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): no suitable image found.  Did find:
/Users/thisuser/.python-eggs/MySQL_python-1.2.4-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so: mach-o, but wrong architecture

Sorry, this is an issue with Python modules on Mac, and I have no relevant experience.  Put this in a file and run it with "python FILE.py".  It will have to complete without error before you can use Abe:

Code:
import MySQLdb
105  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 09, 2013, 04:10:23 PM

That I can build wdc of abe services?

I don't know.  Can you get Abe working with BTC or NMC or LTC?  Those are known to work.

I need a little more information to understand your problem.  What is your python command line?  How big is /home/mapleshadow/.worldcoin/blocks/blk00000.dat ?  What exact version of Abe do you have?  (Post the output of "git rev-parse HEAD" and "git --no-pager diff")
106  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 08, 2013, 06:02:30 PM
my conf is wdc

wdc.conf:
dbtype sqlite3
connect-args abe.sqlite
datadir = [{
        "dirname": "/home/mapleshadow/.worldcoin",
        "chain":   "Worldcoin",
        "code3":   "WDC",
        "address_version": "\u0049" }]
int-type str
upgrade
port 2750
host 12.16.2.24

DataStore.py:
 {"chain":"Worldcoin",
     "code3":"WDC", "address_version":"\x49", "magic":""},

ERROR-1:
failed to load /home/maple/.worldcoin/bitcoin.conf: [Errno 2] No such file or directory: u'/home/maple/.worldcoin/bitcoin.conf'
catch_up_rpc: abort
Opened /home/mapleshadow/.worldcoin/blocks/blk00000.dat
Abe initialized.
Listening on http://12.16.2.24:2750

WHY?


Abe tries to load data over RPC, and when that fails, it reads block files.  (See default-loader in abe.conf to choose one or the other.)

Abe does not know about Worldcoin, so it looks for RPC credentials in bitcoin.conf.  There is no bitcoin.conf, so it logs an error and tries to load blocks from files, starting with blocks/blk00000.dat.  It did not find any blocks in that file, so perhaps the file is empty or the block format is not the same as Bitcoin's.

I am surprised that the configured dirname is in /home/mapleshadow but Abe looked for bitcoin.conf in /home/maple.
107  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 03, 2013, 01:57:32 AM
Thanks for your awesome contribution to the open source community.  I really appreciate the work you've done!

Happy to hear it.

I have been wondering if there is any way to accomplish this blockexplorer.com feature using abe:
In blockexplorer.com i can do this:
http://blockexplorer.com/q/getreceivedbyaddress/ADDRESS/N
Where N specifies the number of confirmations before a deposit is considered valid at that address. 

With Abe, i don't seem to be able to accomplish this functionality, eg:
http://bbq.cryptocoinexplorer.com/chain/BBQCoin/q/getreceivedbyaddress/ADDRESS/N
does the same thing as
http://bbq.cryptocoinexplorer.com/chain/BBQCoin/q/getreceivedbyaddress/ADDRESS

I checked in abe.py and it doesn't look like that extra parameter is handled at all.

I know a bit of python and wouldn't be too afraid to dive in and attempt to solve this myself, but before i do that i would like to hear any pointers / advice you would suggest on what the best approach would be to accomplish this (without making too much of a muck of your code).

Actually, this ought to be very simple.  I'd do it right now, but I am not at my secure workstation.  Where q_getreceivedbyaddress calls abe.store.get_received, it could pass the optional block_height parameter to ignore blocks after a certain number.  That number would be something like:
Code:
abe.store.get_block_number(chain['id']) + 1 - N
108  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 02, 2013, 03:14:22 PM
Ah, I can look up mempool transactions, but it does not add the addresses in that transaction to the database? I was hoping I could do a /unspent/ on mempool transactions as well.
This is a little tricky to do.  Abe does not delete transactions that can never get into the main chain because they contain inputs that are spent elsewhere.  /unspent/ excludes these from its output by filtering on block_tx and chain_candidate.in_longest = 1.  This also excludes mempool transactions.  Can you see them on the address page?
109  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 01, 2013, 05:48:44 PM
I'll probably just pick one of those chains. I didn't suspect trying to get 30 chains loaded in Abe would require you to fix a bunch of stuff Smiley

Your reports are helping me improve the code.  Thank you!!
110  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 01, 2013, 05:46:45 PM
In trying to find out the cause of my issue, I found that LTC, FTC, CNC & GME all have the same genesis block hash. Would that cause my issue?

Yes, probably, but it is a bug in Abe, and I'll try to fix it.  Thanks.
111  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 01, 2013, 03:03:55 PM
Run this SQL and see if it is fixed:
Code:
UPDATE datadir SET chain_id = 1, loader = 'rpc' WHERE datadir_id = 1;

In the datadir table I have the following columns:
datadir_id
dirname
blkfile_number
blkfile_number
blkfile_offset
chain_id
datadir_loader

Whoops, I guess I meant:
UPDATE datadir SET chain_id = 1, datadir_loader = 'rpc' WHERE datadir_id = 1;

How does Abe keep track of blockfiles and blockfile offsets when it is updating from RPC?

Putting chain_id and datadir_loader in the table was bad design.  I think they get their values from the "chain" and "loader" (or "default-loader") config elements when the datadir is first used, and thereafter, the config values are ignored.  I plan to make it use the config values only, but meanwhile, I think you can copy the correct values into the table row, and it will work.
112  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 01, 2013, 06:25:27 AM
where you able to find out what was wrong with testnet3?
Not yet, thanks for the reminder.

I think this is fixed in the latest commit (ecfe350).  Thanks for the report.
113  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 01, 2013, 03:10:00 AM
@diatonic Please try the latest code and report back.

The errors I posted above happen when I try to load Litecoin, CHNCoin or GameCoin. I've got about 27 chains loaded now I think at http://altcha.in .
I am working on a fix for this old bug.
114  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: July 01, 2013, 01:16:58 AM
The errors I posted above happen when I try to load Litecoin, CHNCoin or GameCoin. I've got about 27 chains loaded now I think at http://altcha.in .
I am working on a fix for this old bug.
115  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: June 30, 2013, 11:08:01 PM
I am trying to get Abe to connect through RPC, but I am getting the following error. The initial database loading was trough blkfile.

2013-06-27 23:39:43,338 [5344:MainThread] DataStore DEBUG - no chain_id
2013-06-27 23:39:43,339 [5344:MainThread] DataStore ERROR - Failed to catch up {'blkfile_offset': 40774615, 'blkfile_number': 100068, 'chain_id': None, 'loader': None, 'dirname': '/home/node/.bitcoin-fullindex', 'id': Decimal('1')}
Traceback (most recent call last):
  File "/home/node/bitcoin-abe/bitcoin-abe-master/Abe/DataStore.py", line 2594, in catch_up
    raise Exception("RPC load failed")
Exception: RPC load failed

Run this SQL and see if it is fixed:
Code:
UPDATE datadir SET chain_id = 1, loader = 'rpc' WHERE datadir_id = 1;

It's a bug, Abe should take the chain and loader from the config, not the database.
116  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: June 28, 2013, 07:32:07 PM
I really appreciate your help with this.

I updated, but now I get a different error:

Code:
Opened /home/diatonic/.chncoin/blk0001.dat
Exception at 8
Failed to catch up {'blkfile_offset': 0, 'blkfile_number': 1, 'chain_id': Decimal('30'), 'loader': None, 'dirname': u'/home/diatonic/.chncoin', 'id': 92L}
Traceback (most recent call last):
  File "Abe/DataStore.py", line 2599, in catch_up
    store.catch_up_dir(dircfg)
  File "Abe/DataStore.py", line 2857, in catch_up_dir
    store.import_blkdat(dircfg, ds, blkfile['name'])
  File "Abe/DataStore.py", line 2981, in import_blkdat
    if not store.offer_existing_block(hash, chain_id):
  File "Abe/DataStore.py", line 2468, in offer_existing_block
    store.offer_block_to_chains(b, frozenset([chain_id]))
  File "Abe/DataStore.py", line 2350, in offer_block_to_chains
    b['top'] = store.adopt_orphans(b, 0, chain_ids, chain_ids)
  File "Abe/DataStore.py", line 2097, in adopt_orphans
    next_ret = store.adopt_orphans(nb, new_work, None, chain_mask)
  File "Abe/DataStore.py", line 2029, in adopt_orphans
    util.get_search_height(height), int(block_id))
  File "Abe/util.py", line 91, in get_search_height
    if n & 1:
TypeError: unsupported operand type(s) for &: 'Decimal' and 'int'


Fixed, please try again.  Sorry if there are more errors, this code path is untested.  The lack of a test suite is what keeps me from calling it 1.0. Smiley
117  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: June 28, 2013, 03:08:47 PM
Code:
  File "Abe/DataStore.py", line 2465, in offer_existing_block
    store.offer_block_to_chains(b, frozenset([chain_id]))
  File "Abe/DataStore.py", line 2349, in offer_block_to_chains
    b['top'] = store.adopt_orphans(b, 0, chain_ids, chain_ids)
  File "Abe/DataStore.py", line 2015, in adopt_orphans
    if b['total_ss'] is None or b['satoshis'] is None:
KeyError: 'total_ss'

Fixed, please retry with the latest.  Thanks.
118  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: June 28, 2013, 03:11:57 AM
2013-06-27 23:39:43,338 [5344:MainThread] DataStore DEBUG - no chain_id
Does datadir have "chain":"Bitcoin"?
119  Other / Beginners & Help / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: June 25, 2013, 07:17:37 PM
Thanks for ABE. I've been trying it out with a few different alt-coins. I could do with a hand understanding address_version.

For most coins it seems to be obvious, just the unicode of the first character of an address. But some coins have addresses like this (feathercoin in this example)

6nh62XDjhbqjjit78jfStECNcHz89xbNeq
72HzQ77Xbpg67MadosyWDjd5YZsVHz4Npt

etc...
Plugging it into decode_address, for example:

http://explorer.doubloons.net/chain/Doubloons/q/decode_address/6nh62XDjhbqjjit78jfStECNcHz89xbNeq

gives "0e" as the hex version byte for both those addresses, so I would think it is "\u000e".
120  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: June 25, 2013, 04:19:38 PM
I was able to get it to run from Python with Bitgems & BottleCaps (NovaCoin/PPcoin forks) this way. Thought I would post it here in hopes that it helps someone else.
Great, thanks!
Pages: « 1 2 3 4 5 [6] 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!