I have a contract which I need to update occasionally.

This update has nothing to do with "real money transfer".

It deals only with the value of a state (global) variable in my contract.

Also, I am the only one who can change this state variable (protected with an onlyOwner modifier).

My general question is:

Do I need to worry about the status of this transaction in any way whatsoever?

For example, do I need to keep the receipt and check that it is still valid after 12 blocks?

More specifically, do I need to worry about this transaction not taking place because it coincidentally went into a block which also contained a "double-spending" transaction and was forked out of the chain due to that?

In other words, with regards to that block - does everybody need to worry about their transactions, or only the one who issued the "double-spending" transaction?

I found this post, which more or less refers to some of my concerns.

However, the answer does not refer to one specific question in that post, which happens to be exactly what I'm asking here:

What if it was included in some block, but then the block gets orphaned? Will my transaction be "removed"?

Thank you very much!

2 Answers 2


First of all, if a block contains a 'double-spending' transaction (or any other invalid transaction), it will be ignored by other nodes so there won't be any fork. However it's possible that a transaction to go un-mined due to chain reorganisation, this is when another chain which doesn't include that transaction wins over the chain which includes it. But the probability of this happening gets extremely low in time.


What if it was included in some block, but then the block gets orphaned? Will my transaction be "removed"?

Yes, if for any reason the block containing your transaction gets orphaned, it will not be in current longest chain at that moment.

Now, question remains whether transaction has to be submitted again or will it be picked by network automatically

To answer this question, we have to find why that block got orphaned and how nodes maintain their transaction pools.

Blocks could get orphaned due to malicious action by some mining node. Ex: A double spend or in general block mined is not according to rules of consensus protocol. Or, it could happen due to a network partition.

In first case, block will be rejected by other nodes, so will the transactions in that node, that means those transactions will still remain in some other node’s transaction pool, and will be picked in subsequent blocks.

In second case, it could be tricky, as transaction is already mined , so eventually it has been removed from all nodes in that network partition. But when network partition resolves, and blocks gets orphaned, transaction has to be broadcasted again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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