Bitcoin Forum
June 23, 2021, 12:20:24 AM *
News: Latest Bitcoin Core release: 0.21.1 [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 »
1  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: October 24, 2014, 03:55:26 PM
abe.bit Namecoin domain free to a good home

I no longer work with Abe and have no plans for the "d/abe" NMC name (abe.bit).  If anyone would like it, please reply with your Namecoin address.  I'll check back in a day or two.
2  Bitcoin / Bitcoin Technical Support / Re: help with wallet.dat on: October 08, 2014, 03:30:31 PM
Here is a well written (in French) guide to wallet.dat recovery:
3  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: August 01, 2014, 07:25:45 PM
Hi! I want to load my chain form altocin. But all I've got is this:
ImportError: No module named Polcoin

What am I doing wrong?

My config:
dbtype MySQLdb
connect-args {"user":"abe","db":"abe","passwd":"pass"}
port 2750
host localhost
datadir += [{
commit-bytes = 10000

Hmm, it works here.  Are we on the same branch?

$ git rev-parse HEAD

Have you installed the modules or are you running from the git directory?

I put in backslashes where you need them, I guess the forum software eats them.  But that shouldn't affect loading the chain module.
4  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 29, 2014, 09:23:20 PM
Anybody else noticed that when you use "policy" "NovaCoin" or a clone of it that the database stores really random data? Yet the explorer displays it perfectly?

Take a look at this :

mysql> select * from block where block_id=5634;
| block_id | block_hash                       | block_version | block_hashMerkleRoot             | block_nTime | block_nBits | block_nNonce | block_height | prev_block_id | search_block_id | block_chain_work                       | block_value_in | block_value_out | block_total_satoshis | block_total_seconds | block_satoshi_seconds | block_total_ss       | block_num_tx | block_ss_destroyed |
|     5634 | =!ňa3ϲ
                            Ap<Sǭ0"              |             4 | -i;Im]Ӏж5T,A                   |  1398428970 |   503599037 |            0 |         5368 |          5627 |         -[   |    12512800000 |     12516750410 |       70151186978517 |             1069334 |   9101769833206534328 | 74298551044584278866 |            2 |   1245836932000000 |
1 row in set (0.00 sec)

I've been able to reproduce this with half a dozen different coins, yet when I change it from NovaCoin to X11 or Sha256 the data in the DB shows as normal....

Are you sure it depends on policy?  Recently I changed Abe to use binary data types by default.  To get the old behavior, configure binary-type=hex.
5  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 23, 2014, 04:25:58 PM
Hey John,

I just wanted to make sure that this part of the code

AND cc.in_longest = 1

in this SQL query

SELECT b.block_hash, b.block_height, b.block_nTime, b.block_num_tx,
                   b.block_nBits, b.block_value_out,
                   b.block_total_seconds, b.block_satoshi_seconds,
                   b.block_total_satoshis, b.block_ss_destroyed,
              FROM block b
              JOIN chain_candidate cc ON (b.block_id = cc.block_id)
             WHERE cc.chain_id = 1
               AND cc.block_height BETWEEN 100 AND 200
               AND cc.in_longest = 1
             ORDER BY cc.block_height DESC LIMIT 50

makes sure that the query returns only valid blocks. leaving orphans out.

inversely, if I would be writing

AND cc.in_longest = 0

I would have be getting only orphans?  is that correct?

Yes.  Abe updates in_longest during reorgs, and 1 means in the current best chain.
6  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 21, 2014, 05:08:17 PM
This might be a silly question, but how would I use Abe functions in my own Python programs.  The web interface is nice and all, but it is slow.  And the command line --query statements aren't exactly fast either.  I'm thinking if I could call a function directly from within my own Python code, instead of parsing web API output, what I'm writing could be so much more efficient and speedy.

For example, if I wanted to get the balance of an address, it would be nice to be able to directly call the function in Abe that calculates the balance.

Does that make sense?

Yes, check out these programs in the source tree for example code, possibly out of date:

7  Other / Beginners & Help / Re: Can't load Bitcoin blockchain into current version of Abe on: April 18, 2014, 01:07:55 PM
I've let the current version grind away for a week or two, only to get stuck on importing the Bitcoin blockchain.  On block 234062, it fails pretty spectacularly.  I probably shouldn't have been running this branch anyway as it doesn't handle scrypt coins, but that still doesn't explain what's going horribly wrong.  I'm running bitcoind 0.9.1 and told it to verify the entire blockchain; it came back with nothing wrong.  All this is on a freshly setup Ubuntu Server LTS 14.04 box (had been running late betas or release candidates); I'm using PostgreSQL for the database.

What follows is what spits out when I try to have it resume.  Take particular note of the line that starts with "InvalidOperation: Invalid literal for Decimal:"

Opened /home/bitcoind/.bitcoin/blocks/blk00057.dat
Exception at 74222644
Failed to catch up {'blkfile_offset': 73974221, 'blkfile_number': 100057, 'chain_id': 1, 'loader': u'blkfile', 'conf': None, 'dirname': '/home/bitcoind/.bitcoin', 'id': Decimal('1')}
Traceback (most recent call last):
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 2503, in catch_up
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 2767, in catch_up_dir
    store.import_blkdat(dircfg, ds, blkfile['name'])
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 2899, in import_blkdat
    store.import_block(b, chain = chain)
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 1043, in import_block
    tx['tx_id'] = store.import_and_commit_tx(tx, pos == 0, chain)
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 1852, in import_and_commit_tx
    tx_id = store.import_tx(tx, is_coinbase, chain)
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 1819, in import_tx
    txin['prevout_hash'], txin['prevout_n'])
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 2431, in lookup_txout
    (store.hashin(tx_hash), txout_pos))
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 251, in selectrow
    return store._sql.selectrow(stmt, params)
  File "/home/bitcoin-abe/bitcoin-abe/Abe/", line 479, in selectrow
    ret = sql.cursor().fetchone()
  File "/usr/lib/python2.7/", line 548, in __new__
    "Invalid literal for Decimal: %r" % value)
  File "/usr/lib/python2.7/", line 3872, in _raise_error
    raise error(explanation)
