Search content
Sort by

Showing 11 of 11 results by ajze
Post
Topic
Board Goods
Re: [WTS] Battletoads - Original NES cartridge
by
ajze
on 22/03/2013, 02:20:22 UTC
It's a TRAP!
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
ajze
on 17/02/2013, 06:54:06 UTC
I'm having issues getting Electrum server to sync with bitcoind.  It works fine for a short time then says this:

Code:
17/02/2013-05:20:34] catch_up: block 23100 (0.639s)
[17/02/2013-05:20:34] catch_up: block 23200 (0.638s)
Traceback (most recent call last):
  File "/home/bitcoind/electrum/electrum-server/backends/bitcoind/blockchain_processor.py",$
    respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
  File "/usr/lib/python2.7/urllib.py", line 88, in urlopen
    return opener.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 209, in open
    return getattr(self, name)(url, data)
  File "/usr/lib/python2.7/urllib.py", line 344, in open_http
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 757, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
 raise err
IOError: [Errno socket error] [Errno 110] Connection timed out
[17/02/2013-05:20:56] Stopping Stratum
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 755, in run
    self.function(*self.args, **self.kwargs)
  File "/home/bitcoind/electrum/electrum-server/backends/bitcoind/blockchain_processor.py",$
    threading.Timer(0, lambda: self.catch_up(sync=False)).start()
  File "/home/bitcoind/electrum/electrum-server/backends/bitcoind/blockchain_processor.py",$
    next_block_hash = self.bitcoind('getblockhash', [self.height + 1])
  File "/home/bitcoind/electrum/electrum-server/backends/bitcoind/blockchain_processor.py",$
    r = loads(respdata)
UnboundLocalError: local variable 'respdata' referenced before assignment

Looks like a time out issue.  I have it running on a virtual server that may be the source of the delays in communicating w/ bitcoind.

I don't speak python, but this seems to magically make the time out 60s instead of 1s:

electrum-server/backends/bitcoind/blockchain_processor.py line 87:

was:
Code:
       try:
            respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
        except:
            traceback.print_exc(file=sys.stdout)
            self.shared.stop()

Changed to:
Code:
      try:
            respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
        except:
            try:
                respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
            except:
                traceback.print_exc(file=sys.stdout)
                self.shared.stop()


After changing this, it runs much longer before it dies with the same message.  I'm sure there's a much better way to do this.  Maybe some who knows about this stuff can fix it or at least change the time out to a value that will survive the server being overloaded temporarily.

[Edit]
Moved leveldb to shm to see if it helped performance.  It didn't.  The issue appears to be caused by high cpu usage.
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
ajze
on 24/06/2012, 01:40:32 UTC
If I am running bitcoind daemon and an Electrum server, do both programs download the block chain separately?

bitcoind downloads the blockchain, then Electrum server (with the help of Abe) reads it and puts it in an SQL database to make it easier to query.
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
ajze
on 23/06/2012, 22:34:49 UTC
Nevermind.  After accidentally trashing my db for the 10th time, I'm declaring the current solution of bitcoind+abe+electrum server [edit]annoying[/edit].  I'll come back when it's not a full time job just to get it to run.


Edit:
Sorry, I was very frustrated.  Now that I've calmed down, I'm going to try to help fix things instead of complaining Smiley
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
ajze
on 23/06/2012, 02:00:36 UTC
I already updated Abe yesterday. Will give it a try though.

Edit: No dice, seems this commit might have something to do with it since it errors on this column.

indeed. I removed the call to new_id() because it was creating a new id.
however, the request might not work on all databases. (I use postgresql)

There is no last_value on MySQL as far as I am aware. Would it be possible to replace:

Code:
       current_id = self.safe_sql("""SELECT last_value FROM tx_seq""")
        current_id = current_id[0][0]

With

Code:
        current_id = self.safe_sql("""SELECT * FROM tx_seq ORDER BY id DESC LIMIT 1""")
        current_id = current_id[0][0]

Since my server crashes I can't be sure what current_id is returning on Postgre.

This is the same bug I'm getting.  I didn't even realize that PostgreSQL was an option.  If you're trying to support several different databases, you might want to consider a database abstraction layer, such as ADOdb.  It will make things much easier for you.

As a temporary solution something like this should be compatible with both:

Code:
        current_id = self.safe_sql("""SELECT max(id) FROM tx_seq""");

If the table is indexed properly, it should be just as fast, too.  I'll try it on my node later and let you know how it works.
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
ajze
on 21/06/2012, 02:08:59 UTC
I shutdown electrum, ran the SQL query it suggests and restarted it.  Now I can't connect to the server and the logs are empty except for: 'Starting Electrum server on btcback.com'.  I'm assuming it takes just takes a long time to re-scan the blockchain.

