feat(rfq): add durable provider state machine - #27
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a45bb8296e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if plan.fee_policy().policy_asset() != self.identity.policy_asset() { | ||
| return Err(ProviderError::WrongPolicyAsset { | ||
| expected: self.identity.policy_asset(), | ||
| actual: plan.fee_policy().policy_asset(), | ||
| }); |
There was a problem hiding this comment.
Observe time before rejecting the fee policy
When a wrong-policy reservation request is the only operation received after an existing quote's deadline, this early return skips begin_timed_write and leaves the clock high-water mark unchanged. If the system clock then rolls back below that deadline, commit_before_sign can accept the existing reservation even though the provider had already observed a later real time, defeating the rollback protection and durable accept-before guarantee. Acquire the timed writer and persist the observation before performing this policy check, as the authenticated failure paths already do.
Useful? React with 👍 / 👎.
Summary
deadcat-rfq-providercrate with provider/chain-bound durable inventory and owner-scoped, idempotent multi-input reservationsTrust boundary
This PR deliberately does not add pricing, wallet discovery, concrete PSET validation, signing, transport, relay, or chain reconciliation. The safety-critical commit and signed-result transitions remain crate-private until the concrete validator and signer adapter can be their only production callers; detached fee assertions and arbitrary signed bytes are therefore not exposed as service inputs.
Verification
nix develop .#default --command just ci-checksNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.