ยง NEW ยท 20-Node Mesh Connection Guide

Connecting 20 nodes to the distributed inference fabric.

A complete, production-ready reference for integrating every node with routing, scheduling, metering, DIU issuance, DIU spend, and settlement logging. Each section maps to an equivalent AWS multi-node compute onboarding step.

G.0

Guide overview & scope

This guide documents the authoritative process for connecting exactly 20 heterogeneous compute nodes to the MeshInfer.AI distributed inference fabric. Each node, regardless of platform, must complete a five-phase lifecycle before it is eligible to receive routed inference tasks:

  1. Phase IIdentity provisioning โ€” NodeID, DeviceID, OrgID chain-of-trust
  2. Phase IIRegistration โ€” capability declaration, DOSFI handshake, Coordinator enrollment
  3. Phase IIIRouting participation โ€” admission to the task routing pool
  4. Phase IVMetering & economics โ€” DIU spend accounting, inference-to-DIU issuance, settlement
  5. Phase VOngoing operations โ€” health checks, reputation scoring, removal / replacement
DIU โ€” Distributed Intelligence Unit
Throughout this guide, Vital is the colloquial name for the platform's economic unit. Its formal designation is Distributed Intelligence Unit (DIU). All metering, issuance, and settlement values are denominated in DIU. DIU is non-transferable outside the MeshNativeExchange settlement layer unless explicitly bridged.

Reference topology โ€” 20-node mesh

topology

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ DOSFI IDENTITY SERVICE โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  identity.dosfi.ai  ยท  OAuth 2.0 + OIDC  ยท  OrgID: org_mesh20_prod     โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                  โ”‚  mTLS chain-of-trust
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ MESHINFER COORDINATOR โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  coordinator.meshinfer.ai  ยท  Gateway (CF Edge)  ยท  Router Engine       โ”‚
  โ”‚  Node Registry (Redis)  ยท  Task Queue (NATS JS)  ยท  Billing Meter       โ”‚
  โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚  Registered & active nodes (20 total)
     โ”œโ”€โ”€ DESKTOP TIER (8 nodes)  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
     โ”‚   node-d01 โ€ฆ node-d08  ยท  Linux/macOS/Windows  ยท  llama.cpp GGUF
     โ”œโ”€โ”€ BROWSER TIER (6 nodes)  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
     โ”‚   node-b01 โ€ฆ node-b06  ยท  Chrome/Edge  ยท  WebGPU / WASM fallback
     โ”œโ”€โ”€ MOBILE TIER (4 nodes)   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
     โ”‚   node-m01 โ€ฆ node-m04  ยท  iOS/Android  ยท  CoreML / NNAPI
     โ””โ”€โ”€ SERVER TIER (2 nodes)   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
         node-s01, node-s02  ยท  Linux bare-metal  ยท  CUDA 12+ / 70B models
  
G.1

Phase I โ€” Node Identity Model

Every node in the mesh is assigned a cryptographic identity before it is permitted to register. The identity model mirrors the chain-of-trust established by the DOSFI Identity Service at identity.dosfi.ai.

Identity hierarchy

OrgIDTop-level organizational namespace. Created once per tenant. Format: org_{slug}_{env}. Controls billing, policy inheritance, and DIU settlement wallet.
UserIDHuman operator identity. Bound to OrgID via OIDC claims. Required to issue API keys and approve node registrations.
DeviceIDStable hardware fingerprint. Derived from TPM-attested UUID or, on non-TPM devices, a persisted Ed25519 keypair stored in secure enclave / IndexedDB. Never regenerated unless node is explicitly decommissioned.
NodeIDRuntime identity for one active mesh participant. Format: node_{uuid4}. Generated by the Coordinator on first successful registration. A DeviceID can hold at most one active NodeID at a time.
APIKeyIDOperator-issued bearer token. Bound to UserID + OrgID. Used for all Coordinator API calls. Rotatable without invalidating NodeID.

Identity binding chain

sequence
  OrgID
    โ””โ”€โ”€ UserID  (OIDC JWT, signed by identity.dosfi.ai)
          โ””โ”€โ”€ APIKeyID  (msk_live_..., scoped to OrgID)
                โ””โ”€โ”€ DeviceID  (Ed25519 pub, signed by UserID at registration)
                      โ””โ”€โ”€ NodeID  (issued by Coordinator after DeviceID verification)
                            โ””โ”€โ”€ DIU Wallet Address  (auto-created by MeshNativeExchange
                                                     on first NodeID activation)

Key material lifecycle

Ed25519 node keypairGenerated on-device at first install. Private key never leaves hardware secure enclave (Keychain/Keystore/TPM). Public key transmitted to Coordinator at registration.
Session keyAES-256-GCM derived via TLS exporter (RFC 5705) per WebSocket connection. Ephemeral โ€” not stored anywhere.
Capability signatureEvery heartbeat payload is signed with the node Ed25519 private key. Coordinator verifies against registered public key.
Key rotationGrowth/Enterprise tier: automated rotation every N days via scheduleAPIKeyRotation function. NodeID persists across API key rotation.
Equivalent AWS concept
NodeID + DeviceID maps to an IAM Role + EC2 instance profile. OrgID maps to an AWS Account. The DIU Wallet Address maps to an AWS Cost Allocation Tag used for chargeback.
G.2

Phase II โ€” Node Registration Flow

Step-by-step: registering one node

1
Install the node client

Run the platform-specific installer from the Download page. The installer generates the Ed25519 keypair, creates the DeviceID, and writes the local config to ~/.meshinfer/node.toml.

bash
# macOS / Linux
curl -fsSL https://get.meshinfer.ai/install.sh | sh

# Windows
iwr https://get.meshinfer.ai/install.ps1 | iex
2
Authenticate with DOSFI Identity Service

The node daemon performs an OAuth 2.0 device-flow against identity.dosfi.ai. On success, a short-lived OIDC access token is returned and cached locally (15-min TTL, auto-refreshed).

bash
meshinfer-node auth --org org_mesh20_prod
# Opens browser โ†’ identity.dosfi.ai/device
# Displays one-time code: MESH-A1B2-C3D4
# User confirms in browser โ†’ token issued
3
Run the capability probe

The daemon queries local hardware (GPU, RAM, CPU, battery, network) and produces a signed capability vector. This takes โ‰ค 40 ms and is re-run on each Coordinator reconnect.

bash
meshinfer-node probe
# Output:
# cpu:  8 cores ยท arm64 ยท neon+i8mm
# gpu:  Apple M3 Pro ยท 18432 MB VRAM ยท WebGPU โœ“
# ram:  18432 MB total ยท 9112 MB free
# net:  rtt=34ms ยท 118 Mbps ยท 4g
# sig:  ed25519:abc123...
4
POST /v1/nodes/register to the Coordinator

The daemon sends the capability vector, DeviceID, and OIDC token to the Coordinator. The Coordinator verifies the OIDC signature against identity.dosfi.ai JWKS, issues a NodeID, and provisions the DIU wallet.

bash
POST https://coordinator.meshinfer.ai/v1/nodes/register
Authorization: Bearer msk_live_YOUR_API_KEY
Content-Type: application/json

{
  "device_id":   "did:mesh:abc123...",
  "oidc_token":  "eyJhbGc...",
  "capability":  { ...signed_probe_output... },
  "platform":    "desktop",
  "region":      "us-east",
  "mesh_profile":"standard"
}

# Response 201 Created:
{
  "node_id":    "node_f9a3e2b1...",
  "diu_wallet": "wallet_7c2d...",
  "registry_ttl_s": 1800,
  "heartbeat_interval_s": 15
}
5
Open persistent WebSocket for heartbeats

The daemon opens a WebSocket to stream.meshinfer.ai/v1/nodes/stream using the NodeID as the session identifier. Heartbeats are sent every 15 s. Missing 3 consecutive heartbeats downgrades status to degraded; 6 missed โ†’ eviction.

bash
wss://stream.meshinfer.ai/v1/nodes/stream
Authorization: Bearer msk_live_...
X-Node-ID: node_f9a3e2b1...

โ†’ { "type": "heartbeat",
    "node_id": "node_f9a3e2b1...",
    "ts": "2026-07-06T14:00:00Z",
    "load": { "active_tasks": 0, "cpu_pct": 12 },
    "battery": { "level": 0.94, "charging": true },
    "thermal": "nominal",
    "sig": "ed25519:..." }

โ† { "type": "ack", "server_ts": "2026-07-06T14:00:00.031Z" }

Batch registration โ€” all 20 nodes

For fleet deployments, use the fleet provisioning script. It reads a manifest file and registers all nodes in parallel, emitting a registration report on completion.

bash
# nodes.yaml โ€” fleet manifest
nodes:
  - id: node-d01
    platform: linux
    region: us-east
    profile: standard
  - id: node-d02
    platform: linux
    region: us-east
    profile: standard
  # ... 18 more ...

# Run fleet registration
meshinfer-fleet register   --manifest nodes.yaml   --api-key msk_live_...   --org org_mesh20_prod   --parallel 5

# Output: nodes_registration_report_2026-07-06.json
G.3

Phase II-B โ€” Dual Handshake Protocol

DOSFI identity handshake

The DOSFI handshake establishes cross-platform identity binding. It occurs once per DeviceID lifetime and must succeed before the Coordinator registration in Phase II.

sequence
  Node Daemon           identity.dosfi.ai        Coordinator
       โ”‚                       โ”‚                       โ”‚
       โ”‚โ”€โ”€ /device/auth โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚                       โ”‚
       โ”‚โ—„โ”€โ”€ device_code โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                       โ”‚
       โ”‚                       โ”‚โ—„โ”€โ”€ user_confirms โ”€โ”€โ”€โ”€โ”€โ”€(browser)
       โ”‚โ—„โ”€โ”€ access_token โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                       โ”‚
       โ”‚   (oidc_jwt, 15min)    โ”‚                       โ”‚
       โ”‚                       โ”‚                       โ”‚
       โ”‚โ”€โ”€ /v1/nodes/register โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚
       โ”‚     { oidc_jwt, device_id, capability_vec }    โ”‚
       โ”‚                       โ”‚โ”€โ”€JWKS verify โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚
       โ”‚                       โ”‚โ—„โ”€โ”€pub key(s) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚
       โ”‚โ—„โ”€โ”€ { node_id, diu_wallet } โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚
       โ”‚                       โ”‚                       โ”‚

MeshInfer Coordinator handshake

After DOSFI authentication, the Coordinator performs its own handshake to admit the node into the routing pool. This is an mTLS-authenticated exchange.

sequence
  Node Daemon                   Coordinator
       โ”‚                              โ”‚
       โ”‚โ”€โ”€ TLS ClientHello โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚
       โ”‚โ—„โ”€โ”€ TLS ServerHello โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚  (CF cert)
       โ”‚โ”€โ”€ Client Certificate โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  (Ed25519 node cert, signed by DOSFI CA)
       โ”‚โ—„โ”€โ”€ Certificate Verified โ”€โ”€โ”€โ”€โ”€โ”€โ”‚
       โ”‚                              โ”‚
       โ”‚โ”€โ”€ { node_id, capability_vec, โ”‚
       โ”‚     mesh_profile, region,    โ”‚
       โ”‚     sig: ed25519(...) }  โ”€โ”€โ”€โ”€โ–บโ”‚
       โ”‚                              โ”‚โ”€โ”€ verify sig against registered pubkey
       โ”‚                              โ”‚โ”€โ”€ capability eligibility check
       โ”‚                              โ”‚โ”€โ”€ assign routing pool slot
       โ”‚โ—„โ”€โ”€ { admitted: true,         โ”‚
       โ”‚      pool_tier: "standard",  โ”‚
       โ”‚      task_queue_subject: "tasks.us-east.standard",
       โ”‚      heartbeat_interval: 15  โ”‚
       โ”‚    }                    โ”€โ”€โ”€โ”€โ”€โ”‚

Handshake failure modes & recovery

