Skip to content

Separate Gas Prices#415

Merged
svlachakis merged 11 commits into
mainfrom
402-separate-gas-prices
Nov 21, 2025
Merged

Separate Gas Prices#415
svlachakis merged 11 commits into
mainfrom
402-separate-gas-prices

Conversation

@svlachakis

@svlachakis svlachakis commented Nov 20, 2025

Copy link
Copy Markdown
Collaborator

Fixes Closes #402

@wurdum wurdum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well done!

@damian-orzechowski damian-orzechowski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tests use different price for refund, but the issues mentions incorrect gas price used by Stylus programs. In which cases will there be a difference ? Is it worth to add a test for that?

@wurdum

wurdum commented Nov 20, 2025

Copy link
Copy Markdown
Collaborator

Tests use different price for refund, but the issues mentions incorrect gas price used by Stylus programs. In which cases will there be a difference ? Is it worth to add a test for that?

I've checked the test Stavros added, and it properly fails when opcodeGasPrice is not fixed.
The issue was identified by seeing the diff in passed EvmData to Stylus between Nitro and Nethermind https://github.com/NethermindEth/nethermind-arbitrum/blob/main/src/Nethermind.Arbitrum/Arbos/Programs/StylusPrograms.cs#L186

Theoretically, we can add test triggering this through Stylus contract, and this VM hook, and call to SDK method... gonna be fun

@svlachakis

Copy link
Copy Markdown
Collaborator Author

@damian-orzechowski I think the test I added adds sufficient test coverage for this and fails when opcodeGasPrice is not fixed.

This test verifies the dual gas price behavior

  • EVM context (Stylus programs) sees originalGasPrice (1500 = base 1000 + tip 500) via the GASPRICE opcode
  • Payment/refund uses baseFeePerGas only (1000) after tip is dropped

Do you think we should add more testing around it?

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Health
Nethermind.Arbitrum 80% 55%
Summary 80% (7549 / 9471) 55% (1733 / 3149)

Minimum allowed line rate is 60%

@damian-orzechowski

Copy link
Copy Markdown
Collaborator

@damian-orzechowski I think the test I added adds sufficient test coverage for this and fails when opcodeGasPrice is not fixed.

This test verifies the dual gas price behavior

  • EVM context (Stylus programs) sees originalGasPrice (1500 = base 1000 + tip 500) via the GASPRICE opcode
  • Payment/refund uses baseFeePerGas only (1000) after tip is dropped

Do you think we should add more testing around it?

Ok - let's merge then

@svlachakis svlachakis merged commit 68f3972 into main Nov 21, 2025
5 checks passed
@svlachakis svlachakis deleted the 402-separate-gas-prices branch November 21, 2025 08:53
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.

Nitro has two separate gas prices and Nethermind only one (sepolia sync)

3 participants