Skip to content

id(currency): deterministic account factory + per-currency system accounts (from #2062) #2318

Open

Description

@dezren39

Follow-up from the currency control plane design (#2062), §3 of
doc/2026-10-29T12-42-21Z_design_currency_control_plane/.

Scope

The deterministic account factory mapping ID accounts to TigerBeetle accounts.

  • Account-ID derivation BLAKE3(domain_sep ‖ ledger ‖ kind ‖ owner ‖ salt)[0..16], versioned domain separator (design §3.1).
  • ensure_account / ensure_currency_accounts, idempotent (a duplicate create_accounts is success).
  • The per-currency system accounts (issuer unconstrained; liquidity, fee, burn) and constrained holder accounts (debits_must_not_exceed_credits, history where audit matters) (design §3.2).
  • The reserved transfer-code table (design §4.4).

Acceptance

  • The same (currency, owner, kind, salt) always derives the same account id, from any component, with no registry round-trip.
  • Calling ensure_account twice creates one account and returns the same id.
  • Flags are fixed at creation and documented; holder accounts reject overdrafts at the cluster.

Depends on

F1 (registry + ledger allocation).

Refs #2062

Activity

  1. added
    kind/featureNew feature or capability request
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/normalOrdinary priority (the default)
    meta/follow-upFollow-up spun out of earlier work
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Oct 29, 2026
  4. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

  6. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  7. 169 remaining items

  8. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  9. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — Agent: repo-worker-code (lane code-d, task 8503); state: parked — gate not met.

    Task 8503 (small_fix, issue #2318) revalidated fresh via gh at 2026-11-06T08:14Z: gate issue #2317 (F1 currency registry schema + ledger-u32 allocator) is still OPEN with status/blocked + queue/blocked, and no PR titled for #2317 or #2318 exists in any state. Issue #2318 remains OPEN, no hard-stop labels. Per the packet's gate rule, no code was written and the registry contract was not invented. Task 8503 parks again; resume when issue #2317 lands/closes, then implement issue #2318 per design #2062 (§3.1/§3.2/§4.4).

  10. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 6, 2026
  11. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    task: 8503
    lane: code-w
    stage: verified — gate revalidated fresh 2026-11-06T09:15Z
    Gate issue #2317 is still OPEN (labels status/blocked, queue/blocked) with no implementing PR open for #2317/#2318. Per the packet gate, task 8503 for issue #2318 must not invent the registry contract; parking until #2317 lands/closes, then implementation per design #2062 proceeds.

  12. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 6, 2026
  13. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    Parked: task 8503 for issue #2318 revalidated fresh 2026-11-06T10:18Z — issue #2318 is OPEN with no hard-stop labels, and gate issue #2317 is still OPEN with status/blocked + queue/blocked and no implementing PR found. Per the packet gate, do not invent the registry contract; resume when issue #2317 lands/closes.

  14. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  15. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

    Gate revalidation (fresh gh, 2026-11-06T12:20Z): issue #2317 is OPEN with labels status/blocked + queue/blocked — F1 (registry schema + ledger allocator) has not landed, so the gate in task 8503's acceptance is not met. Issue #2318 itself is OPEN with no hard-stop labels and no implementing PR. Task 8503 parked for 24h naming this gate; earlier parks recorded the same gate at 2026-11-06T08:14Z and 2026-11-06T11:19Z.

  16. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workpriority/normalOrdinary priority (the default)queue/parkedQueue task is parked (waiting on CI, time, or an event)source/queue-workerFiled or worked by the queue/worker pilotstatus/parkedDeliberately paused with a recorded resume conditiontask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions