Skip to content

feat: add ArbOS 50 multi-constraint gas pricing support#497

Merged
AnkushinDaniil merged 8 commits into
mainfrom
daniil/feat/arbos50-multiconstraint-pricing
Jan 1, 2026
Merged

feat: add ArbOS 50 multi-constraint gas pricing support#497
AnkushinDaniil merged 8 commits into
mainfrom
daniil/feat/arbos50-multiconstraint-pricing

Conversation

@AnkushinDaniil

@AnkushinDaniil AnkushinDaniil commented Dec 24, 2025

Copy link
Copy Markdown
Collaborator

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 implements ArbOS 50/51 multi-constraint gas pricing support, adding a new gas pricing model that allows multiple constraints to be configured simultaneously while maintaining backward compatibility with the single-constraint legacy model.

Key changes:

  • Adds new precompile methods setGasBacklog and setGasPricingConstraints for managing gas pricing
  • Implements multi-constraint gas pricing algorithm that sums exponents from multiple constraints
  • Updates ArbOS version from 50 to 51 in the system test chainspec

Reviewed changes

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

Show a summary per file
File Description
arbitrum-system-test.json Updates initialArbOSVersion to 51 and adjusts mixHash
ArbOwnerParser.cs Adds parser methods for new gas pricing precompile functions
ArbOwner.cs Implements SetGasBacklog and SetGasPricingConstraints methods with validation
ArbitrumGenesisLoader.cs Initializes NativeTokenOwnerSubspace storage during genesis
SubStorageVector.cs Adds Pop() method for removing last sub-storage element
L2PricingState.cs Implements routing between legacy and multi-constraint pricing models
L1PricingState.cs Adds CurrentArbosVersion property
GasConstraint.cs Adds Clear() method for constraint cleanup
ArbosVersion.cs Adds FiftyOne constant and MultiConstraintPricing alias
ArbosState.cs Propagates ArbOS version to pricing states and handles v51 upgrade
ArbOwnerParserTests.cs Tests for new setGasPricingConstraints precompile
ArbosStateTestExtensions.cs Updates CurrentArbosVersion setter to include pricing states
SubStorageVectorTests.cs Comprehensive tests for SubStorageVector Pop() method
L2PricingStateTests.cs Tests for multi-constraint pricing model behavior
Nethermind Updates subproject commit reference

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

Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Precompiles/ArbOwner.cs
@AnkushinDaniil AnkushinDaniil force-pushed the daniil/feat/arbos50-multiconstraint-pricing branch 2 times, most recently from 2935a81 to da04da8 Compare December 25, 2025 12:22
@AnkushinDaniil AnkushinDaniil marked this pull request as draft December 25, 2025 13:59
@AnkushinDaniil AnkushinDaniil force-pushed the daniil/feat/arbos50-multiconstraint-pricing branch from 45f515b to ec14e0c Compare December 25, 2025 14:04
@AnkushinDaniil AnkushinDaniil marked this pull request as ready for review December 27, 2025 13:31
@AnkushinDaniil AnkushinDaniil force-pushed the daniil/feat/arbos50-multiconstraint-pricing branch from ec14e0c to 3686af2 Compare December 27, 2025 15:54
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L1PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/ArbosState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Precompiles/ArbOwner.cs Outdated
@AnkushinDaniil AnkushinDaniil force-pushed the daniil/feat/arbos50-multiconstraint-pricing branch from 3686af2 to 03d6e82 Compare December 31, 2025 12:08
@AnkushinDaniil AnkushinDaniil enabled auto-merge (squash) December 31, 2025 12:13
Comment thread src/Nethermind.Arbitrum/Execution/ArbitrumBlockProcessor.cs
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Precompiles/Parser/ArbOwnerParser.cs
Comment thread src/Nethermind.Arbitrum/Genesis/ArbitrumGenesisLoader.cs
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L1PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Precompiles/ArbOwner.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
Comment thread src/Nethermind.Arbitrum/Arbos/Storage/L2PricingState.cs Outdated
@AnkushinDaniil AnkushinDaniil force-pushed the daniil/feat/arbos50-multiconstraint-pricing branch from 03d6e82 to 9ec67e8 Compare January 1, 2026 10:18
@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Health
Nethermind.Arbitrum 80% 57%
Summary 80% (8333 / 10373) 57% (2014 / 3522)

Minimum allowed line rate is 60%

@AnkushinDaniil AnkushinDaniil merged commit 474823d into main Jan 1, 2026
5 checks passed
@AnkushinDaniil AnkushinDaniil deleted the daniil/feat/arbos50-multiconstraint-pricing branch January 1, 2026 10:24
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.

6 participants