Skip to main content

Runtime modes

ModeETH_RPC_URLDEPLOYMENT_SERVICE_URLNotes
localnet.loopbackhttp://127.0.0.1:8545http://127.0.0.1:4040canonical host-local operator validation mode
localnet.composehttp://ethereum:8545http://deployment-service:4040canonical Compose-network and CI-parity mode
hostdiagnostic onlydiagnostic onlynot a canonical shared runtime target

Fixed runtime contracts

ContractValue or rule
APP_CONFIG/opt/dexlabs
deployment metadata path${APP_CONFIG}/ethereum/addresses.json
deployment metadata writerdeployment-service only
URL policyuse environment-driven URLs; do not hardcode shared service hosts
operator REST APIhttp://127.0.0.1:8080 for the standard localnet baseline
KYC REST APIhttp://127.0.0.1:8090 for the standard localnet baseline
operator database namenode0
KYC database namekyc
report baselineREPORT_TYPE=SELF for the standard localnet validation path

SGX and attestation expectations

TopicCurrent documented posture
localnet report modeREPORT_TYPE=SELF
debug-mode constraintdebug builds must not be treated as DCAP mode
device-access modelSGX devices are documented under a group-readable 0660 model rather than root-only access
host servicesPCCS and AESM must be reachable for enclave-capable runtime
build/runtime alignmentSGX_DEBUG and SGX_PRERELEASE must match the built enclave artifacts

Shared dependencies

DependencyRole in the baseline
chainexecutes the deploy/reset baseline and on-chain state transitions
deployment-serviceowns deployment metadata and reset semantics
Postgresstores operator and KYC node state
Redissupports operator-stack coordination
PCCSsupplies SGX collateral services where enclave-capable runtime is in use
AESMsupplies SGX platform services where enclave-capable runtime is in use
oracle sourceprovides required market inputs for the current baseline
KYC mock or release sourcesupplies the KYC-side dependency used in the localnet validation path

Baseline and reset invariants

InvariantMeaning
deploy creates the baselinethe clean baseline is captured during deploy
reset returns to deploy baselinereset restores the same clean state rather than an arbitrary checkpoint
reset re-establishes the clean baselinefuture resets return to the same deploy-defined truth
release and registration are post-reset actionsthey are not part of the baseline snapshot
ad-hoc snapshotting is not the public contractthe canonical model is deploy baseline plus reset

Readiness endpoints and healthy states

SurfaceEndpointHealthy state
operator/v2/statusrunningState is serving (Master or Slave) and health resolves to Working
operator encryption key/v2/encryption-keyreturns successfully during the readiness check
operator mark-price probe/v2/markprice/ETHPreturns successfully during the readiness check
KYC/v1/statusisHealthy=true

Readiness signals

SignalHealthy interpretation
mode-consistent URLschain and deployment-service URLs match the same localnet mode
config rootAPP_CONFIG=/opt/dexlabs
deployment metadata ownershipaddresses.json is present and treated as deployment-service owned
operator endpoint healthoperator REST API is healthy on the standard localnet port
KYC endpoint healthKYC REST API is healthy on the standard localnet port
prerequisite availabilityPostgres, Redis, oracle, and KYC-side dependencies are reachable
SGX readinessPCCS and AESM are reachable when enclave-capable runtime is in use

Localnet orchestration constants

ConstantValue
operator bind address0.0.0.0:8080
KYC bind address0.0.0.0:8090
operator DB namenode0
KYC DB namekyc
readiness timeout120000 ms
readiness poll interval1000 ms
readiness request timeout5000 ms
raft snapshot epochs12
raft heartbeat interval50 ms
raft minimum election timeout300000 ms
raft max payload entries1

Monitoring signals

Signal familyCurrent documented focus
operator statusrunningState, health, lastRequest.requestIndex, lastTx, raftMetrics.nodeId, raftMetrics.voterIds
dependency reachabilitychain, deployment-service, Postgres, Redis, PCCS, AESM, oracle, and KYC-side prerequisites
system pressureCPU, memory, disk usage, and database storage growth
request and transaction flowtop requests, transaction logs, and aggregate API request volume

Public documentation boundary

Publicly documented hereNot published in the public docs
localnet mode names, fixed URLs, ownership rules, readiness categories, and deploy/reset invariantsprivate operator credentials, private incident procedures, full restricted runbooks, or non-public endpoint catalogs
Last modified on April 12, 2026