Skip to content

[E2E] Bootstrap: emit deploy manifest JSON #177

@sadiq1971

Description

@sadiq1971

Context

The E2E service discovery layer needs contract addresses and Canton party IDs after bootstrap completes. Currently scripts/setup/docker-bootstrap.sh only injects values via sed into config files — there is no machine-readable output for tests to consume.

Goal

At the end of scripts/setup/docker-bootstrap.sh, write /tmp/e2e-deploy.json with all values that the E2E service discovery layer needs:

{
  "prompt_token":            "<TOKEN_ADDR>",
  "canton_bridge":           "<BRIDGE_ADDR>",
  "prompt_instrument_admin": "<PARTY_ID>",
  "demo_instrument_admin":   "<PARTY_ID>"
}

Mount a named volume e2e-deploy on the bootstrap container so the file is accessible to the service discovery layer.

Files

File Change
scripts/setup/docker-bootstrap.sh Append jq -n ... > /tmp/e2e-deploy.json at the very end (before the WAIT_FOREVER block)
docker-compose.yaml Add e2e-deploy:/tmp volume mount on bootstrap service; declare e2e-deploy in top-level volumes:

Implementation sketch

In docker-bootstrap.sh, after the existing BOOTSTRAP COMPLETE echo block:

# Write deploy manifest for E2E service discovery
cat > /tmp/e2e-deploy.json <<JSON
{
  "prompt_token":            "${TOKEN_ADDR}",
  "canton_bridge":           "${BRIDGE_ADDR}",
  "prompt_instrument_admin": "${PARTY_ID}",
  "demo_instrument_admin":   "${PARTY_ID}"
}
JSON
echo "Deploy manifest written to /tmp/e2e-deploy.json"

In docker-compose.yaml, under the bootstrap service:

volumes:
  - ./contracts/ethereum-wayfinder/broadcast:/app/broadcast:ro
  - config_state:/app/state
  - e2e-deploy:/tmp          # ← add this line

And in the top-level volumes: block:

e2e-deploy: {}

Acceptance Criteria

  • After docker compose up --wait, running:
    docker compose exec bootstrap cat /tmp/e2e-deploy.json
    
    returns valid JSON with non-empty prompt_token, canton_bridge, prompt_instrument_admin, demo_instrument_admin.
  • The change is additive — existing config sed patching is unchanged.

Dependencies

None — this is the root of the E2E dependency chain.

Size

XS (1–2 hours)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions