From d2beb6bccaa19a4216dc4a2db1e8425320420984 Mon Sep 17 00:00:00 2001
From: Mike Casale <46603283+mikewcasale@users.noreply.github.com>
Date: Mon, 31 Jul 2023 08:40:39 -0700
Subject: [PATCH 1/7] Removes unused files.
---
log.txt | 1 -
requirements-monitoring.txt | 24 ------------
run_arbitrage_monitor | 10 -----
run_server | 20 ----------
run_server.py | 77 -------------------------------------
symlinks.sh | 9 -----
6 files changed, 141 deletions(-)
delete mode 100644 log.txt
delete mode 100644 requirements-monitoring.txt
delete mode 100755 run_arbitrage_monitor
delete mode 100755 run_server
delete mode 100644 run_server.py
delete mode 100644 symlinks.sh
diff --git a/log.txt b/log.txt
deleted file mode 100644
index 012d8253c..000000000
--- a/log.txt
+++ /dev/null
@@ -1 +0,0 @@
-Searching for main.py in /Users/mikewcasale/Documents/GitHub/fastlane-bot
\ No newline at end of file
diff --git a/requirements-monitoring.txt b/requirements-monitoring.txt
deleted file mode 100644
index 9060a075a..000000000
--- a/requirements-monitoring.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-requests==2.28.1
-python-dateutil==2.8.1
-typing-extensions~=4.4.0
-psycopg2-binary~=2.9.5
-psycopg2~=2.9.5
-sqlalchemy~=2.0.7
-eth-brownie~=1.19.3
-python-dotenv~=0.16.0
-joblib~=1.2.0
-pandas~=1.5.2
-alchemy-sdk~=0.1.1
-pyarrow~=11.0.0
-networkx~=3.0
-cvxpy~=1.3.1
-matplotlib~=3.7.1
-dataclass_wizard~=0.22.2
-hexbytes~=0.2.3
-click~=8.1.3
-setuptools~=67.6.1
-protobuf==3.19.5
-sqlalchemy_utils
-Flask==1.0.2
-itsdangerous==1.1.0
-Jinja2==2.10
diff --git a/run_arbitrage_monitor b/run_arbitrage_monitor
deleted file mode 100755
index 2145c8f33..000000000
--- a/run_arbitrage_monitor
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-cd "$(dirname "$0")"
-
-# nodejs path/to/update/datafile.json
-pushd resources/NBTest
-python3 Analysis_015_ArbMonitoringBot.py > Analysis_015.latest.log
-cat Analysis_015.latest.out >> Analysis_015.out
-#cat Analysis_015.latest.log >> Analysis_015.log
-date >> Analysis_015.heartbeat
-popd
diff --git a/run_server b/run_server
deleted file mode 100755
index c657b9359..000000000
--- a/run_server
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-cd "$(dirname "$0")"
-
-/usr/bin/python run_server.py
-
-
-# ;*******************************************************************
-# ; monitoring
-# ;*******************************************************************
-# [program:monitoring]
-# command=/root/fastlanebot/run_server
-# autostart=false
-# autorestart=true
-# startsecs=10
-# startretries=3
-# killasgroup=true
-# stopasgroup=true
-# redirect_stderr=false
-# stdout_logfile=/var/log/carbon_monitoring_output.log
-# stderr_logfile=/var/log/carbon_monitoring_error.log
\ No newline at end of file
diff --git a/run_server.py b/run_server.py
deleted file mode 100644
index 13c1c0b0e..000000000
--- a/run_server.py
+++ /dev/null
@@ -1,77 +0,0 @@
-__VERSION__ = "2.0"
-__DATE__ = "18/May/2023"
-
-from flask import Flask, Response
-import json
-
-app = Flask(__name__)
-@app.route('/')
-def monitor():
- return f"""
-
Monitoring Server
- v{__VERSION__} [{__DATE__}]
-
-
- """
-
-@app.route('/all')
-def monitor_all():
- with open("./monitoring.out", "r") as f:
- text = f.read()
- return Response(text, mimetype='text/plain')
-
-@app.route('/latest')
-def monitor_latest():
- with open("./monitoring.latest.out", "r") as f:
- text = f.read()
- return Response(text, mimetype='text/plain')
-
-INNERHTML = """
-
-{title}
-
-{text}
-
-
-"""
-HTML = """
-{menu}
-{inner}
-"""
-@app.route('/bypair')
-def monitor_bypair():
- with open("./monitoring.json", "r") as f:
- data = json.loads(f.read())
- out_by_pair = data['out_by_pair']
- inner = "\n".join([
- INNERHTML.format(text=txt, title=pair)
- for pair, txt in out_by_pair.items()
- ])
- menu = "\n".join([
- "{pair}".format(pair=pair)
- for pair, txt in out_by_pair.items()
- ])
- menu = "\n
\n".format(menu)
- html = HTML.format(menu=menu, inner=inner)
- return Response(html, mimetype='text/html')
-
-@app.route('/json')
-def monitor_json():
- with open("./monitoring.json", "r") as f:
- data = json.loads(f.read())
- return data
-
-@app.route('/long')
-def monitor_long():
- with open("./monitoring.latest.log", "r") as f:
- text = f.read()
- return Response(text, mimetype='text/plain')
-
-if __name__ == '__main__':
- app.run(host='0.0.0.0', port=8080)
diff --git a/symlinks.sh b/symlinks.sh
deleted file mode 100644
index fcddc5496..000000000
--- a/symlinks.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cd ~
-cd fastlane_bot
-ln -s resources/NBTest/Analysis_015.log monitoring.log
-ln -s resources/NBTest/Analysis_015.latest.log monitoring.latest.log
-ln -s resources/NBTest/Analysis_015.latest.json monitoring.json
-ln -s resources/NBTest/Analysis_015.out monitoring.out
-ln -s resources/NBTest/Analysis_015.latest.out monitoring.latest.out
-ln -s resources/NBTest/Analysis_015.heartbeat monitoring.heartbeat
-
From 2592e52810345e7eeeb1cc116b983f09772e8d49 Mon Sep 17 00:00:00 2001
From: Mike Casale <46603283+mikewcasale@users.noreply.github.com>
Date: Mon, 31 Jul 2023 08:55:21 -0700
Subject: [PATCH 2/7] Increase timeout to 2 minutes for tests.
---
resources/NBTest/NBTest_903_FlashloanTokens.py | 2 +-
resources/NBTest/NBTest_904_Bancor3DataValidation.py | 2 +-
resources/NBTest/NBTest_905_RespectMinProfitClickParam.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/resources/NBTest/NBTest_903_FlashloanTokens.py b/resources/NBTest/NBTest_903_FlashloanTokens.py
index c3f7b740b..fe98a6659 100644
--- a/resources/NBTest/NBTest_903_FlashloanTokens.py
+++ b/resources/NBTest/NBTest_903_FlashloanTokens.py
@@ -83,7 +83,7 @@ def run_command(mode):
# Wait for the expected log line to appear
expected_log_line = "limiting flashloan_tokens to ["
found = False
- result = subprocess.run(cmd, text=True, capture_output=True, check=True)
+ result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=120)
# Check if the expected log line is in the output
if expected_log_line in result.stderr:
diff --git a/resources/NBTest/NBTest_904_Bancor3DataValidation.py b/resources/NBTest/NBTest_904_Bancor3DataValidation.py
index cb0dee142..b1c10e073 100644
--- a/resources/NBTest/NBTest_904_Bancor3DataValidation.py
+++ b/resources/NBTest/NBTest_904_Bancor3DataValidation.py
@@ -79,7 +79,7 @@ def run_command(arb_mode, expected_log_line):
# Wait for the expected log line to appear
found = False
- result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=60)
+ result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=120)
# Check if the expected log line is in the output
if expected_log_line in result.stderr:
diff --git a/resources/NBTest/NBTest_905_RespectMinProfitClickParam.py b/resources/NBTest/NBTest_905_RespectMinProfitClickParam.py
index 489abc1fe..f733b94b7 100644
--- a/resources/NBTest/NBTest_905_RespectMinProfitClickParam.py
+++ b/resources/NBTest/NBTest_905_RespectMinProfitClickParam.py
@@ -80,7 +80,7 @@ def run_command(arb_mode, expected_log_line):
# Wait for the expected log line to appear
found = False
- result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=60)
+ result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=120)
# Check if the expected log line is in the output
if expected_log_line in result.stderr or expected_log_line in result.stdout:
From 5de001dbc73533d0a1069c2345f7483f4b51979c Mon Sep 17 00:00:00 2001
From: Mike Casale <46603283+mikewcasale@users.noreply.github.com>
Date: Wed, 2 Aug 2023 06:55:01 -0700
Subject: [PATCH 3/7] Adds additional installation instructions for
apple-silicon users.
---
README.md | 42 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 38 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index cb06df418..110cb9130 100644
--- a/README.md
+++ b/README.md
@@ -18,19 +18,53 @@ Permanent URL for this repository: [github.com/bancorprotocol/fastlane-bot][repo
Install Fastlane Arbitrage Bot from PyPi using the following command:
+Clone the repo from Bancor's GitHub and install:
+
+```bash
+git clone https://github.com/bancorprotocol/fastlane-bot
+cd fastlane-bot
+pip install -r requirements.txt
+python setup.py install
+```
+
+Here are the added instructions for Mac users with an Apple Silicon chip:
+
+### Installation for Mac users with Apple Silicon chip
+
+Due to the architectural differences of the Apple Silicon chip, some Python packages may not install correctly using the standard method. Follow the instructions below to create a compatible conda environment, and then install Fastlane Arbitrage Bot:
+
+1. Install Miniforge tailored for Apple Silicon from [here](https://github.com/conda-forge/miniforge#miniforge3).
+
```bash
-pip install fastlane_bot
+# to install miniforge
+wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
+bash Miniforge3-MacOSX-arm64.sh
```
-Or clone the repo from Bancor's GitHub:
+Follow the terminal prompts to ensure conda is installed and initialized.
+
+2. Create a new conda environment using the correct architecture:
+
+```bash
+conda create -n fastlane_bot_env python=3.9
+conda activate fastlane_bot_env
+```
+
+3. Clone the repo from GitHub:
```bash
git clone https://github.com/bancorprotocol/fastlane-bot
cd fastlane-bot
-pip install -r requirements.txt
-python setup.py install
```
+3. Now, install Fastlane Arbitrage Bot by using the provided bash scrip `apple-silicon-install.sh`:
+
+```bash
+./apple-silicon-install.sh
+```
+
+Please note that due to potential compatibility issues with the new Apple Silicon chip, some packages may still fail to install correctly. If you encounter any issues, please report them to the package maintainers.
+
[sim]:https://github.com/bancorprotocol/carbon-simulator
### Legacy Installation (v1.0)
From b5f77569a76e1db90b36fa9acc7b683140ea8096 Mon Sep 17 00:00:00 2001
From: GitHub Action
Date: Mon, 7 Aug 2023 11:51:38 +0000
Subject: [PATCH 4/7] Bump version [skip ci]
---
fastlane_bot/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py
index 6f7cbaf60..ff5e7eee7 100644
--- a/fastlane_bot/__init__.py
+++ b/fastlane_bot/__init__.py
@@ -1,7 +1,7 @@
from .bot import CarbonBot as Bot, __VERSION__, __DATE__
from .config import Config, ConfigNetwork, ConfigDB, ConfigLogger, ConfigProvider
-__version__ = '2.7.1'
+__version__ = '2.7.2'
From 2afd60cbe68a08f5652950600b8d795d5f11a9ab Mon Sep 17 00:00:00 2001
From: GitHub Action
Date: Mon, 7 Aug 2023 11:51:44 +0000
Subject: [PATCH 5/7] Update changelog [skip ci]
---
CHANGELOG.md | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eafce9242..f19493aa6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,9 +2,22 @@
## [Unreleased](https://github.com/bancorprotocol/fastlane-bot/tree/HEAD)
-[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.0...HEAD)
+[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.1...HEAD)
- Change automation to increment patch version instead of minor version. [\#53](https://github.com/bancorprotocol/fastlane-bot/issues/53)
+
+Closed issues
+
+- Update README with Brownie and pyyaml Install Troubleshoot [\#31](https://github.com/bancorprotocol/fastlane-bot/issues/31)
+
+Merged pull requests
+
+- Adds additional installation instructions for apple-silicon users. [\#52](https://github.com/bancorprotocol/fastlane-bot/pull/52) ([mikewcasale](https://github.com/mikewcasale))
+
+## [v2.7.1](https://github.com/bancorprotocol/fastlane-bot/tree/v2.7.1) (2023-08-06)
+
+[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.0...v2.7.1)
+
- Change automation to increment patch version instead of minor. [\#54](https://github.com/bancorprotocol/fastlane-bot/pull/54) ([mikewcasale](https://github.com/mikewcasale))
## [v2.7.0](https://github.com/bancorprotocol/fastlane-bot/tree/v2.7.0) (2023-08-02)
From 5ad7b154a44f33c9c2262e055b0da431dee63978 Mon Sep 17 00:00:00 2001
From: GitHub Action
Date: Mon, 7 Aug 2023 12:59:06 +0000
Subject: [PATCH 6/7] Bump version [skip ci]
---
fastlane_bot/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py
index ff5e7eee7..784d21310 100644
--- a/fastlane_bot/__init__.py
+++ b/fastlane_bot/__init__.py
@@ -1,7 +1,7 @@
from .bot import CarbonBot as Bot, __VERSION__, __DATE__
from .config import Config, ConfigNetwork, ConfigDB, ConfigLogger, ConfigProvider
-__version__ = '2.7.2'
+__version__ = '2.7.3'
From d7c9ac81cfda059254a1ea66b4122dcccc63743a Mon Sep 17 00:00:00 2001
From: GitHub Action
Date: Mon, 7 Aug 2023 12:59:13 +0000
Subject: [PATCH 7/7] Update changelog [skip ci]
---
CHANGELOG.md | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f19493aa6..7639092a4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,14 +2,21 @@
## [Unreleased](https://github.com/bancorprotocol/fastlane-bot/tree/HEAD)
-[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.1...HEAD)
+[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.2...HEAD)
-- Change automation to increment patch version instead of minor version. [\#53](https://github.com/bancorprotocol/fastlane-bot/issues/53)
+- Cleanup of Unused Top-Level Files [\#47](https://github.com/bancorprotocol/fastlane-bot/issues/47)
+- Removes unused files. [\#48](https://github.com/bancorprotocol/fastlane-bot/pull/48) ([mikewcasale](https://github.com/mikewcasale))
Closed issues
- Update README with Brownie and pyyaml Install Troubleshoot [\#31](https://github.com/bancorprotocol/fastlane-bot/issues/31)
+## [v2.7.2](https://github.com/bancorprotocol/fastlane-bot/tree/v2.7.2) (2023-08-07)
+
+[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.1...v2.7.2)
+
+- Change automation to increment patch version instead of minor version. [\#53](https://github.com/bancorprotocol/fastlane-bot/issues/53)
+
Merged pull requests
- Adds additional installation instructions for apple-silicon users. [\#52](https://github.com/bancorprotocol/fastlane-bot/pull/52) ([mikewcasale](https://github.com/mikewcasale))