OIDC token expiredDaemon auto-refreshes via refresh_token. If refresh fails โ†’ re-run device-flow auth.
JWKS verification failureCoordinator rejects registration. Check that identity.dosfi.ai is reachable from the Coordinator network. Retry with exponential backoff (max 5 attempts).
Capability ineligibleCoordinator returns 422 with ineligibility reason (e.g. "insufficient_vram"). Node cannot join pool for rejected model sizes; may still serve smaller models.
mTLS cert mismatchEd25519 cert in ClientHello does not match registered DeviceID. Re-run `meshinfer-node auth` to re-issue the DOSFI-signed certificate.
Region quota exceededCoordinator returns 429 with Retry-After header. Fleet manager queues and retries; does not count against reputation.
G.4

Phase III โ€” Routing Participation Rules

Admission criteria

CriterionMinimum requirementPreferredNotes
Reputation scoreโ‰ฅ 40 / 100โ‰ฅ 75New nodes start at 50
Heartbeat intervalโ‰ค 15 sโ‰ค 10 sMissed ร— 3 = degraded
Model availabilityโ‰ฅ 1 supported model cachedโ‰ฅ 3 modelsCold-start eligible after probe
Latency SLOโ‰ค 800 ms p95 for assigned req_classโ‰ค 300 msMeasured by Coordinator probes
Uptime (rolling 24h)โ‰ฅ 80%โ‰ฅ 95%Below 80% โ†’ reduced traffic weight
Verification pass rateโ‰ฅ 95%โ‰ฅ 99%Below 95% โ†’ investigation flag
Network type (mobile)Wi-Fi onlyWi-Fi (5 GHz)Cellular excluded at Coordinator
Power state (mobile)ChargingCharging + โ‰ฅ 80%Battery-only excluded
Thermal stateโ‰ค fairnominalserious/critical = immediate removal

Traffic weight assignment

The Router assigns a weight to each eligible node in the pool based on reputation, uptime, model cache state, and latency adherence. Selection uses weighted random over the eligible pool. A small exploration factor routes a fraction of requests to random eligible nodes to maintain continuous learning and prevent any single node from monopolizing traffic.

The exact weight function, decay curves, and exploration constant are Coordinator-internal and tuned per release. Node operators influence their weight indirectly: higher reputation, better uptime, warm model caches, and lower latency all increase routing weight.

Pool tiers & task assignment

standardEligible for all req_class โˆˆ {tiny, small}. Assigned to the standard task queue for its region.
capableEligible for req_class โˆˆ {tiny, small, medium}. Reputation โ‰ฅ 70 required.
eliteEligible for all req_class including hard (70B+ sharded). Reputation โ‰ฅ 85, uptime โ‰ฅ 95%, โ‰ฅ 3 models cached.
restrictedReputation 20โ€“39: tiny tasks only, 10% traffic share max. Under monitoring.
suspendedReputation < 20 or verification pass rate < 90%: zero tasks. Human review required.
Equivalent AWS concept
Pool tiers map to ECS task placement constraints + Auto Scaling Groups with min/max capacity. Traffic weight formula is equivalent to Weighted Target Group routing in an ALB.
G.5

Phase III-B โ€” Inference Scheduling Participation Rules

Task lifecycle on a node

sequence
  NATS JetStream              Node Daemon              Coordinator
       โ”‚                           โ”‚                        โ”‚
       โ”‚โ”€ tasks.region.tier โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚                        โ”‚
       โ”‚   { task_id, model,       โ”‚                        โ”‚
       โ”‚     prompt_enc,           โ”‚                        โ”‚
       โ”‚     deadline_ms,          โ”‚                        โ”‚
       โ”‚     cost_slo_usd }        โ”‚                        โ”‚
       โ”‚                           โ”‚โ”€โ”€ preflight check      โ”‚
       โ”‚                           โ”‚   (thermal, battery,   โ”‚
       โ”‚                           โ”‚    model cached?)      โ”‚
       โ”‚                           โ”‚โ”€โ”€ ACK (accept) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚
       โ”‚                           โ”‚โ”€โ”€ start inference      โ”‚
       โ”‚                           โ”‚โ”€โ”€ stream tokens โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚
       โ”‚                           โ”‚โ”€โ”€ task_complete โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚
       โ”‚                           โ”‚   { result_hash,       โ”‚
       โ”‚                           โ”‚     tokens_out,        โ”‚
       โ”‚                           โ”‚     latency_ms }       โ”‚
       โ”‚                           โ”‚โ—„โ”€โ”€ meter_event โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚
       โ”‚                           โ”‚   (DIU issued to node  โ”‚
       โ”‚                           โ”‚    wallet on settlement)โ”‚

