Bitcoin Forum
April 24, 2024, 12:38:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 »
  Print  
Author Topic: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff  (Read 220734 times)
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 19, 2011, 05:20:53 PM
 #81

I am running this on windows btw, could that be the problem?
Code:
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host ''{user:root,host:127.0.0.1,db:abe,passwd:password}'' (11004)")

Yes, the command line parser does not recognise single-quote as a delimiter.  Try "./abe.py --config myabe.conf" where myabe.conf contains the following text, adjusted for your connection parameters:

Code:
# Abe configuration file for MySQL
dbtype MySQLdb
connect-args {"user":"abe","host":"127.0.0.1","db":"abe","passwd":"Bitcoin"}
port 2750
upgrade

I appreciate the feedback.  I will summarise this discussion in documentation to make it easier for the next person.

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
newminerr
Member
**
Offline Offline

Activity: 147
Merit: 11

The day to rise has come.


View Profile
August 19, 2011, 05:42:58 PM
 #82

Code:
# Abe configuration file for MySQL
dbtype MySQLdb
connect-args {"user":"abe","host":"127.0.0.1","db":"abe","passwd":"Bitcoin"}
port 2750
upgrade
Ok now i get this  Huh
Code:
C:\abe>python abe.py --config myabe.conf
ddl_implicit_commit=true
Traceback (most recent call last):
  File "abe.py", line 1739, in <module>
    sys.exit(main(sys.argv[1:]))
  File "abe.py", line 1733, in main
    store = make_store(args)
  File "abe.py", line 108, in make_store
    store = DataStore.new(args)
  File "C:\abe\DataStore.py", line 1927, in new
    return DataStore(args)
  File "C:\abe\DataStore.py", line 99, in __init__
    store.initialize()
  File "C:\abe\DataStore.py", line 651, in initialize
    store.configure()
  File "C:\abe\DataStore.py", line 893, in configure
    store.configure_create_table_epilogue()
  File "C:\abe\DataStore.py", line 986, in configure_create_table_epilogue
    raise Exception("Can not create a transactional table.")
Exception: Can not create a transactional table.


I am this close | | to giving up ;(

I sent a little something onto your way, awesome projects like this should get lots of support to be better and continue rocking Grin
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 19, 2011, 06:33:42 PM
 #83

Code:
Exception: Can not create a transactional table.

Hmm, it means Abe could not get rollback working, even with "engine=InnoDB".  I do not get this error with a Abe v0.5 and a fresh database.

I am this close | | to giving up ;(

I sent a little something onto your way, awesome projects like this should get lots of support to be better and continue rocking Grin
Thanks for your kind support.  I suggest grabbing the latest (commit 9fd704b8, which supports --log-sql) and running "python abe.py --config myabe.conf --log-sql --no-serve --datadir /"  Then paste me the last 10-20 lines, if you will.

You could also try configuring MySQL with "default-storage-engine=InnoDB" and restarting it, but it should not be necessary.  Abe is supposed to detect and override this default when needed.

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
newminerr
Member
**
Offline Offline

Activity: 147
Merit: 11

The day to rise has come.


View Profile
August 19, 2011, 06:55:06 PM
 #84

You could also try configuring MySQL with "default-storage-engine=InnoDB" and restarting it, but it should not be necessary.  Abe is supposed to detect and override this default when needed.



Code:
SQL ROLLBACK
SQL ROLLBACK
SQL: DROP TABLE abe_test_1 ()
SQL ROLLBACK
SQL DDL: CREATE TABLE abe_test_1 ( abe_test_1_id NUMERIC(12) NOT NULL PRIMARY KE
Y, foo VARCHAR(10))
SQL ROLLBACK
SQL: SELECT MAX(abe_test_1_id) FROM abe_test_1 ()
SQL FETCHALL: ((None,),)
SQL: DROP TABLE abe_test_1 ()
SQL COMMIT
ddl_implicit_commit=true
SQL: DROP TABLE abe_test_1 ()
SQL ROLLBACK
SQL DDL: CREATE TABLE abe_test_1 (a NUMERIC(12))
SQL: INSERT INTO abe_test_1 (a) VALUES (4) ()
SQL COMMIT
SQL: INSERT INTO abe_test_1 (a) VALUES (5) ()
SQL ROLLBACK
SQL: SELECT a FROM abe_test_1 ()
SQL FETCHALL: ((Decimal('4'),), (Decimal('5'),))
SQL: DROP TABLE abe_test_1 ()
SQL COMMIT
SQL: DROP TABLE abe_test_1 ()
SQL ROLLBACK
SQL DDL: CREATE TABLE abe_test_1 (a NUMERIC(12)) ENGINE=InnoDB
SQL ROLLBACK
SQL: DROP TABLE abe_test_1 ()
SQL ROLLBACK
Traceback (most recent call last):
  File "abe.py", line 1748, in <module>
    sys.exit(main(sys.argv[1:]))
  File "abe.py", line 1742, in main
    store = make_store(args)
  File "abe.py", line 108, in make_store
    store = DataStore.new(args)
  File "C:\abe\jtobey-bitcoin-abe-v0.5-17-g9fd704b\DataStore.py", line 1929, innew
    return DataStore(args)
  File "C:\abe\jtobey-bitcoin-abe-v0.5-17-g9fd704b\DataStore.py", line 99, in __init__
    store.initialize()
  File "C:\abe\jtobey-bitcoin-abe-v0.5-17-g9fd704b\DataStore.py", line 651, in initialize
    store.configure()
  File "C:\abe\jtobey-bitcoin-abe-v0.5-17-g9fd704b\DataStore.py", line 895, in configure
    store.configure_create_table_epilogue()
  File "C:\abe\jtobey-bitcoin-abe-v0.5-17-g9fd704b\DataStore.py", line 988, in configure_create_table_epilogue
    raise Exception("Can not create a transactional table.")
Exception: Can not create a transactional table.
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 19, 2011, 07:14:58 PM
 #85

Thanks.  Apparently this command failed:

mysql> CREATE TABLE abe_test_1 (a NUMERIC(12)) ENGINE=InnoDB;

I'm curious to know if the command succeeds outside of Abe.  Can you give me MySQL, MySQL-Python, and Python version numbers?  Do you know whether your database includes InnoDB support?  I've assumed that most do, but perhaps this needs documenting.

Thanks again for the report.

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
Xenland
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


I'm not just any shaman, I'm a Sha256man


View Profile
August 19, 2011, 07:21:54 PM
 #86

Watching github and following thread Wink
newminerr
Member
**
Offline Offline

Activity: 147
Merit: 11

The day to rise has come.


View Profile
August 19, 2011, 07:41:23 PM
 #87

Thanks.  Apparently this command failed:

mysql> CREATE TABLE abe_test_1 (a NUMERIC(12)) ENGINE=InnoDB;
Server version: 5.0.51b-community-nt-log MySQL Community Edition (GPL)
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
MySQL_python-1.2.3-py2.7

I uncommented default-storage-engine=INNODB and commented out skip-innodb and BAM!! It seems to be working, i am seeing block_tx 1 1 <= tons of that
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 20, 2011, 12:26:28 AM
 #88

I uncommented default-storage-engine=INNODB and commented out skip-innodb and BAM!! It seems to be working, i am seeing block_tx 1 1 <= tons of that

Excellent!  You might want to comment default-storage-engine back out and start over, especially if you are using this MySQL instance for anything other than Abe.

Starting over is optional, but Abe currently assumes database defaults won't change after it configures itself.  You could "fix" the installation with some SQL, though.  (Do this only if changing default storage engine.)
Code:
mysql> UPDATE configvar SET configvar_value = ' ENGINE=InnoDB' WHERE configvar_name = 'create_table_epilogue' AND configvar_value = '';
Query OK, 1 row affected (0.13 sec)
Rows matched: 1  Changed: 1  Warnings: 0

I appreciate your patience and generous contribution (doubling the donations to date!)  Hope the web server works on Windows, you may be the first.  I think FastCGI mode will need fixing, but if you do plain HTTP ("port NNNN") I expect it to work.

Now I must document the skip-innodb snag...

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
genjix
Legendary
*
Offline Offline

Activity: 1232
Merit: 1072


View Profile
August 20, 2011, 01:19:15 AM
 #89

I uploaded a postgresql dump of the database: https://bitcointalk.org/index.php?topic=38246.0
newminerr
Member
**
Offline Offline

Activity: 147
Merit: 11

The day to rise has come.


View Profile
August 20, 2011, 05:50:38 AM
 #90

The http is working fine.

I see alot of addresses have the right balances, but mine has 0 balance lulz
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 20, 2011, 12:43:10 PM
 #91

The http is working fine.

I see alot of addresses have the right balances, but mine has 0 balance lulz

You didn't say if 0 was right. Smiley Let me know if there's a difference from BlockExplorer.com or abe.john-edwin-tobey.org.

I made a big update to the readme files.  I guess next will be Deb/RPM/MSI packaging.  But no promises on that. Smiley

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
newminerr
Member
**
Offline Offline

Activity: 147
Merit: 11

The day to rise has come.


View Profile
August 20, 2011, 04:37:02 PM
 #92

The http is working fine.

I see alot of addresses have the right balances, but mine has 0 balance lulz

You didn't say if 0 was right. Smiley Let me know if there's a difference from BlockExplorer.com or abe.john-edwin-tobey.org.

I made a big update to the readme files.  I guess next will be Deb/RPM/MSI packaging.  But no promises on that. Smiley

abe.john-edwin-tobey.org is more than accurate, for some reason my main address [in localhost] shows no history ;(
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 20, 2011, 05:24:36 PM
 #93

abe.john-edwin-tobey.org is more than accurate, for some reason my main address [in localhost] shows no history ;(

I suspect it has to do with Python's treatment of binary data on Windows.  I'll say more when I've had time to investigate.  If you can post any addresses that have this problem, that may help.

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
newminerr
Member
**
Offline Offline

Activity: 147
Merit: 11

The day to rise has come.


View Profile
August 20, 2011, 05:34:46 PM
 #94

abe.john-edwin-tobey.org is more than accurate, for some reason my main address [in localhost] shows no history ;(

I suspect it has to do with Python's treatment of binary data on Windows.  I'll say more when I've had time to investigate.  If you can post any addresses that have this problem, that may help.

Your address for example http://abe.john-edwin-tobey.org/address/1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf
On my side, it only shows the first two transactions
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 22, 2011, 05:11:52 PM
 #95

Your address for example http://abe.john-edwin-tobey.org/address/1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf
On my side, it only shows the first two transactions

I'm curious, is it always later transactions missing?  Could you have loaded only part of the block chain?  Is the current block number (reported on the home page) at least 133634?

I'm testing a setup partly like yours.  I have Python 2.7 for Windows under Wine but with a Linux MySQL server.  I've loaded about half the transactions so far, to Block 127735, not far enough to check the missing transactions to my donation address.  I'll try loading the rest tonight.

Thanks for the report.
-John

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
newminerr
Member
**
Offline Offline

Activity: 147
Merit: 11

The day to rise has come.


View Profile
August 22, 2011, 05:32:25 PM
 #96

Now that you mentioned it, It shows block 124783
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 22, 2011, 06:10:51 PM
 #97

Now that you mentioned it, It shows block 124783

Ah!  I guess it's not clear: Abe will not download the block chain but relies on a recent run of bitcoin.exe or bitcoind.exe to have done so.  Another item for the readme.

Come to think of it, in Linux Abe reads the block file even if Bitcoin is running, but Windows may not allow that.  Anyway, your next step would be to run the client, let it catch up, and let Abe keep loading.

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 22, 2011, 06:21:32 PM
 #98

Come to think of it, in Linux Abe reads the block file even if Bitcoin is running, but Windows may not allow that.  Anyway, your next step would be to run the client, let it catch up, and let Abe keep loading.

And of course please report whether this is indeed the problem.  Abe will resume loading if you either restart it with the same arguments as before or try to load a page in your browser.  Sometimes Abe stops loading because of a miscellaneous error such as a full disk, and it would output the error message but serve the incomplete history as you observed.  So we have to rule that out.

Can a change to the best-chain criteria protect against 51% to 90+% attacks without a hard fork?
newminerr
Member
**
Offline Offline

Activity: 147
Merit: 11

The day to rise has come.


View Profile
August 22, 2011, 06:56:11 PM
 #99

Anyway i updated my bitcoin blk file and copied it then ran the command and waiting the abe.py to update.

Code:
UPDATE datadir SET blkfile_offset=0 WHERE dirname='C:\Users\user\AppData\Roaming\Bitcoin'
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
August 22, 2011, 09:14:04 PM
 #100

Thinking about also hosting a copycat of this... posting here to remind me to check up on it later.  Wink
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!