Pages:
Author

Topic: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff - page 13. (Read 220986 times)

full member
Activity: 189
Merit: 100
जगत् िमत
Hi everyone, Are you facing any instability in your block explorer installation with the new design at https://github.com/bitcoin-abe/bitcoin-abe/tree/geekz-patch-1 ?

I had pushed/published the new design for ABE , you can view it at https://github.com/bitcoin-abe/bitcoin-abe/tree/geekz-patch-1 . But I myself have not been able to get stable performance using it.
Currently i am using digitalocean instance with 2GB RAM for site at http://ancblockchain.com and the site is not stable.  
This can also because of hosting provider.  Can anyone please suggest me a good hosting provider?

Please help me friends.
I would be able to push/publish more new features in Abe Explorer, for the benefit of community. But i need to get it working properly.   Huh Huh
sr. member
Activity: 504
Merit: 250
I'm trying to set a new block explorer... Abe reads the blockchain fine and loaded the database without a itch.

I get an error when I try to access the block details page.  Any other page loads fine. I use FastCGI

here's the error (last call)

Code:
is_stake_block undefined, is_stake_chain = True, b = {'chain_candidates': [{'chain': , 'in_longest': Decimal('1')}], 'chain_satoshi_seconds': 2517292340726300000000L, 'chain_satoshis': 3342705000000000, 'chain_work': 13618916087790469, 'fees': 57000, 'generated': 5000000000, 'hash': '00000000001930548377e3e15c927d8d79278cb8ba53b1d015468609e3085b13', 'hashMerkleRoot': '36f8065b8c6c95b37c426fbf95bb0bcf98dc04817de8257ffd624d8311cb2603', 'hashPrev': '000000000141a8721757560bb837c6d7be9aa85cf5333bfeaff2602c9d9a1d7a', 'height': Decimal('12441'), ...}
: 'is_proof_of_stake'
      args = ('is_proof_of_stake',)
      message = 'is_proof_of_stake'


Never saw this message before, what does it mean?

Thanks

EDIT: from what I understand, Abe test for the block to see if it's proof-of-stake...

EDIT: I used an older version of abe.py and the error went away. Still any clues on why I get this error would be appreciated Smiley

