0

I would like to know is it possible that hash of transaction will change during chain reorganization?

I noticed that difference is only between block number and block hash.

Also, polling geth with eth_getFilterChanges sometimes can deliver even number of reorganized (removed) transactions and regular one's with same hash, which means that transaction is not mined at all, but if i check that transaction through ropsten.io - it is fine. Is it bug of geth or something else?

  • Transaction hash can be generated locally, mainly depends upon nonce and state of network like gas etc. So it these remain the same, then the txn hash remains the same. – darxtrix Jan 15 '18 at 18:13
1

If the chain is reorganised then any transactions contained within blocks in the 'old' chain will not exist.

This blog post outlines reorganisations in more detail.

"Roughly speaking, the chances of a reorganisation occurring reduce substantially the farther from the end you get.". This is why exchanges require 'x amount of confirmations' prior to crediting your account. The logic is that after a certain number of blocks have been mined on top of the one containing your transaction, then it is fairly safe to assume that this is the 'real' longest chain, and no further reorganisations will occur.

So, to answer your question. If a reorganisation occurs, transactions in reverted blocks will cease to exist. Transactions in the remainder of the chain will remain. Their hashes will not change.

  • Thank you for your answer! If you are familiar with geth, could you help me with second part of my question? For example: While listening for filter changes i get transaction, after that i get same removed transaction. It means that transaction is not confirmed, but on ropsten.io it exist. – Coder Jul 5 '17 at 2:06

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.