Rates Engine v0.5.0-rc.55
Pre-release
Pre-release
·
722 commits
to main
since this release
[v0.5.0-rc.55] — 2026-05-15
Changed
backfill_coverage[].trade_count→entries, backed by an
always-on per-source tally (source_entry_counts, migration
0035). The oldtrade_countcame from the IO-contended
BackfillCoverageStatstrades scan — during an all-time backfill
it never completed, so every source's count collapsed to a
misleading0(we actually had 60M+ trades). It was also
structurally always-0for oracle sources, which write to
oracle_updates, nevertrades. The newentriescolumn is a
~20-row tally table the writers bump atomically and
idempotently:InsertTrade/InsertOracleUpdateincrement it
in the same statement as the row insert via a data-modifying
CTE gated onHAVING count(*) > 0, so a backfill re-walk
(ON CONFLICT DO NOTHING→ 0 rows) never inflates the count.
Reading it is O(20) regardless of trades/oracle_updates size, so
it stays exact and available even mid-backfill, and it counts
oracle updates for oracle sources. Newratesengine-ops seed-entry-countsauthoritatively reconciles the tally from a
full GROUP BY (run once post-backfill to fold in pre-counter
history; SETs not ADDs, so re-running converges). Status-page
column "Trades" → "Entries"; the section heading "Raw-trades
coverage" → "Ingest coverage". Wire-shape change to
/v1/diagnostics/ingestion(pre-v1; OpenAPI updated).