0

I have a question about double spend attack on ethereum

I heard that double spend attack is prevented by Nonce

and we can send transactions with different nonce it can be validate

but this situation I thought always two transaction is mined by different blocks

I Want to know is possible to contain two transaction(with different none) for one block

and so if possible, how can be validated by miner? (their state is same state)

  • Thanks, i think that is problem from different account. That means if two transaction from one account, lower nonce transaction could be upper gas price right? – dongyoung le Mar 18 '19 at 06:00
  • This is not a duplicate. But yes, two transactions from the same account can be included in the same block. Transactions within a block are ordered, and in this case, the transaction with the lower nonce will have to be included first. Validation is simple: validate each transaction within the block, in order. – user19510 Mar 18 '19 at 06:04
  • @smarx Thanks for reply. So it doesn't matter with gas price. lower nonce is validated first.. it is simple. thanks – dongyoung le Mar 18 '19 at 08:34
  • Yes, nonces have to be strictly consecutive. If a certain address has made 3 transactions, the next transaction has to have the nonce 3. – user19510 Mar 18 '19 at 08:38
  • Another question.. So that ordering is supported by miner? is there any algorithm in geth code? – dongyoung le Mar 18 '19 at 08:52
  • Yes, and I guess yes? Not sure what you're asking. – user19510 Mar 18 '19 at 14:12
  • Sorry for my poor english, So when miner makes block, they make consequently transactions with ordered nonce .. And i got a answer for my question Thanks – dongyoung le Mar 19 '19 at 03:58

0 Answers0