refactor(rfq): share bounded Elements Core client - #46
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2905de3823
ℹ️ 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".
| std::collections::btree_map::Entry::Occupied(entry) => { | ||
| if entry.get().0 != observed.confirmations { | ||
| return Err(ElementsCoreError::InvalidPrevoutConfirmations { | ||
| outpoint: *outpoint, |
There was a problem hiding this comment.
Revalidate cached unconfirmed transaction witnesses
When outpoints contains multiple outputs from the same unconfirmed transaction and the mempool swaps that transaction for same-txid/different-wtxid bytes between lookups, this occupied branch checks only that confirmations remain zero and then reuses the first transaction. Because Elements output proofs are witness data excluded from the txid, the later prevout can therefore be returned with a stale TxOut witness despite gettxout observing the replacement; recheck the mempool wtxid before reusing a cached unconfirmed transaction.
Useful? React with 👍 / 👎.
Summary
deadcat-elements-corecrate for reuse by provider and taker runtimesChainIdentity, with operation-wide deadlines, bounded RPC/materialization limits, serialized UTXO scans, stable-tip anchors, and full confidentialTxOutwitnessesdeadcat-rfq::elementsto provider wallet catalog, recovery, and domain-mapping responsibilitiesCorrectness hardening
Validation
cargo test --workspacecargo test -p deadcat-elements-core(30 tests)cargo test -p deadcat-rfq --lib elements::tests(9 tests)cargo check -p deadcat-rfq --all-targetscargo clippy -p deadcat-elements-core --all-targets -- -D warningscargo fmt --all -- --checkgit diff --checkNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.