Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions espresso/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ services:
- sh
- -c
- |
echo "Delaying op-batcher-tee for 45 minutes..."
sleep 2700
export DEPLOYMENT_MODE=local
export L1_RPC_URL="http://127.0.0.1:${L1_HTTP_PORT}"
export L2_RPC_URL="http://127.0.0.1:${OP_HTTP_PORT}"
Expand Down Expand Up @@ -446,6 +448,34 @@ services:
OP_PROPOSER_HD_PATH: "m/44'/60'/0'/0/1"
OP_PROPOSER_GAME_TYPE: '1'

op-proposer-tee:
profiles: [ "tee" ]
build:
context: ../
dockerfile: espresso/docker/op-stack/Dockerfile
target: op-proposer-target
image: op-proposer:espresso
depends_on:
l1-data-init:
condition: service_completed_successfully
l2-rollup:
condition: service_completed_successfully
op-node-sequencer:
condition: service_started
op-batcher-tee:
condition: service_started
volumes:
- ../packages/contracts-bedrock/lib/superchain-registry/ops/testdata/monorepo:/config
- ./deployment/deployer:/deployer
environment:
OP_PROPOSER_L1_ETH_RPC: http://l1-geth:${L1_HTTP_PORT}
OP_PROPOSER_ROLLUP_RPC: http://op-node-sequencer:${ROLLUP_PORT}
OP_PROPOSER_PROPOSAL_INTERVAL: 6s
OP_PROPOSER_MNEMONIC: "test test test test test test test test test test test junk"
OP_PROPOSER_HD_PATH: "m/44'/60'/0'/0/1"
OP_PROPOSER_GAME_TYPE: '1'


op-challenger:
profiles: [ "default" ]
build:
Expand Down
24 changes: 24 additions & 0 deletions espresso/scripts/shutdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,27 @@
# This script shuts down devnet services.

docker compose down -v

# Stop and remove containers built from op-batcher-tee:espresso image
echo "Stopping containers built from op-batcher-tee:espresso image..."
CONTAINERS=$(docker ps -q --filter "ancestor=op-batcher-tee:espresso")
if [ ! -z "$CONTAINERS" ]; then
echo "Stopping containers: $CONTAINERS"
docker stop $CONTAINERS
docker rm $CONTAINERS
echo "Containers stopped and removed"
else
echo "No running containers found with op-batcher-tee:espresso image"
fi

# Stop and remove batcher-enclaver containers that run the eif
echo "Stopping batcher-enclaver containers..."
ENCLAVE_CONTAINERS=$(docker ps -aq --filter "name=batcher-enclaver-")
if [ ! -z "$ENCLAVE_CONTAINERS" ]; then
echo "Stopping enclave containers: $ENCLAVE_CONTAINERS"
docker stop $ENCLAVE_CONTAINERS 2>/dev/null || true
docker rm $ENCLAVE_CONTAINERS 2>/dev/null || true
echo "Enclave containers stopped and removed"
else
echo "No batcher-enclaver containers found"
fi
19 changes: 17 additions & 2 deletions espresso/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ echo "✅ Contracts compilation complete"
# Step 3: Shut down all containers
echo "👉 Step 3: Shutting down all containers..."
cd espresso
docker compose down -v --remove-orphans
./scripts/shutdown.sh
echo "✅ All containers shut down"

# Step 4: Prepare contract allocations
Expand All @@ -36,7 +36,22 @@ echo "✅ Contract allocations prepared"

# Step 5: Build docker compose
echo "👉 Step 5: Building docker compose..."
docker compose build
if [ "$USE_TEE" = "True" ] || [ "$USE_TEE" = "true" ]; then
echo "👉 Checking for AWS Nitro Enclave support..."
if command -v nitro-cli &>/dev/null && \
(nitro-cli describe-enclaves 2>/dev/null | grep -qE "EnclaveID|\[\]" || [ -e /dev/nitro_enclaves ]); then
echo "✅ AWS Nitro Enclave support detected"
else
echo "⚠️ WARNING: AWS Nitro Enclave support not detected! TEE components will fail."
read -p "Continue anyway? (y/N): " -n 1 -r
echo ""
[[ ! $REPLY =~ ^[Yy]$ ]] && { echo "❌ Startup cancelled."; exit 1; }
fi
echo "Building with TEE profile..."
COMPOSE_PROFILES=tee docker compose build
else
docker compose build
fi
echo "✅ Docker compose build complete"

# Step 6: Start services
Expand Down
2 changes: 1 addition & 1 deletion op-batcher/batcher/espresso.go
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ func (l *BlockLoader) nextBlockRange(newSyncStatus *eth.SyncStatus) (inclusiveBl

if newSyncStatus.CurrentL1.Number < l.prevSyncStatus.CurrentL1.Number {
// sequencer restarted and hasn't caught up yet
l.batcher.Log.Warn("sequencer currentL1 reversed", "new currentL1", newSyncStatus.CurrentL1.Number, "previous currentL1", l.prevSyncStatus.CurrentL1)
l.batcher.Log.Warn("sequencer currentL1 reversed", "new currentL1", newSyncStatus.CurrentL1.Number, "previous currentL1", l.prevSyncStatus.CurrentL1.Number)
return inclusiveBlockRange{}, ActionRetry
}

Expand Down
Loading