Skip to content

feat(spec): register dailyrun and dailyrace operator kinds - #3

Merged
0xNyk merged 2 commits into
mainfrom
feat/dailyrun-dailyrace-kinds
Oct 13, 2026
Merged

0xNyk merged 2 commits into
mainfrom
feat/dailyrun-dailyrace-kinds

Conversation

@0xNyk

@0xNyk 0xNyk commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Why

Since the daily chart got its Daily Run and Daily Race modes, the app's daily kind only covers runs without a mode, and free play no longer ranks. So since 2026-10-12 the cron has written no board anchors (cups are unaffected). The two mode boards need their own kinds. Per SPEC 9, a new kind is a documented change with a signer model, id, count rule, leaf schema and appended vectors.

What

kind signer id count leaf
dailyrun operator UTC date YYYY-MM-DD rows {v,k,d,rank,u,h,s,dist,hc,fin,r} (SPEC 7.3)
dailyrace operator UTC date YYYY-MM-DD rows {v,k,d,rank,u,h,ft,dist,hc,r} (SPEC 7.4)
  • Names follow the kind grammar [a-z]+. daily-run and daily_run are invalid, and invalid-memo vectors now pin that.
  • Both leaves extend the existing board leaf (7.1). The shared keys mean the same thing there. New keys:
    • hc: HARDCORE. It is a column on the shared board, not a separate board.
    • fin: Daily Run only. Whether the best run survived the 2:00 timer.
    • ft: Daily Race only. Finish tick, an integer at 60 per second, ranked lowest first.
    • The race leaf has no s (a race collects no coins) and no fin (only arrived races are ranked).
    • SPEC 7.3 and 7.4 give a reason for every field.
  • SDK: dailyRunLeaf, dailyRaceLeaf, rankRowsBy. ANCHOR_KINDS now keeps registration order, so new kinds go at the end. That keeps the vector kinds list append-only. A compile-time guard checks that it equals operator kinds plus user kinds.
  • SPEC 2.1: the longest valid memo is now 164 bytes, because dailyrace has 9 characters.
  • SPEC 9.1: a registry change log.
  • CLI: no change needed. --kind dailyrun|dailyrace works through the registry. A test was added.

Frozen vectors

  • test-vectors/v1.json only gained lines: git diff --stat shows 349 insertions and 0 deletions.
  • A structural check found all 631 leaf values of the old file unchanged at the same paths, with the old top-level key order kept.
  • New top-level keys: dailyRun and dailyRace.
  • New sha256: 563ee67172cc80a2343961a12e41b4d0333960a2da6cf1854a7fd56c3e40e6af. The app PR pins the same value.

Checks

pnpm lint, pnpm typecheck, pnpm test (203 passed), pnpm build, node scripts/gen-vectors.mjs --check, pnpm examples

Deploy order

Merge this PR together with the app PR in ChartRunner/chartrunner-v2. That PR copies packages/verify/src and the vectors byte for byte. No dailyrun or dailyrace memo exists on chain yet. The first ones are written by the app after its migration and code ship.

0xNyk added 2 commits October 13, 2026 14:07
The Daily Run and Daily Race boards of the daily chart get their own anchor
kinds (SPEC 2.2, 7.3, 7.4, 9.1): operator signer, id = UTC date, count = rows.

- dailyrun leaf: {v,k,d,rank,u,h,s,dist,hc,fin,r}, ranked by score
- dailyrace leaf: {v,k,d,rank,u,h,ft,dist,hc,r}, ranked by finish tick (lowest first)
- SDK: dailyRunLeaf, dailyRaceLeaf, rankRowsBy; ANCHOR_KINDS keeps registration order
- vectors appended (kinds, dailyRun, dailyRace, 2 valid + 3 invalid memos);
  every existing vector value is unchanged (git diff: 0 removed lines)
- longest valid memo is now 164 bytes (9-character kind)
@0xNyk
0xNyk merged commit a1c819b into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant