diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py index 45d3ba68d..3b8939647 100644 --- a/lbry/extras/daemon/daemon.py +++ b/lbry/extras/daemon/daemon.py @@ -27,7 +27,7 @@ from lbry.wallet import ( ) from lbry.wallet.dewies import dewies_to_lbc, lbc_to_dewies, dict_values_to_lbc from lbry.wallet.constants import TXO_TYPES, CLAIM_TYPE_NAMES -from scribe.bip32 import PrivateKey +from scribe.schema.bip32 import PrivateKey from lbry import utils from lbry.conf import Config, Setting, NOT_SET diff --git a/lbry/extras/daemon/json_response_encoder.py b/lbry/extras/daemon/json_response_encoder.py index 39d896c49..f6cf0242f 100644 --- a/lbry/extras/daemon/json_response_encoder.py +++ b/lbry/extras/daemon/json_response_encoder.py @@ -8,7 +8,7 @@ from google.protobuf.message import DecodeError from scribe.schema.claim import Claim from scribe.schema.support import Support -from scribe.bip32 import PublicKey +from scribe.schema.bip32 import PublicKey from lbry.torrent.torrent_manager import TorrentSource from lbry.wallet import Wallet, Ledger, Account, Transaction, Output from lbry.wallet.dewies import dewies_to_lbc diff --git a/lbry/wallet/account.py b/lbry/wallet/account.py index 0b34f3687..5371d0837 100644 --- a/lbry/wallet/account.py +++ b/lbry/wallet/account.py @@ -12,7 +12,7 @@ from typing import Type, Dict, Tuple, Optional, Any, List from lbry.error import InvalidPasswordError from lbry.crypto.crypt import aes_encrypt, aes_decrypt -from scribe.bip32 import PrivateKey, PublicKey, KeyPath, from_extended_key_string +from scribe.schema.bip32 import PrivateKey, PublicKey, KeyPath, from_extended_key_string from .mnemonic import Mnemonic from .constants import COIN, TXO_TYPES from .transaction import Transaction, Input, Output diff --git a/lbry/wallet/database.py b/lbry/wallet/database.py index 68994b6fb..e7165290c 100644 --- a/lbry/wallet/database.py +++ b/lbry/wallet/database.py @@ -13,7 +13,7 @@ from datetime import date from prometheus_client import Gauge, Counter, Histogram from lbry.utils import LockWithMetrics -from scribe.bip32 import PublicKey +from scribe.schema.bip32 import PublicKey from .transaction import Transaction, Output, OutputScript, TXRefImmutable, Input from .constants import TXO_TYPES, CLAIM_TYPES from .util import date_to_julian_day diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index 2ec260d88..d3443210a 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -26,7 +26,7 @@ from lbry.wallet.transaction import Transaction, Output from lbry.wallet.header import Headers, UnvalidatedHeaders from lbry.wallet.checkpoints import HASHES from lbry.wallet.constants import TXO_TYPES, CLAIM_TYPES, COIN, NULL_HASH32 -from scribe.bip32 import PublicKey, PrivateKey +from scribe.schema.bip32 import PublicKey, PrivateKey from lbry.wallet.coinselection import CoinSelector log = logging.getLogger(__name__) diff --git a/lbry/wallet/orchstr8/node.py b/lbry/wallet/orchstr8/node.py index e15cbd569..c8eb391a1 100644 --- a/lbry/wallet/orchstr8/node.py +++ b/lbry/wallet/orchstr8/node.py @@ -21,8 +21,9 @@ from lbry.conf import KnownHubsList, Config from lbry.wallet.orchstr8 import __hub_url__ from scribe.env import Env -from scribe.reader import BlockchainReaderServer, ElasticWriter -from scribe.blockchain.block_processor import BlockProcessor +from scribe.hub.service import HubServerService +from scribe.elasticsearch.service import ElasticSyncService +from scribe.blockchain.service import BlockchainProcessorService log = logging.getLogger(__name__) @@ -217,9 +218,9 @@ class SPVNode: self.node_number = node_number self.controller = None self.data_path = None - self.server: Optional[BlockchainReaderServer] = None - self.writer: Optional[BlockProcessor] = None - self.es_writer: Optional[ElasticWriter] = None + self.server: Optional[HubServerService] = None + self.writer: Optional[BlockchainProcessorService] = None + self.es_writer: Optional[ElasticSyncService] = None self.hostname = 'localhost' self.port = 50001 + node_number # avoid conflict with default daemon self.udp_port = self.port @@ -254,10 +255,9 @@ class SPVNode: if extraconf: conf.update(extraconf) env = Env(**conf) - self.writer = BlockProcessor(env) - self.server = BlockchainReaderServer(env) - self.es_writer = ElasticWriter(env) - await self.writer.open() + self.writer = BlockchainProcessorService(env) + self.server = HubServerService(env) + self.es_writer = ElasticSyncService(env) await self.writer.start() await self.es_writer.start() await self.server.start() diff --git a/lbry/wallet/transaction.py b/lbry/wallet/transaction.py index 7b30b8203..9ec09bf6d 100644 --- a/lbry/wallet/transaction.py +++ b/lbry/wallet/transaction.py @@ -12,7 +12,7 @@ from scribe.schema.claim import Claim from scribe.schema.base import Signable from scribe.schema.purchase import Purchase from scribe.schema.support import Support -from scribe.bip32 import PrivateKey, PublicKey +from scribe.schema.bip32 import PrivateKey, PublicKey from .script import InputScript, OutputScript from .constants import COIN, DUST, NULL_HASH32 diff --git a/tests/unit/wallet/test_bip32.py b/tests/unit/wallet/test_bip32.py index 53eddec31..c326d272d 100644 --- a/tests/unit/wallet/test_bip32.py +++ b/tests/unit/wallet/test_bip32.py @@ -1,7 +1,7 @@ from binascii import unhexlify, hexlify from lbry.testcase import AsyncioTestCase -from scribe.bip32 import PublicKey, PrivateKey, from_extended_key_string +from scribe.schema.bip32 import PublicKey, PrivateKey, from_extended_key_string from lbry.wallet import Ledger, Database, Headers from tests.unit.wallet.key_fixtures import expected_ids, expected_privkeys, expected_hardened_privkeys diff --git a/tests/unit/wallet/test_schema_signing.py b/tests/unit/wallet/test_schema_signing.py index 1e0892a29..679c89a07 100644 --- a/tests/unit/wallet/test_schema_signing.py +++ b/tests/unit/wallet/test_schema_signing.py @@ -2,7 +2,7 @@ from binascii import unhexlify from lbry.testcase import AsyncioTestCase from lbry.wallet.constants import CENT, NULL_HASH32 -from scribe.bip32 import PrivateKey, KeyPath +from scribe.schema.bip32 import PrivateKey, KeyPath from lbry.wallet.mnemonic import Mnemonic from lbry.wallet import Ledger, Database, Headers, Transaction, Input, Output from scribe.schema.claim import Claim