John Tobey (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 18, 2014, 01:57:58 PM |
|
Enabled log-sql: EXEC: INSERT INTO tx (tx_id, tx_hash, tx_version, tx_lockTime, tx_size) VALUES (%s, %s, %s, %s, %s) (88379L, 'c333a53f0174166236e341af9cad795d21578fb87ad7a1b6d2cf8aa9c722083c', 1, 0, 998171) EXEC: INSERT INTO txout_seq () VALUES () () EXEC: SELECT LAST_INSERT_ID() () FETCH: (115923L,) EXEC: INSERT INTO txout ( txout_id, tx_id, txout_pos, txout_value, txout_scriptPubKey, pubkey_id ) VALUES (%s, %s, %s, %s, %s, %s) (115923L, 88379L, 0, 0, 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffff fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff fffff [...cut... many, many, MANY, 'f']
This is the query that screws everything up Edit: WELL, found the problem: http://blockexplorer.com/testnet/tx/c333a53f0174166236e341af9cad795d21578fb87ad7a1b6d2cf8aa9c722083ca crazy block in testnet blockchain. Now I have to figure out how to skip this block. I don't know when I'll have time to fix this, but I'm glad we see it on testnet before main. Thanks.
|
|
|
|
gdassori
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 18, 2014, 01:58:51 PM |
|
John, check the edit2, previous post: I included it. About the strange transaction: it's bread for gavin's teeths but since the block is old, I guess he already know about this.
|
|
|
|
agran
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 19, 2014, 10:47:41 AM |
|
Coin: [FC] Fuguecoin https://bitcointalk.org/index.php?topic=519138.0https://github.com/fuguecoin/fuguecoinhttp://agran.net:2750/chainsabe-my.conf dbtype MySQLdb connect-args {"user":"abe","db":"abe","passwd":"*****"} upgrade port 2750 host agran.net datadir = [{ "dirname": "/root/.fuguecoin", "chain": "Fuguecoin", "code3": "FC", "address_version": "\u0023", "conf": "fuguecoin.conf" }] DataStore.py CHAIN_CONFIG = [ {"chain":"Fuguecoin", "code3":"FC", "address_version":"\x23", "magic":"\x0b\x11\x09\x07"} ] python -m Abe.abe --config abe-my.conf --commit-bytes 100000 --no-serve python -m Abe.abe --config abe-my.conf http://agran.net:2750/chainsShows only the first block. The thing I do not understand.
|
|
|
|
John Tobey (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 19, 2014, 03:52:59 PM |
|
Shows only the first block. The thing I do not understand.
When Abe loads many blocks but shows only the genesis block, it means that Abe is using the wrong algorithm to calculate the block header hash as it appears in the next block's hashPrev field. By default, Abe uses double-SHA256, the same as Bitcoin. Many coins use scrypt. I would like to make this selectable by datadir=[{...,"hashPrev":"scrypt"}], but for now it requires a few lines of code. Look for "NovaCoin" in the sources for an example.
|
|
|
|
|
bergi
Newbie
Offline
Activity: 8
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 19, 2014, 07:37:23 PM |
|
Guys, help me, please. Trying to up abe with fastcgi, but all output instead to go to browser going to stderr, like this 2014-03-19 22:34:07,163 [8311:MainThread] Abe.DataStore INFO - block_tx 53355 138881 2014-03-19 22:34:07,165 [8311:MainThread] Abe.DataStore DEBUG - commit 2014-03-19 22:34:07,169 [8311:MainThread] Abe.DataStore INFO - block_tx 53356 138882 2014-03-19 22:34:07,171 [8311:MainThread] Abe.DataStore DEBUG - commit 2014-03-19 22:34:07,178 [8311:MainThread] Abe.DataStore INFO - block_tx 53357 138883 2014-03-19 22:34:07,178 [8311:MainThread] Abe.DataStore INFO - block_tx 53357 138884 2014-03-19 22:34:07,186 [8311:MainThread] Abe.DataStore DEBUG - commit 2014-03-19 22:34:07,192 [8311:MainThread] Abe.DataStore INFO - block_tx 53358 138885 2014-03-19 22:34:07,192 [8311:MainThread] Abe.DataStore INFO - block_tx 53358 138886 2014-03-19 22:34:07,196 [8311:MainThread] Abe.DataStore DEBUG - commit 2014-03-19 22:34:07,196 [8311:MainThread] __main__ INFO - Abe initialized. 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! 2014-03-19 22:34:07,199 [8311:MainThread] Abe.DataStore INFO - Opened /home/berg/.execoin/blocks/blk00000.dat Status: 200 OK Content-type: text/html; charset=utf-8 Cache-Control: max-age=30
<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="static/abe.css" /> <link rel="shortcut icon" href="static/favicon.ico" /> <title>Abe Search</title> </head> <body> <h1><a href="chains"><img src="static/logo32.png" alt="Abe logo" /></a> Abe Search </h1> <p>Search by address, block number or hash, transaction or public key hash, or chain name:</p> <form action="search"><p> <input name="q" size="64" value="" /><button type="submit">Search</button> <br />Address or hash search requires at least the first 6 characters.</p></form> <table> <tr><th>Currency</th><th>Code</th><th>Block</th><th>Time</th><th>Started</th><th>Age (days)</th><th>Coins Created</th><th>Avg Coin Age</th><th>% <a href="https://en.bitcoin.it/wiki/Bitcoin_Days_Destroyed">CoinDD</a></th></tr> <tr><td><a href="chain/Execoin">Execoin</a></td><td>EXE</td><td><a href="block/5daea528b57ab59e147220674a71bf9ad3f93d9ab36cfd09e4d4cf5c50fa00e2">53344</a></td><td>2014-03-19 19:33:38</td><td>2014-01-29</td><td>49.7427</td><td>2667250</td><td>9.16489</td><td>26.5331%</td></tr> </table>
<p><a href="q">API</a> (machine-readable pages)</p> <p style="font-size: smaller"> <span style="font-style: italic"> Powered by <a href="https://github.com/bitcoin-abe/bitcoin-abe">Abe</a> </span>
Tips appreciated! <a href="address/1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf">BTC</a> <a href="address/NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK">NMC</a> </p> </body> </html>
Configuring like in README-FASTCGI.txt Also fell in trouble with PATH_INFO Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 558, in run protocolStatus, appStatus = self.server.handler(self) File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 1118, in handler result = self.application(environ, start_response) File "/usr/lib/python2.7/site-packages/Abe/abe.py", line 226, in __call__ if abe.fix_path_info(env): File "/usr/lib/python2.7/site-packages/Abe/abe.py", line 1940, in fix_path_info if pi[-1] != '/' and env['PATH_INFO'][-1] == '/': IndexError: string index out of range
But fixed it with #! /bin/sh [b]PATH_INFO='/'[/b] PYTHONUNBUFFERED=1 exec python -m Abe.abe --config /home/berg/cgi-bin/abe-exe.conf --static-path static/ --watch-pid="$1"
Still dont sure how it correct...
|
|
|
|
unick
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 19, 2014, 11:21:01 PM |
|
Guys, help me, please. Trying to up abe with fastcgi, but all output instead to go to browser going to stderr, like this 2014-03-19 22:34:07,163 [8311:MainThread] Abe.DataStore INFO - block_tx 53355 138881 2014-03-19 22:34:07,165 [8311:MainThread] Abe.DataStore DEBUG - commit 2014-03-19 22:34:07,169 [8311:MainThread] Abe.DataStore INFO - block_tx 53356 138882 2014-03-19 22:34:07,171 [8311:MainThread] Abe.DataStore DEBUG - commit 2014-03-19 22:34:07,178 [8311:MainThread] Abe.DataStore INFO - block_tx 53357 138883 2014-03-19 22:34:07,178 [8311:MainThread] Abe.DataStore INFO - block_tx 53357 138884 2014-03-19 22:34:07,186 [8311:MainThread] Abe.DataStore DEBUG - commit 2014-03-19 22:34:07,192 [8311:MainThread] Abe.DataStore INFO - block_tx 53358 138885 2014-03-19 22:34:07,192 [8311:MainThread] Abe.DataStore INFO - block_tx 53358 138886 2014-03-19 22:34:07,196 [8311:MainThread] Abe.DataStore DEBUG - commit 2014-03-19 22:34:07,196 [8311:MainThread] __main__ INFO - Abe initialized. 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! 2014-03-19 22:34:07,199 [8311:MainThread] Abe.DataStore INFO - Opened /home/berg/.execoin/blocks/blk00000.dat Status: 200 OK Content-type: text/html; charset=utf-8 Cache-Control: max-age=30
<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="static/abe.css" /> <link rel="shortcut icon" href="static/favicon.ico" /> <title>Abe Search</title> </head> <body> <h1><a href="chains"><img src="static/logo32.png" alt="Abe logo" /></a> Abe Search </h1> <p>Search by address, block number or hash, transaction or public key hash, or chain name:</p> <form action="search"><p> <input name="q" size="64" value="" /><button type="submit">Search</button> <br />Address or hash search requires at least the first 6 characters.</p></form> <table> <tr><th>Currency</th><th>Code</th><th>Block</th><th>Time</th><th>Started</th><th>Age (days)</th><th>Coins Created</th><th>Avg Coin Age</th><th>% <a href="https://en.bitcoin.it/wiki/Bitcoin_Days_Destroyed">CoinDD</a></th></tr> <tr><td><a href="chain/Execoin">Execoin</a></td><td>EXE</td><td><a href="block/5daea528b57ab59e147220674a71bf9ad3f93d9ab36cfd09e4d4cf5c50fa00e2">53344</a></td><td>2014-03-19 19:33:38</td><td>2014-01-29</td><td>49.7427</td><td>2667250</td><td>9.16489</td><td>26.5331%</td></tr> </table>
<p><a href="q">API</a> (machine-readable pages)</p> <p style="font-size: smaller"> <span style="font-style: italic"> Powered by <a href="https://github.com/bitcoin-abe/bitcoin-abe">Abe</a> </span>
Tips appreciated! <a href="address/1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf">BTC</a> <a href="address/NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK">NMC</a> </p> </body> </html>
Configuring like in README-FASTCGI.txt Also fell in trouble with PATH_INFO Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 558, in run protocolStatus, appStatus = self.server.handler(self) File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 1118, in handler result = self.application(environ, start_response) File "/usr/lib/python2.7/site-packages/Abe/abe.py", line 226, in __call__ if abe.fix_path_info(env): File "/usr/lib/python2.7/site-packages/Abe/abe.py", line 1940, in fix_path_info if pi[-1] != '/' and env['PATH_INFO'][-1] == '/': IndexError: string index out of range
But fixed it with #! /bin/sh [b]PATH_INFO='/'[/b] PYTHONUNBUFFERED=1 exec python -m Abe.abe --config /home/berg/cgi-bin/abe-exe.conf --static-path static/ --watch-pid="$1"
Still dont sure how it correct... can you post your abe-exe.conf setings? also you need to setup you apache server to run Abe. Did you follow this guide ? https://github.com/bitcoin-abe/bitcoin-abe/blob/master/README-FASTCGI.txt
|
|
|
|
unick
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 19, 2014, 11:30:34 PM |
|
is it possible to get address balance from command line query? I get the following error python -m Abe.abe --query /chain/FairCoin/q/addressbalance/fc44xJawRecE9xrZwGHMUtAfxWeS3CJqtP 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 2374, in <module> sys.exit(main(sys.argv[1:])) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2370, in main serve(store) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2236, in serve }, start_response) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 276, in __call__ handler(page) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 415, in handle_chain chain = abe.chain_lookup_by_name(symbol) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 397, in chain_lookup_by_name ret = abe.store.get_chain_by_name(symbol) File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 819, in get_chain_by_name return store.chains_by.name.get(name, None) AttributeError: 'DataStore' object has no attribute 'chains_by'
maybe I have the syntax wrong
|
|
|
|
elcoco
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 111
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 20, 2014, 01:30:34 AM |
|
Shows only the first block. The thing I do not understand.
When Abe loads many blocks but shows only the genesis block, it means that Abe is using the wrong algorithm to calculate the block header hash as it appears in the next block's hashPrev field. By default, Abe uses double-SHA256, the same as Bitcoin. Many coins use scrypt. I would like to make this selectable by datadir=[{...,"hashPrev":"scrypt"}], but for now it requires a few lines of code. Look for "NovaCoin" in the sources for an example. is there a way to get a raw block before abe splits it and puts it in the database, maybe there are new fields added in this coin, or the data got moved around, I can then change the abe code to make it work
|
|
|
|
John Tobey (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 20, 2014, 02:57:57 PM |
|
Shows only the first block. The thing I do not understand.
When Abe loads many blocks but shows only the genesis block, it means that Abe is using the wrong algorithm to calculate the block header hash as it appears in the next block's hashPrev field. By default, Abe uses double-SHA256, the same as Bitcoin. Many coins use scrypt. I would like to make this selectable by datadir=[{...,"hashPrev":"scrypt"}], but for now it requires a few lines of code. Look for "NovaCoin" in the sources for an example. is there a way to get a raw block before abe splits it and puts it in the database, maybe there are new fields added in this coin, or the data got moved around, I can then change the abe code to make it work See how ds_parse_block and ds_parse_block_header are overridden in Abe/Chain.py. However, note that this module is new and under heavy development.
|
|
|
|
bergi
Newbie
Offline
Activity: 8
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 20, 2014, 04:59:14 PM |
|
Yep, read this and make everything as described. I found, that sudo make some troubles, hard to find it. So, i bypass it, truncate abe.fcgi to #!/usr/bin/python import subprocess, sys, os command=["/home/berg/exeblockexp/abe", str(os.getpid())] subprocess.Popen(command, stdin=sys.stdin).wait()
this is sudo log, if it useful Mar 20 02:00:21 noc sudo: apache : TTY=unknown ; PWD=/var/www/localhost/htdocs/execoin ; USER=berg ; TSID=000028 ; COMMAND=/home/berg/exeblockexp/abe 13410
i can't find something erroneous in this
|
|
|
|
unick
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 20, 2014, 07:45:09 PM |
|
Check this quote for reference of original issue
So this is a bump and an update at the same time. Can't read the raw data from GrowthCoin's blockchain still. here's the error again root@grw:~/bitcoin-abe# python -m Abe.abe --config /home/abe/abe-mysql.conf --no-serve Opened /root/.GrowthCoin/blk0001.dat Chain 11 genesis tx: 020000001d0bfa51010000000000000000000000000000000000000000000000000000000000000000ffffffffb904ffff001d020f274caf4a756c792033312c2032303133203132706d204544543a2054686520552e532e2065636f6e6f6d79206772657720312e372520696e20746865207365636f6e6420717561727465722c20616964656420627920736f6c696420636f6e73756d6572207370656e64696e6720616e6420612072616d702d757020696e20627573696e65737320696e766573746d656e742c2074686520676f7665726e6d656e742073616964205765646e65736461792effffffff0100000000000000000000000000 Exception at 368 Failed to catch up {'blkfile_offset': 0, 'blkfile_number': 1, 'chain_id': None, 'loader': None, 'conf': None, 'dirname': '/root/.GrowthCoin', 'id': 3L} Traceback (most recent call last): File "Abe/DataStore.py", line 2789, in catch_up store.catch_up_dir(dircfg) File "Abe/DataStore.py", line 3053, in catch_up_dir store.import_blkdat(dircfg, ds, blkfile['name']) File "Abe/DataStore.py", line 3185, in import_blkdat store.import_block(b, chain = chain) File "Abe/DataStore.py", line 1804, in import_block raise MerkleRootMismatch(b['hash'], tx_hash_array) MerkleRootMismatch: Block header Merkle root does not match its transactions. block hash=d5e4fc54c53a9a20bbe01e70d8b47ce66f15c1bd3504f7e80390bf5601150ded So I went to see what happens at byte 368. root@grw:~/bitcoin-abe# hexdump -n 368 -C ~/.GrowthCoin/blk0001.dat 00000000 a5 ef db fd 69 01 00 00 01 00 00 00 00 00 00 00 |....i...........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 bf f2 79 9b |..............y.| 00000030 bf ec 52 41 32 ea 94 54 5f 53 83 7c 5c eb 46 26 |..RA2..T_S.|\.F&| 00000040 b6 3d 18 70 76 01 0c cb 96 10 53 14 31 0b fa 51 |.=.pv.....S.1..Q| 00000050 ff ff 0f 1e ba 6e 15 01 01 02 00 00 00 1d 0b fa |.....n..........| 00000060 51 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |Q...............| 00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000080 00 00 ff ff ff ff b9 04 ff ff 00 1d 02 0f 27 4c |..............'L| 00000090 af 4a 75 6c 79 20 33 31 2c 20 32 30 31 33 20 31 |.July 31, 2013 1| 000000a0 32 70 6d 20 45 44 54 3a 20 54 68 65 20 55 2e 53 |2pm EDT: The U.S| 000000b0 2e 20 65 63 6f 6e 6f 6d 79 20 67 72 65 77 20 31 |. economy grew 1| 000000c0 2e 37 25 20 69 6e 20 74 68 65 20 73 65 63 6f 6e |.7% in the secon| 000000d0 64 20 71 75 61 72 74 65 72 2c 20 61 69 64 65 64 |d quarter, aided| 000000e0 20 62 79 20 73 6f 6c 69 64 20 63 6f 6e 73 75 6d | by solid consum| 000000f0 65 72 20 73 70 65 6e 64 69 6e 67 20 61 6e 64 20 |er spending and | 00000100 61 20 72 61 6d 70 2d 75 70 20 69 6e 20 62 75 73 |a ramp-up in bus| 00000110 69 6e 65 73 73 20 69 6e 76 65 73 74 6d 65 6e 74 |iness investment| 00000120 2c 20 74 68 65 20 67 6f 76 65 72 6e 6d 65 6e 74 |, the government| 00000130 20 73 61 69 64 20 57 65 64 6e 65 73 64 61 79 2e | said Wednesday.| 00000140 ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00 |................| 00000150 00 00 1d 74 65 78 74 3a 47 72 6f 77 74 68 43 6f |...text:GrowthCo| 00000160 69 6e 20 67 65 6e 65 73 69 73 20 62 6c 6f 63 6b |in genesis block| 00000170
at byte 369 root@grw:~/bitcoin-abe# hexdump -n 369 -C ~/.GrowthCoin/blk0001.dat 00000000 a5 ef db fd 69 01 00 00 01 00 00 00 00 00 00 00 |....i...........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 bf f2 79 9b |..............y.| 00000030 bf ec 52 41 32 ea 94 54 5f 53 83 7c 5c eb 46 26 |..RA2..T_S.|\.F&| 00000040 b6 3d 18 70 76 01 0c cb 96 10 53 14 31 0b fa 51 |.=.pv.....S.1..Q| 00000050 ff ff 0f 1e ba 6e 15 01 01 02 00 00 00 1d 0b fa |.....n..........| 00000060 51 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |Q...............| 00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000080 00 00 ff ff ff ff b9 04 ff ff 00 1d 02 0f 27 4c |..............'L| 00000090 af 4a 75 6c 79 20 33 31 2c 20 32 30 31 33 20 31 |.July 31, 2013 1| 000000a0 32 70 6d 20 45 44 54 3a 20 54 68 65 20 55 2e 53 |2pm EDT: The U.S| 000000b0 2e 20 65 63 6f 6e 6f 6d 79 20 67 72 65 77 20 31 |. economy grew 1| 000000c0 2e 37 25 20 69 6e 20 74 68 65 20 73 65 63 6f 6e |.7% in the secon| 000000d0 64 20 71 75 61 72 74 65 72 2c 20 61 69 64 65 64 |d quarter, aided| 000000e0 20 62 79 20 73 6f 6c 69 64 20 63 6f 6e 73 75 6d | by solid consum| 000000f0 65 72 20 73 70 65 6e 64 69 6e 67 20 61 6e 64 20 |er spending and | 00000100 61 20 72 61 6d 70 2d 75 70 20 69 6e 20 62 75 73 |a ramp-up in bus| 00000110 69 6e 65 73 73 20 69 6e 76 65 73 74 6d 65 6e 74 |iness investment| 00000120 2c 20 74 68 65 20 67 6f 76 65 72 6e 6d 65 6e 74 |, the government| 00000130 20 73 61 69 64 20 57 65 64 6e 65 73 64 61 79 2e | said Wednesday.| 00000140 ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00 |................| 00000150 00 00 1d 74 65 78 74 3a 47 72 6f 77 74 68 43 6f |...text:GrowthCo| 00000160 69 6e 20 67 65 6e 65 73 69 73 20 62 6c 6f 63 6b |in genesis block| 00000170 00 |.| 00000171
and byte 374 --- @ byte 370 we get the first byte of the magic number root@grw:~/bitcoin-abe# hexdump -n 374 -C ~/.GrowthCoin/blk0001.dat 00000000 a5 ef db fd 69 01 00 00 01 00 00 00 00 00 00 00 |....i...........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 bf f2 79 9b |..............y.| 00000030 bf ec 52 41 32 ea 94 54 5f 53 83 7c 5c eb 46 26 |..RA2..T_S.|\.F&| 00000040 b6 3d 18 70 76 01 0c cb 96 10 53 14 31 0b fa 51 |.=.pv.....S.1..Q| 00000050 ff ff 0f 1e ba 6e 15 01 01 02 00 00 00 1d 0b fa |.....n..........| 00000060 51 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |Q...............| 00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000080 00 00 ff ff ff ff b9 04 ff ff 00 1d 02 0f 27 4c |..............'L| 00000090 af 4a 75 6c 79 20 33 31 2c 20 32 30 31 33 20 31 |.July 31, 2013 1| 000000a0 32 70 6d 20 45 44 54 3a 20 54 68 65 20 55 2e 53 |2pm EDT: The U.S| 000000b0 2e 20 65 63 6f 6e 6f 6d 79 20 67 72 65 77 20 31 |. economy grew 1| 000000c0 2e 37 25 20 69 6e 20 74 68 65 20 73 65 63 6f 6e |.7% in the secon| 000000d0 64 20 71 75 61 72 74 65 72 2c 20 61 69 64 65 64 |d quarter, aided| 000000e0 20 62 79 20 73 6f 6c 69 64 20 63 6f 6e 73 75 6d | by solid consum| 000000f0 65 72 20 73 70 65 6e 64 69 6e 67 20 61 6e 64 20 |er spending and | 00000100 61 20 72 61 6d 70 2d 75 70 20 69 6e 20 62 75 73 |a ramp-up in bus| 00000110 69 6e 65 73 73 20 69 6e 76 65 73 74 6d 65 6e 74 |iness investment| 00000120 2c 20 74 68 65 20 67 6f 76 65 72 6e 6d 65 6e 74 |, the government| 00000130 20 73 61 69 64 20 57 65 64 6e 65 73 64 61 79 2e | said Wednesday.| 00000140 ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00 |................| 00000150 00 00 1d 74 65 78 74 3a 47 72 6f 77 74 68 43 6f |...text:GrowthCo| 00000160 69 6e 20 67 65 6e 65 73 69 73 20 62 6c 6f 63 6b |in genesis block| 00000170 00 a5 ef db fd 08 |......| 00000176
So my guess, and I'm no expert nor do I know how to fix this, is that Abe can't read the lenght of the block properly? or like the error says, the merkle root is off... I'm willing to help searching but I'm a bit over my head with this so a few pointers in the right direction would be appreciated. Thanks
|
|
|
|
unick
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 20, 2014, 08:03:10 PM |
|
#!/usr/bin/python import subprocess, sys, os command=["/home/berg/exeblockexp/abe", str(os.getpid())] subprocess.Popen(command, stdin=sys.stdin).wait()
this is sudo log, if it useful Mar 20 02:00:21 noc sudo: apache : TTY=unknown ; PWD=/var/www/localhost/htdocs/execoin ; USER=berg ; TSID=000028 ; COMMAND=/home/berg/exeblockexp/abe 13410
i can't find something erroneous in this Well you didn't post your abe-exe.conf, here's mine for reference default-loader=no-serve dbtype MySQLdb connect-args {"user":"abe","db":"abe","passwd":"PASSWORD"} upgrade datadir=[] you will notice that I don't want abe to load in "server" mode and read the block chain, just want it to connect to the database and read it's content. I used another Abe instance to read the blockchain and update the database. If you followed the guide, it is mentioned how to add your "abe" user (the one that will run the FastCGI script) to the sudoers file so your apache user can access the FastCGI script without password and be able to run it. Make sure you edit your sudoers file with visudo and append to it # This allows the Apache account (www-data) to run Abe as USER. www-data ALL=(USER) NOPASSWD: /home/USER/cgi-bin/abe
|
|
|
|
agran
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 21, 2014, 11:29:41 AM |
|
Our coin Fuguecoin is very necessary Block Explorer. I now pronounce the bounty for fist Block Explorer. (Must be able to find the balance of addresses.) Bounty: 1000 FC (0.05 BTC)
|
|
|
|
elcoco
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 111
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 21, 2014, 08:05:38 PM |
|
is it safe to assume that when using the RPC loader rather than the blkfile loader that it doesn't matter the algo of the coin since bitcoin-abe is using rpc call to get data ? I'm trying to setup fuguecoin using RPC here's my config datadir += [{"dirname": "/home/azureuser/.fuguecoin", "loader": "rpc", "chain": "FugueCoin", "code3": "FC", "conf":"fuguecoin.conf", "address_version" : "\u0023", "magic" : "\u00f9\u00be\u00b4\u00d4" }]
i has getting "RPC data not understood: block hash mismatch" so i figured out the genesis transaction and block 0 hash I tried this import-tx += 010000006eb7dc52010000000000000000000000000000000000000000000000000000000000000 000ffffffff7604ffff001d020f274c6c4a616e2032302c20323031342031323a3430616d204544 542e204e65776567672074656173657220737567676573747320746865205553206f6e6c696e652 072657461696c206769616e74206d617920626567696e20616363657074696e6720626974636f69 6e20736f6f6effffffff0100000000000000000000000000 then got store = DataStore.new(args)
File "Abe/DataStore.py", line 216, in __init__ store.maybe_import_binary_tx(chain_name, str(hex_tx).decode('hex')) UnboundLocalError: local variable 'chain_name' referenced before assignmentso i changed my config file to this: import-tx += {"chain":"FugueCoin" ,"tx":"010000006eb7dc52010000000000000000000000000000000000000000000000000000000000000 000ffffffff7604ffff001d020f274c6c4a616e2032302c20323031342031323a3430616d204544 542e204e65776567672074656173657220737567676573747320746865205553206f6e6c696e652 072657461696c206769616e74206d617920626567696e20616363657074696e6720626974636f69 6e20736f6f6effffffff0100000000000000000000000000"} no i'm getting this File "Abe/DataStore.py", line 2323, in maybe_import_binary_tx chain = store.chains_by.name(chain_name) TypeError: 'dict' object is not callablechanged that line from chain = store.chains_by.name(chain_name) to chain = store.chains_by.name.get(chain_name) and getting File "Abe/BCDataStream.py", line 110, in _read_num (i,) = struct.unpack_from(format, self.input, self.read_cursor) struct.error: unpack_from requires a buffer of at least 4 bytes ![Huh](https://bitcointalk.org/Smileys/default/huh.gif)
|
|
|
|
John Tobey (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 21, 2014, 08:37:05 PM |
|
is it safe to assume that when using the RPC loader rather than the blkfile loader that it doesn't matter the algo of the coin since bitcoin-abe is using rpc call to get data ?
I guess so. I'm trying to setup fuguecoin using RPC here's my config datadir += [{"dirname": "/home/azureuser/.fuguecoin", "loader": "rpc", "chain": "FugueCoin", "code3": "FC", "conf":"fuguecoin.conf", "address_version" : "\u0023", "magic" : "\u00f9\u00be\u00b4\u00d4" }]
i has getting "RPC data not understood: block hash mismatch" so i figured out the genesis transaction and block 0 hash I tried this import-tx += 010000006eb7dc52010000000000000000000000000000000000000000000000000000000000000 000ffffffff7604ffff001d020f274c6c4a616e2032302c20323031342031323a3430616d204544 542e204e65776567672074656173657220737567676573747320746865205553206f6e6c696e652 072657461696c206769616e74206d617920626567696e20616363657074696e6720626974636f69 6e20736f6f6effffffff0100000000000000000000000000 then got store = DataStore.new(args)
File "Abe/DataStore.py", line 216, in __init__ store.maybe_import_binary_tx(chain_name, str(hex_tx).decode('hex')) UnboundLocalError: local variable 'chain_name' referenced before assignmentso i changed my config file to this: import-tx += {"chain":"FugueCoin" ,"tx":"010000006eb7dc52010000000000000000000000000000000000000000000000000000000000000 000ffffffff7604ffff001d020f274c6c4a616e2032302c20323031342031323a3430616d204544 542e204e65776567672074656173657220737567676573747320746865205553206f6e6c696e652 072657461696c206769616e74206d617920626567696e20616363657074696e6720626974636f69 6e20736f6f6effffffff0100000000000000000000000000"} no i'm getting this File "Abe/DataStore.py", line 2323, in maybe_import_binary_tx chain = store.chains_by.name(chain_name) TypeError: 'dict' object is not callablechanged that line from chain = store.chains_by.name(chain_name) to chain = store.chains_by.name.get(chain_name) and getting File "Abe/BCDataStream.py", line 110, in _read_num (i,) = struct.unpack_from(format, self.input, self.read_cursor) struct.error: unpack_from requires a buffer of at least 4 bytes ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) Thanks, I've fixed the last two errors. You will still get block hash mismatch unless you disable the check or add support for your coin.
|
|
|
|
elcoco
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 111
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 21, 2014, 09:17:17 PM |
|
what is the proper format for import-tx?
i'm getting this error after your fixes File "Abe/DataStore.py", line 216, in __init__ store.maybe_import_binary_tx(chain_name, str(hex_tx).decode('hex')) File "/usr/lib/python2.7/encodings/hex_codec.py", line 42, in hex_decode output = binascii.a2b_hex(input) TypeError: Odd-length string
from import-tx += 010000006eb7dc52010000000000000000000000000000000000000000000000000000000000000 000ffffffff7604ffff001d020f274c6c4a616e2032302c20323031342031323a3430616d204544 542e204e65776567672074656173657220737567676573747320746865205553206f6e6c696e652 072657461696c206769616e74206d617920626567696e20616363657074696e6720626974636f69 6e20736f6f6effffffff0100000000000000000000000000
|
|
|
|
unick
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 21, 2014, 10:28:31 PM |
|
Is there a reason why my questions don't get answered ?
|
|
|
|
John Tobey (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 22, 2014, 06:51:34 AM |
|
is it possible to get address balance from command line query? I get the following error python -m Abe.abe --query /chain/FairCoin/q/addressbalance/fc44xJawRecE9xrZwGHMUtAfxWeS3CJqtP 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 2374, in <module> sys.exit(main(sys.argv[1:])) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2370, in main serve(store) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2236, in serve }, start_response) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 276, in __call__ handler(page) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 415, in handle_chain chain = abe.chain_lookup_by_name(symbol) File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 397, in chain_lookup_by_name ret = abe.store.get_chain_by_name(symbol) File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 819, in get_chain_by_name return store.chains_by.name.get(name, None) AttributeError: 'DataStore' object has no attribute 'chains_by'
maybe I have the syntax wrong I'm sorry for the cryptic message. The problem is that you have to give --config (or --dbtype and --connect-args) along with --query if the query involves the database, as this one does.
|
|
|
|
John Tobey (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 22, 2014, 07:25:37 AM |
|
Is there a reason why my questions don't get answered ?
Two possible reasons: bad timing (I am busy) and no obvious answer. You have several questions, and it is not clear what you are currently using in terms of configuration and modifications to the code. You mentioned commenting out the Merkle root check, but your latest error shows it still occurring. Are you able to load blocks without the check? I have converted your hex dump back to binary, commented out the Merkle root check, installed the ltc_scrypt module, and loaded the block with this command: python -m Abe.abe --dbtype sqlite3 --connect-args :memory: --port 2750 --datadir '[{"dirname":".", "chain":"GrowthCoin", "policy":"NovaCoin"}]'
|
|
|
|
|