Skip to content

Publish as @runonflux/bitcore-node 4.0.0 on Node 24 - #19

Merged
MorningLightMountain713 merged 18 commits into
masterfrom
upgrade/current-node-and-deps
Oct 28, 2026
Merged

MorningLightMountain713 merged 18 commits into
masterfrom
upgrade/current-node-and-deps

Conversation

@MorningLightMountain713

@MorningLightMountain713 MorningLightMountain713 commented Oct 26, 2026 •

Copy link
Copy Markdown

Publishes @runonflux/bitcore-node 4.0.0: Node 24, zeromq 6, socket.io 4 (v2/v3 clients still served), express 5. A scoped package runs as the service named without its scope (@runonflux/insight-api is the service insight-api), so existing servicesConfig keys and service dependencies keep working. installExplorer.sh installs from npm.

The socket.io handshake carries the same CORS headers and io cookie (SameSite=Strict) as socket.io 2. The socket RPC registers getNetworkHash (a height) and getAddressSummary (an address and options) with the arguments they take.

379 tests pass. Running on labnet (the lab's own Flux chain) beside 1.3.0's stack on the same node: the API answers identically, and over socket.io 2.x clients get the same handshake headers, the same answers to every socket RPC method and the same events (blocks, transactions, address subscriptions) with identical payloads; socket.io 4.x clients connect too. The React UI works against it in a browser, and a transaction sent through /api/tx/send was mined.

Publishing. This package is released through npm's staged publishing. Publishing a
GitHub release (tag vX.Y.Z) runs CI, which sets the version from the tag, runs the tests and
stages that version on npm through trusted publishing (GitHub's OIDC; no npm token is stored).
A staged version is not public: nobody can install it until a maintainer approves it on
npmjs.com, or with npm stage approve, which requires 2FA. Each package needs a trusted
publisher on npmjs.com for this repository's ci.yml, allowing staged publishing only.

Order: each layer is published before the one above it. The packages depend on each other
by version, so they are released lowest first, each approved before the next:

  1. bitcoind-rpc and bitcore-lib
  2. bitcore-message
  3. bitcore-node, insight-api and insight-ui

Until the packages below this one are on npm, this PR's CI cannot install them and fails; that
is the order, not a broken change. Once they are published, this PR refreshes its
package-lock.json against npm in one commit, and CI passes.

🤖 Generated with Claude Code

MorningLightMountain713 and others added 11 commits October 23, 2026 14:25
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zeromq 6 subscribes with the promise API: a Subscriber socket whose
messages are read with for await, and connection logging from its event
observer. socket.io 4 accepts Engine.IO v3 clients (allowEIO3) and
reflects every origin with credentials on the transport, as socket.io 2
did; socketHandler still applies allowedOriginRegexp. Express 5 apps keep
the qs query parser. lru-cache 11, commander 15, liftoff 5, async 3 and
body-parser 2 replace their old majors.

mkdirp, rimraf and path-is-absolute give way to fs.mkdir/fs.rm recursive
and path.isAbsolute. The npm module is replaced by the system npm: remove
runs `npm ls <service> --json` in the configuration directory.

bitcoind-rpc and bitcore-lib are git+https dependencies pinned to their
master heads. npm 12 refuses git dependencies and dependency install
scripts by default, so .npmrc allows git and package.json approves the
zeromq, bufferutil and utf-8-validate install scripts.

Test tooling is mocha 12, chai 6, sinon 22 and proxyquire 2, with c8 for
coverage; jshint, istanbul and coveralls are dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zeromq 6 ships prebuilt binaries with libzmq bundled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The expectations describe the Flux node: t-addresses, the Flux block
header, rpc ports 16124/26124, the address balance subscription and
event, the 27 API methods, a history window of 500, getblockhashes with
its options argument, getInfo with network info, and console.debug for
debug logs. The scaffold create tests wait for their callbacks and check
the base configuration create writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bitcore-lib's lodash 4 has no _.unique; _.uniq is in both 3 and 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package is published to npm under the runonflux scope and takes
@runonflux/bitcore-lib ^0.16.0 and @runonflux/bitcoind-rpc ^0.8.0 from
npm, so it has no git dependency. It ships index.js, bin and lib. The CLI
finds a node's local install by that name, and `create` writes a package
that depends on the scoped packages and approves, by name, the install
scripts bitcore-node approves.

regtest/p2p.js and its devDependency bitcore-p2p are removed: BitPay's
Bitcoin P2P client cannot parse Flux's Zcash-format blocks, and bitcore-node
reaches fluxd over RPC and ZMQ only.

installExplorer.sh installs bitcore-node and insight-api from npm, names
the insight-api service @runonflux/insight-api, and adds the MongoDB 8.0
and Flux apt repositories with signed-by keyrings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A configured service package @runonflux/insight-api provides the
service insight-api: its settings stay under servicesConfig.insight-api
and services that depend on insight-api, such as insight-ui, find it.
installExplorer.sh installs insight-ui from npm as @runonflux/insight-ui.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI runs the tests on every push and pull request. A published GitHub
release sets the package version from its tag, runs the tests and stages
that version on npm through trusted publishing: it stays unpublished
until a maintainer approves it on npmjs.com with 2FA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MorningLightMountain713 MorningLightMountain713 changed the title Publish as @runonflux/insight-api 2.0.0 on Node 24 Publish as @runonflux/bitcore-node 4.0.0 on Node 24 Oct 26, 2026
… take

A socket RPC call passes the registered number of parameters followed by the
callback. getNetworkHash takes a height and getAddressSummary an address and
options; with the counts at 0 and 1 the callback landed in a data parameter
and answering threw, which exits the process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A request without an Origin gets Access-Control-Allow-Origin "*" and no
credentials; one with an Origin gets it back with credentials. The io cookie
is SameSite=Strict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm verifies a provenance-signed publish by comparing repository.url with
the GitHub repository the workflow ran in, case-sensitively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…from npm

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A signal listener is called with the signal's name. Bound straight to
exitHandler, that name arrived as its error: every SIGINT also took the
uncaught-exception path, ran a second shutdown and exited -1. SIGTERM,
the stop signal of docker, systemd and pm2, now stops the node the same
way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each cache held a number of entries whatever their size: an address's
utxo or txid list can run to hundreds of thousands of items, and 50,000
of them fill any memory. options.cacheSizeMB (default 512) is now shared
out between the caches, each entry is sized by its buffers and lists, and
a value larger than 16 MB is not cached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MorningLightMountain713
MorningLightMountain713 merged commit a88f7e5 into master Oct 28, 2026
4 checks passed
@MorningLightMountain713
MorningLightMountain713 deleted the upgrade/current-node-and-deps branch October 28, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant