@arbitrum/nitro-contracts 2.1.1-beta.0 → 3.0.0-alpha.1
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.
- package/build/contracts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +2 -2
- package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json +2 -2
- package/build/contracts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +2 -2
- package/build/contracts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +2 -2
- package/build/contracts/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol/UUPSUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/security/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +2 -2
- package/build/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.dbg.json +4 -0
- package/build/contracts/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.json +86 -0
- package/build/contracts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.json +2 -2
- package/build/contracts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/utils/Address.sol/Address.json +2 -2
- package/build/contracts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/utils/Create2.sol/Create2.dbg.json +4 -0
- package/build/contracts/{src/express-lane-auction/ELCRound.sol/LatestELCRoundsLib.json → @openzeppelin/contracts/utils/Create2.sol/Create2.json} +4 -4
- package/build/contracts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +2 -2
- package/build/contracts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +2 -2
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.json +13 -0
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol/IAccessControlUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json +13 -0
- package/build/contracts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json +15 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.json +13 -0
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +2 -2
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +15 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol/Create2Upgradeable.dbg.json +4 -0
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol/Create2Upgradeable.json +10 -0
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol/StorageSlotUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol/StorageSlotUpgradeable.json +2 -2
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol/StringsUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol/StringsUpgradeable.json +2 -2
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.json +13 -0
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.json +2 -2
- package/build/contracts/src/assertionStakingPool/AbsBoldStakingPool.sol/AbsBoldStakingPool.dbg.json +4 -0
- package/build/contracts/{@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.json → src/assertionStakingPool/AbsBoldStakingPool.sol/AbsBoldStakingPool.json} +41 -95
- package/build/contracts/src/assertionStakingPool/AssertionStakingPool.sol/AssertionStakingPool.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/AssertionStakingPool.sol/AssertionStakingPool.json +340 -0
- package/build/contracts/src/assertionStakingPool/AssertionStakingPoolCreator.sol/AssertionStakingPoolCreator.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/AssertionStakingPoolCreator.sol/AssertionStakingPoolCreator.json +89 -0
- package/build/contracts/src/assertionStakingPool/EdgeStakingPool.sol/EdgeStakingPool.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/EdgeStakingPool.sol/EdgeStakingPool.json +248 -0
- package/build/contracts/src/assertionStakingPool/EdgeStakingPoolCreator.sol/EdgeStakingPoolCreator.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/EdgeStakingPoolCreator.sol/EdgeStakingPoolCreator.json +83 -0
- package/build/contracts/src/assertionStakingPool/StakingPoolCreatorUtils.sol/StakingPoolCreatorUtils.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/StakingPoolCreatorUtils.sol/StakingPoolCreatorUtils.json +16 -0
- package/build/contracts/src/assertionStakingPool/interfaces/IAbsBoldStakingPool.sol/IAbsBoldStakingPool.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/interfaces/IAbsBoldStakingPool.sol/IAbsBoldStakingPool.json +140 -0
- package/build/contracts/src/assertionStakingPool/interfaces/IAssertionStakingPool.sol/IAssertionStakingPool.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/interfaces/IAssertionStakingPool.sol/IAssertionStakingPool.json +324 -0
- package/build/contracts/src/assertionStakingPool/interfaces/IAssertionStakingPoolCreator.sol/IAssertionStakingPoolCreator.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/interfaces/IAssertionStakingPoolCreator.sol/IAssertionStakingPoolCreator.json +84 -0
- package/build/contracts/src/assertionStakingPool/interfaces/IEdgeStakingPool.sol/IEdgeStakingPool.dbg.json +4 -0
- package/build/contracts/{@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol/IERC20MetadataUpgradeable.json → src/assertionStakingPool/interfaces/IEdgeStakingPool.sol/IEdgeStakingPool.json} +109 -110
- package/build/contracts/src/assertionStakingPool/interfaces/IEdgeStakingPoolCreator.sol/IEdgeStakingPoolCreator.dbg.json +4 -0
- package/build/contracts/src/assertionStakingPool/interfaces/IEdgeStakingPoolCreator.sol/IEdgeStakingPoolCreator.json +78 -0
- package/build/contracts/src/bridge/AbsBridge.sol/AbsBridge.dbg.json +1 -1
- package/build/contracts/src/bridge/AbsBridge.sol/AbsBridge.json +13 -0
- package/build/contracts/src/bridge/AbsInbox.sol/AbsInbox.dbg.json +1 -1
- package/build/contracts/src/bridge/AbsInbox.sol/AbsInbox.json +14 -1
- package/build/contracts/src/bridge/AbsOutbox.sol/AbsOutbox.dbg.json +1 -1
- package/build/contracts/src/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/src/bridge/Bridge.sol/Bridge.json +15 -2
- package/build/contracts/src/bridge/DelayBuffer.sol/DelayBuffer.dbg.json +4 -0
- package/build/contracts/src/bridge/DelayBuffer.sol/DelayBuffer.json +24 -0
- package/build/contracts/src/bridge/ERC20Bridge.sol/ERC20Bridge.dbg.json +1 -1
- package/build/contracts/src/bridge/ERC20Bridge.sol/ERC20Bridge.json +15 -2
- package/build/contracts/src/bridge/ERC20Inbox.sol/ERC20Inbox.dbg.json +1 -1
- package/build/contracts/src/bridge/ERC20Inbox.sol/ERC20Inbox.json +16 -3
- package/build/contracts/src/bridge/ERC20Outbox.sol/ERC20Outbox.dbg.json +1 -1
- package/build/contracts/src/bridge/ERC20Outbox.sol/ERC20Outbox.json +2 -2
- package/build/contracts/src/bridge/GasRefunder.sol/GasRefunder.dbg.json +1 -1
- package/build/contracts/src/bridge/GasRefunder.sol/GasRefunder.json +2 -2
- package/build/contracts/src/bridge/IBridge.sol/IBridge.dbg.json +1 -1
- package/build/contracts/src/bridge/IDelayedMessageProvider.sol/IDelayedMessageProvider.dbg.json +1 -1
- package/build/contracts/src/bridge/IERC20Bridge.sol/IERC20Bridge.dbg.json +1 -1
- package/build/contracts/src/bridge/IERC20Inbox.sol/IERC20Inbox.dbg.json +1 -1
- package/build/contracts/src/bridge/IEthBridge.sol/IEthBridge.dbg.json +1 -1
- package/build/contracts/src/bridge/IInbox.sol/IInbox.dbg.json +1 -1
- package/build/contracts/src/bridge/IInboxBase.sol/IInboxBase.dbg.json +1 -1
- package/build/contracts/src/bridge/IOutbox.sol/IOutbox.dbg.json +1 -1
- package/build/contracts/src/bridge/IOwnable.sol/IOwnable.dbg.json +1 -1
- package/build/contracts/src/bridge/ISequencerInbox.sol/ISequencerInbox.dbg.json +1 -1
- package/build/contracts/src/bridge/ISequencerInbox.sol/ISequencerInbox.json +441 -0
- package/build/contracts/src/bridge/Inbox.sol/Inbox.dbg.json +1 -1
- package/build/contracts/src/bridge/Inbox.sol/Inbox.json +20 -2
- package/build/contracts/src/bridge/Messages.sol/Messages.dbg.json +1 -1
- package/build/contracts/src/bridge/Messages.sol/Messages.json +2 -2
- package/build/contracts/src/bridge/Outbox.sol/Outbox.dbg.json +1 -1
- package/build/contracts/src/bridge/Outbox.sol/Outbox.json +2 -2
- package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.dbg.json +1 -1
- package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.json +566 -9
- package/build/contracts/src/chain/CacheManager.sol/CacheManager.dbg.json +1 -1
- package/build/contracts/src/chain/CacheManager.sol/CacheManager.json +15 -2
- package/build/contracts/src/challengeV2/EdgeChallengeManager.sol/EdgeChallengeManager.dbg.json +4 -0
- package/build/contracts/src/challengeV2/EdgeChallengeManager.sol/EdgeChallengeManager.json +1631 -0
- package/build/contracts/src/challengeV2/IAssertionChain.sol/IAssertionChain.dbg.json +4 -0
- package/build/contracts/src/challengeV2/IAssertionChain.sol/IAssertionChain.json +247 -0
- package/build/contracts/src/challengeV2/IEdgeChallengeManager.sol/IEdgeChallengeManager.dbg.json +4 -0
- package/build/contracts/src/challengeV2/IEdgeChallengeManager.sol/IEdgeChallengeManager.json +762 -0
- package/build/contracts/src/challengeV2/libraries/ArrayUtilsLib.sol/ArrayUtilsLib.dbg.json +4 -0
- package/build/contracts/src/challengeV2/libraries/ArrayUtilsLib.sol/ArrayUtilsLib.json +10 -0
- package/build/contracts/src/challengeV2/libraries/ChallengeEdgeLib.sol/ChallengeEdgeLib.dbg.json +4 -0
- package/build/contracts/{@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json → src/challengeV2/libraries/ChallengeEdgeLib.sol/ChallengeEdgeLib.json} +4 -4
- package/build/contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol/EdgeChallengeManagerLib.dbg.json +4 -0
- package/build/contracts/src/challengeV2/libraries/EdgeChallengeManagerLib.sol/EdgeChallengeManagerLib.json +24 -0
- package/build/contracts/src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol/MerkleTreeAccumulatorLib.dbg.json +4 -0
- package/build/contracts/src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol/MerkleTreeAccumulatorLib.json +24 -0
- package/build/contracts/src/challengeV2/libraries/UintUtilsLib.sol/UintUtilsLib.dbg.json +4 -0
- package/build/contracts/src/challengeV2/libraries/UintUtilsLib.sol/UintUtilsLib.json +10 -0
- package/build/contracts/src/libraries/AddressAliasHelper.sol/AddressAliasHelper.dbg.json +1 -1
- package/build/contracts/src/libraries/AddressAliasHelper.sol/AddressAliasHelper.json +2 -2
- package/build/contracts/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy.dbg.json +1 -1
- package/build/contracts/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy.json +2 -2
- package/build/contracts/src/libraries/AdminFallbackProxy.sol/DoubleLogicERC1967Upgrade.dbg.json +1 -1
- package/build/contracts/src/libraries/ArbitrumChecker.sol/ArbitrumChecker.dbg.json +1 -1
- package/build/contracts/src/libraries/ArbitrumChecker.sol/ArbitrumChecker.json +2 -2
- package/build/contracts/src/libraries/CallerChecker.sol/CallerChecker.dbg.json +4 -0
- package/build/contracts/src/{challenge/ChallengeLib.sol/ChallengeLib.json → libraries/CallerChecker.sol/CallerChecker.json} +4 -4
- package/build/contracts/src/libraries/CryptographyPrimitives.sol/CryptographyPrimitives.dbg.json +1 -1
- package/build/contracts/src/libraries/CryptographyPrimitives.sol/CryptographyPrimitives.json +2 -2
- package/build/contracts/src/libraries/DecimalsConverterHelper.sol/DecimalsConverterHelper.dbg.json +1 -1
- package/build/contracts/src/libraries/DecimalsConverterHelper.sol/DecimalsConverterHelper.json +2 -2
- package/build/contracts/src/libraries/DelegateCallAware.sol/DelegateCallAware.dbg.json +1 -1
- package/build/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol/DoubleLogicUUPSUpgradeable.dbg.json +1 -1
- package/build/contracts/src/libraries/GasRefundEnabled.sol/GasRefundEnabled.dbg.json +1 -1
- package/build/contracts/src/libraries/IGasRefunder.sol/IGasRefunder.dbg.json +1 -1
- package/build/contracts/src/libraries/IReader4844.sol/IReader4844.dbg.json +1 -1
- package/build/contracts/src/libraries/MerkleLib.sol/MerkleLib.dbg.json +1 -1
- package/build/contracts/src/libraries/MerkleLib.sol/MerkleLib.json +2 -2
- package/build/contracts/src/libraries/UUPSNotUpgradeable.sol/UUPSNotUpgradeable.dbg.json +1 -1
- package/build/contracts/src/mocks/Benchmarks.sol/Benchmarks.dbg.json +1 -1
- package/build/contracts/src/mocks/Benchmarks.sol/Benchmarks.json +2 -2
- package/build/contracts/src/mocks/BridgeStub.sol/BridgeStub.dbg.json +1 -1
- package/build/contracts/src/mocks/BridgeStub.sol/BridgeStub.json +8 -8
- package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.dbg.json +1 -1
- package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.json +15 -2
- package/build/contracts/src/mocks/CreateTest.sol/CreateTest.dbg.json +1 -1
- package/build/contracts/src/mocks/CreateTest.sol/CreateTest.json +2 -2
- package/build/contracts/src/mocks/HostioTest.sol/HostioTest.dbg.json +1 -1
- package/build/contracts/src/mocks/HostioTest.sol/HostioTest.json +2 -2
- package/build/contracts/src/mocks/InboxStub.sol/InboxStub.dbg.json +1 -1
- package/build/contracts/src/mocks/InboxStub.sol/InboxStub.json +2 -2
- package/build/contracts/src/mocks/MerkleTreeAccess.sol/MerkleTreeAccess.dbg.json +4 -0
- package/build/contracts/src/mocks/MerkleTreeAccess.sol/MerkleTreeAccess.json +227 -0
- package/build/contracts/src/mocks/MockRollupEventInbox.sol/MockRollupEventInbox.dbg.json +4 -0
- package/build/contracts/src/mocks/MockRollupEventInbox.sol/MockRollupEventInbox.json +133 -0
- package/build/contracts/src/mocks/MultiCallTest.sol/MultiCallTest.dbg.json +1 -1
- package/build/contracts/src/mocks/MultiCallTest.sol/MultiCallTest.json +2 -2
- package/build/contracts/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol/PendingBlkTimeAndNrAdvanceCheck.dbg.json +1 -1
- package/build/contracts/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol/PendingBlkTimeAndNrAdvanceCheck.json +2 -2
- package/build/contracts/src/mocks/Program.sol/ProgramTest.dbg.json +1 -1
- package/build/contracts/src/mocks/Program.sol/ProgramTest.json +2 -2
- package/build/contracts/src/mocks/ProxyAdminForBinding.sol/ProxyAdminForBinding.dbg.json +1 -1
- package/build/contracts/src/mocks/ProxyAdminForBinding.sol/ProxyAdminForBinding.json +2 -2
- package/build/contracts/src/mocks/SdkStorage.sol/SdkStorage.dbg.json +1 -1
- package/build/contracts/src/mocks/SdkStorage.sol/SdkStorage.json +2 -2
- package/build/contracts/src/mocks/SequencerInboxBlobMock.sol/SequencerInboxBlobMock.dbg.json +4 -0
- package/build/contracts/src/mocks/SequencerInboxBlobMock.sol/SequencerInboxBlobMock.json +1632 -0
- package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.dbg.json +1 -1
- package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.json +566 -9
- package/build/contracts/src/mocks/Simple.sol/Simple.dbg.json +1 -1
- package/build/contracts/src/mocks/Simple.sol/Simple.json +2 -2
- package/build/contracts/src/mocks/SimpleCacheManager.sol/SimpleCacheManager.dbg.json +1 -1
- package/build/contracts/src/mocks/SimpleCacheManager.sol/SimpleCacheManager.json +2 -2
- package/build/contracts/src/mocks/SimpleOneStepProofEntry.sol/SimpleOneStepProofEntry.dbg.json +4 -0
- package/build/contracts/src/mocks/SimpleOneStepProofEntry.sol/SimpleOneStepProofEntry.json +142 -0
- package/build/contracts/src/mocks/SimpleProxy.sol/SimpleProxy.dbg.json +1 -1
- package/build/contracts/src/mocks/SimpleProxy.sol/SimpleProxy.json +2 -2
- package/build/contracts/src/mocks/TestWETH9.sol/IWETH9.dbg.json +4 -0
- package/build/contracts/src/mocks/TestWETH9.sol/IWETH9.json +31 -0
- package/build/contracts/src/mocks/TestWETH9.sol/TestWETH9.dbg.json +4 -0
- package/build/contracts/src/mocks/TestWETH9.sol/TestWETH9.json +317 -0
- package/build/contracts/src/mocks/UpgradeExecutorMock.sol/UpgradeExecutorMock.dbg.json +1 -1
- package/build/contracts/src/mocks/UpgradeExecutorMock.sol/UpgradeExecutorMock.json +15 -2
- package/build/contracts/src/node-interface/NodeInterface.sol/NodeInterface.dbg.json +1 -1
- package/build/contracts/src/node-interface/NodeInterfaceDebug.sol/NodeInterfaceDebug.dbg.json +1 -1
- package/build/contracts/src/osp/HashProofHelper.sol/HashProofHelper.dbg.json +1 -1
- package/build/contracts/src/osp/HashProofHelper.sol/HashProofHelper.json +2 -2
- package/build/contracts/src/osp/IOneStepProofEntry.sol/IOneStepProofEntry.dbg.json +1 -1
- package/build/contracts/src/osp/IOneStepProofEntry.sol/IOneStepProofEntry.json +33 -9
- package/build/contracts/src/osp/IOneStepProofEntry.sol/OneStepProofEntryLib.dbg.json +1 -1
- package/build/contracts/src/osp/IOneStepProofEntry.sol/OneStepProofEntryLib.json +2 -2
- package/build/contracts/src/osp/IOneStepProver.sol/IOneStepProver.dbg.json +1 -1
- package/build/contracts/src/osp/IOneStepProver.sol/IOneStepProver.json +5 -0
- package/build/contracts/src/osp/OneStepProofEntry.sol/OneStepProofEntry.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProofEntry.sol/OneStepProofEntry.json +35 -11
- package/build/contracts/src/osp/OneStepProver0.sol/OneStepProver0.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProver0.sol/OneStepProver0.json +7 -2
- package/build/contracts/src/osp/OneStepProverHostIo.sol/OneStepProverHostIo.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProverHostIo.sol/OneStepProverHostIo.json +7 -2
- package/build/contracts/src/osp/OneStepProverMath.sol/OneStepProverMath.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProverMath.sol/OneStepProverMath.json +7 -2
- package/build/contracts/src/osp/OneStepProverMemory.sol/OneStepProverMemory.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProverMemory.sol/OneStepProverMemory.json +7 -2
- package/build/contracts/src/precompiles/ArbAddressTable.sol/ArbAddressTable.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbAggregator.sol/ArbAggregator.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbBLS.sol/ArbBLS.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbDebug.sol/ArbDebug.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbFunctionTable.sol/ArbFunctionTable.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbGasInfo.sol/ArbGasInfo.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbInfo.sol/ArbInfo.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbOwner.sol/ArbOwner.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbOwnerPublic.sol/ArbOwnerPublic.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbRetryableTx.sol/ArbRetryableTx.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbStatistics.sol/ArbStatistics.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbSys.sol/ArbSys.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbWasm.sol/ArbWasm.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbWasmCache.sol/ArbWasmCache.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbosActs.sol/ArbosActs.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbosTest.sol/ArbosTest.dbg.json +1 -1
- package/build/contracts/src/rollup/AbsRollupEventInbox.sol/AbsRollupEventInbox.dbg.json +1 -1
- package/build/contracts/src/rollup/Assertion.sol/AssertionNodeLib.dbg.json +4 -0
- package/build/contracts/src/rollup/{Node.sol/NodeLib.json → Assertion.sol/AssertionNodeLib.json} +4 -4
- package/build/contracts/src/rollup/AssertionState.sol/AssertionStateLib.dbg.json +4 -0
- package/build/contracts/src/{express-lane-auction/Balance.sol/BalanceLib.json → rollup/AssertionState.sol/AssertionStateLib.json} +4 -4
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/BOLDUpgradeAction.dbg.json +4 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/BOLDUpgradeAction.json +807 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/ConstantArrayStorage.dbg.json +4 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/ConstantArrayStorage.json +35 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/IOldRollup.dbg.json +4 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/IOldRollup.json +361 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/IOldRollupAdmin.dbg.json +4 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/IOldRollupAdmin.json +38 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/ISeqInboxPostUpgradeInit.dbg.json +4 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/ISeqInboxPostUpgradeInit.json +41 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/RollupReader.dbg.json +4 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/RollupReader.json +385 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/StateHashPreImageLookup.dbg.json +4 -0
- package/build/contracts/src/rollup/BOLDUpgradeAction.sol/StateHashPreImageLookup.json +203 -0
- package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.dbg.json +1 -1
- package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.json +62 -10
- package/build/contracts/src/rollup/DeployHelper.sol/DeployHelper.dbg.json +1 -1
- package/build/contracts/src/rollup/DeployHelper.sol/DeployHelper.json +2 -2
- package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.dbg.json +1 -1
- package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.json +2 -2
- package/build/contracts/src/rollup/FactoryDeployerHelper.sol/FactoryDeployerHelper.dbg.json +1 -1
- package/build/contracts/src/rollup/FactoryDeployerHelper.sol/FactoryDeployerHelper.json +2 -2
- package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IDeployHelper.dbg.json +1 -1
- package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IERC20.dbg.json +1 -1
- package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IERC20Bridge.dbg.json +1 -1
- package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IInboxBase.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupAdmin.sol/IRollupAdmin.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupAdmin.sol/IRollupAdmin.json +473 -99
- package/build/contracts/src/rollup/IRollupCore.sol/IRollupCore.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupCore.sol/IRollupCore.json +315 -221
- package/build/contracts/src/rollup/IRollupEventInbox.sol/IRollupEventInbox.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUser.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUser.json +678 -499
- package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.json +806 -435
- package/build/contracts/src/rollup/RollupCore.sol/RollupCore.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupCore.sol/RollupCore.json +323 -235
- package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.json +98 -36
- package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.json +2 -2
- package/build/contracts/src/rollup/RollupLib.sol/RollupLib.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupLib.sol/RollupLib.json +2 -2
- package/build/contracts/src/rollup/RollupProxy.sol/RollupProxy.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupProxy.sol/RollupProxy.json +97 -16
- package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.json +924 -535
- package/build/contracts/src/rollup/ValidatorWallet.sol/ValidatorWallet.dbg.json +1 -1
- package/build/contracts/src/rollup/ValidatorWallet.sol/ValidatorWallet.json +15 -43
- package/build/contracts/src/rollup/ValidatorWalletCreator.sol/ValidatorWalletCreator.dbg.json +1 -1
- package/build/contracts/src/rollup/ValidatorWalletCreator.sol/ValidatorWalletCreator.json +2 -2
- package/build/contracts/src/state/Deserialize.sol/Deserialize.dbg.json +1 -1
- package/build/contracts/src/state/Deserialize.sol/Deserialize.json +2 -2
- package/build/contracts/src/state/GlobalState.sol/GlobalStateLib.dbg.json +1 -1
- package/build/contracts/src/state/GlobalState.sol/GlobalStateLib.json +2 -2
- package/build/contracts/src/state/Instructions.sol/Instructions.dbg.json +1 -1
- package/build/contracts/src/state/Instructions.sol/Instructions.json +2 -2
- package/build/contracts/src/state/Machine.sol/MachineLib.dbg.json +1 -1
- package/build/contracts/src/state/Machine.sol/MachineLib.json +2 -2
- package/build/contracts/src/state/MerkleProof.sol/MerkleProofLib.dbg.json +1 -1
- package/build/contracts/src/state/MerkleProof.sol/MerkleProofLib.json +2 -2
- package/build/contracts/src/state/Module.sol/ModuleLib.dbg.json +1 -1
- package/build/contracts/src/state/Module.sol/ModuleLib.json +2 -2
- package/build/contracts/src/state/ModuleMemory.sol/ModuleMemoryLib.dbg.json +1 -1
- package/build/contracts/src/state/ModuleMemory.sol/ModuleMemoryLib.json +2 -2
- package/build/contracts/src/state/ModuleMemoryCompact.sol/ModuleMemoryCompactLib.dbg.json +1 -1
- package/build/contracts/src/state/ModuleMemoryCompact.sol/ModuleMemoryCompactLib.json +2 -2
- package/build/contracts/src/state/MultiStack.sol/MultiStackLib.dbg.json +1 -1
- package/build/contracts/src/state/MultiStack.sol/MultiStackLib.json +2 -2
- package/build/contracts/src/state/PcArray.sol/PcArrayLib.dbg.json +1 -1
- package/build/contracts/src/state/PcArray.sol/PcArrayLib.json +2 -2
- package/build/contracts/src/state/StackFrame.sol/StackFrameLib.dbg.json +1 -1
- package/build/contracts/src/state/StackFrame.sol/StackFrameLib.json +2 -2
- package/build/contracts/src/state/Value.sol/ValueLib.dbg.json +1 -1
- package/build/contracts/src/state/Value.sol/ValueLib.json +2 -2
- package/build/contracts/src/state/ValueArray.sol/ValueArrayLib.dbg.json +1 -1
- package/build/contracts/src/state/ValueArray.sol/ValueArrayLib.json +2 -2
- package/build/contracts/src/state/ValueStack.sol/ValueStackLib.dbg.json +1 -1
- package/build/contracts/src/state/ValueStack.sol/ValueStackLib.json +2 -2
- package/build/contracts/src/test-helpers/BridgeTester.sol/BridgeTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/BridgeTester.sol/BridgeTester.json +15 -2
- package/build/contracts/src/test-helpers/CryptographyPrimitivesTester.sol/CryptographyPrimitivesTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/CryptographyPrimitivesTester.sol/CryptographyPrimitivesTester.json +2 -2
- package/build/contracts/src/test-helpers/EthVault.sol/EthVault.dbg.json +1 -1
- package/build/contracts/src/test-helpers/EthVault.sol/EthVault.json +2 -2
- package/build/contracts/src/test-helpers/MessageTester.sol/MessageTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/MessageTester.sol/MessageTester.json +2 -2
- package/build/contracts/src/test-helpers/OutboxWithoutOptTester.sol/OutboxWithoutOptTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/OutboxWithoutOptTester.sol/OutboxWithoutOptTester.json +2 -2
- package/build/contracts/src/test-helpers/RollupMock.sol/RollupMock.dbg.json +1 -1
- package/build/contracts/src/test-helpers/RollupMock.sol/RollupMock.json +2 -15
- package/build/contracts/src/test-helpers/TestToken.sol/TestToken.dbg.json +1 -1
- package/build/contracts/src/test-helpers/TestToken.sol/TestToken.json +2 -2
- package/build/contracts/src/test-helpers/ValueArrayTester.sol/ValueArrayTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/ValueArrayTester.sol/ValueArrayTester.json +2 -2
- package/out/yul/Reader4844.yul/Reader4844.json +1 -1
- package/package.json +11 -4
- package/src/assertionStakingPool/AbsBoldStakingPool.sol +66 -0
- package/src/assertionStakingPool/AssertionStakingPool.sol +70 -0
- package/src/assertionStakingPool/AssertionStakingPoolCreator.sol +35 -0
- package/src/assertionStakingPool/EdgeStakingPool.sol +57 -0
- package/src/assertionStakingPool/EdgeStakingPoolCreator.sol +34 -0
- package/src/assertionStakingPool/StakingPoolCreatorUtils.sol +25 -0
- package/src/assertionStakingPool/interfaces/IAbsBoldStakingPool.sol +41 -0
- package/src/assertionStakingPool/interfaces/IAssertionStakingPool.sol +36 -0
- package/src/assertionStakingPool/interfaces/IAssertionStakingPoolCreator.sol +31 -0
- package/src/assertionStakingPool/interfaces/IEdgeStakingPool.sol +27 -0
- package/src/assertionStakingPool/interfaces/IEdgeStakingPoolCreator.sol +28 -0
- package/src/bridge/AbsBridge.sol +38 -48
- package/src/bridge/AbsInbox.sol +89 -92
- package/src/bridge/AbsOutbox.sol +23 -37
- package/src/bridge/Bridge.sol +6 -4
- package/src/bridge/DelayBuffer.sol +123 -0
- package/src/bridge/DelayBufferTypes.sol +38 -0
- package/src/bridge/ERC20Bridge.sol +8 -4
- package/src/bridge/ERC20Inbox.sol +46 -53
- package/src/bridge/ERC20Outbox.sol +7 -3
- package/src/bridge/GasRefunder.sol +38 -24
- package/src/bridge/IBridge.sol +30 -21
- package/src/bridge/IERC20Bridge.sol +1 -1
- package/src/bridge/IERC20Inbox.sol +4 -2
- package/src/bridge/IEthBridge.sol +4 -2
- package/src/bridge/IInbox.sol +4 -2
- package/src/bridge/IInboxBase.sol +16 -8
- package/src/bridge/IOutbox.sol +13 -8
- package/src/bridge/ISequencerInbox.sol +118 -13
- package/src/bridge/Inbox.sol +134 -151
- package/src/bridge/Messages.sol +48 -18
- package/src/bridge/Outbox.sol +6 -2
- package/src/bridge/SequencerInbox.sol +343 -279
- package/src/chain/CacheManager.sol +49 -18
- package/src/challengeV2/EdgeChallengeManager.sol +559 -0
- package/src/challengeV2/IAssertionChain.sol +39 -0
- package/src/challengeV2/IEdgeChallengeManager.sol +233 -0
- package/src/challengeV2/libraries/ArrayUtilsLib.sol +61 -0
- package/src/challengeV2/libraries/ChallengeEdgeLib.sol +277 -0
- package/src/challengeV2/libraries/ChallengeErrors.sol +108 -0
- package/src/challengeV2/libraries/EdgeChallengeManagerLib.sol +819 -0
- package/src/challengeV2/libraries/Enums.sol +26 -0
- package/src/challengeV2/libraries/MerkleTreeAccumulatorLib.sol +390 -0
- package/src/challengeV2/libraries/Structs.sol +176 -0
- package/src/challengeV2/libraries/UintUtilsLib.sol +74 -0
- package/src/libraries/AddressAliasHelper.sol +6 -2
- package/src/libraries/AdminFallbackProxy.sol +8 -4
- package/src/libraries/ArbitrumChecker.sol +3 -4
- package/src/libraries/CallerChecker.sol +18 -0
- package/src/libraries/CryptographyPrimitives.sol +39 -46
- package/src/libraries/DecimalsConverterHelper.sol +2 -4
- package/src/libraries/DoubleLogicUUPSUpgradeable.sol +10 -7
- package/src/libraries/Error.sol +21 -3
- package/src/libraries/GasRefundEnabled.sol +5 -6
- package/src/libraries/MerkleLib.sol +6 -5
- package/src/libraries/UUPSNotUpgradeable.sol +2 -4
- package/src/mocks/BridgeStub.sol +50 -48
- package/src/mocks/CreateTest.sol +3 -1
- package/src/mocks/HostioTest.sol +20 -16
- package/src/mocks/InboxStub.sol +22 -17
- package/src/mocks/MerkleTreeAccess.sol +72 -0
- package/src/mocks/MockRollupEventInbox.sol +59 -0
- package/src/mocks/MultiCallTest.sol +3 -1
- package/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol +3 -1
- package/src/mocks/Program.sol +9 -7
- package/src/mocks/SequencerInboxBlobMock.sol +38 -0
- package/src/mocks/SequencerInboxStub.sol +9 -12
- package/src/mocks/Simple.sol +13 -25
- package/src/mocks/SimpleCacheManager.sol +10 -3
- package/src/mocks/SimpleOneStepProofEntry.sol +60 -0
- package/src/mocks/SimpleProxy.sol +3 -1
- package/src/mocks/TestWETH9.sol +30 -0
- package/src/mocks/UpgradeExecutorMock.sol +10 -17
- package/src/node-interface/NodeInterface.sol +23 -22
- package/src/node-interface/NodeInterfaceDebug.sol +5 -3
- package/src/osp/HashProofHelper.sol +9 -10
- package/src/osp/IOneStepProofEntry.sol +14 -9
- package/src/osp/IOneStepProver.sol +1 -0
- package/src/osp/OneStepProofEntry.sol +63 -54
- package/src/osp/OneStepProver0.sol +14 -27
- package/src/osp/OneStepProverHostIo.sol +31 -58
- package/src/osp/OneStepProverMath.sol +15 -23
- package/src/osp/OneStepProverMemory.sol +9 -23
- package/src/precompiles/ArbAddressTable.sol +19 -9
- package/src/precompiles/ArbAggregator.sol +12 -4
- package/src/precompiles/ArbBLS.sol +1 -3
- package/src/precompiles/ArbDebug.sol +5 -11
- package/src/precompiles/ArbFunctionTable.sol +7 -10
- package/src/precompiles/ArbGasInfo.sol +9 -43
- package/src/precompiles/ArbInfo.sol +6 -2
- package/src/precompiles/ArbOwner.sol +101 -34
- package/src/precompiles/ArbOwnerPublic.sol +6 -2
- package/src/precompiles/ArbRetryableTx.sol +15 -5
- package/src/precompiles/ArbStatistics.sol +1 -8
- package/src/precompiles/ArbSys.sol +16 -18
- package/src/precompiles/ArbWasm.sol +24 -14
- package/src/precompiles/ArbWasmCache.sol +15 -5
- package/src/precompiles/ArbosTest.sol +3 -1
- package/src/rollup/AbsRollupEventInbox.sol +15 -16
- package/src/rollup/Assertion.sol +100 -0
- package/src/rollup/AssertionState.sol +29 -0
- package/src/rollup/BOLDUpgradeAction.sol +631 -0
- package/src/rollup/BridgeCreator.sol +42 -15
- package/src/rollup/Config.sol +15 -7
- package/src/rollup/DeployHelper.sol +12 -31
- package/src/rollup/ERC20RollupEventInbox.sol +8 -9
- package/src/rollup/FactoryDeployerHelper.sol +8 -10
- package/src/rollup/IRollupAdmin.sol +127 -45
- package/src/rollup/IRollupCore.sol +64 -84
- package/src/rollup/IRollupEventInbox.sol +3 -1
- package/src/rollup/IRollupLogic.sol +35 -72
- package/src/rollup/RollupAdminLogic.sol +224 -203
- package/src/rollup/RollupCore.sol +407 -428
- package/src/rollup/RollupCreator.sol +84 -71
- package/src/rollup/RollupEventInbox.sol +7 -7
- package/src/rollup/RollupLib.sol +50 -86
- package/src/rollup/RollupProxy.sol +8 -12
- package/src/rollup/RollupUserLogic.sol +279 -644
- package/src/rollup/ValidatorUtils.sol +0 -242
- package/src/rollup/ValidatorWallet.sol +22 -38
- package/src/rollup/ValidatorWalletCreator.sol +8 -8
- package/src/state/Deserialize.sol +74 -96
- package/src/state/GlobalState.sol +74 -20
- package/src/state/Instructions.sol +4 -3
- package/src/state/Machine.sol +18 -19
- package/src/state/Module.sol +14 -13
- package/src/state/ModuleMemory.sol +6 -25
- package/src/state/ModuleMemoryCompact.sol +3 -1
- package/src/state/MultiStack.sol +16 -20
- package/src/state/PcArray.sol +7 -7
- package/src/state/StackFrame.sol +21 -14
- package/src/state/Value.sol +18 -6
- package/src/state/ValueArray.sol +7 -7
- package/src/state/ValueStack.sol +9 -3
- package/src/test-helpers/BridgeTester.sol +32 -42
- package/src/test-helpers/CryptographyPrimitivesTester.sol +12 -13
- package/src/test-helpers/EthVault.sol +4 -2
- package/src/test-helpers/InterfaceCompatibilityTester.sol +1 -1
- package/src/test-helpers/MessageTester.sol +3 -10
- package/src/test-helpers/OutboxWithoutOptTester.sol +12 -19
- package/src/test-helpers/RollupMock.sol +3 -7
- package/src/test-helpers/TestToken.sol +4 -2
- package/build/contracts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol/AccessControlEnumerableUpgradeable.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol/AccessControlEnumerableUpgradeable.json +0 -258
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol/IAccessControlEnumerableUpgradeable.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol/IAccessControlEnumerableUpgradeable.json +0 -226
- package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.json +0 -281
- package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol/ERC20BurnableUpgradeable.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol/ERC20BurnableUpgradeable.json +0 -312
- package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol/IERC20MetadataUpgradeable.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol/ECDSAUpgradeable.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol/ECDSAUpgradeable.json +0 -10
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol/EIP712Upgradeable.dbg.json +0 -4
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol/EIP712Upgradeable.json +0 -10
- package/build/contracts/src/challenge/ChallengeLib.sol/ChallengeLib.dbg.json +0 -4
- package/build/contracts/src/challenge/ChallengeManager.sol/ChallengeManager.dbg.json +0 -4
- package/build/contracts/src/challenge/ChallengeManager.sol/ChallengeManager.json +0 -746
- package/build/contracts/src/challenge/IChallengeManager.sol/IChallengeManager.dbg.json +0 -4
- package/build/contracts/src/challenge/IChallengeManager.sol/IChallengeManager.json +0 -441
- package/build/contracts/src/challenge/IChallengeResultReceiver.sol/IChallengeResultReceiver.dbg.json +0 -4
- package/build/contracts/src/challenge/IChallengeResultReceiver.sol/IChallengeResultReceiver.json +0 -34
- package/build/contracts/src/express-lane-auction/Balance.sol/BalanceLib.dbg.json +0 -4
- package/build/contracts/src/express-lane-auction/Burner.sol/Burner.dbg.json +0 -4
- package/build/contracts/src/express-lane-auction/Burner.sol/Burner.json +0 -47
- package/build/contracts/src/express-lane-auction/ELCRound.sol/LatestELCRoundsLib.dbg.json +0 -4
- package/build/contracts/src/express-lane-auction/ExpressLaneAuction.sol/ExpressLaneAuction.dbg.json +0 -4
- package/build/contracts/src/express-lane-auction/ExpressLaneAuction.sol/ExpressLaneAuction.json +0 -1588
- package/build/contracts/src/express-lane-auction/IExpressLaneAuction.sol/IExpressLaneAuction.dbg.json +0 -4
- package/build/contracts/src/express-lane-auction/IExpressLaneAuction.sol/IExpressLaneAuction.json +0 -1296
- package/build/contracts/src/express-lane-auction/RoundTimingInfo.sol/RoundTimingInfoLib.dbg.json +0 -4
- package/build/contracts/src/express-lane-auction/RoundTimingInfo.sol/RoundTimingInfoLib.json +0 -10
- package/build/contracts/src/mocks/MockResultReceiver.sol/MockResultReceiver.dbg.json +0 -4
- package/build/contracts/src/mocks/MockResultReceiver.sol/MockResultReceiver.json +0 -188
- package/build/contracts/src/mocks/SingleExecutionChallenge.sol/SingleExecutionChallenge.dbg.json +0 -4
- package/build/contracts/src/mocks/SingleExecutionChallenge.sol/SingleExecutionChallenge.json +0 -797
- package/build/contracts/src/mocks/TimedOutChallengeManager.sol/TimedOutChallengeManager.dbg.json +0 -4
- package/build/contracts/src/mocks/TimedOutChallengeManager.sol/TimedOutChallengeManager.json +0 -746
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserAbs.dbg.json +0 -4
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserAbs.json +0 -1332
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserERC20.dbg.json +0 -4
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserERC20.json +0 -1466
- package/build/contracts/src/rollup/Node.sol/NodeLib.dbg.json +0 -4
- package/build/contracts/src/rollup/RollupUserLogic.sol/AbsRollupUserLogic.dbg.json +0 -4
- package/build/contracts/src/rollup/RollupUserLogic.sol/AbsRollupUserLogic.json +0 -1614
- package/build/contracts/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic.dbg.json +0 -4
- package/build/contracts/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic.json +0 -1748
- package/build/contracts/src/rollup/ValidatorUtils.sol/ValidatorUtils.dbg.json +0 -4
- package/build/contracts/src/rollup/ValidatorUtils.sol/ValidatorUtils.json +0 -379
- package/src/challenge/ChallengeLib.sol +0 -88
- package/src/challenge/ChallengeManager.sol +0 -375
- package/src/challenge/IChallengeManager.sol +0 -86
- package/src/challenge/IChallengeResultReceiver.sol +0 -13
- package/src/express-lane-auction/Balance.sol +0 -142
- package/src/express-lane-auction/Burner.sol +0 -25
- package/src/express-lane-auction/ELCRound.sol +0 -73
- package/src/express-lane-auction/Errors.sol +0 -31
- package/src/express-lane-auction/ExpressLaneAuction.sol +0 -565
- package/src/express-lane-auction/IExpressLaneAuction.sol +0 -421
- package/src/express-lane-auction/RoundTimingInfo.sol +0 -115
- package/src/mocks/MockResultReceiver.sol +0 -59
- package/src/mocks/SingleExecutionChallenge.sol +0 -41
- package/src/mocks/TimedOutChallengeManager.sol +0 -13
- package/src/rollup/Node.sol +0 -113
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2023, Offchain Labs, Inc.
|
|
2
|
+
// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE
|
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
4
|
+
//
|
|
5
|
+
pragma solidity ^0.8.17;
|
|
6
|
+
|
|
7
|
+
/// @notice The status of the edge
|
|
8
|
+
/// - Pending: Yet to be confirmed. Not all edges can be confirmed.
|
|
9
|
+
/// - Confirmed: Once confirmed it cannot transition back to pending
|
|
10
|
+
enum EdgeStatus {
|
|
11
|
+
Pending,
|
|
12
|
+
Confirmed
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// @notice The type of the edge. Challenges are decomposed into 3 types of subchallenge
|
|
16
|
+
/// represented here by the edge type. Edges are initially created of type Block
|
|
17
|
+
/// and are then bisected until they have length one. After that new BigStep edges are
|
|
18
|
+
/// added that claim a Block type edge, and are then bisected until they have length one.
|
|
19
|
+
/// Then a SmallStep edge is added that claims a length one BigStep edge, and these
|
|
20
|
+
/// SmallStep edges are bisected until they reach length one. A length one small step edge
|
|
21
|
+
/// can then be directly executed using a one-step proof.
|
|
22
|
+
enum EdgeType {
|
|
23
|
+
Block,
|
|
24
|
+
BigStep,
|
|
25
|
+
SmallStep
|
|
26
|
+
}
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
// Copyright 2023, Offchain Labs, Inc.
|
|
2
|
+
// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE
|
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
4
|
+
//
|
|
5
|
+
pragma solidity ^0.8.17;
|
|
6
|
+
|
|
7
|
+
import "../../libraries/MerkleLib.sol";
|
|
8
|
+
import "./ArrayUtilsLib.sol";
|
|
9
|
+
import "./UintUtilsLib.sol";
|
|
10
|
+
|
|
11
|
+
/// @title Merkle tree accumulator utilities
|
|
12
|
+
/// @notice
|
|
13
|
+
/// This library provides utilities for manipulating, and verifying proofs about, a kind of
|
|
14
|
+
/// merkle tree accumulator.
|
|
15
|
+
///
|
|
16
|
+
/// --------------------------------------------------------------------------------------------
|
|
17
|
+
/// The accumulator is composed of a number of complete merkle trees.
|
|
18
|
+
/// A complete tree is a tree with a leaf size of a power of 2
|
|
19
|
+
/// One or zero complete trees at each power of 2 is enough to define any size of accumulator.
|
|
20
|
+
/// The root of the accumulator is defined as the cumulative hashing of all of the
|
|
21
|
+
/// roots of each of its complete trees, substituting a zero where no tree is necessary at that power of 2
|
|
22
|
+
/// Where we refer to "level" in this documentation we mean the power of 2 used at the level: 2^level
|
|
23
|
+
/// Where we refer to a subtree we mean one of the complete trees which makes up the accumulator.
|
|
24
|
+
/// ---------
|
|
25
|
+
/// eg. Below are 3 leaves (A, B, C) which can be represented as an accumulator made up of the
|
|
26
|
+
/// composition of 2 complete subtrees, one of level=1: 2^1=2 (AB) and one of level=0: 2^0=1 (C).
|
|
27
|
+
/// AB
|
|
28
|
+
/// / \
|
|
29
|
+
/// A B C
|
|
30
|
+
///
|
|
31
|
+
///
|
|
32
|
+
/// Merkle expansions and roots
|
|
33
|
+
/// --------------------------------------------------------------------------------------------
|
|
34
|
+
/// The minimal amount of information we need to keep in order to compute the accumulator
|
|
35
|
+
/// is the roots of each of its complete subtrees, and the levels of each of those subtrees
|
|
36
|
+
/// A "merkle expansion" (ME) is a representation of this information - it is a vector of roots of each complete subtree,
|
|
37
|
+
/// the level of the tree being the index in the vector, the subtree root being the value.
|
|
38
|
+
/// The accumulator root is calculated by hashing each of the levels of the subtree together, adding zero hashes
|
|
39
|
+
/// where relevant to make a balanced tree.
|
|
40
|
+
/// ---------
|
|
41
|
+
///
|
|
42
|
+
/// ME Example 1 - 1 leaf C
|
|
43
|
+
///
|
|
44
|
+
/// C => (C)
|
|
45
|
+
///
|
|
46
|
+
/// ME of the C tree = (C), accumulator=(C)
|
|
47
|
+
/// The merkle expansion of an accumulator consisting of a single leaf is vector of size one with the
|
|
48
|
+
/// zeroth index being the leaf C. The zeroth index of the vector represents the presence of a size
|
|
49
|
+
/// one complete subtree in the accumulator. So if an accumulator has a size one complete subtree as part
|
|
50
|
+
/// of its composition, the root of that size one accumulator will be present in the zeroth index.
|
|
51
|
+
///
|
|
52
|
+
/// ME Example 2 - 2 leaves A and B
|
|
53
|
+
///
|
|
54
|
+
/// AB
|
|
55
|
+
/// / \
|
|
56
|
+
/// A B
|
|
57
|
+
///
|
|
58
|
+
/// ME of the AB tree = (0, AB), accumulator=AB
|
|
59
|
+
/// The merkle expansion of an accumulator consisting of a single size 2 complete subtree is a vector
|
|
60
|
+
/// of size 2, with the zeroth index value being 0, and the 1st index value being the root of the size
|
|
61
|
+
/// 2 subtree. The zero in the zeroth index indicated that there is not a size 1 subtree in the accumulators's
|
|
62
|
+
/// composition. If an accumulator has a size 2 subtree in its composition the root of the subtree will be present in the
|
|
63
|
+
/// 1st index.
|
|
64
|
+
///
|
|
65
|
+
/// ME Example 3 - 3 leaves A, B, C
|
|
66
|
+
///
|
|
67
|
+
/// AB
|
|
68
|
+
/// / \
|
|
69
|
+
/// A B C
|
|
70
|
+
///
|
|
71
|
+
/// ME of the composed ABC tree = (C, AB), accumulator=hash(AB, hash(C, 0)).
|
|
72
|
+
/// When a accumulator size is not a power of 2, a composition of subtrees is used to calculate it's value.
|
|
73
|
+
/// The lowest level sub tree is hashed with zero, to form the initial accumulator. The accumulator is then
|
|
74
|
+
/// hashed with the value (including zeros) at each level of the expansion.
|
|
75
|
+
/// The merkle expansion of this composed tree is a vector of size two. Since it has a size one tree in
|
|
76
|
+
/// its composition, the root of which goes in the zeroth index of the expansion - C, and since it has a
|
|
77
|
+
/// size two tree in its composition the root of that goes in the 1st index, to give (C, AB).
|
|
78
|
+
///
|
|
79
|
+
/// Tree operations
|
|
80
|
+
/// --------------------------------------------------------------------------------------------
|
|
81
|
+
/// Accumulators are modified by adding or subtracting complete subtrees, however this library
|
|
82
|
+
/// supports additive only accumulators since we dont have a specific use for subtraction at the moment.
|
|
83
|
+
/// We call adding a complete subtree to an accumulator "appending", appending has the following
|
|
84
|
+
/// rules:
|
|
85
|
+
/// 1. Only a complete sub trees can be appended
|
|
86
|
+
/// 2. Complete sub trees can only be appended at the level of the lowest complete subtree in the tree, or below
|
|
87
|
+
/// 3. If the existing accumulator is empty a sub tree can be appended at any level
|
|
88
|
+
/// When appending a sub tree we may increase the size of the merkle expansion vector, in the same
|
|
89
|
+
/// way that adding 1 to a binary number may increase the index of its most significant bit
|
|
90
|
+
/// ---------
|
|
91
|
+
/// eg. A complete subtree can only be appended to the ABC accumulator at level 0, since the its lowest complete
|
|
92
|
+
/// subtree (C) is at level 0. Doing so would create a complete sub tree at level 1, which would in turn
|
|
93
|
+
/// cause the creation of new size 4 sub tree
|
|
94
|
+
///
|
|
95
|
+
/// ABCD
|
|
96
|
+
/// / \
|
|
97
|
+
/// AB AB CD
|
|
98
|
+
/// / \ + = / \ / \
|
|
99
|
+
/// A B C D A B C D
|
|
100
|
+
///
|
|
101
|
+
/// ME of ABCD = (0, AB) + (C) + (D)
|
|
102
|
+
/// = (C, AB) + (D)
|
|
103
|
+
/// = (0, 0, ABCD)
|
|
104
|
+
/// accumulator of ABCD = hash(AB, CD)
|
|
105
|
+
/// --------------------------------------------------------------------------------------------
|
|
106
|
+
library MerkleTreeAccumulatorLib {
|
|
107
|
+
// the go code uses uint64, so we ensure we never go above that here
|
|
108
|
+
uint256 public constant MAX_LEVEL = 64;
|
|
109
|
+
|
|
110
|
+
/// @notice The accumulator root of the a merkle expansion.
|
|
111
|
+
/// @dev The accumulator root is defined as the cumulative hashing of the
|
|
112
|
+
/// roots of all of its subtrees. Throws error for an empty merkle expansion
|
|
113
|
+
/// @param me The merkle expansion to calculate the root of
|
|
114
|
+
function root(
|
|
115
|
+
bytes32[] memory me
|
|
116
|
+
) internal pure returns (bytes32) {
|
|
117
|
+
require(me.length > 0, "Empty merkle expansion");
|
|
118
|
+
require(me.length <= MAX_LEVEL, "Merkle expansion too large");
|
|
119
|
+
|
|
120
|
+
bytes32 accum = 0;
|
|
121
|
+
for (uint256 i = 0; i < me.length; i++) {
|
|
122
|
+
bytes32 val = me[i];
|
|
123
|
+
if (accum == 0) {
|
|
124
|
+
if (val != 0) {
|
|
125
|
+
accum = val;
|
|
126
|
+
|
|
127
|
+
// the tree is balanced if the only non zero entry in the merkle extension
|
|
128
|
+
// is the last entry
|
|
129
|
+
// otherwise the lowest level entry needs to be combined with a zero to balance the bottom
|
|
130
|
+
// level, after which zeros in the merkle extension above that will balance the rest
|
|
131
|
+
if (i != me.length - 1) {
|
|
132
|
+
accum = keccak256(abi.encodePacked(accum, bytes32(0)));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
} else if (val != 0) {
|
|
136
|
+
// accum represents the smaller sub trees, since it is earlier in the expansion
|
|
137
|
+
// we put the larger subtrees on the left
|
|
138
|
+
accum = keccak256(abi.encodePacked(val, accum));
|
|
139
|
+
} else {
|
|
140
|
+
// by definition we always complete trees by appending zeros to the right
|
|
141
|
+
accum = keccak256(abi.encodePacked(accum, bytes32(0)));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return accum;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/// @notice Append a complete subtree to an existing accumulator
|
|
149
|
+
/// @dev See above description of the accumulator for rules on how appending can occur.
|
|
150
|
+
/// Briefly, appending works like binary addition only that the value being added must be an
|
|
151
|
+
/// exact power of two (complete), and must equal to or less than the least significant bit
|
|
152
|
+
/// in the existing tree.
|
|
153
|
+
/// If the me is empty, will just append directly.
|
|
154
|
+
/// @param me The merkle expansion to append a complete sub tree to
|
|
155
|
+
/// @param level The level at which to append the complete subtree
|
|
156
|
+
/// @param subtreeRoot The root of the complete subtree to be appended
|
|
157
|
+
function appendCompleteSubTree(
|
|
158
|
+
bytes32[] memory me,
|
|
159
|
+
uint256 level,
|
|
160
|
+
bytes32 subtreeRoot
|
|
161
|
+
) internal pure returns (bytes32[] memory) {
|
|
162
|
+
// we use number representations of the levels elsewhere, so we need to ensure we're appending a leve
|
|
163
|
+
// that's too high to use in uint
|
|
164
|
+
require(level < MAX_LEVEL, "Level too high");
|
|
165
|
+
require(subtreeRoot != 0, "Cannot append empty subtree");
|
|
166
|
+
require(me.length <= MAX_LEVEL, "Merkle expansion too large");
|
|
167
|
+
|
|
168
|
+
if (me.length == 0) {
|
|
169
|
+
bytes32[] memory empty = new bytes32[](level + 1);
|
|
170
|
+
empty[level] = subtreeRoot;
|
|
171
|
+
return empty;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// This technically isn't necessary since it would be caught by the i < level check
|
|
175
|
+
// on the last loop of the for-loop below, but we add it for a clearer error message
|
|
176
|
+
require(level < me.length, "Level greater than highest level of current expansion");
|
|
177
|
+
|
|
178
|
+
bytes32 accumHash = subtreeRoot;
|
|
179
|
+
uint256 meSize = treeSize(me);
|
|
180
|
+
uint256 postSize = meSize + 2 ** level;
|
|
181
|
+
|
|
182
|
+
// if by appending the sub tree we increase the numbe of most sig bits of the size, that means
|
|
183
|
+
// we'll need more space in the expansion to describe the tree, so we enlarge by one
|
|
184
|
+
bytes32[] memory next = UintUtilsLib.mostSignificantBit(postSize)
|
|
185
|
+
> UintUtilsLib.mostSignificantBit(meSize)
|
|
186
|
+
? new bytes32[](me.length + 1)
|
|
187
|
+
: new bytes32[](me.length);
|
|
188
|
+
|
|
189
|
+
// ensure we're never creating an expansion that's too big
|
|
190
|
+
require(next.length <= MAX_LEVEL, "Append creates oversize tree");
|
|
191
|
+
|
|
192
|
+
// loop through all the levels in self and try to append the new subtree
|
|
193
|
+
// since each node has two children by appending a subtree we may complete another one
|
|
194
|
+
// in the level above. So we move through the levels updating the result at each level
|
|
195
|
+
for (uint256 i = 0; i < me.length; i++) {
|
|
196
|
+
// we can only append at the level of the smallest complete sub tree or below
|
|
197
|
+
// appending above this level would mean create "holes" in the tree
|
|
198
|
+
// we can find the smallest complete sub tree by looking for the first entry in the merkle expansion
|
|
199
|
+
if (i < level) {
|
|
200
|
+
// we're below the level we want to append - no complete sub trees allowed down here
|
|
201
|
+
// if the level is 0 there are no complete subtrees, and we therefore cannot be too low
|
|
202
|
+
require(me[i] == 0, "Append above least significant bit");
|
|
203
|
+
} else {
|
|
204
|
+
// we're at or above the level
|
|
205
|
+
if (accumHash == 0) {
|
|
206
|
+
// no more changes to propagate upwards - just fill the tree
|
|
207
|
+
next[i] = me[i];
|
|
208
|
+
} else {
|
|
209
|
+
// we have a change to propagate
|
|
210
|
+
if (me[i] == 0) {
|
|
211
|
+
// if the level is currently empty we can just add the change
|
|
212
|
+
next[i] = accumHash;
|
|
213
|
+
// and then there's nothing more to propagate
|
|
214
|
+
accumHash = 0;
|
|
215
|
+
} else {
|
|
216
|
+
// if the level is not currently empty then we combine it with propagation
|
|
217
|
+
// change, and propagate that to the level above. This level is now part of a complete subtree
|
|
218
|
+
// so we zero it out
|
|
219
|
+
next[i] = 0;
|
|
220
|
+
accumHash = keccak256(abi.encodePacked(me[i], accumHash));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// we had a final change to propagate above the existing highest complete sub tree
|
|
227
|
+
// so we have a new highest complete sub tree in the level above - this was why we
|
|
228
|
+
// increased the storeage above
|
|
229
|
+
if (accumHash != 0) {
|
|
230
|
+
next[next.length - 1] = accumHash;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// it should never be possible to achieve this ever we sized the array correctly
|
|
234
|
+
// so this is just a sanity check
|
|
235
|
+
require(next[next.length - 1] != 0, "Last entry zero");
|
|
236
|
+
|
|
237
|
+
return next;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/// @notice Append a leaf to a merkle expansion
|
|
241
|
+
/// @dev Leaves are just complete subtrees at level 0, however we hash the leaf before putting it
|
|
242
|
+
/// into the tree to avoid root collisions.
|
|
243
|
+
/// @param me The merkle expansion to append a leaf to
|
|
244
|
+
/// @param leaf The leaf to append - will be hashed in here before appending
|
|
245
|
+
function appendLeaf(
|
|
246
|
+
bytes32[] memory me,
|
|
247
|
+
bytes32 leaf
|
|
248
|
+
) internal pure returns (bytes32[] memory) {
|
|
249
|
+
// it's important that we hash the leaf, this ensures that this leaf cannot be a collision with any other non leaf
|
|
250
|
+
// or root node, since these are always the hash of 64 bytes of data, and we're hashing 32 bytes
|
|
251
|
+
return appendCompleteSubTree(me, 0, keccak256(abi.encodePacked(leaf)));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/// @notice Find the highest level which can be appended to an accumulator of size startSize without
|
|
255
|
+
/// creating a tree with size greater than end size (inclusive)
|
|
256
|
+
/// @dev Subtrees can only be appended according to certain rules, see tree description at top of file
|
|
257
|
+
/// for details. A subtree can only be appended if it is at the same level, or below, the current lowest
|
|
258
|
+
/// subtree in the expansion
|
|
259
|
+
/// @param startSize The size of the start tree to find the maximum append to
|
|
260
|
+
/// @param endSize The size of the end tree to find a maximum append under
|
|
261
|
+
function maximumAppendBetween(
|
|
262
|
+
uint256 startSize,
|
|
263
|
+
uint256 endSize
|
|
264
|
+
) internal pure returns (uint256) {
|
|
265
|
+
// The accumulator can be represented in the same way as a binary representation of a number
|
|
266
|
+
// As described above, subtrees can only be appended to a tree if they are at the same level, or below,
|
|
267
|
+
// the current lowest subtree.
|
|
268
|
+
// In this function we want to find the level of the highest tree that can be appended to the current
|
|
269
|
+
// accumulator, without the resulting accumulator size surpassing the end point. We do this by looking at the difference
|
|
270
|
+
// between the start and end size, and iteratively reducing it in the maximal way.
|
|
271
|
+
|
|
272
|
+
// The start and end size will share some higher order bits, below that they differ, and it is this
|
|
273
|
+
// difference that we need to fill in the minimum number of appends
|
|
274
|
+
// startSize looks like: xxxxxxyyyy
|
|
275
|
+
// endSize looks like: xxxxxxzzzz
|
|
276
|
+
// where x are the complete sub trees they share, and y and z are the subtrees they dont
|
|
277
|
+
|
|
278
|
+
require(startSize < endSize, "Start not less than end");
|
|
279
|
+
|
|
280
|
+
// remove the high order bits that are shared
|
|
281
|
+
uint256 msb = UintUtilsLib.mostSignificantBit(startSize ^ endSize);
|
|
282
|
+
uint256 mask = (1 << (msb) + 1) - 1;
|
|
283
|
+
uint256 y = startSize & mask;
|
|
284
|
+
uint256 z = endSize & mask;
|
|
285
|
+
|
|
286
|
+
// Since in the verification we will be appending at start size, the highest level at which we
|
|
287
|
+
// can append is the lowest complete subtree - the least significant bit
|
|
288
|
+
if (y != 0) {
|
|
289
|
+
return UintUtilsLib.leastSignificantBit(y);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// y == 0, therefore we can append at any of levels where start and end differ
|
|
293
|
+
// The highest level that we can append at without surpassing the end, is the most significant
|
|
294
|
+
// bit of the end
|
|
295
|
+
if (z != 0) {
|
|
296
|
+
return UintUtilsLib.mostSignificantBit(z);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// since we enforce that start < end, we know that y and z cannot both be 0
|
|
300
|
+
revert("Both y and z cannot be zero");
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/// @notice Calculate the full tree size represented by a merkle expansion
|
|
304
|
+
/// @param me The merkle expansion to calculate the tree size of
|
|
305
|
+
function treeSize(
|
|
306
|
+
bytes32[] memory me
|
|
307
|
+
) internal pure returns (uint256) {
|
|
308
|
+
uint256 sum = 0;
|
|
309
|
+
for (uint256 i = 0; i < me.length; i++) {
|
|
310
|
+
if (me[i] != 0) {
|
|
311
|
+
sum += 2 ** i;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return sum;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/// @notice Verify that a pre-accumulator-root commits to a prefix of the leaves committed by a post-accumulator-root
|
|
318
|
+
/// @dev Verifies by appending sub trees to the pre accumulator until we get to the size of the post accumulator
|
|
319
|
+
/// and then checking that the root of the calculated post accumulator is equal to the supplied one
|
|
320
|
+
/// @param preRoot The root of the accumulator which is a prefix of the post accumulator
|
|
321
|
+
/// @param preSize The size of the pre-accumulator
|
|
322
|
+
/// @param postRoot The root the post-accumulator - the accumulator which we're proving pre is a prefix of
|
|
323
|
+
/// @param postSize The size of the post-accumulator
|
|
324
|
+
/// @param preExpansion The merkle expansion of the pre-accumulator
|
|
325
|
+
/// @param proof The proof is the minimum set of complete subtree hashes that can be appended to
|
|
326
|
+
/// the accumulator-tree in order to form the post accumulator
|
|
327
|
+
/// The first entry in the proof will be appended at the level of the first non-zero entry in the pre-expansion.
|
|
328
|
+
/// The second entry will then be appended to the the first non zero entry in the resulting expansion and so on, until
|
|
329
|
+
/// appending a sub tree will create a tree of greater that the post size. Then, starting at the highest level,
|
|
330
|
+
/// the next entry in the proof is attempted to be appended to the expansion, but the result is only accepted if has a size
|
|
331
|
+
/// less than or equal the post-size. This continues until all proof entries have been used up.
|
|
332
|
+
/// The resulting expansion is then checked to see if it equals the provided post-root
|
|
333
|
+
function verifyPrefixProof(
|
|
334
|
+
bytes32 preRoot,
|
|
335
|
+
uint256 preSize,
|
|
336
|
+
bytes32 postRoot,
|
|
337
|
+
uint256 postSize,
|
|
338
|
+
bytes32[] memory preExpansion,
|
|
339
|
+
bytes32[] memory proof
|
|
340
|
+
) internal pure {
|
|
341
|
+
require(preSize > 0, "Pre-size cannot be 0");
|
|
342
|
+
require(root(preExpansion) == preRoot, "Pre expansion root mismatch");
|
|
343
|
+
require(treeSize(preExpansion) == preSize, "Pre size does not match expansion");
|
|
344
|
+
require(preSize < postSize, "Pre size not less than post size");
|
|
345
|
+
|
|
346
|
+
uint256 size = preSize;
|
|
347
|
+
uint256 proofIndex = 0;
|
|
348
|
+
// we clone here to avoid mutating the input arguments
|
|
349
|
+
// which could be unexpected for callers
|
|
350
|
+
bytes32[] memory exp = ArrayUtilsLib.slice(preExpansion, 0, preExpansion.length);
|
|
351
|
+
|
|
352
|
+
// Iteratively append a tree at the maximum possible level until we get to the post size
|
|
353
|
+
while (size < postSize) {
|
|
354
|
+
uint256 level = maximumAppendBetween(size, postSize);
|
|
355
|
+
|
|
356
|
+
require(proofIndex < proof.length, "Index out of range");
|
|
357
|
+
exp = appendCompleteSubTree(exp, level, proof[proofIndex]);
|
|
358
|
+
|
|
359
|
+
uint256 numLeaves = 1 << level;
|
|
360
|
+
size += numLeaves;
|
|
361
|
+
assert(size <= postSize);
|
|
362
|
+
proofIndex++;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Check that the calculated root is equal to the provided post root
|
|
366
|
+
require(root(exp) == postRoot, "Post expansion root not equal post");
|
|
367
|
+
|
|
368
|
+
// ensure that we consumed the full proof
|
|
369
|
+
// this is just a safety check to guard against mistakenly supplied args
|
|
370
|
+
require(proofIndex == proof.length, "Incomplete proof usage");
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/// @notice Using the provided proof verify that the provided leaf is included in the roothash of a complete tree at
|
|
374
|
+
/// the specified index. Note that here we use a 0-indexed value for the leaf number, whereas
|
|
375
|
+
/// elsewhere we use size.
|
|
376
|
+
/// @param rootHash The root hash to prove inclusion in
|
|
377
|
+
/// @param leaf The leaf preimage to prove inclusion - will be hashed in here before checking inclusion
|
|
378
|
+
/// @param index The index of the leaf in the tree
|
|
379
|
+
/// @param proof The path from the leaf to the root
|
|
380
|
+
function verifyInclusionProof(
|
|
381
|
+
bytes32 rootHash,
|
|
382
|
+
bytes32 leaf,
|
|
383
|
+
uint256 index,
|
|
384
|
+
bytes32[] memory proof
|
|
385
|
+
) internal pure {
|
|
386
|
+
bytes32 calculatedRoot =
|
|
387
|
+
MerkleLib.calculateRoot(proof, index, keccak256(abi.encodePacked(leaf)));
|
|
388
|
+
require(rootHash == calculatedRoot, "Invalid inclusion proof");
|
|
389
|
+
}
|
|
390
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// Copyright 2023, Offchain Labs, Inc.
|
|
2
|
+
// For license information, see https://github.com/offchainlabs/bold/blob/main/LICENSE
|
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
4
|
+
//
|
|
5
|
+
pragma solidity ^0.8.0;
|
|
6
|
+
|
|
7
|
+
import "./Enums.sol";
|
|
8
|
+
import "../../rollup/AssertionState.sol";
|
|
9
|
+
|
|
10
|
+
/// @notice An execution state and proof to show that it's valid
|
|
11
|
+
struct AssertionStateData {
|
|
12
|
+
/// @notice An execution state
|
|
13
|
+
AssertionState assertionState;
|
|
14
|
+
/// @notice assertion Hash of the prev assertion
|
|
15
|
+
bytes32 prevAssertionHash;
|
|
16
|
+
/// @notice Inbox accumulator of the assertion
|
|
17
|
+
bytes32 inboxAcc;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/// @notice Data for creating a layer zero edge
|
|
21
|
+
struct CreateEdgeArgs {
|
|
22
|
+
/// @notice The level of edge to be created. Challenges are decomposed into multiple levels.
|
|
23
|
+
/// The first (level 0) being of type Block, followed by n (set by NUM_BIGSTEP_LEVEL) levels of type BigStep, and finally
|
|
24
|
+
/// followed by a single level of type SmallStep. Each level is bisected until an edge
|
|
25
|
+
/// of length one is reached before proceeding to the next level. The first edge in each level (the layer zero edge)
|
|
26
|
+
/// makes a claim about an assertion or assertion in the lower level.
|
|
27
|
+
/// Finally in the last level, a SmallStep edge is added that claims a lower level length one BigStep edge, and these
|
|
28
|
+
/// SmallStep edges are bisected until they reach length one. A length one small step edge
|
|
29
|
+
/// can then be directly executed using a one-step proof.
|
|
30
|
+
uint8 level;
|
|
31
|
+
/// @notice The end history root of the edge to be created
|
|
32
|
+
bytes32 endHistoryRoot;
|
|
33
|
+
/// @notice The end height of the edge to be created.
|
|
34
|
+
/// @dev End height is deterministic for different levels but supplying it here gives the
|
|
35
|
+
/// caller a bit of extra security that they are supplying data for the correct level of edge
|
|
36
|
+
uint256 endHeight;
|
|
37
|
+
/// @notice The edge, or assertion, that is being claimed correct by the newly created edge.
|
|
38
|
+
bytes32 claimId;
|
|
39
|
+
/// @notice Proof that the start history root commits to a prefix of the states that
|
|
40
|
+
/// end history root commits to
|
|
41
|
+
bytes prefixProof;
|
|
42
|
+
/// @notice Edge type specific data
|
|
43
|
+
/// For Block type edges this is the abi encoding of:
|
|
44
|
+
/// bytes32[]: Inclusion proof - proof to show that the end state is the last state in the end history root
|
|
45
|
+
/// AssertionStateData: the before state of the edge
|
|
46
|
+
/// AssertionStateData: the after state of the edge
|
|
47
|
+
/// bytes32 predecessorId: id of the prev assertion
|
|
48
|
+
/// bytes32 inboxAcc: the inbox accumulator of the assertion
|
|
49
|
+
/// For BigStep and SmallStep edges this is the abi encoding of:
|
|
50
|
+
/// bytes32: Start state - first state the edge commits to
|
|
51
|
+
/// bytes32: End state - last state the edge commits to
|
|
52
|
+
/// bytes32[]: Claim start inclusion proof - proof to show the start state is the first state in the claim edge
|
|
53
|
+
/// bytes32[]: Claim end inclusion proof - proof to show the end state is the last state in the claim edge
|
|
54
|
+
/// bytes32[]: Inclusion proof - proof to show that the end state is the last state in the end history root
|
|
55
|
+
bytes proof;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/// @notice Data parsed raw proof data
|
|
59
|
+
struct ProofData {
|
|
60
|
+
/// @notice The first state being committed to by an edge
|
|
61
|
+
bytes32 startState;
|
|
62
|
+
/// @notice The last state being committed to by an edge
|
|
63
|
+
bytes32 endState;
|
|
64
|
+
/// @notice A proof that the end state is included in the edge
|
|
65
|
+
bytes32[] inclusionProof;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// @notice Stores all edges and their rival status
|
|
69
|
+
struct EdgeStore {
|
|
70
|
+
/// @notice A mapping of edge id to edges. Edges are never deleted, only created, and potentially confirmed.
|
|
71
|
+
mapping(bytes32 => ChallengeEdge) edges;
|
|
72
|
+
/// @notice A mapping of mutualId to edge id. Rivals share the same mutual id, and here we
|
|
73
|
+
/// store the edge id of the second edge that was created with the same mutual id - the first rival
|
|
74
|
+
/// When only one edge exists for a specific mutual id then a special magic string hash is stored instead
|
|
75
|
+
/// of the first rival id, to signify that a single edge does exist with this mutual id
|
|
76
|
+
mapping(bytes32 => bytes32) firstRivals;
|
|
77
|
+
/// @notice A mapping of mutualId to the edge id of the confirmed rival with that mutualId
|
|
78
|
+
/// @dev Each group of rivals (edges sharing mutual id) can only have at most one confirmed edge
|
|
79
|
+
mapping(bytes32 => bytes32) confirmedRivals;
|
|
80
|
+
/// @notice A mapping of account -> mutualId -> bool indicating if the account has created a layer zero edge with a mutual id
|
|
81
|
+
mapping(address => mapping(bytes32 => bool)) hasMadeLayerZeroRival;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/// @notice Input data to a one step proof
|
|
85
|
+
struct OneStepData {
|
|
86
|
+
/// @notice The hash of the state that's being executed from
|
|
87
|
+
bytes32 beforeHash;
|
|
88
|
+
/// @notice Proof data to accompany the execution context
|
|
89
|
+
bytes proof;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/// @notice Data about a recently added edge
|
|
93
|
+
struct EdgeAddedData {
|
|
94
|
+
bytes32 edgeId;
|
|
95
|
+
bytes32 mutualId;
|
|
96
|
+
bytes32 originId;
|
|
97
|
+
bytes32 claimId;
|
|
98
|
+
uint256 length;
|
|
99
|
+
uint8 level;
|
|
100
|
+
bool hasRival;
|
|
101
|
+
bool isLayerZero;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/// @notice Data about an assertion that is being claimed by an edge
|
|
105
|
+
/// @dev This extra information that is needed in order to verify that a block edge can be created
|
|
106
|
+
struct AssertionReferenceData {
|
|
107
|
+
/// @notice The id of the assertion - will be used in a sanity check
|
|
108
|
+
bytes32 assertionHash;
|
|
109
|
+
/// @notice The predecessor of the assertion
|
|
110
|
+
bytes32 predecessorId;
|
|
111
|
+
/// @notice Is the assertion pending
|
|
112
|
+
bool isPending;
|
|
113
|
+
/// @notice Does the assertion have a sibling
|
|
114
|
+
bool hasSibling;
|
|
115
|
+
/// @notice The execution state of the predecessor assertion
|
|
116
|
+
AssertionState startState;
|
|
117
|
+
/// @notice The execution state of the assertion being claimed
|
|
118
|
+
AssertionState endState;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/// @notice An edge committing to a range of states. These edges will be bisected, slowly
|
|
122
|
+
/// reducing them in length until they reach length one. At that point new edges of a different
|
|
123
|
+
/// level will be added that claim the result of this edge, or a one step proof will be calculated
|
|
124
|
+
/// if the edge level is already of type SmallStep.
|
|
125
|
+
struct ChallengeEdge {
|
|
126
|
+
/// @notice The origin id is a link from the edge to an edge or assertion at a lower level.
|
|
127
|
+
/// Intuitively all edges with the same origin id agree on the information committed to in the origin id
|
|
128
|
+
/// For a SmallStep edge the origin id is the 'mutual' id of the length one BigStep edge being claimed by the zero layer ancestors of this edge
|
|
129
|
+
/// For a BigStep edge the origin id is the 'mutual' id of the length one Block edge being claimed by the zero layer ancestors of this edge
|
|
130
|
+
/// For a Block edge the origin id is the assertion hash of the assertion that is the root of the challenge - all edges in this challenge agree
|
|
131
|
+
/// that that assertion hash is valid.
|
|
132
|
+
/// The purpose of the origin id is to ensure that only edges that agree on a common start position
|
|
133
|
+
/// are being compared against one another.
|
|
134
|
+
bytes32 originId;
|
|
135
|
+
/// @notice A root of all the states in the history up to the startHeight
|
|
136
|
+
bytes32 startHistoryRoot;
|
|
137
|
+
/// @notice The height of the start history root
|
|
138
|
+
uint256 startHeight;
|
|
139
|
+
/// @notice A root of all the states in the history up to the endHeight. Since endHeight > startHeight, the startHistoryRoot must
|
|
140
|
+
/// commit to a prefix of the states committed to by the endHistoryRoot
|
|
141
|
+
bytes32 endHistoryRoot;
|
|
142
|
+
/// @notice The height of the end history root
|
|
143
|
+
uint256 endHeight;
|
|
144
|
+
/// @notice Edges can be bisected into two children. If this edge has been bisected the id of the
|
|
145
|
+
/// lower child is populated here, until that time this value is 0. The lower child has startHistoryRoot and startHeight
|
|
146
|
+
/// equal to this edge, but endHistoryRoot and endHeight equal to some prefix of the endHistoryRoot of this edge
|
|
147
|
+
bytes32 lowerChildId;
|
|
148
|
+
/// @notice Edges can be bisected into two children. If this edge has been bisected the id of the
|
|
149
|
+
/// upper child is populated here, until that time this value is 0. The upper child has startHistoryRoot and startHeight
|
|
150
|
+
/// equal to some prefix of the endHistoryRoot of this edge, and endHistoryRoot and endHeight equal to this edge
|
|
151
|
+
bytes32 upperChildId;
|
|
152
|
+
/// @notice The edge or assertion in the upper level that this edge claims to be true.
|
|
153
|
+
/// Only populated on zero layer edges
|
|
154
|
+
bytes32 claimId;
|
|
155
|
+
/// @notice The entity that supplied a mini-stake accompanying this edge
|
|
156
|
+
/// Only populated on zero layer edges
|
|
157
|
+
address staker;
|
|
158
|
+
/// @notice The block number when this edge was created
|
|
159
|
+
uint64 createdAtBlock;
|
|
160
|
+
/// @notice The block number at which this edge was confirmed
|
|
161
|
+
/// Zero if not confirmed
|
|
162
|
+
uint64 confirmedAtBlock;
|
|
163
|
+
/// @notice Current status of this edge. All edges are created Pending, and may be updated to Confirmed
|
|
164
|
+
/// Once Confirmed they cannot transition back to Pending
|
|
165
|
+
EdgeStatus status;
|
|
166
|
+
/// @notice The level of this edge.
|
|
167
|
+
/// Level 0 is type Block
|
|
168
|
+
/// Last level (defined by NUM_BIGSTEP_LEVEL + 1) is type SmallStep
|
|
169
|
+
/// All levels in between are of type BigStep
|
|
170
|
+
uint8 level;
|
|
171
|
+
/// @notice Set to true when the staker has been refunded. Can only be set to true if the status is Confirmed
|
|
172
|
+
/// and the staker is non zero.
|
|
173
|
+
bool refunded;
|
|
174
|
+
/// @notice TODO
|
|
175
|
+
uint64 totalTimeUnrivaledCache;
|
|
176
|
+
}
|