Skip to main content

What you’ll do

By the end of this tutorial you will have:
  • chosen the correct operator localnet mode for your environment
  • locked the fixed runtime contracts that must not drift during the run
  • checked the shared dependencies that a first operator-backed baseline expects
  • recorded the readiness signals that should be green before deeper operator work

Before you start

  • Use this lesson when you are preparing an operator-backed localnet workflow rather than a trader or public API integration flow.
  • Keep For Node Operators open if you still need the public boundary map.
  • Treat Operator & Restricted APIs as boundary context, not as the node-setup procedure.

Step 1: Choose the right localnet mode

Pick one mode and keep its URLs consistent all the way through the run.
ModeUse it whenCore URL shape
localnet.loopbackyou are running a local validation flow with chain and deployment-service on loopbackhttp://127.0.0.1:8545 and http://127.0.0.1:4040
localnet.composeyou are following CI-parity or shared Compose-network executionhttp://ethereum:8545 and http://deployment-service:4040
hostyou are only diagnosing a host environment, not running the canonical shared baselinediagnostic only

Step 2: Lock the fixed runtime contracts

Confirm the contracts below before you treat any later failure as an operator bug.
ContractExpected value or rule
APP_CONFIG/opt/dexlabs
deployment metadata path${APP_CONFIG}/ethereum/addresses.json
deployment metadata writerdeployment-service is the single writer
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
report baselineREPORT_TYPE=SELF for the standard localnet validation path

Step 3: Check the shared dependencies

Make sure the first-run dependencies are available before you continue.
DependencyWhy it matters
chain + deployment-serviceprovide the deploy/reset baseline and deployment metadata
Postgresbacks operator and KYC state
Redissupports background coordination used by the operator stack
PCCS and AESMrequired when you are validating an SGX-capable runtime
oracle sourcemust provide the market inputs expected by the baseline
KYC mock or release sourcemust be reachable before KYC-backed flows can validate cleanly

Step 4: Keep the baseline clean

Use the standard baseline model throughout the first run:
  1. Deploy establishes the clean baseline state.
  2. Reset returns the environment to that same deployment baseline.
  3. Release and registration side effects happen after reset, not inside the baseline snapshot.
  4. If the environment has drifted, reset it before you continue.

Step 5: Record your readiness snapshot

Before you continue to a private runbook or deeper debug task, make sure this snapshot is true:
SignalHealthy first-run state
mode and URLsETH_RPC_URL and DEPLOYMENT_SERVICE_URL both match the same localnet mode
config rootAPP_CONFIG=/opt/dexlabs
deployment metadataaddresses.json is present at /opt/dexlabs/ethereum/addresses.json and treated as deployment-service owned
node-facing APIsoperator and KYC endpoints answer on the expected localnet ports once started
oracle and KYC prerequisitesupstream data and mock/release dependencies respond before deeper workflow steps
baseline assumptionsthe run still matches the standard localnet expectations rather than an ad-hoc environment

Next steps

Last modified on April 12, 2026