<p>There is no direct limit on the number of outputs, but transactions can't have more than an allowed amount of weight and this indirectly limits the number of outputs.</p>

CC BY-SA 4.0
2018-11-16T10:51:18.870Z
Thanks.
I do understand the indirect limit by TX weight, what makes me wonder is that today's miners can intentionally bloat UTXO by creating lots of TXs smaller than the limit. Or even non-miner can do that by splitting their TX into more than two.
So my question is, "why not limit the number of TXO in a block directly?" This seems to be able to be introduced by a soft-fork, and may prevent some unknown vulnerability (like the one Christopher Jeffrey has proposed year ago.)
joemphilips
CC BY-SA 4.0
2018-11-16T20:07:48.817Z
Because adding more constraints to blocks makes the mining problem vastly more complicated for no gain.
G. Maxwell
CC BY-SA 4.0
2018-11-16T00:58:26.203Z
2018-11-16T00:58:26.203Z
G. Maxwell
<p>It seems good for preventing an UTXO bloat by restricting max number of outputs of TX(or block) can have.
Is there such a restriction? if there is, which part of source code should I read? If not, why not?</p>

<p>Note: What I am asking is not about block size limit or TX size limit, I know those and how those are (implicitly) limiting the number of total outputs in TX (or block), but I think this is kinda roundabout way which limits the number outputs only loosely. Why not more direct restriction?</p>

<consensus>
Is there a max number of tx outputs allowed by consensus?
joemphilips
# Is there a max number of tx outputs allowed by consensus?

(Asked by: username_0 on 2018-11-15)

It seems good for preventing an UTXO bloat by restricting max number of outputs of TX(or block) can have.
Is there such a restriction? if there is, which part of source code should I read? If not, why not?

Note: What I am asking is not about block size limit or TX size limit, I know those and how those are (implicitly) limiting the number of total outputs in TX (or block), but I think this is kinda roundabout way which limits the number outputs only loosely. Why not more direct restriction?

**Tags:** consensus


---

## 1 answers

### Answer by username_1 on 2018-11-16. Score: 3

There is no direct limit on the number of outputs, but transactions can't have more than an allowed amount of weight and this indirectly limits the number of outputs.

> **Comments:**
> **username_0**: Thanks. I do understand the indirect limit by TX weight, what makes me wonder is that today's miners can intentionally bloat UTXO by creating lots of TXs smaller than the limit. Or even non-miner can do that by splitting their TX into more than two. So my question is, "why not limit the number of TXO in a block directly?" This seems to be able to be introduced by a soft-fork, and may prevent some unknown vulnerability (like the one Christopher Jeffrey has proposed year ago.)  
> **username_1**: Because adding more constraints to blocks makes the mining problem vastly more complicated for no gain.  

---

