diff --git a/ops/Run_Replica.md b/ops/Run_Replica.md new file mode 100644 index 000000000000..aa430b4690bc --- /dev/null +++ b/ops/Run_Replica.md @@ -0,0 +1,30 @@ +# Replica Service + +The docker-compose project runs a local replicate l2geth. + +## Prerequisites + +\- docker + +\- docker-compose + +## Start replica service + +### Configuration + +Replace `INFURA_KEY` with your own key in [docker-compose-replica-service.yml](./docker-compose-replica-service.yml). + +### Start the docker + +Start the replica service via: + +```bash +cd ops/ +docker-compose -f docker-compose-replica-service.yml up +``` + +This will pull the two images from docker hub: + +* [`data-tranport-layer`](https://hub.docker.com/layers/156092207/omgx/data-transport-layer/production-v1/images/sha256-07d4415aab46863b8c7996c1c40f6221f3ac3f697485ccc262a3a6f0478aa4fb?context=explore): service that indexes transaction data from the L1 chain and L2 chain + +* [`replica`](https://hub.docker.com/layers/157390249/omgx/replica/production-v1/images/sha256-fc85c0db75352a911f49ba44372e087e54bd7123963f83a11084939f75581b37?context=explore): L2 geth node running in sync mode \ No newline at end of file diff --git a/ops/docker-compose-replica-service.yml b/ops/docker-compose-replica-service.yml new file mode 100644 index 000000000000..9ae9db315989 --- /dev/null +++ b/ops/docker-compose-replica-service.yml @@ -0,0 +1,60 @@ +############################# +# OMGX replica service +# This service is used to replicate the l2geth +# +# RUN: +# cd /ops +# docker-compose -f docker-compose-omgx-replica.yml up +############################# + +version: "3" + +services: + dtl-replica: + image: omgx/data-transport-layer:production-v1 + deploy: + replicas: 1 + entrypoint: ./dtl.sh + env_file: + - ./envs/dtl.env + # set the rest of the env vars for the network whcih do not + # depend on the docker-compose setup + environment: + # used for setting the address manager address + URL: https://rinkeby.omgx.network:8081/addresses.json + DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: https://rinkeby.infura.io/v3/INFURA_KEY + DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: https://rinkeby.omgx.network + DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 28 + DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true' + # Port + DATA_TRANSPORT_LAYER__SERVER_PORT: 7878 + ports: + - ${DTL_PORT:-7878}:7878 + + l2geth-replica: + image: omgx/replica:production-v1 + deploy: + replicas: 1 + entrypoint: sh ./geth.sh + env_file: + - ./envs/geth.env + environment: + ETH1_HTTP: //rinkeby.infura.io/v3/INFURA_KEY + ROLLUP_STATE_DUMP_PATH: https://rinkeby.omgx.network:8081/state-dump.latest.json + URL: https://rinkeby.omgx.network:8081/addresses.json + # connecting to the DTL + ROLLUP_CLIENT_HTTP: http://dtl-replica:7878 + ETH1_CTC_DEPLOYMENT_HEIGHT: 8845198 + RETRIES: 60 + ROLLUP_BACKEND: 'l2' + ROLLUP_VERIFIER_ENABLE: 'true' + # PORT + RPC_PORT: 8545 + ports: + - ${REPLICA_HTTP_PORT:-8545}:8545 + - ${REPLICA_WS_PORT:-8546}:8546 + volumes: + - l2geth:/root/.ethereum + +volumes: + l2geth: \ No newline at end of file