Add extra_hosts for L2 config generation service #5

Merged
nabarun merged 2 commits from deep-stack/fixturenet-optimism-stack:ag-extra-hosts into main 2024-09-04 14:04:26 +00:00
3 changed files with 9 additions and 1 deletions

View File

@ -49,6 +49,8 @@ services:
- l2_config:/l2-config - l2_config:/l2-config
entrypoint: "bash" entrypoint: "bash"
command: "/generate-l2-config.sh" command: "/generate-l2-config.sh"
extra_hosts:
- "host.docker.internal:host-gateway"
# Initializes and runs the L2 execution client (outputs to volume l2_geth_data) # Initializes and runs the L2 execution client (outputs to volume l2_geth_data)
op-geth: op-geth:

View File

@ -14,6 +14,13 @@ l1_deployment_file="/l1-deployment/$DEPLOYMENT_CONTEXT-deploy.json"
l2_allocs_file="/l2-config/allocs-l2.json" l2_allocs_file="/l2-config/allocs-l2.json"
genesis_outfile="/l2-config/genesis.json" genesis_outfile="/l2-config/genesis.json"
rollup_outfile="/l2-config/rollup.json" rollup_outfile="/l2-config/rollup.json"
jwt_file="/l2-config/l2-jwt.txt"
# Create a JWT secret at shared path if not found
if [ ! -f "$jwt_file" ]; then
openssl rand -hex 32 > $jwt_file
echo "Generated JWT secret at $jwt_file"
fi
# Check if genesis.json and rollup.json already exist # Check if genesis.json and rollup.json already exist
if [ -f "$genesis_outfile" ] && [ -f "$rollup_outfile" ]; then if [ -f "$genesis_outfile" ] && [ -f "$rollup_outfile" ]; then

View File

@ -177,6 +177,5 @@ echo "Copying deployment artifacts volume l1_deployment and deploy-config to vol
cp /app/packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT-deploy.json /l1-deployment cp /app/packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT-deploy.json /l1-deployment
cp /app/packages/contracts-bedrock/deploy-config/$DEPLOYMENT_CONTEXT.json /l2-config cp /app/packages/contracts-bedrock/deploy-config/$DEPLOYMENT_CONTEXT.json /l2-config
cp allocs-l2.json /l2-config cp allocs-l2.json /l2-config
openssl rand -hex 32 > /l2-config/l2-jwt.txt
echo "Deployment successful. Exiting" echo "Deployment successful. Exiting"