Skip to content

Commit

Permalink
Merge pull request #58 from Layr-Labs/samlaf-avs-291-docker-compose-u…
Browse files Browse the repository at this point in the history
…p-does-not-advance-the-chain

Samlaf avs 291 docker compose up does not advance the chain
  • Loading branch information
samlaf authored May 14, 2024
2 parents ef349fb + 6ecb355 commit 90d3254
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-compose-up-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
uses: actions/checkout@v2

- name: Run Docker Compose
run: docker compose up
run: docker compose up -d

- name: Sleep
run: sleep 60

- name: Check services running
run: |
if docker compose ps -aq | xargs docker inspect -f '{{ .State.Status }}' | grep -v running; then
if docker compose ps -a --filter="status=exited" --services | grep -v anvil-advance-chain-script | xargs grep -q; then
echo "Some services are not running"
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ ___DOCKER___: ##
docker-build-and-publish-images: ## builds and publishes operator and aggregator docker images using Ko
KO_DOCKER_REPO=ghcr.io/layr-labs/incredible-squaring ko build aggregator/cmd/main.go --preserve-import-paths
KO_DOCKER_REPO=ghcr.io/layr-labs/incredible-squaring ko build operator/cmd/main.go --preserve-import-paths
docker-start-everything: docker-build-and-publish-images ## starts aggregator and operator docker containers
docker compose pull && docker compose up
docker-compose-up: ## runs docker compose pull first and then up
docker compose pull && docker compose up -d

__CLI__: ##

Expand Down
6 changes: 3 additions & 3 deletions config-files/operator-docker-compose.anvil.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ operator_address: 0x860B6912C2d0337ef05bbC89b0C2CB6CbAEAB4A5
# This is the address of the contracts which are deployed in the anvil saved state
# The saved eigenlayer state is located in tests/anvil/credible_squaring_avs_deployment_output.json
# TODO(samlaf): automate updating these addresses when we deploy new contracts
avs_registry_coordinator_address: 0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690
operator_state_retriever_address: 0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8
avs_registry_coordinator_address: 0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9
operator_state_retriever_address: 0x95401dc811bb5740090279Ba06cfA8fcF6113778

# ETH RPC URL
eth_rpc_url: http://anvil:8545
Expand Down Expand Up @@ -46,4 +46,4 @@ enable_node_api: true
register_operator_on_startup: true
# address of token to deposit tokens into when registering on startup
# addresses.erc20MockStrategy in tests/anvil/credible_squaring_avs_deployment_output.json
token_strategy_addr: 0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f
token_strategy_addr: 0x09635F643e140090A9A8Dcd712eD6285858ceBef
15 changes: 14 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ networks:

services:
anvil:
image: ghcr.io/foundry-rs/foundry
image: ghcr.io/foundry-rs/foundry:nightly-5b7e4cb3c882b28f3c32ba580de27ce7381f415a
container_name: anvil
ports:
# opening the port so we can easily cast to anvil from localhost
Expand All @@ -19,13 +19,24 @@ services:
command: --host 0.0.0.0 --load-state /root/.anvil/state.json
networks:
- incredible-squaring-network

anvil-advance-chain-script:
image: ghcr.io/foundry-rs/foundry:nightly-5b7e4cb3c882b28f3c32ba580de27ce7381f415a
depends_on:
- anvil
entrypoint: cast
command: rpc anvil_mine 100 --rpc-url http://anvil:8545
networks:
- incredible-squaring-network

aggregator:
image: ghcr.io/layr-labs/incredible-squaring/aggregator/cmd/main.go:latest
container_name: incredible-squaring-aggregator
depends_on:
anvil:
condition: service_started
anvil-advance-chain-script:
condition: service_completed_successfully
volumes:
- ./:/incredible-squaring/
working_dir: /incredible-squaring
Expand All @@ -47,6 +58,8 @@ services:
condition: service_started
aggregator:
condition: service_started
anvil-advance-chain-script:
condition: service_completed_successfully
ports:
- "9090:9090" # prometheus metrics port (defined in operator-docker-compose.anvil.yaml file)
volumes:
Expand Down

0 comments on commit 90d3254

Please sign in to comment.