Scheduling priority classes

interactiveDeadline โ‰ค 200 ms to first token. Only local or top-10 reputation mesh nodes eligible. Never cold-start. Preempts background tasks on the node.
standardDeadline โ‰ค 2 s to first token. Full eligible pool. Cold-start allowed if model loads within 800 ms.
backgroundNo deadline. Lowest cost mesh nodes. Batching enabled (up to 8 concurrent tasks per node). Used for embeddings, summarization, fine-tune prep.
verificationA sample of all tasks re-dispatched here for deterministic-decode hash comparison. Must match original result hash. Mismatch โ†’ reputation penalty + investigation.

Node-side scheduling rules

Max concurrent tasksConfigurable per node. Default: 2 (standard), 8 (background). Hard cap enforced by daemon โ€” excess task offers are NACKed to Coordinator.
Task acceptance deadlineNode must ACK or NACK within 500 ms of receiving task. No response โ†’ Coordinator re-dispatches with exponential backoff.
Preemption policyBackground tasks may be preempted by interactive tasks if the node has reached its concurrency cap. Preempted background task is re-queued; node reputation is not penalized.
Model cold-start windowCoordinator allocates up to 800 ms for model load before counting against latency SLO. Node must report model_loading: true in its NACK to trigger this window.
G.6

Phase IV โ€” Compute Metering โ†’ DIU Spend

Every inference request that consumes mesh compute generates a metering event. Metering quantifies how much DIU the requester spent on each task. Settlement (ยง G.7) then determines how much DIU the serving node earned.

Metering event structure

json
{
  "event_type":        "inference_metered",
  "request_id":        "req_a1b2c3...",
  "node_id":           "node_f9a3e2b1...",
  "user_email":        "operator@org.com",
  "org_id":            "org_mesh20_prod",
  "model":             "llama-3.2-3b-q4",
  "req_class":         "small",
  "route_decision":    "mesh",
  "tokens_in":         128,
  "tokens_out":        512,
  "latency_ms":        284,
  "success":           true,
  "hypothetical_cloud_cost_usd": 0.00034,
  "actual_cost_usd":             0.00008,
  "diu_spend":                   0.08,
  "diu_savings":                 0.26,
  "timestamp":         "2026-07-06T14:02:33.120Z"
}

DIU spend calculation

pseudo
# DIU spend rate per 1,000 tokens (read from DOSFI pricing oracle):
RATES = {
  "tiny":   { local: 0.0, mesh: 0.02, cloud: 0.08  },
  "small":  { local: 0.0, mesh: 0.08, cloud: 0.34  },
  "medium": { local: 0.0, mesh: 0.24, cloud: 1.20  },
  "hard":   { local: 0.0, mesh: 0.80, cloud: 4.80  },
}

diu_spend(event) =
  (event.tokens_out / 1000) * RATES[event.req_class][event.route_decision]

# Example:
# 512 tokens_out, req_class="small", route="mesh"
# diu_spend = (512 / 1000) * 0.08 = 0.04096 DIU

Metering pipeline

Coordinator Billing MeterEmits metering events to Kafka topic meshinfer.metering.events on task completion.
ClickHouse aggregatorConsumes Kafka stream, writes to UsageRecord entity. Aggregates into MetricSnapshot hourly/daily/monthly.
DOSFI pricing oracleConsulted once per billing period to update DIU rate table. Rate changes take effect on the next billing period โ€” no retroactive adjustments.
Requester wallet debitOrgID DIU wallet is debited atomically with the metering event write. No credit means no task dispatch.
Audit trailEvery metering event written to AuditLog entity with resource_type: "inference_charge" for SOC 2 compliance.
G.7

Phase IV-B โ€” Inference Execution โ†’ DIU Issuance

When a node successfully completes an inference task, it earns DIU. Issuance is calculated from the metering event and credited to the node's wallet by the MeshNativeExchange settlement layer.

DIU issuance calculation

When a node successfully completes a task, it earns a share of the requester's DIU spend. The issuance amount is determined by three factors:

  • Node share: A fixed portion of the DIU spend is allocated to the serving node; the remainder covers platform infrastructure and protocol reserve.
  • Reputation multiplier: Higher-reputation nodes earn an elevated multiplier. Elite-tier nodes receive the highest bonus; low-reputation nodes receive a reduced rate.
  • Quality multiplier: Nodes that meet latency SLOs earn the full multiplier. Tasks completed beyond a multiple of SLO, or failed tasks, yield zero DIU โ€” no payment for poor service.

The exact share ratios, multiplier thresholds, and decay curves are Coordinator-internal economic parameters. They are tuned to ensure compute-backed sustainability and are not publicly replicable.

Issuance event structure

json
{
  "event_type":      "diu_issued",
  "settlement_id":   "stl_x9y8z7...",
  "node_id":         "node_f9a3e2b1...",
  "diu_wallet":      "wallet_7c2d...",
  "source_request_id": "req_a1b2c3...",
  "diu_gross":       0.04096,
  "reputation_mult": 1.10,
  "quality_mult":    1.00,
  "diu_net":         0.04506,
  "platform_fee":    "<platform share of gross>",
  "reserve":         "<protocol reserve of gross>",
  "settlement_epoch": "2026-07-06T15:00:00Z",
  "status":          "pending_settlement"
}
Settlement timing
DIU issuance events are pending until the settlement epoch closes (every hour). At epoch close, MeshNativeExchange batches all pending events, verifies integrity, and commits final wallet credits. Nodes can view pending DIU in real time; settled DIU is final and auditable on-chain.
G.8

Phase IV-C โ€” Settlement Logging โ†’ MeshNativeExchange

Settlement lifecycle

sequence
  Coordinator           MeshNativeExchange          Node Wallet
  Billing Meter              Settlement                   โ”‚
       โ”‚                          โ”‚                       โ”‚
       โ”‚โ”€โ”€ diu_issued events โ”€โ”€โ”€โ”€โ”€โ–บโ”‚                       โ”‚
       โ”‚   (batch, hourly epoch)   โ”‚                       โ”‚
       โ”‚                          โ”‚โ”€โ”€ aggregate batch      โ”‚
       โ”‚                          โ”‚โ”€โ”€ integrity check      โ”‚
       โ”‚                          โ”‚   (hash chain verify)  โ”‚
       โ”‚                          โ”‚โ”€โ”€ commit credits โ”€โ”€โ”€โ”€โ”€โ–บโ”‚
       โ”‚                          โ”‚   { wallet, diu_net,  โ”‚
       โ”‚                          โ”‚     settlement_id }    โ”‚
       โ”‚                          โ”‚โ”€โ”€ write SettlementLog  โ”‚
       โ”‚                          โ”‚   โ†’ AuditLog entity    โ”‚
       โ”‚โ—„โ”€โ”€ epoch_settled ACK โ”€โ”€โ”€โ”€โ”‚                       โ”‚
       โ”‚                          โ”‚โ”€โ”€ publish to DOSFI     โ”‚
       โ”‚                          โ”‚   accounting oracle    โ”‚

Settlement log record

json
{
  "settlement_id":     "stl_epoch_20260706T150000Z",
  "epoch_start":       "2026-07-06T14:00:00Z",
  "epoch_end":         "2026-07-06T15:00:00Z",
  "org_id":            "org_mesh20_prod",
  "node_settlements": [
    {
      "node_id":       "node_f9a3e2b1...",
      "diu_wallet":    "wallet_7c2d...",
      "tasks_served":  147,
      "tokens_out":    89234,
      "diu_gross":     6.234,
      "diu_net":       6.083,
      "status":        "settled"
    }
    // ... 19 more nodes ...
  ],
  "total_diu_issued":   98.441,
  "total_platform_fee": 17.720,
  "total_reserve":       9.844,
  "integrity_hash":    "sha256:cafe...",
  "committed_at":      "2026-07-06T15:00:34Z"
}

Settlement entity fields (AuditLog)

resource_type"settlement_epoch" โ€” queryable via audit log endpoint
action"diu_settled" | "diu_disputed" | "diu_clawback"
status"success" | "failure" | "disputed"
details.node_countNumber of nodes settled in this epoch
details.integrity_hashSHA-256 hash of full settlement batch โ€” verifiable externally
G.9

Phase V โ€” Node Health Checks

Health check types

Check typeIntervalTriggerPass criteriaFailure action
Heartbeat15 sAutomatic (daemon)ACK within 5 s3ร— miss โ†’ degraded; 6ร— โ†’ evict
Capability re-probeOn reconnect / route degradationSDK or CoordinatorSigned probe within 40 msStale capability โ†’ re-probe forced
Latency probeEvery 5 min (top 20% pool)Coordinator active probep95 โ‰ค SLO for tierExceed SLO โ†’ downgrade pool tier
Verification sampleSample of tasksCoordinatorHash match โ‰ฅ 99.5% 7-dayMismatch โ†’ reputation penalty + flag
Model integrity checkOn model loadDaemonSHA-256 matches CDN bundleMismatch โ†’ re-download; task refused
Thermal / power gateEvery heartbeat (15 s)Daemon sensor readthermal โ‰ค fair, charging (mobile)Breach โ†’ immediate pool removal

Health check record schema

json
// NodeHealthCheck entity record:
{
  "node_id":    "node_f9a3e2b1...",
  "check_type": "latency_test",
  "status":     "pass",
  "latency_ms": 187,
  "details": {
    "model":    "llama-3.2-3b-q4",
    "req_class":"small",
    "slo_ms":   300
  },
  "timestamp":  "2026-07-06T14:05:00Z"
}
G.10

Phase V-B โ€” Node Performance Scoring

Reputation score components

ComponentWeightMetricDirection
UptimeWeightedHeartbeat success rate (7-day rolling)Higher = better
Latency adherenceWeighted% of tasks within latency SLOHigher = better
Verification pass rateHighest weight% of sampled tasks with correct hashHigher = better
Task completion rateWeighted% of accepted tasks that complete (not cancelled)Higher = better
Cold-start frequencyMinor weight% of assigned tasks that required cold model loadLower = better

Score update frequency

Real-time componentReputation score updated immediately on verification mismatch, thermal eviction, or missed heartbeat.
Rolling componentFull score recalculated every 15 minutes using a 7-day weighted rolling window. Recent events weighted 2ร— vs. older events.
Score floorA minimum score floor protects against one-time anomalies destroying new nodes. Below a configured threshold โ†’ auto-suspended.
Score ceiling boostNodes sustaining near-perfect metrics over a sustained period earn a permanent Elite bonus that stacks with the reputation multiplier in DIU issuance.
G.11

Phase V-C โ€” Node Privacy Tier Enforcement

Privacy tiers

local_onlyNode serves only tasks from its own registered OrgID. No external prompts processed. Enforced at Coordinator โ€” tasks from other orgs are never dispatched.
mesh_okNode serves tasks from any OrgID in the mesh. Prompts are encrypted (AES-256-GCM) end-to-end โ€” node sees only ciphertext of the prompt, decrypts result for hash.
cloud_okNode may also be used as a relay for cloud fallback proxying. Only applies to server-tier nodes with explicit opt-in.

Privacy enforcement stack

