feat(rfq): validate final settlement PSETs - #30
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
SIGHASH_ALLsignatures, unsigned provider inputs, confidential disclosures and proofs, whole-transaction balance, provider receive/change recovery, and one exact policy-asset fee outputValidatedSigningIntentthe only production capability that can cross commit-before-signWhy
PR #29 constructs and durably reserves an inventory-aware
FirmQuote, but the provider still needed a concrete authority boundary for the complete transaction returned by the taker. This PR closes that boundary: detached caller assertions cannot choose the signing payload or fee facts, and the wallet/HSM can only be invoked after exact validated bytes have crossed the durable point of no return.Validation itself remains reversible. The eventual service should validate and commit synchronously; the commit atomically rechecks provider identity, authenticated owner, quote commitment, exclusive deadline, fee policy, and every reserved allocation before it returns a durable signing job.
Safety properties
SIGHASH_ALLsignature over the complete transaction and all prevoutsDeliberate V1 scope
The validator supports one interactive RFQ provider plus already-finalized tree-less P2TR wallet inputs. It does not yet execute Simplicity covenant witnesses or coordinate a second interactive RFQ signer. Those require a later authenticated venue/script-verification seam.
Concrete wallet/RPC/HSM adapters, signer/finalizer orchestration, authenticated networking, production pricing, relay, and chain reconciliation remain follow-up work.
Stack
This is intentionally stacked on #29 and targets
codex/rfq-quote-engine. Once #29 merges, this PR can be retargeted tomaster.Validation
nix develop .#default --command just ci-checksdeadcat-rfq-providertests passedNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.