rename repo to lbry-hub and module to hub

This commit is contained in:
Jack Robison 2022-05-18 10:50:20 -04:00
parent 0eeab397cf
commit 27e09d7aa7
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
89 changed files with 160 additions and 160 deletions

View file

@ -2,7 +2,7 @@ import sys
import os
import re
import logging
import scribe.build_info as build_info_mod
import hub.build_info as build_info_mod
log = logging.getLogger()
log.addHandler(logging.StreamHandler())

View file

@ -0,0 +1 @@
from hub.blockchain.network import LBCTestNet, LBCRegTest, LBCMainNet

View file

@ -2,9 +2,9 @@ import os
import logging
import traceback
import argparse
from scribe.common import setup_logging
from scribe.blockchain.env import BlockchainEnv
from scribe.blockchain.service import BlockchainProcessorService
from hub.common import setup_logging
from hub.blockchain.env import BlockchainEnv
from hub.blockchain.service import BlockchainProcessorService
def main():

View file

@ -7,8 +7,8 @@ from functools import wraps
import aiohttp
from prometheus_client import Gauge, Histogram
from scribe import PROMETHEUS_NAMESPACE
from scribe.common import LRUCacheWithMetrics, RPCError, DaemonError, WarmingUpError, WorkQueueFullError
from hub import PROMETHEUS_NAMESPACE
from hub.common import LRUCacheWithMetrics, RPCError, DaemonError, WarmingUpError, WorkQueueFullError
log = logging.getLogger(__name__)

View file

@ -1,4 +1,4 @@
from scribe.env import Env
from hub.env import Env
class BlockchainEnv(Env):

View file

@ -2,10 +2,10 @@ import itertools
import attr
import typing
from collections import defaultdict
from scribe.blockchain.transaction.deserializer import Deserializer
from hub.blockchain.transaction.deserializer import Deserializer
if typing.TYPE_CHECKING:
from scribe.db import HubDB
from hub.db import HubDB
@attr.s(slots=True)

View file

@ -4,12 +4,12 @@ import typing
from typing import List
from hashlib import sha256
from decimal import Decimal
from scribe.schema.base58 import Base58
from scribe.schema.bip32 import PublicKey
from scribe.common import hash160, hash_to_hex_str, double_sha256
from scribe.blockchain.transaction import TxOutput, TxInput, Block
from scribe.blockchain.transaction.deserializer import Deserializer
from scribe.blockchain.transaction.script import OpCodes, P2PKH_script, P2SH_script, txo_script_parser
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
HASHX_LEN = 11

View file

@ -2,8 +2,8 @@ import asyncio
import logging
import typing
if typing.TYPE_CHECKING:
from scribe.blockchain.network import LBCMainNet
from scribe.blockchain.daemon import LBCDaemon
from hub.blockchain.network import LBCMainNet
from hub.blockchain.daemon import LBCDaemon
def chunks(items, size):

View file

@ -7,20 +7,20 @@ from typing import Optional, List, Tuple, Set, DefaultDict, Dict
from prometheus_client import Gauge, Histogram
from collections import defaultdict
from scribe import PROMETHEUS_NAMESPACE
from scribe.db.prefixes import ACTIVATED_SUPPORT_TXO_TYPE, ACTIVATED_CLAIM_TXO_TYPE
from scribe.db.prefixes import PendingActivationKey, PendingActivationValue, ClaimToTXOValue
from scribe.error.base import ChainError
from scribe.common import hash_to_hex_str, hash160, RPCError, HISTOGRAM_BUCKETS, StagedClaimtrieItem, sha256, LRUCache
from scribe.blockchain.daemon import LBCDaemon
from scribe.blockchain.transaction import Tx, TxOutput, TxInput, Block
from scribe.blockchain.prefetcher import Prefetcher
from scribe.blockchain.mempool import MemPool
from scribe.schema.url import normalize_name
from scribe.service import BlockchainService
from hub import PROMETHEUS_NAMESPACE
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.schema.url import normalize_name
from hub.service import BlockchainService
if typing.TYPE_CHECKING:
from scribe.blockchain.env import BlockchainEnv
from scribe.db.revertable import RevertableOpStack
from hub.blockchain.env import BlockchainEnv
from hub.db.revertable import RevertableOpStack
NAMESPACE = f"{PROMETHEUS_NAMESPACE}_writer"
@ -1725,9 +1725,9 @@ class BlockchainProcessorService(BlockchainService):
def _iter_start_tasks(self):
while self.db.db_version < max(self.db.DB_VERSIONS):
if self.db.db_version == 7:
from scribe.db.migrators.migrate7to8 import migrate, FROM_VERSION, TO_VERSION
from hub.db.migrators.migrate7to8 import migrate, FROM_VERSION, TO_VERSION
elif self.db.db_version == 8:
from scribe.db.migrators.migrate8to9 import migrate, FROM_VERSION, TO_VERSION
from hub.db.migrators.migrate8to9 import migrate, FROM_VERSION, TO_VERSION
self.db._index_address_status = self.env.index_address_status
else:
raise RuntimeError("unknown db version")

View file

@ -3,8 +3,8 @@ import functools
import typing
from dataclasses import dataclass
from struct import Struct
from scribe.schema.claim import Claim
from scribe.common import double_sha256
from hub.schema.claim import Claim
from hub.common import double_sha256
if (sys.version_info.major, sys.version_info.minor) > (3, 7):
cachedproperty = functools.cached_property

View file

@ -1,9 +1,9 @@
from scribe.common import double_sha256
from scribe.blockchain.transaction import (
from hub.common import double_sha256
from hub.blockchain.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 scribe.blockchain.transaction.script import txo_script_parser
from hub.blockchain.transaction.script import txo_script_parser
class Deserializer:

View file

@ -1,6 +1,6 @@
import typing
from scribe.blockchain.transaction import NameClaim, ClaimUpdate, ClaimSupport
from scribe.blockchain.transaction import unpack_le_uint16_from, unpack_le_uint32_from, pack_le_uint16, pack_le_uint32
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
class _OpCodes(typing.NamedTuple):

View file

@ -1,7 +1,7 @@
import typing
import enum
from typing import Optional
from scribe.error import ResolveCensoredError
from hub.error import ResolveCensoredError
@enum.unique

View file

@ -12,19 +12,19 @@ from functools import partial
from bisect import bisect_right
from collections import defaultdict
from concurrent.futures.thread import ThreadPoolExecutor
from scribe import PROMETHEUS_NAMESPACE
from scribe.error import ResolveCensoredError
from scribe.schema.url import URL, normalize_name
from scribe.schema.claim import guess_stream_type
from scribe.schema.result import Censor
from scribe.blockchain.transaction import TxInput
from scribe.common import hash_to_hex_str, hash160, LRUCacheWithMetrics, sha256
from scribe.db.merkle import Merkle, MerkleCache, FastMerkleCacheItem
from scribe.db.common import ResolveResult, STREAM_TYPES, CLAIM_TYPES, ExpandedResolveResult, DBError, UTXO
from scribe.db.prefixes import PendingActivationValue, ClaimTakeoverValue, ClaimToTXOValue, PrefixDB
from scribe.db.prefixes import ACTIVATED_CLAIM_TXO_TYPE, ACTIVATED_SUPPORT_TXO_TYPE, EffectiveAmountKey
from scribe.db.prefixes import PendingActivationKey, TXOToClaimValue, DBStatePrefixRow, MempoolTXPrefixRow
from scribe.db.prefixes import HashXMempoolStatusPrefixRow
from hub import PROMETHEUS_NAMESPACE
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.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
from hub.db.prefixes import PendingActivationValue, ClaimTakeoverValue, ClaimToTXOValue, PrefixDB
from hub.db.prefixes import ACTIVATED_CLAIM_TXO_TYPE, ACTIVATED_SUPPORT_TXO_TYPE, EffectiveAmountKey
from hub.db.prefixes import PendingActivationKey, TXOToClaimValue, DBStatePrefixRow, MempoolTXPrefixRow
from hub.db.prefixes import HashXMempoolStatusPrefixRow
TXO_STRUCT = struct.Struct(b'>LH')

View file

@ -2,8 +2,8 @@ import struct
import typing
import rocksdb
from typing import Optional
from scribe.db.common import DB_PREFIXES, COLUMN_SETTINGS
from scribe.db.revertable import RevertableOpStack, RevertablePut, RevertableDelete
from hub.db.common import DB_PREFIXES, COLUMN_SETTINGS
from hub.db.revertable import RevertableOpStack, RevertablePut, RevertableDelete
ROW_TYPES = {}

View file

@ -29,7 +29,7 @@ import typing
from asyncio import Event
from math import ceil, log
from scribe.common import double_sha256
from hub.common import double_sha256
class Merkle:

View file

@ -3,9 +3,9 @@ import time
import array
import typing
from bisect import bisect_right
from scribe.common import sha256
from hub.common import sha256
if typing.TYPE_CHECKING:
from scribe.db.db import HubDB
from hub.db.db import HubDB
FROM_VERSION = 7
TO_VERSION = 8

View file

@ -3,9 +3,9 @@ import struct
import array
import base64
from typing import Union, Tuple, NamedTuple, Optional
from scribe.db.common import DB_PREFIXES
from scribe.db.interface import BasePrefixDB, ROW_TYPES, PrefixRow
from scribe.schema.url import normalize_name
from hub.db.common import DB_PREFIXES
from hub.db.interface import BasePrefixDB, ROW_TYPES, PrefixRow
from hub.schema.url import normalize_name
ACTIVATED_CLAIM_TXO_TYPE = 1
ACTIVATED_SUPPORT_TXO_TYPE = 2

View file

@ -3,7 +3,7 @@ import logging
from string import printable
from collections import defaultdict
from typing import Tuple, Iterable, Callable, Optional, List
from scribe.db.common import DB_PREFIXES
from hub.db.common import DB_PREFIXES
_OP_STRUCT = struct.Struct('>BLL')
log = logging.getLogger(__name__)
@ -58,7 +58,7 @@ class RevertableOp:
return str(self)
def __str__(self) -> str:
from scribe.db.prefixes import auto_decode_item
from hub.db.prefixes import auto_decode_item
k, v = auto_decode_item(self.key, self.value)
key = ''.join(c if c in printable else '.' for c in str(k))
val = ''.join(c if c in printable else '.' for c in str(v))

View file

@ -0,0 +1,2 @@
from hub.elasticsearch.search import SearchIndex
from hub.elasticsearch.notifier_protocol import ElasticNotifierClientProtocol

View file

@ -2,9 +2,9 @@ import os
import logging
import traceback
import argparse
from scribe.common import setup_logging
from scribe.elasticsearch.env import ElasticEnv
from scribe.elasticsearch.service import ElasticSyncService
from hub.common import setup_logging
from hub.elasticsearch.env import ElasticEnv
from hub.elasticsearch.service import ElasticSyncService
def main():

View file

@ -1,4 +1,4 @@
from scribe.env import Env
from hub.env import Env
class ElasticEnv(Env):

View file

@ -8,16 +8,16 @@ from operator import itemgetter
from typing import Optional, List, Iterable, TYPE_CHECKING
from elasticsearch import AsyncElasticsearch, NotFoundError, ConnectionError
from scribe.schema.result import Censor, Outputs
from scribe.schema.tags import clean_tags
from scribe.schema.url import normalize_name
from scribe.error import TooManyClaimSearchParametersError
from scribe.common import LRUCache
from scribe.db.common import CLAIM_TYPES, STREAM_TYPES
from scribe.elasticsearch.constants import INDEX_DEFAULT_SETTINGS, REPLACEMENTS, FIELDS, TEXT_FIELDS, RANGE_FIELDS
from scribe.db.common import ResolveResult
from hub.schema.result import Censor, Outputs
from hub.schema.tags import clean_tags
from hub.schema.url import normalize_name
from hub.error import TooManyClaimSearchParametersError
from hub.common import LRUCache
from hub.db.common import CLAIM_TYPES, STREAM_TYPES
from hub.elasticsearch.constants import INDEX_DEFAULT_SETTINGS, REPLACEMENTS, FIELDS, TEXT_FIELDS, RANGE_FIELDS
from hub.db.common import ResolveResult
if TYPE_CHECKING:
from scribe.db import HubDB
from hub.db import HubDB
class ChannelResolution(str):

View file

@ -5,16 +5,16 @@ import asyncio
from collections import defaultdict
from elasticsearch import AsyncElasticsearch, NotFoundError
from elasticsearch.helpers import async_streaming_bulk
from scribe.schema.result import Censor
from scribe.service import BlockchainReaderService
from scribe.db.revertable import RevertableOp
from scribe.db.common import TrendingNotification, DB_PREFIXES
from scribe.elasticsearch.notifier_protocol import ElasticNotifierProtocol
from scribe.elasticsearch.search import IndexVersionMismatch, expand_query
from scribe.elasticsearch.constants import ALL_FIELDS, INDEX_DEFAULT_SETTINGS
from scribe.elasticsearch.fast_ar_trending import FAST_AR_TRENDING_SCRIPT
from hub.schema.result import Censor
from hub.service import BlockchainReaderService
from hub.db.revertable import RevertableOp
from hub.db.common import TrendingNotification, DB_PREFIXES
from hub.elasticsearch.notifier_protocol import ElasticNotifierProtocol
from hub.elasticsearch.search import IndexVersionMismatch, expand_query
from hub.elasticsearch.constants import ALL_FIELDS, INDEX_DEFAULT_SETTINGS
from hub.elasticsearch.fast_ar_trending import FAST_AR_TRENDING_SCRIPT
if typing.TYPE_CHECKING:
from scribe.elasticsearch.env import ElasticEnv
from hub.elasticsearch.env import ElasticEnv
class ElasticSyncService(BlockchainReaderService):

View file

@ -3,7 +3,7 @@ import re
import resource
import logging
from collections import namedtuple
from scribe.blockchain.network import LBCMainNet, LBCTestNet, LBCRegTest
from hub.blockchain.network import LBCMainNet, LBCTestNet, LBCRegTest
NetIdentity = namedtuple('NetIdentity', 'host tcp_port ssl_port nick_suffix')

View file

@ -2,9 +2,9 @@ import os
import logging
import traceback
import argparse
from scribe.common import setup_logging
from scribe.hub.env import ServerEnv
from scribe.hub.service import HubServerService
from hub.common import setup_logging
from hub.hub.env import ServerEnv
from hub.hub.service import HubServerService
def main():

View file

@ -1,7 +1,7 @@
import inspect
from collections import namedtuple
from functools import lru_cache
from scribe.common import CodeMessageError
from hub.common import CodeMessageError
SignatureInfo = namedtuple('SignatureInfo', 'min_args max_args '

View file

@ -1,5 +1,5 @@
import re
from scribe.env import Env
from hub.env import Env
class ServerEnv(Env):

View file

@ -6,8 +6,8 @@ import asyncio
from asyncio import Event
from functools import partial
from numbers import Number
from scribe.common import RPCError, CodeMessageError
from scribe.hub.common import Notification, Request, Response, Batch, ProtocolError
from hub.common import RPCError, CodeMessageError
from hub.hub.common import Notification, Request, Response, Batch, ProtocolError
class JSONRPC:

View file

@ -6,14 +6,14 @@ import logging
from collections import defaultdict
from prometheus_client import Histogram, Gauge
import rocksdb.errors
from scribe import PROMETHEUS_NAMESPACE
from scribe.common import HISTOGRAM_BUCKETS
from scribe.db.common import UTXO
from scribe.blockchain.transaction.deserializer import Deserializer
from hub import PROMETHEUS_NAMESPACE
from hub.common import HISTOGRAM_BUCKETS
from hub.db.common import UTXO
from hub.blockchain.transaction.deserializer import Deserializer
if typing.TYPE_CHECKING:
from scribe.hub.session import SessionManager
from scribe.db import HubDB
from hub.hub.session import SessionManager
from hub.db import HubDB
@attr.s(slots=True)

View file

@ -1,14 +1,14 @@
import time
import typing
import asyncio
from scribe.blockchain.daemon import LBCDaemon
from scribe.hub.session import SessionManager
from scribe.hub.mempool import HubMemPool
from scribe.hub.udp import StatusServer
from scribe.service import BlockchainReaderService
from scribe.elasticsearch import ElasticNotifierClientProtocol
from hub.blockchain.daemon import LBCDaemon
from hub.hub.session import SessionManager
from hub.hub.mempool import HubMemPool
from hub.hub.udp import StatusServer
from hub.service import BlockchainReaderService
from hub.elasticsearch import ElasticNotifierClientProtocol
if typing.TYPE_CHECKING:
from scribe.hub.env import ServerEnv
from hub.hub.env import ServerEnv
class HubServerService(BlockchainReaderService):

View file

@ -15,22 +15,22 @@ from contextlib import suppress
from functools import partial
from elasticsearch import ConnectionTimeout
from prometheus_client import Counter, Info, Histogram, Gauge
from scribe.schema.result import Outputs
from scribe.error import ResolveCensoredError, TooManyClaimSearchParametersError
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
from scribe.common import protocol_version, RPCError, DaemonError, TaskGroup, HISTOGRAM_BUCKETS
from scribe.hub.jsonrpc import JSONRPCAutoDetect, JSONRPCConnection, JSONRPCv2, JSONRPC
from scribe.hub.common import BatchRequest, ProtocolError, Request, Batch, Notification
from scribe.hub.framer import NewlineFramer
from hub.schema.result import Outputs
from hub.error import ResolveCensoredError, TooManyClaimSearchParametersError
from hub import __version__, PROMETHEUS_NAMESPACE
from hub.hub import PROTOCOL_MIN, PROTOCOL_MAX, HUB_PROTOCOL_VERSION
from hub.build_info import BUILD, COMMIT_HASH, DOCKER_TAG
from hub.elasticsearch import SearchIndex
from hub.common import sha256, hash_to_hex_str, hex_str_to_hash, HASHX_LEN, version_string, formatted_time
from hub.common import protocol_version, RPCError, DaemonError, TaskGroup, HISTOGRAM_BUCKETS
from hub.hub.jsonrpc import JSONRPCAutoDetect, JSONRPCConnection, JSONRPCv2, JSONRPC
from hub.hub.common import BatchRequest, ProtocolError, Request, Batch, Notification
from hub.hub.framer import NewlineFramer
if typing.TYPE_CHECKING:
from scribe.db import HubDB
from scribe.hub.env import ServerEnv
from scribe.blockchain.daemon import LBCDaemon
from scribe.hub.mempool import HubMemPool
from hub.db import HubDB
from hub.hub.env import ServerEnv
from hub.blockchain.daemon import LBCDaemon
from hub.hub.mempool import HubMemPool
BAD_REQUEST = 1
DAEMON_ERROR = 2

View file

@ -3,8 +3,8 @@ import struct
from time import perf_counter
import logging
from typing import Optional, Tuple, NamedTuple
from scribe.schema.attrs import country_str_to_int, country_int_to_str
from scribe.common import LRUCache, is_valid_public_ipv4
from hub.schema.attrs import country_str_to_int, country_int_to_str
from hub.common import LRUCache, is_valid_public_ipv4
log = logging.getLogger(__name__)

View file

@ -7,13 +7,13 @@ from string import ascii_letters
from decimal import Decimal, ROUND_UP
from google.protobuf.json_format import MessageToDict
from scribe.schema.base58 import Base58, b58_encode
from scribe.error import MissingPublishedFileError, EmptyPublishedFileError
from hub.schema.base58 import Base58, b58_encode
from hub.error import MissingPublishedFileError, EmptyPublishedFileError
from scribe.schema.mime_types import guess_media_type
from scribe.schema.base import Metadata, BaseMessageList
from scribe.schema.tags import normalize_tag
from scribe.schema.types.v2.claim_pb2 import (
from hub.schema.mime_types import guess_media_type
from hub.schema.base import Metadata, BaseMessageList
from hub.schema.tags import normalize_tag
from hub.schema.types.v2.claim_pb2 import (
Fee as FeeMessage,
Location as LocationMessage,
Language as LanguageMessage

View file

@ -8,7 +8,7 @@ from coincurve.utils import (
pem_to_der, lib as libsecp256k1, ffi as libsecp256k1_ffi
)
from coincurve.ecdsa import CDATA_SIG_LENGTH
from scribe.schema.base58 import Base58
from hub.schema.base58 import Base58
if (sys.version_info.major, sys.version_info.minor) > (3, 7):

View file

@ -11,15 +11,15 @@ from hachoir.core.log import log as hachoir_log
from hachoir.parser import createParser as binary_file_parser
from hachoir.metadata import extractMetadata as binary_file_metadata
from scribe.schema import compat
from scribe.schema.base import Signable
from scribe.schema.mime_types import guess_media_type, guess_stream_type
from scribe.schema.attrs import (
from hub.schema import compat
from hub.schema.base import Signable
from hub.schema.mime_types import guess_media_type, guess_stream_type
from hub.schema.attrs import (
Source, Playable, Dimmensional, Fee, Image, Video, Audio,
LanguageList, LocationList, ClaimList, ClaimReference, TagList
)
from scribe.schema.types.v2.claim_pb2 import Claim as ClaimMessage
from scribe.error import InputValueIsNoneError
from hub.schema.types.v2.claim_pb2 import Claim as ClaimMessage
from hub.error import InputValueIsNoneError
hachoir_log.use_print = False

View file

@ -3,9 +3,9 @@ from decimal import Decimal
from google.protobuf.message import DecodeError
from scribe.schema.types.v1.legacy_claim_pb2 import Claim as OldClaimMessage
from scribe.schema.types.v1.certificate_pb2 import KeyType
from scribe.schema.types.v1.fee_pb2 import Fee as FeeMessage
from hub.schema.types.v1.legacy_claim_pb2 import Claim as OldClaimMessage
from hub.schema.types.v1.certificate_pb2 import KeyType
from hub.schema.types.v1.fee_pb2 import Fee as FeeMessage
def from_old_json_schema(claim, payload: bytes):

View file

@ -1,6 +1,6 @@
from google.protobuf.message import DecodeError
from google.protobuf.json_format import MessageToDict
from scribe.schema.types.v2.purchase_pb2 import Purchase as PurchaseMessage
from hub.schema.types.v2.purchase_pb2 import Purchase as PurchaseMessage
from .attrs import ClaimReference

View file

@ -2,11 +2,11 @@ import base64
from typing import List, TYPE_CHECKING, Union, Optional, Dict, Set, Tuple
from itertools import chain
from scribe.error import ResolveCensoredError
from scribe.schema.types.v2.result_pb2 import Outputs as OutputsMessage
from scribe.schema.types.v2.result_pb2 import Error as ErrorMessage
from hub.error import ResolveCensoredError
from hub.schema.types.v2.result_pb2 import Outputs as OutputsMessage
from hub.schema.types.v2.result_pb2 import Error as ErrorMessage
if TYPE_CHECKING:
from scribe.db.common import ResolveResult
from hub.db.common import ResolveResult
INVALID = ErrorMessage.Code.Name(ErrorMessage.INVALID)
NOT_FOUND = ErrorMessage.Code.Name(ErrorMessage.NOT_FOUND)
BLOCKED = ErrorMessage.Code.Name(ErrorMessage.BLOCKED)

View file

@ -1,5 +1,5 @@
from scribe.schema.base import Signable
from scribe.schema.types.v2.support_pb2 import Support as SupportMessage
from hub.schema.base import Signable
from hub.schema.types.v2.support_pb2 import Support as SupportMessage
class Support(Signable):

View file

@ -5,12 +5,12 @@ import signal
from concurrent.futures.thread import ThreadPoolExecutor
from prometheus_client import Gauge, Histogram
from scribe import __version__, PROMETHEUS_NAMESPACE
from scribe.env import Env
from scribe.db import HubDB
from scribe.db.prefixes import DBState
from scribe.common import HISTOGRAM_BUCKETS
from scribe.metrics import PrometheusServer
from hub import __version__, PROMETHEUS_NAMESPACE
from hub.env import Env
from hub.db import HubDB
from hub.db.prefixes import DBState
from hub.common import HISTOGRAM_BUCKETS
from hub.metrics import PrometheusServer
class BlockchainService:

View file

@ -1 +0,0 @@
from scribe.blockchain.network import LBCTestNet, LBCRegTest, LBCMainNet

View file

@ -1,2 +0,0 @@
from scribe.elasticsearch.search import SearchIndex
from scribe.elasticsearch.notifier_protocol import ElasticNotifierClientProtocol

View file

@ -1,5 +1,5 @@
import os
from scribe import __name__, __version__
from hub import __name__, __version__
from setuptools import setup, find_packages
BASE = os.path.dirname(__file__)

View file

@ -8,7 +8,7 @@ from collections import defaultdict
from typing import NamedTuple, List
from lbry.testcase import CommandTestCase
from lbry.wallet.transaction import Transaction, Output
from scribe.schema.compat import OldClaimMessage
from hub.schema.compat import OldClaimMessage
from lbry.crypto.hash import sha256
from lbry.crypto.base58 import Base58

View file

@ -1,8 +1,8 @@
import unittest
import tempfile
import shutil
from scribe.db.revertable import RevertableOpStack, RevertableDelete, RevertablePut, OpStackIntegrity
from scribe.db.prefixes import ClaimToTXOPrefixRow, PrefixDB
from hub.db.revertable import RevertableOpStack, RevertableDelete, RevertablePut, OpStackIntegrity
from hub.db.prefixes import ClaimToTXOPrefixRow, PrefixDB
class TestRevertableOpStack(unittest.TestCase):

View file

@ -20,7 +20,7 @@ from lbry.wallet.util import satoshis_to_coins
from lbry.wallet.dewies import lbc_to_dewies
from lbry.wallet.orchstr8 import Conductor
from lbry.wallet.orchstr8.node import LBCWalletNode, WalletNode, HubNode
from scribe.schema.claim import Claim
from hub.schema.claim import Claim
from lbry.extras.daemon.daemon import Daemon, jsonrpc_dumps_pretty
from lbry.extras.daemon.components import Component, WalletComponent