Runtime modes
| Mode | ETH_RPC_URL | DEPLOYMENT_SERVICE_URL | Notes |
|---|---|---|---|
localnet.loopback | http://127.0.0.1:8545 | http://127.0.0.1:4040 | canonical host-local operator validation mode |
localnet.compose | http://ethereum:8545 | http://deployment-service:4040 | canonical Compose-network and CI-parity mode |
host | diagnostic only | diagnostic only | not a canonical shared runtime target |
Fixed runtime contracts
| Contract | Value or rule |
|---|---|
APP_CONFIG | /opt/dexlabs |
| deployment metadata path | ${APP_CONFIG}/ethereum/addresses.json |
| deployment metadata writer | deployment-service only |
| URL policy | use environment-driven URLs; do not hardcode shared service hosts |
| operator REST API | http://127.0.0.1:8080 for the standard localnet baseline |
| KYC REST API | http://127.0.0.1:8090 for the standard localnet baseline |
| operator database name | node0 |
| KYC database name | kyc |
| report baseline | REPORT_TYPE=SELF for the standard localnet validation path |
SGX and attestation expectations
| Topic | Current documented posture |
|---|---|
| localnet report mode | REPORT_TYPE=SELF |
| debug-mode constraint | debug builds must not be treated as DCAP mode |
| device-access model | SGX devices are documented under a group-readable 0660 model rather than root-only access |
| host services | PCCS and AESM must be reachable for enclave-capable runtime |
| build/runtime alignment | SGX_DEBUG and SGX_PRERELEASE must match the built enclave artifacts |
Shared dependencies
| Dependency | Role in the baseline |
|---|---|
| chain | executes the deploy/reset baseline and on-chain state transitions |
| deployment-service | owns deployment metadata and reset semantics |
| Postgres | stores operator and KYC node state |
| Redis | supports operator-stack coordination |
| PCCS | supplies SGX collateral services where enclave-capable runtime is in use |
| AESM | supplies SGX platform services where enclave-capable runtime is in use |
| oracle source | provides required market inputs for the current baseline |
| KYC mock or release source | supplies the KYC-side dependency used in the localnet validation path |
Baseline and reset invariants
| Invariant | Meaning |
|---|---|
| deploy creates the baseline | the clean baseline is captured during deploy |
| reset returns to deploy baseline | reset restores the same clean state rather than an arbitrary checkpoint |
| reset re-establishes the clean baseline | future resets return to the same deploy-defined truth |
| release and registration are post-reset actions | they are not part of the baseline snapshot |
| ad-hoc snapshotting is not the public contract | the canonical model is deploy baseline plus reset |
Readiness endpoints and healthy states
| Surface | Endpoint | Healthy state |
|---|---|---|
| operator | /v2/status | runningState is serving (Master or Slave) and health resolves to Working |
| operator encryption key | /v2/encryption-key | returns successfully during the readiness check |
| operator mark-price probe | /v2/markprice/ETHP | returns successfully during the readiness check |
| KYC | /v1/status | isHealthy=true |
Readiness signals
| Signal | Healthy interpretation |
|---|---|
| mode-consistent URLs | chain and deployment-service URLs match the same localnet mode |
| config root | APP_CONFIG=/opt/dexlabs |
| deployment metadata ownership | addresses.json is present and treated as deployment-service owned |
| operator endpoint health | operator REST API is healthy on the standard localnet port |
| KYC endpoint health | KYC REST API is healthy on the standard localnet port |
| prerequisite availability | Postgres, Redis, oracle, and KYC-side dependencies are reachable |
| SGX readiness | PCCS and AESM are reachable when enclave-capable runtime is in use |
Localnet orchestration constants
| Constant | Value |
|---|---|
| operator bind address | 0.0.0.0:8080 |
| KYC bind address | 0.0.0.0:8090 |
| operator DB name | node0 |
| KYC DB name | kyc |
| readiness timeout | 120000 ms |
| readiness poll interval | 1000 ms |
| readiness request timeout | 5000 ms |
| raft snapshot epochs | 12 |
| raft heartbeat interval | 50 ms |
| raft minimum election timeout | 300000 ms |
| raft max payload entries | 1 |
Monitoring signals
| Signal family | Current documented focus |
|---|---|
| operator status | runningState, health, lastRequest.requestIndex, lastTx, raftMetrics.nodeId, raftMetrics.voterIds |
| dependency reachability | chain, deployment-service, Postgres, Redis, PCCS, AESM, oracle, and KYC-side prerequisites |
| system pressure | CPU, memory, disk usage, and database storage growth |
| request and transaction flow | top requests, transaction logs, and aggregate API request volume |
Public documentation boundary
| Publicly documented here | Not published in the public docs |
|---|---|
| localnet mode names, fixed URLs, ownership rules, readiness categories, and deploy/reset invariants | private operator credentials, private incident procedures, full restricted runbooks, or non-public endpoint catalogs |