This repository has been archived by the owner on Dec 5, 2021. It is now read-only.
forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add community Replicators and Verifiers with instructions (#175)
* Add community Replicators and Verifiers with instructions * clean utils.ts
- Loading branch information
1 parent
bb69180
commit 8fd511e
Showing
7 changed files
with
199 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
- [Community Replica Service](#community-replica-service) | ||
* [Prerequisites](#prerequisites) | ||
* [Start Replica service](#start-replica-service) | ||
+ [Configuration](#configuration) | ||
+ [Start the docker](#start-the-docker) | ||
+ [Common Errors](#common-errors) | ||
|
||
# Community Replica Service | ||
|
||
The `ops/docker-compose-replica-service.yml` docker-compose project runs a local replica of the OMGC Rinkeby l2geth. This service allows you run a local copy of the L2, which is useful for generating analyics for blockexplorers. | ||
|
||
## Prerequisites | ||
|
||
\- docker | ||
\- docker-compose | ||
|
||
## Start Replica service | ||
|
||
### Configuration | ||
|
||
Replace `INFURA_KEY` with your own key in [docker-compose-replica-service.yml](.ops/docker-compose-replica-service.yml). You can get a free Infura key from https://infura.io. | ||
|
||
### Start the docker | ||
|
||
Start the replica service via: | ||
|
||
```bash | ||
cd ops | ||
docker-compose -f docker-compose-replica-service.yml up | ||
``` | ||
|
||
This will pull 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 | ||
|
||
### Common Errors | ||
|
||
If you get this: | ||
|
||
```bash | ||
(node:1) UnhandledPromiseRejectionWarning: Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.1.0) | ||
``` | ||
|
||
then you forgot to replace `INFURA_KEY` in this line: `DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: https://rinkeby.infura.io/v3/INFURA_KEY` with your Infura key. Your Infura key will be a string like `c655138ed943455123456789123456789c`, so the final line will look something like this: | ||
|
||
```bash | ||
DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: https://rinkeby.infura.io/v3/c655138ed943455123456789123456789c | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
- [Community Verifier Service](#community-verifier-service) | ||
* [Prerequisites](#prerequisites) | ||
* [Start Verifier service](#start-verifier-service) | ||
+ [Configuration - Infura key](#configuration---infura-key) | ||
+ [Start the docker](#start-the-docker) | ||
+ [Common Errors](#common-errors) | ||
|
||
# Community Verifier Service | ||
|
||
The `ops/docker-compose-verifier-service.yml` docker-compose project runs a local Verifier of the OMGX Rinkeby l2geth. The verifier looks at transactions and computes state roots. These community-generated state roots can then be compared against the state roots submitted to the L2 by the unitary sequencer, as the starting point for detecting (and recovering from) sequencer fraud. | ||
|
||
## Prerequisites | ||
|
||
\- docker | ||
\- docker-compose | ||
|
||
## Start Verifier service | ||
|
||
### Configuration - Infura key | ||
|
||
Replace `INFURA_KEY` with your own key in [docker-compose-verifier-service.yml](.ops/docker-compose-verifier-service.yml). You can get a free Infura key from https://infura.io. | ||
|
||
### Start the docker | ||
|
||
Start the Verifier service via: | ||
|
||
```bash | ||
cd ops | ||
docker-compose -f docker-compose-verifier-service.yml up | ||
``` | ||
|
||
This will pull 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 | ||
|
||
### Common Errors | ||
|
||
If you get this: | ||
|
||
```bash | ||
(node:1) UnhandledPromiseRejectionWarning: Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.1.0) | ||
``` | ||
|
||
then you forgot to replace `INFURA_KEY` in this line: `DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: https://rinkeby.infura.io/v3/INFURA_KEY` with your Infura key. Your Infura key will be a string like `c655138ed943455123456789123456789c`, so the final line will look something like this: | ||
|
||
```bash | ||
DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: https://rinkeby.infura.io/v3/c655138ed943455123456789123456789c | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
############################# | ||
# OMGX Verifier service | ||
# This service is used to verify the l2geth | ||
# | ||
# RUN: | ||
# cd /ops | ||
# docker-compose -f docker-compose-omgx-verifier.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__SERVER_PORT: 7878 | ||
ports: | ||
- ${DTL_PORT:-7878}:7878 | ||
|
||
l2geth-verifier: | ||
image: omgx/replica:production-v1 | ||
deploy: | ||
replicas: 1 | ||
entrypoint: sh ./geth.sh | ||
env_file: | ||
- ./envs/geth_rv.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: 'l1' | ||
ROLLUP_VERIFIER_ENABLE: 'true' | ||
RPC_PORT: 8545 | ||
ports: | ||
- ${REPLICA_HTTP_PORT:-8545}:8545 | ||
- ${REPLICA_WS_PORT:-8546}:8546 | ||
volumes: | ||
- l2geth:/root/.ethereum | ||
|
||
volumes: | ||
l2geth: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
ETH1_HTTP= | ||
ETH1_CTC_DEPLOYMENT_HEIGHT= | ||
ETH1_SYNC_SERVICE_ENABLE=true | ||
ETH1_CONFIRMATION_DEPTH=0 | ||
|
||
ROLLUP_CLIENT_HTTP= | ||
ROLLUP_STATE_DUMP_PATH= | ||
ROLLUP_POLL_INTERVAL_FLAG=500ms | ||
ROLLUP_ENABLE_L2_GAS_POLLING= | ||
ROLLUP_GAS_PRICE_ORACLE_OWNER_ADDRESS= | ||
ROLLUP_ENFORCE_FEES= | ||
|
||
ETHERBASE=0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf | ||
|
||
RPC_ENABLE=true | ||
RPC_ADDR=0.0.0.0 | ||
RPC_PORT=8545 | ||
RPC_API=eth,net,rollup,web3,debug | ||
RPC_CORS_DOMAIN=* | ||
RPC_VHOSTS=* | ||
|
||
WS=true | ||
WS_ADDR=0.0.0.0 | ||
WS_PORT=8546 | ||
WS_API=eth,net,rollup,web3 | ||
WS_ORIGINS=* | ||
|
||
CHAIN_ID=28 | ||
DATADIR=/root/.ethereum | ||
DEV=true | ||
GASPRICE=0 | ||
GCMODE=archive | ||
IPC_DISABLE=true | ||
NETWORK_ID=28 | ||
NO_USB=true | ||
NO_DISCOVER=true | ||
TARGET_GAS_LIMIT=11000000 | ||
USING_OVM=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters