Bitcoin Forum
April 28, 2024, 04:32:24 PM *
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)
XIU
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile WWW
July 05, 2011, 09:59:46 PM
 #41

Congrats, ABE processed block #134917 correctly: http://john-edwin-tobey.org:2750/block/0000000000000789fe6e014f62a3c32466e53abde8db62517b30e0648d9835c5
While blockexplorer shows "Transactions: " and "Fees: " without any numbers next to it: http://blockexplorer.com/block/0000000000000789fe6e014f62a3c32466e53abde8db62517b30e0648d9835c5

It was a 162 transactions block with lots of fees.

People actually send 15000BTC without a transaction fee? What if the transaction wouldn't be included?
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
July 06, 2011, 02:57:52 AM
 #42

People actually send 15000BTC without a transaction fee? What if the transaction wouldn't be included?

They could try again with a fee.  Either the same coin (from a wallet backup or custom software) or the change.  If the second transaction depends on the first but has a big fee, a miner will gain by including the first so they can include the second.

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
July 06, 2011, 03:00:54 AM
 #43

Congrats, ABE processed block #134917 correctly: http://john-edwin-tobey.org:2750/block/0000000000000789fe6e014f62a3c32466e53abde8db62517b30e0648d9835c5
While blockexplorer shows "Transactions: " and "Fees: " without any numbers next to it: http://blockexplorer.com/block/0000000000000789fe6e014f62a3c32466e53abde8db62517b30e0648d9835c5

I wonder what the problem was.  It seems fixed now.  But I can almost guarantee Abe will pick up bugs on its way to being as fast as BlockExplorer. Smiley

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
July 14, 2011, 08:26:29 PM
 #44

Faster site, thanks to RylandAlmanza: http://abe.john-edwin-tobey.org/  Please use this in preference to http://john-edwin-tobey.org:2750/.

First API supported: /chain/{CHAIN}/q/getblockcount
E.g.: http://abe.john-edwin-tobey.org/chain/Bitcoin/q/getblockcount

New currencies: Testnet, Weeds.

Next up: speeding up page loading, starting with the list of blocks.  Thanks to those brave enough to try it, even if the initial database load was too much for you.

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
July 15, 2011, 06:14:52 AM
 #45

Changes since July 4:

* I've created the Version 0.4 branch, where I intend to backport fixes.

* The chain summary page (the one listing several blocks in the same chain) loads much faster than before at high counts per page.

* Address search accepts an initial substring, still without storing addresses in the database.

* FastCGI support has matured.  See README-FASTCGI.txt for setup.

* Abe supports Weeds currency natively.

* The datadir configuration directive can add a new currency without changes to Python code.

* auto-agpl provides a link to download the source directory: a license compliance aid for those not wishing to use a Github fork.

* /chain/Bitcoin/q/getblockcount: first of (I hope) many BBE-compatible APIs.

* Several small fixes and speedups.

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

Activity: 5180
Merit: 12900


View Profile
July 15, 2011, 09:33:03 AM
 #46

Congrats, ABE processed block #134917 correctly: http://john-edwin-tobey.org:2750/block/0000000000000789fe6e014f62a3c32466e53abde8db62517b30e0648d9835c5
While blockexplorer shows "Transactions: " and "Fees: " without any numbers next to it: http://blockexplorer.com/block/0000000000000789fe6e014f62a3c32466e53abde8db62517b30e0648d9835c5

It was a 162 transactions block with lots of fees.

This is a bug unique to the BBE mirror: pages sometimes appear before all of the necessary data is fully committed to the database. It fixes itself in ~30 seconds.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
July 15, 2011, 04:21:02 PM
 #47

This is a bug unique to the BBE mirror: pages sometimes appear before all of the necessary data is fully committed to the database. It fixes itself in ~30 seconds.

Ah, well, Abe tends to return "500 Server Error" rather than an incomplete page.  This, too, fixes itself in a bit if you reload.  Not sure which failure mode I prefer.

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

Activity: 1974
Merit: 1029



View Profile
July 15, 2011, 08:46:12 PM
 #48

Ah, well, Abe tends to return "500 Server Error" rather than an incomplete page.  This, too, fixes itself in a bit if you reload.  Not sure which failure mode I prefer.

500 + handler explaining the most probable cause?
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
July 16, 2011, 01:44:10 PM
 #49

Ah, well, Abe tends to return "500 Server Error" rather than an incomplete page.  This, too, fixes itself in a bit if you reload.  Not sure which failure mode I prefer.

500 + handler explaining the most probable cause?

Getting better.  Throw in an automatic retry or two?

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

Activity: 23
Merit: 0


View Profile
August 01, 2011, 02:05:03 PM
 #50

I am getting this error after having installed Postgresql 8.4, python-crypto, python-psycopg2 and setting up the DB

Code:
Traceback (most recent call last):
  File "abe.py", line 1485, in <module>
    sys.exit(main(sys.argv[1:]))
  File "abe.py", line 1479, in main
    store = make_store(args)
  File "abe.py", line 87, in make_store
    store = DataStore.new(args)
  File "/home/max/workspace/abe-jtobey-bitcoin-9d671ec/DataStore.py", line 1662, in new
    return DataStore(args)
  File "/home/max/workspace/abe-jtobey-bitcoin-9d671ec/DataStore.py", line 102, in __init__
    store.initialize()
  File "/home/max/workspace/abe-jtobey-bitcoin-9d671ec/DataStore.py", line 538, in initialize
    store.configure()
  File "/home/max/workspace/abe-jtobey-bitcoin-9d671ec/DataStore.py", line 801, in configure
    "No known sequence type works")
Exception: No known sequence type works

any hints?
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 04, 2011, 03:37:51 AM
Last edit: August 04, 2011, 04:58:16 AM by John Tobey
 #51


Hi, thanks for the report.  Update: Fixed in latest. I've reproduced the error using the latest code.  I don't have a good fix yet, but adding "store.commit()" after line 886 in DataStore.py gets me past this.

Code:
diff --git a/DataStore.py b/DataStore.py
index 2bb250e..12eb096 100644
--- a/DataStore.py
+++ b/DataStore.py
@@ -884,6 +884,7 @@ store._ddl['txout_approx'],
                 "CREATE TABLE abe_test_1 ("
                 " abe_test_1_id NUMERIC(12) PRIMARY KEY,"
                 " foo VARCHAR(10))")
+            store.commit()  # XXX
             id1 = store.new_id('abe_test_1')
             id2 = store.new_id('abe_test_1')
             if int(id1) != int(id2):

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 09, 2011, 08:48:16 PM
 #52

I've added the network hash rate estimates.  It's pretty compatible with Block Explorer and adds optional start and stop arguments for fetching less than all history.

http://abe.john-edwin-tobey.org/q/nethash

Hoping someone converts this into graphs like these for alt chains...

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

Activity: 133
Merit: 100


View Profile
August 12, 2011, 10:09:18 PM
 #53

Hi John,
I can't get nethash to show. It locks up the server and I see python take up 99% of the cpu. I thought it was the database being slow since I'm using sqlite. I installed the mysql handler for python and now it says
Code:
Traceback (most recent call last):
  File "abe.py", line 1741, in <module>
    sys.exit(main(sys.argv[1:]))
  File "abe.py", line 1735, in main
    store = make_store(args)
  File "abe.py", line 109, in make_store
    store = DataStore.new(args)
  File "/home/henry_root/abe/DataStore.py", line 1766, in new
    return DataStore(args)
  File "/home/henry_root/abe/DataStore.py", line 123, in __init__
    store._init_datadirs()
  File "/home/henry_root/abe/DataStore.py", line 392, in _init_datadirs
    store.binin(addr_vers)))
  File "/home/henry_root/abe/DataStore.py", line 195, in to_hex
    return None if x is None else binascii.hexlify(x)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 0: ordinal not in range(128)

I check the database via phpmyadmin and I see that it made all the tables and stuff.

With great video cards comes great power consumption.
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 13, 2011, 03:07:18 AM
 #54

Hi Yanz,

This error
Code:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 0: ordinal not in range(128)
is fixed in the latest commit.  Thanks!

But I don't think it explains the "lockup".  Are you sure Abe isn't just loading data?  For SQLite the full block chain can take a week or longer.  SQLite is okay for small, experimental block chains, though even there, you could wait hours.  (Optimization of the initial data load should be a high priority enhancement.  Currently, it's slow but simple, since it uses the same mechanism as the run-time new block import, which can not be optimized the way I have in mind.)

Let me know how it goes.

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

Activity: 2772
Merit: 1019



View Profile
August 13, 2011, 11:03:53 AM
 #55

First of all, John, thanks a lot for Abe, it's awesome as far as I can tell.

I'm currenlty importing blocks into a mysql db (at block 16000 after about 1.5 hours), it'll takes ages (as in: days), but that's ok for me.

One problem I found was with the datadir table:

Quote from: DataStore.py
"""CREATE TABLE datadir (
    dirname     VARCHAR(500) PRIMARY KEY,
    blkfile_number NUMERIC(4),
    blkfile_offset NUMERIC(20),
    chain_id    NUMERIC(10) NULL
)""",

MySql didn't like the VARCHAR(500) primary key. Says it's too long, something about 768 (?) bytes.

Reducing it to 128 helped.

Maybe you should consider using an INT PK here and an index on dirname if you need it? Something within me tells me that having a VARCHAR as Primary Key is somehow bad. Can't substantiate that, but in my own projects, I always use an INT as primary key (I always name it "id", too, but that's another matter). You wouldn't want a VARCHAR(500) as foreign key, would you? That's just wastefull. This is, of course, just a suggestion and I know Abe is currenlty not optimized at all and a change like this will probably be a bitch to upgrade.

Other than that, keep going! I sent my small donation Smiley


PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 14, 2011, 02:46:41 AM
 #56

First of all, John, thanks a lot for Abe, it's awesome as far as I can tell.
Thanks!

I'm currenlty importing blocks into a mysql db (at block 16000 after about 1.5 hours), it'll takes ages (as in: days), but that's ok for me.
Thanks for the report.  I'm considering a totally new initial import design with table indexes replaced by Python variables.

One problem I found was with the datadir table:
[...]
Maybe you should consider using an INT PK here and an index on dirname if you need it?
Good idea.  Done.  The upgrade is not so bad, since Abe has machinery for it.  This is actually the seventeenth schema change handled by --upgrade. Smiley

Other than that, keep going! I sent my small donation Smiley
Thanks, I hope it works for you!

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 14, 2011, 03:46:31 AM
 #57

Thought you might find this info useful:

Just wanted to point out my project here (libbitcoin): https://bitcointalk.org/index.php?topic=30646.0

Making great progress and it's functional. There's a working application in examples/poller.cpp that simply downloads the bitcoin blocks + transactions + everything into postgresql so you can inspect it. Someone could easily throw a web gui around this and...

voila! blockexplorer clone Smiley

https://gitorious.org/libbitcoin/libbitcoin/blobs/master/examples/poller.cpp
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 14, 2011, 03:34:04 PM
 #58

Just wanted to point out my project here (libbitcoin): https://bitcointalk.org/index.php?topic=30646.0

Ooh!  Lots of yumminess coming down the pike.  I look forward to using your library to help display transactions before they get into a block.

It'd be nice to harmonize our database schemata somewhat.  While I wrap my head around libbitcoin's span_left/span_right reorg strategy, I suggest storing total_difficulty in blocks (where it is immutable) rather than chains.  Abe relies on this (block_chain_work) to estimate network hash rate over a range of blocks by fetching just the start and end blocks.

Thanks!

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 14, 2011, 03:54:40 PM
 #59

Just wanted to point out my project here (libbitcoin): https://bitcointalk.org/index.php?topic=30646.0

Ooh!  Lots of yumminess coming down the pike.  I look forward to using your library to help display transactions before they get into a block.

It'd be nice to harmonize our database schemata somewhat.  While I wrap my head around libbitcoin's span_left/span_right reorg strategy, I suggest storing total_difficulty in blocks (where it is immutable) rather than chains.  Abe relies on this (block_chain_work) to estimate network hash rate over a range of blocks by fetching just the start and end blocks.

Thanks!


Are you on IRC? You should hit me up on #bitcoinconsultancy

You can quickly query the total difficulty for a chain using a single SQL command:

SELECT SUM(to_difficulty(bits_head, bits_body)) FROM blocks WHERE span_left=X AND span_right=X;

Will give you the total difficulty in chain X (you have to have to_difficulty() defined as: bits_body * 2^[8*(bits_head - 3)] )
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
August 14, 2011, 06:11:47 PM
 #60

Thanks for the report.  I'm considering a totally new initial import design with table indexes replaced by Python variables.

Import status: now at block 62,000 (after 1.5 days). Note that I have a pretty slow machine that only uses 30W :-), not exactly made for db loads.

While waiting for the import, I reverse-engineered the schema using mysql-workbench.



Maybe this helps some people. I can also provide .pdf or .mwb files if someone wants them.

It seems some relations are "missing" (like txout, pubkey,...?). I didn't want to put them in the diagram, because I wanted it to exactly reflect the db schema.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
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!