I made a VeriCoin block explorer (http://blocks.vericoin.info) which is a NovaCoin deriv. and am getting the same error as you. Could you pastebin your abe.py file? Thanks!

I was able to get around the error by commenting out the following lines of Abe.py:

        is_stake_chain = chain.has_feature('nvc_proof_of_stake')
        is_stake_block = is_stake_chain # and b['is_proof_of_stake']

and

  if tx is b['transactions'][0]:
      assert txout['value'] == 0
      assert len(tx['out']) == 1
      body += [
   #   format_satoshis(b['proof_of_stake_generated'], chain),
  ' included in the following transaction']


I think there's a bug in DataStore.py where the values b['is_proof_of_stake'] and b['proof_of_stake_generated'} are set.
sr. member
Activity: 504
Merit: 250
I'm trying to set a new block explorer... Abe reads the blockchain fine and loaded the database without a itch.

I get an error when I try to access the block details page.  Any other page loads fine. I use FastCGI

here's the error (last call)

Code:
is_stake_block undefined, is_stake_chain = True, b = {'chain_candidates': [{'chain': , 'in_longest': Decimal('1')}], 'chain_satoshi_seconds': 2517292340726300000000L, 'chain_satoshis': 3342705000000000, 'chain_work': 13618916087790469, 'fees': 57000, 'generated': 5000000000, 'hash': '00000000001930548377e3e15c927d8d79278cb8ba53b1d015468609e3085b13', 'hashMerkleRoot': '36f8065b8c6c95b37c426fbf95bb0bcf98dc04817de8257ffd624d8311cb2603', 'hashPrev': '000000000141a8721757560bb837c6d7be9aa85cf5333bfeaff2602c9d9a1d7a', 'height': Decimal('12441'), ...}
: 'is_proof_of_stake'
      args = ('is_proof_of_stake',)
      message = 'is_proof_of_stake'


Never saw this message before, what does it mean?

Thanks

EDIT: from what I understand, Abe test for the block to see if it's proof-of-stake...

EDIT: I used an older version of abe.py and the error went away. Still any clues on why I get this error would be appreciated Smiley

I made a VeriCoin block explorer (http://blocks.vericoin.info) which is a NovaCoin deriv. and am getting the same error as you. Could you pastebin your abe.py file? Thanks!
full member
Activity: 534
Merit: 100

This looks like a wrong port/server IP or port in use.

If I recall I couldn't make abe work with apaches sites enabled feature. So I used the default config and modify accordingly.

So instead of this in /etc/apache2/sites-enabled/abe

Code:
 
        ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40


try instead adding

Code:
        ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40

in /etc/apache2/sites-enabled/default tags.



Hi Smiley

Thanks!  I tried this but still cant connect using fastcgi.  It's weird. I've tried everything about 5 times and still no luck.  It begins by successfully reading data via rpc but then buckles when it tries to establish a connection to apache2.  It looks like it could be permissions. perhaps python not being able to connect to apache rather than colliding with an existing connection on port 80. I've even disabled the default site so my httpd conf info in 'abe' is the only site running.  

I've removed the port & host data from abe.conf

Code:
sh-4.2$ python -m Abe.abe  --config /home/ultra/abe-utc/abe.conf --static-path /static/
block_tx 322139 763931
commit
block_tx 322140 763932
commit
block_tx 322141 763933
commit
block_tx 322142 763934
commit
block_tx 322143 763935
commit
block_tx 322144 763936
block_tx 322144 763930
commit
Abe initialized.
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 "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2279, in
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2275, in main
    serve(store)
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2151, in serve
    httpd = make_server(args.host, port, abe)
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 144, in make_server
    server = server_class((host, port), handler_class)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 48, in server_bind
    HTTPServer.server_bind(self)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 13] Permission denied
sh-4.2$

some serious head scratching going on here :/

hero member
Activity: 589
Merit: 500
I will give you some bounty if you help me Smiley
hero member
Activity: 589
Merit: 500
Hello, could someone please help me with this issue?
sr. member
Activity: 504
Merit: 254
full member
Activity: 534
Merit: 100
Hi Smiley

I'm attempting to run a forked Abe (for ultracoin) using fastcgi on my server. I have root access and for the time being everything everything is setup as root.

I have downloaded the UTC blockchain data files and all my other files seem to be in the correct place but I still can't get Abe to run on my domain on port 80

I've spent a couple of days changing permissions, reinstalling etc but cannot get anywhere.

Instead when I view Abe @ http://mydomain.com  I am confronted with 'internal server error' - a look at the log says 'premature end of scripts headers on abe.fcgi

Code:
[Sun May 18 01:34:03 2014] [warn] [client ***.***.***.***] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun May 18 01:34:03 2014] [error] [client ***.***.***.***] Premature end of script headers: abe.fcgi

I don't understand why this is as I have followed the be fastcgi instructions to the letter, creating the necessary files and directories, making them executable.  

I have repeated the process numerous times and am nearly ready to throw in the towel Sad  and i'm no quitter.


My abe.conf file @ /home/ultra/abe-utc/abe.conf

Code:
dbtype MySQLdb
connect-args {"user":"abe","db":"abe","passwd":"mypass"}
datadir += [{
        "dirname": "/root/.ultracoin",
        "chain": "Ultracoin",
        "code3": "UTC"}]


and httpd conf file @ /etc/apache2/sites-enabled/abe looks like this:

Code:
 
        ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40



/usr/lib/cgi-bin/abe.fcgi (made executable)

Code:
#! /usr/bin/python
import subprocess, sys, os
command=["sudo", "-u", "ultra", "/home/ultra/mydomain.com/cgi-bin/abe", str(os.getpid())]
subprocess.Popen(command, stdin=sys.stdin).wait()


/home/ultra/mydomain.com/cgi-bin/abe  (made executable)

Code:
#! /bin/sh
PYTHONUNBUFFERED=1 exec python -m Abe.abe \
--config /home/ultra/abe-utc/abe.conf --static-path static/ --watch-pid="$1"


I notice when I try and run Abe via the command line it appears there could be a conflict eg. socket.error: [Errno 99] Cannot assign requested address

Code:
root@***:~/.ultracoin# python -m Abe.abe --config /home/ultra/abe-utc/abe.conf

Abe initialized.
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 "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2279, in
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2275, in main
    serve(store)
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2151, in serve
    httpd = make_server(args.host, port, abe)
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 144, in make_server
    server = server_class((host, port), handler_class)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 48, in server_bind
    HTTPServer.server_bind(self)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address



If any one can help I'd appreciate it. i'll even hand over some coins in exchange for some sleep Smiley

Cheers

ps. running debian 7 64bit
member
Activity: 105
Merit: 10
@ky_storm
member
Activity: 105
Merit: 10
@ky_storm
hi, I checkout the branch "geekz-patch-1".

