Manthan Testnet (Phase 4)
Phase-4 testnet per the platform tracker. Three Manthan nodes (genesis-alpha,genesis-beta,genesis-gamma) running locally with filled-in Charter / LOTS / privacy-policy / observability / incident runbook. Localhost is the dev stage; AWS is the production target.
What's here
| Path | Contents |
|---|---|
nodes/genesis-{alpha,beta,gamma}/charter.md | Filled-in operator Charter per R-203 (T-335) |
nodes/genesis-{alpha,beta,gamma}/lots.md | Filled-in Log Operator Transparency Statement per T-106 (T-335) |
nodes/genesis-{alpha,beta,gamma}/privacy-policy.md | Filled-in privacy policy per G-011 |
nodes/genesis-{alpha,beta,gamma}/data/ | Runtime: operator key, SQLite ledger (created at first run) |
deploy/bootstrap-seed-list.json | Signed seed list per T-337 / G-006 §3.1 |
deploy/gen-certs.sh | Self-signed TLS cert generation (T-336; local-service only) |
observability/alerts.yaml | Prometheus alert rules per G-012 |
observability/dashboard.md | Grafana dashboard panels per G-012 |
incident-response/runbook.md | Operational runbook per T-338 |
src/bootstrap-issuer.ts | Generates the signed seed list (re-runnable) |
src/testnet-node.ts | Spins up all 3 nodes + gossip ring + HTTP/MWP endpoints |
Run the testnet (local-service)
cd services/testnet
npm install
npm run bootstrap # Generate signed seed list (run once)
npm run certs # Generate self-signed TLS certs (local-service wss:// only)
npm start # Spin up the 3-node testnetYou'll see:
[testnet] loaded bootstrap seed list (3 seeds, signed by sigil:gng3urrvyq3i…)
[testnet] starting 3 nodes…
[genesis-alpha] sigil=sigil:omff5x… local-service/ ws://local-service/
[genesis-beta] sigil=sigil:wkf2vm… local-service/ ws://local-service/
[genesis-gamma] sigil=sigil:esyduy… local-service/ ws://local-service/
[testnet] wiring gossip ring…
[testnet] genesis ceremony: alpha originates first network envelope…
[testnet] genesis envelope id=…
[testnet] ledger state after
[genesis-alpha] seen=0 verified=1
[genesis-beta] seen=0 verified=1
[genesis-gamma] seen=0 verified=1The genesis envelope propagates through the ring and is verified by all three nodes, exercising the full stack: signed Charter at startup, MWP handshake, ENVELOPE_GOSSIP, dedupe, ledger persistence, verify-on-receive.
By default the testnet auto-stops after 30s. To keep it running:
MANTHAN_RUN_FOREVER=1 npm startIf the default local-service ports are already in use, override the bases:
MANTHAN_HTTP_BASE_PORT=10120 MANTHAN_MWP_BASE_PORT=10220 npm startInspect the running testnet
# Health and readiness
curl local-service/healthz
curl local-service/readyz
# Operator transparency documents (signed at startup)
curl local-service/charter | jq . # signed Charter
curl local-service/lots # LOTS markdown
curl local-service/privacy-policy # privacy policy
# Operational
curl local-service/sth # latest tree head
curl local-service/canary # warrant canary
curl local-service/incidents # incident registry
curl local-service/metrics # Prometheus metrics (G-012)What this proves
Phase 4 deliverables, per the tracker:
| Tracker item | Where it lives |
|---|---|
| P-006: Deploy initial "Network Genesis" with 3 nodes | src/testnet-node.ts runs them; genesis envelope ceremony fires on startup |
| G-011: Metadata and Privacy Policy | nodes/*/privacy-policy.md |
| G-012: Operations and Observability | observability/alerts.yaml + observability/dashboard.md + /metrics endpoint per node |
| T-335: Filled-in Charter and LOTS | nodes//charter.md and nodes//lots.md |
| T-336: TLS deployment plumbing | deploy/gen-certs.sh generates self-signed certs; AWS production still needs ALB/ACM termination wiring |
| T-337: Persistent discovery / bootstrap | deploy/bootstrap-seed-list.json (signed by bootstrap authority) |
| T-338: Rollback and incident-response | incident-response/runbook.md (12 procedures) |
AWS deployment plan
This testnet is the dev stage. Mapping each component to AWS:
| Local component | AWS production equivalent |
|---|---|
| 3 local-service ports | 3 ECS tasks (or EC2 instances), each in a different AZ (start) → eventually different AWS regions |
data/operator.key.json (mode 0600) | AWS Secrets Manager + KMS envelope encryption; IAM-attached role |
data/ledger.sqlite | EFS-mounted volume; hourly snapshots → S3 |
local ws://local-service MWP | public wss:// at ALB/ACM → private ws:// to ECS task |
local local-service API | public https:// at ALB/ACM → private HTTP to ECS task |
bootstrap-seed-list.json | Versioned S3 bucket (public-read); URL pinned in node software |
| Self-signed certs | ACM auto-renewing certs |
/metrics endpoint | Scraped by Prometheus running in EKS or ECS Fargate |
| Alertmanager rules | Forwarded to PagerDuty (SEV-1/2) and Slack (SEV-3) |
| Runbook URL | S3 + CloudFront (public-read), linked from PagerDuty alerts |
| Hourly backup | EFS snapshot → S3 cross-region |
To deploy on AWS:
1. Build a Docker image: docker build -t manthan-testnet-node:0.2.0 . (Dockerfile TBD; uses node:24-alpine base, copies lib/ and services/, runs node --experimental-strip-types services/testnet/src/testnet-node.ts).
2. Push to ECR.
3. Apply Terraform/CDK for the ECS service definitions, ALB, EFS, KMS, Secrets Manager, ACM cert, S3 buckets.
4. Per-node Charter and LOTS get committed to S3 (versioned), mounted into the ECS task at /etc/manthan/.
5. Bootstrap seed list signed once (offline) by a real bootstrap authority key (HSM-backed); committed to S3.
6. Replace <TBD> markers in Charter §1, §5, §9 with real values.
7. Operator runs the incident-response/runbook.md procedures; verify each before declaring production-ready.
Some deployment adaptation is still required. The next phase supplies the Dockerfile, ECS/ALB/EFS/KMS/Secrets Manager/ACM/S3 IaC, real legal/operator values, and production bootstrap signing.
What the testnet is NOT
- Not a real production network. It's all on local-service, single operator, single jurisdiction, no real TLS. It's the dev stage that lets us validate the deployment design before burning AWS credit.
- Not a permanent network. The local-service testnet exits after 30 seconds (or stays alive with
MANTHAN_RUN_FOREVER=1). Production AWS deployment runs continuously. - Not jurisdictionally diverse. Per Charter §8 (each node), all three are on the same machine. Production MUST diversify across AWS regions.
These deficiencies are catalogued explicitly — that's the point of the testnet exemplar Charter/LOTS. Production deployments inherit these documents and replace the testnet-specific markers.
Cumulative project status
After Phase 4:
- Reference libraries:
cbor-det,herald-core-ts,herald-ct-log,herald-core-py,manthan-ledger,manthan-mwp,manthan-agent-ts - Reference services:
reference-herald,the-scribe,testnet - Demos:
mvp-workflow,manthan-runtime,manthan-gossip,conduit,audit-log,cli - 39 verified Phase 2/3/3.5 tests, plus local-service testnet smoke verification
- 13 Phase-0 gate specs
- 4 canonical protocol documents (SPEC, EXT, CHARTER, THREATS)
- Filled-in Charter / LOTS / privacy-policy templates
- Bootstrap seed list (signed)
- Self-signed cert generation for local TLS
- Prometheus alert rules + dashboard panels
- Incident-response runbook with 12 procedures
The HERALD v0.2 protocol stack is feature-complete at local-service/testnet-dev level. Phase 5 is deployment engineering: containerization, IaC, real wss:///https://, real operator values, real alert routing, backups, and runbook drills.