13.06.2017 Views

Whitepaper - Ethereum Classic With Cover

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Ethereum</strong> <strong>Classic</strong> Documentation, Release 0.1<br />

dimension and represents the entire history of states at the discrete time points designated by the blocks on the<br />

chain.<br />

All Ether balances and values are denominated in units of wei: 1 Ether is 1e18 wei.<br />

Note: “Contracts” in <strong>Ethereum</strong> should not be seen as something that should be “fulfilled” or “complied with”;<br />

rather, they are more like “autonomous agents” that live inside of the <strong>Ethereum</strong> execution environment, always<br />

executing a specific piece of code when “poked” by a message or transaction, and having direct control over their<br />

own ether balance and their own key/value store to store their permanent state.<br />

What is a transaction?<br />

The term “transaction” is used in <strong>Ethereum</strong> to refer to the signed data package that stores a message to be sent<br />

from an externally owned account to another account on the blockchain.<br />

Transactions contain:<br />

• the recipient of the message,<br />

• a signature identifying the sender and proving their intention to send the message via the blockchain<br />

to the recipient,<br />

• VALUE field - The amount of wei to transfer from the sender to the recipient,<br />

• an optional data field, which can contain the message sent to a contract,<br />

• a STARTGAS value, representing the maximum number of computational steps the transaction execution<br />

is allowed to take,<br />

• a GASPRICE value, representing the fee the sender is willing to pay for gas. One unit of gas corresponds<br />

to the execution of one atomic instruction, i.e., a computational step.<br />

What is a message?<br />

Contracts have the ability to send “messages” to other contracts. Messages are virtual objects that are never<br />

serialized and exist only in the <strong>Ethereum</strong> execution environment. They can be conceived of as function calls.<br />

A message contains:<br />

• the sender of the message (implicit).<br />

• the recipient of the message<br />

• VALUE field - The amount of wei to transfer alongside the message to the contract address,<br />

• an optional data field, that is the actual input data to the contract<br />

• a STARTGAS value, which limits the maximum amount of gas the code execution triggered by the<br />

message can incur.<br />

Essentially, a message is like a transaction, except it is produced by a contract and not an external actor. A<br />

message is produced when a contract currently executing code executes the CALL or DELEGATECALL opcodes,<br />

which produces and executes a message. Like a transaction, a message leads to the recipient account running its<br />

code. Thus, contracts can have relationships with other contracts in exactly the same way that external actors can.<br />

What is gas?<br />

<strong>Ethereum</strong> implements an execution environment on the blockchain called the <strong>Ethereum</strong> Virtual Machine (EVM).<br />

Every node participating in the network runs the EVM as part of the block verification protocol. They go through<br />

the transactions listed in the block they are verifying and run the code as triggered by the transaction within the<br />

EVM. Each and every full node in the network does the same calculations and stores the same values. Clearly<br />

<strong>Ethereum</strong> is not about optimising efficiency of computation. Its parallel processing is redundantly parallel. This<br />

74 Chapter 1. Contents

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

Saved successfully!

Ooh no, something went wrong!