It's faster if you run
Code:
abe --config --no-serve
than letting the electrum server take care of the import.

So its re-importing everything?  Guess btcback.com will be down for a couple of days :/


EDIT:

Switched to Abe and it looks like is wasn't re-importing everything.  Should be back up as soon as I find out who's been winning at Satoshi Dice over the past couple of weeks Smiley
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
ajze
on 21/06/2012, 00:22:19 UTC
Hi all.  I'm the operator of btcback.com.  I just upgraded bitcoind/electrum and have been getting tons of errors along these lines:

ERROR:Abe.DataStore:Chain not found for magic number '\xfb\x89\xa4\x03' in block file /home/bitcoind/.bitcoin/blk0001.dat at offset 1612760166.  If file contents have changed, consider forcing a rescan: UPDATE datadir SET blkfile_number=1, blkfile_offset=0 WHERE dirname='/home/bitcoind/.bitcoin'

I shutdown electrum, ran the SQL query it suggests and restarted it.  Now I can't connect to the server and the logs are empty except for: 'Starting Electrum server on btcback.com'.  I'm assuming it takes just takes a long time to re-scan the blockchain.


Before I started that, I was also getting a different error about a missing column in the db:
OperationalError: (1054, "Unknown column 'last_value' in 'field list'")
error: sql error: 1MUbXxCYa3W2Q6YMrrQcNQDz8kaGftwXkq
Traceback (most recent call last):
  File "/home/bitcoind/src/electrum/server/backends/abe/__init__.py", line 87, in safe_sql
    ret = self.selectall(sql,params)
  File "/usr/local/lib/python2.6/dist-packages/Abe/DataStore.py", line 510, in _selectall
    store.sql(stmt, params)
  File "/usr/local/lib/python2.6/dist-packages/Abe/DataStore.py", line 412, in sql
    store.cursor.execute(cached, params)
  File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in defaulterrorhandler
    raise errorclass, errorvalue

Any thoughts on that one?
Post
Topic
Board Off-topic
Re: Let's Count to 21 Million with Images
by
ajze
on 20/06/2012, 01:11:43 UTC
Post
Topic
Board Beginners & Help
Re: Introduce yourself :)
by
ajze
on 20/06/2012, 01:08:40 UTC
Hi, I'm new here.  Well, I've been following the forum for about a year, but lame n00b rule means I can't post anywhere else yet Sad

I operate btcback.com which is currently just a free Electrum (http://http://ecdsa.org/electrum/) server.  If you haven't tried Electrum yet, you should.  It's easier to use than the official client and much faster to set up or start up.  This is because it does not download the blockchain.  Instead, it relies on a server to handle the blockchain and talking to the Bitcoin network.  Your wallet/secret keys are stored on your computer and the server never has access to them.  It also has some nice features to help protect you from losing your wallet if your computer crashes.
Post
Topic
Board Beginners & Help
Re: Mt Gox, trustable after hack?
by
ajze
on 19/06/2012, 03:40:42 UTC
They are definitely trustable - many people use/trust them.  Is that a good idea?  I know they have taken steps to improve security.  They have not been hacked again, but that doesn't mean it won't happen.  They are obviously a valuable target, but so is any exchange that has any volume.

I think what is more important is weather you trust them to reimburse you if someone does hack their site.  Any site can be hacked and there is no real way to tell how good their security is without being a security expert yourself.  This goes for any online business that deals with other people's money or financial information.

The best thing to do is only deal with companies that have good reputations (search for them on this forum or google) and don't ever keep large amounts of cash in someone else's pocket longer than you have to.  If you have $100 (for example) to convert to Bitcoins, the best strategy is to break it into several smaller chunks and convert them one at a time or send each to a different exchange.  This will decrease your risk should one of those sites get hacked.  If you do the exchanges over a period of time, you will also reduce your currency risk (remember, Bitcoin can be volatile) a little bit by spreading it over several transactions.
Post
Topic
Board Beginners & Help
Re: My transaction got approved in < 10 minutes
by
ajze
on 19/06/2012, 03:27:28 UTC
Whats going on? or is blockchain.info lying?

ASIC testing?

Here's a second look.  yes, there were seven blocks in about a ten minute span recently.
 - http://blockexplorer.com/

How is that even possible???

Random luck eventually you will see a period coming up where blocks will take half an hour or more to be found to even it out to the 6 per hour again.

It's actually possible that there will never be another block that takes more than 10 minutes.  It's just VERY unlikely Smiley

The protocol automatically adjusts the difficulty to keep the average time to 6 min. per block, but thanks to the laws of probability and constantly changing network computing power, it's common to see blocks last from seconds to hours.