Prepare 1.6pre1
This commit is contained in:
parent
061cac51a8
commit
362499778a
@ -7,6 +7,12 @@
|
||||
and memory consumption whilst serving clients. Those problems
|
||||
should not occur with Python 3.7.
|
||||
|
||||
Version 1.6
|
||||
===========
|
||||
|
||||
* implement :ref:`version 1.4` of the protocol, with benefit for light
|
||||
clients, particularly mobile
|
||||
|
||||
Version 1.5.2
|
||||
=============
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
VERSION="1.5.2"
|
||||
VERSION="ElectrumX 1.6"
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ provided for the final header - the *prev_hash* links in the headers
|
||||
are sufficient to prove the others valid.
|
||||
|
||||
Using this feature client software only needs to download the headers
|
||||
it is interested in up to the checkpoint. HHeaders after the
|
||||
it is interested in up to the checkpoint. Headers after the
|
||||
checkpoint must all be downloaded and validated as before. The RPC
|
||||
calls return the merkle root, so to embed a checkpoint in a client
|
||||
simply make an RPC request to a couple of trusted servers for the
|
||||
|
||||
@ -1,2 +1,5 @@
|
||||
version = 'ElectrumX 1.6pre1'
|
||||
version_short = version.split()[-1]
|
||||
|
||||
from electrumx.server.controller import Controller
|
||||
from electrumx.server.env import Env
|
||||
|
||||
@ -15,6 +15,7 @@ from struct import pack, unpack
|
||||
import time
|
||||
from functools import partial
|
||||
|
||||
import electrumx
|
||||
from electrumx.server.daemon import DaemonError
|
||||
from electrumx.lib.hash import hash_to_hex_str, HASHX_LEN
|
||||
from electrumx.lib.util import chunks, formatted_time, class_logger
|
||||
@ -216,7 +217,7 @@ class BlockProcessor(electrumx.server.db.DB):
|
||||
self.first_sync = False
|
||||
await self.controller.run_in_executor(self.flush, True)
|
||||
if self.utxo_db.for_sync:
|
||||
self.logger.info(f'{self.controller.VERSION} synced to '
|
||||
self.logger.info(f'{electrumx.version} synced to '
|
||||
f'height {self.height:,d}')
|
||||
self.open_dbs()
|
||||
self.caught_up_event.set()
|
||||
|
||||
@ -20,6 +20,7 @@ from functools import partial
|
||||
import pylru
|
||||
|
||||
from aiorpcx import RPCError, TaskSet, _version as aiorpcx_version
|
||||
import electrumx
|
||||
from electrumx.lib.hash import hash_to_hex_str, hex_str_to_hash
|
||||
from electrumx.lib.hash import HASHX_LEN
|
||||
from electrumx.lib.merkle import Merkle, MerkleCache
|
||||
@ -30,7 +31,6 @@ from electrumx.server.daemon import DaemonError
|
||||
from electrumx.server.mempool import MemPool
|
||||
from electrumx.server.peers import PeerManager
|
||||
from electrumx.server.session import LocalRPC, BAD_REQUEST, DAEMON_ERROR
|
||||
from electrumx.server.version import VERSION
|
||||
|
||||
|
||||
version_string = util.version_string
|
||||
@ -62,7 +62,6 @@ class Controller(ServerBase):
|
||||
PROTOCOL_MIN = '1.1'
|
||||
PROTOCOL_MAX = '1.4'
|
||||
AIORPCX_MIN = (0, 5, 6)
|
||||
VERSION = VERSION
|
||||
|
||||
def __init__(self, env):
|
||||
'''Initialize everything that doesn't require the event loop.'''
|
||||
@ -71,7 +70,7 @@ class Controller(ServerBase):
|
||||
raise RuntimeError('ElectrumX requires aiorpcX >= '
|
||||
f'{version_string(self.AIORPCX_MIN)}')
|
||||
|
||||
self.logger.info(f'software version: {self.VERSION}')
|
||||
self.logger.info(f'software version: {electrumx.version}')
|
||||
self.logger.info(f'aiorpcX version: {version_string(aiorpcx_version)}')
|
||||
self.logger.info(f'supported protocol versions: '
|
||||
f'{self.PROTOCOL_MIN}-{self.PROTOCOL_MAX}')
|
||||
@ -115,17 +114,12 @@ class Controller(ServerBase):
|
||||
# Event triggered when electrumx is listening for incoming requests.
|
||||
self.server_listening = asyncio.Event()
|
||||
|
||||
@classmethod
|
||||
def short_version(cls):
|
||||
'''Return e.g. "1.2" for ElectrumX 1.2'''
|
||||
return cls.VERSION.split()[-1]
|
||||
|
||||
def server_features(self):
|
||||
'''Return the server features dictionary.'''
|
||||
return {
|
||||
'hosts': self.env.hosts_dict(),
|
||||
'pruning': None,
|
||||
'server_version': self.VERSION,
|
||||
'server_version': electrumx.version,
|
||||
'protocol_min': self.PROTOCOL_MIN,
|
||||
'protocol_max': self.PROTOCOL_MAX,
|
||||
'genesis_hash': self.coin.GENESIS_HASH,
|
||||
@ -134,7 +128,7 @@ class Controller(ServerBase):
|
||||
|
||||
def server_version_args(self):
|
||||
'''The arguments to a server.version RPC call to a peer.'''
|
||||
return [self.VERSION, [self.PROTOCOL_MIN, self.PROTOCOL_MAX]]
|
||||
return [electrumx.version, [self.PROTOCOL_MIN, self.PROTOCOL_MAX]]
|
||||
|
||||
def protocol_tuple(self, client_protocol_str):
|
||||
'''Given a client's protocol version string, return the negotiated
|
||||
@ -421,7 +415,7 @@ class Controller(ServerBase):
|
||||
'''A one-line summary of server state.'''
|
||||
group_map = self._group_map()
|
||||
return {
|
||||
'version': VERSION,
|
||||
'version': electrumx.version,
|
||||
'daemon': self.daemon.logged_url(),
|
||||
'daemon_height': self.daemon.cached_height(),
|
||||
'db_height': self.bp.db_height,
|
||||
|
||||
@ -15,6 +15,7 @@ from functools import partial
|
||||
|
||||
from aiorpcx import ServerSession, JSONRPCAutoDetect, RPCError
|
||||
|
||||
import electrumx
|
||||
from electrumx.lib.hash import sha256, hash_to_hex_str
|
||||
import electrumx.lib.util as util
|
||||
from electrumx.server.daemon import DaemonError
|
||||
@ -378,8 +379,8 @@ class ElectrumX(SessionBase):
|
||||
revision //= 100
|
||||
daemon_version = '{:d}.{:d}.{:d}'.format(major, minor, revision)
|
||||
for pair in [
|
||||
('$SERVER_VERSION', self.controller.short_version()),
|
||||
('$SERVER_SUBVERSION', self.controller.VERSION),
|
||||
('$SERVER_VERSION', electrumx.version_short),
|
||||
('$SERVER_SUBVERSION', electrumx.version),
|
||||
('$DAEMON_VERSION', daemon_version),
|
||||
('$DAEMON_SUBVERSION', network_info['subversion']),
|
||||
('$DONATION_ADDRESS', self.env.donation_address),
|
||||
@ -448,7 +449,7 @@ class ElectrumX(SessionBase):
|
||||
|
||||
self.set_protocol_handlers(ptuple)
|
||||
|
||||
return (self.controller.VERSION, self.protocol_version)
|
||||
return (electrumx.version, self.protocol_version)
|
||||
|
||||
async def transaction_broadcast(self, raw_tx):
|
||||
'''Broadcast a raw transaction to the network.
|
||||
|
||||
@ -1 +0,0 @@
|
||||
VERSION = 'ElectrumX 1.5.2'
|
||||
Loading…
Reference in New Issue
Block a user