Skip to content

v1.2.0

Choose a tag to compare

@djh58 djh58 released this 12 Nov 17:53
· 13 commits to main since this release
v1.2.0
16bd082

qbit-explorer v1.2.0 fixes broadcasting under the esplora backend (POST /api/tx and /api/txs/test now go through qbitd, accept the hex in any body and answer 503 while qbitd is unavailable), repairs duplicate canonical block rows that older releases left below the indexing window, follows invalidateblock and chain wipes without waiting for a new block, makes /blocks and the mining dashboard follow reorgs live, and brings Node.js 26.13.1, nginx and dependency security updates. The Docker Compose example now needs qbitd's RPC login in docker/.env: read Upgrading before you update a Compose setup.

Fixed

  • Under MEMPOOL.BACKEND esplora, POST /api/tx and POST /api/txs/test answered 400 for every transaction. Neither the Broadcast Transaction page nor clients of the esplora API's POST /tx could broadcast, and the Test Transactions page couldn't test. Both routes now go through qbitd, as POST /api/tx/push does. A broadcast answers the txid, and a transaction qbitd refuses gets 400 with qbitd's error code (sendrawtransaction RPC error: {"code":N}). The none and electrum backends already sent both to qbitd.
  • POST /api/tx takes the hex as the whole body, whatever its content type, as qbit-electrs's POST /tx does. A form, which curl -d sends and the API docs show, an application/octet-stream body and one without a content type got 400 sendrawtransaction RPC error: {"code":-1} under every backend, without reaching qbitd, as the route only read a body sent as text.
  • The backend follows invalidateblock, and a chain wiped while it runs, such as a regtest reset, without waiting for a new block. It took a qbitd tip below its cached blocks for a node catching up, and kept them. GET /api/blocks/tip/height and the block lists showed the invalidated blocks until qbitd's next block, and a wiped chain's blocks until the new chain reached their heights or the backend restarted. Now the backend asks qbitd whether it is still syncing. While qbitd is in initial block download, or has headers above its tip, the blocks stay, as before. Otherwise the backend drops them, as it drops blocks a reorg replaced, and sends pages one reorg.
  • /blocks and the mining dashboard's block list follow a reorg without a reload. They used to keep the blocks a reorg replaced, and never showed a block replaced at the same height. After a reorg to a shorter chain, they skipped new blocks until the chain passed the old tip. Now the WebSocket's blocks win at their heights, a page the reorg reached takes the new chain's blocks, and the page count follows the new tip on every page. When the WebSocket's blocks would leave a gap on the first page, as after the tab missed more blocks than they hold, the page asks the API again. When an answer from /api/v1/blocks doesn't fit the WebSocket's chain, such as a browser's or CDN's copy from before the reorg, the list asks again 10 seconds later, past caches. From the third request of a page load on, failed ones included, it shows the blocks that fit instead.
  • With indexing on, the chain check repairs heights below the indexing window that hold two or more canonical block rows, which releases before 1.1.0 could leave. 1.1.0's check stopped above the window's lowest height. At each such height, it makes qbitd's block the only canonical row, and has the hashrate indexers index the daily and weekly periods they skipped. They logged Hashrate window is not consecutive at heights <h> and <h> and skipped the periods around such a height, and block lists showed either row. The period that begins right after it wasn't skipped: its block window starts at that height and took either row, so the check deletes its hashrates to have them computed again. The window's lowest height gets qbitd's block as its only canonical row, indexed first if no row is it. Below that height, a height where none of the rows is qbitd's block is left as it is, with one warning. If it holds two canonical rows, the hashrate periods around it stay skipped, and the one after it keeps hashrates computed with either row. Hashrates computed with a lone row from another chain that the check replaces are computed again.
  • With CPFP indexing on, a repair at the window's lowest height deletes the CPFP clusters from there to the tip, as the chain check's repairs above it do, and the CPFP indexer rebuilds them, which can take a long time on a large window. Below that height, which the CPFP indexer doesn't cover, CPFP clusters stay as they are.
  • A new block's coinbase that qbit-electrs hasn't indexed yet no longer logs an error. The backend fetches it as the block arrives, and logged Cannot fetch tx <txid>. Reason: Request failed with status code 404 before it got the coinbase from qbitd. On testnet4 that was about one block in three. A first fetch that finds no such transaction now logs at debug level. Any other first failure, such as a refused connection, a timeout or a 5xx, still logs an error, even when qbitd then returns the transaction.

Changed

  • docker/docker-compose.yml takes qbitd's RPC login from CORE_RPC_USERNAME and CORE_RPC_PASSWORD in docker/.env, instead of setting mempool and mempool, so a copied compose file no longer carries a known password. docker/.env.example lists both. The compose file has no default for them: until both are set, every docker compose command in docker/ stops, down, ps and logs included. This breaks existing Compose setups until docker/.env has the login (see Upgrading). The backend image's start.sh still defaults both to mempool for a container started without them.
  • POST /api/tx, /api/tx/push, /api/txs/test and /api/v1/txs/package answer 503 qbitd is unavailable, try again later when qbitd can't take the call: it can't be reached or doesn't answer in time, is warming up (-28) or not ready (-10), turns the backend away with 401 or 403, or has a full work queue. They answered 400, which a wallet can take for a refused transaction. qbitd's refusals still get 400 with its code. A malformed body gets 400 with the reason, such as Non-hex request body, instead of an RPC error with a code the explorer made up.
  • With MEMPOOL.BACKEND electrum and qbitd's txindex disabled or still building, GET /api/address/:address/txs and GET /api/scripthash/:scripthash/txs answer 503 and name qbitd's txindex, as the transaction routes have since 1.1.0. They answered 500. Both routes look up an after_txid outside the history, and the page's own transactions, in qbitd, so even a first page with a confirmed transaction answered 500. Their other answers keep their status.
  • Node.js 26.12.1 to 26.13.1, the 26.x security release of 2026-11-10, in the backend image, the frontend image's build stage, .nvmrc and CI. The backend serves plain HTTP, so the release's high-severity http2 and TLS fixes don't reach it, but its llhttp update and https.Agent fix do.
  • The frontend image's nginx:1.30.6-alpine base is pinned to the digest Docker Hub rebuilt on Alpine 3.24.4, for its curl, expat and brotli security fixes. nginx stays 1.30.6.
  • Backend dependencies: bitcoinjs-lib 6.1.8 to 6.1.10, for three high advisories in its PSBT fee calculation and Block.checkProofOfWork(), which the explorer doesn't use, and the test tools' @babel/core 7.28.5 to 7.29.13, for a low one. Of the code 6.1.10 changes, the explorer calls only Psbt.updateInput, from POST /api/v1/psbt/addparents, which now also clears cached fee and transaction data the route doesn't read. Frontend dependencies: domino 2.1.6 to 2.1.9, which only the SSR server uses, for CVE-2026-101895 and 2.1.9's serialization XSS fixes.

Documentation

  • docker/README.md shows how to make qbitd's RPC login with qbit's share/rpcauth/rpcauth.py and put it in docker/.env, or to use qbitd's RPC cookie instead, and which characters to keep out of the password.
  • docs/qbit-local-dev.md describes the regtest smoke script's new last check, which mines a block, runs invalidateblock on it and expects the backend's tip to follow. It runs only with the regtest harness's smoke.env and a node on regtest.
  • .github/rulesets/README.md says how to rename a required check, as a Node update does to five of them, so that pull requests can still merge.

Upgrading

  • Docker Compose: set CORE_RPC_USERNAME and CORE_RPC_PASSWORD in docker/.env before you run any docker compose command in docker/. If your qbitd still accepts the old sample's login, this line, run from the repository root, puts it there:

    printf '\nCORE_RPC_USERNAME=mempool\nCORE_RPC_PASSWORD=mempool\n' >> docker/.env

That keeps a known password, so replace it next: give qbitd an rpcauth line in place of the old login, restart qbitd, and put the new login in docker/.env, as docker/README.md shows.

  • No database migration and no config change: the schema stays at version 113. With indexing on, the first chain check may repair rows below the indexing window, as described under Fixed.
  • With a full-history index (MEMPOOL.INDEXING_BLOCKS_AMOUNT at -1, as in the production/ templates), duplicate canonical rows are inside the walk instead, which has repaired them since 1.1.0. With CPFP indexing on, as there too, its first repair deletes the CPFP clusters from the lowest repaired height to the tip, and the CPFP indexer rebuilds them, which can take hours on a long chain. A database that ran 1.1.0 with -1 has had that repair already.
  • Rebuild both images: the backend image and the frontend image's build stage use Node.js 26.13.1, and the frontend image serves from the new nginx digest. If you run the backend outside Docker, update Node.js to 26.13.1 too.

Known limits

  • After a reorg deeper than the indexing window, which in practice only a regtest chain sees, the chain check doesn't look again at the heights below the window that it repaired or left alone.
  • With CPFP indexing on, a block that arrives after a repair at the window's lowest height, before the CPFP indexer's next run, moves the window past that height, which then keeps no CPFP clusters: its transactions show no CPFP data rather than wrong data. A reorg that reaches the window's lowest height does the same.
  • Block lists, in regtest or operator cases: nine or more blocks within a minute of a deep reorg end the protection against cached answers from before it early. After two deep rollbacks in a row, a lagging origin's answer from before the first can show blocks above the tip until a reload, or until the chain passes them.
  • Block lists ask past caches more than they need. After a deep reorg, while the API's answers don't fit the WebSocket's chain, as from a backend left on the old chain, each new block can make an open list send up to three such requests, about three a minute. While the API fails, each retry, every 10 seconds, is one too. Answers to ?fresh= requests carry the same 60-second Expires as others, so caches keep copies that nothing asks for again.
  • A stale first answer, such as a browser's copy from before a reorg the tab didn't see, can leave the page count too high until the next reorg. Only the count is off.
  • If the CPFP delete at the window's lowest height fails partway and a block arrives before the retry, that height can keep the old clusters. The delete is upstream's $deleteClustersFrom, which upstream's reorg cleanup uses the same way, kept as is.

Maintenance

  • Dependabot version updates are off (.github/dependabot.yml removed). Dependency changes are made by hand, each with a reason and a full-tree audit; see AGENTS.md.

Full changes: v1.1.0...v1.2.0