You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -71,11 +72,12 @@ Each ECS task runs a single mpcium node with:
71
72
72
73
### Task Structure
73
74
74
-
Each ECS task contains three containers:
75
+
Each ECS task contains four containers:
75
76
76
77
1.**init-secrets** — Pulls passwords from AWS Secrets Manager, writes to `/secrets/` volume
77
78
2.**init-config** — Downloads config.yaml, peers.json, and identity files from S3
78
-
3.**mpcium** — Main application container (distroless, no shell)
79
+
3.**init-data** — Copies identity files and peers.json from ephemeral volumes to EFS (`/app/data/`) so they persist across restarts
80
+
4.**mpcium** — Main application container (distroless, no shell)
79
81
80
82
## Pre-Deployment Setup
81
83
@@ -251,6 +253,12 @@ Secrets Manager S3
251
253
│ → /secrets/ │ │ → /config/ │
252
254
│ │ │ → /identity/ │
253
255
└──────┬───────┘ └──────┬───────┘
256
+
│ │
257
+
│ ┌──────┴───────┐
258
+
│ │ init-data │
259
+
│ │ copies to EFS │
260
+
│ │ /app/data/ │
261
+
│ └──────┬────────┘
254
262
│ shared volumes │
255
263
└──────────┬─────────────┘
256
264
▼
@@ -265,6 +273,8 @@ Secrets Manager S3
265
273
266
274
The main container is distroless (no shell), so all secrets must be pre-written to files by the init containers.
267
275
276
+
**NATS and Consul connection strings** are injected via environment variables (`NATS_URL`, `CONSUL_ADDRESS`) on the mpcium container rather than hardcoded in `config.yaml`. The config file should leave these fields empty — the application reads env vars as overrides at runtime.
277
+
268
278
## Task Definition Reference
269
279
270
280
Template task definition for a single mpcium node. Replace all `<PLACEHOLDER>` values.
@@ -278,8 +288,10 @@ Template task definition for a single mpcium node. Replace all `<PLACEHOLDER>` v
278
288
|`<S3_BUCKET>`| S3 bucket for config files |
279
289
|`<EFS_FILE_SYSTEM_ID>`| EFS file system ID |
280
290
|`<EFS_ACCESS_POINT_ID>`| EFS access point ID for this node |
281
-
|`<SECRETS_MANAGER_DB_PASSWORD_ARN>`| Secrets Manager secret name for BadgerDB password |
282
-
|`<SECRETS_MANAGER_IDENTITY_PASSWORD_ARN>`| Secrets Manager secret name for identity password |
291
+
|`<SECRETS_MANAGER_DB_PASSWORD_ARN>`| Secrets Manager secret ARN for BadgerDB password |
292
+
|`<SECRETS_MANAGER_IDENTITY_PASSWORD_ARN>`| Secrets Manager secret ARN for identity password |
@@ -416,8 +463,7 @@ Template task definition for a single mpcium node. Replace all `<PLACEHOLDER>` v
416
463
"awslogs-region": "<AWS_REGION>",
417
464
"awslogs-stream-prefix": "mpcium"
418
465
}
419
-
},
420
-
"stopTimeout": 10
466
+
}
421
467
}
422
468
],
423
469
"volumes": [
@@ -459,14 +505,16 @@ Template task definition for a single mpcium node. Replace all `<PLACEHOLDER>` v
459
505
}
460
506
```
461
507
508
+
> **Note**: The `NATS_URL` and `CONSUL_ADDRESS` environment variables override the corresponding fields in `config.yaml`. This allows the same config file to be used across environments — only the ECS task definition env vars need to change.
/ (EFS access point root = /<NODE_NAME> on the filesystem)
487
535
├── db/
488
536
│ └── <NODE_NAME>/ ← BadgerDB encrypted data
489
-
└── backups/ ← encrypted .enc backup files
537
+
├── backups/ ← encrypted .enc backup files
538
+
├── identity/ ← copied from S3 by init-data container
539
+
│ ├── node0_identity.json
540
+
│ ├── node0_private.key.age
541
+
│ ├── node1_identity.json
542
+
│ └── node2_identity.json
543
+
└── peers.json ← copied from S3 by init-data container
490
544
```
491
545
492
546
## IAM Policies Reference
@@ -565,29 +619,37 @@ db_path: /app/data/db
565
619
backup_dir: /app/data/backups
566
620
567
621
# Consul service discovery
622
+
# Leave empty when using CONSUL_ADDRESS env var override in ECS task definition
568
623
consul:
569
-
address: <CONSUL_ADDRESS>:8500
624
+
address: ""
570
625
571
-
# NATS messaging (TLS required in production)
626
+
# NATS messaging
627
+
# Leave empty when using NATS_URL env var override in ECS task definition
628
+
# For production with TLS, uncomment the tls block and upload certs to S3
572
629
nats:
573
-
url: nats://<NATS_ADDRESS>:4222
574
-
username: <NATS_USERNAME>
575
-
password: <NATS_PASSWORD>
576
-
tls:
577
-
client_cert: /config/certs/client-cert.pem
578
-
client_key: /config/certs/client-key.pem
579
-
ca_cert: /config/certs/rootCA.pem
630
+
url: ""
631
+
#username: <NATS_USERNAME>
632
+
#password: <NATS_PASSWORD>
633
+
#tls:
634
+
# client_cert: /config/certs/client-cert.pem
635
+
# client_key: /config/certs/client-key.pem
636
+
# ca_cert: /config/certs/rootCA.pem
580
637
581
638
# MPC threshold (t-of-n, where t >= floor(n/2) + 1)
582
639
mpc_threshold: 2
583
640
584
-
# Event initiator public key (Ed25519 hex)
641
+
# Event initiator public key (hex encoded)
585
642
event_initiator_pubkey: <EVENT_INITIATOR_PUBKEY>
586
-
event_initiator_algorithm: ed25519
643
+
# Algorithm: "ed25519" or "p256"
644
+
event_initiator_algorithm: <ALGORITHM>
587
645
588
646
# Chain code (32-byte hex, 64 characters)
589
647
chain_code: <CHAIN_CODE_HEX>
590
648
649
+
# Concurrency limits
650
+
max_concurrent_keygen: 3
651
+
max_concurrent_signing: 10
652
+
591
653
# Backup settings
592
654
# Application-level: writes encrypted .enc files to backup_dir for granular recovery.
593
655
# Volume-level: enable AWS Backup on the EFS file system for full snapshots.
@@ -614,7 +676,17 @@ After tasks start, the mpcium container logs should show (in order):
614
676
615
677
### Health Check
616
678
617
-
The task definition health check hits `GET /health` on port 8080. Tasks should report `HEALTHY` within 60 seconds of starting (configured via `startPeriod`).
679
+
The application exposes `GET /health` on port 8080 (configured via `healthcheck.address` in config.yaml). The current deployment does not define an ECS-level container health check — the application health endpoint is available for use by load balancers or external monitoring. If you need ECS to track container health, add a `healthCheck` block to the mpcium container definition:
0 commit comments