Skip to content

Commit

Permalink
FAILING 903 904
Browse files Browse the repository at this point in the history
  • Loading branch information
sklbancor committed Aug 31, 2023
1 parent 8c07e6c commit 1e9d5bb
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 123 deletions.
66 changes: 22 additions & 44 deletions resources/NBTest/NBTest_903_FlashloanTokens.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"id": "initial_id",
"metadata": {
"ExecuteTime": {
Expand All @@ -15,13 +15,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"ConstantProductCurve v2.14 (23/May/2023)\n",
"ConstantProductCurve v3.1beta1 (25/Aug/2023)\n",
"CarbonBot v3-b2.2 (20/June/2023)\n",
"UniswapV2 v0.0.1 (2023-07-03)\n",
"UniswapV3 v0.0.1 (2023-07-03)\n",
"SushiswapV2 v0.0.1 (2023-07-03)\n",
"CarbonV1 v0.0.1 (2023-07-03)\n",
"BancorV3 v0.0.1 (2023-07-03)\n",
"UniswapV2 v0.0.2 (2023-08-27)\n",
"UniswapV3 v0.0.2 (2023-08-27)\n",
"SushiswapV2 v0.0.2 (2023-08-27)\n",
"CarbonV1 v0.0.2 (2023-08-27)\n",
"BancorV3 v0.0.2 (2023-08-27)\n",
"imported m, np, pd, plt, os, sys, decimal; defined iseq, raises, require\n",
"Version = 3-b2.2 [requirements >= 3.0 is met]\n"
]
}
Expand Down Expand Up @@ -59,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 2,
"id": "1640a40ee6ae871c",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -135,7 +136,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 3,
"id": "c6e198d0eeba3183",
"metadata": {
"ExecuteTime": {
Expand All @@ -148,44 +149,21 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Searching for main.py in /Users/mikewcasale/Documents/GitHub/fastlane-bot/resources/NBTest\n",
"Found main.py in /Users/mikewcasale/Documents/GitHub/fastlane-bot\n"
"Searching for main.py in /Users/skl/REPOES/Bancor/FLBot/resources/NBTest\n",
"Found main.py in /Users/skl/REPOES/Bancor/FLBot\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2023-07-31 05:04:42,681 [fastlane:INFO] - Using mainnet config\n",
"2023-07-31 05:04:42,681 [fastlane:INFO] - Running data fetching for exchanges: ['carbon_v1', 'bancor_v3', 'uniswap_v3', 'uniswap_v2', 'sushiswap_v2']\n",
"2023-07-31 05:04:42,948 [fastlane:INFO] - Time taken to add initial pools: 0.09468913078308105\n",
"2023-07-31 05:04:43,144 [fastlane:INFO] - Fetching events from 17810870 to 17812870... 0\n",
"2023-07-31 05:04:43,145 [fastlane:INFO] - Using cached events\n",
"2023-07-31 05:04:43,145 [fastlane:ERROR] - Error in main loop: [Errno 2] No such file or directory: 'fastlane_bot/data/--timeout=45latest_event_data.json'\n",
"2023-07-31 05:04:55,392 [fastlane:INFO] - Fetching events from 17810871 to 17812871... 0\n",
"2023-07-31 05:04:55,393 [fastlane:INFO] - Using cached events\n",
"2023-07-31 05:04:55,393 [fastlane:ERROR] - Error in main loop: [Errno 2] No such file or directory: 'fastlane_bot/data/--timeout=45latest_event_data.json'\n",
"2023-07-31 05:05:07,590 [fastlane:INFO] - Fetching events from 17810872 to 17812872... 0\n",
"2023-07-31 05:05:07,590 [fastlane:INFO] - Using cached events\n",
"2023-07-31 05:05:07,590 [fastlane:ERROR] - Error in main loop: [Errno 2] No such file or directory: 'fastlane_bot/data/--timeout=45latest_event_data.json'\n",
"\n",
"Aborted!\n"
]
},
{
"ename": "KeyboardInterrupt",
"evalue": "",
"ename": "CalledProcessError",
"evalue": "Command '['python', '/Users/skl/REPOES/Bancor/FLBot/main.py', '--arb_mode=b3_two_hop', '--default_min_profit_bnt=60', '--limit_bancor3_flashloan_tokens=True', '--use_cached_events=True', '--logging_path=fastlane_bot/data/', '--timeout=45']' returned non-zero exit status 1.",
"output_type": "error",
"traceback": [
"\u001B[0;31m---------------------------------------------------------------------------\u001B[0m",
"\u001B[0;31mKeyboardInterrupt\u001B[0m Traceback (most recent call last)",
"Cell \u001B[0;32mIn[6], line 1\u001B[0m\n\u001B[0;32m----> 1\u001B[0m \u001B[43mrun_command\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mb3_two_hop\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m)\u001B[49m\n",
"Cell \u001B[0;32mIn[5], line 47\u001B[0m, in \u001B[0;36mrun_command\u001B[0;34m(mode)\u001B[0m\n\u001B[1;32m 45\u001B[0m expected_log_line \u001B[38;5;241m=\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mlimiting flashloan_tokens to [\u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[1;32m 46\u001B[0m found \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mFalse\u001B[39;00m\n\u001B[0;32m---> 47\u001B[0m result \u001B[38;5;241m=\u001B[39m \u001B[43msubprocess\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mrun\u001B[49m\u001B[43m(\u001B[49m\u001B[43mcmd\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mtext\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mTrue\u001B[39;49;00m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mcapture_output\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mTrue\u001B[39;49;00m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mcheck\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mTrue\u001B[39;49;00m\u001B[43m)\u001B[49m\n\u001B[1;32m 49\u001B[0m \u001B[38;5;66;03m# Check if the expected log line is in the output\u001B[39;00m\n\u001B[1;32m 50\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m expected_log_line \u001B[38;5;129;01min\u001B[39;00m result\u001B[38;5;241m.\u001B[39mstderr:\n",
"File \u001B[0;32m~/miniconda3/envs/fastlane-bot/lib/python3.9/subprocess.py:507\u001B[0m, in \u001B[0;36mrun\u001B[0;34m(input, capture_output, timeout, check, *popenargs, **kwargs)\u001B[0m\n\u001B[1;32m 505\u001B[0m \u001B[38;5;28;01mwith\u001B[39;00m Popen(\u001B[38;5;241m*\u001B[39mpopenargs, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs) \u001B[38;5;28;01mas\u001B[39;00m process:\n\u001B[1;32m 506\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m--> 507\u001B[0m stdout, stderr \u001B[38;5;241m=\u001B[39m \u001B[43mprocess\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mcommunicate\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;28;43minput\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtimeout\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 508\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m TimeoutExpired \u001B[38;5;28;01mas\u001B[39;00m exc:\n\u001B[1;32m 509\u001B[0m process\u001B[38;5;241m.\u001B[39mkill()\n",
"File \u001B[0;32m~/miniconda3/envs/fastlane-bot/lib/python3.9/subprocess.py:1134\u001B[0m, in \u001B[0;36mPopen.communicate\u001B[0;34m(self, input, timeout)\u001B[0m\n\u001B[1;32m 1131\u001B[0m endtime \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m\n\u001B[1;32m 1133\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m-> 1134\u001B[0m stdout, stderr \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_communicate\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;28;43minput\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mendtime\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mtimeout\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 1135\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mKeyboardInterrupt\u001B[39;00m:\n\u001B[1;32m 1136\u001B[0m \u001B[38;5;66;03m# https://bugs.python.org/issue25942\u001B[39;00m\n\u001B[1;32m 1137\u001B[0m \u001B[38;5;66;03m# See the detailed comment in .wait().\u001B[39;00m\n\u001B[1;32m 1138\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m timeout \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m:\n",
"File \u001B[0;32m~/miniconda3/envs/fastlane-bot/lib/python3.9/subprocess.py:1995\u001B[0m, in \u001B[0;36mPopen._communicate\u001B[0;34m(self, input, endtime, orig_timeout)\u001B[0m\n\u001B[1;32m 1988\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_check_timeout(endtime, orig_timeout,\n\u001B[1;32m 1989\u001B[0m stdout, stderr,\n\u001B[1;32m 1990\u001B[0m skip_check_and_raise\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mTrue\u001B[39;00m)\n\u001B[1;32m 1991\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mRuntimeError\u001B[39;00m( \u001B[38;5;66;03m# Impossible :)\u001B[39;00m\n\u001B[1;32m 1992\u001B[0m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124m_check_timeout(..., skip_check_and_raise=True) \u001B[39m\u001B[38;5;124m'\u001B[39m\n\u001B[1;32m 1993\u001B[0m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mfailed to raise TimeoutExpired.\u001B[39m\u001B[38;5;124m'\u001B[39m)\n\u001B[0;32m-> 1995\u001B[0m ready \u001B[38;5;241m=\u001B[39m \u001B[43mselector\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mselect\u001B[49m\u001B[43m(\u001B[49m\u001B[43mtimeout\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 1996\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_check_timeout(endtime, orig_timeout, stdout, stderr)\n\u001B[1;32m 1998\u001B[0m \u001B[38;5;66;03m# XXX Rewrite these to use non-blocking I/O on the file\u001B[39;00m\n\u001B[1;32m 1999\u001B[0m \u001B[38;5;66;03m# objects; they are no longer using C stdio!\u001B[39;00m\n",
"File \u001B[0;32m~/miniconda3/envs/fastlane-bot/lib/python3.9/selectors.py:416\u001B[0m, in \u001B[0;36m_PollLikeSelector.select\u001B[0;34m(self, timeout)\u001B[0m\n\u001B[1;32m 414\u001B[0m ready \u001B[38;5;241m=\u001B[39m []\n\u001B[1;32m 415\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m--> 416\u001B[0m fd_event_list \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_selector\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mpoll\u001B[49m\u001B[43m(\u001B[49m\u001B[43mtimeout\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 417\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mInterruptedError\u001B[39;00m:\n\u001B[1;32m 418\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m ready\n",
"\u001B[0;31mKeyboardInterrupt\u001B[0m: "
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mCalledProcessError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-3-865a4e89a4fa>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mrun_command\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"b3_two_hop\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m<ipython-input-2-9334191c44ee>\u001b[0m in \u001b[0;36mrun_command\u001b[0;34m(mode)\u001b[0m\n\u001b[1;32m 45\u001b[0m \u001b[0mexpected_log_line\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"limiting flashloan_tokens to [\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 46\u001b[0m \u001b[0mfound\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 47\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msubprocess\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcmd\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtext\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcapture_output\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcheck\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m120\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 48\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 49\u001b[0m \u001b[0;31m# Check if the expected log line is in the output\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/opt/anaconda3/lib/python3.8/subprocess.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(input, capture_output, timeout, check, *popenargs, **kwargs)\u001b[0m\n\u001b[1;32m 514\u001b[0m \u001b[0mretcode\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mprocess\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpoll\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 515\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcheck\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mretcode\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 516\u001b[0;31m raise CalledProcessError(retcode, process.args,\n\u001b[0m\u001b[1;32m 517\u001b[0m output=stdout, stderr=stderr)\n\u001b[1;32m 518\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mCompletedProcess\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprocess\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mretcode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstdout\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstderr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mCalledProcessError\u001b[0m: Command '['python', '/Users/skl/REPOES/Bancor/FLBot/main.py', '--arb_mode=b3_two_hop', '--default_min_profit_bnt=60', '--limit_bancor3_flashloan_tokens=True', '--use_cached_events=True', '--logging_path=fastlane_bot/data/', '--timeout=45']' returned non-zero exit status 1."
]
}
],
Expand All @@ -196,7 +174,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -210,7 +188,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
"version": "3.8.8"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 1e9d5bb

Please sign in to comment.