Require Python 3.5.3
3.5.2 has various socket and API issues affecting peer discovery Closes #135
This commit is contained in:
parent
be9d063457
commit
39bcdb1b6a
@ -8,7 +8,7 @@ ElectrumX - Reimplementation of electrum-server
|
||||
===============================================
|
||||
|
||||
:Licence: MIT
|
||||
:Language: Python (>= 3.5.1)
|
||||
:Language: Python (>= 3.5.3)
|
||||
:Author: Neil Booth
|
||||
|
||||
Getting Started
|
||||
|
||||
@ -252,9 +252,7 @@ some of this.
|
||||
|
||||
* **TOR_PROXY_HOST**
|
||||
|
||||
The host where your Tor proxy is running. Defaults to *127.0.0.1*.
|
||||
If you use a hostname here rather than an IP address, you must have
|
||||
Python version >= 3.5.3, Python 3.5.2 will **not** work.
|
||||
The host where your Tor proxy is running. Defaults to *localhost*.
|
||||
|
||||
If you are not running a Tor proxy just leave this environment
|
||||
variable undefined.
|
||||
|
||||
@ -10,7 +10,8 @@ small - pull requests are welcome.
|
||||
================ ========================
|
||||
Package Notes
|
||||
================ ========================
|
||||
Python3 ElectrumX uses asyncio. Python version >= 3.5 is **required**.
|
||||
Python3 ElectrumX uses asyncio. Python version >= 3.5.3 is
|
||||
**required**.
|
||||
`aiohttp`_ Python library for asynchronous HTTP. Version >=
|
||||
1.0 required; I am using 1.0.5.
|
||||
`pylru`_ Python LRU cache package. I'm using 1.0.9.
|
||||
|
||||
@ -13,6 +13,7 @@ import asyncio
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
import traceback
|
||||
from functools import partial
|
||||
|
||||
@ -28,9 +29,12 @@ SUPPRESS_MESSAGES = [
|
||||
|
||||
def main_loop():
|
||||
'''Start the server.'''
|
||||
if sys.version_info < (3, 5, 3):
|
||||
raise RuntimeError('Python >= 3.5.3 is required to run ElectrumX')
|
||||
|
||||
if os.geteuid() == 0:
|
||||
raise Exception('DO NOT RUN AS ROOT! Create an unpriveleged user '
|
||||
'account and use that')
|
||||
raise RuntimeError('DO NOT RUN AS ROOT! Create an unpriveleged user '
|
||||
'account and use that')
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
# loop.set_debug(True)
|
||||
|
||||
@ -289,8 +289,7 @@ class Controller(util.LoggedClass):
|
||||
if env.tcp_port is not None:
|
||||
await self.start_server('TCP', env.host, env.tcp_port)
|
||||
if env.ssl_port is not None:
|
||||
# Python 3.5.3: use PROTOCOL_TLS
|
||||
sslc = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
||||
sslc = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
sslc.load_cert_chain(env.ssl_certfile, keyfile=env.ssl_keyfile)
|
||||
await self.start_server('SSL', env.host, env.ssl_port, ssl=sslc)
|
||||
|
||||
|
||||
@ -51,8 +51,7 @@ class Env(LoggedClass):
|
||||
# Peer discovery
|
||||
self.peer_discovery = bool(self.default('PEER_DISCOVERY', True))
|
||||
self.peer_announce = bool(self.default('PEER_ANNOUNCE', True))
|
||||
# Python 3.5.3 - revert back to localhost?
|
||||
self.tor_proxy_host = self.default('TOR_PROXY_HOST', '127.0.0.1')
|
||||
self.tor_proxy_host = self.default('TOR_PROXY_HOST', 'localhost')
|
||||
self.tor_proxy_port = self.integer('TOR_PROXY_PORT', None)
|
||||
# The electrum client takes the empty string as unspecified
|
||||
self.donation_address = self.default('DONATION_ADDRESS', '')
|
||||
|
||||
@ -475,8 +475,7 @@ class PeerManager(util.LoggedClass):
|
||||
def retry_peer(self, peer, port_pairs):
|
||||
peer.last_try = time.time()
|
||||
kind, port = port_pairs[0]
|
||||
# Python 3.5.3: use PROTOCOL_TLS
|
||||
sslc = ssl.SSLContext(ssl.PROTOCOL_SSLv23) if kind == 'SSL' else None
|
||||
sslc = ssl.SSLContext(ssl.PROTOCOL_TLS) if kind == 'SSL' else None
|
||||
|
||||
if peer.is_tor:
|
||||
create_connection = self.tor_proxy.create_connection
|
||||
|
||||
2
setup.py
2
setup.py
@ -6,7 +6,7 @@ setuptools.setup(
|
||||
name='electrumx',
|
||||
version=VERSION.split()[-1],
|
||||
scripts=['electrumx_server.py', 'electrumx_rpc.py'],
|
||||
python_requires='>=3.5',
|
||||
python_requires='>=3.5.3',
|
||||
# "irc" package is only required if IRC connectivity is enabled
|
||||
# via environment variables, in which case I've tested with 15.0.4
|
||||
# "x11_hash" package (1.4) is required to sync DASH network.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user