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
Closed
Conversation
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>
Contributor
Author
|
Closing unmerged: superseded by the monorepo cutover. Production is now served from
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of ditto-assistant/ditto-subnet#554, which landed against
apps/platformin the monorepo. Production is still served from this repository —ditto-platform-prodruns pm2ditto-apiout of/opt/ditto-platform, currently atac95b516— so the fix has to live here to reach the leaderboard. The monorepo'splatform-deploy.ymltargets/opt/ditto-subnet, which does not exist on that VM, and has never run.The change itself:
request_top5_confirmation_jobrejected 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.catchup_member_idsahead of the gate and let a requested member in that set through it.top5-confirmation-fairnessadvisory 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 -p3of #554's patch, clean) — this region had not diverged between the two repos.Validation
uv run pytest ditto/tests/api_server/endpoints/test_validator.py -q→ 220 passed-k "catchup or top5 or backlog or confirmation") → 48 passedtest_promotion_makes_the_whole_backlog_claimable_at_once.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.ymlneeds Actions, so while the outage lasts this must be rolled by hand: IAP SSH toditto-platform-prod,git fetch/checkout the merge commit under/opt/ditto-platform, thenscripts/update.sh. Note that is not zero-downtime — ~6s of refused connections onplatform-api.heyditto.ai. Verify afterwards that/healthreports 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, somainthere does not reach production. Until that is finished or reverted, changes merged toditto-subnet/apps/platformsilently do not ship.