-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rng reporter hanging #447
Conversation
Codecov Report
@@ Coverage Diff @@
## main #447 +/- ##
===========================================
+ Coverage 27.93% 88.59% +60.65%
===========================================
Files 97 97
Lines 3254 3270 +16
===========================================
+ Hits 909 2897 +1988
+ Misses 2345 373 -1972
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @oraclown, nice fixes and changes. These tests are failing for me and not sure why, are they passing for you? I guess the most relevant one to this pr is the first. Everything looks good to me otherwise.
tests/reporters/test_360reporter.py::test_no_native_token
tests/reporters/test_custom_360_reporter.py::test_submit_once tests/reporters/test_polygon_reporter.py
@@ -170,5 +138,4 @@ async def test_no_native_token(tellor_360, caplog): | |||
|
|||
await reporter.report(report_count=1) | |||
|
|||
expected = f"Account {account.address} has insufficient native token funds".lower() | |||
assert expected in caplog.text.lower() | |||
assert "insufficient native token funds" in caplog.text.lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test is failing here
@akremstudy (env) ➜ telliot-feeds git:(fix-bug-432) pytest tests/reporters/test_360reporter.py::test_no_native_token
====================================================================== test session starts ======================================================================
platform darwin -- Python 3.9.7, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/owen/tellor/telliot-feeds, configfile: pyproject.toml
plugins: eth-brownie-1.19.0, forked-1.4.0, asyncio-0.19.0, web3-5.27.0, dotenv-0.5.2, xdist-1.34.0, hypothesis-6.27.3, cov-3.0.0
asyncio: mode=strict
collected 1 item
Launching 'ganache-cli --port 8545 --gasLimit 12000000 --accounts 10 --hardfork istanbul --mnemonic brownie'...
tests/reporters/test_360reporter.py::test_no_native_token
------------------------------------------------------------------------ live log setup -------------------------------------------------------------------------
INFO telliot_core:versions.py:10 telliot-core 0.1.7dev0
INFO telliot_core:core.py:245 Connected to polygon-mumbai [default account: _test_account], time: 2022-11-22 07:06:10.962066
ERROR telliot_core.contract.contract:response.py:34 Send transaction failed: ValueError({'message': 'VM Exception while processing transaction: revert only owner can set governance address', 'code': -32000, 'data': {'0x86b4e87f698fb1e854652b1b8e569beeaf4e82cfaea232adf7a0c0eaaf924f8b': {'error': 'revert', 'program_counter': 1681, 'return': '0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000256f6e6c79206f776e65722063616e2073657420676f7665726e616e63652061646472657373000000000000000000000000000000000000000000000000000000', 'reason': 'only owner can set governance address'}, 'stack': 'c: VM Exception while processing transaction: revert only owner can set governance address\n at Function.c.fromResults (/Users/owen/.nvm/versions/node/v17.4.0/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:4:192416)\n at w.processBlock (/Users/owen/.nvm/versions/node/v17.4.0/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:42:50915)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)', 'name': 'c'}})
------------------------------------------------------------------------- live log call -------------------------------------------------------------------------
INFO telliot_feeds.reporters.tellorflex:tellorflex.py:79 Reporting with account: 0x3D79****
WARNING telliot_feeds.utils.reporter_utils:reporter_utils.py:88 Insufficient native token funds for 0x3D79****. Balance: 1.00. Expected: 2.00
INFO telliot_feeds.reporters.interval:interval.py:459 Sleeping for 0 seconds
PASSED [100%]
======================================================================= 1 passed in 4.11s =======================================================================
Terminating local RPC client... |
Added init.py file to
Made a separate issue for the other less-related tests #451 |
this one is unrelated: |
This one INFO telliot_feeds.reporters.tellor_360:response.py:34 Unable to read current stake amount
WARNING telliot_feeds.reporters.interval:interval.py:317 Unable to read current stake amount
==================================================================== short test summary info ====================================================================
FAILED tests/reporters/test_custom_360_reporter.py::test_submit_once - AssertionError: assert False |
Summary
Steps Taken to QA Changes
tests/reporters/test_rng_reporter.py::test_missing_blockhash
. This checks to make sure it attempts to report again after a source failure (like the one shown in the linked issue's error logs).Checklist
This pull request is:
<link to issue>
" in this Pull Request's summary section.<link to issue>
" in this Pull Request's summary section.Happy engineering!