Bitcoin Forum
May 11, 2024, 05:42:17 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 »
1  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 21, 2012, 01:50:12 AM
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?
2  Bitcoin / Electrum / Re: [Electrum] Independent monitoring of running servers? on: October 19, 2012, 06:51:42 PM
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.
3  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 15, 2012, 06:22:59 PM
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.
4  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 15, 2012, 05:31:43 PM
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.
5  Bitcoin / Electrum / Re: [Electrum] Independent monitoring of running servers? on: October 14, 2012, 03:39:36 PM
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?
6  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 12, 2012, 07:05:01 PM
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.
7  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 12, 2012, 06:50:20 PM
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
8  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 12, 2012, 06:25:03 PM
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': <read-only buffer for 0x3bbe190, size 25, offset 0 at 0x3bc3130>, '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': <read-only buffer for 0x3bbe110, size 25, offset 0 at 0x3bc3070>, '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}]}
9  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 12, 2012, 06:08:52 PM
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: <read-only buffer for 0x44606d0, size 25, offset 0 at 0x44664f0> is not JSON serializable

[12/10/2012-00:13:53] TCP <redacted> 10 1.0
[12/10/2012-00:13:53] TCP <redacted> 12 1.0
[12/10/2012-00:13:53] TCP <redacted> 7 1.01-e
[12/10/2012-00:13:54] TCP <redacted> 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 <redacted> 7 1.0
[12/10/2012-07:13:13] TCP <redacted> 7 1.0
block number: 202952
block number: 202953
block number: 202954
[12/10/2012-07:39:06] TCP <redacted> 1 1.0
[12/10/2012-07:39:31] TCP <redacted> 1 1.01-e
discarding tx id 6769795
[12/10/2012-07:43:12] TCP <redacted> 8 0.52
block number: 202955
[12/10/2012-08:01:32] TCP <redacted> 7 0.61
block number: 202956
block number: 202957
[12/10/2012-08:04:07] TCP <redacted> 1 1.01-e
[12/10/2012-08:16:16] TCP <redacted> 1 1.01-e
[12/10/2012-08:19:01] TCP <redacted> 7 1.01-e
[12/10/2012-08:21:51] TCP <redacted> 7 1.01-e
[12/10/2012-08:25:39] TCP <redacted> 1 1.01-e
block number: 202958
[12/10/2012-08:32:03] TCP <redacted> 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: <read-only buffer for 0x2f98d30, size 25, offset 0 at 0x2fe70b0> is not JSON serializable

[12/10/2012-08:32:30] TCP <redacted> 8 1.01-e
block number: 202959
[12/10/2012-08:40:05] TCP <redacted> 10 1.0
block number: 202960
[12/10/2012-08:44:31] TCP <redacted> 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
10  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 12, 2012, 05:37:48 AM
I tried starting the server with iptables preventing incoming connections on port 50000

and by port 50000 I mean port 50001
11  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 12, 2012, 04:26:28 AM
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 <module>
    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?
12  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 10, 2012, 05:36:27 PM
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: <read-only buffer for 0x48db490, size 25, offset 0 at 0x48fc870> is not JSON serializable
13  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 09, 2012, 03:41:12 PM
Yes. Bitcoind responds to all its commands appropriately.
14  Bitcoin / Electrum / Re: Electrum server discussion thread on: October 09, 2012, 01:59:54 AM
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 "[<datetime>] TCP <ip address> <bitocin address> <address count> <client version>" 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!
15  Bitcoin / Electrum / Re: Electrum server discussion thread on: July 26, 2012, 06:57:44 PM
That fixed it! Thanks!
16  Bitcoin / Electrum / Re: Electrum server discussion thread on: July 26, 2012, 06:25:51 AM
I'm still getting the same error after adding those lines to my electrum.conf.
17  Bitcoin / Electrum / Re: Electrum server discussion thread on: July 25, 2012, 06:29:45 AM
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 <module>
    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?
18  Bitcoin / Electrum / Re: [ANNOUNCE] Electrum - a new thin client on: July 06, 2012, 05:30:04 PM
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.
19  Bitcoin / Electrum / Re: [ANNOUNCE] Electrum - a new thin client on: July 05, 2012, 09:35:00 PM
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)
20  Bitcoin / Electrum / Re: Electrum server discussion thread on: June 21, 2012, 12:40:18 AM
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 <config file> --no-serve
than letting the electrum server take care of the import.
Pages: [1] 2 3 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!