Search content
Sort by

Showing 20 of 53 results by duncant
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 21/10/2012, 01:50:12 UTC
I updated uncle-enzo.mit.edu to the latest version of the server. I can't connect using TCP/SSL, though. Port 50002 is open, but I still get the "Failed to connect uncle-enzo.mit.edu:50002" message when I try to connect. I'm using a self-signed certificate, would that cause problems?
Post
Topic
Board Electrum
Re: [Electrum] Independent monitoring of running servers?
by
duncant
on 19/10/2012, 18:51:42 UTC
The script picks up all running servers, my guess is he did not close down his old one yet as I did remove it from eyelectrum.

I did close down the old server. I left the old host name pointing to the new server for convenience's sake, but the new server advertises itself as uncle-enzo.mit.edu.

Also, your monitoring page does not appear to have updated the status of most of the servers for a while. uncle-enzo.mit.edu and electrum.novit.ro are marked as lagging, but have the correct number of blocks when I connect. california.stratrum.bitcoin.cz is lagging, but not as badly as your site suggests.
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 15/10/2012, 18:22:59 UTC
So Abe on Postgre won't work with default Abe config? Maybe we should do some workaround in Electrum and expect binary data there. Converting binary data to hex isn't so hard and I bet that storing binary data in database will save lot of storage space...

The default is for binary-type to be unset. I don't know what Abe does in that case. By setting "binary-type = pg-bytea", you force Abe to use Postgresql's BYTEA storage type. Setting "binary-type = hex" does the opposite and forces Abe to use hex strings instead.

