-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Optimism and add op-proposer (#364)
* Use the latest stable optimism release * Remove unnecessary repos from repo-list * Add op-proposer service to fixturenet-optimism stack * Add jq and bash to op-proposer image * Update instructions * Update op-batcher and op-geth commands Former-commit-id: 988be0e
- Loading branch information
1 parent
10337e7
commit 7f3a335
Showing
18 changed files
with
131 additions
and
22 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/sh | ||
set -e | ||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then | ||
set -x | ||
fi | ||
|
||
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}" | ||
|
||
# Read the L2OutputOracle contract address from the deployment | ||
L2OO_DEPLOYMENT=$(cat /contracts-bedrock/deployments/getting-started/L2OutputOracle.json) | ||
L2OO_ADDR=$(echo "$L2OO_DEPLOYMENT" | jq -r '.address') | ||
|
||
# Get Proposer key from keys.json | ||
PROPOSER_KEY=$(jq -r '.Proposer.privateKey' /l2-accounts/keys.json | tr -d '"') | ||
|
||
cleanup() { | ||
echo "Signal received, cleaning up..." | ||
kill ${proposer_pid} | ||
|
||
wait | ||
echo "Done" | ||
} | ||
trap 'cleanup' INT TERM | ||
|
||
# Run op-proposer | ||
op-proposer \ | ||
--poll-interval 12s \ | ||
--rpc.port 8560 \ | ||
--rollup-rpc http://op-node:8547 \ | ||
--l2oo-address $L2OO_ADDR \ | ||
--private-key $PROPOSER_KEY \ | ||
--l1-eth-rpc $CERC_L1_RPC \ | ||
& | ||
|
||
proposer_pid=$! | ||
wait $proposer_pid |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build cerc/optimism-l2geth | ||
|
||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh | ||
|
||
docker build -t cerc/optimism-l2geth:local ${build_command_args} ${CERC_REPO_BASE_DIR}/op-geth |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build cerc/optimism-op-batcher | ||
# TODO: use upstream Dockerfile once its buildx-specific content has been removed | ||
|
||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
docker build -t cerc/optimism-op-batcher:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/optimism |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build cerc/optimism-op-node | ||
# TODO: use upstream Dockerfile once its buildx-specific content has been removed | ||
|
||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
docker build -t cerc/optimism-op-node:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/optimism |
31 changes: 31 additions & 0 deletions
31
app/data/container-build/cerc-optimism-op-proposer/Dockerfile
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,31 @@ | ||
FROM golang:1.19.0-alpine3.15 as builder | ||
|
||
ARG VERSION=v0.0.0 | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash | ||
|
||
# build op-proposer with the shared go.mod & go.sum files | ||
COPY ./op-proposer /app/op-proposer | ||
COPY ./op-bindings /app/op-bindings | ||
COPY ./op-node /app/op-node | ||
COPY ./op-service /app/op-service | ||
COPY ./op-signer /app/op-signer | ||
COPY ./go.mod /app/go.mod | ||
COPY ./go.sum /app/go.sum | ||
COPY ./.git /app/.git | ||
|
||
WORKDIR /app/op-proposer | ||
|
||
RUN go mod download | ||
|
||
ARG TARGETOS TARGETARCH | ||
|
||
RUN make op-proposer VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
|
||
FROM alpine:3.15 | ||
|
||
RUN apk add --no-cache jq bash | ||
|
||
COPY --from=builder /app/op-proposer/bin/op-proposer /usr/local/bin | ||
|
||
CMD ["op-proposer"] |
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,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build cerc/optimism-op-proposer | ||
|
||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
docker build -t cerc/optimism-op-proposer:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/optimism |
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