Skip to content

optimism: user can set pending block gas limit#24

Merged
protolambda merged 1 commit intooptimism-historyfrom
pending-gas-limit
Dec 16, 2022
Merged

optimism: user can set pending block gas limit#24
protolambda merged 1 commit intooptimism-historyfrom
pending-gas-limit

Conversation

@protolambda
Copy link
Copy Markdown
Contributor

@protolambda protolambda commented Nov 4, 2022

Description

When the pending block is computed, it would previously use the full gas limit. When the eip 1559 elasticity is high, this can be too much gas for some resource constrained devices. And every tx processed into the pending block is re-applied if it's not included. This can cause high block production lag as seen in opcraft. To mitigate this, we can allow the user to set the pending gas limit with the existing miner gas limit flag, which is non-functional in optimism otherwise, since the gas limit is set by the system configuration.

The prepareWork method has two call paths:

  • the engine API: we always specify the exact gas limit we want here
  • the pending-block background work: the generation parameters are largely all left unspecified, including the gaslimit. If it's unspecified it determines the values from context. And when it's optimism, it doesn't need to use anything related to the parent gas limit, and can instead use the configured miner gas ceiling to produce a pending block with just the right amount of gas that the user is willing to process for pending-block functionality.

This depends on #22 Done

Tests

e2e testing of pending gas limit: ethereum-optimism/optimism#4047

Metadata

Fix ENG-2978

@protolambda protolambda marked this pull request as ready for review December 15, 2022 18:04
@trianglesphere trianglesphere self-requested a review December 15, 2022 18:32
@protolambda protolambda requested a review from tynes December 16, 2022 16:06
Copy link
Copy Markdown
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

lgtm

@protolambda protolambda merged commit 60b51d6 into optimism-history Dec 16, 2022
@protolambda protolambda deleted the pending-gas-limit branch December 16, 2022 19:06
chokobole pushed a commit to kroma-network/go-ethereum that referenced this pull request Feb 6, 2023
chokobole pushed a commit to kroma-network/go-ethereum that referenced this pull request Feb 6, 2023
chokobole pushed a commit to kroma-network/go-ethereum that referenced this pull request Feb 6, 2023
joey0612 pushed a commit to joey0612/op-geth that referenced this pull request Feb 20, 2024
snap: fix snap-tests to handle legacy code lookups
zhiqiangxu referenced this pull request in ethstorage/op-geth Jul 18, 2024
* w3ip-02 test: withdraw code staking

* check suicide post state

* minor

* add compilation info
kangsorang pushed a commit to kroma-network/7560-geth that referenced this pull request Oct 15, 2024
blockchaindevsh added a commit to blockchaindevsh/op-geth that referenced this pull request Jan 25, 2025
…timism#24)

* make `GetBalance` return the sum of native & sgt balance

* add another http listener for sgt
blockchaindevsh added a commit to blockchaindevsh/op-geth that referenced this pull request Oct 8, 2025
kchojn referenced this pull request in compose-network/op-geth Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants