Repository navigation
feat(id): deterministic account factory + transfer-code table (#2318) - #10667
Conversation
Slice F2 of the #2062 currency control-plane design (design §3 + §4.4), following F1 (#2317, PR #10658) in the id-currency-registry crate: BLAKE3 account-id derivation (versioned domain sep, ledger u32 LE, kind u8, length-prefixed owner/salt), creation-fixed flags per §3.2 (holder/fee/burn debits_must_not_exceed_credits, holder +history, issuer/liquidity unconstrained), ensure_account/ensure_currency_accounts over an AccountCluster seam (duplicate create = Exists = success), and the reserved transfer-code ranges of §4.4. Acceptance tests name their oracles (issue #2318 acceptance + §3.1 formula rebuilt independently). cargo test -p id-currency-registry: 17/17 pass. Clippy not run: laptop clippy-driver is rustc 1.99.1 against a 1.99.0 rustc (E0514 on any external dep) — pre-existing environment mismatch.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
What
Slice F2 of the #2062 currency control-plane design (issue #2318), in the
id-currency-registrycrate F1 created (#2317, PR #10658):BLAKE3(domain_sep ‖ ledger u32 LE ‖ kind u8 ‖ len-prefixed owner ‖ len-prefixed salt)[0..16], domain separatorid-currency/account/v1versioned. Any component derives the id with no registry round-trip.debits_must_not_exceed_credits; holder constrained +history.ensure_account/ensure_currency_accountsover anAccountClusterseam (the gateway's TigerBeetle client is the production binding, §4); a duplicate create returnsExists, treated as success — no read-modify-write, no lock.classifyfor issuance / holder transfer / conversion leg / fee / correction / pending-hold redemption.Verification
cargo test -p id-currency-registry— 17/17 pass (11 F1 + 6 new). Each new test names its oracle: §3.1's formula rebuilt independently in the test, the issue's acceptance lines, §3.2's flag table, §4.4's range boundaries.cargo fmtapplied.Closes #2318.