@arbitrum/nitro-contracts 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/contracts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
  4. package/build/contracts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
  5. package/build/contracts/@openzeppelin/contracts/access/AccessControlEnumerable.sol/AccessControlEnumerable.dbg.json +4 -0
  6. package/build/contracts/@openzeppelin/contracts/access/AccessControlEnumerable.sol/AccessControlEnumerable.json +258 -0
  7. package/build/contracts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
  8. package/build/contracts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +183 -0
  9. package/build/contracts/@openzeppelin/contracts/access/IAccessControlEnumerable.sol/IAccessControlEnumerable.dbg.json +4 -0
  10. package/build/contracts/@openzeppelin/contracts/access/IAccessControlEnumerable.sol/IAccessControlEnumerable.json +226 -0
  11. package/build/contracts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +1 -1
  12. package/build/contracts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +1 -1
  13. package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
  14. package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +2 -2
  15. package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +1 -1
  16. package/build/contracts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +1 -1
  17. package/build/contracts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +1 -1
  18. package/build/contracts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.dbg.json +1 -1
  19. package/build/contracts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +2 -2
  20. package/build/contracts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.dbg.json +1 -1
  21. package/build/contracts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +2 -2
  22. package/build/contracts/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol/UUPSUpgradeable.dbg.json +1 -1
  23. package/build/contracts/@openzeppelin/contracts/security/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +1 -1
  24. package/build/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
  25. package/build/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +2 -2
  26. package/build/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
  27. package/build/contracts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
  28. package/build/contracts/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.dbg.json +1 -1
  29. package/build/contracts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.dbg.json +1 -1
  30. package/build/contracts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.json +2 -2
  31. package/build/contracts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +1 -1
  32. package/build/contracts/@openzeppelin/contracts/utils/Address.sol/Address.json +2 -2
  33. package/build/contracts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
  34. package/build/contracts/@openzeppelin/contracts/utils/Create2.sol/Create2.dbg.json +1 -1
  35. package/build/contracts/@openzeppelin/contracts/utils/Create2.sol/Create2.json +2 -2
  36. package/build/contracts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +1 -1
  37. package/build/contracts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +2 -2
  38. package/build/contracts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +1 -1
  39. package/build/contracts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +2 -2
  40. package/build/contracts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.dbg.json +1 -1
  41. package/build/contracts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json +2 -2
  42. package/build/contracts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
  43. package/build/contracts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
  44. package/build/contracts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
  45. package/build/contracts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
  46. package/build/contracts/@openzeppelin/contracts/utils/structs/EnumerableSet.sol/EnumerableSet.dbg.json +4 -0
  47. package/build/contracts/@openzeppelin/contracts/utils/structs/EnumerableSet.sol/EnumerableSet.json +10 -0
  48. package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol/AccessControlEnumerableUpgradeable.dbg.json +1 -1
  49. package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.dbg.json +1 -1
  50. package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol/IAccessControlEnumerableUpgradeable.dbg.json +1 -1
  51. package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol/IAccessControlUpgradeable.dbg.json +1 -1
  52. package/build/contracts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
  53. package/build/contracts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
  54. package/build/contracts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
  55. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.dbg.json +1 -1
  56. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.json +2 -2
  57. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +1 -1
  58. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol/ERC20BurnableUpgradeable.dbg.json +1 -1
  59. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol/IERC20MetadataUpgradeable.dbg.json +1 -1
  60. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
  61. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +2 -2
  62. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
  63. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol/Create2Upgradeable.dbg.json +1 -1
  64. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol/Create2Upgradeable.json +2 -2
  65. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol/StorageSlotUpgradeable.dbg.json +1 -1
  66. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol/StorageSlotUpgradeable.json +2 -2
  67. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol/StringsUpgradeable.dbg.json +1 -1
  68. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol/StringsUpgradeable.json +2 -2
  69. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol/ECDSAUpgradeable.dbg.json +1 -1
  70. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol/ECDSAUpgradeable.json +2 -2
  71. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol/EIP712Upgradeable.dbg.json +1 -1
  72. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.dbg.json +1 -1
  73. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.dbg.json +1 -1
  74. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.dbg.json +1 -1
  75. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.json +2 -2
  76. package/build/contracts/src/assertionStakingPool/AbsBoldStakingPool.sol/AbsBoldStakingPool.dbg.json +1 -1
  77. package/build/contracts/src/assertionStakingPool/AssertionStakingPool.sol/AssertionStakingPool.dbg.json +1 -1
  78. package/build/contracts/src/assertionStakingPool/AssertionStakingPool.sol/AssertionStakingPool.json +2 -2
  79. package/build/contracts/src/assertionStakingPool/AssertionStakingPoolCreator.sol/AssertionStakingPoolCreator.dbg.json +1 -1
  80. package/build/contracts/src/assertionStakingPool/AssertionStakingPoolCreator.sol/AssertionStakingPoolCreator.json +2 -2
  81. package/build/contracts/src/assertionStakingPool/EdgeStakingPool.sol/EdgeStakingPool.dbg.json +1 -1
  82. package/build/contracts/src/assertionStakingPool/EdgeStakingPool.sol/EdgeStakingPool.json +2 -2
  83. package/build/contracts/src/assertionStakingPool/EdgeStakingPoolCreator.sol/EdgeStakingPoolCreator.dbg.json +1 -1
  84. package/build/contracts/src/assertionStakingPool/EdgeStakingPoolCreator.sol/EdgeStakingPoolCreator.json +2 -2
  85. package/build/contracts/src/assertionStakingPool/StakingPoolCreatorUtils.sol/StakingPoolCreatorUtils.dbg.json +1 -1
  86. package/build/contracts/src/assertionStakingPool/StakingPoolCreatorUtils.sol/StakingPoolCreatorUtils.json +2 -2
  87. package/build/contracts/src/assertionStakingPool/interfaces/IAbsBoldStakingPool.sol/IAbsBoldStakingPool.dbg.json +1 -1
  88. package/build/contracts/src/assertionStakingPool/interfaces/IAssertionStakingPool.sol/IAssertionStakingPool.dbg.json +1 -1
  89. package/build/contracts/src/assertionStakingPool/interfaces/IAssertionStakingPoolCreator.sol/IAssertionStakingPoolCreator.dbg.json +1 -1
  90. package/build/contracts/src/assertionStakingPool/interfaces/IEdgeStakingPool.sol/IEdgeStakingPool.dbg.json +1 -1
  91. package/build/contracts/src/assertionStakingPool/interfaces/IEdgeStakingPoolCreator.sol/IEdgeStakingPoolCreator.dbg.json +1 -1
  92. package/build/contracts/src/bridge/AbsBridge.sol/AbsBridge.dbg.json +1 -1
  93. package/build/contracts/src/bridge/AbsInbox.sol/AbsInbox.dbg.json +1 -1
  94. package/build/contracts/src/bridge/AbsOutbox.sol/AbsOutbox.dbg.json +1 -1
  95. package/build/contracts/src/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  96. package/build/contracts/src/bridge/Bridge.sol/Bridge.json +2 -2
  97. package/build/contracts/src/bridge/DelayBuffer.sol/DelayBuffer.dbg.json +1 -1
  98. package/build/contracts/src/bridge/DelayBuffer.sol/DelayBuffer.json +2 -2
  99. package/build/contracts/src/bridge/ERC20Bridge.sol/ERC20Bridge.dbg.json +1 -1
  100. package/build/contracts/src/bridge/ERC20Bridge.sol/ERC20Bridge.json +2 -2
  101. package/build/contracts/src/bridge/ERC20Inbox.sol/ERC20Inbox.dbg.json +1 -1
  102. package/build/contracts/src/bridge/ERC20Inbox.sol/ERC20Inbox.json +2 -2
  103. package/build/contracts/src/bridge/ERC20Outbox.sol/ERC20Outbox.dbg.json +1 -1
  104. package/build/contracts/src/bridge/ERC20Outbox.sol/ERC20Outbox.json +2 -2
  105. package/build/contracts/src/bridge/GasRefunder.sol/GasRefunder.dbg.json +1 -1
  106. package/build/contracts/src/bridge/GasRefunder.sol/GasRefunder.json +2 -2
  107. package/build/contracts/src/bridge/IBridge.sol/IBridge.dbg.json +1 -1
  108. package/build/contracts/src/bridge/IDelayedMessageProvider.sol/IDelayedMessageProvider.dbg.json +1 -1
  109. package/build/contracts/src/bridge/IERC20Bridge.sol/IERC20Bridge.dbg.json +1 -1
  110. package/build/contracts/src/bridge/IERC20Inbox.sol/IERC20Inbox.dbg.json +1 -1
  111. package/build/contracts/src/bridge/IEthBridge.sol/IEthBridge.dbg.json +1 -1
  112. package/build/contracts/src/bridge/IInbox.sol/IInbox.dbg.json +1 -1
  113. package/build/contracts/src/bridge/IInboxBase.sol/IInboxBase.dbg.json +1 -1
  114. package/build/contracts/src/bridge/IOutbox.sol/IOutbox.dbg.json +1 -1
  115. package/build/contracts/src/bridge/IOwnable.sol/IOwnable.dbg.json +1 -1
  116. package/build/contracts/src/bridge/ISequencerInbox.sol/IFeeTokenPricer.dbg.json +1 -1
  117. package/build/contracts/src/bridge/ISequencerInbox.sol/ISequencerInbox.dbg.json +1 -1
  118. package/build/contracts/src/bridge/ISequencerInbox.sol/ISequencerInbox.json +13 -0
  119. package/build/contracts/src/bridge/Inbox.sol/Inbox.dbg.json +1 -1
  120. package/build/contracts/src/bridge/Inbox.sol/Inbox.json +2 -2
  121. package/build/contracts/src/bridge/Messages.sol/Messages.dbg.json +1 -1
  122. package/build/contracts/src/bridge/Messages.sol/Messages.json +2 -2
  123. package/build/contracts/src/bridge/Outbox.sol/Outbox.dbg.json +1 -1
  124. package/build/contracts/src/bridge/Outbox.sol/Outbox.json +2 -2
  125. package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.dbg.json +1 -1
  126. package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.json +15 -2
  127. package/build/contracts/src/bridge/extra/ERC20MigrationOutbox.sol/ERC20MigrationOutbox.dbg.json +1 -1
  128. package/build/contracts/src/bridge/extra/ERC20MigrationOutbox.sol/ERC20MigrationOutbox.json +2 -2
  129. package/build/contracts/src/bridge/extra/IERC20MigrationOutbox.sol/IERC20MigrationOutbox.dbg.json +1 -1
  130. package/build/contracts/src/chain/CacheManager.sol/CacheManager.dbg.json +1 -1
  131. package/build/contracts/src/chain/CacheManager.sol/CacheManager.json +2 -2
  132. package/build/contracts/src/chain/ResourceConstraintManager.sol/ResourceConstraintManager.dbg.json +4 -0
  133. package/build/contracts/src/chain/ResourceConstraintManager.sol/ResourceConstraintManager.json +388 -0
  134. package/build/contracts/src/challengeV2/EdgeChallengeManager.sol/EdgeChallengeManager.dbg.json +1 -1
  135. package/build/contracts/src/challengeV2/EdgeChallengeManager.sol/EdgeChallengeManager.json +2 -2
  136. package/build/contracts/src/challengeV2/IAssertionChain.sol/IAssertionChain.dbg.json +1 -1
  137. package/build/contracts/src/challengeV2/IEdgeChallengeManager.sol/IEdgeChallengeManager.dbg.json +1 -1
  138. package/build/contracts/src/challengeV2/libraries/ArrayUtilsLib.sol/ArrayUtilsLib.dbg.json +1 -1
  139. package/build/contracts/src/challengeV2/libraries/ArrayUtilsLib.sol/ArrayUtilsLib.json +2 -2
  140. package/build/contracts/src/challengeV2/libraries/ChallengeEdgeLib.sol/ChallengeEdgeLib.dbg.json +1 -1
  141. package/build/contracts/src/challengeV2/libraries/ChallengeEdgeLib.sol/ChallengeEdgeLib.json +2 -2
  142. package/build/contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol/EdgeChallengeManagerLib.dbg.json +1 -1
  143. package/build/contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol/EdgeChallengeManagerLib.json +2 -2
  144. package/build/contracts/src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol/MerkleTreeAccumulatorLib.dbg.json +1 -1
  145. package/build/contracts/src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol/MerkleTreeAccumulatorLib.json +2 -2
  146. package/build/contracts/src/challengeV2/libraries/UintUtilsLib.sol/UintUtilsLib.dbg.json +1 -1
  147. package/build/contracts/src/challengeV2/libraries/UintUtilsLib.sol/UintUtilsLib.json +2 -2
  148. package/build/contracts/src/express-lane-auction/Balance.sol/BalanceLib.dbg.json +1 -1
  149. package/build/contracts/src/express-lane-auction/Balance.sol/BalanceLib.json +2 -2
  150. package/build/contracts/src/express-lane-auction/Burner.sol/Burner.dbg.json +1 -1
  151. package/build/contracts/src/express-lane-auction/Burner.sol/Burner.json +2 -2
  152. package/build/contracts/src/express-lane-auction/ELCRound.sol/LatestELCRoundsLib.dbg.json +1 -1
  153. package/build/contracts/src/express-lane-auction/ELCRound.sol/LatestELCRoundsLib.json +2 -2
  154. package/build/contracts/src/express-lane-auction/ExpressLaneAuction.sol/ExpressLaneAuction.dbg.json +1 -1
  155. package/build/contracts/src/express-lane-auction/ExpressLaneAuction.sol/ExpressLaneAuction.json +2 -2
  156. package/build/contracts/src/express-lane-auction/IExpressLaneAuction.sol/IExpressLaneAuction.dbg.json +1 -1
  157. package/build/contracts/src/express-lane-auction/RoundTimingInfo.sol/RoundTimingInfoLib.dbg.json +1 -1
  158. package/build/contracts/src/express-lane-auction/RoundTimingInfo.sol/RoundTimingInfoLib.json +2 -2
  159. package/build/contracts/src/libraries/AddressAliasHelper.sol/AddressAliasHelper.dbg.json +1 -1
  160. package/build/contracts/src/libraries/AddressAliasHelper.sol/AddressAliasHelper.json +2 -2
  161. package/build/contracts/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy.dbg.json +1 -1
  162. package/build/contracts/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy.json +2 -2
  163. package/build/contracts/src/libraries/AdminFallbackProxy.sol/DoubleLogicERC1967Upgrade.dbg.json +1 -1
  164. package/build/contracts/src/libraries/ArbitrumChecker.sol/ArbitrumChecker.dbg.json +1 -1
  165. package/build/contracts/src/libraries/ArbitrumChecker.sol/ArbitrumChecker.json +2 -2
  166. package/build/contracts/src/libraries/CallerChecker.sol/CallerChecker.dbg.json +1 -1
  167. package/build/contracts/src/libraries/CallerChecker.sol/CallerChecker.json +2 -2
  168. package/build/contracts/src/libraries/CryptographyPrimitives.sol/CryptographyPrimitives.dbg.json +1 -1
  169. package/build/contracts/src/libraries/CryptographyPrimitives.sol/CryptographyPrimitives.json +2 -2
  170. package/build/contracts/src/libraries/DecimalsConverterHelper.sol/DecimalsConverterHelper.dbg.json +1 -1
  171. package/build/contracts/src/libraries/DecimalsConverterHelper.sol/DecimalsConverterHelper.json +2 -2
  172. package/build/contracts/src/libraries/DelegateCallAware.sol/DelegateCallAware.dbg.json +1 -1
  173. package/build/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol/DoubleLogicUUPSUpgradeable.dbg.json +1 -1
  174. package/build/contracts/src/libraries/GasRefundEnabled.sol/GasRefundEnabled.dbg.json +1 -1
  175. package/build/contracts/src/libraries/IGasRefunder.sol/IGasRefunder.dbg.json +1 -1
  176. package/build/contracts/src/libraries/IReader4844.sol/IReader4844.dbg.json +1 -1
  177. package/build/contracts/src/libraries/MerkleLib.sol/MerkleLib.dbg.json +1 -1
  178. package/build/contracts/src/libraries/MerkleLib.sol/MerkleLib.json +2 -2
  179. package/build/contracts/src/libraries/UUPSNotUpgradeable.sol/UUPSNotUpgradeable.dbg.json +1 -1
  180. package/build/contracts/src/mocks/BridgeStub.sol/BridgeStub.dbg.json +1 -1
  181. package/build/contracts/src/mocks/BridgeStub.sol/BridgeStub.json +2 -2
  182. package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.dbg.json +1 -1
  183. package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.json +2 -2
  184. package/build/contracts/src/mocks/InboxStub.sol/InboxStub.dbg.json +1 -1
  185. package/build/contracts/src/mocks/InboxStub.sol/InboxStub.json +2 -2
  186. package/build/contracts/src/mocks/MerkleTreeAccess.sol/MerkleTreeAccess.dbg.json +1 -1
  187. package/build/contracts/src/mocks/MerkleTreeAccess.sol/MerkleTreeAccess.json +2 -2
  188. package/build/contracts/src/mocks/MockRollupEventInbox.sol/MockRollupEventInbox.dbg.json +1 -1
  189. package/build/contracts/src/mocks/MockRollupEventInbox.sol/MockRollupEventInbox.json +7 -2
  190. package/build/contracts/src/mocks/SequencerInboxBlobMock.sol/SequencerInboxBlobMock.dbg.json +1 -1
  191. package/build/contracts/src/mocks/SequencerInboxBlobMock.sol/SequencerInboxBlobMock.json +15 -2
  192. package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.dbg.json +1 -1
  193. package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.json +15 -2
  194. package/build/contracts/src/mocks/SimpleOneStepProofEntry.sol/SimpleOneStepProofEntry.dbg.json +1 -1
  195. package/build/contracts/src/mocks/SimpleOneStepProofEntry.sol/SimpleOneStepProofEntry.json +2 -2
  196. package/build/contracts/src/mocks/TestWETH9.sol/IWETH9.dbg.json +1 -1
  197. package/build/contracts/src/mocks/TestWETH9.sol/TestWETH9.dbg.json +1 -1
  198. package/build/contracts/src/mocks/TestWETH9.sol/TestWETH9.json +2 -2
  199. package/build/contracts/src/mocks/UpgradeExecutorMock.sol/UpgradeExecutorMock.dbg.json +1 -1
  200. package/build/contracts/src/mocks/UpgradeExecutorMock.sol/UpgradeExecutorMock.json +2 -2
  201. package/build/contracts/src/node-interface/NodeInterface.sol/NodeInterface.dbg.json +1 -1
  202. package/build/contracts/src/node-interface/NodeInterfaceDebug.sol/NodeInterfaceDebug.dbg.json +1 -1
  203. package/build/contracts/src/osp/HashProofHelper.sol/HashProofHelper.dbg.json +1 -1
  204. package/build/contracts/src/osp/HashProofHelper.sol/HashProofHelper.json +2 -2
  205. package/build/contracts/src/osp/ICustomDAProofValidator.sol/ICustomDAProofValidator.dbg.json +4 -0
  206. package/build/contracts/src/osp/ICustomDAProofValidator.sol/ICustomDAProofValidator.json +59 -0
  207. package/build/contracts/src/osp/IOneStepProofEntry.sol/IOneStepProofEntry.dbg.json +1 -1
  208. package/build/contracts/src/osp/IOneStepProofEntry.sol/OneStepProofEntryLib.dbg.json +1 -1
  209. package/build/contracts/src/osp/IOneStepProofEntry.sol/OneStepProofEntryLib.json +2 -2
  210. package/build/contracts/src/osp/IOneStepProver.sol/IOneStepProver.dbg.json +1 -1
  211. package/build/contracts/src/osp/OneStepProofEntry.sol/OneStepProofEntry.dbg.json +1 -1
  212. package/build/contracts/src/osp/OneStepProofEntry.sol/OneStepProofEntry.json +2 -2
  213. package/build/contracts/src/osp/OneStepProver0.sol/OneStepProver0.dbg.json +1 -1
  214. package/build/contracts/src/osp/OneStepProver0.sol/OneStepProver0.json +2 -2
  215. package/build/contracts/src/osp/OneStepProverHostIo.sol/OneStepProverHostIo.dbg.json +1 -1
  216. package/build/contracts/src/osp/OneStepProverHostIo.sol/OneStepProverHostIo.json +26 -2
  217. package/build/contracts/src/osp/OneStepProverMath.sol/OneStepProverMath.dbg.json +1 -1
  218. package/build/contracts/src/osp/OneStepProverMath.sol/OneStepProverMath.json +2 -2
  219. package/build/contracts/src/osp/OneStepProverMemory.sol/OneStepProverMemory.dbg.json +1 -1
  220. package/build/contracts/src/osp/OneStepProverMemory.sol/OneStepProverMemory.json +2 -2
  221. package/build/contracts/src/precompiles/ArbAddressTable.sol/ArbAddressTable.dbg.json +1 -1
  222. package/build/contracts/src/precompiles/ArbAggregator.sol/ArbAggregator.dbg.json +1 -1
  223. package/build/contracts/src/precompiles/ArbBLS.sol/ArbBLS.dbg.json +1 -1
  224. package/build/contracts/src/precompiles/ArbDebug.sol/ArbDebug.dbg.json +1 -1
  225. package/build/contracts/src/precompiles/ArbDebug.sol/ArbDebug.json +24 -0
  226. package/build/contracts/src/precompiles/ArbFunctionTable.sol/ArbFunctionTable.dbg.json +1 -1
  227. package/build/contracts/src/precompiles/ArbGasInfo.sol/ArbGasInfo.dbg.json +1 -1
  228. package/build/contracts/src/precompiles/ArbGasInfo.sol/ArbGasInfo.json +39 -0
  229. package/build/contracts/src/precompiles/ArbInfo.sol/ArbInfo.dbg.json +1 -1
  230. package/build/contracts/src/precompiles/ArbNativeTokenManager.sol/ArbNativeTokenManager.dbg.json +1 -1
  231. package/build/contracts/src/precompiles/ArbOwner.sol/ArbOwner.dbg.json +1 -1
  232. package/build/contracts/src/precompiles/ArbOwner.sol/ArbOwner.json +52 -0
  233. package/build/contracts/src/precompiles/ArbOwnerPublic.sol/ArbOwnerPublic.dbg.json +1 -1
  234. package/build/contracts/src/precompiles/ArbOwnerPublic.sol/ArbOwnerPublic.json +26 -0
  235. package/build/contracts/src/precompiles/ArbRetryableTx.sol/ArbRetryableTx.dbg.json +1 -1
  236. package/build/contracts/src/precompiles/ArbStatistics.sol/ArbStatistics.dbg.json +1 -1
  237. package/build/contracts/src/precompiles/ArbSys.sol/ArbSys.dbg.json +1 -1
  238. package/build/contracts/src/precompiles/ArbWasm.sol/ArbWasm.dbg.json +1 -1
  239. package/build/contracts/src/precompiles/ArbWasmCache.sol/ArbWasmCache.dbg.json +1 -1
  240. package/build/contracts/src/precompiles/ArbosActs.sol/ArbosActs.dbg.json +1 -1
  241. package/build/contracts/src/precompiles/ArbosActs.sol/ArbosActs.json +43 -0
  242. package/build/contracts/src/precompiles/ArbosTest.sol/ArbosTest.dbg.json +1 -1
  243. package/build/contracts/src/rollup/AbsRollupEventInbox.sol/AbsRollupEventInbox.dbg.json +1 -1
  244. package/build/contracts/src/rollup/AbsRollupEventInbox.sol/AbsRollupEventInbox.json +5 -0
  245. package/build/contracts/src/rollup/Assertion.sol/AssertionNodeLib.dbg.json +1 -1
  246. package/build/contracts/src/rollup/Assertion.sol/AssertionNodeLib.json +2 -2
  247. package/build/contracts/src/rollup/AssertionState.sol/AssertionStateLib.dbg.json +1 -1
  248. package/build/contracts/src/rollup/AssertionState.sol/AssertionStateLib.json +2 -2
  249. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/BOLDUpgradeAction.dbg.json +1 -1
  250. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/BOLDUpgradeAction.json +2 -2
  251. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/ConstantArrayStorage.dbg.json +1 -1
  252. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/ConstantArrayStorage.json +2 -2
  253. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/IOldRollup.dbg.json +1 -1
  254. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/IOldRollupAdmin.dbg.json +1 -1
  255. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/ISeqInboxPostUpgradeInit.dbg.json +1 -1
  256. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/StateHashPreImageLookup.dbg.json +1 -1
  257. package/build/contracts/src/rollup/BOLDUpgradeAction.sol/StateHashPreImageLookup.json +2 -2
  258. package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.dbg.json +1 -1
  259. package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.json +2 -144
  260. package/build/contracts/src/rollup/DeployHelper.sol/DeployHelper.dbg.json +1 -1
  261. package/build/contracts/src/rollup/DeployHelper.sol/DeployHelper.json +2 -2
  262. package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.dbg.json +1 -1
  263. package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.json +7 -2
  264. package/build/contracts/src/rollup/IRollupAdmin.sol/IRollupAdmin.dbg.json +1 -1
  265. package/build/contracts/src/rollup/IRollupAdmin.sol/IRollupAdmin.json +36 -13
  266. package/build/contracts/src/rollup/IRollupCore.sol/IRollupCore.dbg.json +1 -1
  267. package/build/contracts/src/rollup/IRollupEventInbox.sol/IRollupEventInbox.dbg.json +1 -1
  268. package/build/contracts/src/rollup/IRollupEventInbox.sol/IRollupEventInbox.json +5 -0
  269. package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUser.dbg.json +1 -1
  270. package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.dbg.json +1 -1
  271. package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.json +38 -15
  272. package/build/contracts/src/rollup/RollupCore.sol/RollupCore.dbg.json +1 -1
  273. package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.dbg.json +1 -1
  274. package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.json +59 -3
  275. package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.dbg.json +1 -1
  276. package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.json +7 -2
  277. package/build/contracts/src/rollup/RollupLib.sol/RollupLib.dbg.json +1 -1
  278. package/build/contracts/src/rollup/RollupLib.sol/RollupLib.json +2 -2
  279. package/build/contracts/src/rollup/RollupProxy.sol/RollupProxy.dbg.json +1 -1
  280. package/build/contracts/src/rollup/RollupProxy.sol/RollupProxy.json +7 -2
  281. package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.dbg.json +1 -1
  282. package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.json +2 -2
  283. package/build/contracts/src/rollup/ValidatorWallet.sol/ValidatorWallet.dbg.json +1 -1
  284. package/build/contracts/src/rollup/ValidatorWallet.sol/ValidatorWallet.json +2 -2
  285. package/build/contracts/src/rollup/ValidatorWalletCreator.sol/ValidatorWalletCreator.dbg.json +1 -1
  286. package/build/contracts/src/rollup/ValidatorWalletCreator.sol/ValidatorWalletCreator.json +2 -78
  287. package/build/contracts/src/state/Deserialize.sol/Deserialize.dbg.json +1 -1
  288. package/build/contracts/src/state/Deserialize.sol/Deserialize.json +2 -2
  289. package/build/contracts/src/state/GlobalState.sol/GlobalStateLib.dbg.json +1 -1
  290. package/build/contracts/src/state/GlobalState.sol/GlobalStateLib.json +2 -2
  291. package/build/contracts/src/state/Instructions.sol/Instructions.dbg.json +1 -1
  292. package/build/contracts/src/state/Instructions.sol/Instructions.json +2 -2
  293. package/build/contracts/src/state/Machine.sol/MachineLib.dbg.json +1 -1
  294. package/build/contracts/src/state/Machine.sol/MachineLib.json +2 -2
  295. package/build/contracts/src/state/MerkleProof.sol/MerkleProofLib.dbg.json +1 -1
  296. package/build/contracts/src/state/MerkleProof.sol/MerkleProofLib.json +2 -2
  297. package/build/contracts/src/state/Module.sol/ModuleLib.dbg.json +1 -1
  298. package/build/contracts/src/state/Module.sol/ModuleLib.json +2 -2
  299. package/build/contracts/src/state/ModuleMemory.sol/ModuleMemoryLib.dbg.json +1 -1
  300. package/build/contracts/src/state/ModuleMemory.sol/ModuleMemoryLib.json +2 -2
  301. package/build/contracts/src/state/ModuleMemoryCompact.sol/ModuleMemoryCompactLib.dbg.json +1 -1
  302. package/build/contracts/src/state/ModuleMemoryCompact.sol/ModuleMemoryCompactLib.json +2 -2
  303. package/build/contracts/src/state/MultiStack.sol/MultiStackLib.dbg.json +1 -1
  304. package/build/contracts/src/state/MultiStack.sol/MultiStackLib.json +2 -2
  305. package/build/contracts/src/state/PcArray.sol/PcArrayLib.dbg.json +1 -1
  306. package/build/contracts/src/state/PcArray.sol/PcArrayLib.json +2 -2
  307. package/build/contracts/src/state/StackFrame.sol/StackFrameLib.dbg.json +1 -1
  308. package/build/contracts/src/state/StackFrame.sol/StackFrameLib.json +2 -2
  309. package/build/contracts/src/state/Value.sol/ValueLib.dbg.json +1 -1
  310. package/build/contracts/src/state/Value.sol/ValueLib.json +2 -2
  311. package/build/contracts/src/state/ValueArray.sol/ValueArrayLib.dbg.json +1 -1
  312. package/build/contracts/src/state/ValueArray.sol/ValueArrayLib.json +2 -2
  313. package/build/contracts/src/state/ValueStack.sol/ValueStackLib.dbg.json +1 -1
  314. package/build/contracts/src/state/ValueStack.sol/ValueStackLib.json +2 -2
  315. package/build/contracts/src/stylus/StylusDeployer.sol/StylusDeployer.dbg.json +1 -1
  316. package/build/contracts/src/stylus/StylusDeployer.sol/StylusDeployer.json +2 -2
  317. package/build/contracts/src/test-helpers/BridgeTester.sol/BridgeTester.dbg.json +1 -1
  318. package/build/contracts/src/test-helpers/BridgeTester.sol/BridgeTester.json +2 -2
  319. package/build/contracts/src/test-helpers/CryptographyPrimitivesTester.sol/CryptographyPrimitivesTester.dbg.json +1 -1
  320. package/build/contracts/src/test-helpers/CryptographyPrimitivesTester.sol/CryptographyPrimitivesTester.json +2 -2
  321. package/build/contracts/src/test-helpers/EthVault.sol/EthVault.dbg.json +1 -1
  322. package/build/contracts/src/test-helpers/EthVault.sol/EthVault.json +2 -2
  323. package/build/contracts/src/test-helpers/MessageTester.sol/MessageTester.dbg.json +1 -1
  324. package/build/contracts/src/test-helpers/MessageTester.sol/MessageTester.json +2 -2
  325. package/build/contracts/src/test-helpers/NoReceiveForwarder.sol/ConstructorError.dbg.json +1 -1
  326. package/build/contracts/src/test-helpers/NoReceiveForwarder.sol/ConstructorError.json +1 -1
  327. package/build/contracts/src/test-helpers/NoReceiveForwarder.sol/ConstructorFine.dbg.json +1 -1
  328. package/build/contracts/src/test-helpers/NoReceiveForwarder.sol/ConstructorFine.json +2 -2
  329. package/build/contracts/src/test-helpers/NoReceiveForwarder.sol/NoReceiveForwarder.dbg.json +1 -1
  330. package/build/contracts/src/test-helpers/NoReceiveForwarder.sol/NoReceiveForwarder.json +2 -2
  331. package/build/contracts/src/test-helpers/NoReceiveForwarder.sol/ReceivingForwarder.dbg.json +1 -1
  332. package/build/contracts/src/test-helpers/NoReceiveForwarder.sol/ReceivingForwarder.json +2 -2
  333. package/build/contracts/src/test-helpers/OutboxWithoutOptTester.sol/OutboxWithoutOptTester.dbg.json +1 -1
  334. package/build/contracts/src/test-helpers/OutboxWithoutOptTester.sol/OutboxWithoutOptTester.json +2 -2
  335. package/build/contracts/src/test-helpers/RollupMock.sol/RollupMock.dbg.json +1 -1
  336. package/build/contracts/src/test-helpers/RollupMock.sol/RollupMock.json +2 -2
  337. package/build/contracts/src/test-helpers/TestToken.sol/TestToken.dbg.json +1 -1
  338. package/build/contracts/src/test-helpers/TestToken.sol/TestToken.json +2 -2
  339. package/build/contracts/src/test-helpers/ValueArrayTester.sol/ValueArrayTester.dbg.json +1 -1
  340. package/build/contracts/src/test-helpers/ValueArrayTester.sol/ValueArrayTester.json +2 -2
  341. package/out/yul/Reader4844.yul/Reader4844.json +1 -1
  342. package/package.json +6 -5
  343. package/src/bridge/ISequencerInbox.sol +5 -0
  344. package/src/bridge/SequencerInbox.sol +11 -3
  345. package/src/chain/ResourceConstraintManager.sol +88 -0
  346. package/src/mocks/BridgeStub.sol +5 -1
  347. package/src/mocks/MockRollupEventInbox.sol +10 -4
  348. package/src/osp/ICustomDAProofValidator.sol +43 -0
  349. package/src/osp/OneStepProofEntry.sol +2 -1
  350. package/src/osp/OneStepProver0.sol +2 -3
  351. package/src/osp/OneStepProverHostIo.sol +132 -12
  352. package/src/osp/OneStepProverMath.sol +2 -3
  353. package/src/osp/OneStepProverMemory.sol +2 -3
  354. package/src/precompiles/.github/workflows/contract-tests.yml +39 -0
  355. package/src/precompiles/ArbDebug.sol +7 -0
  356. package/src/precompiles/ArbGasInfo.sol +34 -8
  357. package/src/precompiles/ArbNativeTokenManager.sol +1 -1
  358. package/src/precompiles/ArbOwner.sol +73 -14
  359. package/src/precompiles/ArbOwnerPublic.sol +19 -13
  360. package/src/precompiles/ArbWasm.sol +1 -0
  361. package/src/precompiles/ArbWasmCache.sol +3 -0
  362. package/src/precompiles/ArbosActs.sol +10 -0
  363. package/src/precompiles/LICENSE.md +116 -0
  364. package/src/precompiles/README.md +11 -0
  365. package/src/precompiles/foundry.toml +20 -0
  366. package/src/precompiles/package.json +24 -0
  367. package/src/precompiles/yarn.lock +4 -0
  368. package/src/rollup/AbsRollupEventInbox.sol +8 -2
  369. package/src/rollup/BOLDUpgradeAction.sol +2 -2
  370. package/src/rollup/BridgeCreator.sol +2 -16
  371. package/src/rollup/Config.sol +2 -0
  372. package/src/rollup/IRollupAdmin.sol +15 -3
  373. package/src/rollup/IRollupEventInbox.sol +5 -1
  374. package/src/rollup/RollupAdminLogic.sol +68 -9
  375. package/src/rollup/RollupCore.sol +6 -1
  376. package/src/rollup/RollupCreator.sol +35 -6
  377. package/src/rollup/RollupUserLogic.sol +6 -0
  378. package/src/rollup/ValidatorWalletCreator.sol +2 -15
  379. package/src/state/Instructions.sol +1 -0
  380. package/build/contracts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +0 -4
  381. package/build/contracts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json +0 -113
  382. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/FactoryDeployerHelper.dbg.json +0 -4
  383. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/FactoryDeployerHelper.json +0 -68
  384. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IDeployHelper.dbg.json +0 -4
  385. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IDeployHelper.json +0 -58
  386. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IERC20.dbg.json +0 -4
  387. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IERC20.json +0 -40
  388. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IERC20Bridge.dbg.json +0 -4
  389. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IERC20Bridge.json +0 -24
  390. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IInboxBase.dbg.json +0 -4
  391. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IInboxBase.json +0 -24
  392. package/src/rollup/FactoryDeployerHelper.sol +0 -52
