You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PSP: replace dead on-chain matching with /permanent/<page>.json fetcher (win.30)
The C++ mctrivia pool implemented an on-chain fee-matching protocol that was
never deployed server-side - the 14 pay-in addresses it watched have never
been paid in 4M blocks of chain history. And mctrivia's actual payment-
registration endpoint (POST /list/<floor>.json) has been returning HTTP 500
since ~July 2024, so no client of any stripe is getting paid. The pool
operator is uncontactable.
Gut serializeMetaProcessor to return "" unconditionally and strip the
14-address list + bytes budget math. Add a background permanentFetcherTask
that walks GET /permanent/<page>.json, pins every CID via local IPFS, and
persists progress to psp1permanentpage in config.cfg. A probeListEndpoint
fires every ~30 min against /list so the dashboard auto-recovers if the
server is ever fixed.
Dashboard rewritten in plain English: "Hosting pool files (unpaid)" instead
of "pinning, payment offline", and a new Payment row that explicitly tells
the user whether DGB is flowing. main.cpp emits a one-shot info block on
startup explaining the state.
Bug fixes along the way:
- RPC Server row was stuck on "Off" even though the server was listening.
The win.26 TCP-connect probe used non-blocking connect() + select() on
writability, which on Windows localhost sometimes times out (200ms) even
though the 3-way handshake completed. Replaced with a simple pointer
check - main.cpp pins RPC::Server via shared_ptr for the process lifetime
and the accept loop catches its own exceptions, so the "dangling pointer"
scenario the probe was guarding against hasn't happened in practice.
Also added a "Checking..." tri-state so the row doesn't briefly flash
red on startup.
- _secretCode now read from psp1secret and persisted on first run instead
of regenerating every startup.
- updateBadList had an unconditional second push_back after dedupe that
grew _badAssets/_badFiles unbounded on every poll.
- _pspStatus / _pspNodeCount now mutex-guarded. Detached background thread
was racing with render.
- Config::refresh/write now preserve comments, blank lines, and original
key ordering via a _rawLines vector. Previously Config round-trips
would silently strip user comments.
- getIPFS() throws on nullptr; replaced with getIPFSIfSet() in mctrivia.cpp
background paths so we don't crash on shutdown races.
- getPermanentStoragePoolListIfSet() added; dashboard first render runs
BEFORE main.cpp constructs the PSP list, so the throwing getter used to
fatal at "Not available".
- Rolling back the permanent page on error created a re-pin loop; now
stays at the current page and retries.
- probeListEndpoint call wrapped in try/catch so a curl exception can't
take down the fetcher thread.
Payment is still offline. This commit cannot fix that - it's a server-side
bug on uncontactable infrastructure. Users running this node are contributing
storage to the DigiByte ecosystem without compensation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments