Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #202 from omgnetwork/develop
Browse files Browse the repository at this point in the history
Grizzly release v0.0.3
  • Loading branch information
InoMurko authored Dec 2, 2021
2 parents d511ce7 + 748368b commit cd4e401
Show file tree
Hide file tree
Showing 341 changed files with 63,958 additions and 3,795 deletions.
41 changes: 3 additions & 38 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Bring the stack up
working-directory: ./ops
run: docker-compose up -d
run: docker-compose up -d -V

- name: Wait for the Sequencer node
working-directory: ./ops
Expand All @@ -71,44 +71,9 @@ jobs:
working-directory: ./ops
run: docker-compose -f docker-compose.yml logs --follow &

# this test jitters - in any case, later tests will fail if the boba_deployer does not come up
- name: Test serving BOBA contracts
working-directory: ./
run: |
RETRIES=60
URL=http://127.0.0.1:8080/addresses.json
until $(curl --silent --fail --output /dev/null "$URL"); do
sleep 20s
echo "Will wait $((RETRIES--)) more times for $URL to be up..."
if [ "$RETRIES" -lt 0 ]; then
echo "Timeout waiting for base contract deployment"
exit 1
fi
done
echo "BOBA base contracts are deployed"
RETRIES=60
URL2=http://127.0.0.1:8080/boba-addr.json
until $(curl --silent --fail --output /dev/null "$URL2"); do
sleep 20s
echo "Will wait $((RETRIES--)) more times for $URL2 to be up..."
if [ "$RETRIES" -lt 0 ]; then
echo "Timeout waiting for Boba contract deployment"
exit 1
fi
done
echo "BOBA contracts are deployed"
echo $(curl --silent $URL2)
L2LIQUIDITY_POOL=$(curl --silent $URL2 | jq -r .L2LiquidityPool)
echo $L2LIQUIDITY_POOL
if [[ $L2LIQUIDITY_POOL =~ "0x" ]]; then
echo "Pass: Found L2 Liquidity Pool contract address"
exit 0
else
echo "Error: Did not find L2 Liquidity Pool contract address"
exit 1
fi
working-directory: ./ops
run: ./scripts/wait-for-boba.sh

- name: Run the integration tests
working-directory: ./ops
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/repo-sync.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,21 @@ packages/regenesis-surgery/state-dump
# monitor
ops_boba/api/watcher-api/env-rinkeby.yml
ops_boba/api/watcher-api/env-mainnet.yml
ops_boba/api/watcher-api/env.yml
ops_boba/monitor/yarn.lock
ops_boba/api/watcher-api/.serverless

# gateway
packages/boba/gateway/build
packages/boba/gateway/public/env.js

# subgraph
/packages/boba/subgraph/L1/yarn.lock
/packages/boba/subgraph/L2/yarn.lock
/packages/boba/subgraph/L1/build
/packages/boba/subgraph/L2/build
/packages/boba/subgraph/L1/generated
/packages/boba/subgraph/L2/generated

# api
env-mainnet.yml
51 changes: 51 additions & 0 deletions boba_community/boba-node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Running a Boba node (replica)

This material has been moved to the main Boba user docs [here](https://docs.boba.network/developer-docs/011_running_replica_node).

## Minimal Instructions

This repo runs a local replica of the Boba L2geth, which is useful for generating analyics for blockexplorers.

## Prerequisites

\- docker
\- docker-compose

## Start Replica service

**Requirements**: you will need a command line and Docker. Before filing GitHub issues, please make sure Docker is installed and *running*.

**Open a terminal window**. Clone the project and install needed dependencies:

```bash
$ git clone [email protected]:omgnetwork/optimism-v2.git
$ cd optimism-v2
$ yarn install
$ yarn build
```

Then, add your Infura key to `boba_community/boba-node/docker-compose-replica.yaml`. If you do not have an Infura key, you can obtain one for free from [Infura](https://infura.io).

```bash
x-l1_rpc_dtl: &l1_rpc_dtl
DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: 'https://mainnet.infura.io/v3/YOUR_INFURA_KEY'

x-l1_rpc_geth: &l1_rpc_geth
ETH1_HTTP: 'https://mainnet.infura.io/v3/YOUR_INFURA_KEY'
```

Next, build the packages:

```bash

docker-compose -f docker-compose-replica.yml build

```

Finally, bring up the services

```bash

docker-compose -f docker-compose-replica.yml up

```
67 changes: 67 additions & 0 deletions boba_community/boba-node/docker-compose-replica.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

x-l1_rpc_dtl: &l1_rpc_dtl
DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: 'https://mainnet.infura.io/v3/YOUR_INFURA_KEY'

x-l1_rpc_geth: &l1_rpc_geth
ETH1_HTTP: 'https://mainnet.infura.io/v3/YOUR_INFURA_KEY'

version: "3"

networks:
default:
external: true
name: ops_default

services:
builder:
image: bobanetwork/builder:latest
build:
context: ../..
dockerfile: ./ops/docker/Dockerfile.monorepo

dtl:
image: bobanetwork/data-transport-layer:latest
build:
context: ..
dockerfile: ./boba-node/docker/Dockerfile.data-transport-layer
env_file:
- ../../ops/envs/dtl.env
environment:
<< : *l1_rpc_dtl
DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: https://lightning-replica.boba.network
DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true'
DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 288
DATA_TRANSPORT_LAYER__ETH1_CTC_DEPLOYMENT_HEIGHT: 13502893
DATA_TRANSPORT_LAYER__POLLING_INTERVAL: 10000
DATA_TRANSPORT_LAYER__ADDRESS_MANAGER: '0x8376ac6C3f73a25Dd994E0b0669ca7ee0C02F089'
ports:
- ${DTL_PORT:-7878}:7878
- ${REGISTRY_PORT:-8080}:8081

replica:
depends_on:
- dtl
image: bobanetwork/l2geth:latest
deploy:
replicas: 1
build:
context: ../..
dockerfile: ./ops/docker/Dockerfile.geth
entrypoint: sh ./geth.sh
env_file:
- ../../ops/envs/geth.env
environment:
<< : *l1_rpc_geth
ROLLUP_TIMESTAMP_REFRESH: 5s
ROLLUP_STATE_DUMP_PATH: http://dtl:8081/state-dump.latest.json
ROLLUP_CLIENT_HTTP: http://dtl:7878
ROLLUP_BACKEND: 'l2'
ROLLUP_VERIFIER_ENABLE: 'true'
RETRIES: 60
# no need to keep this secret, only used internally to sign blocks
BLOCK_SIGNER_KEY: "6587ae678cf4fc9a33000cdbf9f35226b71dcc6a4684a31203241f9bcfd55d27"
BLOCK_SIGNER_ADDRESS: "0x00000398232E2064F896018496b4b44b3D62751F"
ROLLUP_POLL_INTERVAL_FLAG: "10s"
ports:
- ${L2GETH_HTTP_PORT:-8549}:8545
- ${L2GETH_WS_PORT:-8550}:8546
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM bobanetwork/data-transport-layer

COPY boba-node/docker/state-dump.latest.json /opt/optimism/packages/data-transport-layer/state-dumps/state-dump.latest.json

ENTRYPOINT ["node", "dist/src/services/run.js"]
Loading

0 comments on commit cd4e401

Please sign in to comment.