Skip to content

Make RFQ quote issuance durable across restarts - #84

Closed
0xMuang wants to merge 1 commit into
mainfrom
feature/rfq-durable-coordinator
Closed

Make RFQ quote issuance durable across restarts#84
0xMuang wants to merge 1 commit into
mainfrom
feature/rfq-durable-coordinator

Conversation

@0xMuang

@0xMuang 0xMuang commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Scope

  • Adds a durable RFQ quote coordinator for persistent nonce/idempotency handling, atomic inventory reservation, signed quote replay, and restart-safe quote lifecycle state.
  • Adds fill/cancel observation plus confirmation-depth reconciliation so observed fills/cancels can finalize or roll back on reorg.
  • Keeps the bundled Node file-backed store as a single-host reference adapter only; production operators must provide an HA transactional database-backed QuoteCoordinatorStore.
  • Updates RFQ service docs, threat model, production RFQ policy, FEATURES, PROGRESS, and QUALITY to mark RFQ-004 as delivered and document remaining production boundaries.

Tests / validation

  • npm test --prefix services/rfq — passes locally in this integration step.
  • Prior feature validation recorded by implementation lane: forge 857, RFQ E2E, diff, init race.
  • git diff --cached --check before commit — clean.
  • Secret/scratch scan before commit — no scratch files staged; existing untracked contracts.md, deployments/, and desc.md preserved and not staged.

Known unrelated blocker

  • scripts/check.sh is still blocked by pre-existing forge fmt drift in script/DeployProductionCore.s.sol and script/DemoScenarios.s.sol; this PR does not modify those files.

Production boundary

  • This PR does not claim the bundled file store is multi-host or HA production storage. Production deployment must wire a transactional DB adapter that enforces the coordinator's unique (chainId, adapter, maker, nonce) and (chainId, adapter, maker, idempotencyKeyHash) constraints atomically.
  • No main merge is requested from this branch by automation.

…d reorgs

Constraint: RFQ service remains SDK/reference code without adding a production database dependency.
Rejected: In-memory nonce and inventory reservation only | unsafe across server restart and multi-instance concurrency.
Confidence: high
Scope-risk: moderate
Directive: Production deployment must supply an HA transactional database adapter and keep the bundled file store reference-only.
Tested: npm RFQ, forge 857, RFQ E2E, diff, init race
Not-tested: scripts/check fails pre-existing forge fmt in script/DeployProductionCore.s.sol and script/DemoScenarios.s.sol
@0xMuang

0xMuang commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by consolidated delivery PR #89 after the author requested a reduced open-PR surface. This component branch and PR remain available as implementation and review history; no branch was deleted.

@0xMuang 0xMuang closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant