diff --git a/CHANGELOG.md b/CHANGELOG.md index eafce9242..7639092a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,29 @@ ## [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.2...HEAD) + +- 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)) + +## [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) 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) diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py index 6f7cbaf60..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.1' +__version__ = '2.7.3' 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 -