5. Hardware Registration
This tutorial covers registering hardware resources in the dAIEDGE Middleware, including computational devices for AI model training, inference, and benchmarking.
Overview
Hardware registration allows you to:
- Publish computational resources to the blockchain
- Define hardware specifications and capabilities via structured JSON
- Register supported ML runtimes and formats
- Enable benchmarking on your hardware
- Control access to your resources
What Gets Registered
The hardware registration uses a target specification JSON object that includes:
- Hardware Specifications: CPUs, GPUs/accelerators, memory, storage, power requirements
- Software Specifications: OS, ML engines/frameworks, supported benchmarking types
- Cost Information: Pricing details for resource usage
- Metadata: Unique identifiers, descriptions, implementation status
Prerequisites
- Completed Authentication, Wallet Management, Identity Management, and Role Management tutorials
- Active session and wallet
HARDWARE_OWNER_ROLEandHARDWARE_MANAGER_ROLEassigned to your identity (see Role Management)
Required Roles
Hardware Owner Role
To register and manage hardware, you need the HARDWARE_OWNER_ROLE:
| Role | Purpose | Required For |
|---|---|---|
HARDWARE_OWNER_ROLE | Register and manage hardware resources | Creating new hardware registrations |
HARDWARE_MANAGER_ROLE | List and view hardware resources | Browsing hardware on the platform |
HARDWARE_OPERATOR_ROLE | Update hardware (if delegated) | Updating hardware you don’t own but are delegated to manage |
Authorization
You can register hardware if:
- Your identity has
HARDWARE_OWNER_ROLE(granted byADMIN_ROLE)
You can list/view hardware if:
- Your identity has
HARDWARE_MANAGER_ROLE(granted byADMIN_ROLE)
You can update hardware if:
- You own the hardware (registered it), OR
- You have
HARDWARE_OPERATOR_ROLEAND are a valid delegate of the hardware owner (via Identity Management)
See the Role Management tutorial to obtain these roles.
Step 1: Register Hardware
Register a new hardware resource on the blockchain using a structured target specification.
Endpoint
POST /api/v1/hardwareRequest
curl -X POST https://middleware-daiedge.bisite.usal.es/api/v1/hardware \
-H "Content-Type: application/json" \
-H "x-session-id: {SESSION_ID}" \
-d '{
"walletId": "0000019a95f732ce0adb8f69ccc7d362",
"password": "WalletPass123!",
"did": "did:ethr:development:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7",
"is_implemented": true,
"description": "Raspberry Pi 4B with 4GB RAM",
"family": "rpi4b",
"hardware_spec": {
"cost": {
"value": 0.02,
"currency": "EUR",
"unit": "hour"
},
"cpus":[
{
"id" : "cpu_001",
"arch": "arm64",
"model": "cortex-a72",
"specs": {
"rate": { "value": 1500, "unit": "MHz", "kind": "frequency"},
"cores": { "value": 4, "unit": "cores"},
"computing_power": { "value": 2.0, "unit": "GFLOPS" }
}
}
],
"accelerators": [
{
"id" : "accel_001",
"type": "gpu",
"model": "broadcom-videocore",
"specs": {
"rate": { "value": 500, "unit": "MHz", "kind": "frequency" },
"cores": { "value": 1, "unit": "core" },
"computing_power": { "value": 12.0, "unit": "GFLOPS"}
}
}
],
"memory": {
"type": "LPDDR4",
"kind": "UNIFIED",
"specs": {
"size": { "value": 4096, "unit": "MB" },
"rate": { "value": 3200, "unit": "MHz", "kind": "frequency" }
}
},
"storage": {
"type": "SD",
"specs": {
"size": { "value": 32, "unit": "GB" },
"rate": { "value": 90, "unit": "MB/s", "kind": "read_speed" }
}
},
"power":{
"min": { "value": 7.0, "unit": "W" },
"max": { "value": 15.0, "unit": "W"}
}
},
"software_spec": {
"OS": "Raspberry Pi OS",
"version": "11 (Bullseye)",
"engines":[
{
"id": "ort_001",
"name": "Onnx Runtime",
"family": "ort",
"version": "1.14.1",
"computing_backends": [
"cpu_001",
"accel_001"
],
"supported_applications": [
{
"type": "BENCHMARKING",
"details":{
"supported_types": [
"TYPE1",
"TYPE2",
"TYPE3"
]
}
}
]
},
{
"id": "tf_002",
"name": "TensorFlow Lite",
"family": "tflite",
"version": "2.7.0",
"computing_backends": [
"cpu_001"
],
"supported_applications": [
{
"type": "BENCHMARKING",
"details":{
"supported_types": [
"TYPE1",
"TYPE2"
]
}
}
]
}
]
}
}'Request Body
| Field | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | Your wallet ID |
password | string | Yes | Wallet password |
did | string | Yes | Your identity DID (format: did:ethr:{network}:0x...) with HARDWARE_OWNER_ROLE |
is_implemented | boolean | Yes | Whether the hardware is physically deployed |
description | string | Yes | Human-readable description |
family | string | No | Hardware family/architecture (e.g., nvidia-ada, arm-cortex) |
hardware_spec | object | Yes | Hardware specifications object |
software_spec | object | Yes | Software specifications object |
Response (200 OK)
{
"id": "0x4b864cf8dc2de08557697526cc59c2cbfc3416c7f922b12ef59d0c747724f194"
}Returns the hardware ID (bytes32 hash).
Error Responses
| Code | Error | Cause |
|---|---|---|
| 404 | WALLET_NOT_FOUND | Wallet doesn’t exist |
| 400 | WRONG_PASSWORD | Wallet password incorrect |
| 400 | INVALID_DID | Identity DID format invalid |
| 400 | INVALID_TARGET | Target missing or not a valid JSON object |
| 403 | NOT_DID_OWNER | The DID does not belong to you |
| 403 | INVALID_WALLET | Wallet doesn’t belong to you |
| 403 | HARDWARE_OWNER_ROLE_REQUIRED | Your identity lacks HARDWARE_OWNER_ROLE |
| 500 | TRANSACTION_ERROR | Blockchain transaction failed |
Step 2: View Registered Hardware
List All Hardware
Browse all hardware registered on the platform.
Endpoint
GET /api/v1/hardware?did={did}&page={page}Request
curl -X GET "https://middleware-daiedge.bisite.usal.es/api/v1/hardware?did=did:ethr:development:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7&page=1" \
-H "x-session-id: {SESSION_ID}"Response (200 OK)
{
"hardware": [
{
"id": "0x4b864cf8dc2de08557697526cc59c2cbfc3416c7f922b12ef59d0c747724f194",
"owner": "did:ethr:development:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7",
"created": 1697000000000
}
],
"page": 1,
"totalPages": 10,
"total": 245
}Note: The list endpoint returns only basic information (ID, owner DID, creation timestamp). Use the detail endpoint below to get full hardware specifications.
Get Hardware Details
Retrieve specific hardware information.
Endpoint
GET /api/v1/hardware/{id}?did={did}Request
curl -X GET "https://middleware-daiedge.bisite.usal.es/api/v1/hardware/{HARDWARE_ID}?did=did:ethr:development:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7" \
-H "x-session-id: {SESSION_ID}"Response (200 OK)
{
"hash": "0x4b864cf8dc2de08557697526cc59c2cbfc3416c7f922b12ef59d0c747724f194",
"owner": "did:ethr:development:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7",
"created": 1697000000000,
"is_implemented": true,
"description": "NVIDIA RTX 4090 with 24GB VRAM",
"family": "nvidia-ada",
"hardware_spec": {
"cost": { "value": 0.50, "currency": "EUR", "unit": "hour" },
"cpus": [],
"accelerators": [ ... ],
"memory": { ... },
"storage": { ... },
"power": { ... }
},
"software_spec": {
"OS": "Ubuntu",
"version": "22.04 LTS",
"engines": [ ... ]
}
}Response Fields:
hash: Keccak256 hash of the target JSON (stored on blockchain)owner: DID of the hardware ownercreated: Registration timestamptarget: Complete hardware and software specification object
Step 3: Update Hardware
Modify hardware specifications by updating the target JSON.
Endpoint
POST /api/v1/hardware/{id}Request
curl -X POST https://middleware-daiedge.bisite.usal.es/api/v1/hardware/{HARDWARE_ID} \
-H "Content-Type: application/json" \
-H "x-session-id: {SESSION_ID}" \
-d '{
"walletId": "0000019a95f732ce0adb8f69ccc7d362",
"password": "WalletPass123!",
"did": "did:ethr:development:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7",
"is_implemented": true,
"description": "NVIDIA RTX 4090 with 24GB VRAM (Updated with Triton)",
"family": "nvidia-ada",
"hardware_spec": {
"cost": { "value": 0.50, "currency": "EUR", "unit": "hour" },
"cpus": [],
"accelerators": [
{
"id": "gpu_001",
"type": "gpu",
"model": "rtx-4090",
"specs": {
"rate": { "value": 2520, "unit": "MHz", "kind": "frequency" },
"cores": { "value": 16384, "unit": "cores" },
"computing_power": { "value": 82580, "unit": "GFLOPS" }
}
}
],
"memory": {
"type": "GDDR6X",
"kind": "DEDICATED",
"specs": {
"size": { "value": 24576, "unit": "MB" },
"rate": { "value": 21000, "unit": "MHz", "kind": "frequency" }
}
},
"storage": {
"type": "NVMe",
"specs": {
"size": { "value": 1000, "unit": "GB" },
"rate": { "value": 7000, "unit": "MB/s", "kind": "read_speed" }
}
},
"power": {
"min": { "value": 100, "unit": "W" },
"max": { "value": 450, "unit": "W" }
}
},
"software_spec": {
"OS": "Ubuntu",
"version": "22.04 LTS",
"engines": [
{
"id": "trt_001",
"name": "TensorRT",
"family": "tensorrt",
"version": "8.6",
"computing_backends": ["gpu_001"],
"supported_applications": [
{
"type": "BENCHMARKING",
"details": { "supported_types": ["TYPE1", "TYPE2", "TYPE3"] }
}
]
},
{
"id": "triton_001",
"name": "Triton Inference Server",
"family": "triton",
"version": "2.0",
"computing_backends": ["gpu_001"],
"supported_applications": [
{
"type": "BENCHMARKING",
"details": { "supported_types": ["TYPE1", "TYPE2", "TYPE3"] }
}
]
}
]
}
}
}'Request Body
| Field | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | Your wallet ID |
password | string | Yes | Wallet password |
did | string | Yes | Your identity DID (format: did:ethr:{network}:0x...) |
is_implemented | boolean | Yes | Whether the hardware is physically deployed |
description | string | Yes | Updated description |
family | string | No | Hardware family/architecture |
hardware_spec | object | Yes | Updated hardware specifications |
software_spec | object | Yes | Updated software specifications |
Response (200 OK)
{}Authorization
You can update hardware if:
- You are the hardware owner, OR
- You have
HARDWARE_OPERATOR_ROLEAND are a valid delegate of the owner
Step 4: Delete Hardware
Remove a hardware registration from the platform.
Endpoint
DELETE /api/v1/hardware/{id}Request
curl -X DELETE https://middleware-daiedge.bisite.usal.es/api/v1/hardware/{HARDWARE_ID} \
-H "Content-Type: application/json" \
-H "x-session-id: {SESSION_ID}" \
-d '{
"walletId": "0000019a95f732ce0adb8f69ccc7d362",
"password": "WalletPass123!",
"did": "did:ethr:development:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7"
}'Request Body
| Field | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | Your wallet ID |
password | string | Yes | Wallet password |
did | string | Yes | Your identity DID (format: did:ethr:{network}:0x...) |
Response (200 OK)
{}Authorization
You can delete hardware if:
- You are the hardware owner, OR
- You have
HARDWARE_OPERATOR_ROLEAND are a valid delegate of the owner
Error Responses
| Code | Error | Cause |
|---|---|---|
| 404 | WALLET_NOT_FOUND | Wallet doesn’t exist |
| 404 | HARDWARE_NOT_FOUND | Hardware ID not found |
| 400 | WRONG_PASSWORD | Wallet password incorrect |
| 400 | INVALID_DID | Identity DID format invalid |
| 403 | INVALID_WALLET | Wallet doesn’t belong to you |
| 403 | HARDWARE_OWNER_ROLE_OR_HARDWARE_OPERATOR_ROLE_REQUIRED | Missing required role |
Next Steps
Now that your hardware is registered, you can:
- Resource Access Control - Set access permissions and constraints
- Benchmarking - Execute benchmarks on your hardware
- Marketplace - List hardware for sale or rent
Related Topics
- Role Management - Required
HARDWARE_OWNER_ROLE - Identity Management - Delegation for hardware operations
- Dataset Registration - Register datasets for benchmarking
- AI Model Registration - Register models for benchmarking