Pages:
Author

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

full member
Activity: 189
Merit: 100
जगत् िमत
I am able to see unconfirmed transactions in search results. But the transaction page throws error.
Please check at http://ancblockchain.com/uncomfirmed_tx_error.html

It looks like its taking values in hex format.  Any help would be greatly appreciated.

I used the transaction id to getrawtransaction data via rpc and it showed shitload of other transactions.  I am confused.

How can i get some real unconfirmed transactions and test them in the blockexplorer? And how does Abe handle them?
legendary
Activity: 2254
Merit: 1290
I have working Abe instance for our alt-coin ... but i need information how i can sum balance per account
I have access to abe database. I need information in which tables should i look for balance

see https://bitcointalksearch.org/topic/m.8194121 (hint ^^^^^)

“check get_balance(), get_sent_and_last_block_id() and get_received_and_last_block_id() in DataStore.py, there are your sql queries used for this purpose.”


Cheers

Graham
newbie
Activity: 39
Merit: 0
Hi

I have working Abe instance for our alt-coin. This part is working very well, but i need information how i can sum balance per account

I have access to abe database. I need information in which tables should i look for balance
full member
Activity: 203
Merit: 100
Yeah, saw that one - unfortunately it will not work in my situation, since it uses RPC and rebuilds the entire list from block 1 each time you run it (very slow)

Plus, MMXIV is a PPCoin clone, which does not support getrawtransaction (it appears this is required for tally.php to work).

Surely there is an SQL query I could run to retrieve a list of distinct addresses, and balance for each?

abe does it with the function get_balance() in DataStore.py which inturn runs a few other functions for getting total recv + total sent to calculate the balance, all in all it's done with several sql queries and it has a problem because some addresses have "too many entries" for Abe to get a balance. tally.php doesn't have that problem since it calculates very "mechanical", it gets all addresses no matter how many transactions went in/out but as you say it uses getrawtransaction and without that no way to get all block info via RPC.

check get_balance(), get_sent_and_last_block_id() and get_received_and_last_block_id() in DataStore.py, there are your sql queries used for this purpose.
hero member
Activity: 532
Merit: 500
Any pre-built PHP for this I can get somewhere?

See prior post to this thread: https://bitcointalksearch.org/topic/m.8083116

Cheers

Graham


Yeah, saw that one - unfortunately it will not work in my situation, since it uses RPC and rebuilds the entire list from block 1 each time you run it (very slow)

Plus, MMXIV is a PPCoin clone, which does not support getrawtransaction (it appears this is required for tally.php to work).

Surely there is an SQL query I could run to retrieve a list of distinct addresses, and balance for each?
legendary
Activity: 2254
Merit: 1290
Any pre-built PHP for this I can get somewhere?

See prior post to this thread: https://bitcointalksearch.org/topic/m.8083116

Cheers

Graham
hero member
Activity: 532
Merit: 500
Not sure what this means, almost like it is ignoring the 'policy' setting in the conf?  I have verified the address_version and dirname are correct, and the wallet is fully synchronized.

That's exactly what happen. It ignores policy field in your conf. You need to add a new chain policy in Abe/datastore.py or change database after initial creation.

Thanks - got that figured out, blockchain loaded, and Abe is running!  8D

Now, how about creating a rich list?  I've seen many Abe implementations with this feature, but doesn't appear to come out of the box.  Can I obtain this from SQL?  Any pre-built PHP for this I can get somewhere?
full member
Activity: 203
Merit: 100
Not sure what this means, almost like it is ignoring the 'policy' setting in the conf?  I have verified the address_version and dirname are correct, and the wallet is fully synchronized.

That's exactly what happen. It ignores policy field in your conf. You need to add a new chain policy in Abe/datastore.py or change database after initial creation.
hero member
Activity: 532
Merit: 500
Newbie to Abe here.

I am trying to setup a block explorer for MMXIV, but keep getting this error when I run abe:

Code:

    store = DataStore.new(args)
  File "Abe/DataStore.py", line 3275, in new
    return DataStore(args)
  File "Abe/DataStore.py", line 205, in __init__
    store.init_chains()
  File "Abe/DataStore.py", line 481, in init_chains
    int(chain_decimals))
  File "Abe/Chain/__init__.py", line 21, in create
    mod = __import__(__name__ + '.' + policy, fromlist=[policy])
ImportError: No module named MMXIV

My abe.conf for the datadir looks like this:

