GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(currency): quote issuance + binding for RateAuthorisation (#3802) by dezren39 · Pull Request #13788 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes #3802

Phase 3 of #2290 (quote issuance + binding for RateAuthorisation), built on the Phase 1 fold (#3800) and the Phase 2 gateway verification flow (#3801) in pkgs/id/src/currency/conversion.rs, to the #2290 design record (task 5741 triage) and #2063 §2.2.

Quote issuance — ConversionVerifier::issue_quote verifies the submission exactly as at execution (chain decode + signature, LP tier, account-control chain, live-state checks over the fold), then pins the folded authorisation into a ConversionQuote: the nine-field gateway-issued control-plane record {quote_id, authorisation_id, authorisation_version, authorisation_event_hash, x, computed_y, fee, issued_at, quote_expires_at} with a 60-second lifetime (QUOTE_LIFETIME_SECS). computed_y is the pure layer's scale-aware convert_amount (exact integer rational, floored in the LP's favour); fee is fee_amount over the authorisation's fee_bps (zero when absent). Issuance commits no usage — a quote is not a posting.

Execution binding — ConversionVerifier::verify_quoted binds a submission to an issued quote: unknown, expired, or mismatched (different authorisation or amount) references fail pre-flight as new typed FailedPreSubmit variants (UnknownQuote, QuoteExpired, QuoteMismatch); the Phase 2 live-state checks then re-run at submission, so a since-revoked authorisation is refused by the revocation consult itself; and the fresh fold must still stand at the pinned version and event hash, or the refusal is QuoteStale — a re-issued authorisation never silently satisfies an old quote. The returned VerifiedQuotedConversion executes with exactly the quoted computed_y and fee.

verify() is refactored over a private verify_folded that also returns the folded event's operation id (the pin); its behaviour is unchanged.

Evidence — remote fleet-command run 45265996762, cargo test --manifest-path pkgs/id/Cargo.toml --lib currency::: 119 passed / 0 failed (110 pre-existing + 9 new). The nine new tests, verified by name in the log: quote_issuance_pins_the_folded_authorisation_and_amounts, quote_computed_y_is_scale_aware_and_fee_is_quoted, quote_issuance_refuses_what_verification_refuses, expired_quote_is_refused_pre_submit, quote_against_since_revoked_authorisation_is_refused_pre_submit, quote_against_superseded_version_is_refused_pre_submit, unknown_quote_is_refused_pre_submit, quote_for_a_different_amount_is_refused_pre_submit, valid_quote_executes_with_exactly_the_quoted_amounts. Every refusal test asserts the FAILED_PRE_SUBMIT disposition, untouched usage, and zero ledger writes — covering #3802's acceptance verbatim (expired quote, since-revoked, superseded version, valid quote with exactly the quoted y and fee).

Scope note — #3802's text is quote issuance + binding, and this PR completes it. What remains outside the issue, unchanged from #3801's boundary: composing the verified conversion into the linked transfer chain (the pure batch builder already exists in crate::conversion) and wiring this flow into GatewayService::handle; the ConversionControl seam's production binding is that wiring work. No new dependencies.


Prove it works
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
felix
id(currency): quote issuance + binding for RateAuthorisation (#3802)
dbf7659
Phase 3 of #2290: ConversionVerifier gains quote issuance and
quoted execution in currency::conversion.

- ConversionQuote: the nine-field gateway-issued control-plane
  record from the #2290 design record, pinning the folded
  authorisation version + event hash, x, scale-aware computed_y
  (pure layer convert_amount, floored in the LP favour), fee
  (fee_amount), and a 60-second lifetime.
- issue_quote verifies the submission exactly as at execution,
  pins the fold, stores the quote; commits no usage.
- verify_quoted binds a submission to an issued quote: unknown,
  expired, or mismatched (authorisation/amount) references fail
  pre-flight; the Phase 2 live-state checks re-run at submission
  (a since-revoked authorisation is refused by the re-run); a
  re-issued authorisation fails the version/event-hash pin as
  QuoteStale. Execution carries exactly the quoted y and fee.
- verify() refactored over a private verify_folded that also
  returns the folded event id; behaviour unchanged.

Acceptance tests: expired quote, since-revoked, superseded
version, and valid quote executing with exactly the quoted
amounts, each refusal asserting zero ledger writes.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 54457749-138a-4d65-9d02-623567fd9b4b
Commits

Reviewing files that changed from the base of the PR and between 62a81dd and dbf7659.

Files selected for processing: 1

  • pkgs/id/src/currency/conversion.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 23, 2026
id(currency): quote issuance + binding for RateAuthorisation (Phase 3 of #2290) #3802
Closed
id: implement ID conversion engine - linked transfer pairs and rate authorisation (design #2063) #5536
Open
@dezren39
dezren39 merged commit a32e67e into main Nov 23, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the felix/3802-quote-binding branch November 23, 2026 21:49
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
This was referenced Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
id(currency): production currencies v1 — remainder after the graph-native fold (#5522 successor) #10070
Open
id(conversion): conversion receipt carries offer version + all leg refs, and reversal reference (slice 2 of #5536, phase G) #15830
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

id(currency): quote issuance + binding for RateAuthorisation (Phase 3 of #2290)

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.