It work fine except the block list(/chain/xxx). The browser shows
Code:
DataTables warning (table id = 'chain'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

It happened when enter a chian or changed the display number of per page. It just always display 10 blocks data and couldn't changed.

Can you tell me how to fix it?

I know it use the new API: /q/get_blocks_data

But when i directly browser this api with some json parameters, it shows error info like this:
Code:
	Python 2.7.6: /usr/bin/python
Sat May 17 14:03:00 2014
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in run(self=)
    556         """Runs the handler, flushes the streams, and ends the request."""
    557         try:
=>  558             protocolStatus, appStatus = self.server.handler(self)
    559         except:
    560             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = , self.server = , self.server.handler = >
 /usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in handler(self=, req=)
   1116         try:
   1117             try:
=> 1118                 result = self.application(environ, start_response)
   1119                 try:
   1120                     for data in result:
result = None, self = , self.application = <__main__.Abe instance>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, start_response =
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in __call__(abe=<__main__.Abe instance>, env={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, start_response=)
    291                 abe.store.catch_up()
    292
=>  293             handler(page)
    294         except PageNotFound:
    295             status = '404 Not Found'
handler = >, page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': , 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in handle_q(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': , 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']})
   1348             raise PageNotFound()
   1349
=> 1350         abe.do_raw(page, func)
   1351
   1352         if page['content_type'] == 'text/plain':
abe = <__main__.Abe instance>, abe.do_raw = >, page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': , 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func = >
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in do_raw(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': , 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func=>)
   1337         page['content_type'] = 'text/plain'
   1338         page['template'] = '%(body)s'
=> 1339         page['body'] = func(page, page['chain'])
   1340
   1341     def handle_q(abe, page):
page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': , 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func = >
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in q_get_blocks_data(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': , 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, chain=None)
   1392         page['content_type'] = 'application/json'
   1393         latest_blocks = []
=> 1394         total_number_of_blocks = abe.get_max_block_height(chain)
   1395         post_data = get_post_data(page)
   1396         if chain is None:
total_number_of_blocks undefined, abe = <__main__.Abe instance>, abe.get_max_block_height = >, chain = None
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in get_max_block_height(abe=<__main__.Abe instance>, chain=None)
   1379         # "getblockcount" traditionally returns max(block_height),
   1380         # which is one less than the actual block count.
=> 1381         return abe.store.get_block_number(chain.id)
   1382
   1383     def q_getblockcount(abe, page, chain):
abe = <__main__.Abe instance>, abe.store = , abe.store.get_block_number = >, chain = None, chain.id undefined
: 'NoneType' object has no attribute 'id'
      args = ("'NoneType' object has no attribute 'id'",)
      message = "'NoneType' object has no attribute 'id'"



I also find someone's block chain worked fine while the error exist.
Juse like:
http://magichain.info/q/get_blocks_data

His pages are OK without json errors. Why?
sr. member
Activity: 325
Merit: 250
Hi.
Tracking down a premine I want to understand better, I found this thing I think is anomalous:

cryptoblox.com/address/1JxY6A5jgjGysUFFpkYwA6g3ZVkDCyPjdM
cryptoblox.com/address/8xNzoDkDBA5dQhtuHiszNUqzX5e8kLqUiy

they belong to 2 different addresses but have same amount, TXID etc.

I'm kind of new to this blockchain things and I'm probabily missing something.

Anyone would care to clarify it for me please?

Thanks.
mass

hero member
Activity: 530
Merit: 500
Would anyone be interested in creating a block explorer/rich list for XLB (LibertyCoin). We have a 3000 XLB balance and I'm willing to add a lil more if needed. Please PM me if interested, or irc.freenode.net #libertycoin

Thanks Smiley
sr. member
Activity: 504
Merit: 254
Did you update the source recently?

Another odd behaviour I get is when I try to read the pubkey_hash from the database, I get gibberish characters, so my script fails since it can't recognize the actual public key.

I'm trying to pinpoint the issue, any ideas?

All my databases are configured the same so that's why I wonder if there was a code change influencing this.

EDIT: ok, I think I found it, the column type for pubkey_hash is now binary(20), previously it was char(40).  The first question that comes into mind is why this was changed ?
newbie
Activity: 2
Merit: 0
Hi John,

Thanks for all your work on ABE, it's a great piece of software. I have loaded in a few blockchains now, but there's one in particular I am having issues with and I see some strange behaviour that I haven't been able to understand. I am trying to load in the Datacoin blockchain which is a primecoin based chain with additional data structures for storing data in the blockchain.

I understand Abe won't be able to parse the data component which I am going to do separately with Datacoin tools, I am looking to import the transaction information via RPC however ABE is making a strange RPC call that the daemon doesn't like causing it to fail.

I have defined the coin details in abe.conf and specified the genesis block transaction:

Code:
import-tx += 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff350002e7033068747470733a2f2f626974636f696e74616c6b2e6f72672f696e6465782e7068703f746f7069633d3332353733352e30ffffffff0100e1f50500000000000000000000

datadir += [{
        "dirname": "/usr/src/dev/bitcoin/blockchain/datacoin/",
        "chain": "Datacoin",
        "code3": "DTC",
        "address_version": "\u001e",
        "loader": "rpc",
        "conf": "/usr/src/dev/bitcoin/blockchain/datacoin/datacoin.conf"
      }]

However when I run abe, it throws an error from the RPC call to get the next block:

Code:
python -m Abe.abe --config abe.conf

Falling back to default (Bitcoin) policy.
RPC failed: ('http protocol error', 0, 'got a bad status line', None)
Failed to catch up {'blkfile_offset': 0, 'blkfile_number': 1, 'chain_id': 11, 'loader': u'rpc', 'conf': u'/usr/src/dev/bitcoin/blockchain/datacoin/datacoin.conf', 'dirname': u'/usr/src/dev/bitcoin/blockchain/datacoin/', 'id': 18L}
Traceback (most recent call last):
  File "Abe/DataStore.py", line 2511, in catch_up
    raise Exception("RPC load failed")
Exception: RPC load failed

I did a tcpdump of the RPC request and I can see that for some reason, Abe is requesting block height 'x' which is causing the daemon to immediately drop the connection. The same command from the command line also throws an error:

Code:
POST http://127.0.0.1:11777 HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 70
Authorization: Basic [...]
Host: 127.0.0.1:11777
User-Agent: Python-urllib/1.17

{"params": [0], "jsonrpc": "2.0", "method": "getblockhash", "id": "x"}

Any idea where the x is coming from? I looked all through DataStore.py at where get_blockhash is used and from what I can see it's meant to be requsting block height 0.
sr. member
Activity: 504
Merit: 254
I'm trying to set a new block explorer... Abe reads the blockchain fine and loaded the database without a itch.

I get an error when I try to access the block details page.  Any other page loads fine. I use FastCGI

here's the error (last call)

Code:
is_stake_block undefined, is_stake_chain = True, b = {'chain_candidates': [{'chain': , 'in_longest': Decimal('1')}], 'chain_satoshi_seconds': 2517292340726300000000L, 'chain_satoshis': 3342705000000000, 'chain_work': 13618916087790469, 'fees': 57000, 'generated': 5000000000, 'hash': '00000000001930548377e3e15c927d8d79278cb8ba53b1d015468609e3085b13', 'hashMerkleRoot': '36f8065b8c6c95b37c426fbf95bb0bcf98dc04817de8257ffd624d8311cb2603', 'hashPrev': '000000000141a8721757560bb837c6d7be9aa85cf5333bfeaff2602c9d9a1d7a', 'height': Decimal('12441'), ...}
: 'is_proof_of_stake'
      args = ('is_proof_of_stake',)
      message = 'is_proof_of_stake'


Never saw this message before, what does it mean?

Thanks

EDIT: from what I understand, Abe test for the block to see if it's proof-of-stake...

EDIT: I used an older version of abe.py and the error went away. Still any clues on why I get this error would be appreciated Smiley
hero member
Activity: 821
Merit: 1000
hero member
Activity: 481
Merit: 529
newbie
Activity: 1
Merit: 0
Hi!

First, thanks for great tool. Nice job!

My question:

I have working site after scanning all block (loaded to MySql database). How can I get list of 100 richest addresses? It is possible?
hero member
Activity: 821
Merit: 1000
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 :
http://explorer.information-coin.com/block/5bf9c6ba1f6e893a50141040601bf0fbeddffab6dd03f125c3434c41eed9e7d3

Code:
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 | =ô÷!€Åˆ·€�aí3ϲ
                            ApÀ½+----------+----------------------------------+---------------+----------------------------------+-------------+-------------+--------------+--------------+---------------+-----------------+----------------------------------------+----------------+-----------------+----------------------+---------------------+-----------------------+----------------------+--------------+--------------------+
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....
hero member
Activity: 481
Merit: 529
Hey John,

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

Code:
AND cc.in_longest = 1

in this SQL query

Code:
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,
                   b.block_total_ss
              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

Code:
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.
Pages:
Jump to: