Skip to content

feat: Monad-style 30M per-tx gas cap under Osaka (#392) - #401

Merged
nekomoto911 merged 1 commit into
Galxe:mainfrom
nekomoto911:feat/osaka-30m-tx-gas-cap
Jul 27, 2026
Merged

feat: Monad-style 30M per-tx gas cap under Osaka (#392)#401
nekomoto911 merged 1 commit into
Galxe:mainfrom
nekomoto911:feat/osaka-30m-tx-gas-cap

Conversation

@nekomoto911

Copy link
Copy Markdown
Collaborator

Refs #392.

Under Osaka, Gravity uses a flat Monad-style 30M per-tx gas cap (TFM_MAX_GAS_LIMIT)
instead of EIP-7825's 2^24. This deviates from the issue's original 2^24 design on
purpose: 30M equals the system-transaction gas_limit, so the boundary admits them and
#392's separate system-tx gas gating (P2) is no longer needed.

Enforced in lockstep off one constant GRAVITY_TX_GAS_LIMIT_CAP at three Osaka-gated
sites — the executor cfg (tx_gas_limit_cap), the consensus block check, and the pipe
tx_filter guard — so a self-produced block admitted by one path is never rejected on
another. Dormant until osakaTime.

Not included (separate follow-ups): the cross-Osaka e2e acceptance, and #392's incidental
revm-bump debt (nonce == u64::MAX guard, tx_filter header rewrite).

@nekomoto911
nekomoto911 force-pushed the feat/osaka-30m-tx-gas-cap branch from d2d82a5 to e5bb76e Compare July 24, 2026 04:16
@nekomoto911
nekomoto911 changed the base branch from gravity-reth-merge-v2.3.0 to main July 24, 2026 04:17
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

{ "git_describe": "v0.13.12-0-gf619d43d", "git_timestamp": "2026-04-30T16:36:24+03:00", "git_tree": "f5574b87cc64fa7a3a6b21ba33809258498d5f17", "git_commit": "f619d43dfbc36cbc9a1832503ce43f2e5223996e", "semver": "0.13.12" }

P1 Badge Remove vendored libmdbx changes

This commit updates crates/storage/libmdbx-rs/mdbx-sys/libmdbx/ (for example, bumping the vendored VERSION.json) even though the repository guidance explicitly forbids modifying that vendored third-party tree. Please keep the libmdbx update out of this gas-cap change, or route it through the repository's dedicated vendored-source update process, so this patch does not mix a third-party database update into the feature work.

AGENTS.md reference: AGENTS.md:L157-L165

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Gravity replaces EIP-7825's 2^24 per-tx gas cap with a flat Monad-style
30M cap (TFM_MAX_GAS_LIMIT) once Osaka activates. The 30M matches the
system-transaction gas_limit exactly, so the boundary admits them and the
separate system-tx gas gating (Galxe#392 P2) is no longer needed.

Enforced in lockstep at three Osaka-gated sites off a single constant
GRAVITY_TX_GAS_LIMIT_CAP: the executor cfg (tx_gas_limit_cap), the
consensus block check, and the pipe tx_filter guard, so a self-produced
block admitted by one path is never rejected on another.

Dormant today (no osakaTime).
@nekomoto911
nekomoto911 force-pushed the feat/osaka-30m-tx-gas-cap branch from e5bb76e to 3b482e7 Compare July 27, 2026 03:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b482e766f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

// self-produced block admitted by one path is rejected on another (sync brick).
for tx in block.body().transactions() {
if tx.gas_limit() > MAX_TX_GAS_LIMIT_OSAKA {
if tx.gas_limit() > GRAVITY_TX_GAS_LIMIT_CAP {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve EIP-7825 for non-Gravity chains

When this client follows Ethereum mainnet after Osaka, a block containing a transaction with gas limit in (2^24, 30_000_000] is now accepted even though EIP-7825 makes it invalid: this shared consensus validator unconditionally substitutes the Gravity cap, and EthEvmConfig::mainnet() receives the same unconditional override. The repository explicitly supports non-Gravity chainspecs (crates/chainspec/src/spec.rs:1010-1014), so gate the 30M override on a Gravity-specific marker and retain MAX_TX_GAS_LIMIT_OSAKA elsewhere to prevent mainnet consensus divergence.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

@nekomoto911
nekomoto911 merged commit caf58da into Galxe:main Jul 27, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants