Skip to content

Rates Engine v0.5.0-rc.52

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 15 May 08:48
· 729 commits to main since this 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. The density_pct column 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's ls … | head
    tripped pipefail via SIGPIPE even though staging succeeded —
    swapped for a SIGPIPE-safe sort | head + explicit count;
    (2) new migrations_skip workflow 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 source over the trades hypertable. 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 via ORDER BY ts {ASC,DESC} LIMIT 1 (chunk-exclusion
    stops after the first/last chunk — ~3s vs ~68s for MIN()/MAX()
    which seek every per-chunk index), trade count approximated from
    the 24h source/total ratio scaled by approximate_row_count
    (precise per-source COUNT(*) 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=pair returned 500 on every request. The
    pair-ordered SQL branch in buildPoolsQuery was missing the
    filter.Asset arg in its args slice — postgres returned
    pq: got 6 parameters but the statement requires 7 because 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: true opt-in for cookie-bearing
    cross-origin fetches. New [api].allow_credentials config flag
    (default false). Required for the magic-link session on
    /v1/account/me + /v1/account/keys to actually work from a
    cross-origin browser SPA — pre-fix the preflight emitted
    Access-Control-Allow-Origin but no Access-Control-Allow-Credentials,
    so browsers stripped cookies. The middleware now panics at boot
    when both allowed_origins=["*"] and allow_credentials=true
    are set, since browsers reject that combo at the parser.