From 23ecbc8ebefd655cc789d00ef4a89290507f7db9 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 8 Apr 2022 10:53:25 -0400 Subject: [PATCH 1/5] set the default per character fee for claims to zero --- lbry/wallet/ledger.py | 2 +- lbry/wallet/orchstr8/node.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index 57e3ab0db..2ecd81bd5 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -106,7 +106,7 @@ class Ledger(metaclass=LedgerRegistry): target_timespan = 150 default_fee_per_byte = 50 - default_fee_per_name_char = 200000 + default_fee_per_name_char = 0 checkpoints = HASHES diff --git a/lbry/wallet/orchstr8/node.py b/lbry/wallet/orchstr8/node.py index 640a74cfb..9606c0a37 100644 --- a/lbry/wallet/orchstr8/node.py +++ b/lbry/wallet/orchstr8/node.py @@ -189,6 +189,7 @@ class WalletNode: 'known_hubs': config.known_hubs if config else KnownHubsList(), 'hub_timeout': 30, 'concurrent_hub_requests': 32, + 'fee_per_name_char': 200000 } }, 'wallets': [wallet_file_name] From a3d9d5bce796604bb031d4567432ae9a65c51983 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 8 Apr 2022 11:05:45 -0400 Subject: [PATCH 2/5] fix transaction unit test --- tests/unit/wallet/test_transaction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/wallet/test_transaction.py b/tests/unit/wallet/test_transaction.py index 509c09ba7..b12acc645 100644 --- a/tests/unit/wallet/test_transaction.py +++ b/tests/unit/wallet/test_transaction.py @@ -42,7 +42,8 @@ class TestSizeAndFeeEstimation(AsyncioTestCase): async def asyncSetUp(self): self.ledger = Ledger({ 'db': Database(':memory:'), - 'headers': Headers(':memory:') + 'headers': Headers(':memory:'), + 'fee_per_name_char': 200_000 }) await self.ledger.db.open() From fba7fc7aba25ad4deec9b49148f7d7e9ff6bd0b1 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 8 Apr 2022 12:53:19 -0400 Subject: [PATCH 3/5] fix scribe server version test --- tests/integration/blockchain/test_wallet_server_sessions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/blockchain/test_wallet_server_sessions.py b/tests/integration/blockchain/test_wallet_server_sessions.py index 70e2535d9..176db4494 100644 --- a/tests/integration/blockchain/test_wallet_server_sessions.py +++ b/tests/integration/blockchain/test_wallet_server_sessions.py @@ -1,6 +1,7 @@ import asyncio import scribe +from scribe.hub import HUB_PROTOCOL_VERSION from scribe.hub.session import LBRYElectrumX from lbry.error import ServerPaymentFeeAboveMaxAllowedError @@ -34,7 +35,7 @@ class TestSessions(IntegrationTestCase): async def test_proper_version(self): info = await self.ledger.network.get_server_features() - self.assertEqual(scribe.__version__, info['server_version']) + self.assertEqual(HUB_PROTOCOL_VERSION, info['server_version']) async def test_client_errors(self): # Goal is ensuring thsoe are raised and not trapped accidentally From 9279865078c9f29414f4dffdd048f6aaa60c5605 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 8 Apr 2022 12:59:25 -0400 Subject: [PATCH 4/5] add sleep to transaction show test per jack suggestion --- tests/integration/transactions/test_transaction_commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/transactions/test_transaction_commands.py b/tests/integration/transactions/test_transaction_commands.py index 8252d4bb1..4b478af04 100644 --- a/tests/integration/transactions/test_transaction_commands.py +++ b/tests/integration/transactions/test_transaction_commands.py @@ -1,3 +1,4 @@ +import asyncio import unittest from lbry.testcase import CommandTestCase @@ -28,6 +29,7 @@ class TransactionCommandsTestCase(CommandTestCase): # someone's tx change_address = await self.blockchain.get_raw_change_address() sendtxid = await self.blockchain.send_to_address(change_address, 10) + await asyncio.sleep(0.2) tx = await self.daemon.jsonrpc_transaction_show(sendtxid) self.assertEqual(tx.id, sendtxid) self.assertEqual(tx.height, -1) From 63cef81015707c883b7e6f836d51935272225dad Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 8 Apr 2022 13:22:51 -0400 Subject: [PATCH 5/5] fix scribe server version test --- tests/integration/blockchain/test_network.py | 7 ++++--- .../integration/blockchain/test_wallet_server_sessions.py | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/blockchain/test_network.py b/tests/integration/blockchain/test_network.py index 0b9fcac68..230110596 100644 --- a/tests/integration/blockchain/test_network.py +++ b/tests/integration/blockchain/test_network.py @@ -3,9 +3,10 @@ import scribe from unittest.mock import Mock -from scribe.blockchain.network import LBCRegTest +from scribe.hub import HUB_PROTOCOL_VERSION from scribe.hub.udp import StatusServer from scribe.hub.session import LBRYElectrumX +from scribe.blockchain.network import LBCRegTest from lbry.wallet.network import Network from lbry.wallet.orchstr8 import Conductor @@ -35,7 +36,7 @@ class NetworkTests(IntegrationTestCase): 'payment_address': '', 'donation_address': '', 'daily_fee': '0', - 'server_version': scribe.__version__, + 'server_version': HUB_PROTOCOL_VERSION, 'trending_algorithm': 'fast_ar', }, await self.ledger.network.get_server_features()) # await self.conductor.spv_node.stop() @@ -65,7 +66,7 @@ class NetworkTests(IntegrationTestCase): 'payment_address': payment_address, 'donation_address': donation_address, 'daily_fee': '42', - 'server_version': scribe.__version__, + 'server_version': HUB_PROTOCOL_VERSION, 'trending_algorithm': 'fast_ar', }, await self.ledger.network.get_server_features()) diff --git a/tests/integration/blockchain/test_wallet_server_sessions.py b/tests/integration/blockchain/test_wallet_server_sessions.py index 176db4494..d09c398f7 100644 --- a/tests/integration/blockchain/test_wallet_server_sessions.py +++ b/tests/integration/blockchain/test_wallet_server_sessions.py @@ -1,6 +1,5 @@ import asyncio -import scribe from scribe.hub import HUB_PROTOCOL_VERSION from scribe.hub.session import LBRYElectrumX