Repository navigation
txconfirm: keep the signed fee split after a lost broadcast reply - #1652
Conversation
|
/gateway review Review the current head for initial broadcast ambiguity and fee input ownership. Check that a lost or malformed receipt keeps the identical signed split, that the blocked parents cannot reuse its inputs, and that definite rejection and confirmation still release the right state. The regression supplies a second confirmed coin after the first timeout. This change covers a live actor. Process restart and batch approval belong to the next slices. Please classify findings by concrete reachability, consequence, existing guards and smallest fix. |
|
❌ gateway review failed: code-review skill failed across all auth modes: You've hit your org's monthly spend limit · ask your admin to raise it at https://claude.ai/admin-settings/usage · your weekly limit resets Nov 29, 6am (UTC) See workflow logs for details. |
152834a to
963277c
Compare
|
Claude: Approve, no blockers. On both the first submit and later retries, the split's ownership now follows one rule: only an explicit fee or structural rejection, as classified by Retained inputs and predicted outputs are released only at the points that end ownership. Follow-up, not a blocker: a lost first receipt now takes the same retain-forever path that retries already had. If the split never reached the network and another wallet user later spends one of its inputs, each rebroadcast gets an ambiguous spend reply. The split then stays pending until its parents are evicted. The input leases make this unlikely, and it only stalls parents that have no other confirmed supply. It does not lose funds. Rebuilding state after a restart is out of scope here, as stated. There is no new test for an explicit rejection on the first submit; |
A wallet split can reach the network before its sender receives the reply. Retain the signed transaction and watch its local txid. Keep the funding inputs unavailable to other children until the split resolves. Retry the same bytes when another confirmed wallet coin becomes available. Only an explicit rejection permits building a fresh split. This covers the active actor lifetime. Process recovery needs durable storage for the signed candidate.
963277c to
f7ecd19
Compare
|
/gateway review Please review the current commit f7ecd19 against its PR base. Focus on reachable ownership, confirmation gating, and wallet quote correctness within this layer. |
|
❌ gateway review failed: code-review skill failed across all auth modes: You've hit your org's monthly spend limit · ask your admin to raise it at https://claude.ai/admin-settings/usage · your weekly limit resets Nov 29, 6am (UTC) See workflow logs for details. |
|
Claude: Approve. I traced the two paths this commit changes:
Behaviour shared with the existing resend path is unchanged. A first send that hits a conflict string the classifier doesn't know is now kept rather than released. It clears once the split confirms or its parents are evicted, so it is not a blocker. As the commit message says, a split kept this way is lost if the process restarts, until it gets durable storage. That is out of scope here. I couldn't run |
When several exit transactions need fee inputs, the wallet can split one confirmed coin into smaller outputs. The node can accept that split and lose its reply. Previously the daemon discarded the signed transaction on the first timeout and could pay for another split from a different coin.
Keep the signed bytes, watch their transaction ID, and exclude their inputs from other fee children while the split is pending. A later funding request resubmits those same bytes. A malformed receipt also leaves the candidate pending. An explicit relay rejection still follows the existing rejection path.
The regression test loses the first reply, supplies a second eligible coin and checks the second broadcast byte for byte. It also checks that the original input stays reserved until confirmation. Package tests and focused race tests passed. A Bitcoin Core regtest run with three independent exits and one wallet coin reached all three sweeps.
The retained candidate lives in the broadcaster process. Restart persistence and approval of a batch of exits are further parts of #1651.