Rates Engine v0.5.0-rc.52
Pre-release[v0.5.0-rc.52] — 2026-05-15
Changed
-
Status page: removed the "Backfill by decoder" panel. Each
backfill restart (without-resume) creates fresh cursor rows
keyed by chunk boundaries, so the panel accumulated "stalled"
rows from every prior partial run — making the page look like
data was unreliable even when later runs (or live ingest) had
filled the same ledger ranges. Thedensity_pctcolumn on
backfill_coverage already answers "do we have data here"
honestly via interval union. Wire field retained; only the UI
panel dropped. -
deploy.yml hardening. Two fixes after the rc.51 deploy
failures: (1) the migration-staging step'sls … | head
trippedpipefailvia SIGPIPE even though staging succeeded —
swapped for a SIGPIPE-safesort | head+ explicit count;
(2) newmigrations_skipworkflow input so operators who have
applied migrations out-of-band (or know the schema is unchanged)
can deploy past the playbook's hardcoded passwordless DSN, which
fails auth against the live db. Proper DSN-from-target-host fix
is a follow-up.
Fixed
-
Backfill-coverage snapshot was permanently "pending". The
cache-refresh query (BackfillCoverageStats) ran a single
SELECT ... GROUP BY sourceover thetradeshypertable. Once
trades grew past ~2700 chunks, that scan needed >2700 chunk
AccessShareLocks in one transaction, overflowing
max_locks_per_transaction(256 on r1) with
out of shared memory. The error was masked by the API's 30s
context timeout, so the symptom looked like a slow query rather
than a hard limit.Rewritten to a per-source loop: each source's earliest/latest
ledger viaORDER BY ts {ASC,DESC} LIMIT 1(chunk-exclusion
stops after the first/last chunk — ~3s vs ~68s forMIN()/MAX()
which seek every per-chunk index), trade count approximated from
the 24h source/total ratio scaled byapproximate_row_count
(precise per-sourceCOUNT(*)is 2:34s on sdex). Each statement
runs in its own implicit transaction so the per-transaction lock
budget resets — the 2700-chunk overflow can't recur. Full refresh
is now ~23s across all 13 on-chain sources.Cache-refresh timeout raised 30s → 2min (it's a background
goroutine, never bounds an API request; 2min sits below the 5min
refresh interval so refreshes don't stack). -
/v1/pools?order_by=pairreturned 500 on every request. The
pair-ordered SQL branch inbuildPoolsQuerywas missing the
filter.Assetarg in itsargsslice — postgres returned
pq: got 6 parameters but the statement requires 7because the
CTE references$7. The volume-desc branch already had the
correct 7-arg slice. Caught live on r1 2026-05-14.
Added
- CORS
Allow-Credentials: trueopt-in for cookie-bearing
cross-origin fetches. New[api].allow_credentialsconfig flag
(default false). Required for the magic-link session on
/v1/account/me+/v1/account/keysto actually work from a
cross-origin browser SPA — pre-fix the preflight emitted
Access-Control-Allow-Originbut noAccess-Control-Allow-Credentials,
so browsers stripped cookies. The middleware now panics at boot
when bothallowed_origins=["*"]andallow_credentials=true
are set, since browsers reject that combo at the parser.