Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text editing for clarity and updating the consensus algorithm to PoS #1196

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion 13evm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ Each operation performed by a transaction or contract costs a fixed amount of ga
* Calculating a Keccak-256 hash costs 30 gas + 6 gas for each 256 bits of data being hashed
* Sending a transaction costs 21,000 gas

Gas is a crucial component of Ethereum, and serves a dual role: as a buffer between the (volatile) price of Ethereum and the reward to miners for the work they do, and as a defense against denial-of-service attacks. To prevent accidental or malicious infinite loops or other computational wastage in the network, the initiator of each transaction is required to set a limit to the amount of computation they are willing to pay for. The gas system thereby disincentivizes attackers from sending "spam" transactions, as they must pay proportionately for the computational, bandwidth, and storage resources that they consume.
Gas is a crucial component of Ethereum, and serves a dual role: as a buffer between the (volatile) price of Ethereum and the reward to miners for the work they do, and as a defense against denial-of-service attacks. To prevent accidental or malicious infinite loops or other computational wastage in the network, the transaction initiator is required to set a limit to the amount of computation they are willing to pay for. The gas system discourages "spam" transactions by making the attackers pay proportionately for the computational bandwidth and storage resources that they consume.

[[gas_accounting_execution]]
==== Gas Accounting During Execution
Expand Down
4 changes: 1 addition & 3 deletions 14consensus.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ While consensus algorithms are an important part of how blockchains work, they o

((("consensus","via proof of work")))((("proof of work (PoW)","consensus via")))The creator of the original blockchain, Bitcoin, invented a _consensus algorithm_ called _proof of work_ (PoW). Arguably, PoW is the most important invention underpinning Bitcoin. The colloquial term for PoW is "mining," which creates a misunderstanding about the primary purpose of consensus. Often people assume that the purpose of mining is the creation of new currency, since the purpose of real-world mining is the extraction of precious metals or other resources. Rather, the real purpose of mining (and all other consensus models) is to _secure the blockchain_, while keeping control over the system decentralized and diffused across as many participants as possible. The reward of newly minted currency is an incentive to those who contribute to the security of the system: a means to an end. In that sense, the reward is the means and decentralized security is the end. In PoW consensus there is also a corresponding "punishment," which is the cost of energy required to participate in mining. If participants do not follow the rules and earn the reward, they risk the funds they have already spent on electricity to mine. Thus, PoW consensus is a careful balance of risk and reward that drives participants to behave honestly out of self-interest.

Ethereum is currently a PoW blockchain, in that it uses a PoW algorithm with the same basic incentive system for the same basic goal: securing the blockchain while decentralizing control. Ethereum's PoW algorithm is slightly different than Bitcoin's and is called _Ethash_. We will examine the function and design characteristics of the algorithm in <<ethash>>.

Ethereum also considers switching to _ProgPOW_, a more ASIC-resistant PoW algorithm, which is still under development at the time of writing.
Ethereum used to be a PoW blockchain until a switchover to PoS in September 2022. The PoW algorithm, used by Ethereum prior to the switchover, aimed at securing the blockchain while decentralizing control. Ethereum's PoW algorithm was slightly different than Bitcoin's and was called _Ethash_. We will examine the function and design characteristics of the algorithm in <<ethash>>.

=== Consensus via Proof of Stake (PoS)

Expand Down