Closed moodyjon closed 1 year ago
This could also explain test_remove_controlling_support
&test_delay_takeover_with_update_then_update_to_lower_on_takeover
failures, as they use generate(N) a lot.
======================================================================
[480](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:481)
FAIL: test_remove_controlling_support (integration.takeovers.test_resolve_command.ResolveClaimTakeovers)
[481](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:482)
----------------------------------------------------------------------
[482](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:483)
Traceback (most recent call last):
[483](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:484)
File "/home/runner/work/lbry-sdk/lbry-sdk/lbry/testcase.py", line 145, in run
[484](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:485)
self.loop.run_until_complete(maybe_coroutine)
[485](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:486)
File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
[486](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:487)
return future.result()
[487](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:488)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 1436, in test_remove_controlling_support
[488](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:489)
ClaimStateValue(second_claim_id, activation_height=538, active_in_lbrycrd=True)
[489](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:490)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 719, in assertNameState
[490](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:491)
await self.assertMatchClaimIsWinning(name, winning_claim_id)
[491](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:492)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 123, in assertMatchClaimIsWinning
[492](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:493)
await self.assertMatchClaimsForName(name)
[493](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:494)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 166, in assertMatchClaimsForName
[494](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:495)
self.assertMatchESClaim(claim_from_es[0][0], claim)
[495](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:496)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 32, in assertMatchESClaim
[496](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:497)
self.assertEqual(claim_from_es['effective_amount'], claim_from_db.effective_amount, f'ES: {str(claim_from_es)} DB: {str(claim_from_db)}')
[497](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:498)
AssertionError: 0 != 10000000 : ES: {'claim_id': 'd867d65bbaa6cd6d5d63aa518263a6ec3c5c47d5', 'claim_name': 'derp', 'normalized_name': 'derp', 'tx_id': '9e0fa7483203cccc80e8c8c6aa41a2add98806876738381a1e8cdef818905e64', 'tx_num': 532, 'tx_nout': 0, 'amount': 10000000, 'timestamp': 1662391077, 'creation_timestamp': 1662391077, 'height': 528, 'creation_height': 528, 'activation_height': 538, 'expiration_height': 1028, 'effective_amount': 0, 'support_amount': 150000000, 'is_controlling': False, 'last_take_over_height': 207, 'short_url': 'derp#d', 'canonical_url': 'derp#d', 'title': '', 'author': '', 'description': '', 'claim_type': 1, 'has_source': True, 'sd_hash': '73b5dc228f81747e73acb4e37916ad361e47fe5cd52f5647b5c9eb480540d9c68ed4af604cc7618edafb0946a0b2b862', 'stream_type': 5, 'media_type': 'application/octet-stream', 'fee_amount': 0, 'fee_currency': None, 'reposted_claim_id': None, 'reposted_claim_type': None, 'channel_id': None, 'public_key_id': None, 'signature': None, 'tags': [], 'languages': ['none'], 'censor_type': 0, 'censoring_channel_id': None, 'claims_in_channel': None, 'reposted_tx_id': None, 'reposted_tx_position': None, 'reposted_height': None, 'channel_tx_id': None, 'channel_tx_position': None, 'channel_height': None, 'release_time': 1662391077, 'trending_score': 1.4694401309623295, 'claim_hash': b'\xd5G\\<\xec\xa6c\x82Q\xaac]m\xcd\xa6\xba[\xd6g\xd8', 'reposted_claim_hash': None, 'channel_hash': None, 'txo_hash': b'd^\x90\x18\xf8\xde\x8c\x1e\x1a88g\x87\x06\x88\xd9\xad\xa2A\xaa\xc6\xc8\xe8\x80\xcc\xcc\x032H\xa7\x0f\x9e\x00\x00\x00\x00', 'tx_hash': b'd^\x90\x18\xf8\xde\x8c\x1e\x1a88g\x87\x06\x88\xd9\xad\xa2A\xaa\xc6\xc8\xe8\x80\xcc\xcc\x032H\xa7\x0f\x9e', 'reposted': 0, 'signature_valid': False} DB: ResolveResult(name='derp', normalized_name='derp', claim_hash=b'\xd8g\xd6[\xba\xa6\xcdm]c\xaaQ\x82c\xa6\xec<\\G\xd5', tx_num=532, position=0, tx_hash=b'd^\x90\x18\xf8\xde\x8c\x1e\x1a88g\x87\x06\x88\xd9\xad\xa2A\xaa\xc6\xc8\xe8\x80\xcc\xcc\x032H\xa7\x0f\x9e', height=528, amount=10000000, short_url='derp#d', is_controlling=False, canonical_url='derp#d', creation_height=528, activation_height=538, expiration_height=1028, effective_amount=10000000, support_amount=150000000, reposted=0, last_takeover_height=207, claims_in_channel=0, channel_hash=None, reposted_claim_hash=None, signature_valid=None, reposted_tx_hash=None, reposted_tx_position=None, reposted_height=None, channel_tx_hash=None, channel_tx_position=None, channel_height=None)
[498](https://github.com/moodyjon/lbry-sdk/runs/8191563422?check_suite_focus=true#step:11:499)
======================================================================
[690](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:691)
FAIL: test_delay_takeover_with_update_then_update_to_lower_on_takeover (integration.takeovers.test_resolve_command.ResolveClaimTakeovers)
[691](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:692)
----------------------------------------------------------------------
[692](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:693)
Traceback (most recent call last):
[693](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:694)
File "/home/runner/work/lbry-sdk/lbry-sdk/lbry/testcase.py", line 145, in run
[694](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:695)
self.loop.run_until_complete(maybe_coroutine)
[695](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:696)
File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
[696](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:697)
return future.result()
[697](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:698)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 937, in test_delay_takeover_with_update_then_update_to_lower_on_takeover
[698](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:699)
ClaimStateValue(third_claim_id, activation_height=560, active_in_lbrycrd=True)
[699](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:700)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 719, in assertNameState
[700](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:701)
await self.assertMatchClaimIsWinning(name, winning_claim_id)
[701](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:702)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 123, in assertMatchClaimIsWinning
[702](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:703)
await self.assertMatchClaimsForName(name)
[703](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:704)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 166, in assertMatchClaimsForName
[704](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:705)
self.assertMatchESClaim(claim_from_es[0][0], claim)
[705](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:706)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 32, in assertMatchESClaim
[706](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:707)
self.assertEqual(claim_from_es['effective_amount'], claim_from_db.effective_amount, f'ES: {str(claim_from_es)} DB: {str(claim_from_db)}')
[707](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:708)
AssertionError: 0 != 9000000 : ES: {'claim_id': '8065a618c89715137973964d7a510f0872add0cb', 'claim_name': 'derp', 'normalized_name': 'derp', 'tx_id': '8a65f0f1655963b3758f855bcaf91bb7ac1d01bad705cc361ba58c721462d8ba', 'tx_num': 556, 'tx_nout': 0, 'amount': 9000000, 'timestamp': 1662390563, 'creation_timestamp': 1662390559, 'height': 550, 'creation_height': 529, 'activation_height': 560, 'expiration_height': 1050, 'effective_amount': 0, 'support_amount': 0, 'is_controlling': False, 'last_take_over_height': 207, 'short_url': 'derp#8', 'canonical_url': 'derp#8', 'title': '', 'author': '', 'description': '', 'claim_type': 1, 'has_source': True, 'sd_hash': '7bed9a4e8f588927534e7ac05ca1a4bfe7d003ad7aa17f8b820c5b3aab6607bcf76730299034bc0fd2bd0a7ba6dba126', 'stream_type': 5, 'media_type': 'application/octet-stream', 'fee_amount': 0, 'fee_currency': None, 'reposted_claim_id': None, 'reposted_claim_type': None, 'channel_id': None, 'public_key_id': None, 'signature': None, 'tags': [], 'languages': ['none'], 'censor_type': 0, 'censoring_channel_id': None, 'claims_in_channel': None, 'reposted_tx_id': None, 'reposted_tx_position': None, 'reposted_height': None, 'channel_tx_id': None, 'channel_tx_position': None, 'channel_height': None, 'release_time': 1662390559, 'trending_score': 0.7433045085709724, 'claim_hash': b'\xcb\xd0\xadr\x08\x0fQzM\x96sy\x13\x15\x97\xc8\x18\xa6e\x80', 'reposted_claim_hash': None, 'channel_hash': None, 'txo_hash': b'\xba\xd8b\x14r\x8c\xa5\x1b6\xcc\x05\xd7\xba\x01\x1d\xac\xb7\x1b\xf9\xca[\x85\x8fu\xb3cYe\xf1\xf0e\x8a\x00\x00\x00\x00', 'tx_hash': b'\xba\xd8b\x14r\x8c\xa5\x1b6\xcc\x05\xd7\xba\x01\x1d\xac\xb7\x1b\xf9\xca[\x85\x8fu\xb3cYe\xf1\xf0e\x8a', 'reposted': 0, 'signature_valid': False} DB: ResolveResult(name='derp', normalized_name='derp', claim_hash=b'\x80e\xa6\x18\xc8\x97\x15\x13ys\x96MzQ\x0f\x08r\xad\xd0\xcb', tx_num=556, position=0, tx_hash=b'\xba\xd8b\x14r\x8c\xa5\x1b6\xcc\x05\xd7\xba\x01\x1d\xac\xb7\x1b\xf9\xca[\x85\x8fu\xb3cYe\xf1\xf0e\x8a', height=550, amount=9000000, short_url='derp#8', is_controlling=False, canonical_url='derp#8', creation_height=529, activation_height=560, expiration_height=1050, effective_amount=9000000, support_amount=0, reposted=0, last_takeover_height=207, claims_in_channel=0, channel_hash=None, reposted_claim_hash=None, signature_valid=None, reposted_tx_hash=None, reposted_tx_position=None, reposted_height=None, channel_tx_hash=None, channel_tx_position=None, channel_height=None)
[708](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:709)
[709](https://github.com/moodyjon/lbry-sdk/runs/8191561442?check_suite_focus=true#step:11:710)
----------------------------------------------------------------------
I think I've got it captured here with enhanced/customized logging hacked into hub. The issue is that
IntegrationTestCase.generate()
checks that hub (herald + es_sync) is synchronized, but the expected terminalheight
is incorrect. Furthermore, herald_es_height
is not checked though maybe correctingheight
is enough.IntegrationTestCase.generate_and_wait()
calculates expected terminalheight
after callinggenerate()
soblockchain.block_expected
is the correct terminal height.