Skip to content

Commit a8aa99c

Browse files
authored
push (#232)
1 parent 68a0f10 commit a8aa99c

File tree

4 files changed

+72
-3
lines changed

4 files changed

+72
-3
lines changed

espresso/docker-compose.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ services:
412412
- sh
413413
- -c
414414
- |
415+
echo "Delaying op-batcher-tee for 45 minutes..."
416+
sleep 2700
415417
export DEPLOYMENT_MODE=local
416418
export L1_RPC_URL="http://127.0.0.1:${L1_HTTP_PORT}"
417419
export L2_RPC_URL="http://127.0.0.1:${OP_HTTP_PORT}"
@@ -446,6 +448,34 @@ services:
446448
OP_PROPOSER_HD_PATH: "m/44'/60'/0'/0/1"
447449
OP_PROPOSER_GAME_TYPE: '1'
448450

451+
op-proposer-tee:
452+
profiles: [ "tee" ]
453+
build:
454+
context: ../
455+
dockerfile: espresso/docker/op-stack/Dockerfile
456+
target: op-proposer-target
457+
image: op-proposer:espresso
458+
depends_on:
459+
l1-data-init:
460+
condition: service_completed_successfully
461+
l2-rollup:
462+
condition: service_completed_successfully
463+
op-node-sequencer:
464+
condition: service_started
465+
op-batcher-tee:
466+
condition: service_started
467+
volumes:
468+
- ../packages/contracts-bedrock/lib/superchain-registry/ops/testdata/monorepo:/config
469+
- ./deployment/deployer:/deployer
470+
environment:
471+
OP_PROPOSER_L1_ETH_RPC: http://l1-geth:${L1_HTTP_PORT}
472+
OP_PROPOSER_ROLLUP_RPC: http://op-node-sequencer:${ROLLUP_PORT}
473+
OP_PROPOSER_PROPOSAL_INTERVAL: 6s
474+
OP_PROPOSER_MNEMONIC: "test test test test test test test test test test test junk"
475+
OP_PROPOSER_HD_PATH: "m/44'/60'/0'/0/1"
476+
OP_PROPOSER_GAME_TYPE: '1'
477+
478+
449479
op-challenger:
450480
profiles: [ "default" ]
451481
build:

espresso/scripts/shutdown.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,27 @@
44
# This script shuts down devnet services.
55

66
docker compose down -v
7+
8+
# Stop and remove containers built from op-batcher-tee:espresso image
9+
echo "Stopping containers built from op-batcher-tee:espresso image..."
10+
CONTAINERS=$(docker ps -q --filter "ancestor=op-batcher-tee:espresso")
11+
if [ ! -z "$CONTAINERS" ]; then
12+
echo "Stopping containers: $CONTAINERS"
13+
docker stop $CONTAINERS
14+
docker rm $CONTAINERS
15+
echo "Containers stopped and removed"
16+
else
17+
echo "No running containers found with op-batcher-tee:espresso image"
18+
fi
19+
20+
# Stop and remove batcher-enclaver containers that run the eif
21+
echo "Stopping batcher-enclaver containers..."
22+
ENCLAVE_CONTAINERS=$(docker ps -aq --filter "name=batcher-enclaver-")
23+
if [ ! -z "$ENCLAVE_CONTAINERS" ]; then
24+
echo "Stopping enclave containers: $ENCLAVE_CONTAINERS"
25+
docker stop $ENCLAVE_CONTAINERS 2>/dev/null || true
26+
docker rm $ENCLAVE_CONTAINERS 2>/dev/null || true
27+
echo "Enclave containers stopped and removed"
28+
else
29+
echo "No batcher-enclaver containers found"
30+
fi

espresso/scripts/startup.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ echo "✅ Contracts compilation complete"
2525
# Step 3: Shut down all containers
2626
echo "👉 Step 3: Shutting down all containers..."
2727
cd espresso
28-
docker compose down -v --remove-orphans
28+
./scripts/shutdown.sh
2929
echo "✅ All containers shut down"
3030

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

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

4257
# Step 6: Start services

op-batcher/batcher/espresso.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ func (l *BlockLoader) nextBlockRange(newSyncStatus *eth.SyncStatus) (inclusiveBl
885885

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

0 commit comments

Comments
 (0)