|
4 | 4 |
|
5 | 5 | pragma solidity >=0.4.21 <0.9.0; |
6 | 6 |
|
| 7 | +import {ArbMultiGasConstraintsTypes} from "./ArbMultiGasConstraintsTypes.sol"; |
| 8 | + |
7 | 9 | /** |
8 | 10 | * @title Provides owners with tools for managing the rollup. |
9 | 11 | * @notice Calls by non-owners will always revert. |
@@ -302,6 +304,31 @@ interface ArbOwner { |
302 | 304 | uint64[3][] calldata constraints |
303 | 305 | ) external; |
304 | 306 |
|
| 307 | + /// @notice Sets the list of multi-gas pricing constraints for the multi-dimensional multi-constraint pricing model. |
| 308 | + /// @notice Replaces the existing configuration and initializes each constraint’s starting backlog value. |
| 309 | + /// @notice Any previous multi-gas constraints are discarded. |
| 310 | + /// |
| 311 | + /// @notice This method defines both the target throughput and relative weights |
| 312 | + /// @notice of each resource kind participating in multi-dimensional gas pricing. |
| 313 | + /// @notice Each constraint may specify multiple resources with different weight multipliers. |
| 314 | + /// @notice The final base fee is determined by the most congested resource dimension. |
| 315 | + /// |
| 316 | + /// @notice Model selection: |
| 317 | + /// @notice - If one or more multi-gas constraints are provided, ArbOS switches to the multi-dimensional |
| 318 | + /// @notice pricing model and uses exactly the provided parameters. |
| 319 | + /// @notice - If zero constraints are provided, the chain reverts to the previous pricing model |
| 320 | + /// @notice (either the single-constraint or single-dimensional multi-constraint configuration). |
| 321 | + /// |
| 322 | + /// @notice Available in ArbOS version 60 and above. |
| 323 | + /// @param constraints Array of `ResourceConstraint` structs, each containing: |
| 324 | + /// - `resources`: list of (resource kind, weight) pairs (see the ArbMultiGasConstraintsTypes library for definitions) |
| 325 | + /// - `adjustmentWindowSecs`: time window (seconds) over which the price rises by a factor of e if demand is 2x the target (uint64, seconds) |
| 326 | + /// - `targetPerSec`: target gas usage per second for this constraint (uint64, gas/sec) |
| 327 | + /// - `backlog`: initial backlog value for this constraint (uint64, gas units) |
| 328 | + function setMultiGasPricingConstraints( |
| 329 | + ArbMultiGasConstraintsTypes.ResourceConstraint[] calldata constraints |
| 330 | + ) external; |
| 331 | + |
305 | 332 | /// Emitted when a successful call is made to this precompile |
306 | 333 | event OwnerActs(bytes4 indexed method, address indexed owner, bytes data); |
307 | 334 | } |
0 commit comments