cryptofoundry

Contact cryptofoundry

Tell us what you want to build or automate.

adamant

ADAMANT Blockchain Node v0.11.1

ADAMANT blockchain node v0.11.1 is a major security and reliability release for node operators, delegates, pool operators, explorers, messengers, and service developers. It removes legacy forging and DApp runtime control APIs (addressing GHSA-vjhq-r5fg-85cx), adds optional operator-password encryption for delegate forging passphrases, enables production HTTP and WebSocket anti-abuse limits, hardens the install and repair scripts, fixes PostgreSQL, peer, and round-settlement reliability issues, and moves the documentation and OpenAPI 3.2 specification into this repository.

v0.11.1 is the first published release of the v0.11 line. The v0.11.0 code was merged to master on 2026-11-23 but never tagged. v0.11.1 adds one network fix on top of it, so operators already running v0.11.0 from master should upgrade.

Upgrading is strongly recommended for security hardening, operational reliability, and API and documentation alignment. This release introduces no consensus fork and no new SQL migrations. Block and transaction serialization, signatures, delegate ordering, rewards, fees, activation heights, and slot timing are unchanged from v0.10.2. It does include breaking HTTP API changes; read the upgrading guide first: https://docs.adamant.im/own-node/upgrading.html

What’s new in v0.11.1

The v0.11.0 release shipped with a regression where live peer objects had no syncProtocol, so the WebSocket client’s peers.list({ syncProtocol: 'http' }) returned no candidates. Nodes made zero outbound WebSocket connections and logged No suitable peers found for WebSocket connections every update. They still synced over HTTP and inbound WebSocket, but real-time block and transaction push over outbound WebSocket did not work. Peer.accept() now sets the default syncProtocol: 'http' and isBroadcastingViaSocket: false on the instance. Regression tests cover both the Peer defaults and the exact getRandomPeers() query.

The upgrading guide received a v0.11.1 section plus monitoring notes. The default sudo since Ubuntu 25.10 (sudo-rs) rejects Defaults:zabbix !requiretty from the sample sudoers file, and nvm interpreter paths must be updated in the Zabbix wrapper and the sudoers rule together.

Security and operator hardening

Legacy forging and DApp runtime control surfaces have been removed entirely, eliminating server-side code execution, download/unzip/npm/sandbox paths, and proxy-trusted HTTP forging control routes rather than attempting to patch authentication around deprecated surfaces.

Optional encrypted delegate passphrases are now supported. Operators can encrypt forging.secret entries with an operator password (admnode-enc-v1., AES-256-GCM plus async scrypt with N=131072, r=8, p=1) via npm run adm-node -- forging encrypt|unlock|lock|status, while preserving full plaintext compatibility. Nodes with encrypted secrets stay fully operational (sync, peers, APIs, mempool) while forging remains locked until unlocked via startup TTY prompt or the owner-only local Unix control socket under <checkout>/.run (validated for canonical directory chain, owner, mode, and inode; never accepting passwords via argv or env vars). The release includes tools/zabbix/ fixed-allowlist wrapper, sudoers rules, UserParameter, and Zabbix 7.0 templates emitting identity-free local lock-state JSON (loading, disabled, locked, partial, unlocked, unavailable) and separate public missed-block/productivity checks.

