Require Python 3.6
This commit is contained in:
parent
9303153150
commit
74cb4c2f45
@ -6,8 +6,7 @@ before_install:
|
|||||||
- sudo apt-get -qq update
|
- sudo apt-get -qq update
|
||||||
- sudo apt-get install -yq libleveldb-dev librocksdb libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev
|
- sudo apt-get install -yq libleveldb-dev librocksdb libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev
|
||||||
python:
|
python:
|
||||||
- "3.5"
|
- "3.6"
|
||||||
- "3.6-dev"
|
|
||||||
- "nightly"
|
- "nightly"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install:
|
install:
|
||||||
|
|||||||
35
README.rst
35
README.rst
@ -10,7 +10,7 @@ ElectrumX - Reimplementation of electrum-server
|
|||||||
For a future network with bigger blocks.
|
For a future network with bigger blocks.
|
||||||
|
|
||||||
:Licence: MIT
|
:Licence: MIT
|
||||||
:Language: Python (>= 3.5.3)
|
:Language: Python (>= 3.6)
|
||||||
:Author: Neil Booth
|
:Author: Neil Booth
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
@ -53,35 +53,6 @@ Features
|
|||||||
- Peer discovery protocol removes need for IRC
|
- Peer discovery protocol removes need for IRC
|
||||||
- Coin abstraction makes compatible altcoin and testnet support easy.
|
- Coin abstraction makes compatible altcoin and testnet support easy.
|
||||||
|
|
||||||
Motivation
|
|
||||||
==========
|
|
||||||
|
|
||||||
Mainly for privacy reasons, I have long wanted to run my own Electrum
|
|
||||||
server, but I struggled to set it up or get it to work on my
|
|
||||||
DragonFlyBSD system and lost interest for over a year.
|
|
||||||
|
|
||||||
In September 2016 I heard that electrum-server databases were getting
|
|
||||||
large (35-45GB when gzipped), and it would take several weeks to sync
|
|
||||||
from Genesis (and was sufficiently painful that no one seems to have
|
|
||||||
done it for about a year). This made me curious about improvements
|
|
||||||
and after taking a look at the code I decided to try a different
|
|
||||||
approach.
|
|
||||||
|
|
||||||
I prefer Python3 over Python2, and the fact that Electrum is stuck on
|
|
||||||
Python2 has been frustrating for a while. It's easier to change the
|
|
||||||
server to Python3 than the client, so I decided to write my effort in
|
|
||||||
Python3.
|
|
||||||
|
|
||||||
It also seemed like a good opportunity to learn about asyncio, a
|
|
||||||
wonderful and powerful feature introduced in Python 3.4.
|
|
||||||
Incidentally, asyncio would also make a much better way to implement
|
|
||||||
the Electrum client.
|
|
||||||
|
|
||||||
Finally though no fan of most altcoins I wanted to write a codebase
|
|
||||||
that could easily be reused for those alts that are reasonably
|
|
||||||
compatible with Bitcoin. Such an abstraction is also useful for
|
|
||||||
testnets.
|
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
==============
|
==============
|
||||||
|
|
||||||
@ -122,9 +93,7 @@ and associated complications.
|
|||||||
Roadmap
|
Roadmap
|
||||||
=======
|
=======
|
||||||
|
|
||||||
- Require Python 3.6, which has several performance improvements
|
- offloading more work of wallet synchronization to the client
|
||||||
relevant to ElectrumX
|
|
||||||
- offloading more work to synchronize to the client
|
|
||||||
- supporting better client privacy
|
- supporting better client privacy
|
||||||
- wallet server engine
|
- wallet server engine
|
||||||
- new features such as possibly adding label server functionality
|
- new features such as possibly adding label server functionality
|
||||||
|
|||||||
@ -41,8 +41,8 @@ from server.db import DB
|
|||||||
|
|
||||||
|
|
||||||
def compact_history():
|
def compact_history():
|
||||||
if sys.version_info < (3, 5, 3):
|
if sys.version_info < (3, 6):
|
||||||
raise RuntimeError('Python >= 3.5.3 is required to run ElectrumX')
|
raise RuntimeError('Python >= 3.6 is required to run ElectrumX')
|
||||||
|
|
||||||
environ['DAEMON_URL'] = '' # Avoid Env erroring out
|
environ['DAEMON_URL'] = '' # Avoid Env erroring out
|
||||||
env = Env()
|
env = Env()
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# install electrumx
|
# install electrumx
|
||||||
###################
|
###################
|
||||||
|
|
||||||
# upgrade raspbian to 'stretch' distribution for python 3.5 support
|
# upgrade raspbian to 'stretch' distribution
|
||||||
sudo echo 'deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi' > /etc/apt/sources.list.d/stretch.list
|
sudo echo 'deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi' > /etc/apt/sources.list.d/stretch.list
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get dist-upgrade
|
sudo apt-get dist-upgrade
|
||||||
@ -23,4 +23,3 @@ sudo pip3 install irc
|
|||||||
git clone https://github.com/kyuupichan/electrumx.git
|
git clone https://github.com/kyuupichan/electrumx.git
|
||||||
cd electrumx
|
cd electrumx
|
||||||
sudo python3 setup.py install
|
sudo python3 setup.py install
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ small - pull requests are welcome.
|
|||||||
================ ========================
|
================ ========================
|
||||||
Package Notes
|
Package Notes
|
||||||
================ ========================
|
================ ========================
|
||||||
Python3 ElectrumX uses asyncio. Python version >= 3.5.3 is
|
Python3 ElectrumX uses asyncio. Python version >= 3.6 is
|
||||||
**required**.
|
**required**.
|
||||||
`aiohttp`_ Python library for asynchronous HTTP. Version >=
|
`aiohttp`_ Python library for asynchronous HTTP. Version >=
|
||||||
1.0 required; I am using 1.0.5.
|
1.0 required; I am using 1.0.5.
|
||||||
@ -203,9 +203,9 @@ set TimeoutStopSec to *at least* 10 mins in your `.service` file.
|
|||||||
Installing Python 3.6 under Ubuntu
|
Installing Python 3.6 under Ubuntu
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
Many Ubuntu distributions have an incompatible Python version baked in.
|
Many Ubuntu distributions have an incompatible Python version baked
|
||||||
Because of this, it is easier to install Python 3.6 rather than attempting
|
in. Because of this, it is easier to install Python 3.6. See
|
||||||
to update Python 3.5.2 to 3.5.3. See `contrib/python3.6/python-3.6.sh`_.
|
`contrib/python3.6/python-3.6.sh`_.
|
||||||
|
|
||||||
|
|
||||||
Installing on Raspberry Pi 3
|
Installing on Raspberry Pi 3
|
||||||
|
|||||||
@ -36,7 +36,6 @@ class Controller(ServerBase):
|
|||||||
up with the daemon.
|
up with the daemon.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
PYTHON_MIN_VERSION = (3, 5, 3)
|
|
||||||
BANDS = 5
|
BANDS = 5
|
||||||
CATCHING_UP, LISTENING, PAUSED, SHUTTING_DOWN = range(4)
|
CATCHING_UP, LISTENING, PAUSED, SHUTTING_DOWN = range(4)
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -6,7 +6,7 @@ setuptools.setup(
|
|||||||
name='electrumx',
|
name='electrumx',
|
||||||
version=VERSION.split()[-1],
|
version=VERSION.split()[-1],
|
||||||
scripts=['electrumx_server.py', 'electrumx_rpc.py'],
|
scripts=['electrumx_server.py', 'electrumx_rpc.py'],
|
||||||
python_requires='>=3.5.3',
|
python_requires='>=3.6',
|
||||||
# "irc" package is only required if IRC connectivity is enabled
|
# "irc" package is only required if IRC connectivity is enabled
|
||||||
# via environment variables, in which case I've tested with 15.0.4
|
# via environment variables, in which case I've tested with 15.0.4
|
||||||
# "x11_hash" package (1.4) is required to sync DASH network.
|
# "x11_hash" package (1.4) is required to sync DASH network.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user