diff --git a/scribe/__init__.py b/scribe/__init__.py index 3b5c664..8bcbf03 100644 --- a/scribe/__init__.py +++ b/scribe/__init__.py @@ -1,5 +1,3 @@ -__version__ = "0.107.0" +__version__ = "1.0.0" PROMETHEUS_NAMESPACE = "scribe" -PROTOCOL_MIN = (0, 54, 0) -PROTOCOL_MAX = (0, 199, 0) diff --git a/scribe/hub/__init__.py b/scribe/hub/__init__.py index e69de29..6e22b40 100644 --- a/scribe/hub/__init__.py +++ b/scribe/hub/__init__.py @@ -0,0 +1,3 @@ +HUB_PROTOCOL_VERSION = "0.107.0" +PROTOCOL_MIN = (0, 54, 0) +PROTOCOL_MAX = (0, 199, 0) diff --git a/scribe/hub/session.py b/scribe/hub/session.py index c2fa2a1..1cca881 100644 --- a/scribe/hub/session.py +++ b/scribe/hub/session.py @@ -16,9 +16,9 @@ from functools import partial from elasticsearch import ConnectionTimeout from prometheus_client import Counter, Info, Histogram, Gauge from scribe.schema.result import Outputs -from scribe.schema.base58 import Base58Error from scribe.error import ResolveCensoredError, TooManyClaimSearchParametersError -from scribe import __version__, PROTOCOL_MIN, PROTOCOL_MAX, PROMETHEUS_NAMESPACE +from scribe import __version__, PROMETHEUS_NAMESPACE +from scribe.hub import PROTOCOL_MIN, PROTOCOL_MAX, HUB_PROTOCOL_VERSION from scribe.build_info import BUILD, COMMIT_HASH, DOCKER_TAG from scribe.elasticsearch import SearchIndex from scribe.common import sha256, hash_to_hex_str, hex_str_to_hash, HASHX_LEN, version_string, formatted_time @@ -129,7 +129,7 @@ class SessionManager: "cpu_count": str(os.cpu_count()) }) session_count_metric = Gauge("session_count", "Number of connected client sessions", namespace=NAMESPACE, - labelnames=("version",)) + labelnames=("version",)) request_count_metric = Counter("requests_count", "Number of requests received", namespace=NAMESPACE, labelnames=("method", "version")) tx_request_count_metric = Counter("requested_transaction", "Number of transactions requested", namespace=NAMESPACE) @@ -647,7 +647,7 @@ class LBRYElectrumX(asyncio.Protocol): PROTOCOL_MIN = PROTOCOL_MIN PROTOCOL_MAX = PROTOCOL_MAX max_errors = math.inf # don't disconnect people for errors! let them happen... - version = __version__ + version = HUB_PROTOCOL_VERSION cached_server_features = {} MAX_CHUNK_SIZE = 40960