Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e38049a
chore: sync 30-03
AdriGeorge Mar 30, 2026
be04948
fix: fix
AdriGeorge Mar 30, 2026
76767ad
fix: lint
AdriGeorge Mar 30, 2026
9972fe6
fix: fix
AdriGeorge Mar 30, 2026
69968ec
Merge pull request #106 from OceanProtocolEnterprise/feat/sync-30-03
AdriGeorge Mar 30, 2026
92e58d7
fix: update response validation checks and add API key handling in Po…
AdriGeorge Mar 30, 2026
033108d
Merge pull request #107 from OceanProtocolEnterprise/fix/policy_serve…
AdriGeorge Mar 31, 2026
e8a3f94
chore: 1297
AdriGeorge Mar 31, 2026
76470f9
chore: 1292
AdriGeorge Mar 31, 2026
fc8ff55
chore: 1299
AdriGeorge Apr 1, 2026
c4120ae
chore: til 1315
AdriGeorge Apr 6, 2026
6d58b66
chore: till 1315
AdriGeorge Apr 6, 2026
5cd1255
chore: add logging for policy server responses in ComputeInitializeHa…
AdriGeorge Apr 6, 2026
4d10266
chore: update version to 2.1.2 and remove logging for policy server r…
AdriGeorge Apr 6, 2026
35aa2df
Merge pull request #108 from OceanProtocolEnterprise/feature/sync-31-03
AdriGeorge Apr 6, 2026
b5ee800
chore: add node address in policy server call
AdriGeorge Apr 9, 2026
10b295f
Merge pull request #109 from OceanProtocolEnterprise/feat/policyserve…
AdriGeorge Apr 9, 2026
24b9e75
Merge branch 'main' of https://github.com/oceanprotocol/ocean-node
AdriGeorge Apr 17, 2026
ecc7131
Merge branch 'main' of https://github.com/OceanProtocolEnterprise/oce…
AdriGeorge Apr 17, 2026
35aa534
Merge remote-tracking branch 'origin/feat/stage' into feat/sync17-04
AdriGeorge Apr 17, 2026
fd35524
chore: 1332
AdriGeorge Apr 17, 2026
3160f48
fix: fix
AdriGeorge Apr 17, 2026
4bc27b5
chore: v3.0.0
AdriGeorge Apr 20, 2026
c5db7e5
fix: docker old
AdriGeorge Apr 20, 2026
42f6031
fix: fix
AdriGeorge Apr 20, 2026
37614c3
fix: logs
AdriGeorge Apr 20, 2026
f9e60bb
fix: fix
AdriGeorge Apr 20, 2026
1280818
chore: v3.0.1
AdriGeorge Apr 20, 2026
1108789
Merge pull request #110 from OceanProtocolEnterprise/feat/sync17-04
AdriGeorge Apr 21, 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
16 changes: 14 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,17 @@ node_modules
/dist
logs
c2d_storage
.env.local
.env
databases
.env
.env.*
.git
.github
docs
src/test
*.md
*.log
.nyc_output
coverage
docker-compose.yml
elasticsearch-compose.yml
typesense-compose.yml
9 changes: 7 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ 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}]}]}}]}]'
export DOCKER_COMPUTE_ENVIRONMENTS=


2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ jobs:
DB_PASSWORD: 'changeme'
MAX_REQ_PER_MINUTE: 320
MAX_CONNECTIONS_PER_MINUTE: 320
DOCKER_COMPUTE_ENVIRONMENTS: '[{"socketPath":"/var/run/docker.sock","resources":[{"id":"disk","total":10}],"storageExpiry":604800,"maxJobDuration":3600,"minJobDuration": 60,"fees":{"8996":[{"prices":[{"id":"cpu","price":1}]}]},"free":{"maxJobDuration":60,"minJobDuration": 10,"maxJobs":3,"resources":[{"id":"cpu","max":1},{"id":"ram","max":1},{"id":"disk","max":1}]}}]'
DOCKER_COMPUTE_ENVIRONMENTS: '[{"socketPath":"/var/run/docker.sock","environments":[{"storageExpiry":604800,"maxJobDuration":3600,"minJobDuration":60,"resources":[{"id":"cpu","total":4,"max":4,"min":1,"type":"cpu"},{"id":"ram","total":10,"max":10,"min":1,"type":"ram"},{"id":"disk","total":10,"max":10,"min":0,"type":"disk"}],"fees":{"8996":[{"prices":[{"id":"cpu","price":1}]}]},"free":{"maxJobDuration":60,"maxJobs":3,"resources":[{"id":"cpu","max":1},{"id":"ram","max":1},{"id":"disk","max":1}]}}]}]'
DOCKER_REGISTRY_AUTHS: ${{ env.DOCKER_REGISTRY_AUTHS }}
- name: Check Ocean Node is running
run: |
Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,66 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v3.0.0](https://github.com/oceanprotocol/ocean-node/compare/v2.1.1...v3.0.0)

- Bump basic-ftp from 5.2.1 to 5.3.0 [`#1332`](https://github.com/oceanprotocol/ocean-node/pull/1332)
- fix(#1327): use container finishedAt to compute algo stop time on crash [`#1331`](https://github.com/oceanprotocol/ocean-node/pull/1331)
- Bump axios from 1.13.6 to 1.15.0 [`#1323`](https://github.com/oceanprotocol/ocean-node/pull/1323)
- Bump follow-redirects from 1.15.11 to 1.16.0 [`#1326`](https://github.com/oceanprotocol/ocean-node/pull/1326)
- fix cpu pinning for benchmark env [`#1328`](https://github.com/oceanprotocol/ocean-node/pull/1328)
- Bump protobufjs from 7.5.4 to 7.5.5 [`#1333`](https://github.com/oceanprotocol/ocean-node/pull/1333)
- Bugs/fix_persistent_storage [`#1329`](https://github.com/oceanprotocol/ocean-node/pull/1329)
- switch envs, resources are shared on multiple envs and are exclusive [`#1303`](https://github.com/oceanprotocol/ocean-node/pull/1303)
- persistentStorage [`#1318`](https://github.com/oceanprotocol/ocean-node/pull/1318)
- fix: update dockerfile node image [`#1325`](https://github.com/oceanprotocol/ocean-node/pull/1325)
- Bump @tootallnate/once and sqlite3 [`#1322`](https://github.com/oceanprotocol/ocean-node/pull/1322)
- Bump basic-ftp from 5.2.0 to 5.2.1 [`#1321`](https://github.com/oceanprotocol/ocean-node/pull/1321)
- feat(#1317): update quickstart script & networking docs [`#1320`](https://github.com/oceanprotocol/ocean-node/pull/1320)
- chore: add node address in policy server request [`#1319`](https://github.com/oceanprotocol/ocean-node/pull/1319)
- Bump defu from 6.1.4 to 6.1.6 [`#1316`](https://github.com/oceanprotocol/ocean-node/pull/1316)
- Bump lodash from 4.17.23 to 4.18.1 [`#1313`](https://github.com/oceanprotocol/ocean-node/pull/1313)
- add relay listen [`#1315`](https://github.com/oceanprotocol/ocean-node/pull/1315)
- feat: improve c2d docker image security [`#1302`](https://github.com/oceanprotocol/ocean-node/pull/1302)
- fix: add Dockerfile user to docker group dynamically [`#1314`](https://github.com/oceanprotocol/ocean-node/pull/1314)
- make network access configurable [`#1310`](https://github.com/oceanprotocol/ocean-node/pull/1310)
- feat: improve dockerfile [`#1295`](https://github.com/oceanprotocol/ocean-node/pull/1295)
- fix(#1285): use all RPCs defined in `fallbackRPCs` [`#1311`](https://github.com/oceanprotocol/ocean-node/pull/1311)
- feat: update get jobs handler to allow query for running jobs only [`#1299`](https://github.com/oceanprotocol/ocean-node/pull/1299)
- Bump path-to-regexp [`#1306`](https://github.com/oceanprotocol/ocean-node/pull/1306)
- add image scan for vulnerabilities after pull/build [`#1292`](https://github.com/oceanprotocol/ocean-node/pull/1292)
- C2D: build custom images updates [`#1297`](https://github.com/oceanprotocol/ocean-node/pull/1297)
- enforce policyserver policy if exists [`#1304`](https://github.com/oceanprotocol/ocean-node/pull/1304)
- make sure we have enough time to claim [`#1298`](https://github.com/oceanprotocol/ocean-node/pull/1298)
- secure docker [`#1291`](https://github.com/oceanprotocol/ocean-node/pull/1291)
- Bump picomatch [`#1296`](https://github.com/oceanprotocol/ocean-node/pull/1296)
- feat: add constraints check for job resource allocation [`#1270`](https://github.com/oceanprotocol/ocean-node/pull/1270)
- remove engine level resources [`46cce61`](https://github.com/oceanprotocol/ocean-node/commit/46cce6104c377bdfb975baab72a1f5f399dec31a)
- set cpu pinning for envs, release cpu once the job is done, handle the case when the node restarts [`bf1a460`](https://github.com/oceanprotocol/ocean-node/commit/bf1a46004cd8a98681941e1a70e7280c0549c024)
- fixed tests envs [`c3c274f`](https://github.com/oceanprotocol/ocean-node/commit/c3c274f4a5e04ebf5261fded091e4e978139af6a)

#### [v2.1.1](https://github.com/oceanprotocol/ocean-node/compare/v2.1.0...v2.1.1)

> 25 March 2026

- fix: claim payments for jobs without jobIdHash [`#1293`](https://github.com/oceanprotocol/ocean-node/pull/1293)
- Release 2.1.1 [`702a059`](https://github.com/oceanprotocol/ocean-node/commit/702a059a84a6fe64f0bd941f24eb85289909780e)

#### [v2.1.0](https://github.com/oceanprotocol/ocean-node/compare/v2.0.2...v2.1.0)

> 24 March 2026

- Feature/validate_output_structure [`#1284`](https://github.com/oceanprotocol/ocean-node/pull/1284)
- add jobIdHash and cancelTx [`#1286`](https://github.com/oceanprotocol/ocean-node/pull/1286)
- fix processor nonce [`#1287`](https://github.com/oceanprotocol/ocean-node/pull/1287)
- Release 2.1.0 [`3910376`](https://github.com/oceanprotocol/ocean-node/commit/39103760f65507893eaebc58546d721ae1e61f43)

#### [v2.0.2](https://github.com/oceanprotocol/ocean-node/compare/v2.0.1...v2.0.2)

> 23 March 2026

- document publish flow & isolated markets [`#1273`](https://github.com/oceanprotocol/ocean-node/pull/1273)
- make sure we bill all cases [`#1277`](https://github.com/oceanprotocol/ocean-node/pull/1277)
- Release 2.0.2 [`8d43849`](https://github.com/oceanprotocol/ocean-node/commit/8d43849d20e14b0c8d66aba4aa6a4f877b15d187)

#### [v2.0.1](https://github.com/oceanprotocol/ocean-node/compare/v2.0.0...v2.0.1)

Expand Down
91 changes: 50 additions & 41 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,53 @@
FROM ubuntu:22.04 AS base
RUN apt-get update && apt-get -y install bash curl git wget libatomic1 python3 build-essential
COPY .nvmrc /usr/src/app/
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
ENV NVM_DIR=/usr/local/nvm
RUN mkdir $NVM_DIR
ENV NODE_VERSION=v22.15.0
# Install nvm with node and npm
RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \
&& source $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
ENV NODE_PATH=$NVM_DIR/$NODE_VERSION/lib/node_modules
ENV PATH=$NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH
ENV IPFS_GATEWAY='https://ipfs.io/'
ENV ARWEAVE_GATEWAY='https://arweave.net/'

FROM base AS builder
COPY package*.json /usr/src/app/
COPY scripts/ /usr/src/app/scripts/
WORKDIR /usr/src/app/
FROM node:22.22.2-trixie@sha256:17ccc50fade521c62e2acefd0c975bf5eb2a09632b8717fa7f8b1c2b4e967a07 AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
build-essential \
libatomic1 \
git \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app
COPY package*.json ./
COPY scripts/ ./scripts/
RUN npm ci
COPY . .
RUN npm run build && npm prune --omit=dev


FROM node:22.22.2-trixie-slim@sha256:76043ed3132293c26b960ede4358d3c8ba424ee64662cd2d56318b76fcc51c4c AS runner
RUN apt-get update && apt-get install -y --no-install-recommends \
dumb-init \
gosu \
libatomic1 \
&& rm -rf /var/lib/apt/lists/*

ENV NODE_ENV=production \
IPFS_GATEWAY='https://ipfs.io/' \
ARWEAVE_GATEWAY='https://arweave.net/' \
P2P_ipV4BindTcpPort=9000 \
P2P_ipV4BindWsPort=9001 \
P2P_ipV6BindTcpPort=9002 \
P2P_ipV6BindWsPort=9003 \
P2P_ipV4BindWssPort=9005 \
HTTP_API_PORT=8000

EXPOSE 9000 9001 9002 9003 9005 8000

# Docker group membership is handled at runtime in docker-entrypoint.sh by
# inspecting the GID of /var/run/docker.sock, so it works across hosts.

WORKDIR /usr/src/app

COPY --chown=node:node --from=builder /usr/src/app/dist ./dist
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 ./

RUN mkdir -p databases c2d_storage logs

COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

FROM base AS runner
COPY . /usr/src/app
WORKDIR /usr/src/app/
COPY --from=builder /usr/src/app/node_modules/ /usr/src/app/node_modules/
RUN npm run build
ENV P2P_ipV4BindTcpPort=9000
EXPOSE 9000
ENV P2P_ipV4BindWsPort=9001
EXPOSE 9001
ENV P2P_ipV6BindTcpPort=9002
EXPOSE 9002
ENV P2P_ipV6BindWsPort=9003
EXPOSE 9003
ENV P2P_ipV4BindWssPort=9005
EXPOSE 9005
ENV HTTP_API_PORT=8000
EXPOSE 8000
ENV NODE_ENV='production'
CMD ["npm","run","start"]
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["node", "--max-old-space-size=28784", "--trace-warnings", "--experimental-specifier-resolution=node", "dist/index.js"]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ Your node is now running. To start additional nodes, repeat these steps in a new
- [API Endpoints](docs/API.md)
- [Environmental Variables](docs/env.md)
- [Database Guide](docs/database.md)
- [Storage Types](docs/Storage.md)
- [Asset Storage Types](docs/Storage.md)
- [Persistent storage for c2d jobs](docs/persistentStorage.md)
- [Testing Guide](docs/testing.md)
- [Network Configuration](docs/networking.md)
- [Logging & accessing logs](docs/networking.md)
Expand Down
84 changes: 42 additions & 42 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,57 +93,57 @@
"claimDurationTimeout": 3600,
"validateUnsignedDDO": true,
"jwtSecret": "ocean-node-secret",
"enableBenchmark": false,
"dockerComputeEnvironments": [
{
"socketPath": "/var/run/docker.sock",
"resources": [
"environments": [
{
"id": "disk",
"total": 1
}
],
"storageExpiry": 604800,
"maxJobDuration": 3600,
"minJobDuration": 60,
"access": {
"addresses": [],
"accessLists": []
},
"fees": {
"8996": [
{
"prices": [
"storageExpiry": 604800,
"maxJobDuration": 3600,
"minJobDuration": 60,
"resources": [
{
"id": "disk",
"total": 1
}
],
"access": {
"addresses": [],
"accessLists": []
},
"fees": {
"8996": [
{
"id": "cpu",
"price": 1
"prices": [
{
"id": "cpu",
"price": 1
}
]
}
]
}
]
},
"free": {
"maxJobDuration": 3600,
"minJobDuration": 60,
"maxJobs": 3,
"access": {
"addresses": [],
"accessLists": []
},
"resources": [
{
"id": "cpu",
"max": 1
},
{
"id": "ram",
"max": 1
},
{
"id": "disk",
"max": 1
"free": {
"maxJobDuration": 3600,
"maxJobs": 3,
"resources": [
{
"id": "cpu",
"max": 1
},
{
"id": "ram",
"max": 1
},
{
"id": "disk",
"max": 1
}
]
}
]
}
}
]
}
]
}
19 changes: 19 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
set -e

# Fix ownership of directories that may be mounted as volumes (owned by root).
# Runs as root, then drops to 'node' user via gosu.
chown -R node:node /usr/src/app/databases /usr/src/app/c2d_storage /usr/src/app/logs 2>/dev/null || true

# Add node user to the docker group matching the host's /var/run/docker.sock GID,
# so compute jobs can access the socket regardless of the host's docker GID.
if [ -S /var/run/docker.sock ]; then
SOCK_GID=$(stat -c '%g' /var/run/docker.sock)
if ! getent group "$SOCK_GID" > /dev/null 2>&1; then
groupadd -g "$SOCK_GID" dockerhost 2>/dev/null || true
fi
DOCKER_GROUP=$(getent group "$SOCK_GID" | cut -d: -f1)
usermod -aG "$DOCKER_GROUP" node
fi

exec gosu node dumb-init -- "$@"
Loading
Loading