Yes, I think it can control the execution order, the problem is, if you create the exact transaction, without modifying the nonce, and the transaction is still not mined for too low gas or problems, it will throw you an error like "There is a transaction with too low gas, modify the gas or change the nonce", or something like that. So you will not be able to create a transaction like that without modifying it. I think web3 handle this automatically
It's a little hard to explain
Basically, the nonce should change between transactions or the network will treat it like the same transaction if the hash its the same. That's why I need to change the nonce, because I need to send 3 transactions exactly the same.
yes that is what juan's sample shown, just get the # of transaction submitted by the 'from' address and increment it(sort of) and this is one of the property of a transactioninput object. To 'resend', it needs to be treated as a new transaction i.e. the nonce changed. basically every transaction through to the pool needs to be unique in terms of from + nonce combination. But why a count rather than guid(which is how I do with nonce when I am doing other when it said 'nonce'), I have no idea
@garyng2000@SebastianGiro there is an order requirement, you may have more than one transaction waiting in the pool. the guid would not help in that situation. Also there is an issue on replay attacks, you will need to validate if that guid has been used before in the whole history for that address
but yeah the "nonce" name is rather confusing
I guess it might have been a historic reason, which it prevents the replay attack, and end up being used as an ordering mechanism
@juanfranblanco and the order requirement is what confuse me, the other side is like @SebastianGiro said, nonce for most people with coding experience would expect it to be just random number which you have explained probably was initially the intend.
Back to the order thing, since my transactions have the potential of minted by different miners at different times, the 'order' as in nonce is nothing more than 'preferred' rather than guaranteed. So what is the usage scenario of order if it is not guaranteed ?