10.02.2016 Views

Bitcoin and Cryptocurrency Technologies

1Qqc4BN

1Qqc4BN

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The simple binary Merkle tree used in <strong>Bitcoin</strong> would work for this purpose as it allows efficient proofs<br />

of inclusion (provided miners ensure that no tree will include two different states for the same<br />

address). But we also want fast lookups <strong>and</strong> the ability to efficiently update an address’s value. To do<br />

this Ethereum uses a slightly more complicated tree structure called a ​Patricia tree​, also known as a<br />

prefix tree, trie, or radix tree. Each Ethereum block includes the root of a Merkle Patricia tree<br />

committing to the state of every address, including contract addresses. Each contract’s state, in turn,<br />

includes a tree committing to the entire state of its storage.<br />

Another tricky issue with an account‐based ledger is preventing replay attacks. In <strong>Bitcoin</strong>, since every<br />

transaction consumes its input UTXOs, the same signed transaction can never be valid twice. With<br />

Ethereum’s design, we need to make sure that if Alice signs a transaction saying “pay 1 ether to Bob”,<br />

Bob can’t broadcast the transaction over <strong>and</strong> over again until Alice’s account is drained. To avoid this,<br />

every account in Ethereum has a transaction counter tracking how many transactions it has sent. The<br />

statement Alice really signs is “I authorize my ​n​th transaction to be a payment of 1 ether to Bob.” This<br />

transaction can’t be replayed because after it is processed, Alice’s transaction counter will increment<br />

<strong>and</strong> is part of the global state.<br />

To summarize, Ethereum uses more powerful data structures than <strong>Bitcoin</strong> as part of its ledger.<br />

Although we haven’t looked at the details, it allows efficient proofs of a variety of types of statements<br />

about accounts, contracts, <strong>and</strong> transactions.<br />

Ethereum project. ​Ethereum was initially described in late 2013 <strong>and</strong> launched its first release, dubbed<br />

Frontier, in 2015. Ethereum utilized a pre‐sale, making units of the ether currency publicly available<br />

for a fixed price in <strong>Bitcoin</strong>, with all of the proceeds going to the Ethereum Foundation.<br />

This is a slower pace of development compared to many altcoins, but it reflects that fact that<br />

Ethereum is much more complex. In addition to EVM, a new programming model, <strong>and</strong> new data<br />

structures, Ethereum made significant changes to <strong>Bitcoin</strong>’s consensus protocol as well. The block time<br />

is targeted at 12 seconds instead of 10 minutes. To lessen the impact of stale blocks, which comprise a<br />

larger fraction of blocks in Ethereum than in <strong>Bitcoin</strong>, Ethereum uses an alternative protocol called<br />

GHOST to compute the consensus branch. It also uses a different proof‐of‐work. Currently, it’s a mix<br />

of hash functions designed to be memory hard, though in the future Ethereum plans to switch to a<br />

proof‐of‐stake system.<br />

This represents another major departure in philosophy from <strong>Bitcoin</strong>. The Ethereum project is<br />

stewarded by a non‐profit foundation <strong>and</strong> is relatively centralized in planning <strong>and</strong> decision making.<br />

There is an announced schedule of future versions of the protocol that will introduce changes based<br />

on early Ethereum experience. These will be hard forks by design, <strong>and</strong> furthermore, every Ethereum<br />

contract will be destroyed in between versions. So Ethereum is still very much an experimental<br />

system with major changes planned. As of 2015, it’s premature to invest too much in building real<br />

applications on top of Ethereum. But it’s a very promising system. Perhaps future versions of this<br />

textbook might even be called “Ethereum <strong>and</strong> <strong>Cryptocurrency</strong> <strong>Technologies</strong>.”<br />

291

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!