@@ -11,6 +11,7 @@ import "../state/MultiStack.sol";
11
11
  import "../state/Deserialize.sol";
12
12
  import "../state/ModuleMemory.sol";
13
13
  import "./IOneStepProver.sol";
14
+ import "./ICustomDAProofValidator.sol";
14
15
  import "../bridge/Messages.sol";
15
16
  import "../bridge/IBridge.sol";
16
17
 
@@ -29,6 +30,18 @@ contract OneStepProverHostIo is IOneStepProver {
29
30
  uint64 private constant INBOX_HEADER_LEN = 40;
30
31
  uint64 private constant DELAYED_HEADER_LEN = 112 + 1;
31
32
 
33
+ // CustomDA proof format constants
34
+ uint256 private constant CERT_SIZE_LEN = 8;
35
+ uint256 private constant CLAIMED_VALID_LEN = 1;
36
+
37
+ ICustomDAProofValidator public immutable customDAValidator;
38
+
39
+ constructor(
40
+ address _customDAValidator
41
+ ) {
42
+ customDAValidator = ICustomDAProofValidator(_customDAValidator);
43
+ }
44
+
32
45
  function setLeafByte(bytes32 oldLeaf, uint256 idx, uint8 val) internal pure returns (bytes32) {
33
46
  require(idx < LEAF_SIZE, "BAD_SET_LEAF_BYTE_IDX");
34
47
  // Take into account that we are casting the leaf to a big-endian integer
@@ -136,7 +149,7 @@ contract OneStepProverHostIo is IOneStepProver {
136
149
  bytes memory extracted;
137
150
  uint8 proofType = uint8(proof[proofOffset]);
138
151
  proofOffset++;
139
- // These values must be kept in sync with `arbitrator/arbutil/src/types.rs`
152
+ // These values must be kept in sync with `crates/arbutil/src/types.rs`
140
153
  // and `arbutil/preimage_type.go` (both in the nitro repo).
141
154
  if (inst.argumentData == 0) {
142
155
  // The machine is asking for a keccak256 preimage
@@ -220,6 +233,32 @@ contract OneStepProverHostIo is IOneStepProver {
220
233
 
221
234
  extracted = kzgProof[64:96];
222
235
  }
236
+ } else if (inst.argumentData == 3) {
237
+ // The machine is asking for a CustomDA preimage
238
+ require(address(customDAValidator) != address(0), "CUSTOM_DA_VALIDATOR_NOT_SUPPORTED");
239
+ require(proofType == 0, "UNKNOWN_PREIMAGE_PROOF");
240
+
241
+ bytes calldata customProof = proof[proofOffset:];
242
+
243
+ // Extract certificate size and certificate
244
+ require(customProof.length >= CERT_SIZE_LEN, "CUSTOM_DA_PROOF_TOO_SHORT");
245
+
246
+ uint256 certSize = uint256(uint64(bytes8(customProof[0:CERT_SIZE_LEN])));
247
+
248
+ require(customProof.length >= CERT_SIZE_LEN + certSize, "PROOF_TOO_SHORT_FOR_CERT");
249
+
250
+ // Extract and validate certificate
251
+ bytes calldata certificate = customProof[CERT_SIZE_LEN:CERT_SIZE_LEN + certSize];
252
+
253
+ // Verify this is the certificate the machine requested
254
+ require(keccak256(certificate) == leafContents, "WRONG_CERTIFICATE_HASH");
255
+
256
+ // Delegate to custom validator with proven values and full proof
257
+ extracted =
258
+ customDAValidator.validateReadPreimage(leafContents, preimageOffset, customProof);
259
+
260
+ // Ensure we got a valid response
261
+ require(extracted.length > 0 && extracted.length <= 32, "INVALID_CUSTOM_DA_RESPONSE");
223
262
  } else {
224
263
  revert("UNKNOWN_PREIMAGE_TYPE");
225
264
  }
@@ -233,6 +272,91 @@ contract OneStepProverHostIo is IOneStepProver {
233
272
  mach.valueStack.push(ValueLib.newI32(uint32(extracted.length)));
234
273
  }
235
274
 
275
+ function executeValidatePreimage(
276
+ ExecutionContext calldata,
277
+ Machine memory mach,
278
+ Module memory mod,
279
+ Instruction calldata,
280
+ bytes calldata proof
281
+ ) internal view {
282
+ uint256 preimageType = mach.valueStack.pop().assumeI32();
283
+ uint256 ptr = mach.valueStack.pop().assumeI32();
284
+
285
+ // Validate preimageType fits in u8 (matches Rust u8::try_from which uses ? to propagate error)
286
+ if (preimageType > 255) {
287
+ revert("PREIMAGE_TYPE_OVERFLOW");
288
+ }
289
+
290
+ // Invalid enum values (4-255) return 0 with no memory access
291
+ // This matches Rust where PreimageType::try_from fails
292
+ if (preimageType >= 4) {
293
+ mach.valueStack.push(ValueLib.newI32(0));
294
+ return;
295
+ }
296
+
297
+ // Validate ptr (matches Rust load_32_byte_aligned check)
298
+ if (!mod.moduleMemory.isValidLeaf(ptr)) {
299
+ mach.status = MachineStatus.ERRORED;
300
+ return;
301
+ }
302
+
303
+ // Prove the hash in memory
304
+ uint256 leafIdx = ptr / LEAF_SIZE;
305
+ uint256 proofOffset = 0;
306
+ bytes32 leafContents;
307
+ MerkleProof memory merkleProof;
308
+ (leafContents, proofOffset, merkleProof) =
309
+ mod.moduleMemory.proveLeaf(leafIdx, proof, proofOffset);
310
+
311
+ if (preimageType == 3) {
312
+ require(address(customDAValidator) != address(0), "CUSTOM_DA_VALIDATOR_NOT_SUPPORTED");
313
+ if (validateAndCheckCertificate(proof, proofOffset, leafContents)) {
314
+ mach.valueStack.push(ValueLib.newI32(1));
315
+ } else {
316
+ mach.valueStack.push(ValueLib.newI32(0));
317
+ }
318
+ } else {
319
+ // preimageType 0, 1, 2 -> always valid
320
+ mach.valueStack.push(ValueLib.newI32(1));
321
+ }
322
+
323
+ // Update merkle root
324
+ mod.moduleMemory.merkleRoot = merkleProof.computeRootFromMemory(leafIdx, leafContents);
325
+ }
326
+
327
+ function validateAndCheckCertificate(
328
+ bytes calldata proof,
329
+ uint256 proofOffset,
330
+ bytes32 expectedHash
331
+ ) internal view returns (bool) {
332
+ // Proof format is: [certSize(8), certificate, claimedValid(1), validityProof...]
333
+ uint256 certSize = uint256(uint64(bytes8(proof[proofOffset:proofOffset + CERT_SIZE_LEN])));
334
+
335
+ require(
336
+ proof.length >= proofOffset + CERT_SIZE_LEN + certSize + CLAIMED_VALID_LEN,
337
+ "PROOF_TOO_SHORT"
338
+ );
339
+
340
+ bytes calldata certificate =
341
+ proof[proofOffset + CERT_SIZE_LEN:proofOffset + CERT_SIZE_LEN + certSize];
342
+
343
+ // Verify this is the certificate the machine requested
344
+ require(keccak256(certificate) == expectedHash, "WRONG_CERTIFICATE_HASH");
345
+
346
+ bool claimedValid = uint8(proof[proofOffset + CERT_SIZE_LEN + certSize]) != 0;
347
+
348
+ // Pass the full proof segment to validateCertificate
349
+ bytes calldata validationProof = proof[proofOffset:];
350
+
351
+ // Check actual validity and verify claims match
352
+ bool isValid = customDAValidator.validateCertificate(validationProof);
353
+ require(
354
+ isValid == claimedValid,
355
+ isValid ? "CLAIMED_INVALID_BUT_VALID" : "CLAIMED_VALID_BUT_INVALID"
356
+ );
357
+ return isValid;
358
+ }
359
+
236
360
  function validateSequencerInbox(
237
361
  ExecutionContext calldata execCtx,
238
362
  uint64 msgIndex,
@@ -319,10 +443,8 @@ contract OneStepProverHostIo is IOneStepProver {
319
443
  require(proof[proofOffset] == 0, "UNKNOWN_INBOX_PROOF");
320
444
  proofOffset++;
321
445
 
322
- function(ExecutionContext calldata, uint64, bytes calldata)
323
- internal
324
- view
325
- returns (bool) inboxValidate;
446
+ function(ExecutionContext calldata, uint64, bytes calldata) internal view returns (bool)
447
+ inboxValidate;
326
448
 
327
449
  bool success;
328
450
  if (inst.argumentData == Instructions.INBOX_INDEX_SEQUENCER) {
@@ -584,19 +706,17 @@ contract OneStepProverHostIo is IOneStepProver {
584
706
 
585
707
  uint16 opcode = inst.opcode;
586
708
 
587
- function(
588
- ExecutionContext calldata,
589
- Machine memory,
590
- Module memory,
591
- Instruction calldata,
592
- bytes calldata
593
- ) internal view impl;
709
+ function(ExecutionContext calldata, Machine memory, Module memory, Instruction calldata, bytes calldata)
710
+ internal
711
+ view impl;
594
712
 
595
713
  if (
596
714
  opcode >= Instructions.GET_GLOBAL_STATE_BYTES32
597
715
  && opcode <= Instructions.SET_GLOBAL_STATE_U64
598
716
  ) {
599
717
  impl = executeGlobalStateAccess;
718
+ } else if (opcode == Instructions.VALIDATE_CERTIFICATE) {
719
+ impl = executeValidatePreimage;
600
720
  } else if (opcode == Instructions.READ_PRE_IMAGE) {
601
721
  impl = executeReadPreImage;
602
722
  } else if (opcode == Instructions.READ_INBOX_MESSAGE) {
@@ -466,9 +466,8 @@ contract OneStepProverMath is IOneStepProver {
466
466
 
467
467
  uint16 opcode = inst.opcode;
468
468
 
469
- function(Machine memory, Module memory, Instruction calldata, bytes calldata)
470
- internal
471
- pure impl;
469
+ function(Machine memory, Module memory, Instruction calldata, bytes calldata) internal pure
470
+ impl;
472
471
  if (opcode == Instructions.I32_EQZ || opcode == Instructions.I64_EQZ) {
473
472
  impl = executeEqz;
474
473
  } else if (
@@ -250,9 +250,8 @@ contract OneStepProverMemory is IOneStepProver {
250
250
 
251
251
  uint16 opcode = inst.opcode;
252
252
 
253
- function(Machine memory, Module memory, Instruction calldata, bytes calldata)
254
- internal
255
- pure impl;
253
+ function(Machine memory, Module memory, Instruction calldata, bytes calldata) internal pure
254
+ impl;
256
255
  if (opcode >= Instructions.I32_LOAD && opcode <= Instructions.I64_LOAD32_U) {
257
256
  impl = executeMemoryLoad;
258
257
  } else if (opcode >= Instructions.I32_STORE && opcode <= Instructions.I64_STORE32) {
@@ -0,0 +1,39 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ test-format:
12
+ name: Test format
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ submodules: recursive
18
+
19
+ - name: Install Foundry
20
+ uses: foundry-rs/foundry-toolchain@v1
21
+ with:
22
+ version: v1.3.6
23
+ cache: false
24
+
25
+ - name: Setup node/yarn
26
+ uses: actions/setup-node@v3
27
+ with:
28
+ node-version: 18
29
+ cache: 'yarn'
30
+ cache-dependency-path: '**/yarn.lock'
31
+
32
+ - name: Install packages
33
+ run: yarn
34
+
35
+ - name: Check Contracts Format
36
+ run: yarn format --check
37
+
38
+ - name: Make sure contracts can be built
39
+ run: yarn build
@@ -12,6 +12,12 @@ interface ArbDebug {
12
12
  /// @notice Caller becomes a chain owner
13
13
  function becomeChainOwner() external;
14
14
 
15
+ /// @notice Overwrite an existing contract's code
16
+ function overwriteContractCode(
17
+ address target,
18
+ bytes calldata newCode
19
+ ) external returns (bytes memory oldCode);
20
+
15
21
  /// @notice Emit events with values based on the args provided
16
22
  function events(bool flag, bytes32 value) external payable returns (address, uint256);
17
23
 
@@ -31,6 +37,7 @@ interface ArbDebug {
31
37
  uint64 number
32
38
  ) external pure;
33
39
 
40
+ /// @notice Available in ArbOS version 30 and above
34
41
  function panic() external;
35
42
 
36
43
  function legacyError() external pure;
@@ -49,9 +49,15 @@ interface ArbGasInfo {
49
49
  function getPricesInArbGas() external view returns (uint256, uint256, uint256);
50
50
 
51
51
  /// @notice Get the gas accounting parameters. `gasPoolMax` is always zero, as the exponential pricing model has no such notion.
52
- /// @return (speedLimitPerSecond, gasPoolMax, maxTxGasLimit)
52
+ /// @notice Starting from ArbOS version 50, `speedLimitPerSecond` corresponds to the target of the single-constraint pricing model.
53
+ /// @notice For multi-constraint pricing model, use `getGasPricingConstraints` to retrieve the constraint set.
54
+ /// @return (speedLimitPerSecond, gasPoolMax, maxBlockGasLimit)
53
55
  function getGasAccountingParams() external view returns (uint256, uint256, uint256);
54
56
 
57
+ /// @notice Get the maxTxGasLimit
58
+ /// @notice Available in ArbOS version 50 and above
59
+ function getMaxTxGasLimit() external view returns (uint256);
60
+
55
61
  /// @notice Get the minimum gas price needed for a tx to succeed
56
62
  function getMinimumGasPrice() external view returns (uint256);
57
63
 
@@ -62,11 +68,11 @@ interface ArbGasInfo {
62
68
  function getL1BaseFeeEstimateInertia() external view returns (uint64);
63
69
 
64
70
  /// @notice Get the L1 pricer reward rate, in wei per unit
65
- /// Available in ArbOS version 11
71
+ /// @notice Available in ArbOS version 11 and above
66
72
  function getL1RewardRate() external view returns (uint64);
67
73
 
68
74
  /// @notice Get the L1 pricer reward recipient
69
- /// Available in ArbOS version 11
75
+ /// @notice Available in ArbOS version 11 and above
70
76
  function getL1RewardRecipient() external view returns (address);
71
77
 
72
78
  /// @notice Deprecated -- Same as getL1BaseFeeEstimate()
@@ -76,12 +82,18 @@ interface ArbGasInfo {
76
82
  function getCurrentTxL1GasFees() external view returns (uint256);
77
83
 
78
84
  /// @notice Get the backlogged amount of gas burnt in excess of the speed limit
85
+ /// @notice Starting from ArbOS version 50, returns the backlog value from the single-constraint pricing model.
86
+ /// @notice For multi-constraint pricing model, use `getGasPricingConstraints` to get backlog values for each configured constraint.
79
87
  function getGasBacklog() external view returns (uint64);
80
88
 
81
89
  /// @notice Get how slowly ArbOS updates the L2 basefee in response to backlogged gas
90
+ /// @notice Starting from ArbOS version 50, returns the inertia value used by the single-constraint pricing model.
91
+ /// @notice For new integrations, prefer `getGasPricingConstraints`.
82
92
  function getPricingInertia() external view returns (uint64);
83
93
 
84
94
  /// @notice Get the forgivable amount of backlogged gas ArbOS will ignore when raising the basefee
95
+ /// @notice Starting from ArbOS version 50, returns the backlog tolerance value used by the single-constraint pricing model.
96
+ /// @notice There is no tolerance for backlogged gas in the new multi-constraint pricing model.
85
97
  function getGasBacklogTolerance() external view returns (uint64);
86
98
 
87
99
  /// @notice Returns the surplus of funds for L1 batch posting payments (may be negative).
@@ -94,25 +106,39 @@ interface ArbGasInfo {
94
106
  function getAmortizedCostCapBips() external view returns (uint64);
95
107
 
96
108
  /// @notice Returns the available funds from L1 fees
109
+ /// @notice Available in ArbOS version 10 and above
97
110
  function getL1FeesAvailable() external view returns (uint256);
98
111
 
99
112
  /// @notice Returns the equilibration units parameter for L1 price adjustment algorithm
100
- /// Available in ArbOS version 20
113
+ /// @notice Available in ArbOS version 20 and above
101
114
  function getL1PricingEquilibrationUnits() external view returns (uint256);
102
115
 
103
116
  /// @notice Returns the last time the L1 calldata pricer was updated.
104
- /// Available in ArbOS version 20
117
+ /// @notice Available in ArbOS version 20 and above
105
118
  function getLastL1PricingUpdateTime() external view returns (uint64);
106
119
 
107
120
  /// @notice Returns the amount of L1 calldata payments due for rewards (per the L1 reward rate)
108
- /// Available in ArbOS version 20
121
+ /// @notice Available in ArbOS version 20 and above
109
122
  function getL1PricingFundsDueForRewards() external view returns (uint256);
110
123
 
111
124
  /// @notice Returns the amount of L1 calldata posted since the last update.
112
- /// Available in ArbOS version 20
125
+ /// @notice Available in ArbOS version 20 and above
113
126
  function getL1PricingUnitsSinceUpdate() external view returns (uint64);
114
127
 
115
128
  /// @notice Returns the L1 pricing surplus as of the last update (may be negative).
116
- /// Available in ArbOS version 20
129
+ /// @notice Available in ArbOS version 20 and above
117
130
  function getLastL1PricingSurplus() external view returns (int256);
131
+
132
+ /// @notice Get the maximum block gas limit
133
+ /// @notice Available in ArbOS version 50 and above
134
+ function getMaxBlockGasLimit() external view returns (uint64);
135
+
136
+ /// @notice Get the current gas pricing constraints used by the multi-constraint pricing model.
137
+ /// @notice Each constraint contains the following values:
138
+ /// - gas_target_per_second: target gas usage per second for the constraint (uint64, gas/sec)
139
+ /// - adjustment_window_seconds: time over which the price will rise by a factor of e if demand is 2x the target (uint64, seconds)
140
+ /// - uint64 backlog: current backlog in gas units for this constraint (uint64, gas units)
141
+ /// @return constraints Array of triples (gas_target_per_second, adjustment_window_seconds, backlog)
142
+ /// @notice Available in ArbOS version 50 and above.
143
+ function getGasPricingConstraints() external view returns (uint64[3][] memory constraints);
118
144
  }
@@ -8,7 +8,7 @@ pragma solidity >=0.4.21 <0.9.0;
8
8
  * @title Enables minting and burning native tokens.
9
9
  * @notice Authorized callers are added/removed through ArbOwner precompile.
10
10
  * Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000073.
11
- * Available in ArbOS version 41
11
+ * Available in ArbOS version 41 and above
12
12
  */
13
13
  interface ArbNativeTokenManager {
14
14
  /**
@@ -34,31 +34,31 @@ interface ArbOwner {
34
34
  function getAllChainOwners() external view returns (address[] memory);
35
35
 
36
36
  /// @notice Sets the NativeTokenManagementFrom time
37
- /// Available in ArbOS version 41
37
+ /// @notice Available in ArbOS version 41 and above
38
38
  function setNativeTokenManagementFrom(
39
39
  uint64 timestamp
40
40
  ) external;
41
41
 
42
42
  /// @notice Add account as a native token owner
43
- /// Available in ArbOS version 41
43
+ /// @notice Available in ArbOS version 41 and above
44
44
  function addNativeTokenOwner(
45
45
  address newOwner
46
46
  ) external;
47
47
 
48
48
  /// @notice Remove account from the list of native token owners
49
- /// Available in ArbOS version 41
49
+ /// @notice Available in ArbOS version 41 and above
50
50
  function removeNativeTokenOwner(
51
51
  address ownerToRemove
52
52
  ) external;
53
53
 
54
54
  /// @notice See if the user is a native token owner
55
- /// Available in ArbOS version 41
55
+ /// @notice Available in ArbOS version 41 and above
56
56
  function isNativeTokenOwner(
57
57
  address addr
58
58
  ) external view returns (bool);
59
59
 
60
60
  /// @notice Retrieves the list of native token owners
61
- /// Available in ArbOS version 41
61
+ /// @notice Available in ArbOS version 41 and above
62
62
  function getAllNativeTokenOwners() external view returns (address[] memory);
63
63
 
64
64
  /// @notice Set how slowly ArbOS updates its estimate of the L1 basefee
@@ -77,21 +77,33 @@ interface ArbOwner {
77
77
  ) external;
78
78
 
79
79
  /// @notice Set the computational speed limit for the chain
80
+ /// @notice Starting from ArbOS version 50, continues to set the legacy single-constraint speed limit value.
81
+ /// @notice It does not modify the multi-constraint pricing model configuration. To configure multiple constraints, use `setGasPricingConstraints`.
80
82
  function setSpeedLimit(
81
83
  uint64 limit
82
84
  ) external;
83
85
 
84
- /// @notice Set the maximum size a tx (and block) can be
86
+ /// @notice Set the maximum size a tx can be
85
87
  function setMaxTxGasLimit(
86
88
  uint64 limit
87
89
  ) external;
88
90
 
91
+ /// @notice Set the maximum size a block can be
92
+ /// @notice Available in ArbOS version 50 and above
93
+ function setMaxBlockGasLimit(
94
+ uint64 limit
95
+ ) external;
96
+
89
97
  /// @notice Set the L2 gas pricing inertia
98
+ /// @notice Starting from ArbOS version 50, continues to set the single-constraint pricing inertia value.
99
+ /// @notice It does not modify the multi-constraint pricing model configuration. To configure multiple constraints, use `setGasPricingConstraints`.
90
100
  function setL2GasPricingInertia(
91
101
  uint64 sec
92
102
  ) external;
93
103
 
94
104
  /// @notice Set the L2 gas backlog tolerance
105
+ /// @notice Starting from ArbOS version 50, continues to set the single-constraint backlog tolerance value.
106
+ /// @notice It does not modify the multi-constraint pricing model configuration. There is no tolerance for backlogged gas in the new multi-constraint pricing model.
95
107
  function setL2GasBacklogTolerance(
96
108
  uint64 sec
97
109
  ) external;
@@ -100,6 +112,7 @@ interface ArbOwner {
100
112
  function getNetworkFeeAccount() external view returns (address);
101
113
 
102
114
  /// @notice Get the infrastructure fee collector
115
+ /// @notice Available in ArbOS version 5 and above
103
116
  function getInfraFeeAccount() external view returns (address);
104
117
 
105
118
  /// @notice Set the network fee collector
@@ -108,6 +121,7 @@ interface ArbOwner {
108
121
  ) external;
109
122
 
110
123
  /// @notice Set the infrastructure fee collector
124
+ /// @notice Available in ArbOS version 5 and above
111
125
  function setInfraFeeAccount(
112
126
  address newInfraFeeAccount
113
127
  ) external;
@@ -140,15 +154,19 @@ interface ArbOwner {
140
154
  uint256 pricePerUnit
141
155
  ) external;
142
156
 
157
+ /// @notice Set how much L1 charges per non-zero byte of calldata
158
+ /// @notice Available in ArbOS version 50 and above
159
+ function setParentGasFloorPerToken(
160
+ uint64 floorPerToken
161
+ ) external;
162
+
143
163
  /// @notice Sets the base charge (in L1 gas) attributed to each data batch in the calldata pricer
144
164
  function setPerBatchGasCharge(
145
165
  int64 cost
146
166
  ) external;
147
167
 
148
- /**
149
- * @notice Sets the Brotli compression level used for fast compression
150
- * Available in ArbOS version 12 with default level as 1
151
- */
168
+ /// @notice Sets the Brotli compression level used for fast compression
169
+ /// @notice Available in ArbOS version 20 and above
152
170
  function setBrotliCompressionLevel(
153
171
  uint64 level
154
172
  ) external;
@@ -159,90 +177,131 @@ interface ArbOwner {
159
177
  ) external;
160
178
 
161
179
  /// @notice Releases surplus funds from L1PricerFundsPoolAddress for use
180
+ /// @notice Available in ArbOS version 10 and above
162
181
  function releaseL1PricerSurplusFunds(
163
182
  uint256 maxWeiToRelease
164
183
  ) external returns (uint256);
165
184
 
166
185
  /// @notice Sets the amount of ink 1 gas buys
186
+ /// @notice Available in ArbOS version 30 and above
167
187
  /// @param price the conversion rate (must fit in a uint24)
168
188
  function setInkPrice(
169
189
  uint32 price
170
190
  ) external;
171
191
 
172
192
  /// @notice Sets the maximum depth (in wasm words) a wasm stack may grow
193
+ /// @notice Available in ArbOS version 30 and above
173
194
  function setWasmMaxStackDepth(
174
195
  uint32 depth
175
196
  ) external;
176
197
 
177
198
  /// @notice Sets the number of free wasm pages a tx gets
199
+ /// @notice Available in ArbOS version 30 and above
178
200
  function setWasmFreePages(
179
201
  uint16 pages
180
202
  ) external;
181
203
 
182
204
  /// @notice Sets the base cost of each additional wasm page
205
+ /// @notice Available in ArbOS version 30 and above
183
206
  function setWasmPageGas(
184
207
  uint16 gas
185
208
  ) external;
186
209
 
187
210
  /// @notice Sets the maximum number of pages a wasm may allocate
211
+ /// @notice Available in ArbOS version 30 and above
188
212
  function setWasmPageLimit(
189
213
  uint16 limit
190
214
  ) external;
191
215
 
192
216
  /// @notice Sets the maximum size of the uncompressed wasm code in bytes
217
+ /// @notice Available in ArbOS version 30 and above
193
218
  function setWasmMaxSize(
194
219
  uint32 size
195
220
  ) external;
196
221
 
197
222
  /// @notice Sets the minimum costs to invoke a program
223
+ /// @notice Available in ArbOS version 30 and above
198
224
  /// @param gas amount of gas paid in increments of 256 when not the program is not cached
199
225
  /// @param cached amount of gas paid in increments of 64 when the program is cached
200
226
  function setWasmMinInitGas(uint8 gas, uint16 cached) external;
201
227
 
202
228
  /// @notice Sets the linear adjustment made to program init costs.
229
+ /// @notice Available in ArbOS version 30 and above
203
230
  /// @param percent the adjustment (100% = no adjustment).
204
231
  function setWasmInitCostScalar(
205
232
  uint64 percent
206
233
  ) external;
207
234
 
208
235
  /// @notice Sets the number of days after which programs deactivate
236
+ /// @notice Available in ArbOS version 30 and above
209
237
  function setWasmExpiryDays(
210
238
  uint16 _days
211
239
  ) external;
212
240
 
213
241
  /// @notice Sets the age a program must be to perform a keepalive
242
+ /// @notice Available in ArbOS version 30 and above
214
243
  function setWasmKeepaliveDays(
215
244
  uint16 _days
216
245
  ) external;
217
246
 
218
247
  /// @notice Sets the number of extra programs ArbOS caches during a given block
248
+ /// @notice Available in ArbOS version 30 and above
219
249
  function setWasmBlockCacheSize(
220
250
  uint16 count
221
251
  ) external;
222
252
 
223
253
  /// @notice Adds account as a wasm cache manager
254
+ /// @notice Available in ArbOS version 30 and above
224
255
  function addWasmCacheManager(
225
256
  address manager
226
257
  ) external;
227
258
 
228
259
  /// @notice Removes account from the list of wasm cache managers
260
+ /// @notice Available in ArbOS version 30 and above
229
261
  function removeWasmCacheManager(
230
262
  address manager
231
263
  ) external;
232
264
 
233
265
  /// @notice Sets serialized chain config in ArbOS state
266
+ /// @notice Available in ArbOS version 11 and above
234
267
  function setChainConfig(
235
268
  string calldata chainConfig
236
269
  ) external;
237
270
 
238
- /**
239
- * @notice Sets the increased calldata price feature on or off (EIP-7623)
240
- * Available in ArbOS version 40 with default as false
241
- */
271
+ /// @notice Sets the increased calldata price feature on or off (EIP-7623)
272
+ /// @notice Available in ArbOS version 40 and above with default as false
242
273
  function setCalldataPriceIncrease(
243
274
  bool enable
244
275
  ) external;
245
276
 
277
+ /// @notice Set the backlogged amount of gas burnt used by the single-constraint pricing model only.
278
+ /// @notice To configure backlogs for the multi-constraint pricing model, use `setGasPricingConstraints()`.
279
+ /// @param backlog The backlog value in gas units to assign to the single-constraint pricing model.
280
+ function setGasBacklog(
281
+ uint64 backlog
282
+ ) external;
283
+
284
+ /// @notice Sets the list of gas pricing constraints for the multi-constraint pricing model.
285
+ /// @notice Replaces the existing constraints configuration and sets each constraint's starting backlog value.
286
+ /// @notice All existing backlogs are replaced by the provided values.
287
+ /// @notice Any changes to gas targets, inertia, or starting backlogs may cause immediate price fluctuations.
288
+ /// @notice Operators are fully responsible for the resulting behavior and should adjust parameters carefully.
289
+ /// @notice Use `ArbGasInfo.getGasPricingConstraints()` to retrieve the current configuration.
290
+ /// @notice Model selection:
291
+ /// @notice - If one or more constraints are provided, the chain switches to the multi-constraint pricing model
292
+ /// @notice and uses exactly the provided parameters.
293
+ /// @notice - If zero constraints are provided, the chain uses the single-constraint pricing model.
294
+ /// @notice In that case, the single-constraint backlog can be set via `setBacklog`, which you may derive from multi-constraint
295
+ /// @notice parameters if desired.
296
+ /// @notice Available in ArbOS version 50 and above.
297
+ /// @param constraints Array of triples (gas_target_per_second, adjustment_window_seconds, starting_backlog_value)
298
+ /// - gas_target_per_second: target gas usage per second for the constraint (uint64, gas/sec)
299
+ /// - adjustment_window_seconds: time over which the price will rise by a factor of e if demand is 2x the target (uint64, seconds)
300
+ /// - starting_backlog_value: initial backlog for this constraint (uint64, gas units)
301
+ function setGasPricingConstraints(
302
+ uint64[3][] calldata constraints
303
+ ) external;
304
+
246
305
  /// Emitted when a successful call is made to this precompile
247
306
  event OwnerActs(bytes4 indexed method, address indexed owner, bytes data);
248
307
  }