BkkCoins
|
|
September 27, 2011, 12:56:58 AM |
|
Is there a correct way to terminate the Abe server? I've been using Ctrl-C but notice it spits out an ugly Keyboard exception. If I wrote a small patch to catch the exception and gracefully close would that be useful and accepted? Or maybe I'm just doing it wrong?
|
|
|
|
John Tobey (OP)
|
|
September 27, 2011, 02:47:49 AM |
|
I use Ctrl-C and tolerate the keyboard exception backtrace. Once I had a good use for the trace, when I was optimising the initial load time. I can imagine this happening again, so I would probably keep an option to show it, perhaps the existing --debug option.
On the website, I use Daemontools (similar to /etc/init.d/ scripts or Windows services) to stop and start, and that uses a different signal, which Python does not translate into an exception, so it doesn't log backtraces.
Feel free to post patches here or on github. Even if I'm slow to respond, someone else may want the feature.
|
|
|
|
BkkCoins
|
|
September 27, 2011, 05:00:58 AM |
|
Oh, yes, I recall Daemontools from qmail. But now that you mention it I could just use an upstart conf file and then start/stop as a service in Ubuntu. This is nicer than using the full cmd anyway. And... here's mine, it works. /etc/init/abe.conf description "Start Abe - Alternative Block Explorer"
# uncomment if you want autostart #start on runlevel [2345] #stop on runlevel [016]
respawn exec su -c '/usr/bin/python -m Abe.abe --config=/home/<user>/.bitcoin/abe.conf 2>>/var/log/abe.log' <user>
Of course, change the <user> or paths to suit. I start it as my user name because I think that's safer than running as root. Also note that I set the database path in abe.conf so it gets found. I added the "2>>/var/log/abe.log" so activity gets logged but if you run as <user> you will need to create the log file with <user> write perms. Now you can start Abe with, sudo start abe and stop it with sudo stop abe It's kind of nice looking up block chain events on my own notebook and I like the compact concise format of Abe output.
|
|
|
|
mrb
Legendary
Offline
Activity: 1512
Merit: 1028
|
|
October 10, 2011, 07:26:11 AM |
|
Abe is fast; good work John! It took barely 90 minutes to import the chain on my cheap laptop.
|
|
|
|
mila
|
|
October 14, 2011, 10:53:09 PM |
|
Abe is fast; good work John! It took barely 90 minutes to import the chain on my cheap laptop.
OT but didn't you die recently, or something? OBE is awesome. donated
|
your ad here:
|
|
|
John Tobey (OP)
|
|
October 15, 2011, 02:45:05 AM |
|
Still breathing, thanks. Any special requests?
|
|
|
|
mrb
Legendary
Offline
Activity: 1512
Merit: 1028
|
|
October 15, 2011, 03:35:07 AM |
|
OT but didn't you die recently, or something?
I think a "lolwut?" is appropriate here.
|
|
|
|
Xenland
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
October 15, 2011, 07:36:10 AM |
|
Is this code stable?
|
|
|
|
mila
|
|
October 15, 2011, 09:06:56 PM |
|
OT but didn't you die recently, or something?
I think a "lolwut?" is appropriate here. OT there's this programming language C and it's author username was mrb. he died. r from k&r
|
your ad here:
|
|
|
k
|
|
October 15, 2011, 10:05:59 PM Last edit: October 16, 2011, 08:49:09 AM by k |
|
I was looking at the ABE at this site http://blockexplorer.sytes.net/chain/BitcoinWhy is the number of outstanding bitcoins not a multiple of 50? At block 149439 it says 7471999.91789992 outstanding.
|
|
|
|
John Tobey (OP)
|
|
October 16, 2011, 03:13:53 AM |
|
Why is the number of outstanding bitcoins not a multiple of 50? At block 149439 it say 7471999.91789992 outstanding.
The number is below the expected value. Sometimes (just once?) a miner claims less than the allowed amount in coinbase transaction outputs. Abe adjusts the outstanding amount by subtracting a block's inputs from its outputs, not by assuming 50 per block. This is convenient for multi-chain support, since alternative chains have their own inflation formulas, which Abe knows nothing about. Also, sometimes people send coins to pseudo-addresses, which have the form of an address but are not generated in the normal way as the public part of a key pair. These are lost coins. Abe recognizes one pseudo-address (pubkey_hash zero) and uses it internally as the destination of namecoin network fees. A few bitcoins have gone there, and as a side-effect of namecoin accounting, Abe subtracts them from the outstanding value. There are other ways coins can be proven lost, which Abe may someday implement, driving the reported outstanding amount even lower. But it will stay close to the maximum as long as people follow the incentives to save bitcoins.
|
|
|
|
mrb
Legendary
Offline
Activity: 1512
Merit: 1028
|
|
October 16, 2011, 03:23:48 AM |
|
OT there's this programming language C and it's author username was mrb. he died. r from k&r
It was dmr, not mrb.
|
|
|
|
k
|
|
October 16, 2011, 08:53:05 AM |
|
Why is the number of outstanding bitcoins not a multiple of 50? At block 149439 it say 7471999.91789992 outstanding.
The number is below the expected value. Sometimes (just once?) a miner claims less than the allowed amount in coinbase transaction outputs. Abe adjusts the outstanding amount by subtracting a block's inputs from its outputs, not by assuming 50 per block. This is convenient for multi-chain support, since alternative chains have their own inflation formulas, which Abe knows nothing about. thanks John for that explanation.
|
|
|
|
mila
|
|
October 18, 2011, 06:13:12 PM |
|
OT there's this programming language C and it's author username was mrb. he died. r from k&r
It was dmr, not mrb. oh, what a mistake I made! now I stand corrected, thank you.
|
your ad here:
|
|
|
molecular
Donator
Legendary
Offline
Activity: 2772
Merit: 1019
|
|
October 21, 2011, 02:49:22 PM |
|
Is this code stable?
been using it rather heavily (also for alt-chains), seems rock-solid to me.
|
PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0 3F39 FC49 2362 F9B7 0769
|
|
|
John Tobey (OP)
|
|
October 21, 2011, 07:48:32 PM |
|
Is this code stable?
Sorry, I overlooked this question. I hope to have a test suite one day and won't release a 1.0 without one. Numbered versions 0.4, 0.5, and 0.6 all have git branches for bugfixes, and I intend to backport any critical fixes to these. As for the latest commit, it may contain untested code and disruptive changes.
|
|
|
|
terrytibbs
|
|
October 30, 2011, 01:29:15 PM |
|
Trying to get Abe running with Apache and FastCGI doing all the heavy lifting, but I'm getting this: root@terrytibbs:/home/user/src/bitcoin-abe# /usr/bin/python Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess, sys, os >>> command=["sudo", "-u", "user", "/home/user/cgi-bin/abe", str(os.getpid())] >>> subprocess.Popen(command, stdin=sys.stdin).wait() sudo: /home/user/cgi-bin/abe: command not found 1
What's up?
|
|
|
|
John Tobey (OP)
|
|
October 30, 2011, 02:21:55 PM |
|
root@terrytibbs:/home/user/src/bitcoin-abe# /usr/bin/python sudo: /home/user/cgi-bin/abe: command not found
You have to replace "USER" with your login, for example /home/terrytibbs/cgi-bin/abe. And the doc tells you later how to create that file. Edit: the file could be anywhere, ~/cgi-bin is just a suggested location.
|
|
|
|
terrytibbs
|
|
October 30, 2011, 02:58:27 PM |
|
root@terrytibbs:/home/user/src/bitcoin-abe# /usr/bin/python sudo: /home/user/cgi-bin/abe: command not found
You have to replace "USER" with your login, for example /home/terrytibbs/cgi-bin/abe. And the doc tells you later how to create that file. Edit: the file could be anywhere, ~/cgi-bin is just a suggested location. I know, but my user is aptly named just that, "user".
|
|
|
|
terrytibbs
|
|
November 03, 2011, 09:00:37 PM |
|
No luck?
|
|
|
|
|