NodeCapabilities platform.node-capabilities@1

Generated at from openvibe-contracts v0.84.0 and openvibe-sdk v0.26.0.

Version
1.0.0
Owner
network
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-034
Schema
https://openvibe.network/contracts/platform/node-capabilities.v1.json

Node hardware, placement regions, tags, and operating costs (T1 Universal Fabric; ADR-034 proposed).

Fields

FieldTypeRequiredDescriptionConstraints
node_idstringyes
cpuobjectyes
  • no other fields
cpu.coresnumberyes
  • minimum 0
cpu.threadsinteger
  • minimum 0
archstringyesCPU architecture
memory_mbintegeryes
  • minimum 0
gpuobject
  • no other fields
gpu.modelstringyes
gpu.countintegeryes
  • minimum 0
gpu.vram_mbinteger
  • minimum 0
storageobjectyes
  • no other fields
storage.capacity_gbnumberyes
  • minimum 0
storage.available_gbnumber
  • minimum 0
storage.kindstring
networkobjectyes
  • no other fields
network.ingress_mbpsnumberyes
  • minimum 0
network.egress_mbpsnumberyes
  • minimum 0
regionsarray of stringyes
  • minItems 1
tagsarray of stringyes
costsobjectyes
  • no other fields
costs.per_hour_usdnumberyesEstimated USD
  • minimum 0
costs.egress_per_gb_usdnumberEstimated USD
  • minimum 0

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: example
{
  "node_id": "node-1",
  "cpu": {
    "cores": 8,
    "threads": 16
  },
  "arch": "x86_64",
  "memory_mb": 16384,
  "gpu": {
    "model": "L4",
    "count": 1,
    "vram_mb": 24576
  },
  "storage": {
    "capacity_gb": 500,
    "available_gb": 300,
    "kind": "ssd"
  },
  "network": {
    "ingress_mbps": 1000,
    "egress_mbps": 1000
  },
  "regions": [
    "us-west"
  ],
  "tags": [
    "gpu",
    "edge"
  ],
  "costs": {
    "per_hour_usd": 0.2,
    "egress_per_gb_usd": 0.01
  }
}
Rejected: missing-node_id
{
  "cpu": {
    "cores": 8,
    "threads": 16
  },
  "arch": "x86_64",
  "memory_mb": 16384,
  "gpu": {
    "model": "L4",
    "count": 1,
    "vram_mb": 24576
  },
  "storage": {
    "capacity_gb": 500,
    "available_gb": 300,
    "kind": "ssd"
  },
  "network": {
    "ingress_mbps": 1000,
    "egress_mbps": 1000
  },
  "regions": [
    "us-west"
  ],
  "tags": [
    "gpu",
    "edge"
  ],
  "costs": {
    "per_hour_usd": 0.2,
    "egress_per_gb_usd": 0.01
  }
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('platform.node-capabilities@1', value);   // { valid, errors: [{ path, message }] }