Cost/space effective transaction?

0

Is there a more, or most, cost/space effective way to create a transaction with say 100 outputs and 1 input? Is there a limit to the number of outputs in a transaction (aside from any limitation upon blockspace)?

doffing81

Posted 2017-08-21T06:45:22.143

Reputation: 474

Answers

1

There is no explicit limit on the transaction outputs, however, transactions bigger than 100kB are non-standard and will not be relayed by most nodes. As P2PKH outputs are 34 bytes, you'd be able to create a transaction with more than 2,900 outputs.

Since I don't know what your use case exactly is, note that if the outputs are too small, they might make the transaction non-standard (when they are below the dust threshold), and even above that threshold it could be cost prohibitive to spend very small outputs at current fee levels.

Murch

Posted 2017-08-21T06:45:22.143

Reputation: 41 609

0

More cost/space effective than what? It's not possible to create outputs without physically encoding them into a transaction, not sure how you are thinking to reduce the space they take up.

Such a transaction would be highly discouraged on principle because it increases the UTXO set by a huge factor, even though there is no explicit limit. Scaling of the UTXO set is perhaps one of the most important issues to think about for the future of bitcoin, it's preferable to reduce the set rather than increase it because all full nodes keep the full set in fast memory to validate new transactions, so a large set is quite a burden. Under what circumstances would you need to make such a transaction?

MeshCollider

Posted 2017-08-21T06:45:22.143

Reputation: 8 735

More cost/space effective than say a P2PKH transaction. Perhaps a Segwit transaction would help with respect to cost, and with there being other transaction types, not all of which I know, I was wondering if perhaps other solutions exist. As for claiming that it is highly discouraged, I can only point out that this isn't factual. I understand the problem with the UTXO set, and I have a legitimate use case, for which the only discouragement comes from cost, which will be paid for. Perhaps using Lightning may be a solution, however, it isn't quite there for my use case.doffing81 2017-08-23T23:45:15.717

0

Here is a post that explains transaction batching, which would be quite useful here.

doffing81

Posted 2017-08-21T06:45:22.143

Reputation: 474