Skip to content
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

Updating for agent0 and various cleanup #118

Merged
merged 5 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions docker-compose.agent0-bots.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
services:
checkpoint-bot:
image: ${AGENT0_IMAGE}
profiles:
- "service-bot"
command: |
/bin/sh -c "sleep 1; python scripts/checkpoint_bots.py --pool-check-sleep-blocks 30 --infra"
Copy link

@mcclurejt mcclurejt Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda curious why we need the sleep?

env_file:
- .env

invariance-check-bot:
image: ${AGENT0_IMAGE}
profiles:
- "service-bot"
command: |
/bin/sh -c "sleep 1; python scripts/fuzz_bot_invariant_checks.py --pool-check-sleep-blocks 30 --infra"
env_file:
- .env

random-bot:
image: ${AGENT0_IMAGE}
profiles:
- "random-bot"
command: |
/bin/sh -c "sleep 1; python scripts/remote_fuzz_bots.py --pool-check-sleep-blocks 10000 --infra"
env_file:
- .env

# TODO rewrite rate bot in agent0
slundqui marked this conversation as resolved.
Show resolved Hide resolved
rate-bot:
image: ${RATE_BOT_IMAGE}
profiles:
- "rate-bot"
volumes:
- artifacts:/artifacts/

volumes:
artifacts:
16 changes: 0 additions & 16 deletions docker-compose.anvil.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:
ethereum:
image: ${DEVNET_IMAGE}
Expand Down Expand Up @@ -41,20 +40,5 @@ services:
volumes:
- artifacts:/var/www/artifacts/

# TODO make single container for all pools
checkpoint-bot-erc4626:
image: ${AGENT0_IMAGE}
command: |
/bin/sh -c "sleep 1; python scripts/checkpoint_bot.py --pool erc4626_hyperdrive --fund"
env_file:
- .env

checkpoint-bot-steth:
image: ${AGENT0_IMAGE}
command: |
/bin/sh -c "sleep 1; python scripts/checkpoint_bot.py --pool steth_hyperdrive --fund"
env_file:
- .env

volumes:
artifacts:
1 change: 0 additions & 1 deletion docker-compose.blocktime.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:
ethereum:
# This file overwrites docker-compose.anvil.yaml
Expand Down
13 changes: 1 addition & 12 deletions docker-compose.data.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:

data:
Expand All @@ -15,7 +14,7 @@ services:
profiles:
- "data"
working_dir: /app/
command: /bin/sh -c "python scripts/run_data_analysis.py"
command: /bin/sh -c "python scripts/run_analyze_data.py"
env_file:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no sleep here... do we need it?

- .env

Expand All @@ -37,15 +36,5 @@ services:
mem_reservation: "1g"
restart: always

# Set initial username mappings
init-usernames:
image: ${AGENT0_IMAGE}
profiles:
- "data"
working_dir: /app/
command: /bin/sh -c "python scripts/update_usernames.py"
env_file:
- .env

volumes:
artifacts:
1 change: 0 additions & 1 deletion docker-compose.frontend.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:

frontend:
Expand Down
47 changes: 0 additions & 47 deletions docker-compose.fuzz-bot.yaml

This file was deleted.

1 change: 0 additions & 1 deletion docker-compose.ports.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:

ethereum:
Expand Down
5 changes: 1 addition & 4 deletions docker-compose.postgres.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
version: '3.9'

services:

db:
image: postgres
profiles:
Expand All @@ -10,4 +7,4 @@ services:
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: admin
POSTGRES_DB: postgres_db
POSTGRES_DB: agent0_db
11 changes: 0 additions & 11 deletions docker-compose.rate-bot.yaml

This file was deleted.

1 change: 0 additions & 1 deletion docker-compose.testnet.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:
ethereum:
# This file overwrites docker-compose.anvil.yaml
Expand Down
9 changes: 4 additions & 5 deletions env/env.images
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
# - edge = The newest image regardless of stability

# Anvil
DEVNET_IMAGE=ghcr.io/delvtech/hyperdrive/devnet:1.0.1
TESTNET_IMAGE=ghcr.io/delvtech/hyperdrive/testnet:1.0.1
DEVNET_IMAGE=ghcr.io/delvtech/hyperdrive/devnet:1.0.10
TESTNET_IMAGE=ghcr.io/delvtech/hyperdrive/testnet:1.0.10

# Infra
ARTIFACTS_IMAGE=ghcr.io/delvtech/infra/artifacts:0.0.8
FUND_ACCOUNTS_IMAGE=ghcr.io/delvtech/infra/fund-accounts:0.0.8
RATE_BOT_IMAGE=ghcr.io/delvtech/infra/rate-bot:0.0.8

# Agent0 (bots)
# TODO cut release and set here
AGENT0_IMAGE=ghcr.io/delvtech/agent0/agent0:0.18.1
AGENT0_IMAGE=ghcr.io/delvtech/agent0/agent0:0.20.2

# Frontend
FRONTEND_IMAGE=ghcr.io/delvtech/hyperdrive-frontend/hyperdrive-frontend:1.0.7
FRONTEND_IMAGE=ghcr.io/delvtech/hyperdrive-frontend/hyperdrive-frontend:1.6.5
2 changes: 1 addition & 1 deletion env/env.postgres
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POSTGRES_USER=admin
POSTGRES_PASSWORD=password
POSTGRES_DB=postgres_db
POSTGRES_DB=agent0_db

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if we expect to have more than one db present on the postgres instance, we might want to indicate that by changing the env variables in the .env file.... for example

# .env
AGENT0_POSTGRES_USER=admin
AGENT0_POSTGRES_PASSWORD=password
AGENT0_POSTGRES_DB=agent0_db
MY_POSTGRES_USER=me
MY_POSTGRES_PASSWORD=yo
MY_POSTGRES_DB=my_db

then in the compose file....

environment:
      POSTGRES_PASSWORD: $AGENT0_POSTGRES_PASSWORD
      POSTGRES_USER: $AGENT0_POSTGRES_USER
      POSTGRES_DB: $AGENT0_POSTGRES_DB

might need to pass as args rather than env vars since I'm not sure if .env vars will be interpolated but hopefully the gist makes sense

POSTGRES_HOST="db"
POSTGRES_PORT=5432
Loading
Loading