Production anti-abuse limits are now enabled by default. Per-IP (IPv6 /56-grouped) aggregate and route-class caps operate over a 60-second window: Public REST /api/* (15300 aggregate; status: 12000, read: 3000, publish: 300, excluding CORS OPTIONS preflight) and Peer HTTP /peer/* (44000 aggregate; status: 20000, sync: 12000, broadcast: 12000, with fixed HTTP 429 and X-Adamant-Rate-Limit: 1 negotiation so upgraded peers are throttled cleanly without being banned). In v0.11.0, /peer/* requests omitting X-Adamant-Rate-Limit: 1 skip both hard limits and slow-down so legacy v0.10.x peers are not evicted during upgrades. Because callers control that header, hostile clients omitting it are not throttled in-node on /peer/* (including GET /peer/blocks); operators should enforce outer rate limits on /peer/* at their reverse proxy or firewall. Client WebSocket (wsClient.limits) active/pending connection pools, connection-attempt windows, per-socket address/type/chat-subtype caps, and subscription rate windows are enforced, along with Node WebSocket (wsNode) per-IP and per-nonce handshake caps.

Install and repair scripts have been hardened. Shared helpers were extracted into tools/lib/adamant_node_common.sh with unit test coverage and CI ShellCheck linting. The scripts generate PM2 ecosystem files with kill_timeout: 120000 and absolute nvm interpreter; refuse to restart syncing/loading/rebuilding nodes unless -f is passed; and install a systemd drop-in (After=/Wants= PostgreSQL and Redis, TimeoutStopSec=180, LimitCORE=0). They require independently trusted SHA-256 verification and gzip --test before restoring snapshots; fix_node.sh verifies snapshots before dropping the database by default (-d for explicit drop-first); and install dependencies with npm ci --omit=dev and pinned npm/PM2/logrotate versions.

Dependencies were refreshed past a 7-day release-age quarantine. The release adds .npmrc min-release-age=7 and scripts/checkDependencyQuarantine.js enforced in CI across both root package-lock.json and docs/package-lock.json. Reviewed allowScripts were recorded ([email protected]: true, javascript-obfuscator: false) and dependencies refreshed with 0 moderate/high/critical audit findings (only 3 existing low findings remain in pinned bitcore-mnemonic/bitcore-lib/elliptic).

API and WebSocket updates

States, chats, and chatrooms filter correctness was improved. The and:-prefixed filters are mapped cleanly, toHeight (b_height <= toHeight) is enforced on /api/states/get and /api/chats/get, the shared SQL placeholder bug when combining sender/recipient/participant filters is fixed, keysIds was renamed to keyIds with 20-char KVS key validation, and unsupported or: and unapplied fields are now rejected.

A standardized 429 Too Many Requests contract was introduced, returning {"success": false, "error": "..."} with Retry-After, standard RateLimit-* headers (including RateLimit-Scope), optional legacy X-RateLimit-*, and CORS exposure.

The outbound WebSocket peer rotation fix resets syncProtocol to http before tearing down outbound WS peer sockets during rotation/re-initialization so connectedPeers no longer exhausts its candidate pool.

Node reliability, database, and peer networking

Outbound peer health checks and transport response limits are now bounded. Per-cycle probe targets are capped (maxProbeTargets: 20, unverifiedProbeLimit: 5), concurrency (updateConcurrency: 8), spacing (probeSpacingMs: 50), and peer table size (maxPeers: 500). Exponential backoff (30s to 1h) is applied on network errors and unreachable non-seed peers are evicted after 6 consecutive failures (respecting 24h grace and minConnectedPeers: 10). Outbound peer response caps are scoped per endpoint to cover JSON worst-case expansion (256 MiB for /peer/blocks, 32 MiB for /peer/transactions, 2 MiB for /peer/signatures, 256 KiB for /peer/list, 64 KiB for status/broadcast acks) without evicting peers on sync cap errors. Streaming sync requests allow up to max(peers.options.timeout, 270000) ms for /peer/blocks (just below constants.syncStallTimeout) and max(peers.options.timeout, 60000) ms for other sync endpoints, deferring only the sync scope for 30 s on active streaming deadline aborts without global network-failure backoff, while preserving peers.options.timeout as the socket inactivity timeout and status/broadcast deadline.

PostgreSQL connection recovery was improved. Connectivity-failed clients are marked fatal so pg-promise closes and replaces them. Idle pool disconnects are logged, and a 10s connectionTimeoutMillis, pure-JS TCP keepalive, idleTimeoutMillis mapping, and a post-migration 300s query_timeout were added so dropped DB connections cannot wedge sequence.

The mem-checkpoint guard query was optimized by replacing the full account-to-blocks join with a height-bounded getSlotAccountsBlockAboveHeight(slot) scanning only blocks above the checkpoint height. Default seed peers were updated to point mainnet and testnet bootstrap peer lists to relocated active init nodes and correct port 43998 for 138.201.152.191.

Protocol, consensus, and round settlement

Height-bounded summedRound and aligned rollback reward indexing were added. The query AND b.height <= ${height} was added to sql/rounds.js#summedRound (passed from modules/rounds.js#sumRound) so genesis replay from height 1 does not prematurely settle fees/rewards from persisted blocks 2..101 before height 101. The logic/round.js#applyRound rollback (backwards === true) was fixed to pair each delegate directly with its own roundChanges.at(i) entry without mutating scope.roundDelegates, preventing mismatched reward subtraction during mixed-reward milestone round rollbacks. Bit-for-bit state equivalence was verified on canonical mainnet and testnet across full rebuild from height 1, image startup, and checkpoint recovery. A separate pre-existing backwardTick outsiders / votesWeight rollback defect when active top-101 delegate rankings change across a round boundary remains tracked in #300.

There is no consensus fork and no new SQL migrations. Transaction/block serialization, signatures, delegate ranking, rewards, fees, activation heights, and persisted database schema are unchanged from v0.10.2.

Documentation and OpenAPI consolidation

VitePress documentation and the OpenAPI 3.2 specification were consolidated directly into docs/ and openapi/ inside the Adamant-im/adamant repository, enabling atomic code, schema, and docs updates. All docs/OpenAPI tooling (vitepress, @redocly/cli, swagger-ui-dist) was isolated inside docs/package.json, docs/package-lock.json, and docs/.npmrc (min-release-age=7), keeping root package.json clean. A GitHub Actions workflow builds and deploys a unified GitHub Pages site from master (https://docs.adamant.im/ and https://docs.adamant.im/schema/ plus schema.json), with CI enforcement verifying openapi/specification/openapi.yaml info.version matches root package.json version on PRs targeting master. All operator/API docs and 50 OpenAPI operations were updated for v0.11.0, with new own-node/upgrading.md, own-node/security.md, own-node/monitoring.md, and own-node/testing.md added, and README.md, .github/CONTRIBUTING.md, tools/zabbix/README.md, AGENTS.md, and AI_AGENT_NOTES.md streamlined. Downstream consumers Adamant-im/adamant-api-jsclient and Adamant-im/adamant-console will be updated in follow-up work to pull OpenAPI sources from Adamant-im/adamant/openapi/.

Upgrade notes for operators

Upgrade Node.js to 22.22.2+ (on 22.x) or 24.15.0+ before deploying. Stop the running node gracefully (SIGINT/SIGTERM and wait for Cleaned up successfully — never kill -9). Install production dependencies strictly from the lockfile:

npm ci --omit=dev

Review config.json and delete legacy api.options.limits and peers.options.limits blocks containing max: 0 to inherit the v0.11.0 production defaults (or set explicit limit values above 0). Verify trustProxy is true only when the node is exclusively reachable through one immediate reverse proxy overwriting X-Forwarded-For. Remove any automation calling retired forging or DApp HTTP control routes; manage forging via forging.secret plus graceful restart (and optionally encrypt secrets with npm run adm-node -- forging encrypt, ensuring the checkout directory is not group/world-writable and configuring local Zabbix lock-state monitoring). If you use encrypted delegate passphrases, unlock forging after every restart:

npm run adm-node -- forging unlock

No new database migrations are introduced in v0.11.x. After restart, verify /api/node/status, peer connectivity, anti-abuse limits, and (if using encrypted secrets) npm run adm-node -- forging status --json.

Production validation

Before this release, v0.11.0 ran on a mainnet node with 4 forging delegates using encrypted passphrases (Ubuntu 26.04, Node.js 24.22.3, PM2), upgraded from v0.10.3 with a graceful directory swap. Over 16+ hours, 471 blocks were forged with no missed blocks after the restart, height in step with the network, and no ERR entries apart from broadhash-consensus refusals during one ~30-second catch-up after a slow round tick (the safety check refused to forge while behind; no block was lost). Encrypted forging was verified end to end: forging encrypt followed by graceful restart and forging unlock over the control socket while still loading; the Zabbix lock-state template and separate delegate-outcome hosts were verified. The only v0.11.0-specific warning was the outbound WebSocket regression fixed in v0.11.1.

Breaking changes

Full operator migration guide: https://docs.adamant.im/own-node/upgrading.html

Legacy forging and DApp runtime control APIs have been removed (#295, GHSA-vjhq-r5fg-85cx). The legacy forging HTTP control routes (enable, disable, status, enableAll, disableAll) and legacy DApp runtime/execution/signing/peer routes (install, launch, stop, uninstall, state inspection, server-side signing/withdrawal, dynamic per-DApp routes, and DApp peer runtime routes) are gone. Forging is now configured exclusively via forging.secret in config.json (with graceful restart on changes) and optional local adm-node CLI unlock/lock when using encrypted passphrases. Legacy forging.access (whiteList) and dapp config blocks remain loadable for upgrade compatibility and are ignored with a startup deprecation warning. Read-only DApp APIs and consensus handling for DApp transaction types 5, 6, and 7 are unchanged; clients must sign transactions locally and submit via standard transaction endpoints (POST /api/transactions / POST /api/transactions/process).

Strict and:-only filter validation is now enforced on states, chats, and chatrooms (#294). On /api/states/get (GET and POST), /api/chats/get, and /api/chatrooms/*, and:-prefixed filters are normalized to plain field names and combined strictly with AND. or:-prefixed filters are now rejected (OR filters are not supported) instead of being silently ignored. Previously unapplied or misspelled parameters (including fromHeight/toHeight and query userId on /api/chatrooms/*, blockId, timestamp/amount/fee filters, minConfirmations, and misspelled keysIds) are now rejected; states batch key lookup is renamed keysIds to keyIds using the 20-character KVS key format. Conflicting plain and and:-prefixed values are also rejected.

The minimum Node.js version has been raised (#296). The required runtime is now ^22.22.2 || >=24.15.0 (up from >=22.13.0). Node.js 24.0.0–24.14.x is unsupported for the development toolchain.

Production anti-abuse limits are enabled by default (#292). config.default.json now enables non-zero HTTP and WebSocket rate limits. Existing config.json files containing legacy max: 0 under api.options.limits or peers.options.limits keep that surface disabled and log a startup warning; operators should delete those blocks to inherit the v0.11.0 defaults or configure explicit limit values above 0.