Skip to content

Commit

Permalink
Merge pull request #911 from EspressoSystems/fix/native-demo
Browse files Browse the repository at this point in the history
Fix local demo
  • Loading branch information
jbearer authored Dec 29, 2023
2 parents 582c8e6 + ae4a27a commit 6f3bf10
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 15 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ ESPRESSO_SEQUENCER_L1_WS_PORT=8546
ESPRESSO_SEQUENCER_L1_PROVIDER=http://demo-l1-network:$ESPRESSO_SEQUENCER_L1_PORT
ESPRESSO_SEQUENCER_L1_WS_PROVIDER=ws://demo-l1-network:$ESPRESSO_SEQUENCER_L1_WS_PORT
ESPRESSO_SEQUENCER_L1_USE_LATEST_BLOCK_TAG=true
ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS=0x0116686e2291dbd5e317f47fadbfb43b599786ef
ESPRESSO_SEQUENCER_ETH_MNEMONIC="test test test test test test test test test test test junk"
ESPRESSO_SEQUENCER_HOTSHOT_ACCOUNT_INDEX=5
ESPRESSO_COMMITMENT_TASK_PORT=60000
Expand Down
101 changes: 87 additions & 14 deletions process-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,56 @@ processes:
# it's using the docker compose service which is a bit easier.
demo-l1-network:
command: docker compose up demo-l1-network --force-recreate --renew-anon-volumes
readiness_probe:
exec:
command: "[ $(docker inspect -f '{{.State.Health.Status}}' espresso-sequencer-demo-l1-network-1) = 'healthy' ]"
initial_delay_seconds: 5
period_seconds: 5
timeout_seconds: 5
success_threshold: 1
failure_threshold: 20

orchestrator:
command: orchestrator
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_ORCHESTRATOR_PORT
path: /healthcheck
initial_delay_seconds: 0
period_seconds: 1
timeout_seconds: 1
success_threshold: 1
failure_threshold: 100

da-server:
command: web-server
environment:
- ESPRESSO_WEB_SERVER_PORT=$ESPRESSO_DA_SERVER_PORT
depends_on:
orchestrator:
condition: service_healthy
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_DA_SERVER_PORT
path: /healthcheck

consensus-server:
command: web-server
environment:
- ESPRESSO_WEB_SERVER_PORT=$ESPRESSO_CONSENSUS_SERVER_PORT
depends_on:
orchestrator:
condition: service_healthy
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_CONSENSUS_SERVER_PORT
path: /healthcheck

sequencer0:
command: sequencer -- http -- query -- status -- submit
Expand All @@ -42,9 +73,16 @@ processes:
- ESPRESSO_SEQUENCER_STORAGE_PATH=$ESPRESSO_BASE_STORAGE_PATH/seq0
depends_on:
orchestrator:
condition: service_healthy
condition: process_healthy
demo-l1-network:
condition: service_healthy
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER_API_PORT
path: /healthcheck
failure_threshold: 100

sequencer1:
command: sequencer -- http -- query -- status
Expand All @@ -53,9 +91,16 @@ processes:
- ESPRESSO_SEQUENCER_STORAGE_PATH=$ESPRESSO_BASE_STORAGE_PATH/seq1
depends_on:
orchestrator:
condition: service_healthy
condition: process_healthy
demo-l1-network:
condition: service_healthy
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER1_API_PORT
path: /healthcheck
failure_threshold: 100

sequencer2:
command: sequencer -- http -- status
Expand All @@ -64,9 +109,16 @@ processes:
- ESPRESSO_SEQUENCER_STORAGE_PATH=$ESPRESSO_BASE_STORAGE_PATH/seq2
depends_on:
orchestrator:
condition: service_healthy
condition: process_healthy
demo-l1-network:
condition: service_healthy
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER2_API_PORT
path: /healthcheck
failure_threshold: 100

sequencer3:
command: sequencer -- http -- status
Expand All @@ -75,9 +127,16 @@ processes:
- ESPRESSO_SEQUENCER_STORAGE_PATH=$ESPRESSO_BASE_STORAGE_PATH/seq3
depends_on:
orchestrator:
condition: service_healthy
condition: process_healthy
demo-l1-network:
condition: service_healthy
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER3_API_PORT
path: /healthcheck
failure_threshold: 100

sequencer4:
command: sequencer -- http -- status
Expand All @@ -86,14 +145,28 @@ processes:
- ESPRESSO_SEQUENCER_STORAGE_PATH=$ESPRESSO_BASE_STORAGE_PATH/seq4
depends_on:
orchestrator:
condition: service_healthy
condition: process_healthy
demo-l1-network:
condition: service_healthy
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER4_API_PORT
path: /healthcheck
failure_threshold: 100

commitment-task:
command: commitment-task --deploy
depends_on:
sequencer0:
condition: service_healthy
condition: process_healthy
demo-l1-network:
condition: service_healthy
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_COMMITMENT_TASK_PORT
path: /healthcheck
failure_threshold: 100

0 comments on commit 6f3bf10

Please sign in to comment.