Skip to content

Fix NethermindEth/nethermind#10068 regression#530

Merged
AnkushinDaniil merged 1 commit into
mainfrom
daniil/fix/consume-data-copy-gas
Jan 6, 2026
Merged

Fix NethermindEth/nethermind#10068 regression#530
AnkushinDaniil merged 1 commit into
mainfrom
daniil/fix/consume-data-copy-gas

Conversation

@AnkushinDaniil

@AnkushinDaniil AnkushinDaniil commented Jan 6, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI review requested due to automatic review settings January 6, 2026 12:19

Copilot AI left a comment

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.

Pull request overview

This PR fixes a regression by changing the ConsumeDataCopyGas method to allow gas to go negative instead of returning a boolean indicating insufficient gas. The change aligns with the "old Consume behavior" where negative gas is detected later in the VM execution rather than at the point of consumption.

Key Changes:

  • Modified ConsumeDataCopyGas to return void instead of bool and use Consume instead of UpdateGas
  • Updated tests to verify gas consumption and negative gas behavior instead of checking boolean return values
  • Updated the Nethermind subproject commit reference

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Nethermind.Arbitrum/Evm/ArbitrumGasPolicy.cs Changed ConsumeDataCopyGas method signature from returning bool to void, switched from UpdateGas to Consume for gas tracking
src/Nethermind.Arbitrum.Test/Evm/ArbitrumGasTests.cs Updated test cases to verify gas consumption amounts and negative gas behavior instead of boolean success values
src/Nethermind Updated subproject commit reference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AnkushinDaniil AnkushinDaniil force-pushed the daniil/fix/consume-data-copy-gas branch from 983b7f7 to 519f032 Compare January 6, 2026 12:25
@AnkushinDaniil AnkushinDaniil enabled auto-merge (squash) January 6, 2026 12:28
@github-actions

github-actions Bot commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Health
Nethermind.Arbitrum 81% 58%
Summary 81% (8896 / 11028) 58% (2230 / 3846)

Minimum allowed line rate is 60%

@AnkushinDaniil AnkushinDaniil merged commit e880757 into main Jan 6, 2026
5 checks passed
@AnkushinDaniil AnkushinDaniil deleted the daniil/fix/consume-data-copy-gas branch January 6, 2026 12:49
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.

4 participants