The module binascii has a function hexlify that will convert buffer objects to hex strings.
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 15/10/2012, 17:31:43 UTC
The server has been running for ~48 hours with no problems, so I'm willing to declare this problem solved. In case anyone comes across this problem in the future, setting "binary-type = hex" in abe.conf did the trick.
Post
Topic
Board Electrum
Re: [Electrum] Independent monitoring of running servers?
by
duncant
on 14/10/2012, 15:39:36 UTC
Tachikoma: the server uncle-enzo.info has moved to a new host, uncle-enzo.mit.edu . The domain uncle-enzo.info is now a CNAME for uncle-enzo.mit.edu . Could you perhaps update your monitoring site to reflect the change of hosts?
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 12/10/2012, 19:05:01 UTC
Hm, raw output script should be in hex form. It looks like this variable is filled directly from the database (https://github.com/spesmilo/electrum-server/blob/master/backends/abe/__init__.py), so maybe this is related to version of Abe and/or postgresql driver in Abe?

I know that Abe is doing wild variable conversions for keeping compatibility with wide area of databases, so maybe this is question to Abe developers, more than Electrum developers...

Oh! I set "binary-type = pg-bytea" in abe.conf. I'll bet that if I set it back to "binary-type = hex" it'll get fixed.
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 12/10/2012, 18:50:20 UTC
hm, there's "raw output script", which is buffer object. Something is broken here. Are you using latest git?

Yes. I actually wrote an Archlinux PKGBUILD that clones git://github.com/spesmilo/electrum-server.git
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 12/10/2012, 18:25:03 UTC
Can you please add "print response.__repr__()" to line /usr/share/electrum-server/transports/stratum_tcp.py, line 30?

This is the object that it fails to serialize:
Code:
{'id': 15, 'result': [{'block_hash': '00000000000002d8c76e662906670ed570ccf1dcdab0f9ecc0fe40ff7aceda2d', 'is_input': 0, 'tx_hash': '39a539f1bf330287c259620b217232f5ea77d116f0f5a88d316d2957e4caf863', 'index': 1, 'outputs': ['1NFbPZr7KD3V8ZvjdssdnidepvjMSTARUZ', '1NAt9bC3fNCkoAXL2Bo3FqnXhWiZHb7vJ8'], 'timestamp': 1340853742, 'inputs': ['1DGUkqgt8ecdSmTtFosujuEx2nBxM2tXAQ'], 'value': 2000000000, 'height': 186565}, {'tx_hash': '5c297e69d89b2cdb8e46799711df7e8745aaed1e119652c9decaaf48e2140350', 'inputs': ['13HLfocvUzAz7dZghau3hpZJ2YhDRWzLMw', '1DqSR6MiL4kB62Z6YMmQ1KpPNsK23Kb5Po'], 'outputs': ['1372wdd5bwdwWf5HvzW7s8D9of6vcxFNj2', '1NAt9bC3fNCkoAXL2Bo3FqnXhWiZHb7vJ8'], 'height': 186572, 'block_hash': '00000000000002baa2474fa9bbcde9ff68cd1639d755a9dbeb933cc2e3fb8900', 'is_input': 0, 'index': 1, 'value': 6000000000, 'raw_output_script': , 'timestamp': 1340857517}, {'block_hash': '000000000000047f5c61faad21a0242ff37e087e804d0adeb3f9c61dd682a26d', 'is_input': 1, 'tx_hash': 'f32c96681776bc7065206ed53c6c62f0e47002384e5536153f4da243a5caed59', 'index': 0, 'outputs': ['1G7EXGeahYYmXsYVAfBjT9G8RjywhstuB8', '1BYKEj4odWztfvWXvYf6SvnQv5PtyRJiSp'], 'timestamp': 1348980703, 'inputs': ['1NAt9bC3fNCkoAXL2Bo3FqnXhWiZHb7vJ8'], 'value': -2000000000, 'height': 201182}, {'tx_hash': '5c297e69d89b2cdb8e46799711df7e8745aaed1e119652c9decaaf48e2140350', 'inputs': ['13HLfocvUzAz7dZghau3hpZJ2YhDRWzLMw', '1DqSR6MiL4kB62Z6YMmQ1KpPNsK23Kb5Po'], 'outputs': ['1372wdd5bwdwWf5HvzW7s8D9of6vcxFNj2', '1NAt9bC3fNCkoAXL2Bo3FqnXhWiZHb7vJ8'], 'height': 0, 'block_hash': 'mempool', 'is_input': 0, 'index': 1, 'value': 6000000000, 'raw_output_script': , 'timestamp': 0}, {'block_hash': 'mempool', 'is_input': 0, 'tx_hash': '39a539f1bf330287c259620b217232f5ea77d116f0f5a88d316d2957e4caf863', 'index': 1, 'outputs': ['1NFbPZr7KD3V8ZvjdssdnidepvjMSTARUZ', '1NAt9bC3fNCkoAXL2Bo3FqnXhWiZHb7vJ8'], 'timestamp': 0, 'inputs': ['1DGUkqgt8ecdSmTtFosujuEx2nBxM2tXAQ'], 'value': 2000000000, 'height': 0}, {'block_hash': 'mempool', 'is_input': 1, 'tx_hash': 'f32c96681776bc7065206ed53c6c62f0e47002384e5536153f4da243a5caed59', 'index': 0, 'outputs': ['1G7EXGeahYYmXsYVAfBjT9G8RjywhstuB8', '1BYKEj4odWztfvWXvYf6SvnQv5PtyRJiSp'], 'timestamp': 0, 'inputs': ['1NAt9bC3fNCkoAXL2Bo3FqnXhWiZHb7vJ8'], 'value': -2000000000, 'height': 0}]}
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 12/10/2012, 18:08:52 UTC
That "KeyboardInterrupt" traceback is just telling you that you interrupted the script by Ctrl+C, nothing more.
Right, I thought that the relevant bit of that traceback was where the command was hanging.

electrum-stop script is connecting to the server over RPC, so if server is loading block database or is busy with something else, it won't response. Please send "tail electrum.log" here. You can also check "top" command; if database is under load, then electrum is updating Abe db.
I'm not quite sure what you're saying here, but the database isn't under any significant load. top shows that neither the python process, nor postgres are using any significant amounts of CPU. iotop also shows that there's no disk activity from either process.

Here's an example of the output when the server isn't running properly:
Code:
[bitcoin@uncle-enzo /]$ electrum-server
Starting Electrum server on uncle-enzo.mit.edu
Coin chain_id = 1
blockchain: 202904 blocks
TCP server started.
HTTP server started.
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/share/electrum-server/processor.py", line 246, in run
    self.update()
  File "/usr/share/electrum-server/processor.py", line 260, in update
    self.send_response(internal_id, response)
  File "/usr/share/electrum-server/processor.py", line 276, in send_response
    session.send_response(response)
  File "/usr/share/electrum-server/transports/stratum_tcp.py", line 30, in send_response
    data = json.dumps(response) + "\n"
  File "/usr/lib/python2.7/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 201, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 264, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python2.7/json/encoder.py", line 178, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: is not JSON serializable

[12/10/2012-00:13:53] TCP 10 1.0
[12/10/2012-00:13:53] TCP 12 1.0
[12/10/2012-00:13:53] TCP 7 1.01-e
[12/10/2012-00:13:54] TCP 16 1.0
block number: 202904
Stopping Stratum
processor terminating
Server stopped
exit timer


I left the server running last night. It was working fine when I went to bed, but when I woke up this morning, I saw this in the logs, and the server is no longer responsive:
Code:
discarding tx id 3984266
discarding tx id 3984266
discarding tx id 4031277
discarding tx id 4031277
discarding tx id 4152198
discarding tx id 4320304
[12/10/2012-07:11:59] TCP 7 1.0
[12/10/2012-07:13:13] TCP 7 1.0
block number: 202952
block number: 202953
block number: 202954
[12/10/2012-07:39:06] TCP 1 1.0
[12/10/2012-07:39:31] TCP 1 1.01-e
discarding tx id 6769795
[12/10/2012-07:43:12] TCP 8 0.52
block number: 202955
[12/10/2012-08:01:32] TCP 7 0.61
block number: 202956
block number: 202957
[12/10/2012-08:04:07] TCP 1 1.01-e
[12/10/2012-08:16:16] TCP 1 1.01-e
[12/10/2012-08:19:01] TCP 7 1.01-e
[12/10/2012-08:21:51] TCP 7 1.01-e
[12/10/2012-08:25:39] TCP 1 1.01-e
block number: 202958
[12/10/2012-08:32:03] TCP 8 1.01-e
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/share/electrum-server/processor.py", line 246, in run
    self.update()
  File "/usr/share/electrum-server/processor.py", line 260, in update
    self.send_response(internal_id, response)
  File "/usr/share/electrum-server/processor.py", line 276, in send_response
    session.send_response(response)
  File "/usr/share/electrum-server/transports/stratum_tcp.py", line 30, in send_response
    data = json.dumps(response) + "\n"
  File "/usr/lib/python2.7/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 201, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 264, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python2.7/json/encoder.py", line 178, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: is not JSON serializable

[12/10/2012-08:32:30] TCP 8 1.01-e
block number: 202959
[12/10/2012-08:40:05] TCP 10 1.0
block number: 202960
[12/10/2012-08:44:31] TCP 7 1.0
block number: 202961
discarding tx id 6478819
discarding tx id 6015062           
discarding tx id 5935605
discarding tx id 5935579
discarding tx id 5935292
discarding tx id 5933473
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 12/10/2012, 05:37:48 UTC
I tried starting the server with iptables preventing incoming connections on port 50000

and by port 50000 I mean port 50001
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 12/10/2012, 04:26:28 UTC
I would try to rebuild of the abe database from scratch. (I know, it is slow...)
See ya in 3 weeks duncant :/

Okay, so I rebuilt the database. The first time I fired up the server, it worked perfectly. I started it with "cache = no" and "irc = no". After testing it, I wanted to enable those, so I stopped the server, which worked fine. I edited the config file and restarted the server. As soon as it started up, I got the traceback that I posted above and it doesn't work again. About 1 in 10 times, the server starts properly, the rest of the time I get the traceback above.

Another thing to note, is that when the server wasn't working properly, and I went to shut it down, "electrum-server stop" hung, without printing the "ok" message. The server did shut itself down, but the "electrum-server stop" command never finished. When I Ctrl-C'd it it printed the following traceback:

Code:
Traceback (most recent call last):
  File "/usr/bin/electrum-server", line 101, in
    run_rpc_command(sys.argv[1], stratum_tcp_port)
  File "/usr/bin/electrum-server", line 75, in run_rpc_command
    o = s.recv(1024)
KeyboardInterrupt

=========== Frustration break occurred here ==========

As an experiment, I tried starting the server with iptables preventing incoming connections on port 50000. I waited until the "block number: XXXXXX" message was printed, then opened the firewall. I tried that a couple of times, and It appears to work fine when I do that. Perhaps there's a race condition between the stratum thread and the thread that interfaces with the database?
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 10/10/2012, 17:36:27 UTC
During startup, the server prints the following error message. Perhaps this has something to do with the problem I'm having?
Code:
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/share/electrum-server/processor.py", line 246, in run
    self.update()
  File "/usr/share/electrum-server/processor.py", line 260, in update
    self.send_response(internal_id, response)
  File "/usr/share/electrum-server/processor.py", line 276, in send_response
    session.send_response(response)
  File "/usr/share/electrum-server/transports/stratum_tcp.py", line 30, in send_response
    data = json.dumps(response) + "\n"
  File "/usr/lib/python2.7/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 201, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 264, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python2.7/json/encoder.py", line 178, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: is not JSON serializable
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 09/10/2012, 15:41:12 UTC
Yes. Bitcoind responds to all its commands appropriately.
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 09/10/2012, 01:59:54 UTC
Hi all!

I've been trying to move my server uncle-enzo.info to a new/better host uncle-enzo.mit.edu, but things have gone horribly wrong.

The initial abe import went just fine. I can start the server and it prints the correct number of blocks. When I fire up my client, the server prints a flurry of "discarding tx id ..." messages followed by the typical "[] TCP
" message. After that, everything just hangs. My client gets stuck on "Connecting..." and nothing more interesting happens on the server end.

Do you have any idea what could be going on? Thank you!
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 26/07/2012, 18:57:44 UTC
That fixed it! Thanks!
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 26/07/2012, 06:25:51 UTC
I'm still getting the same error after adding those lines to my electrum.conf.
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 25/07/2012, 06:29:45 UTC
Hi! I just upgraded my server to the lastest git version. I'm getting the following error when I try to run the server
Code:
Starting Electrum server on uncle-enzo.info
Traceback (most recent call last):
  File "/var/bitcoin/bin/electrum-server", line 122, in
    chain_proc = backend.BlockchainProcessor(config)
  File "/var/bitcoin/src/electrum/server/backends/abe/__init__.py", line 452, in __init__
    self.store = AbeStore(config)
  File "/var/bitcoin/src/electrum/server/backends/abe/__init__.py", line 39, in __init__
    print 'Coin chain_id = %d' % self.chain_id
TypeError: %d format: a number is required, not NoneType

Is there a setting that I need to make the new version work?
Post
Topic
Board Electrum
Re: [ANNOUNCE] Electrum - a new thin client
by
duncant
on 06/07/2012, 17:30:04 UTC
I figured out how to replicate that bottom error. In the lite gui, click on the ### EUR to change it to USD. Then click on the "... and amount" text box.
Post
Topic
Board Electrum
Re: [ANNOUNCE] Electrum - a new thin client
by
duncant
on 05/07/2012, 21:35:00 UTC
Some errors for you:


I clicked into the "Enter a bitcoin address..." box, then clicked the "Receive" button:
Code:
RuntimeError: maximum recursion depth exceeded
Traceback (most recent call last):
  File "/Users/duncant/electrum/lib/gui_lite.py", line 344, in focusOutEvent
    if self.text() == "":
RuntimeError: maximum recursion depth exceeded while calling a Python object


I also encountered this error, but I'm having trouble replicating it:
Code:
Traceback (most recent call last):
  File "/Users/duncant/electrum/lib/gui_lite.py", line 244, in amount_input_changed
    amount = D(str(amount_text))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/decimal.py", line 542, in __new__
    if isinstance(value, basestring):
RuntimeError: maximum recursion depth exceeded in __instancecheck__


(I'm on a mac, in case you couldn't tell by the pathnames in the tracebacks)
Post
Topic
Board Electrum
Re: Electrum server discussion thread
by
duncant
on 21/06/2012, 00:40:18 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.