Code:
datadir += [{
        "dirname": "/home/coins/.MMXIV2",
        "policy": "PpcPosChain",
        "chain": "MMXIV",
        "code3": "MMXIV",
        "conf": "mmxiv.conf",
        "address_version": "x33" }]

Not sure what this means, almost like it is ignoring the 'policy' setting in the conf?  I have verified the address_version and dirname are correct, and the wallet is fully synchronized.
newbie
Activity: 13
Merit: 0
can someone help me i am trying to set up an block explorer for VirtaCoin.
It is just to get started into this and i saw they didn't have one so i thought give it a go.
But the problem is i keep only seeing the genesis block and nothing more.
Can someone here maybe tell me if my configuration is wrong.
or other things i have to pay attention to
i pulled the head revision from github. also i tried doing it with 0.7.2. but that had no success at all.

abe.conf


Code:
dbtype MySQLdb
    connect-args {"user":"user","db":"dbname","passwd":"pass"}
    upgrade
    port 2900
        host 127.0.0.1
binary-type binary
datadir += [{
        "dirname": "/root/.virtacoin",
        "chain": "VirtaCoin",
        "address_version":"\u0000",
         "policy":"LtcScryptChain",
        "conf": "virtacoin.conf"
      }]

Abe/DataStore.py

 
Code:
   {"chain":"VirtaCoin","policy":"LtcScryptChain",
     "code3":"VTA", "address_version":"\x00", "magic":"\xbe\xd0\xc8\xd1"},


if someone can tell me if something is wrong please.

I had to do a lot to get it working properly, the cheap and easy fix to get it working once you get at as far as you have is this in Datastore.py

Code:
 -                    if chain.block_header_hash(chain.serialize_block_header(
 -                            block)) != hash:
 -                        raise InvalidBlock('block hash mismatch')
 +                   # if chain.block_header_hash(chain.serialize_block_header(
 +                   #         block)) != hash:
 +                   #     raise InvalidBlock('block hash mismatch')

Thanks i will try it.
it didn't work without rebuilding the database so i am trying that now

okay strangely now it is at block_tx 45030 13903 and the coin only has 44974 blocks. How is this possible?
(and yes i triple checked) and it is still importing more
orphans are imported too but "removed" (not really removed, they still exist AFAIK) so the number of blocks is higher. block_tx .
same of course applies to transactions which didnt get accepted due to orphan.

okay thank you now wait and hope it works Cheesy
legendary
Activity: 1792
Merit: 1008
/dev/null
can someone help me i am trying to set up an block explorer for VirtaCoin.
It is just to get started into this and i saw they didn't have one so i thought give it a go.
But the problem is i keep only seeing the genesis block and nothing more.
Can someone here maybe tell me if my configuration is wrong.
or other things i have to pay attention to
i pulled the head revision from github. also i tried doing it with 0.7.2. but that had no success at all.

abe.conf


Code:
dbtype MySQLdb
    connect-args {"user":"user","db":"dbname","passwd":"pass"}
    upgrade
    port 2900
        host 127.0.0.1
binary-type binary
datadir += [{
        "dirname": "/root/.virtacoin",
        "chain": "VirtaCoin",
        "address_version":"\u0000",
         "policy":"LtcScryptChain",
        "conf": "virtacoin.conf"
      }]

Abe/DataStore.py

 
Code:
   {"chain":"VirtaCoin","policy":"LtcScryptChain",
     "code3":"VTA", "address_version":"\x00", "magic":"\xbe\xd0\xc8\xd1"},


if someone can tell me if something is wrong please.

I had to do a lot to get it working properly, the cheap and easy fix to get it working once you get at as far as you have is this in Datastore.py

Code:
 -                    if chain.block_header_hash(chain.serialize_block_header(
 -                            block)) != hash:
 -                        raise InvalidBlock('block hash mismatch')
 +                   # if chain.block_header_hash(chain.serialize_block_header(
 +                   #         block)) != hash:
 +                   #     raise InvalidBlock('block hash mismatch')

Thanks i will try it.
it didn't work without rebuilding the database so i am trying that now

okay strangely now it is at block_tx 45030 13903 and the coin only has 44974 blocks. How is this possible?
(and yes i triple checked) and it is still importing more
orphans are imported too but "removed" (not really removed, they still exist AFAIK) so the number of blocks is higher. block_tx .
same of course applies to transactions which didnt get accepted due to orphan.
newbie
Activity: 13
Merit: 0
can someone help me i am trying to set up an block explorer for VirtaCoin.
It is just to get started into this and i saw they didn't have one so i thought give it a go.
But the problem is i keep only seeing the genesis block and nothing more.
Can someone here maybe tell me if my configuration is wrong.
or other things i have to pay attention to
i pulled the head revision from github. also i tried doing it with 0.7.2. but that had no success at all.

abe.conf


Code:
dbtype MySQLdb
    connect-args {"user":"user","db":"dbname","passwd":"pass"}
    upgrade
    port 2900
        host 127.0.0.1
binary-type binary
datadir += [{
        "dirname": "/root/.virtacoin",
        "chain": "VirtaCoin",
        "address_version":"\u0000",
         "policy":"LtcScryptChain",
        "conf": "virtacoin.conf"
      }]

Abe/DataStore.py

 
Code:
   {"chain":"VirtaCoin","policy":"LtcScryptChain",
     "code3":"VTA", "address_version":"\x00", "magic":"\xbe\xd0\xc8\xd1"},


if someone can tell me if something is wrong please.

I had to do a lot to get it working properly, the cheap and easy fix to get it working once you get at as far as you have is this in Datastore.py

Code:
 -                    if chain.block_header_hash(chain.serialize_block_header(
 -                            block)) != hash:
 -                        raise InvalidBlock('block hash mismatch')
 +                   # if chain.block_header_hash(chain.serialize_block_header(
 +                   #         block)) != hash:
 +                   #     raise InvalidBlock('block hash mismatch')

Thanks i will try it.
it didn't work without rebuilding the database so i am trying that now

okay strangely now it is at block_tx 45030 13903 and the coin only has 44974 blocks. How is this possible?
(and yes i triple checked) and it is still importing more
newbie
Activity: 13
Merit: 0
can someone help me i am trying to set up an block explorer for VirtaCoin.
It is just to get started into this and i saw they didn't have one so i thought give it a go.
But the problem is i keep only seeing the genesis block and nothing more.
Can someone here maybe tell me if my configuration is wrong.
or other things i have to pay attention to
i pulled the head revision from github. also i tried doing it with 0.7.2. but that had no success at all.

abe.conf


Code:
dbtype MySQLdb
    connect-args {"user":"user","db":"dbname","passwd":"pass"}
    upgrade
    port 2900
        host 127.0.0.1
binary-type binary
datadir += [{
        "dirname": "/root/.virtacoin",
        "chain": "VirtaCoin",
        "address_version":"\u0000",
         "policy":"LtcScryptChain",
        "conf": "virtacoin.conf"
      }]

Abe/DataStore.py

 
Code:
   {"chain":"VirtaCoin","policy":"LtcScryptChain",
     "code3":"VTA", "address_version":"\x00", "magic":"\xbe\xd0\xc8\xd1"},


if someone can tell me if something is wrong please.

I had to do a lot to get it working properly, the cheap and easy fix to get it working once you get at as far as you have is this in Datastore.py

Code:
 -                    if chain.block_header_hash(chain.serialize_block_header(
 -                            block)) != hash:
 -                        raise InvalidBlock('block hash mismatch')
 +                   # if chain.block_header_hash(chain.serialize_block_header(
 +                   #         block)) != hash:
 +                   #     raise InvalidBlock('block hash mismatch')

Thanks i will try it.
it didn't work without rebuilding the database so i am trying that now
full member
Activity: 140
Merit: 100
can someone help me i am trying to set up an block explorer for VirtaCoin.
It is just to get started into this and i saw they didn't have one so i thought give it a go.
But the problem is i keep only seeing the genesis block and nothing more.
Can someone here maybe tell me if my configuration is wrong.
or other things i have to pay attention to
i pulled the head revision from github. also i tried doing it with 0.7.2. but that had no success at all.

abe.conf


Code:
dbtype MySQLdb
    connect-args {"user":"user","db":"dbname","passwd":"pass"}
    upgrade
    port 2900
        host 127.0.0.1
binary-type binary
datadir += [{
        "dirname": "/root/.virtacoin",
        "chain": "VirtaCoin",
        "address_version":"\u0000",
         "policy":"LtcScryptChain",
        "conf": "virtacoin.conf"
      }]

Abe/DataStore.py

 
Code:
   {"chain":"VirtaCoin","policy":"LtcScryptChain",
     "code3":"VTA", "address_version":"\x00", "magic":"\xbe\xd0\xc8\xd1"},


if someone can tell me if something is wrong please.

I had to do a lot to get it working properly, the cheap and easy fix to get it working once you get at as far as you have is this in Datastore.py

Code:
 -                    if chain.block_header_hash(chain.serialize_block_header(
 -                            block)) != hash:
 -                        raise InvalidBlock('block hash mismatch')
 +                   # if chain.block_header_hash(chain.serialize_block_header(
 +                   #         block)) != hash:
 +                   #     raise InvalidBlock('block hash mismatch')
newbie
Activity: 13
Merit: 0
can someone help me i am trying to set up an block explorer for VirtaCoin.
It is just to get started into this and i saw they didn't have one so i thought give it a go.
But the problem is i keep only seeing the genesis block and nothing more.
Can someone here maybe tell me if my configuration is wrong.
or other things i have to pay attention to
i pulled the head revision from github. also i tried doing it with 0.7.2. but that had no success at all.

abe.conf


Code:
dbtype MySQLdb
    connect-args {"user":"user","db":"dbname","passwd":"pass"}
    upgrade
    port 2900
        host 127.0.0.1
binary-type binary
datadir += [{
        "dirname": "/root/.virtacoin",
        "chain": "VirtaCoin",
        "address_version":"\u0000",
         "policy":"LtcScryptChain",
        "conf": "virtacoin.conf"
      }]

Abe/DataStore.py

 
Code:
   {"chain":"VirtaCoin","policy":"LtcScryptChain",
     "code3":"VTA", "address_version":"\x00", "magic":"\xbe\xd0\xc8\xd1"},


if someone can tell me if something is wrong please.
legendary
Activity: 1792
Merit: 1008
/dev/null
hero member
Activity: 481
Merit: 529
Hi! I want to load my chain form altocin. But all I've got is this:
Code:
ImportError: No module named Polcoin

What am I doing wrong?

My config:
Code:
dbtype MySQLdb
connect-args {"user":"abe","db":"abe","passwd":"pass"}
port 2750
host localhost
upgrade
datadir += [{
        "dirname":"/root/.polcoin",
        "chain":"Polcoin",
        "conf":"polcoin.conf",
        "policy":"Sha256Chain",
        "code3":"PLC",
        "address_version":"\u0000",
        "magic":"\u00a5\u00072\u0059\u0082"
        }]
no-serve
commit-bytes = 10000

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

Code:
$ git rev-parse HEAD
54ee67eafff81ec9cd1f5ef5cebea3514c267ae5

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

I put in backslashes where you need them, I guess the forum software eats them.  But that shouldn't affect loading the chain module.
legendary
Activity: 2254
Merit: 1290
legendary
Activity: 2688
Merit: 1240
Hey John, great work.  Love the project!

I'm looking for some guidance on creating a SQL query to display a top 100 richlist for each coin that I have been using Abe for.  Looking at the code I'm having a difficult time wrapping my head around obtaining the information and also converting hashes to addresses all at the same time.  Does anyone have some examples they might share with me to grab the top 100 addresses descending by total balance?

The guy who makes RPC ACE has a PHP file for making a richlist without Abe, i've used it and it works but it can take a long while if the blockchain is huge with lots of transactions, it only talks over RPC no database so you have to do it from block #1 each time.

I tried this on an altcoin

Code:
87711 blocks ... #1000 (tx: 1018/60)   #2000 (tx:1244/260)   etc etc etc etc   #87000 (tx: 2067/1245)    done! 188731 transactions through 99781 unique addresses parsed

It took 9 minutes, Core 2 Xeon 3.2ghz.

Anyone got an idea where I can get that php file for the richlist ?
newbie
Activity: 10
Merit: 0
Hi! I want to load my chain form altocin.

What am I doing wrong?

My config:
Code:
dbtype MySQLdb
connect-args {"user":"abe","db":"abe","passwd":"pass"}
port 2750
host localhost
upgrade
datadir += [{
        "dirname":"/root/.polcoin",
        "chain":"Polcoin",
        "conf":"polcoin.conf",
        "policy":"Sha256Chain",
        "code3":"PLC",
        "address_version":"u0000",
        "magic":"u00a5u00072u0059u0082"
        }]
no-serve
commit-bytes = 10000

It's a bug in Abe, it doesn't use "policy" to load chain file like documentation say. you can clone a chain file in abe/chain and rename, or you can make a change in the database generated for you.

Thanks! I made new policy for my coin and now everything is working!
Pages:
Jump to: