Task
Two coupled changes in dig-wallet, both landing on the next chia-query bump.
1. Adopt chia_query::mempool_refusal — do not keep a second copy
chia-query #50 moves the intrinsic-refusal classifier down into chia_query::mempool_refusal, byte-identical, including its exclusion rationale.
The list originates here: crates/dig-wallet/src/sage/chain.rs:241 BUNDLE_INTRINSIC_REFUSALS — 11 names, exact-match, ~60 lines of reasoning about what was deliberately excluded.
Once chia-query publishes it, re-export from there and delete the local definition. Two copies of this list is a rival implementation of a money decision: they would drift, and the drift decides whether a user's spend is reported refused or retried. The list moved down rather than being duplicated precisely so that cannot happen.
chia-query is currently pinned at 0.20.0 here while main is past 0.22.0, so this rides the version bump that closes that gap.
2. Correct the is_definitive_rejection doc
crates/dig-wallet/src/sage/rpc.rs:2326-2335 describes the old peer_then_coinset push routing. #50 changes that: coinset is never consulted on a refusal.
The new policy: an intrinsic refusal is final; anything else gets exactly one more peer; never more than two transmissions; the refuser is not ejected.
A doc asserting behaviour the code no longer has is a defect in its own right — it is what a future reader will build against.
Why the retry is safe, so the doc says the right thing
Two protocol facts, not optimism:
- an identical re-send shares the tx id, so it is not a double-spend;
- a peer answering
NotAdmitted/Failed did not relay, so the second peer's verdict is clean.
The timeout-after-transmit race stays on the unchanged Err path.
A constraint that will bite if missed
TxStatus gets NO new field. dig-wallet builds it as a struct literal at chain.rs:876, so adding one breaks compilation here. The chia-query side was designed around that.
Blocked until
chia-query publishes the version carrying mempool_refusal (the #24/#27/#33/#34/#50/#56 batch). Release-first: the crate ships, then this adopts. Do not start before the version exists — the bump cannot resolve.
Also verify, do not assume
Whether anything else in dig-wallet reads the local list or depends on subscribe(capacity), which #34 removes in favour of source-scoped subscribe_frames(address, capacity). The measured future adopter of the fan-out is run_update_loop (sync.rs:1274), which follows exactly one session — consistent with the new shape, but confirm it rather than trusting this sentence.
Related
Task
Two coupled changes in
dig-wallet, both landing on the nextchia-querybump.1. Adopt
chia_query::mempool_refusal— do not keep a second copychia-query#50 moves the intrinsic-refusal classifier down intochia_query::mempool_refusal, byte-identical, including its exclusion rationale.The list originates here:
crates/dig-wallet/src/sage/chain.rs:241BUNDLE_INTRINSIC_REFUSALS— 11 names, exact-match, ~60 lines of reasoning about what was deliberately excluded.Once chia-query publishes it, re-export from there and delete the local definition. Two copies of this list is a rival implementation of a money decision: they would drift, and the drift decides whether a user's spend is reported refused or retried. The list moved down rather than being duplicated precisely so that cannot happen.
chia-queryis currently pinned at 0.20.0 here while main is past 0.22.0, so this rides the version bump that closes that gap.2. Correct the
is_definitive_rejectiondoccrates/dig-wallet/src/sage/rpc.rs:2326-2335describes the oldpeer_then_coinsetpush routing. #50 changes that: coinset is never consulted on a refusal.The new policy: an intrinsic refusal is final; anything else gets exactly one more peer; never more than two transmissions; the refuser is not ejected.
A doc asserting behaviour the code no longer has is a defect in its own right — it is what a future reader will build against.
Why the retry is safe, so the doc says the right thing
Two protocol facts, not optimism:
NotAdmitted/Faileddid not relay, so the second peer's verdict is clean.The timeout-after-transmit race stays on the unchanged
Errpath.A constraint that will bite if missed
TxStatusgets NO new field. dig-wallet builds it as a struct literal atchain.rs:876, so adding one breaks compilation here. The chia-query side was designed around that.Blocked until
chia-querypublishes the version carryingmempool_refusal(the #24/#27/#33/#34/#50/#56 batch). Release-first: the crate ships, then this adopts. Do not start before the version exists — the bump cannot resolve.Also verify, do not assume
Whether anything else in dig-wallet reads the local list or depends on
subscribe(capacity), which #34 removes in favour of source-scopedsubscribe_frames(address, capacity). The measured future adopter of the fan-out isrun_update_loop(sync.rs:1274), which follows exactly one session — consistent with the new shape, but confirm it rather than trusting this sentence.Related