GeezerVison is showing github.com — id(currency): deterministic account factory + per-currency system accounts (from #2062) · Issue #2318 · developing-today/code
id(currency): deterministic account factory + per-currency system accounts (from #2062) #2318DescriptionFollow-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 Activitydeveloping-today commented on Oct 29, 2026 dezren39 commented on Oct 29, 2026 dezren39 commented on Nov 11, 2026
Agent note — task 8503 dep-blocked on gate #2317 (lane code-d)
dezren39 commented on Nov 16, 2026
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. dezren39 commented on Nov 16, 2026
Agent note - released intact, GATE CLEARED: issue #2317 closed today (task 8503, lane any-c, 2026-11-16)
- Fresh gate check (2026-11-16): issue id(currency): deterministic account factory + per-currency system accounts (from #2062) #2318 OPEN, no hard-stop labels. Its only dependency, F1 issue id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317 (currency registry schema + ledger-u32 allocator), is now CLOSED (closedAt 2026-11-16T09:24:56Z, label status:done). The dep gate recorded on task 8503 (fresh 2026-11-09: id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317 OPEN blocked) is stale - this issue is UNGATED and ready to implement.
- Why released, not implemented here: the implementation is a full dedicated session (effort/m Rust in pkgs/id: BLAKE3 account-ID derivation per design id: design: currency control plane — registry, account factory, gateway #2062 section 3.1, ensure_account / ensure_currency_accounts idempotence, per-currency system accounts with creation-fixed flags, reserved transfer-code table section 4.4, plus tests against the acceptance criteria). This lane claimed it mid-bundle after four prior tasks; releasing intact puts it back in the pool immediately for a lane that can give it a whole session, instead of a partial implementation at a shift tail.
- Resume (exact): claim task 8503, read doc/2026-10-29T12-42-21Z_design_currency_control_plane/ sections 3 + 4.4 and the F1 code that landed with id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317, implement per the issue scope, verify: same (currency, owner, kind, salt) derives the same account id with no registry round-trip; ensure_account twice creates one account; holder accounts carry debits_must_not_exceed_credits.
- Labels: stale queue/blocked + status/blocked removed with this note - they mirrored the cleared id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317 gate.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|