Pages:
Author

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

full member
Activity: 203
Merit: 100
nvm, got it going, thanks.

i'll try to figure out why the fastcgi isn't working a bit later.

you should give RPC ACE a try, it's not an advanced block explorer but it will let you explore the chain to see it's working and you can get it running in 30 second.
sr. member
Activity: 304
Merit: 250
nvm, got it going, thanks.

i'll try to figure out why the fastcgi isn't working a bit later.
sr. member
Activity: 304
Merit: 250
ok thanks,

i've done that, and now it seems be working from the abe end:

Code:
Abe initialized.
Listening on http://localhost:2750

but i'm getting a "webpage unavailable" when connecting to server's IP with my browser.

Though is probably an issue on the AWS instance side. Strange, i've pretty much opened all the necessary ports in the security groups settings.
legendary
Activity: 2254
Merit: 1290
anyway, i'm assuming abe is creating an html file somewhere, and i need to get Apache2 to point to it by default.

No, Abe generates the html on the fly, the htdocs directory holds common styling and graphics.

You'll probably find it easier to uncomment the section in the config file:

Code:
# Specify port and/or host to serve HTTP instead of FastCGI:
#port 2750
#host localhost

and make sure it works in vanilla mode first before settling down to enjoy the delights of FCGI param config.

Cheers

Graham
sr. member
Activity: 304
Merit: 250
Thanks Graham, i'm making progress here,

everything seems to be loading now, except that when point my browser at the ip address, i get the Apache2 ubuntu default page.

maybe this has something to do with it:

after running python -m Abe.abe --config abe-my.conf, i get:

Quote
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!
fixed path_info
Status: 301 Moved Permanently
Location: http://localhost/
Content-Type: text/html

Moved

Moved

This page has moved to http://localhost/">http://localhost/
Moved


anyway, i'm assuming abe is creating an html file somewhere, and i need to get Apache2 to point to it by default. From what i can see, this file should be in the /bitcoin-abe/Abe/htdocs directory, but there is no html file there.
So somewhere something has gone awry.
legendary
Activity: 2254
Merit: 1290
Ok Thanks,

I'm now at the point where it's trying to import the chain module:

someone has graciously pointed me to an x13 hash module ... I ran the setup.py file, and it installed the python packages.

I still need the x13 hash .py and .pyc files to copy to ABE's \Chain\ directory.

1. General advice: you do not want to copy .pyc or .pyo files, they are machine-specific (byte-)compiled code, Python's equivalent of C's .o files. Your machine will generate its own from the Python source.

2. Save the code below as Abe/Chain/X13Chain.py

Code:
 Copyright(C) 2014 by Abe developers.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program.  If not, see
# .

from . import BaseChain

class X13Chain(BaseChain):
    """
    A blockchain that hashes block headers using the X13 algorithm.
    The current implementation requires the x13_hash module:
    https://github.com/mindfox/x13-hash
    """

    def block_header_hash(chain, header):
        import x13_hash
        return x13_hash.getPoWHash(header)

A quick comparison of the above code with the existing X11Chain.py code will be repaid by a better understanding of the programming skills used here  Wink

Quote
Code:
ImportError: No module named myX13coin
Given the above, you can now move to importing X13Chain instead of myx13chain.

If your coin has PoS, you'll probably need to import and inherit from PpcPosChain. If so, save this code as Abe/Chain/X13PosChain.py and use “X13PosChain” as the policy.

Code:
# Copyright(C) 2014 by Abe developers.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program.  If not, see
# .

from .X13Chain import X13Chain
from .PpcPosChain import PpcPosChain

class X13PosChain(X13Chain, PpcPosChain):
    pass

HTH

Cheers

Graham
sr. member
Activity: 304
Merit: 250
Ok Thanks,

I'm now at the point where it's trying to import the chain module:

Code:
  File "Abe/DataStore.py", line 840, in initialize
    chain = Chain.create(policy, **conf)
  File "Abe/Chain/__init__.py", line 21, in create
    mod = __import__(__name__ + '.' + policy, fromlist=[policy])
ImportError: No module named myX13coin

It's looking in the bitcoin-abe\Abe\Chain\ directory for the X13 chain python files, which are obviously not there. someone has graciously pointed me to an x13 hash module on github: https://github.com/mindfox/x13-hash. I ran the setup.py file, and it installed the python packages.

I still need the x13 hash .py and .pyc files to copy to ABE's \Chain\ directory. Then i can set a new policy fpr the coin that points to the correct hash, and hopefully the chain will import. Any directions on how to achieve this?

much appreciating the help so far!   Wink
legendary
Activity: 2254
Merit: 1290
Comment out the entire check, as below.

Code:
     
        # Get a new block ID.
        block_id = int(store.new_id("block"))
        b['block_id'] = block_id

        # if chain is not None:
        #    # Verify Merkle root.
        #    if b['hashMerkleRoot'] != chain.merkle_root(tx_hash_array):
        #        raise MerkleRootMismatch(b['hash'], tx_hash_array)

        # Look for the parent block.
        hashPrev = b['hashPrev']
        if chain is None:
            # XXX No longer used.
            is_genesis = hashPrev == util.GENESIS_HASH_PREV
        else:
            is_genesis = hashPrev == chain.genesis_hash_prev

