initial
This commit is contained in:
1
manta-pacific/.gitignore
vendored
Normal file
1
manta-pacific/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
manta-datadir/*
|
||||
9
manta-pacific/Dockerfile.l2
Normal file
9
manta-pacific/Dockerfile.l2
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:optimism
|
||||
|
||||
RUN apk add --no-cache jq
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
VOLUME ["/db"]
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
||||
12
manta-pacific/Makefile
Normal file
12
manta-pacific/Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
manta-up:
|
||||
@bash ./manta-up.sh
|
||||
.PHONY: manta-up
|
||||
|
||||
manta-down:
|
||||
@(docker-compose -f docker-compose.yml down)
|
||||
.PHONY: manta-down
|
||||
|
||||
manta-clean: manta-down
|
||||
docker image ls 'manta-pacific*' --format='{{.Repository}}' | xargs -r docker rmi
|
||||
docker volume ls --filter name=manta-pacific --format='{{.Name}}' | xargs -r docker volume rm
|
||||
.PHONY: manta-clean
|
||||
17
manta-pacific/README.md
Normal file
17
manta-pacific/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Manta Pacific Replica
|
||||
=============
|
||||
To use: Set the variable `L1_RPC_URL` to your RPC url for Ethereum. Then run `make manta-up`. Syncing the replica from scratch might take up to several days.
|
||||
|
||||
A number of constants have already been set to align with the Manta Pacific mainnet:
|
||||
- the sequencer http url, which allows for transactions sent to the replica node to be forwarded to the sequencer, effectively meaning you can use the replica node like a full rpc provider
|
||||
- the p2p endpoint, which means that the replica can the latest blocks produced from a trusted source
|
||||
|
||||
|
||||
Commands:
|
||||
=========
|
||||
|
||||
make manta-up
|
||||
|
||||
make manta-down
|
||||
|
||||
make manta-clean
|
||||
91
manta-pacific/docker-compose.yml
Normal file
91
manta-pacific/docker-compose.yml
Normal file
@@ -0,0 +1,91 @@
|
||||
version: '3.4'
|
||||
|
||||
volumes:
|
||||
l1_data:
|
||||
l2_data:
|
||||
op_log:
|
||||
|
||||
services:
|
||||
l2:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.l2
|
||||
ports:
|
||||
- "8545:8545"
|
||||
- "8060:6060"
|
||||
volumes:
|
||||
- "${PWD}/manta-datadir:/db"
|
||||
- "${PWD}/manta-genesis.json:/genesis.json"
|
||||
- "${PWD}/jwt-secret.txt:/config/test-jwt-secret.txt"
|
||||
entrypoint:
|
||||
- "/bin/sh"
|
||||
- "/entrypoint.sh"
|
||||
- "--rollup.sequencerhttp=https://manta-pacific.calderachain.xyz/http"
|
||||
- "--authrpc.jwtsecret=/config/test-jwt-secret.txt"
|
||||
|
||||
light:
|
||||
container_name: celestia-light-node
|
||||
stop_signal: SIGINT
|
||||
restart: always
|
||||
user: root
|
||||
image: "ghcr.io/celestiaorg/celestia-node:v0.12.1"
|
||||
command: celestia light start --gateway --core.ip consensus.lunaroasis.net --gateway.addr light --gateway.port 26659
|
||||
environment:
|
||||
- NODE_TYPE=light
|
||||
volumes:
|
||||
- /home/ubuntu/.celestia-light/:/home/celestia/.celestia-light/
|
||||
ports:
|
||||
- "26657:26657"
|
||||
- "26658:26658"
|
||||
- "26659:26659"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:26659/header/1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
op-node:
|
||||
depends_on:
|
||||
- l2
|
||||
image: "public.ecr.aws/i6b2w2n6/op-node:celestia-3.0.0-dencun"
|
||||
stop_signal: SIGINT
|
||||
stop_grace_period: 30s
|
||||
environment:
|
||||
OP_NODE_S3_BUCKET: "caldera-celestia-cache-prod"
|
||||
OP_NODE_NAMESPACE_ID: 866269ddf77dbc40ed9d
|
||||
# OP_NODE_DA_RPC: "http://light:26658"
|
||||
# OP_NODE_AUTH_TOKEN: ${OP_NODE_AUTH_TOKEN}
|
||||
OP_NODE_S3_REGION: 'us-west-2'
|
||||
command: >
|
||||
op-node
|
||||
--l1="${L1_RPC_URL}"
|
||||
--l2=http://l2:8551
|
||||
--l2.jwt-secret=/config/test-jwt-secret.txt
|
||||
--sequencer.enabled=false
|
||||
--verifier.l1-confs=10
|
||||
--rollup.config=/rollup.json
|
||||
--rpc.addr=0.0.0.0
|
||||
--rpc.port=8545
|
||||
--p2p.no-discovery=false
|
||||
--p2p.listen.ip=0.0.0.0
|
||||
--p2p.listen.tcp=9003
|
||||
--p2p.listen.udp=9003
|
||||
--p2p.static=/ip4/35.82.210.70/tcp/9003/p2p/16Uiu2HAmL4fvgBQi5jcuiEYDaNcg4hpGqCmyAv4DZuSM8f2USYwQ
|
||||
--snapshotlog.file=/op_log/snapshot.log
|
||||
--p2p.priv.path=/config/p2p-node-key.txt
|
||||
--metrics.enabled
|
||||
--metrics.addr=0.0.0.0
|
||||
--metrics.port=7300
|
||||
--pprof.enabled
|
||||
--rpc.enable-admin
|
||||
ports:
|
||||
- "7545:8545"
|
||||
- "9003:9003"
|
||||
- "7300:7300"
|
||||
- "6060:6060"
|
||||
volumes:
|
||||
- "${PWD}/p2p-node-key.txt:/config/p2p-node-key.txt"
|
||||
- "${PWD}/jwt-secret.txt:/config/test-jwt-secret.txt"
|
||||
- "${PWD}/manta-rollup.json:/rollup.json"
|
||||
- op_log:/op_log
|
||||
68
manta-pacific/entrypoint.sh
Normal file
68
manta-pacific/entrypoint.sh
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
set -exu
|
||||
|
||||
VERBOSITY=${GETH_VERBOSITY:-3}
|
||||
GETH_DATA_DIR=/db
|
||||
GETH_CHAINDATA_DIR="$GETH_DATA_DIR/geth/chaindata"
|
||||
GETH_KEYSTORE_DIR="$GETH_DATA_DIR/keystore"
|
||||
GENESIS_FILE_PATH="${GENESIS_FILE_PATH:-/genesis.json}"
|
||||
CHAIN_ID=$(cat "$GENESIS_FILE_PATH" | jq -r .config.chainId)
|
||||
BLOCK_SIGNER_PRIVATE_KEY="3e4bde571b86929bf08e2aaad9a6a1882664cd5e65b96fff7d03e1c4e6dfa15c"
|
||||
BLOCK_SIGNER_ADDRESS="0xca062b0fd91172d89bcd4bb084ac4e21972cc467"
|
||||
RPC_PORT="${RPC_PORT:-8545}"
|
||||
WS_PORT="${WS_PORT:-8546}"
|
||||
|
||||
if [ ! -d "$GETH_KEYSTORE_DIR" ]; then
|
||||
echo "$GETH_KEYSTORE_DIR missing, running account import"
|
||||
echo -n "pwd" > "$GETH_DATA_DIR"/password
|
||||
echo -n "$BLOCK_SIGNER_PRIVATE_KEY" | sed 's/0x//' > "$GETH_DATA_DIR"/block-signer-key
|
||||
geth account import \
|
||||
--datadir="$GETH_DATA_DIR" \
|
||||
--password="$GETH_DATA_DIR"/password \
|
||||
"$GETH_DATA_DIR"/block-signer-key
|
||||
else
|
||||
echo "$GETH_KEYSTORE_DIR exists."
|
||||
fi
|
||||
|
||||
if [ ! -d "$GETH_CHAINDATA_DIR" ]; then
|
||||
echo "$GETH_CHAINDATA_DIR missing, running init"
|
||||
echo "Initializing genesis."
|
||||
geth --verbosity="$VERBOSITY" init \
|
||||
--datadir="$GETH_DATA_DIR" \
|
||||
"$GENESIS_FILE_PATH"
|
||||
else
|
||||
echo "$GETH_CHAINDATA_DIR exists."
|
||||
fi
|
||||
|
||||
# Warning: Archive mode is required, otherwise old trie nodes will be
|
||||
# pruned within minutes of starting the devnet.
|
||||
|
||||
exec geth \
|
||||
--datadir="$GETH_DATA_DIR" \
|
||||
--verbosity="$VERBOSITY" \
|
||||
--http \
|
||||
--http.corsdomain="*" \
|
||||
--http.vhosts="*" \
|
||||
--http.addr=0.0.0.0 \
|
||||
--http.port="$RPC_PORT" \
|
||||
--http.api=web3,debug,eth,txpool,net,engine \
|
||||
--ws \
|
||||
--ws.addr=0.0.0.0 \
|
||||
--ws.port="$WS_PORT" \
|
||||
--ws.origins="*" \
|
||||
--ws.api=debug,eth,txpool,net,engine \
|
||||
--syncmode=full \
|
||||
--nodiscover \
|
||||
--maxpeers=1 \
|
||||
--networkid=$CHAIN_ID \
|
||||
--password="$GETH_DATA_DIR"/password \
|
||||
--allow-insecure-unlock \
|
||||
--authrpc.addr="0.0.0.0" \
|
||||
--authrpc.port="8551" \
|
||||
--authrpc.vhosts="*" \
|
||||
--authrpc.jwtsecret=/config/jwt-secret.txt \
|
||||
--gcmode=archive \
|
||||
--metrics \
|
||||
--metrics.addr=0.0.0.0 \
|
||||
--metrics.port=6060 \
|
||||
"$@"
|
||||
1
manta-pacific/jwt-secret.txt
Normal file
1
manta-pacific/jwt-secret.txt
Normal file
@@ -0,0 +1 @@
|
||||
688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a
|
||||
14472
manta-pacific/manta-genesis.json
Normal file
14472
manta-pacific/manta-genesis.json
Normal file
File diff suppressed because one or more lines are too long
29
manta-pacific/manta-rollup.json
Normal file
29
manta-pacific/manta-rollup.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"genesis": {
|
||||
"l1": {
|
||||
"hash": "0x33d4fd43c91d410bf27cf46d013000a2f010037756c49fc2f9e83c673f69f3f1",
|
||||
"number": 18095650
|
||||
},
|
||||
"l2": {
|
||||
"hash": "0x710b33d206fc550549c39801e9c1ca80d85399bf6e0881987e40e706c2f2f453",
|
||||
"number": 0
|
||||
},
|
||||
"l2_time": 1694223959,
|
||||
"system_config": {
|
||||
"batcherAddr": "0xa76e31d8471d569efdd3d95d1b11ce6710f4533f",
|
||||
"overhead": "0x0000000000000000000000000000000000000000000000000000000000000834",
|
||||
"scalar": "0x000000000000000000000000000000000000000000000000000000000013d620",
|
||||
"gasLimit": 30000000
|
||||
}
|
||||
},
|
||||
"block_time": 10,
|
||||
"max_sequencer_drift": 600,
|
||||
"seq_window_size": 21600,
|
||||
"channel_timeout": 300,
|
||||
"l1_chain_id": 1,
|
||||
"l2_chain_id": 169,
|
||||
"regolith_time": 0,
|
||||
"batch_inbox_address": "0xaeba8e2307a22b6824a9a7a39f8b016c357cd1fe",
|
||||
"deposit_contract_address": "0x9168765ee952de7c6f8fc6fad5ec209b960b7622",
|
||||
"l1_system_config_address": "0x895e00269a05848f3c9889efa677d02ff7351a5d"
|
||||
}
|
||||
50
manta-pacific/manta-up.sh
Normal file
50
manta-pacific/manta-up.sh
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
export L1_RPC_URL=$L1_RPC_URL
|
||||
L2_URL="http://localhost:8545"
|
||||
OP_NODE="$PWD/op-node"
|
||||
|
||||
# Helper method that waits for a given URL to be up. Can't use
|
||||
# cURL's built-in retry logic because connection reset errors
|
||||
# are ignored unless you're using a very recent version of cURL
|
||||
function wait_up {
|
||||
echo -n "Waiting for $1 to come up..."
|
||||
i=0
|
||||
until curl -s -f -o /dev/null "$1"
|
||||
do
|
||||
echo -n .
|
||||
sleep 0.25
|
||||
|
||||
((i=i+1))
|
||||
if [ "$i" -eq 300 ]; then
|
||||
echo " Timeout!" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "Done!"
|
||||
}
|
||||
|
||||
openssl rand -hex 32 &> p2p-node-key.txt
|
||||
celestia light init
|
||||
export OP_NODE_AUTH_TOKEN=$(celestia light auth admin)
|
||||
(
|
||||
echo "Bringing up celestia light node..."
|
||||
docker-compose -f docker-compose.yml up -d light
|
||||
)
|
||||
|
||||
# Bring up L2.
|
||||
(
|
||||
echo "Bringing up L2..."
|
||||
docker-compose -f docker-compose.yml up -d l2
|
||||
wait_up $L2_URL
|
||||
)
|
||||
|
||||
# Bring up everything else.
|
||||
(
|
||||
echo "Bringing up L2 services..."
|
||||
docker-compose up -d op-node
|
||||
)
|
||||
|
||||
echo "L2 ready."
|
||||
1
manta-pacific/p2p-node-key.txt
Normal file
1
manta-pacific/p2p-node-key.txt
Normal file
@@ -0,0 +1 @@
|
||||
2807a809ac05abab102331ece427514cce905fa9ec3653a040ca1f52c7b1e882
|
||||
89
op-manta-pacific.yml
Normal file
89
op-manta-pacific.yml
Normal file
@@ -0,0 +1,89 @@
|
||||
version: '3.4'
|
||||
|
||||
volumes:
|
||||
manta-pacific-celestia-light:
|
||||
manta-pacific:
|
||||
|
||||
services:
|
||||
manta-pacific:
|
||||
build:
|
||||
context: ./manta-pacific
|
||||
dockerfile: Dockerfile.l2
|
||||
ports:
|
||||
- "8545:8545"
|
||||
- "8060:6060"
|
||||
volumes:
|
||||
- "manta-pacific:/db"
|
||||
- "./manta-pacific/manta-genesis.json:/genesis.json"
|
||||
- "./jwtsecret:/config/test-jwt-secret.txt"
|
||||
entrypoint:
|
||||
- "/bin/sh"
|
||||
- "/entrypoint.sh"
|
||||
- "--rollup.sequencerhttp=https://manta-pacific.calderachain.xyz/http"
|
||||
- "--authrpc.jwtsecret=/config/test-jwt-secret.txt"
|
||||
|
||||
manta-pacific-da:
|
||||
container_name: celestia-light-node
|
||||
stop_signal: SIGINT
|
||||
restart: always
|
||||
user: root
|
||||
image: "ghcr.io/celestiaorg/celestia-node:v0.12.1"
|
||||
command: celestia light start --gateway --core.ip consensus.lunaroasis.net --gateway.addr light --gateway.port 26659
|
||||
environment:
|
||||
- NODE_TYPE=light
|
||||
volumes:
|
||||
- manta-pacific-celestia-light:/home/celestia/.celestia-light/
|
||||
ports:
|
||||
- "26657:26657"
|
||||
- "26658:26658"
|
||||
- "26659:26659"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:26659/header/1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
manta-pacific-node:
|
||||
depends_on:
|
||||
- manta-pacific
|
||||
image: "public.ecr.aws/i6b2w2n6/op-node:celestia-3.0.0-dencun"
|
||||
stop_signal: SIGINT
|
||||
stop_grace_period: 30s
|
||||
environment:
|
||||
OP_NODE_S3_BUCKET: "caldera-celestia-cache-prod"
|
||||
OP_NODE_NAMESPACE_ID: 866269ddf77dbc40ed9d
|
||||
# OP_NODE_DA_RPC: "http://light:26658"
|
||||
# OP_NODE_AUTH_TOKEN: ${OP_NODE_AUTH_TOKEN}
|
||||
OP_NODE_S3_REGION: 'us-west-2'
|
||||
command: >
|
||||
op-node
|
||||
--l1="${MANTA_PACIFIC_ETHEREUM_MAINNET_RPC_URL}"
|
||||
--l2=http://manta-pacific:8551
|
||||
--l2.jwt-secret=/config/test-jwt-secret.txt
|
||||
--sequencer.enabled=false
|
||||
--verifier.l1-confs=10
|
||||
--rollup.config=/rollup.json
|
||||
--rpc.addr=0.0.0.0
|
||||
--rpc.port=8545
|
||||
--p2p.no-discovery=false
|
||||
--p2p.listen.ip=0.0.0.0
|
||||
--p2p.listen.tcp=9003
|
||||
--p2p.listen.udp=9003
|
||||
--p2p.static=/ip4/35.82.210.70/tcp/9003/p2p/16Uiu2HAmL4fvgBQi5jcuiEYDaNcg4hpGqCmyAv4DZuSM8f2USYwQ
|
||||
--p2p.priv.path=/config/p2p-node-key.txt
|
||||
--metrics.enabled
|
||||
--metrics.addr=0.0.0.0
|
||||
--metrics.port=7300
|
||||
--pprof.enabled
|
||||
--rpc.enable-admin
|
||||
ports:
|
||||
- "7545:8545"
|
||||
- "9003:9003"
|
||||
- "7300:7300"
|
||||
- "6060:6060"
|
||||
volumes:
|
||||
- "./manta-pacific/p2p-node-key.txt:/config/p2p-node-key.txt"
|
||||
- "./jwtsecret:/config/test-jwt-secret.txt"
|
||||
- "./manta-pacific/manta-rollup.json:/rollup.json"
|
||||
|
||||
@@ -101,6 +101,17 @@
|
||||
"arb-alephzero-mainnet"
|
||||
]
|
||||
},
|
||||
"manta-pacific": {
|
||||
"id": 169,
|
||||
"urls": ["https://manta-pacific-gascap.calderachain.xyz/http"],
|
||||
"default": ["op-manta-pacific"]
|
||||
},
|
||||
"manta-pacific-sepolia": {
|
||||
"id": 3441005 ,
|
||||
"urls": ["https://manta-testnet.calderachain.xyz/http"],
|
||||
"default": ["op-manta-pacific-sepolia"]
|
||||
},
|
||||
|
||||
"everclear-sepolia": {
|
||||
"id": 6398,
|
||||
"urls": [
|
||||
|
||||
Reference in New Issue
Block a user