missing files
This commit is contained in:
31
base/Dockerfile-erigon
Normal file
31
base/Dockerfile-erigon
Normal file
@@ -0,0 +1,31 @@
|
||||
FROM golang:1.19 as op
|
||||
|
||||
RUN apk add --no-cache make g++ gcc musl-dev linux-headers git
|
||||
ARG ERIGON_VERSION=v2.48.1
|
||||
ARG ERIGON_REPOSITORY=https://github.com/ledgerwatch/erigon.git
|
||||
|
||||
RUN git clone --recurse-submodules -j8 $ERIGON_REPOSITORY
|
||||
|
||||
WORKDIR ./erigon
|
||||
|
||||
RUN git checkout ${ERIGON_VERSION}
|
||||
|
||||
RUN make erigon
|
||||
|
||||
|
||||
FROM golang:1.19
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y jq curl && \
|
||||
rm -rf /var/lib/apt/lists
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=op /app/op-node/bin/op-node ./
|
||||
COPY --from=op-erigon /go/erigon/build/bin/erigon ./
|
||||
|
||||
COPY erigon-entrypoint .
|
||||
COPY op-node-entrypoint .
|
||||
COPY goerli ./goerli
|
||||
COPY mainnet ./mainnet
|
||||
48
base/erigon-entrypoint
Normal file
48
base/erigon-entrypoint
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
# exit script on any error
|
||||
set -e
|
||||
|
||||
ERIGON_HOME=/root/.local/share/erigon
|
||||
OP_GETH_GENESIS_FILE_PATH="${OP_GETH_GENESIS_FILE_PATH:-/genesis.json}"
|
||||
CHAIN_ID=$(jq -r .config.chainId < "$OP_GETH_GENESIS_FILE_PATH")
|
||||
RPC_PORT="${RPC_PORT:-8545}"
|
||||
WS_PORT="${WS_PORT:-8546}"
|
||||
AUTHRPC_PORT="${AUTHRPC_PORT:-8551}"
|
||||
METRICS_PORT="${METRICS_PORT:-6060}"
|
||||
HOST_IP="0.0.0.0"
|
||||
P2P_PORT="${P2P_PORT:-30303}"
|
||||
|
||||
|
||||
if [ ! -f "${ERIGON_HOME}/bootstrapped" ];
|
||||
then
|
||||
echo "write the custom genesis block"
|
||||
mkdir -p ${ERIGON_HOME:-/root/.local/share/erigon}
|
||||
erigon init --datadir ${ERIGON_HOME:-/root/.local/share/erigon} $OP_GETH_GENESIS_FILE_PATH
|
||||
fi
|
||||
|
||||
echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH"
|
||||
|
||||
exec erigon \
|
||||
--private.api.addr=localhost:9090 \
|
||||
--port=$P2P_PORT
|
||||
--http.api=eth,debug,net,trace,web3,erigon \
|
||||
--http.addr=0.0.0.0 \
|
||||
--http.port=8545 \
|
||||
--http.corsdomain="*" \
|
||||
--http.vhosts="*" \
|
||||
--authrpc.addr=0.0.0.0 \
|
||||
--authrpc.port=8551 \
|
||||
--authrpc.vhosts="*" \
|
||||
--authrpc.jwtsecret=${OP_NODE_L2_ENGINE_AUTH}
|
||||
--rollup.sequencerhttp="$OP_GETH_SEQUENCER_HTTP"
|
||||
--rollup.historicalrpc="http://optimism-l2geth:8545"
|
||||
--chain=optimism-mainnet
|
||||
--networkid=$CHAIN_ID
|
||||
--ws
|
||||
--ws.port=8545
|
||||
--nodiscover
|
||||
volumes:
|
||||
- erigon-optimism-bedrock:/root/.local/share/erigon
|
||||
- .jwtsecret:/jwtsecret
|
||||
|
||||
Reference in New Issue
Block a user