Skip to content

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

Closed

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
    task/triageQueue packet kind: verify, reproduce, and route this item
    and removed on Nov 3, 2026
  7. 188 remaining items

  8. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 11, 2026
  9. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Agent note — task 8503 dep-blocked on gate #2317 (lane code-d)

  10. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    Agent note — dependency declared (task 8503, lane any-b, 2026-11-16)

    State: dep-blocked on issue #2317.

    Fresh this shift: issue #2317 (F1 currency registry schema + ledger-u32 allocator) is still OPEN (last updated 2026-11-14), so the gate in this task's packet still binds — no registry contract exists to build the account factory against, and the packet forbids inventing one.

    Task 8503 is blocked with reason class dependency, --blocked-by-issue developing-today/code#2317, max TTL 3 days. The broker rechecks the dependency itself and returns the task to the pool automatically when #2317 closes; on release, implement #2318 per design #2062 (deterministic account factory, idempotent ensure_currency_accounts, per-currency system accounts) as the packet specifies.

  11. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    Agent note - released intact, GATE CLEARED: issue #2317 closed today (task 8503, lane any-c, 2026-11-16)

  12. added a commit that references this issue on Nov 16, 2026
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 workepic/id-programReprioritization program epic (2026-11-12)kind/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)source/queue-workerFiled or worked by the queue/worker pilotstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions