forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'boba/boba-develop' into jyellick/merge-…
…usptream-plus-fixes-20230821
- Loading branch information
Showing
26 changed files
with
581 additions
and
76 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,59 @@ | ||
name: Publish Packages (boba-develop) | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'boba-develop' | ||
|
||
jobs: | ||
publish-develop: | ||
name: Publish Packages | ||
runs-on: ubuntu-latest | ||
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | ||
|
||
- name: Build l1 component | ||
working-directory: ./ops-bedrock | ||
run: | | ||
docker build . -f ./Dockerfile.l1 -t bobanetwork/geth:latest | ||
- name: Build l2 components | ||
working-directory: . | ||
run: | | ||
docker build . -f ./ops-bedrock/Dockerfile.l2-erigon -t bobanetwork/erigon:latest | ||
docker build . -f ./op-node/Dockerfile -t bobanetwork/op-node:latest | ||
docker build . -f ./op-proposer/Dockerfile -t bobanetwork/op-proposer:latest | ||
docker build . -f ./op-batcher/Dockerfile -t bobanetwork/op-batcher:latest | ||
- name: Print images | ||
working-directory: . | ||
run: docker images | ||
|
||
- name: Rename and retag images | ||
working-directory: . | ||
run: | | ||
for i in $(docker images --format "{{.Repository}}:{{.Tag}}" | grep bobanetwork); do | ||
docker image tag "$i" bobanetwork/$(echo $i | awk -F'/' '{print $2}' | awk -F':' '{print $1}'):latest | ||
done | ||
docker images | ||
- name: Push images | ||
working-directory: . | ||
run: | | ||
for i in $(docker images --format "{{.Repository}}:{{.Tag}}" | grep bobanetwork); do | ||
echo "$1" | ||
docker push "$i" | ||
done |
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,58 @@ | ||
name: Publish Packages (boba-master) | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish-develop: | ||
name: Publish Packages | ||
runs-on: ubuntu-latest | ||
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | ||
|
||
- name: Get the version | ||
id: tag | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
|
||
- name: Print current tag | ||
run: echo ${{ steps.tag.outputs.VERSION }} | ||
|
||
- name: Build l1 component | ||
working-directory: ./ops-bedrock | ||
run: | | ||
docker build . -f ./Dockerfile.l1 -t bobanetwork/geth:${{ steps.tag.outputs.VERSION }} | ||
- name: Build l2 components | ||
working-directory: . | ||
run: | | ||
docker build . -f ./ops-bedrock/Dockerfile.l2-erigon -t bobanetwork/erigon:${{ steps.tag.outputs.VERSION }} | ||
docker build . -f ./op-node/Dockerfile -t bobanetwork/op-node:${{ steps.tag.outputs.VERSION }} | ||
docker build . -f ./op-proposer/Dockerfile -t bobanetwork/op-proposer:${{ steps.tag.outputs.VERSION }} | ||
docker build . -f ./op-batcher/Dockerfile -t bobanetwork/op-batcher:${{ steps.tag.outputs.VERSION }} | ||
- name: Print images | ||
working-directory: . | ||
run: docker images | ||
|
||
- name: Push images | ||
working-directory: . | ||
run: | | ||
for i in $(docker images --format "{{.Repository}}:{{.Tag}}" | grep bobanetwork); do | ||
echo "$1" | ||
docker push "$i" | ||
done |
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
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,77 @@ | ||
# Running a replica node | ||
|
||
## Docker configuration | ||
|
||
Here are instructions if you want to run boba erigon version as the replica node for OP Mainnet or Testnet. | ||
|
||
### Get the data dir | ||
|
||
The first step is to download the initial data for `op-erigon`. Thanks for the contribution from [Test in Prod](https://www.testinprod.io). | ||
|
||
1. Download the correct data directory snapshot. | ||
|
||
* [OP Mainnet](https://op-erigon-backup.mainnet.testinprod.io) | ||
* [OP Goerli](https://op-erigon-backup.goerli.testinprod.io) | ||
|
||
2. Create the data directory and fill it. | ||
|
||
```bash | ||
cd op-anchorage/boba-community | ||
mkdir op-db | ||
cd ./op-db | ||
tar xvf ~/[DIR]/op-erigon-goerli.tar | ||
``` | ||
|
||
3. Create a shared secret (JWT token) | ||
|
||
```bash | ||
cd op-anchorage/boba-community | ||
openssl rand -hex 32 > jwt-secret.txt | ||
``` | ||
|
||
### Create a .env file | ||
|
||
Create a `.env` file in `boba-community`. | ||
|
||
``` | ||
VERSION= | ||
ETH1_HTTP= | ||
``` | ||
|
||
> This step is optional, but we recommand you to use a latest release image for `VERSION`. Otherwise, it pulls the image with the `latest` tag. | ||
### Modify volume location | ||
|
||
The volumes of l2 and op-node should be modified to your file locations. | ||
|
||
```yaml | ||
l2: | ||
volumes: | ||
- ./jwt-secret.txt:/config/jwt-secret.txt | ||
- DATA_DIR:/db | ||
op-node: | ||
volumes: | ||
- ./jwt-secret.txt:/config/jwt-secret.txt | ||
``` | ||
### Start your replica node | ||
```bash | ||
docker-compose -f docker-compose-op-goerli.yml up -d | ||
``` | ||
|
||
### The initial synchornization | ||
|
||
During the initial synchonization, you get log messages from `op-node`, and nothing else appears to happen. | ||
|
||
```bash | ||
INFO [08-04|16:36:07.150] Advancing bq origin origin=df76ff..48987e:8301316 originBehind=false | ||
``` | ||
|
||
After a few minutes, `op-node` finds the right batch and then it starts synchronizing. During this synchonization process, you get log messags from `op-node`. | ||
|
||
```bash | ||
INFO [08-04|16:36:01.204] Found next batch epoch=44e203..fef9a5:8301309 batch_epoch=8301309 batch_timestamp=1,673,567,518 | ||
INFO [08-04|16:36:01.205] generated attributes in payload queue txs=2 timestamp=1,673,567,518 | ||
INFO [08-04|16:36:01.265] inserted block hash=ee61ee..256300 number=4,069,725 state_root=a582ae..33a7c5 timestamp=1,673,567,518 parent=5b102e..13196c prev_randao=4758ca..11ff3a fee_recipient=0x4200000000000000000000000000000000000011 txs=2 update_safe=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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: '3.4' | ||
|
||
services: | ||
l2: | ||
image: bobanetwork/erigon:${VERSION:-latest} | ||
environment: | ||
- CHAIN_NAME=optimism-goerli | ||
ports: | ||
- "9545:8545" | ||
- "8551:8551" | ||
volumes: | ||
- ./jwt-secret.txt:/config/jwt-secret.txt | ||
- DATA_DIR:/db | ||
op-node: | ||
depends_on: | ||
- l2 | ||
image: bobanetwork/op-node:${VERSION:-latest} | ||
command: > | ||
op-node | ||
--l1=${ETH1_HTTP:-https://ethereum-goerli.publicnode.com} | ||
--l2=http://l2:8551 | ||
--l2.jwt-secret=/config/jwt-secret.txt | ||
--network=goerli | ||
--rpc.addr=0.0.0.0 | ||
--rpc.port=8547 | ||
--l1.trustrpc=true | ||
--p2p.disable=true | ||
ports: | ||
- "8547:8547" | ||
volumes: | ||
- ./jwt-secret.txt:/config/jwt-secret.txt | ||
restart: always |
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,32 @@ | ||
version: '3.4' | ||
|
||
services: | ||
l2: | ||
image: bobanetwork/erigon:${VERSION:-latest} | ||
environment: | ||
- CHAIN_NAME=optimism-mainnet | ||
ports: | ||
- "9545:8545" | ||
- "8551:8551" | ||
volumes: | ||
- ./jwt-secret.txt:/config/jwt-secret.txt | ||
- DATA_DIR:/db | ||
op-node: | ||
depends_on: | ||
- l2 | ||
image: bobanetwork/op-node:${VERSION:-latest} | ||
command: > | ||
op-node | ||
--l1=${ETH1_HTTP:-https://ethereum.publicnode.com} | ||
--l2=http://l2:8551 | ||
--l2.jwt-secret=/config/jwt-secret.txt | ||
--network=mainnet | ||
--rpc.addr=0.0.0.0 | ||
--rpc.port=8547 | ||
--l1.trustrpc=true | ||
--p2p.disable=true | ||
ports: | ||
- "8547:8547" | ||
volumes: | ||
- ./jwt-secret.txt:/config/jwt-secret.txt | ||
restart: always |
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
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
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
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
Oops, something went wrong.