diff --git a/hub/blockchain/__init__.py b/hub/blockchain/__init__.py deleted file mode 100644 index 32c9bea..0000000 --- a/hub/blockchain/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from hub.blockchain.network import LBCTestNet, LBCRegTest, LBCMainNet diff --git a/hub/db/db.py b/hub/db/db.py index ded2e70..239e591 100644 --- a/hub/db/db.py +++ b/hub/db/db.py @@ -17,7 +17,7 @@ from hub.error import ResolveCensoredError from hub.schema.url import URL, normalize_name from hub.schema.claim import guess_stream_type from hub.schema.result import Censor -from hub.blockchain.transaction import TxInput +from hub.scribe.transaction import TxInput from hub.common import hash_to_hex_str, hash160, LRUCacheWithMetrics, sha256 from hub.db.merkle import Merkle, MerkleCache, FastMerkleCacheItem from hub.db.common import ResolveResult, STREAM_TYPES, CLAIM_TYPES, ExpandedResolveResult, DBError, UTXO diff --git a/hub/env.py b/hub/env.py index 70ddb40..ce18748 100644 --- a/hub/env.py +++ b/hub/env.py @@ -3,7 +3,7 @@ import re import resource import logging from collections import namedtuple -from hub.blockchain.network import LBCMainNet, LBCTestNet, LBCRegTest +from hub.scribe.network import LBCMainNet, LBCTestNet, LBCRegTest NetIdentity = namedtuple('NetIdentity', 'host tcp_port ssl_port nick_suffix') diff --git a/hub/hub/mempool.py b/hub/hub/mempool.py index 1359644..1e57a57 100644 --- a/hub/hub/mempool.py +++ b/hub/hub/mempool.py @@ -9,7 +9,7 @@ import rocksdb.errors from hub import PROMETHEUS_NAMESPACE from hub.common import HISTOGRAM_BUCKETS from hub.db.common import UTXO -from hub.blockchain.transaction.deserializer import Deserializer +from hub.scribe.transaction.deserializer import Deserializer if typing.TYPE_CHECKING: from hub.hub.session import SessionManager diff --git a/hub/hub/service.py b/hub/hub/service.py index 0dfad90..6981ca5 100644 --- a/hub/hub/service.py +++ b/hub/hub/service.py @@ -1,7 +1,7 @@ import time import typing import asyncio -from hub.blockchain.daemon import LBCDaemon +from hub.scribe.daemon import LBCDaemon from hub.hub.session import SessionManager from hub.hub.mempool import HubMemPool from hub.hub.udp import StatusServer diff --git a/hub/hub/session.py b/hub/hub/session.py index f2e54ce..f9c6341 100644 --- a/hub/hub/session.py +++ b/hub/hub/session.py @@ -29,7 +29,7 @@ from hub.hub.framer import NewlineFramer if typing.TYPE_CHECKING: from hub.db import HubDB from hub.hub.env import ServerEnv - from hub.blockchain.daemon import LBCDaemon + from hub.scribe.daemon import LBCDaemon from hub.hub.mempool import HubMemPool BAD_REQUEST = 1 diff --git a/hub/scribe/__init__.py b/hub/scribe/__init__.py new file mode 100644 index 0000000..2ee7962 --- /dev/null +++ b/hub/scribe/__init__.py @@ -0,0 +1 @@ +from hub.scribe.network import LBCTestNet, LBCRegTest, LBCMainNet diff --git a/hub/blockchain/__main__.py b/hub/scribe/__main__.py similarity index 86% rename from hub/blockchain/__main__.py rename to hub/scribe/__main__.py index 6f04bd6..1184b2b 100644 --- a/hub/blockchain/__main__.py +++ b/hub/scribe/__main__.py @@ -3,8 +3,8 @@ import logging import traceback import argparse from hub.common import setup_logging -from hub.blockchain.env import BlockchainEnv -from hub.blockchain.service import BlockchainProcessorService +from hub.scribe.env import BlockchainEnv +from hub.scribe.service import BlockchainProcessorService def main(): diff --git a/hub/blockchain/daemon.py b/hub/scribe/daemon.py similarity index 100% rename from hub/blockchain/daemon.py rename to hub/scribe/daemon.py diff --git a/hub/blockchain/env.py b/hub/scribe/env.py similarity index 100% rename from hub/blockchain/env.py rename to hub/scribe/env.py diff --git a/hub/blockchain/mempool.py b/hub/scribe/mempool.py similarity index 98% rename from hub/blockchain/mempool.py rename to hub/scribe/mempool.py index f516702..9bf6221 100644 --- a/hub/blockchain/mempool.py +++ b/hub/scribe/mempool.py @@ -2,7 +2,7 @@ import itertools import attr import typing from collections import defaultdict -from hub.blockchain.transaction.deserializer import Deserializer +from hub.scribe.transaction.deserializer import Deserializer if typing.TYPE_CHECKING: from hub.db import HubDB diff --git a/hub/blockchain/network.py b/hub/scribe/network.py similarity index 97% rename from hub/blockchain/network.py rename to hub/scribe/network.py index fc794db..851b02b 100644 --- a/hub/blockchain/network.py +++ b/hub/scribe/network.py @@ -7,9 +7,9 @@ from decimal import Decimal from hub.schema.base58 import Base58 from hub.schema.bip32 import PublicKey from hub.common import hash160, hash_to_hex_str, double_sha256 -from hub.blockchain.transaction import TxOutput, TxInput, Block -from hub.blockchain.transaction.deserializer import Deserializer -from hub.blockchain.transaction.script import OpCodes, P2PKH_script, P2SH_script, txo_script_parser +from hub.scribe.transaction import TxOutput, TxInput, Block +from hub.scribe.transaction.deserializer import Deserializer +from hub.scribe.transaction.script import OpCodes, P2PKH_script, P2SH_script, txo_script_parser HASHX_LEN = 11 diff --git a/hub/blockchain/prefetcher.py b/hub/scribe/prefetcher.py similarity index 98% rename from hub/blockchain/prefetcher.py rename to hub/scribe/prefetcher.py index ec569a0..612d1ab 100644 --- a/hub/blockchain/prefetcher.py +++ b/hub/scribe/prefetcher.py @@ -2,8 +2,8 @@ import asyncio import logging import typing if typing.TYPE_CHECKING: - from hub.blockchain.network import LBCMainNet - from hub.blockchain.daemon import LBCDaemon + from hub.scribe.network import LBCMainNet + from hub.scribe.daemon import LBCDaemon def chunks(items, size): diff --git a/hub/blockchain/service.py b/hub/scribe/service.py similarity index 99% rename from hub/blockchain/service.py rename to hub/scribe/service.py index 3a75442..b22451c 100644 --- a/hub/blockchain/service.py +++ b/hub/scribe/service.py @@ -12,14 +12,14 @@ from hub.db.prefixes import ACTIVATED_SUPPORT_TXO_TYPE, ACTIVATED_CLAIM_TXO_TYPE from hub.db.prefixes import PendingActivationKey, PendingActivationValue, ClaimToTXOValue from hub.error.base import ChainError from hub.common import hash_to_hex_str, hash160, RPCError, HISTOGRAM_BUCKETS, StagedClaimtrieItem, sha256, LRUCache -from hub.blockchain.daemon import LBCDaemon -from hub.blockchain.transaction import Tx, TxOutput, TxInput, Block -from hub.blockchain.prefetcher import Prefetcher -from hub.blockchain.mempool import MemPool +from hub.scribe.daemon import LBCDaemon +from hub.scribe.transaction import Tx, TxOutput, TxInput, Block +from hub.scribe.prefetcher import Prefetcher +from hub.scribe.mempool import MemPool from hub.schema.url import normalize_name from hub.service import BlockchainService if typing.TYPE_CHECKING: - from hub.blockchain.env import BlockchainEnv + from hub.scribe.env import BlockchainEnv from hub.db.revertable import RevertableOpStack diff --git a/hub/blockchain/transaction/__init__.py b/hub/scribe/transaction/__init__.py similarity index 100% rename from hub/blockchain/transaction/__init__.py rename to hub/scribe/transaction/__init__.py diff --git a/hub/blockchain/transaction/deserializer.py b/hub/scribe/transaction/deserializer.py similarity index 98% rename from hub/blockchain/transaction/deserializer.py rename to hub/scribe/transaction/deserializer.py index 073f743..7f540cb 100644 --- a/hub/blockchain/transaction/deserializer.py +++ b/hub/scribe/transaction/deserializer.py @@ -1,9 +1,9 @@ from hub.common import double_sha256 -from hub.blockchain.transaction import ( +from hub.scribe.transaction import ( unpack_le_int32_from, unpack_le_int64_from, unpack_le_uint16_from, unpack_le_uint32_from, unpack_le_uint64_from, Tx, TxInput, TxOutput ) -from hub.blockchain.transaction.script import txo_script_parser +from hub.scribe.transaction.script import txo_script_parser class Deserializer: diff --git a/hub/blockchain/transaction/script.py b/hub/scribe/transaction/script.py similarity index 98% rename from hub/blockchain/transaction/script.py rename to hub/scribe/transaction/script.py index 3edd72e..df4a2c4 100644 --- a/hub/blockchain/transaction/script.py +++ b/hub/scribe/transaction/script.py @@ -1,6 +1,6 @@ import typing -from hub.blockchain.transaction import NameClaim, ClaimUpdate, ClaimSupport -from hub.blockchain.transaction import unpack_le_uint16_from, unpack_le_uint32_from, pack_le_uint16, pack_le_uint32 +from hub.scribe.transaction import NameClaim, ClaimUpdate, ClaimSupport +from hub.scribe.transaction import unpack_le_uint16_from, unpack_le_uint32_from, pack_le_uint16, pack_le_uint32 class _OpCodes(typing.NamedTuple):