Skip to content

feat(rfq): add authenticated provider protocol - #35

Open
tvolk131 wants to merge 1 commit into
codex/rfq-elements-sourcefrom
codex/rfq-protocol
Open

feat(rfq): add authenticated provider protocol#35
tvolk131 wants to merge 1 commit into
codex/rfq-elements-sourcefrom
codex/rfq-protocol

Conversation

@tvolk131

@tvolk131 tvolk131 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a strict, versioned RFQ wire schema with bounded canonical encodings, stable typed errors, settlement layouts, durable reservation status, and exact signed-artifact replay
  • derive reservation ownership from the authenticated Iroh endpoint pair and attest the full firm quote with the provider's persistent Iroh identity
  • validate confidential P2TR provider prevouts, quote structure, timelines, artifact digests, request/response identifiers, and provider identity before accepting wire values
  • add a bounded unary Iroh client/server transport on the dedicated deadcat-rfq/1 ALPN with persistent identities, operation-wide deadlines, concurrency limits, and authenticated peer dispatch
  • expose owner-authenticated provider status lookup and include the new crates in the WASM compatibility gate

Safety boundaries

  • low-level transport success does not make a quote trusted; callers must verify the signed quote against the authenticated endpoints, original request, idempotency key, expected context, and current time
  • an Execute handler must hand post-commit signing, persistence, and relay to daemon-owned recovery work before crossing the durable point of no return, because transport timeouts cancel handler futures
  • the concrete daemon handler, recovery supervisor, higher-level client adapter, and relay/reconciliation flow remain follow-up work

Verification

  • cargo fmt --all -- --check
  • git diff --check
  • cargo clippy --locked --offline --workspace --all-targets -- -D warnings
  • cargo test --locked --offline --workspace --all-targets -- --test-threads=1
    • all runnable workspace tests pass
    • environment-dependent Elements regtests remain explicitly ignored by the default suite

Stack

This PR is intentionally based on #34 and contains exactly one additional commit. Once #34 merges, this PR can be retargeted to master.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9b3b98512

ℹ️ 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".

endpoint,
connection,
inbound_budget: InboundBudget::new(config.inbound_budget_bytes),
in_flight: Arc::new(Semaphore::new(config.max_in_flight_requests)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject semaphore counts above Tokio's limit

When a caller supplies max_in_flight_requests > Semaphore::MAX_PERMITS, configuration validation accepts it, but this constructor panics instead of returning ClientError::InvalidConfig; the equivalent server construction also affects max_in_flight_requests, while Server::run can panic for an oversized max_connections. Validate these public configuration values against Tokio's limit before constructing the semaphores so an operator-provided value cannot crash the process.

Useful? React with 👍 / 👎.

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