0

From what I know, you can broadcast a transaction including input addresses, output addresses, and amounts, which is signed by your private key.

I often hear that your transaction might not be mined in the next block, since there is a limited capacity, and you can incentivize miners to prioritize your transaction by paying a higher mining fee.

But this doesn't make sense to me... I assumed that transactions must be mined in the next block, since your transaction also includes the hash of the previous block in order to prevent double-spending. Is this assumption correct?

Does this mean, for every block in which your transaction is not included, you need to continuously broadcast a new transaction with the hash of the new current block?

Or, is there a mechanism for just broadcasting a single transaction that can be mined in any future block, but cannot be mined more than once so that you don't accidentally spend extra? If so, how would this work?

I was thinking, because transactions must consume all bitcoin in an address (and you can send some back to yourself if you want), that a miner can not mine the same transaction twice because your address would now be empty in the new state of the blockchain. Is this the case?

Thanks for trying to clarify this for me :)

1 Answer 1

1

But this doesn't make sense to me... I assumed that transactions must be mined in the next block, since your transaction also includes the hash of the previous block in order to prevent double-spending. Is this assumption correct?

This is not correct, the transaction does not reference blocks, it references outputs. A block references the previous block.

To answer your question, no, you only have to broadcast your transaction once. In some cases that the mempool is too large, nodes might start deleting transactions from their mempool starting with the ones with the lower fees. In that case if your set fee is too low you might want to rebroadcast it.

Miners of course cannot mine the same transaction twice because as you said a transaction spends the input coins and therefore you cannot spend them again.

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.