Thanks. What I'd misunderstood is I'd assumed any dust output required consolidation to spend, but from re-reading Shadders' article I see consolidation is only required if you want to spent the dust output with zero fee. Makes sense now.
With Q3 what I was getting at is what is the function is for determining the dust limit? (eg why 136?). I think I've figured this out from the comments here:
<a href='https://github.com/bitcoin-sv/bitcoin-sv/blob/master/src/primitives/transaction.h#L190-L198'>https://github.com/bitcoin-sv/bitcoin-sv/blob/master/src/primitives/transaction.h#L190-L198</a>
Spending a P2PKH involves a 34 byte output plus 148 byte input = 182 bytes
(3 * 182 * minRelayTxFee / 1000) = (3 * 182 * 250 / 1000) = 136.5
I'm thinking out aloud here, but that 136 limit is going to be different for different script templates. This does make me wonder how does a miner know the size of the future unlocking script for any random custom locking script they receive?
Thanks. What I'd misunderstood is I'd assumed any dust output required consolidation to spend, but from re-reading Shadders' article I see consolidation is only required if you want to spent the dust output with zero fee. Makes sense now.
With Q3 what I was getting at is what is the function is for determining the dust limit? (eg why 136?). I think I've figured this out from the comments here:
<a href='https://github.com/bitcoin-sv/bitcoin-sv/blob/master/src/primitives/transaction.h#L190-L198'>https://github.com/bitcoin-sv/bitcoin-sv/blob/master/src/primitives/transaction.h#L190-L198</a>
Spending a P2PKH involves a 34 byte output plus 148 byte input = 182 bytes
(3 * 182 * minRelayTxFee / 1000) = (3 * 182 * 250 / 1000) = 136.5
I'm thinking out aloud here, but that 136 limit is going to be different for different script templates. This does make me wonder how does a miner know the size of the future unlocking script for any random custom locking script they receive?