Skip to content
This repository was archived by the owner on Aug 11, 2026. It is now read-only.

fix: keep emission catch-up running between waves - #673

Closed
Peyton-Spencer wants to merge 1 commit into
mainfrom
fix/emission-catchup-between-waves
Closed

fix: keep emission catch-up running between waves#673
Peyton-Spencer wants to merge 1 commit into
mainfrom
fix/emission-catchup-between-waves

Conversation

@Peyton-Spencer

Copy link
Copy Markdown
Contributor

Summary

Backport of ditto-assistant/ditto-subnet#554, which landed against apps/platform in the monorepo. Production is still served from this repositoryditto-platform-prod runs pm2 ditto-api out of /opt/ditto-platform, currently at ac95b516 — so the fix has to live here to reach the leaderboard. The monorepo's platform-deploy.yml targets /opt/ditto-subnet, which does not exist on that VM, and has never run.

The change itself:

  • request_top5_confirmation_job rejected a request on the reign-cadence gate before unserved catch-up gaps were computed, so catch-up only progressed when a scheduled round happened to be due. Between waves it stalled and the leaderboard went stale.
  • Compute catchup_member_ids ahead of the gate and let a requested member in that set through it.
  • The top5-confirmation-fairness advisory lock moves up with the read, preserving its purpose: the coverage read and ticket issuance stay serialized, so two validators can't both see the same unserved gap and spend separate slots on it.

The applied diff is byte-identical to the monorepo's (git apply -p3 of #554's patch, clean) — this region had not diverged between the two repos.

Validation

CI on this PR may not run: GitHub Actions is in a major outage (ongoing since 2026-08-06 15:22 UTC), which is why the results above were produced locally.

Activation

Merging does not deploy. deploy.yml needs Actions, so while the outage lasts this must be rolled by hand: IAP SSH to ditto-platform-prod, git fetch/checkout the merge commit under /opt/ditto-platform, then scripts/update.sh. Note that is not zero-downtime — ~6s of refused connections on platform-api.heyditto.ai. Verify afterwards that /health reports the new commit rather than trusting the script's exit code.

Follow-up (not in this PR)

The platform cutover to the monorepo is half-complete: the code and release wiring exist in ditto-subnet, but the runtime was never repointed, so main there does not reach production. Until that is finished or reverted, changes merged to ditto-subnet/apps/platform silently do not ship.

A validator asking for a top-5 confirmation slot on behalf of a member
with an unserved catch-up gap was rejected by the reign-cadence gate
before the gap was ever looked at, so catch-up work only moved when a
scheduled round happened to be due. Between waves it stalled, and the
leaderboard went stale with it.

Compute the unserved catch-up members before the cadence gate and let a
requested member that appears in that set through it. The advisory lock
moves up with the read for the same reason it existed: the coverage read
and ticket issuance must be serialized, or two validators both see the
same unserved gap and spend separate slots on it.

Ported from the monorepo, where this landed as
ditto-assistant/ditto-subnet#554 against apps/platform. Production is
still served from this repository, so the change has to live here to
reach it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Peyton-Spencer

Copy link
Copy Markdown
Contributor Author

Closing unmerged: superseded by the monorepo cutover.

Production is now served from ditto-assistant/ditto-subnet (/opt/ditto-subnet/apps/platform), so this repository no longer deploys anywhere. This PR's content already landed in the monorepo and is live:

Merging here would land the fix on a branch nothing ships, which is worse than closing: it makes this repo look maintained and invites a deploy from it. See ditto-subnet#566 for the cutover follow-ups.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant