Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f15c7d9
Shared Hardware Resource Pool for Compute Environments (#1390)
alexcos20 Jun 20, 2026
2e892d2
Merge branch 'main' into next-4
alexcos20 Jun 20, 2026
4f2ac60
Merge branch 'main' into next-4
alexcos20 Jul 9, 2026
f207e5a
Add Services (#1402)
alexcos20 Jul 9, 2026
0e007d8
bump contract to 2.9.0 (#1410)
alexcos20 Jul 9, 2026
ea51b7c
cross-node auth tokens (#1404)
giurgiur99 Jul 9, 2026
6cb3ead
Update src/components/Auth/index.ts
alexcos20 Jul 9, 2026
d82a5b3
Update src/components/Auth/index.ts
alexcos20 Jul 9, 2026
1733e6d
Merge branch 'main' into next-4
alexcos20 Jul 10, 2026
f5a4353
fix network recreate (#1416)
alexcos20 Jul 14, 2026
7bcf7f0
add cpuList (#1417)
alexcos20 Jul 14, 2026
78fbc3b
services updates (#1422)
alexcos20 Jul 17, 2026
90fb2a9
remove axios (#1424)
alexcos20 Jul 17, 2026
c765ec6
Feature/use native sqlite (#1423)
alexcos20 Jul 17, 2026
38507db
resources constrains (#1425)
alexcos20 Jul 17, 2026
85fa61b
New updatedAt record for services (#1428)
giurgiur99 Jul 23, 2026
c483ea1
allow docker specs on service restart (#1429)
alexcos20 Jul 24, 2026
cfee6c3
add more templates
dnsi0 Jul 24, 2026
f25cf82
fix stable diffusion template
dnsi0 Jul 28, 2026
3dc2179
Merge pull request #1431 from oceanprotocol/add-templates
dnsi0 Jul 29, 2026
fb4085b
fix extend service (#1435)
alexcos20 Jul 30, 2026
879f495
new arg "release" for stop service (#1434)
giurgiur99 Jul 30, 2026
9b0a689
fix bugs
alexcos20 Aug 5, 2026
61285cb
fix comment
alexcos20 Aug 5, 2026
8d98cb5
Merge pull request #1443 from oceanprotocol/bug/fix_negative_runMaxWa…
bogdanfazakas Aug 11, 2026
e20dc15
add database retry
dnsi0 Aug 13, 2026
c34ad6f
add envs, validations, tests
dnsi0 Aug 13, 2026
d85d002
fix return type
dnsi0 Aug 13, 2026
b764761
remove timeout
dnsi0 Aug 14, 2026
3559492
fix review
dnsi0 Aug 14, 2026
682a59d
fix type
dnsi0 Aug 14, 2026
66ee749
Merge branch 'main' into next-4
alexcos20 Aug 18, 2026
9825ba3
Merge pull request #1447 from oceanprotocol/add-database-retry
dnsi0 Aug 19, 2026
d5de4fe
Authenticate `PolicyServerPassthrough` / `initializePSVerification`, …
alexcos20 Aug 20, 2026
c583736
Feature/docker stats (#1436)
alexcos20 Aug 20, 2026
787cf3d
remove serviceEndpoints (#1448)
alexcos20 Aug 20, 2026
32bf96a
use custom ocean.js/cli
alexcos20 Aug 20, 2026
730a784
fix merge errors
alexcos20 Aug 20, 2026
d52abe7
Dependency and toolchain refresh (#1453)
alexcos20 Aug 21, 2026
867c9a1
workflows comfy (#1442)
giurgiur99 Aug 27, 2026
bfdcbf1
Fix: indexer silently skipping DDOs on transient provider errors (#1458)
alexcos20 Aug 28, 2026
bc498a6
bump to node 24 (#1454)
alexcos20 Aug 28, 2026
7fea488
guard ddo metadata
alexcos20 Aug 28, 2026
266338f
fix ocean.js branch
alexcos20 Aug 28, 2026
7090883
make "Failed to advertise queued" and Caught "The operation was abor…
alexcos20 Aug 28, 2026
dc15828
use proper ocean-cli branch
alexcos20 Aug 28, 2026
1be02b6
add helper script
alexcos20 Aug 28, 2026
aa02f7d
fix ci
alexcos20 Aug 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ databases
.env.*
.git
.github
docs
docs/*
!docs/serviceTemplates
src/test
*.md
*.log
Expand Down
15 changes: 8 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ export P2P_BOOTSTRAP_NODES=
export P2P_FILTER_ANNOUNCED_ADDRESSES=

## compute
# Each environment defines its own resources (CPU, RAM, disk, GPUs) with full configuration.
# CPU, RAM, and disk are per-env exclusive: inUse tracked only within the environment where the job runs.
# A global check ensures the aggregate usage across all environments does not exceed physical capacity.
# GPUs are shared-exclusive: if a job on envA uses gpu0, it shows as in-use on envB too.
# CPU cores are automatically partitioned across environments based on each env's cpu.total.
# CPU and RAM defaults are auto-detected from the system when not configured.
# export DOCKER_COMPUTE_ENVIRONMENTS='[{"socketPath":"/var/run/docker.sock","environments":[{"id":"envA","storageExpiry":604800,"maxJobDuration":3600,"minJobDuration":60,"resources":[{"id":"cpu","total":4,"max":4,"min":1,"type":"cpu"},{"id":"ram","total":16,"max":16,"min":1,"type":"ram"},{"id":"disk","total":500,"max":500,"min":10,"type":"disk"},{"id":"gpu0","total":1,"max":1,"min":0,"type":"gpu","init":{"deviceRequests":{"Driver":"nvidia","DeviceIDs":["0"],"Capabilities":[["gpu"]]}}}],"fees":{"1":[{"feeToken":"0x123","prices":[{"id":"cpu","price":1},{"id":"ram","price":0.1},{"id":"disk","price":0.01},{"id":"gpu0","price":5}]}]}}]}]'
# Resources are defined at the Docker-connection level (socketPath) and shared across all environments.
# cpu, ram, and disk are auto-detected from the host — omit them to use all available capacity,
# or include them to cap/reserve (e.g. limit an 8-core host to 6 cores for compute).
# GPUs and other hardware go in the connection-level "resources" array with kind:"discrete".
# Each environment references pool resources by id using lightweight refs {id, total?, min?, max?}.
# Dual-gate tracking for fungible resources: per-env ceiling (Gate 1) + engine-wide pool (Gate 2).
# Discrete resources (GPUs) are tracked globally — a GPU in use on envA shows as in-use on envB too.
# export DOCKER_COMPUTE_ENVIRONMENTS='[{"socketPath":"/var/run/docker.sock","resources":[{"id":"disk","total":500},{"id":"gpu0","kind":"discrete","type":"gpu","total":1,"description":"NVIDIA A100","platform":"nvidia","driverVersion":"570.195.03","init":{"deviceRequests":{"Driver":"nvidia","DeviceIDs":["GPU-uuid-a"],"Capabilities":[["gpu"]]}}}],"environments":[{"id":"envA","storageExpiry":604800,"maxJobDuration":3600,"minJobDuration":60,"resources":[{"id":"cpu"},{"id":"ram"},{"id":"disk","max":500},{"id":"gpu0"}],"fees":{"1":[{"feeToken":"0x123","prices":[{"id":"cpu","price":1},{"id":"ram","price":0.1},{"id":"disk","price":0.01},{"id":"gpu0","price":5}]}]}}]}]'
export DOCKER_COMPUTE_ENVIRONMENTS=


5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
with:
repository: 'oceanprotocol/barge'
path: 'barge'
ref: '43cfdfd21154a2bae00770b779e7c39390ff5043'
- name: Login to Docker Hub
if: ${{ env.DOCKERHUB_PASSWORDNONO && env.DOCKERHUB_USERNAMENONO }}
run: |
Expand All @@ -129,6 +130,8 @@ jobs:
working-directory: ${{ github.workspace }}/barge
run: |
bash -x start_ocean.sh --no-node --with-typesense 2>&1 > start_ocean.log &
env:
CONTRACTS_VERSION: '2.9.0'
- run: npm ci
- run: npm run build
- run: docker image ls
Expand Down Expand Up @@ -226,6 +229,8 @@ jobs:
working-directory: ${{ github.workspace }}/barge
run: |
bash -x start_ocean.sh --no-node --with-typesense 2>&1 > start_ocean.log &
env:
CONTRACTS_VERSION: '2.9.0'
- run: docker image ls
- name: Delete default runner images
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
branches:
- 'main'
- 'next-4'

env:
DOCKERHUB_IMAGE: ${{ 'oceanprotocol/ocean-node' }}
Expand Down
5 changes: 3 additions & 2 deletions CLAUDE.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.


Ocean Node is the all-in-one backend for the Ocean Protocol stack. A single Node process
replaces three legacy components: **Provider** (data access / encryption / compute),
**Aquarius** (metadata cache) and the **subgraph** (on-chain event indexing). It is a
Expand Down Expand Up @@ -77,6 +76,7 @@ no semicolons, single quotes, `printWidth: 90`, no trailing commas, 2-space tabs

**Tests run against compiled JS in `dist/test/`, not the TypeScript source.** The
`test:*` scripts all call `npm run build-tests` first, which:

- compiles `src/` (incl. `src/test`) into `dist/`,
- copies `src/test/.env.test` and `.env.test2` into `dist/test`,
- copies `src/test/config.json` to `$HOME/config.json`.
Expand Down Expand Up @@ -189,7 +189,7 @@ the command, looks up the handler by `task.command`, and calls `handler.handle(t
Two front doors, one dispatcher:

- **HTTP `POST /directCommand`** (`src/components/httpRoutes/commands.ts`): validates the
body, then decides *local vs remote*. If the command targets this node (or no P2P), it
body, then decides _local vs remote_. If the command targets this node (or no P2P), it
calls `oceanNode.handleDirectProtocolCommand(...)`. If it targets another peer and P2P is
enabled, it forwards via `oceanNode.getP2PNode().sendTo(node, msg, multiAddrs)`. Responses
are streamed back to the client (binary or text).
Expand Down Expand Up @@ -225,6 +225,7 @@ register it in the `CoreHandlersRegistry` constructor; add param validation; opt
REST route in `src/components/httpRoutes/` and mount it in `httpRoutes/index.ts`.

Handler source is grouped under `src/components/core/`:

- `handler/` — general handlers (ddo, download, encrypt, fees, nonce, query, status, p2p,
auth, accessList, escrow, fileInfo, persistentStorage, policyServer, getJobs).
- `compute/` — C2D command handlers: `initialize`, `startCompute` (paid), `freeStartCompute`,
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ COPY --chown=node:node --from=builder /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=builder /usr/src/app/schemas ./schemas
COPY --chown=node:node --from=builder /usr/src/app/package.json ./
COPY --chown=node:node --from=builder /usr/src/app/config.json ./
# Ship the operator service-on-demand templates so SERVICE_TEMPLATES_PATH=docs/serviceTemplates/
# resolves inside the image (the rest of docs/ stays excluded via .dockerignore).
COPY --chown=node:node --from=builder /usr/src/app/docs/serviceTemplates ./docs/serviceTemplates

RUN mkdir -p databases c2d_storage logs

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This command will run you through the process of setting up the environmental va

> [!NOTE]
> The quickstart script attempts to automatically detect GPUs (NVIDIA via `nvidia-smi`, others via `lspci`) and appends them to your `DOCKER_COMPUTE_ENVIRONMENTS`.
> Detected GPUs are added to `DOCKER_COMPUTE_ENVIRONMENTS[0].resources` (the connection-level resource pool), and a lightweight ref is added to `DOCKER_COMPUTE_ENVIRONMENTS[0].environments[0].resources`.
> If you choose to manually configure `DOCKER_COMPUTE_ENVIRONMENTS` before running the script (e.g. via environment variable), be aware that auto-detected GPUs will be **merged** into your configuration, which could lead to duplication if you already manually defined them.
> For most users, it is recommended to let the script handle GPU detection automatically.

Expand Down Expand Up @@ -155,3 +156,4 @@ Your node is now running. To start additional nodes, repeat these steps in a new
- [Docker Deployment Guide](docs/dockerDeployment.md)
- [C2D GPU Guide](docs/GPU.md)
- [Compute pricing](docs/compute-pricing.md)
- [Services (Service-on-Demand)](docs/services.md)
15 changes: 14 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,31 @@
"validateUnsignedDDO": true,
"jwtSecret": "ocean-node-secret",
"enableBenchmark": false,
"serviceTemplatesPath": "docs/serviceTemplates/",
"dockerComputeEnvironments": [
{
"socketPath": "/var/run/docker.sock",
"resources": [
{
"id": "disk",
"total": 1
}
],
"environments": [
{
"storageExpiry": 604800,
"maxJobDuration": 3600,
"minJobDuration": 60,
"resources": [
{
"id": "cpu"
},
{
"id": "ram"
},
{
"id": "disk",
"total": 1
"max": 1
}
],
"access": {
Expand Down
Loading
Loading