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

Update Gas and Fees, Blocks and Transactions pages #3509

Merged
merged 38 commits into from
Aug 4, 2021

Conversation

minimalsm
Copy link
Contributor

@minimalsm minimalsm commented Jul 30, 2021

Description

Changes to pages to include changes introduced in London update

Related Issue: #3022 #3521

@github-actions github-actions bot added Status: Review Needed content 🖋️ This involves copy additions or edits labels Jul 30, 2021
@minimalsm minimalsm marked this pull request as draft July 30, 2021 16:37
@minimalsm minimalsm changed the title Update Gas and Fees page Update Gas and Fees, Blocks and Transactions pages Aug 3, 2021
@minimalsm minimalsm marked this pull request as ready for review August 3, 2021 22:58

In short, gas fees help keep the Ethereum network secure. By requiring a fee for every computation executed on the network, we prevent actors from spamming the network. In order to prevent accidental or hostile infinite loops or other computational wastage in code, each transaction is required to set a limit to how many computational steps of code execution it can use. The fundamental unit of computation is "gas".
Starting with [the London update](/history/#london), every block has a base fee, the minimum per gas price for inclusion in this block. Optionally, users can set a priority fee (tip).
Copy link
Contributor

@samajammin samajammin Aug 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest adding a brief paragraph to begin the "After the London update" where we summarize the high level goals, e.g. 1) reducing variance of tx fees/delays through flexible block sizes, 2) improve UX by making fees more predictable 3) decrease rate of inflation by burning tx fees.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good resource on the "why": https://hackmd.io/@timbeiko/why-1559

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also make note EIP-1559 here during the introduction of the London changes?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hacked.io. Love the idea for getting everyone on the same page.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction; https://hackmd.io

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included this

[The London Upgrade](/history/#london) aims to make transacting on Ethereum more predictable for users by overhauling Ethereum's transaction-fee-mechanism. The high-level benefits introduced by this change include better transaction fee estimation, generally quicker transaction inclusion, and reducing the ETH rate of inflation by burning a percentage of transaction fees.

Should we also make note EIP-1559 here during the introduction of the London changes?

Thoughts on keeping EIP-1559 discussion contained within the EIP-1559 heading? I could add a small intro saying that most of the changes we're speaking about were introduced in 1559.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minimalsm This is looking awesome! I too left a couple comments and suggestions, but overall excited to get this out there. 👍🏻

@@ -55,7 +57,7 @@ Proof of work means the following:

## Block size {#block-size}

A final important note is that blocks themselves are bounded in size. Each block has a block gas limit which is set by the network and the miners collectively: the total amount of gas expended by all transactions in the block must be less than the block gas limit. This is important because it ensures that blocks can’t be arbitrarily large. If blocks could be arbitrarily large, then less performant full nodes would gradually stop being able to keep up with the network due to space and speed requirements. The block gas limit at block 0 was initialized to 5,000; any miner who mines a new block can alter the gas limit by up to about 0.1% in either direction from the parent block gas limit. The gas limit as of April 2021 currently hovers around 15,000,000.
A final important note is that, as of with [the London update](/history/#london), blocks themselves are no longer bounded in size. Each block has a target size of 15 million gas but the size of blocks will increase or decrease in accordance with network demands, up until the block limit of 30 milion gas (2x target block size). The total amount of gas expended by all transactions in the block must be less than the block gas limit. This is important because it ensures that blocks can’t be arbitrarily large. If blocks could be arbitrarily large, then less performant full nodes would gradually stop being able to keep up with the network due to space and speed requirements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocks themselves are no longer bounded in size.

We subsequently state that the block limit is 30 million... would consider the following:

Suggested change
A final important note is that, as of with [the London update](/history/#london), blocks themselves are no longer bounded in size. Each block has a target size of 15 million gas but the size of blocks will increase or decrease in accordance with network demands, up until the block limit of 30 milion gas (2x target block size). The total amount of gas expended by all transactions in the block must be less than the block gas limit. This is important because it ensures that blocks can’t be arbitrarily large. If blocks could be arbitrarily large, then less performant full nodes would gradually stop being able to keep up with the network due to space and speed requirements.
A final important note is that, as of [the London update](/history/#london), blocks themselves are more flexible in size. Each block has a target size of 15 million gas but the size of blocks will increase or decrease in accordance with network demands, up until the block limit of 30 million gas (2x target block size). The total amount of gas expended by all transactions in the block must be less than the block gas limit. This is important because it ensures that blocks can’t be arbitrarily large. If blocks could be arbitrarily large, then less performant full nodes would gradually stop being able to keep up with the network due to space and speed requirements.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a resource stating the new block capacity would be 30 million? I had been under the impression it was 25 million, but given current limit is now 15 million I wasn't sure... Didn't see anything specifying this in the EIP-1559 spec, and a cursory search online gave a mix of answers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup this confused me too so I double checked with Trent. 30 million is correct.

When 1559 is activated, the gasLimit of blocks will double (e.g. 15m to 30m), so “50% full” blocks post-1559 are equivalent to 100% full blocks pre-1559.

Source: https://hackmd.io/@q8X_WM2nTfu6nuvAzqXiTQ/1559-wallets

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few clarifications:

  • Blocks are still bounded in size, but at the fork block the block gas limit will double;
  • After that blocks, miners can still raise/lower the gas limit;
  • Blocks will, on average, only be 50% full. When they are >50% full, the baseFeePerGas increases until they are 50% full again, and similarly, if they are <50% full, the baseFeePerGas will decrease until there is sufficient demand (or it reaches its minimum value);
  • In times of high demand (think a new ICO/NFT drop/huge ETH price volatility), it is expected that blocks will be 100% full (e.g. 30m gas), which allows this increase in demand to be processed quicker.


In short, gas fees help keep the Ethereum network secure. By requiring a fee for every computation executed on the network, we prevent actors from spamming the network. In order to prevent accidental or hostile infinite loops or other computational wastage in code, each transaction is required to set a limit to how many computational steps of code execution it can use. The fundamental unit of computation is "gas".
Starting with [the London update](/history/#london), every block has a base fee, the minimum per gas price for inclusion in this block. Optionally, users can set a priority fee (tip).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also make note EIP-1559 here during the introduction of the London changes?

src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/transactions/index.md Outdated Show resolved Hide resolved
Copy link
Contributor

@timbeiko timbeiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good! Left a couple comments.

src/content/developers/docs/blocks/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/blocks/index.md Outdated Show resolved Hide resolved
@@ -55,7 +57,7 @@ Proof of work means the following:

## Block size {#block-size}

A final important note is that blocks themselves are bounded in size. Each block has a block gas limit which is set by the network and the miners collectively: the total amount of gas expended by all transactions in the block must be less than the block gas limit. This is important because it ensures that blocks can’t be arbitrarily large. If blocks could be arbitrarily large, then less performant full nodes would gradually stop being able to keep up with the network due to space and speed requirements. The block gas limit at block 0 was initialized to 5,000; any miner who mines a new block can alter the gas limit by up to about 0.1% in either direction from the parent block gas limit. The gas limit as of April 2021 currently hovers around 15,000,000.
A final important note is that, as of with [the London update](/history/#london), blocks themselves are no longer bounded in size. Each block has a target size of 15 million gas but the size of blocks will increase or decrease in accordance with network demands, up until the block limit of 30 milion gas (2x target block size). The total amount of gas expended by all transactions in the block must be less than the block gas limit. This is important because it ensures that blocks can’t be arbitrarily large. If blocks could be arbitrarily large, then less performant full nodes would gradually stop being able to keep up with the network due to space and speed requirements.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few clarifications:

  • Blocks are still bounded in size, but at the fork block the block gas limit will double;
  • After that blocks, miners can still raise/lower the gas limit;
  • Blocks will, on average, only be 50% full. When they are >50% full, the baseFeePerGas increases until they are 50% full again, and similarly, if they are <50% full, the baseFeePerGas will decrease until there is sufficient demand (or it reaches its minimum value);
  • In times of high demand (think a new ICO/NFT drop/huge ETH price volatility), it is expected that blocks will be 100% full (e.g. 30m gas), which allows this increase in demand to be processed quicker.

src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/gas/index.md Show resolved Hide resolved
src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
src/content/developers/docs/gas/index.md Outdated Show resolved Hide resolved
@minimalsm
Copy link
Contributor Author

Implemented the suggested changes. Thanks for the review @timbeiko ✌️

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minimalsm 💪🏻 🎉 Looking awesome, thanks for the hard work on this!

@minimalsm minimalsm merged commit 9be8f0e into ethereum:dev Aug 4, 2021
@minimalsm minimalsm deleted the updateGasAndFeesPage branch August 4, 2021 21:32
@wackerow wackerow mentioned this pull request Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content 🖋️ This involves copy additions or edits
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants