Bitcoin Forum
April 24, 2024, 11:45:42 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)
dotvibe
Sr. Member
****
Offline Offline

Activity: 304
Merit: 250



View Profile
July 26, 2014, 07:03:24 PM
 #861

Okay cool,

Not sure what details you are reffering to by Apache fcgi config, but this is my Apache.conf

http://pastebin.com/TYrNZmv1

and my Abe.conf

http://pastebin.com/KNT9gy59

Couldn't get much out of that Perl Monks link, srry  Undecided
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
gjhiggins
Legendary
*
Offline Offline

Activity: 2254
Merit: 1278



View Profile WWW
July 26, 2014, 09:16:45 PM
 #862

Couldn't get much out of that Perl Monks link, srry  Undecided

That's odd, these seem quite pertinent to me, I was hoping not to have copy and paste them explicitly.

Quote
“I came across this thread when Googling on "(8)Exec format error:". This probably not the answer to the question asked... However, I've just had this problem and it turned out that I'd started my script with a newline and not #!/usr/bin/perl (ie I'd opened emacs hit return, then paged down to the bit of code I was working on).

so the script worked as 'perl foo.pl' but not via apache

Hope this helps someone.”
Quote
“I had the same issue, Thank You for the wisdom to solve my issue in such a timely manner. May happiness find you on your travels.”

Quote
“I tried what you monks said, but it didn't quite work out for me.
Until I discovered that some stupid editor inserted the utf-8 byte order mark without asking and thus mangled my shebang into #!/usr/bin/perl

I had to change the encoding to remove the mark, and now everything works fine Smiley
Quote
“If you are using Notepad++ as your editor and you are using unicode, be sure to have it set to "Encode n UTF-8 without BOM".

Otherwise, you get that leading character,”


As regard FCGI config, here's the content of my modules-enabled/fastcgi.conf. I've found that sometimes I need one approach, sometimes another. I apologise for not sanitising it first but I'm pressed for time. Only the first two are currently active, I switched to using supervisor-controlled waitressing via ProxyPass, which I found a lot more straightforward.

Code:
<IfModule mod_fastcgi.c>
  AddHandler fastcgi-script .fcgi
  FastCgiWrapper /usr/lib/apache2/suexec
  FastCgiIpcDir /var/lib/apache2/fastcgi

# ==== www.higginsandmacfarlane.com ===========================================
# FastCgiServer /www/hmc/handmcom/handm.fcgi -port 9004 -processes 4
# FastCgiServer /www/hmc/handmcom/handm.fcgi -socket /var/lib/apache2/fastcgi/handmcom.socket  -processes 1

# ==== www.higginsandmacfarlane.net ==========================================
FastCgiExternalServer /www/hmn/handmnet/handmnet.fcgi -socket /var/lib/apache2/fastcgi/handmnet.socket
# -user httpd -group httpd
# FastCgiExternalServer /www/hmn/handmnet/handmnet.fcgi -host 127.0.0.1:9006
# FastCgiServer /www/hmn/handmnet/handmnet.fcgi -socket /tmp/handmnet.socket -processes 1
# FastCgiServer /www/hmn/handmnet/handmnet.fcgi -port 9006 -processes 1

# ==== alpha.bel-epa.com ======================================================
FastCgiExternalServer /www/wm/waukmates/waukmates.fcgi -socket /var/lib/apache2/fastcgi/waukmates.socket
# -user httpd -group httpd
# FastCgiExternalServer /www/wm/waukmates/waukmates.fcgi -host 127.0.0.1:9008
# FastCgiServer /www/wm/waukmates/waukmates.fcgi -socket /www/wm/waukmates/waukmates.socket -processes 1
# FastCgiServer /www/wm/waukmates/waukmates.fcgi -port 9008 -processes 1

# ==== beta.bel-epa.com ======================================================
# FastCgiExternalServer /www/probsdev/probs/pyramid.fcgi -socket /www/probsdev/probs/pyramid.socket -user httpd -group httpd
# FastExternalCgiServer /www/probsdev/probs/pyramid.fcgi -host 127.0.0.1:9009
# FastCgiServer /www/probsdev/probs/pyramid.fcgi -socket /www/probsdev/probs/pyramid.socket -processes 1
# FastCgiServer /www/probsdev/probs/pyramid.fcgi -port 9007 -processes 1

# ==== gamma.bel-epa.com ======================================================
# FastCgiExternalServer /www/ukpp/ukpp/ukppsw.fcgi -socket /var/lib/apache2/fastcgi/ukpp.socket -user httpd -group httpd

and the contents of abe.fcgi?

As you can tell from the Perl Monk inclusions, I'm looking for the source of the format error - Apache's trying to execute the Python code in abe.fcgi and if you've got a Windows-formatted file on a Linux system, then that could cause the error you're seeing.

Or it might be something else.


Cheers

Graham

Edit: added comment on fcgi config content
xpansive
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
July 26, 2014, 09:33:30 PM
 #863

I've finally managed to get Abe to work with a standard Litecoin clone. I don't understand what the LtcScryptChain module is for when it's THE WRONG MODULE for Scrypt chains, it must use Sha256Chain policy............... why no mention of this in the bitcoin-abe docs?!?!?!?

Anyway too much work with this, it's a big mess, I will keep using RPC Ace instead only need to see so the blockchain is working and check hashrates etc, it's much simpler and easier than bitcoin-abe.

Hey roundrobin, I am also working with a Litecoin clone, and I noticed the same: if you use 'LtcScryptChain', blocks are loaded in the DB but only block 0 is displayed on the web. As you say, if you choose 'Sha256Chain' as policy, all blocks are loaded and displayed in the initial table, but if you click on any of the blocks it fails, showing a web with the message 'A server error occurred.  Please contact the administrator.' Console shows up this error:

Code:
Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/home/angel/progs/abe-master/Abe/abe.py", line 250, in __call__
    handler(page)
  File "/home/angel/progs/abe-master/Abe/abe.py", line 680, in handle_block
    abe._show_block(page, '', None, block_hash=block_hash)
  File "/home/angel/progs/abe-master/Abe/abe.py", line 571, in _show_block
    is_stake_block = is_stake_chain and b['is_proof_of_stake']
KeyError: 'is_proof_of_stake'
127.0.0.1 - - [26/Jul/2014 23:29:40] "GET /block/5a105718caaee10194af4a438e161a5258deffbf88ebefcbe60a85aade06a8ba HTTP/1.1" 500 59

So, did you managed to overcome this error with your Litecoin clone coin? And if yes, how did you do it?

Cheers!
roundrobin
Full Member
***
Offline Offline

Activity: 203
Merit: 100


View Profile
July 27, 2014, 10:53:58 AM
Last edit: July 27, 2014, 11:15:15 AM by roundrobin
 #864


Hey roundrobin, I am also working with a Litecoin clone, and I noticed the same: if you use 'LtcScryptChain', blocks are loaded in the DB but only block 0 is displayed on the web. As you say, if you choose 'Sha256Chain' as policy, all blocks are loaded and displayed in the initial table, but if you click on any of the blocks it fails, showing a web with the message 'A server error occurred.  Please contact the administrator.' Console shows up this error:

Code:
...

So, did you managed to overcome this error with your Litecoin clone coin? And if yes, how did you do it?

Cheers!

Hi. I did it by changing the policy field, magic number and script addr version in the "chain" database after the first error, then starting up Abe again and let it do all the blocks when i had corrected the values. the bug with abe is that it ignores what you put in the config file for policy. In my conf file i don't set policy at all. But the coin I tried with is not proof-of-stake, so I never had the error you show. Maybe there is a different method you need to find for PoS. Also I used blkfile method, not RPC because Abe refused to accept my "import-tx" when I used RPC setting. In fact it also refused my magic number and script address version because it didn't want to accept any escaping for hex values, unicode etc.. nothing worked so i had to put all those values into the database afterwards.

   LTC: Lbha3tRmE75oHfF4SjSKpxVK2fY9PxrPUX         VTC: VguAuTdGRcQzihEgrJDYPYUuugGMMGFCNn
   FTC: 6fVWQ3eHhhgH1haqThQbxTFV8XjrqyuKY2          SOL: 8X6dLCY8MeZ6RNdBxzYQkd5kxWj8VVPJmL
DOGE: DMBQta9ME9cWnRPVXtEbi57CDk1uNpwzSh
xpansive
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
July 27, 2014, 01:38:31 PM
 #865


Hey roundrobin, I am also working with a Litecoin clone, and I noticed the same: if you use 'LtcScryptChain', blocks are loaded in the DB but only block 0 is displayed on the web. As you say, if you choose 'Sha256Chain' as policy, all blocks are loaded and displayed in the initial table, but if you click on any of the blocks it fails, showing a web with the message 'A server error occurred.  Please contact the administrator.' Console shows up this error:

Code:
...

So, did you managed to overcome this error with your Litecoin clone coin? And if yes, how did you do it?

Cheers!

Hi. I did it by changing the policy field, magic number and script addr version in the "chain" database after the first error, then starting up Abe again and let it do all the blocks when i had corrected the values. the bug with abe is that it ignores what you put in the config file for policy. In my conf file i don't set policy at all. But the coin I tried with is not proof-of-stake, so I never had the error you show. Maybe there is a different method you need to find for PoS. Also I used blkfile method, not RPC because Abe refused to accept my "import-tx" when I used RPC setting. In fact it also refused my magic number and script address version because it didn't want to accept any escaping for hex values, unicode etc.. nothing worked so i had to put all those values into the database afterwards.

Hi roundrobin, thanks for replying.

My coin is not PoS, it is PoW, so the error makes sense, and after all it is 'normal' it gives errors when trying to read block contents because Abe added them assigning them a wrong algorithm (SHA256D instead of Scrypt). In my case I also use blkfile and I don't set the policy in the abe.conf file, I instead created a default at the beggining of 'DataStore.py' (deleting the existing ones because I don't need them):

Code:
CHAIN_CONFIG = [
    {"chain":"FirstCoin", "policy":"Sha256Chain",
     "code3":"FST", "decimals":"8", "address_version":"\x00", "magic":"\xfa\xc3\xb6\xda"},
    #{"chain":"",
    # "code3":"", "address_version":"\x", "magic":""},
    ]

This way all those values (including address version and magic numbers) are inserted correctly in the 'chain' table.

Then I do:
Code:
>sudo python setup.py install

and then:
Code:
>sudo python -m Abe.abe --config abe.conf --commit-bytes 100000 --no-serve
Which loads all the blocks nicely into the DB and also all the fields I specified in DataStore-py to the 'chain' table, and then:

Code:
>sudo python -m Abe.abe --config abe.conf

Then I go the the web page, and the table with the blocks shows up, but when you click on a block the error I mentioned on my previous post occurs.

So could you ellaborate a bit more your reply? What did you change in the 'chain' table? Did you simply replaced 'Sha256Chain' to 'LtcScryptChain' in the the 'chain_policy' field of the 'chain' table? And then what should I do? I tried to simply replace that value in the 'chain' table, but didn't fix anything. I don't receive any errors when loading blocks to the database. So could please detail a bit more the process you are folllowing to get it working? This Abe thing is driving me mad, it should be a lot easier to set up a simple LTC clone.

Thanks in andvance.

Cheers!
roundrobin
Full Member
***
Offline Offline

Activity: 203
Merit: 100


View Profile
July 27, 2014, 01:58:53 PM
Last edit: July 27, 2014, 02:26:22 PM by roundrobin
 #866

Hi roundrobin, thanks for replying.

My coin is not PoS, it is PoW, so the error makes sense, and after all it is 'normal' it gives errors when trying to read block contents because Abe added them assigning them a wrong algorithm (SHA256D instead of Scrypt). In my case I also use blkfile and I don't set the policy in the abe.conf file, I instead created a default at the beggining of 'DataStore.py' (deleting the existing ones because I don't need them):

Code:
CHAIN_CONFIG = [
    {"chain":"FirstCoin", "policy":"Sha256Chain",
     "code3":"FST", "decimals":"8", "address_version":"\x00", "magic":"\xfa\xc3\xb6\xda"},
    #{"chain":"",
    # "code3":"", "address_version":"\x", "magic":""},
    ]

