Post
Topic
Board Altcoin Discussion
Re: **** Official Ethereum QA thread ****
by
Vitalik Buterin
on 04/02/2014, 19:20:54 UTC
In Ethereum, you have entities called contracts, where contracts have their own balances, and are activated every time you send a transaction (think: money with an optional message attached) to them. The contract has 16 computational steps for free to give it wiggle room to determine whether a transaction is even worth processing; after this, every computational step that the contract takes costs it 1x BASEFEE (or more for specialized data access or crypto ops). If the contract goes bankrupt halfway through the computational process, it just stops halfway through.

How r blockchain reorgs handled? Computational steps can't be rolled back nor blockchain can be re-rolled from block 0, so u r supposed to store blockchain snapshots each N-th block, which is quite expensive.
Can't a Finney attack be combined with a very long-running transactions to DoS all nodes? If a miner earns all block fees then even without a Finney attack a malicious miner could include a lot of long-running transactions into their block to slow down processing of the next block / transactions.

The current design does have you store blockchain snapshots for every block. That's not that expensive actually; the reason is that we're using functional data structures (specifically, Patricia trees) that automatically provide optimal deduplication, so if blocks N and N+1 are both 1 GB in size but only 100 KB of that is actually different between the two blocks then only 1 GB + 100 KB of space is required; and the savings obviously compound for many blocks (eg. 50 blocks = 1.005 GB, 500 blocks = 1.05 GB, etc.