Skip to content

Make tx gas limit configurable in driver#3780

Merged
squadgazzz merged 6 commits intomainfrom
fix-transaction-encoding-on-fusaka
Oct 17, 2025
Merged

Make tx gas limit configurable in driver#3780
squadgazzz merged 6 commits intomainfrom
fix-transaction-encoding-on-fusaka

Conversation

@m-sz
Copy link
Copy Markdown
Contributor

@m-sz m-sz commented Oct 15, 2025

Required to fix Sepolia after fusaka hard fork.

Description

Sepolia got broken because the fusaka hard fork introduced a protocol level cap on tx gas limit which currently is being set to the block gas limit (which is too high).

Changes

Make tx gas limit configurable in the driver, preserving the old behaviour (of taking block gas limit) if it is not specified.

  • Add tx_gas_limit command line argument (env: TX_GAS_LIMIT)

How to test

  1. Configure limit to 2^24 - 1 and test if transactions can be made on Sepolia

Related Issues

Fixes #3777

Required to fix Sepolia after fusaka hard fork.
@m-sz m-sz requested a review from a team as a code owner October 15, 2025 17:39
Copy link
Copy Markdown
Contributor

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

nit, but it's g2g due to the urgency IMO

Comment thread crates/driver/src/infra/cli.rs Outdated
Comment on lines +51 to +52
/// Transaction gas limit
/// If not specified, uses current block's gas limit
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// Transaction gas limit
/// If not specified, uses current block's gas limit
/// Transaction gas limit.
/// If not specified, it uses current block's gas limit.

Comment thread crates/driver/src/infra/cli.rs Outdated
/// Transaction gas limit
/// If not specified, uses current block's gas limit
#[clap(long, env)]
pub tx_gas_limit: Option<U256>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we should be a bit more specific with the naming, since it is used only for the creation of access lists. Are there any other places where we set the gas limit in this crate and should we also switch to the same config param?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have checked the driver's source code and found no other instances where we specify the tx gas limit. It is only related to the creation of access lists.

squadgazzz
squadgazzz previously approved these changes Oct 16, 2025
Copy link
Copy Markdown
Contributor

@squadgazzz squadgazzz left a comment

Choose a reason for hiding this comment

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

LGTM. Shouldn't be merged until an infra PR is ready.

@squadgazzz squadgazzz dismissed their stale review October 16, 2025 15:03

Due to new changes

m-sz added a commit that referenced this pull request Oct 17, 2025
# Description
Required for tx gas configuration to be backwards compatible and
guarantee smooth deployment.

The infrastructure will be able to set tx gas limit per chain, but
unless this field is expected, the driver would just panic on parsing
the config.

This introduces the required field as an option, and does not do
anything with the value if set.
#3780 will actually make it
mandatory and work.
@squadgazzz squadgazzz merged commit b10a0c4 into main Oct 17, 2025
17 checks passed
@squadgazzz squadgazzz deleted the fix-transaction-encoding-on-fusaka branch October 17, 2025 15:20
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transaction encoding is incompatible with Fusaka hardfork

3 participants