—
**TL;DR:** Mining wallets collect hundreds of small coins. Neptune Wallet will build a send that uses all of them, and that send fails or never confirms. The app does not say why, and it does not say how much *can* be sent. I’d like to add two things to the wallet app and want the developers’ opinion first:
1. **A check before sending.** If a send needs more than N inputs (default 32), the app warns and offers two ways out: send a smaller amount (it shows the largest amount that fits in N inputs), or merge coins first. It never blocks; “Send anyway” stays available.
2. **“Merge coins” for one address.** The user picks an address. The app sends that address’s smallest coins, up to N at a time, back to the same address as one coin. It repeats one round per confirmed block until the address has few coins left.
This builds on #110/#111 (per-address view). I have a working branch, and I’ll only open a PR after those two are settled and after hearing from you here.
### Why limit the number of inputs
Each input adds a removal-record proof to the transaction (`num_proofs = 4 + inputs + type scripts`). More inputs mean:
- **More local proving.** The light wallet builds the ProofCollection itself. Time and RAM grow with the input count. Past some point the app stalls or fails with “request exceeded its deadline”.
- **It may never get upgraded.** A ProofCollection has to be upgraded to a SingleProof by another node. Upgraders skip transactions with `num_proofs() > max_num_proofs` (default 16, `mempool.rs`). They leave them in the mempool, so the send just sits there.
- **Higher fees.** The relay floor is 0.0005 NPT per input.
What I measured on 2026-11-22, from a mining wallet with a few hundred small coins (about 31 NPT on average):
| Send | Inputs | Result |
|—|—:|—|
| 20,000 NPT | ~640 (est.) | app failed |
| 10,000 NPT | ~320 (est.) | app failed |
| 5,000 NPT | ~160 (est.) | app failed |
| 20 sends of ~1,000 NPT | 1–32 | **all confirmed**, including three with 32 inputs |
So 32 is a value I have *seen* go through, which is why I used it as the default. I don’t know where the real ceiling is between 32 and ~160. I also don’t know whether the limit is local proving or upgrader settings.
### Why merge coins
Mining rewards arrive as small coins every block. Half of each is time-locked and later turns into another small coin. A mining wallet’s coin count keeps growing. With the same balance, the amount you can send in one transaction keeps shrinking: with 31-NPT coins, 32 inputs is about 1,000 NPT.
Merging ahead of time, when nothing is urgent, makes the later large send fast, cheap and reliable. Design choices:
- **Smallest coins first.** The cost per input (proof and fee) is the same for any coin, so small coins cost the most relative to their value. Coins in a round are locked until it confirms. Merging only small ones keeps the large coins free to spend meanwhile. (Note: the largest single send is the sum of the 32 biggest coins, so it barely moves at first. The gain is that large sends need far fewer inputs.)
- **One address at a time, back to the same address.** Addresses often have different purposes (pool, solo, payments from friends). Mixing coins from different addresses in one transaction would link them on the sender side and blur the per-address view from #111.
- **One round per block, never auto-forgetting a stuck round.** The next round starts only after the previous output is confirmed. If a round doesn’t confirm, the app stops and tells the user rather than abandoning or resending it.
- **Fee per round** = max(0.02, 0.0005 × inputs).
### Questions for the developers
1. Is a wallet-side input cap the right approach? Is 32 a sensible default, given that `max_num_proofs` defaults to 16? Would you rather the wallet ask the connected node for something, instead of a fixed setting?
2. Is there a known reason sends with ~160 inputs fail in the light wallet? Is it local proving, the upgrade limit, or both?
3. Is consolidation something you’d accept in the official app? Or would you rather see it in neptune-core (e.g., a `consolidate` RPC) and have the app call it?
4. Any privacy concern with merging back to the same address that I’ve missed?
Feedback welcome. I’d rather shape this with you than ship it as a surprise PR.