From 38ee7bceba143f39e1320a1ee4fa666005eca995 Mon Sep 17 00:00:00 2001 From: Elias Tazartes <66871571+Eikix@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:58:59 +0100 Subject: [PATCH] Feat/sepolia compose (#811) * add kakarot sepolia docker compose * add docker compose for kakarot sepolia * fix stark compass iamge' * fix pr comments * fix extends --- docker-compose.sepolia.yaml | 129 ++++++++++++++++++++++++++++++++++++ docker-compose.yaml | 8 +-- 2 files changed, 131 insertions(+), 6 deletions(-) create mode 100644 docker-compose.sepolia.yaml diff --git a/docker-compose.sepolia.yaml b/docker-compose.sepolia.yaml new file mode 100644 index 000000000..5461403ad --- /dev/null +++ b/docker-compose.sepolia.yaml @@ -0,0 +1,129 @@ +# trunk-ignore-all(yamllint/empty-values) +version: "3.8" + +services: + starknet: + image: nethermind/juno:v0.9.4 + ports: + - 6060:6060 + volumes: + - juno_files:/var/lib/juno + command: > + --pending-poll-interval "1s" + --http + --http-host 0.0.0.0 + --http-port 6060 + --db-path /var/lib/juno + --eth-node wss://eth-sepolia.g.alchemy.com/v2/WIUR5JUZXieEBkze6Xs3IOXWhsS840TX + --cn-name kakarot-sepolia + --cn-feeder-url https://gateway.kakarot.sw-dev.io/feeder_gateway/ + --cn-gateway-url https://gateway.kakarot.sw-dev.io/gateway/ + --cn-l1-chain-id 0xaa36a7 + --cn-l2-chain-id kkrt + --cn-core-contract-address 0x9DAd05893305352cDd142F79e36bc39393F23770 + --cn-unverifiable-range 0,1000000 + networks: + - internal + starknet-explorer: + image: public.ecr.aws/o5q6k5w4/stark_compass_explorer:latest + ports: + - 4000:4000 + environment: + - PHX_HOST=localhost + - PORT=4000 + - RPC_API_HOST=http://host.docker.internal:6060 + - TESTNET_RPC_API_HOST=http://host.docker.internal:6060 + - SEPOLIA_RPC_API_HOST=http://host.docker.internal:6060 + - DISABLE_MAINNET_SYNC=true + - DISABLE_SEPOLIA_SYNC=true + - DATABASE_PATH=ecto://postgres:postgres@starknet-explorer-db:5432/starknet_explorer_dev + - DB_TYPE=postgres + - SECRET_KEY_BASE=JyULoT5cLBifW+XNEuCTVoAb+SaFgQt9j227RN0cKpR3wTsrApGd1HNcgeopemyl + - ENABLE_LISTENER=true + depends_on: + starknet-explorer-db: + condition: service_started + starknet: + condition: service_started + extra_hosts: + - host.docker.internal:172.17.0.1 + networks: + - internal + + starknet-explorer-db: + image: postgres:15.3 + ports: + - 5432:5432 + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DB=starknet_explorer_dev + - PGDATA=/var/lib/postgresql/data/pgdata + volumes: + - starknet-explorer:/var/lib/postgresql/data/ + + kakarot-rpc: + image: ghcr.io/kkrt-labs/kakarot-rpc/node:v0.2.4 + ports: + - 3030:3030 + environment: + - KAKAROT_RPC_URL=0.0.0.0:3030 + - STARKNET_NETWORK=http://starknet:6060 + - RUST_LOG=kakarot_rpc=info + - MONGO_CONNECTION_STRING=mongodb://mongo:mongo@mongo:27017 + - MONGO_DATABASE_NAME=kakarot-local + # These values are unique to Sepolia Testnet + # They'll need to be manually changed in case the testnet is reset + # To add robustness: parse the `deployments/kakarot-sepolia` folder in `kkrt-labs/kakarot` repo + - KAKAROT_ADDRESS=0x1a18210c20241ea7a06224246264a59add11c8358d69826e8bd51f4ba6d3be7 + - PROXY_ACCOUNT_CLASS_HASH=0x5bcd4d02cfe3aeb836f2ef4bd21b2020793e52a8269dbef9cd883fbddd2963c + - EXTERNALLY_OWNED_ACCOUNT_CLASS_HASH=0x2ab68b7f5cea86752714b499f602cdb8c36e8cdf270f04b6a275b609baf7aea + - CONTRACT_ACCOUNT_CLASS_HASH=0x34e8e05a28a6ac98118860ae0cca56487e2f0a3589a4b713a0f19ccda3386d9 + restart: on-failure + depends_on: + starknet: + condition: service_started + networks: + - internal + + apibara-dna: + extends: + file: docker-compose.yaml + service: apibara-dna + command: + - start + - --rpc=http://starknet:6060 + - --wait-for-rpc + - --data=/data + + ### MongoDB with Mongo Express + mongo: + extends: + file: docker-compose.yaml + service: mongo + + clone-repo: + extends: + file: docker-compose.yaml + service: clone-repo + + indexer: + extends: + file: docker-compose.yaml + service: indexer + +networks: + internal: + driver: bridge + default: + driver: bridge + close: + driver: bridge + +volumes: + apibara: + mongo_data: + indexer_code: + pgadmin_data: + juno_files: + starknet-explorer: diff --git a/docker-compose.yaml b/docker-compose.yaml index 100abbb6d..7e450a74a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -62,7 +62,7 @@ services: condition: service_completed_successfully kakarot-rpc: - image: eliastazartes/kakarot-rpc:latest + image: ghcr.io/kkrt-labs/kakarot-rpc/node:latest # Always pull the latest image, until we use release tags # TODO: use release tags pull_policy: always @@ -85,7 +85,7 @@ services: - internal apibara-dna: - image: quay.io/apibara/starknet:1.4.0 + image: quay.io/apibara/starknet:1.4.1 command: - start - --rpc=http://starknet:5050 @@ -99,8 +99,6 @@ services: - internal restart: on-failure depends_on: - kakarot-deployer: - condition: service_completed_successfully starknet: condition: service_started @@ -154,8 +152,6 @@ services: condition: service_completed_successfully starknet: condition: service_started - kakarot-deployer: - condition: service_completed_successfully networks: internal: