From 26be29ba4025beb12c14ca3a3dbede0940d987ef Mon Sep 17 00:00:00 2001 From: fyInALT Date: Sun, 31 Mar 2024 21:45:07 +0800 Subject: [PATCH] more docker files to ops and fix docker compose failed by allow list --- .github/workflows/release-aggregator.yml | 2 +- .github/workflows/release-operator.yml | 2 +- docker-compose.yml | 2 +- aggregator.Dockerfile => ops/aggregator.Dockerfile | 0 .../contract-deployer.Dockerfile | 0 operator.Dockerfile => ops/operator.Dockerfile | 0 ops/scripts/init-devnet.sh | 4 ++++ 7 files changed, 7 insertions(+), 3 deletions(-) rename aggregator.Dockerfile => ops/aggregator.Dockerfile (100%) rename contract-deployer.Dockerfile => ops/contract-deployer.Dockerfile (100%) rename operator.Dockerfile => ops/operator.Dockerfile (100%) diff --git a/.github/workflows/release-aggregator.yml b/.github/workflows/release-aggregator.yml index 5980369..f344176 100644 --- a/.github/workflows/release-aggregator.yml +++ b/.github/workflows/release-aggregator.yml @@ -102,7 +102,7 @@ jobs: secret-files: | git_config=${{ env.HOME }}/.gitconfig git_credentials=${{ env.XDG_CONFIG_HOME }}/git/credentials - file: aggregator.Dockerfile + file: ./ops/aggregator.Dockerfile labels: ${{ steps.aggregator-meta.outputs.labels }} tags: ${{ steps.aggregator-meta.outputs.tags }} diff --git a/.github/workflows/release-operator.yml b/.github/workflows/release-operator.yml index 63d0c19..88191ec 100644 --- a/.github/workflows/release-operator.yml +++ b/.github/workflows/release-operator.yml @@ -101,7 +101,7 @@ jobs: secret-files: | git_config=${{ env.HOME }}/.gitconfig git_credentials=${{ env.XDG_CONFIG_HOME }}/git/credentials - file: operator.Dockerfile + file: ./ops/operator.Dockerfile labels: ${{ steps.operator-meta.outputs.labels }} tags: ${{ steps.operator-meta.outputs.tags }} diff --git a/docker-compose.yml b/docker-compose.yml index 18a50b3..ba52b27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: contracts-deploy: build: context: . - dockerfile: contract-deployer.Dockerfile + dockerfile: ./ops/contract-deployer.Dockerfile container_name: contracts-deploy working_dir: /app/ volumes: diff --git a/aggregator.Dockerfile b/ops/aggregator.Dockerfile similarity index 100% rename from aggregator.Dockerfile rename to ops/aggregator.Dockerfile diff --git a/contract-deployer.Dockerfile b/ops/contract-deployer.Dockerfile similarity index 100% rename from contract-deployer.Dockerfile rename to ops/contract-deployer.Dockerfile diff --git a/operator.Dockerfile b/ops/operator.Dockerfile similarity index 100% rename from operator.Dockerfile rename to ops/operator.Dockerfile diff --git a/ops/scripts/init-devnet.sh b/ops/scripts/init-devnet.sh index 3ebbc21..ac66084 100755 --- a/ops/scripts/init-devnet.sh +++ b/ops/scripts/init-devnet.sh @@ -21,6 +21,7 @@ AVS_ADDRESS_PATH='./contracts/script/output/machavs_deploy_output.json' UNDERLAYING_TOKEN=$(cat $EIGENLAYER_ADDRESS_PATH | jq -r '.underlayingToken' ) REGISTRY_COORDINATOR_ADDR=$(cat $AVS_ADDRESS_PATH | jq -r '.registryCoordinator' ) OPERATOR_STATE_RETRIEVER_ADDR=$(cat $AVS_ADDRESS_PATH | jq -r '.operatorStateRetriever' ) +MACH_AVS_ADDR=$(cat $AVS_ADDRESS_PATH | jq -r '.machServiceManager' ) STRATEGY_BASE_TVL_LIMITS_ADDR=$(cat $EIGENLAYER_ADDRESS_PATH | jq -r '.strategyBaseTVLLimits' ) cast send -f $OWNER_ADDR --private-key $OWNER_PRIVATE --rpc-url $RPC_URL --value 2ether $OPERATOR_ADDR @@ -33,6 +34,9 @@ sed -i 's/ecdsa_private_key_store_path: .\+/ecdsa_private_key_store_path: .\/con sed -i 's/bls_private_key_store_path: .\+/bls_private_key_store_path: .\/config-files\/key\/'${OPERATOR_KEY_NAME}'.bls.key.json/g' ./ops/configs/operator-docker-compose.yaml sed -i 's/metadata_uri: .\+/metadata_uri: '${METADATA_URI}'/g' ./ops/configs/operator-docker-compose.yaml +# disable the allow list, so we can test easy. +cast send -f $OWNER_ADDR --private-key $OWNER_PRIVATE $MACH_AVS_ADDR --rpc-url $RPC_URL 'disableAllowlist()' + ./bin/mach-operator-cli --config ./ops/configs/operator-docker-compose.yaml rel ./bin/mach-operator-cli --config ./ops/configs/operator-docker-compose.yaml d --strategy-addr $STRATEGY_BASE_TVL_LIMITS_ADDR --amount 10000000 ./bin/mach-operator-cli --config ./ops/configs/operator-docker-compose.yaml r