sr. member
Activity: 304
Merit: 250
thanks gjhiggens,

the error occurs when this:

Code:
      
        # Get a new block ID.
        block_id = int(store.new_id("block"))
        b['block_id'] = block_id

        if chain is not None:
            # Verify Merkle root.
            if b['hashMerkleRoot'] != chain.merkle_root(tx_hash_array):
                raise MerkleRootMismatch(b['hash'], tx_hash_array)

        # Look for the parent block.
        hashPrev = b['hashPrev']
        if chain is None:
            # XXX No longer used.
            is_genesis = hashPrev == util.GENESIS_HASH_PREV
        else:
            is_genesis = hashPrev == chain.genesis_hash_prev


is changed to this:

Code:
     
        # Get a new block ID.
        block_id = int(store.new_id("block"))
        b['block_id'] = block_id

        if chain is not None:
            # Verify Merkle root.
            #if b['hashMerkleRoot'] != chain.merkle_root(tx_hash_array):
                #raise MerkleRootMismatch(b['hash'], tx_hash_array)

        # Look for the parent block.
        hashPrev = b['hashPrev']
        if chain is None:
            # XXX No longer used.
            is_genesis = hashPrev == util.GENESIS_HASH_PREV
        else:
            is_genesis = hashPrev == chain.genesis_hash_prev


in the DataStore.py (commenting out the Merkle root verification). strange.
legendary
Activity: 2254
Merit: 1290
... edited the Datastore.py

Code:
IndentationError: expected an indented block

I'll hazard a guess that it's a whitespace issue, mixed spaces and tabs or 8-space tabs, or something.

Cheers,

Graham

sr. member
Activity: 304
Merit: 250
Hii,

Trying to set up ABE for an X13 Coin,

I've imported the hash module and installed it's python libraries, edited the Datastore.py and added the chain details with the address_version & magic number. The abe.conf is pointed to the correct datadir.

got as far as:

Code:
 
python -m Abe.abe --config abe.conf --commit-bytes 100000 --no-serve

this kicks out the following:

Code:
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 "/home/ubuntu/bitcoin-abe/Abe/abe.py", line 32, in
    import DataStore
  File "Abe/DataStore.py", line 1076
    hashPrev = b['hashPrev']
           ^
IndentationError: expected an indented block

Help will be much appreciated.  Tongue

full member
Activity: 203
Merit: 100
Trying to figure out how to create 'rich list' from the Abe database. Should be easy doable with SQL. Any ideas?

You don't need to store in a database if you don't want to, it doesn't make it any easier or harder. You can build an associative array with each unique address as key for quick counting. One entry for every unique address you find, count both in and outgoing and keep coinbase addresses separate to avoid confusion.
sr. member
Activity: 393
Merit: 250
Trying to figure out how to create 'rich list' from the Abe database. Should be easy doable with SQL. Any ideas?
sr. member
Activity: 304
Merit: 250
need some help please,

1st, my address_version:

        PUBKEY_ADDRESS = 23, 
        SCRIPT_ADDRESS = 83,
        PUBKEY_ADDRESS_TEST = 111,
        SCRIPT_ADDRESS_TEST = 196,


and 2nd, my "magic number"

unsigned char pchMessageStart[4] = { 0x70, 0x35, 0x22, 0x05 };

Sorry, but i just seem to be too stoopid to figure this out!  Tongue
full member
Activity: 203
Merit: 100
just wondering if anyone has been successful with running this in windows?

Shouldn't be a problem if you have a working Python environment installed with the necessary modules (pycrypto).

Windows installers are available https://www.python.org/download
full member
Activity: 203
Merit: 100
I am setting up abe for my coin, which switched to merged mining at block 100k, and I'm getting an error.

Trying to get this thing working with an X13 coin, is there tricks to doing this?  I have managed to get it working except for it only shows block 0...   Been a long road to get it working at all.

is there a step-by-step guide anyone can PM me to set up a block explorer using ABE please?

Maybe you guys should try RPC Ace in the meanwhile to atleast get to see your blockchain while you fight with configuring ABE...... https://bitcointalksearch.org/topic/announce-rpc-ace-a-simple-cut-down-block-explorer-alternative-686177
newbie
Activity: 11
Merit: 0
Is it possible to get the balance of a wallet up to a particular block (via an api command)?
I want to be able to crawl a block chain and create a top-100 list for every 100 blocks to create an animation showing change of distribution over time.
Thanks.
sr. member
Activity: 434
Merit: 250
is there a step-by-step guide anyone can PM me to set up a block explorer using ABE please?
legendary
Activity: 964
Merit: 1000
just wondering if anyone has been successful with running this in windows?
and im also wondering if abe comes with address transactions? so that i am able to see 24 hour input/outputs of addresses and possibly a rich list?
full member
Activity: 140
Merit: 100
Trying to get this thing working with an X13 coin, is there tricks to doing this?  I have managed to get it working except for it only shows block 0...   Been a long road to get it working at all.
Pages:
Jump to: