Questions regarding identical transactions

etheruseretheruser Member Posts: 3
I see on Wikipedia that a cryptographic nonce is an arbitrary number used only once in a cryptographic communication. However, the defines the definition of nonce as a scalar value equal to the number oftransactions sent by the sender, formally, Tn.

Q1: So, how the nonce is going to be random in the context of ether?

Q2: Suppose there are two identical transactions happening at the same time or one after another, Is nonce used the only parameter that is responsible for differentiating the two transactions? Or is the parentHash parameter used, basically determines that the two transactions would not collide with each other since the hash code is always unique and different. Please clarify.

Q3: The page 13 of the gavwood paper talks about reversing the transactions. Is that possible to implement with etherereum? Correct me if I am wrong, based on my understanding, since transactions takes place in a decentralized system, peer to peer, it's difficult to reverse any transaction?


  • ChrJentzschChrJentzsch Member Posts: 17
    A1: the nonce of the transaction is not a cryptographic nonce, it is just a counter. It is only there to ensure the right order of transactions from that sender and to avoid double execution of the same transaction. It differentiates the transactions.

    A2: yes, exactly equal transaction (same nonce) would result in only one being executed. If they have a different nonce, then both can be executed. ParentHash is not a transaction parameter and not needed as such.

    A3: You can not reverse transactions, but when the execution of a transaction runs out of gas, or has invalid code (jump to a position without jumpdest, stack underflow, ...) then the transaction gets reverted internally. This means that the transaction only results in the value transfer and the gasPrice*gasLimit to miner transfer, as if no evm-code has been executed.
Sign In or Register to comment.