InvalidOperation: Invalid literal for Decimal: 'N26...'

Yeah wow, it's a doozy!  As near as I can make out, lookup_txout is getting that 17kB string as its txout_pos argument, so import_tx must have got it in txin['prevout_n'], which it got from tx.  Since you are loading from blkfile, tx must have come from chain.ds_parse_block ( Line 2889) and ultimately from deserialize.parse_Transaction.  That gets txin from parse_TxIn, which gets txin['prevout_n'] from BCDataStream's read_uint32 method, and ultimately from the standard struct.unpack_from function.  This whole code path is very common in Abe and must have run millions of times successfully during your load before the error.

I would really like to know whether struct.unpack_from returns a 17kB string and, if not, where my chain of reasoning fails.  If so, it seems like a serious Python bug, and I would like to create a minimal test case and report it.

Scrypt coin configuration could be patched in after the fact, so you are okay there.
8  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 16, 2014, 01:44:42 PM
Not sure why but anytime I try to use the newest version of the chain explorer with a proof of stake coin I get this when browsing any block

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/home/*/Downloads/bitcoin-abe/Abe/", line 250, in __call__
  File "/home/*/Downloads/bitcoin-abe/Abe/", line 673, in handle_block
    abe._show_block(page, '', None, block_hash=block_hash)
  File "/home/*/Downloads/bitcoin-abe/Abe/", line 564, in _show_block
    is_stake_block = is_stake_chain and b['is_proof_of_stake']
KeyError: 'is_proof_of_stake'

I've tried faircoin and community coin, I use policy NovaCoin, it seems to load all the blocks but when browsing any block I get the above error, when accessing addresses and transaction everything works fine.

Sorry, I have been busy, but this looks fixable.  Did you have it working with an older version?
9  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 16, 2014, 01:43:11 PM
This will allow my to use the explorer but the currency is labeled "Hirocoin", while all transactions and blocks appear to be from Logicoin. If I change "loader": "Logicoin" then it shows 0 blocks and doesn't work at all. Not sure what I've missed?

Leave "loader" as "blkfile" and "policy" as what it was when you could browse the blocks.  Add "chain":"Logicoin".  If you omit "policy" it defaults to the chain name, but Abe does not recognize "Logicoin" as a policy name.  (Ideally, we should tell Abe/ about Logicoin.)  If you specify "policy", then Abe uses the chain name for display and search only, so "chain" will not affect the block count or content.
10  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 14, 2014, 09:07:58 PM

As my disk is not so big and I don't want to download further block chain data, so I changed the loader of Abe to "blkfile' from 'rpc', and I expected that the database won't increase. However, it seems Abe reloaded the blkfile into the database from the scratch and the block_tx number continued to increase though the block data was not updated. It did re-index the data into database according to the Abe browser that the block number just several thousands.

What's the problem? How can I recover to the right database?


loading from rpc or blkfile, yields the same database information, i would delete the database and reload everything again, or add new space to your server and change the directory where mysql puts the database.

Yes, the database is equally huge whichever loader you use.  I've started a new branch ("small") where I try to keep the database size down, but I don't know when it will be usable.  Meanwhile, people are saying good things about Insight:
11  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 14, 2014, 09:04:19 PM
Abe is stuck on a block height... when I search for the block after, it gives me 3 choices and if I click on either of them... it crashes with this

<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'has_feature'
      args = ("'NoneType' object has no attribute 'has_feature'",)
      message = "'NoneType' object has no attribute 'has_feature'"

So I guess those are orphans and Abe doesn't know what to do with those (or witch one to chose)

My question would be, am I correct? how can this be fixed?

I don't really have enough information, but it looks as if some code is not specifying the chain where it should.  I think this is a recent bug.  I tried to fix some cases like this here but it is not well tested.  You might try inserting "chain/.../" into the links returned by the search.

In any case, orphan blocks should not get Abe "stuck" so there is something else wrong.
12  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 09, 2014, 01:38:13 PM
Anyone know how to have Abe show top wallet balances?  If not already built in, how could I query the mysql DB for this info?

