sweep: isolate bad inputs on mempool rejection#10842
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a diagnostic mechanism for the sweeper to identify and isolate problematic inputs when a transaction batch is rejected by the mempool. By performing no-broadcast probes on subsets of inputs, the system can now pinpoint specific inputs causing failures rather than failing the entire batch. This improves the robustness of the sweeping process by ensuring that only truly invalid inputs are treated as fatal, while valid inputs can continue to be processed and retried. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to isolate and diagnose bad inputs in a rejected sweep batch using no-broadcast mempool acceptance probes. When a multi-input batch is rejected with an unattributed non-fee mempool or script error, the TxPublisher performs a binary search probe of the input subsets to identify the specific inputs causing the failure. The UtxoSweeper then marks only those identified bad inputs as fatal, allowing the remaining valid inputs in the batch to be retried. A review comment suggests adding a defensive nil check for r.feeFunction in shouldDiagnoseBadInputs to prevent a potential nil pointer dereference panic.
🔴 PR Severity: CRITICAL
🔴 Critical (2 files)
🟢 Low (2 files)
AnalysisThis PR modifies The bulk of changes (265 lines) are in Severity bump check: 4 non-test files (threshold: >20), 417 non-test lines (threshold: >500), single critical package — no bump applied. To override, add a |
87d1e3e to
75b9fe1
Compare
75b9fe1 to
4ef522b
Compare
|
LGTM ⚡ ( |
Add internal helpers that build subset sweep transactions and test them with `testmempoolaccept` only. Classify probe errors conservatively so construction, fee, and timelock failures do not identify bad inputs.
Route multi-input mempool rejections through the probe helpers and report completed diagnoses with `BumpResult.BadInputs`. Singleton, aux, missing-input, and indeterminate cases keep their existing behavior.
Consume non-nil `BadInputs` on `TxFailed`: mark diagnosed inputs fatal and mark the complement publish-failed for normal retry. Empty diagnoses are retried as a whole and logged.
Cover publisher probing decisions and sweeper state application, including aux skip, probe missing-input abort, probe-cap abort, singleton fatal behavior, and complement retries.
Document that `TxPublisher` performs failure attribution while `UtxoSweeper` applies state changes.
Add the 0.21.1 release note for isolating singleton bad inputs from rejected sweeper batches.
4ef522b to
b1443e9
Compare
|
LGTM 🦦 |
|
LGTM ✨ ( |
Summary
Fixes #10840.
Tests