1

Is the size of the transaction some factor when the miner chooses one transaction over the other, provided that they both have the same fee per byte?

In other words, will the miner prefer larger or smaller transactions if they all have the same fee per byte?

2

TL;DR: Usually not.

Bitcoin holds a lottery to elect the author of the next block roughly every ten minutes. The participants enter by performing hashes on block candidates ("buying lottery tickets with power expenditure"). The "winning ticket" is found when a miner finds a valid block. Whatever (valid) set of transactions the miner had in their block candidate gets appended to the blockchain. The block includes a transaction that collects the block subsidy and transaction fees and pays it out to the block's author. This "distributed lottery" is used to rate limit updates to the system's shared state, giving everyone time to converge on a single ground-truth. While the block's content must fulfill the rules of the network, the actual selection of transaction for the block happens before consensus is established and is therefore each miner's sole prerogative.

Generally, miners get paid more when they include the transactions with the highest feerate first. If the feerate of the two described transactions is in the range of the next block, they should include both. If only one fits, they should pick the one that maximizes the transaction fees collected from the transactions that fill the remaining space in the block block. If only one fits, presumably preferring the bigger transaction would usually yield more total transaction fees, but for that to matter, the two transactions would need to fall right at the end of the next block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.