2

In the protocol rules for validating transactions it says:

Rule 9:

For each input, if the referenced output exists in any other tx in the pool, reject this transaction.[5]

I assume that when a node receives a transaction it has to validate it applying those rules before adding it to the memory pool and resending it. Also miners will only add transactions to blocks if they are validated, that is, they are in the memory pool. Please correct me if I'm wrong.

Let's say I broadcast a valid transaction with such a low fee that no miner is willing to add it to a block, but it is valid, nodes who received it validated it and miners also validated it but it is stuck in the limbo, it is not in any block so the recipient cannot reference any output in this transaction.

Is there any way of re-spending the inputs referenced in this transaction? I think I have to wait until the transaction is removed from the memory pool of the miners but I'm not sure. If this is true, how long does it take?

1

Well, you can initiate the transaction with same input referenced, but the node in the network will not add your transaction in their mempool, since they already have an transaction with same input.

What you can do-

  1. Wait till the first transaction gets discarded from mempool(it may take long time, tho) and then re-initiate a transaction with significant transaction fee.

  2. Tell the receiver to initiate a new transaction to his own wallet spending the output of the verified but unconfirmed transaction (i.e the transaction stuck in mempool) with a slightly high transaction fee. This is called Child Pays for Parent (CPFP) transaction.

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.