Privacy is enforced structurally at two layers:

  • Coordinator-side (server): Before any task is dispatched, the Coordinator verifies that the node's privacy tier is compatible with the requester's privacy policy. local_only tasks are never sent to nodes outside the requester's OrgID. no_cloud tasks bypass cloud-relay nodes entirely.
  • Node-side (daemon): The daemon independently re-verifies the privacy tier before accepting any task. If a local_only node receives a task from a different OrgID, it NACKs immediately. Prompts are decrypted only in memory, processed, and the result is re-encrypted before transmission โ€” plaintext never leaves the node.

This dual-layer enforcement means privacy is a structural property of the dispatch path, not a runtime policy check that could be bypassed.

G.12

Phase V-D โ€” Node Removal & Replacement Flow

Graceful removal

bash
# Initiate graceful drain on one node:
meshinfer-node drain --node-id node_f9a3e2b1...

# Drain process:
# 1. Coordinator marks node as "draining" โ€” no new tasks dispatched
# 2. In-flight tasks complete normally (up to drain_timeout = 300 s)
# 3. After all tasks complete, daemon sends DEREGISTER to Coordinator
# 4. NodeID moved to "decommissioned" status in registry
# 5. DIU wallet settlement finalized for all pending epochs
# 6. DeviceID retained โ€” can re-register as a new NodeID

Emergency removal (reputation / security breach)

Triggered byReputation score below the minimum floor, verification mismatch rate exceeding threshold, security policy violation, or admin manual override.
Immediate effectNode removed from all routing pools. In-flight tasks cancelled and re-dispatched to next-best node. Requester is not charged for cancelled tasks.
Reputation impactScore set to 0 and frozen. Node cannot re-register with same DeviceID for 72-hour cooling-off period.
DIU clawbackPending unsettled DIU issuance events for the flagged node are held for 24 hours pending review. Settled DIU is final.

Node replacement procedure

1
Identify the node to replace
Use the Node Monitor dashboard or the GET /v1/nodes/{node_id} API to retrieve current status.
2
Drain the target node
Run `meshinfer-node drain --node-id <id>`. Wait for drain_complete confirmation (โ‰ค 300 s).
3
Decommission
Run `meshinfer-node decommission --node-id <id>`. DeviceID is preserved for re-use if desired.
4
Provision replacement
Install client on replacement hardware. Run Phase Iโ€“II registration. New NodeID issued.
5
Verify pool admission
Check `meshinfer-node status` shows pool_tier โ‰  "suspended". Run the Mesh Verification Test (ยง V.1) on the new node.
6
Confirm DIU wallet
New NodeID has a new DIU wallet. Old wallet remains accessible for historical earnings but receives no new issuance.
G.A

Appendix โ€” Per-Node Configuration Reference

toml
# ~/.meshinfer/node.toml  โ€” full configuration reference

[identity]
org_id       = "org_mesh20_prod"
api_key      = "msk_live_..."        # rotate via scheduleAPIKeyRotation
node_id      = ""                    # auto-populated on registration
device_id    = ""                    # auto-populated on first probe

[coordinator]
endpoint     = "https://coordinator.meshinfer.ai"
stream_ws    = "wss://stream.meshinfer.ai/v1/nodes/stream"
region       = "us-east"             # us-east | us-west | eu-west | ap-south
heartbeat_s  = 15
reconnect_backoff_ms = [500, 1000, 2000, 5000, 10000]

[mesh]
profile      = "standard"            # eco | standard | power | off
privacy_tier = "mesh_ok"             # local_only | mesh_ok | cloud_ok
max_concurrent_tasks = 2
max_background_tasks = 8

[hardware]
gpu_util_cap_pct = 50                # max GPU utilization while serving tasks
cpu_util_cap_pct = 60
battery_floor    = 0.20              # pause mesh work below this (mobile)
require_charging = true              # mobile only
thermal_max      = "fair"            # nominal | fair | serious | critical

[models]
cache_dir    = "~/.meshinfer/models"
auto_download = true
preferred    = [
  "llama-3.2-3b-q4",
  "phi-3.5-mini-q4",
  "qwen-2.5-7b-q5"
]

[logging]
level = "info"                       # debug | info | warn | error
audit_log = true                     # write local audit trail
telemetry = true                     # send telemetry to Coordinator