diff --git a/.github/workflows/docker-compose-up-test.yaml b/.github/workflows/docker-compose-up-test.yaml index 5f573d6..3c7b3ee 100644 --- a/.github/workflows/docker-compose-up-test.yaml +++ b/.github/workflows/docker-compose-up-test.yaml @@ -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 diff --git a/Makefile b/Makefile index 97a79f5..6b7fba5 100644 --- a/Makefile +++ b/Makefile @@ -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__: ## diff --git a/config-files/operator-docker-compose.anvil.yaml b/config-files/operator-docker-compose.anvil.yaml index 4864cca..46242e9 100644 --- a/config-files/operator-docker-compose.anvil.yaml +++ b/config-files/operator-docker-compose.anvil.yaml @@ -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 @@ -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 \ No newline at end of file +token_strategy_addr: 0x09635F643e140090A9A8Dcd712eD6285858ceBef \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index aebbc4f..3760d7a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 @@ -19,6 +19,15 @@ 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 @@ -26,6 +35,8 @@ services: depends_on: anvil: condition: service_started + anvil-advance-chain-script: + condition: service_completed_successfully volumes: - ./:/incredible-squaring/ working_dir: /incredible-squaring @@ -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: