Skip to content

Conversation

MishkaRogachev
Copy link

@MishkaRogachev MishkaRogachev commented Oct 16, 2025

Part of NIT-4021

Add Multi-Constraint Pricer methods:

  • Add getGasPricingConstraints to ArbGasInfo to fetch constraints as an array of triples (gas_target_per_second, time_constant_seconds, backlog)
  • Add setGasPricingConstraints to ArbOwner to set constraints as an array of pairs (gas target, time constraint)
  • Mark unused methods for Multi-Constraint Price as deprecated
  • Update formatting to satisfy foundry formatter on CI

function getPricesInArbGas() external view returns (uint256, uint256, uint256);

/// @notice Get the gas accounting parameters. `gasPoolMax` is always zero, as the exponential pricing model has no such notion.
/// @return (speedLimitPerSecond, gasPoolMax, maxBlockGasLimit)

Choose a reason for hiding this comment

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

What about the other two values gasPoolMax, maxBlockGasLimit, should we add methods for them?

Copy link
Author

Choose a reason for hiding this comment

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

I assume that for the new model all these fields should be zeros. If confirmed, I'll update the comment

Choose a reason for hiding this comment

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

See OffchainLabs/nitro#3860 (comment)

I think we should have another method that returns just the maxBlockGasLimit.

    /// @notice Get the maxBlockGasLimit
    /// @notice Available in ArbOS version 50 and above
    function getMaxBlockGasLimit() external view returns (uint256);

@MishkaRogachev MishkaRogachev force-pushed the add-precompiles-for-multi-constraint-pricer branch from 7b1e927 to 96ed82d Compare October 17, 2025 14:19
@MishkaRogachev MishkaRogachev assigned eljobe and unassigned gligneul Oct 17, 2025
@MishkaRogachev MishkaRogachev assigned gligneul and unassigned eljobe Oct 17, 2025
@gligneul gligneul assigned eljobe and unassigned gligneul Oct 17, 2025
function getPricesInArbGas() external view returns (uint256, uint256, uint256);

/// @notice Get the gas accounting parameters. `gasPoolMax` is always zero, as the exponential pricing model has no such notion.
/// @return (speedLimitPerSecond, gasPoolMax, maxBlockGasLimit)

Choose a reason for hiding this comment

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

See OffchainLabs/nitro#3860 (comment)

I think we should have another method that returns just the maxBlockGasLimit.

    /// @notice Get the maxBlockGasLimit
    /// @notice Available in ArbOS version 50 and above
    function getMaxBlockGasLimit() external view returns (uint256);

@gligneul gligneul assigned MishkaRogachev and unassigned eljobe Oct 17, 2025
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.

3 participants