In coinjoins I must scrutinize unconfirmed inputs registrations before the transaction is built.
For now, the only things I do are
- To make sure it comes from another coinjoin created by me. (It's more like a convenience thing to rule out a host of possible attacks.)
- Check how many unconfirmed coinjoins there are at the moment. If larger than 24, then I don't accept any unconfirmed input to be registered.
Lately I encountered an issue where at coinjoin propagation I got the following error from RPC: too-long-mempool-chain: too many descendants for tx....
Thus I figured it would be useful if I could build a fake unsigned transaction (I do not have signature at the point when the input is registered) and test mempool acceptance for that.
I know it wouldn't replace the first sanity check I described, but it would replace my second sanity check in a future proof way.
Also I'd be happy to hear out other suggestions, too.