As unick says, it is not built in.  You can search this thread for "txout_value" to find a query that gives the amount received by an address ("pubkey").  A similar query (joining txin with txout on txout_id) can give the amount received.  Subtract to get the "balance" for that particular public key (which, you must know, is not the same as a wallet.dat file).  Use GROUP BY to put them all into a table and select from it ordering by balance.  Remember to limit the results to where chain_candidate.in_longest=1 in case your database contains side-chains.
13  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 04, 2014, 01:04:18 PM

Since ABE reads the blk0001.dat file, it can only read the confirmed transactions.  Does anyone know how achieves showing the latest posted transactions on the network?
Abe has a option to read the mempool from RPC, so it would show unconfirmed transactions as well.

How would that be setup?

See the comments above "default-loader" in abe.conf.
14  Other / Beginners & Help / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 03, 2014, 05:52:46 AM
I've been trying for hours to fix this...this is the error I get.
WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI!
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!

If I start Abe using its own server, it is fine. However, this is no good for me as I want to run it as a website.

I have googled for literally hours. I have tried everything I can find and anything I can think of. Sure I'm probably missing something stupid...any ideas?

Assuming you have read the directions in README-FASTCGI.txt, can you get this sample FastCGI app to run?

Abe runs the same way, using flup.server.fcgi.WSGIServer.
15  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: April 01, 2014, 02:43:10 AM
I modified the default template and I want ABE to load variables on page refresh (current price of coin for instance).

I doesn't refresh, I have to do a sevice apache2 reload or service apache2 restart so ABE can fetch the correct value for the variable.

Any clue on where I should define my variables so ABE can look them up on page load rather than on service load?  I'm on FCGI config obviously.


With the current template support, I suggest inserting a <script> that fetches the dynamic content with Ajax.  But if you are working on the front end, please note the big facelift in the works:
16  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: March 28, 2014, 05:51:10 PM
I guess this is result from the same problem mole sees. I have solved this by dropping the database and re-building it. I guess it would be enought to delete the latest block from the database, but have not had time to investigate this further. Auroracoin blockchain is still small enought..

Yes, unfortunately I think molecular is on the big chain.  I started a module (Abe.admin) to delete problem data but didn't get to the "delete from block X onwards" function.
17  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: March 28, 2014, 01:41:06 PM
What happens if there is a catch-up triggered by request A, then request B comes in?

B tries to "help" A catch up.  Which would be okay if the loader code were free of bugs.  Probably the easiest fix (when I--or someone--has time) is to enforce single-threaded loading with a database lock.
18  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: March 28, 2014, 01:38:09 PM
This is what I get after block with a lot of tranasactions:
/usr/local/lib/python2.7/dist-packages/Abe/ in handle_chain(abe=<__main__.Abe instance>, page={'body': ['<p>Search by address, block .........}, 'title': u'AuroraCoin'})
    486             seconds = int(seconds)
    487             satoshis = int(satoshis)
=>  488             ss = int(ss)
    489             total_ss = int(total_ss)
ss = None, builtin int = <type 'int'>

You can edit Abe/ and replace "int(ss)" with "None if ss is None else int(ss)" and similarly for "int(total_ss)".

I hesitate to apply this change in the master branch, since the error indicates a bug elsewhere.  "ss" is not supposed to be None there.  I suspect database corruption resulting from parallel loading processes.  The root cause is Abe's failure to specify "transaction isolation level serializable" when loading.  I would like to fix it, but it would take some effort, and meanwhile, my advice is to have all but one process use --no-load at any given time.
19  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: March 28, 2014, 03:46:58 AM
New Abe feature: Standard Bitcoin multisig and pay-to-script-hash (P2SH) support is in the master branch, thanks to Jouke's generous sponsorship.  This old post describes what it means.  Upgrade could take a few minutes to over an hour on a fully loaded Bitcoin database as Abe scans for output scripts not yet assigned an address.  Always backup your important data prior to upgrading.

Master also has the beginning of a test suite covering SQLite, MySQL, and PostgreSQL, which you can run by installing pytest and running py.test in the bitcoin-abe directory.  To test with MySQL and PostgreSQL requires those databases' respective instance creation tools.  Specify ABE_TEST=quick or ABE_TEST_DB=sqlite in the process environment to test only with a (much faster) SQLite in-memory database.  The tests cover block, tx, and address pages, prior to HTML rendering.
20  Bitcoin / Project Development / Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff on: March 28, 2014, 01:13:46 AM
I made succesfully a working explorer for Trollcoin. One question remains however:

1: I have a process for loading the blockchain
2: I have a process for serving the html pages

process 1 is now handled by a cron job
process 2 is only running as long as i keep an SSH session with server open.

Anyone with some tips on how to daemonize the Abe webserver process??
I tried to find some information with google but this seems to be a hard part!

Search for "upstart" or "daemontools", or you could follow Abe's FastCGI instructions and use a regular web server.

Edit: For keeping an SSH tunnel open, I used to use daemontools, but I think upstart is more usable and standard nowadays, at least on Linux.
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!