This way all those values (including address version and magic numbers) are inserted correctly in the 'chain' table.

Then I do:
Code:
>sudo python setup.py install

and then:
Code:
>sudo python -m Abe.abe --config abe.conf --commit-bytes 100000 --no-serve
Which loads all the blocks nicely into the DB and also all the fields I specified in DataStore-py to the 'chain' table, and then:

Code:
>sudo python -m Abe.abe --config abe.conf

Then I go the the web page, and the table with the blocks shows up, but when you click on a block the error I mentioned on my previous post occurs.

So could you ellaborate a bit more your reply? What did you change in the 'chain' table? Did you simply replaced 'Sha256Chain' to 'LtcScryptChain' in the the 'chain_policy' field of the 'chain' table? And then what should I do? I tried to simply replace that value in the 'chain' table, but didn't fix anything. I don't receive any errors when loading blocks to the database. So could please detail a bit more the process you are folllowing to get it working? This Abe thing is driving me mad, it should be a lot easier to set up a simple LTC clone.

Thanks in andvance.

Cheers!

No I replaced to Sha256Chain in chain_policy. But the way you do by making a proper entry in datastore.py works better, then you don't have to mess around with more stuff. are you sure that your "dirname" and "conf" points correctly? Did you remove old datastore.pyc before "setup.py install" so it recompiles the changed datastore instead of using the old one? Are you sure the pch_messagestart (script addr version) is correct, and the address version too? Really using $00 like bitcoin?

I set it up again by removing all precompiled files, database etc. and i did it like this:

My datastore.py entry:

Code:
{ "chain":"Somecoin", "policy":"Sha256Chain",
   "code3":"SOM", "address_version":"\x12", "magic":"\x34\x56\x78\x90" },

My conf:

Code:
datadir = [{
        "chain": "Somecoin",
        "dirname": "/home/somecoin/.somecoin",
"conf": "somecoin.conf",
"loader": "blkfile",
"code3": "SOM"
      }]

dbtype = sqlite3
connect-args = abe.sqlite
upgrade
port 8000
host 1.2.3.4

If you ahve no special needs then check out RPC ACE instead of Abe. i can't recommend it enough if you just want something very simple and easy to check so the blockchain works. None of the problems Abe comes with.

   LTC: Lbha3tRmE75oHfF4SjSKpxVK2fY9PxrPUX         VTC: VguAuTdGRcQzihEgrJDYPYUuugGMMGFCNn
   FTC: 6fVWQ3eHhhgH1haqThQbxTFV8XjrqyuKY2          SOL: 8X6dLCY8MeZ6RNdBxzYQkd5kxWj8VVPJmL
DOGE: DMBQta9ME9cWnRPVXtEbi57CDk1uNpwzSh
xpansive
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
July 27, 2014, 02:54:53 PM
 #867

Hi roundrobin, thanks for replying.

My coin is not PoS, it is PoW, so the error makes sense, and after all it is 'normal' it gives errors when trying to read block contents because Abe added them assigning them a wrong algorithm (SHA256D instead of Scrypt). In my case I also use blkfile and I don't set the policy in the abe.conf file, I instead created a default at the beggining of 'DataStore.py' (deleting the existing ones because I don't need them):

Code:
CHAIN_CONFIG = [
    {"chain":"FirstCoin", "policy":"Sha256Chain",
     "code3":"FST", "decimals":"8", "address_version":"\x00", "magic":"\xfa\xc3\xb6\xda"},
    #{"chain":"",
    # "code3":"", "address_version":"\x", "magic":""},
    ]

This way all those values (including address version and magic numbers) are inserted correctly in the 'chain' table.

Then I do:
Code:
>sudo python setup.py install

and then:
Code:
>sudo python -m Abe.abe --config abe.conf --commit-bytes 100000 --no-serve
Which loads all the blocks nicely into the DB and also all the fields I specified in DataStore-py to the 'chain' table, and then:

Code:
>sudo python -m Abe.abe --config abe.conf

Then I go the the web page, and the table with the blocks shows up, but when you click on a block the error I mentioned on my previous post occurs.

So could you ellaborate a bit more your reply? What did you change in the 'chain' table? Did you simply replaced 'Sha256Chain' to 'LtcScryptChain' in the the 'chain_policy' field of the 'chain' table? And then what should I do? I tried to simply replace that value in the 'chain' table, but didn't fix anything. I don't receive any errors when loading blocks to the database. So could please detail a bit more the process you are folllowing to get it working? This Abe thing is driving me mad, it should be a lot easier to set up a simple LTC clone.

Thanks in andvance.

Cheers!

No I replaced to Sha256Chain in chain_policy. But the way you do by making a proper entry in datastore.py works better, then you don't have to mess around with more stuff. are you sure that your "dirname" and "conf" points correctly? Did you remove old datastore.pyc before "setup.py install" so it recompiles the changed datastore instead of using the old one? Are you sure the pch_messagestart (script addr version) is correct, and the address version too? Really using $00 like bitcoin?

I set it up again by removing all precompiled files, database etc. and i did it like this:

My datastore.py entry:

Code:
{ "chain":"Somecoin", "policy":"Sha256Chain",
   "code3":"SOM", "address_version":"\x12", "magic":"\x34\x56\x78\x90" },

My conf:

Code:
datadir = [{
        "chain": "Somecoin",
        "dirname": "/home/somecoin/.somecoin",
"conf": "somecoin.conf",
"loader": "blkfile",
"code3": "SOM"
      }]

dbtype = sqlite3
connect-args = abe.sqlite
upgrade
port 8000
host 1.2.3.4

If you ahve no special needs then check out RPC ACE instead of Abe. i can't recommend it enough if you just want something very fast and easy to check so the blockchain works. None of the problems Abe comes with.

Thanks again for your replying,

dirname and conf are right, I more than triple checked them. I remove all the .pyc files I edit and also the whole abe db before retrying. Regarding to my script addr version and my address version, here is my entry in base58.h of the src of my coin:
Code:
class CBitcoinAddress : public CBase58Data
{
public:
    enum
    {
        PUBKEY_ADDRESS = 0,
        SCRIPT_ADDRESS = 5,
        PUBKEY_ADDRESS_TEST = 26,
        SCRIPT_ADDRESS_TEST = 196,
    };
 
So, yes, like bitcoin, both values.

There's no policy setting in my .conf file, only dirname, chain, conf, loader (blkfile), and code3, although I thing they will be unnecessary since all of them are specified in the DataStore.py file.

But still getting the same error.

And another thing, is the 'ltc_scrypt module available from https://github.com/CryptoManiac/bitcoin-abe' (as stated in the abe doc) functional? I have it installed, but it looks it is useless...

Any other thing you could have or be doing in a different way? My coin is a very straightforward LTC clone, so if yours is running fine, mine should also work...

Thanks roundrobin.

Cheers!

roundrobin
Full Member
***
Offline Offline

Activity: 203
Merit: 100


View Profile
July 27, 2014, 03:58:29 PM
 #868


....

So, yes, like bitcoin, both values.

There's no policy setting in my .conf file, only dirname, chain, conf, loader (blkfile), and code3, although I thing they will be unnecessary since all of them are specified in the DataStore.py file.

But still getting the same error.

And another thing, is the 'ltc_scrypt module available from https://github.com/CryptoManiac/bitcoin-abe' (as stated in the abe doc) functional? I have it installed, but it looks it is useless...

Any other thing you could have or be doing in a different way? My coin is a very straightforward LTC clone, so if yours is running fine, mine should also work...

Thanks roundrobin.

Cheers!


I got the ltc_scrypt module from there, but as it's not used I guess it doesnt matter. The only other thing I can think of is if you are using the wrong older buggy version of pycrypto that is often installed with older versions of python, like with python 2.6 on centos. If so then replace with this version: https://pypi.python.org/pypi/pycrypto/2.6   and I changed Abe/util.py on line ~26 to "import Crypto.Hash.RIPEMD as RIPEMD160"  This problem got in the way for me, took a while to find out.

   LTC: Lbha3tRmE75oHfF4SjSKpxVK2fY9PxrPUX         VTC: VguAuTdGRcQzihEgrJDYPYUuugGMMGFCNn
   FTC: 6fVWQ3eHhhgH1haqThQbxTFV8XjrqyuKY2          SOL: 8X6dLCY8MeZ6RNdBxzYQkd5kxWj8VVPJmL
DOGE: DMBQta9ME9cWnRPVXtEbi57CDk1uNpwzSh
xpansive
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
July 27, 2014, 04:04:08 PM
 #869


....

So, yes, like bitcoin, both values.

There's no policy setting in my .conf file, only dirname, chain, conf, loader (blkfile), and code3, although I thing they will be unnecessary since all of them are specified in the DataStore.py file.

But still getting the same error.

And another thing, is the 'ltc_scrypt module available from https://github.com/CryptoManiac/bitcoin-abe' (as stated in the abe doc) functional? I have it installed, but it looks it is useless...

Any other thing you could have or be doing in a different way? My coin is a very straightforward LTC clone, so if yours is running fine, mine should also work...

Thanks roundrobin.

Cheers!


I got the ltc_scrypt module from there, but as it's not used I guess it doesnt matter. The only other thing I can think of is if you are using the wrong older buggy version of pycrypto that is often installed with older versions of python, like with python 2.6 on centos. If so then replace with this version: https://pypi.python.org/pypi/pycrypto/2.6   and I changed Abe/util.py on line ~26 to "import Crypto.Hash.RIPEMD as RIPEMD160"  This problem got in the way for me, took a while to find out.

Thanks again for your reply roundrobin,

I already checked that, and I discarded it as the source of my problem because my version of pycrypto is 2.6.2.

May I ask you what version of abe are you running? Mine is 0.8pre:

Code:
$ python -m Abe.abe --version
Abe 0.8pre
Schema version Abe39

roundrobin
Full Member
***
Offline Offline

Activity: 203
Merit: 100


View Profile
July 27, 2014, 04:07:01 PM
 #870

Thanks again for your reply roundrobin,

I already checked that, and I discarded it as the source of my problem because my version of pycrypto is 2.6.2.

May I ask you what version of abe are you running? Mine is 0.8pre:


i'm running the exact same version. Did you change the module import name in Abe/util.py? Because new pycrypto calls it RIPEMD not RIPEMD160. it should look like this:

Code:
try:
    import Crypto.Hash.RIPEMD as RIPEMD160   <----
except Exception:
    import ripemd_via_hashlib as RIPEMD160


btw you may need to rebuild the whole database between these changes to make things work.

   LTC: Lbha3tRmE75oHfF4SjSKpxVK2fY9PxrPUX         VTC: VguAuTdGRcQzihEgrJDYPYUuugGMMGFCNn
   FTC: 6fVWQ3eHhhgH1haqThQbxTFV8XjrqyuKY2          SOL: 8X6dLCY8MeZ6RNdBxzYQkd5kxWj8VVPJmL
DOGE: DMBQta9ME9cWnRPVXtEbi57CDk1uNpwzSh
xpansive
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
July 27, 2014, 04:22:10 PM
 #871

Thanks again for your reply roundrobin,

I already checked that, and I discarded it as the source of my problem because my version of pycrypto is 2.6.2.

May I ask you what version of abe are you running? Mine is 0.8pre:


i'm running the exact same version. Did you change the module import name in Abe/util.py? Because new pycrypto calls it RIPEMD not RIPEMD160. it should look like this:

Code:
try:
    import Crypto.Hash.RIPEMD as RIPEMD160   <----
except Exception:
    import ripemd_via_hashlib as RIPEMD160


btw you may need to rebuild the whole database between these changes to make things work.

Nothing, still the same. I'm about to give up with abe, it's a complete mess and it does not look like it's going to change, judging by how often the files are updated on its github account...

Anyway, thank you very much for your help roundrobin.
xpansive
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
July 27, 2014, 04:45:47 PM
 #872

Thanks again for your reply roundrobin,

I already checked that, and I discarded it as the source of my problem because my version of pycrypto is 2.6.2.

May I ask you what version of abe are you running? Mine is 0.8pre:


i'm running the exact same version. Did you change the module import name in Abe/util.py? Because new pycrypto calls it RIPEMD not RIPEMD160. it should look like this:

Code:
try:
    import Crypto.Hash.RIPEMD as RIPEMD160   <----
except Exception:
    import ripemd_via_hashlib as RIPEMD160


btw you may need to rebuild the whole database between these changes to make things work.

Nothing, still the same. I'm about to give up with abe, it's a complete mess and it does not look like it's going to change, judging by how often the files are updated on its github account...

Anyway, thank you very much for your help roundrobin.


I think I found it. In abe.py, at about line ~570, I found:

Code:
        # change by chenhongyan
        #-is_stake_chain = chain.has_feature('nvc_proof_of_stake')
        is_stake_chain = True

        is_stake_block = is_stake_chain and b['is_proof_of_stake']

I'm not a python guru, but I can't understand why 'is_stake_chain' is always given True value, being the chain PoS or not. But anyway, my LTC clone coin is not PoS, so I simply commented that line and uncommented and modified a bit the previous one, resulting in this code:

Code:
        # change by chenhongyan
        is_stake_chain = chain.has_feature('nvc_proof_of_stake')
        #is_stake_chain = True

        is_stake_block = is_stake_chain and b['is_proof_of_stake']


And now it works. I still have to reassure that all values on the web output are right, but they look fine so far.

Anyway, many thanks for all your replies roundrobin.

P.S.: I still think that Abe is a huge mess...

roundrobin
Full Member
***
Offline Offline

Activity: 203
Merit: 100


View Profile
July 27, 2014, 04:49:00 PM
 #873

And now it works. I still have to reassure that all values on the web output are right, but they look fine so far.

Anyway, many thanks for all your replies roundrobin.

P.S.: I still think that Abe is a huge mess...

glad it works. And this 44 page thread is why i always recommend people to at least take a look at RPC ACE in case it suits their needs just as good.

   LTC: Lbha3tRmE75oHfF4SjSKpxVK2fY9PxrPUX         VTC: VguAuTdGRcQzihEgrJDYPYUuugGMMGFCNn
   FTC: 6fVWQ3eHhhgH1haqThQbxTFV8XjrqyuKY2          SOL: 8X6dLCY8MeZ6RNdBxzYQkd5kxWj8VVPJmL
DOGE: DMBQta9ME9cWnRPVXtEbi57CDk1uNpwzSh
xpansive
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
July 27, 2014, 05:05:26 PM
Last edit: July 27, 2014, 06:12:39 PM by xpansive
 #874

I took a look at it but lacks some details I need to show. Abe as I said is a mess, but I think it's the only open-source block explorer available out there able to output a good detail level at a reasonable (although not impressive) speed... and for doing that a db driven block explorer is needed.

RPC ACE fulfills another niche I think, but I agree with you on the point that maybe there's some people out there struggling with abe when RPC ACE could fulfill their needs quite easier.
GrimDemon
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
July 28, 2014, 12:13:03 PM
 #875

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!
ocminer
Legendary
*
Offline Offline

Activity: 2660
Merit: 1240



View Profile WWW
July 29, 2014, 11:10:48 AM
 #876

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 ?

suprnova pools - reliable mining pools - #suprnova on freenet
https://www.suprnova.cc - FOLLOW us @ Twitter ! twitter.com/SuprnovaPools
gjhiggins
Legendary
*
Offline Offline

Activity: 2254
Merit: 1278



View Profile WWW
July 29, 2014, 11:26:42 AM
 #877

Anyone got an idea where I can get that php file for the richlist ?

https://github.com/stolendata/rpc-ace/blob/master/extras/tally.php

Cheers

Graham
John Tobey (OP)
Hero Member
*****
Offline Offline

Activity: 481
Merit: 529



View Profile WWW
August 01, 2014, 07:25:45 PM
 #878

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.

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

Activity: 1792
Merit: 1008


/dev/null


View Profile
August 03, 2014, 01:03:45 PM
 #879

@jtobey

please check https://github.com/bitcoin-abe/bitcoin-abe/issues/133

[GPG Public Key]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
zeldalink
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
August 03, 2014, 07:47:03 PM
 #880

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.
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!