-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use web3 for gas calculations usage/price #609
Conversation
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 for this @akremstudy ! Lots of great updates. I added a few suggestions as comments. And here's what I found when testing:
Testing manually
- I'm having trouble reporting w/ the following command:
telliot report -a dev-acct-bags -gm 1 -tx 2 -ncr
- It gets stuck printing this over and over:
ERROR | telliot_feeds.reporters.tips.listener.funded_feeds | Error getting supported feeds
ERROR | telliot_feeds.reporters.tips.listener.funded_feeds | Error getting supported feeds
ERROR | telliot_feeds.reporters.tips.listener.funded_feeds | Error getting eligible funded feeds: No funded feeds returned by autopay function call
ERROR | telliot_feeds.reporters.tips.listener.funded_feeds | Error getting eligible funded feeds: No funded feeds returned by autopay function call
INFO | telliot_feeds.reporters.interval | Unable to suggest datafeed
INFO | telliot_feeds.reporters.interval | Sleeping for 7 seconds
- I was able to report using this command:
telliot report -a dev-acct-bags -gm 1 -tx 2 -ncr -rf
, which skips getting the feed from autopay.
INFO | telliot_feeds.reporters.interval | Current query: {"type":"SpotPrice","asset":"bch","currency":"usd"}
WARNING | telliot_feeds.sources.price.spot.kraken | Asset not supported: BCH
INFO | telliot_feeds.sources.price_aggregator | Running median on [130.92, 130.93, 130.85]
INFO | telliot_feeds.sources.price_aggregator | Feed Price: 130.92 reported at time 2023-03-02 18:38:11.668299+00:00
INFO | telliot_feeds.sources.price_aggregator | Number of sources used in aggregate: 3
DEBUG | telliot_feeds.reporters.interval | IntervalReporter Encoded value: 00000000000000000000000000000000000000000000000718e1465b2a23cf26
DEBUG | telliot_feeds.reporters.interval | Sending submitValue transaction
INFO | telliot_feeds.reporters.interval | View reported data:
- submitValue tx here
- I'd like to see the new tx info log output, but the first command I posted above (w/o
-ncr
flag) doesn't get toensure_profitable
bc of the datafeed fetch error. Is it actually an error getting it from autopay, or that there's just no funded feeds? Also, why does it log that message twice?
Checking local test runs
The following tests are failing for me (also when run individually):
360 reporter
- FAILED tests/reporters/test_360_reporter.py::test_report - assert 0 == 1000000000000000000
- FAILED tests/reporters/test_360_reporter.py::test_adding_stake - AssertionError: assert False
- FAILED tests/reporters/test_360_reporter.py::test_checks_reporter_lock_when_manual_source - AssertionError: assert False
evm call
- FAILED tests/reporters/test_evm_call.py::test_evm_call_e2e - assert 'Current query: {"type":"EVMCall","chainId":1,"contractAddress":"0x88d' in 'INFO telliot_feed...
- FAILED tests/reporters/test_evm_call.py::test_no_endpoint_for_tipped_chain - AssertionError: assert 'Endpoint not found for chain_id=123456789' in 'INFO telliot_...
rng reporter
- FAILED tests/reporters/test_rng_reporter.py::test_invalid_timestamp - AssertionError: assert False
- FAILED tests/reporters/test_rng_reporter.py::test_invalid_timestamp_in_future - AssertionError: assert False
tests are passing for me. I think it might be failing cause it depends on the telliot-core changes. can you pip install telliot-core then try again. I just merged the new changes. for the error messages, thats cause there are not tips. also i was checking the behavior with the main branch and it doesn't seem that the behavior changed because of the additions in this branch. |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #609 +/- ##
==========================================
- Coverage 30.87% 30.86% -0.02%
==========================================
Files 99 99
Lines 3459 3457 -2
==========================================
- Hits 1068 1067 -1
+ Misses 2391 2390 -1
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 for the updates @akremstudy
Hey @oraclown, I made a few changes after your review. Mainly the type 2 transaction fees now are generated using web3 instead of the etherscan api. Also made type 2 transactions the default, and a minor fix to get rid of the double logging that was happening with the tip listener. |
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.
@akremstudy Changes look good! Thanks a lot for these
Summary
Closes #602
Closes #362
Closes #355
Closes #367
Steps Taken to QA Changes
Ran all the tests/ and they all pass. (some tests need to be ran individually to pass)
transactions executed with these flags: -qt eth-usd-spot -p YOLO
Flashbot txn
goerli
arbitrum
optimism
mumbai
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!