From 91a01a952260870feef0d13f755dad8db935a10a Mon Sep 17 00:00:00 2001 From: TucksonDev Date: Mon, 13 Apr 2026 10:50:37 +0100 Subject: [PATCH 1/8] Add new MEL-related variables and functions to Rollup contracts --- src/rollup/IRollupAdmin.sol | 25 ++++++++++++++++++++++ src/rollup/IRollupCore.sol | 11 ++++++++++ src/rollup/RollupAdminLogic.sol | 37 +++++++++++++++++++++++++++++++-- src/rollup/RollupCore.sol | 7 +++++++ 4 files changed, 78 insertions(+), 2 deletions(-) diff --git a/src/rollup/IRollupAdmin.sol b/src/rollup/IRollupAdmin.sol index 9bb48c5f..4de11d4a 100644 --- a/src/rollup/IRollupAdmin.sol +++ b/src/rollup/IRollupAdmin.sol @@ -65,6 +65,11 @@ interface IRollupAdmin { /// @dev Challenge manager was set event ChallengeManagerSet(address challengeManager); + /// @dev MELConfig was set + event MELConfigSet( + uint64 indexed melVersion, address indexed inbox, address indexed sequencerInbox, uint64 activationBlock + ); + function initialize( Config calldata config, ContractDependencies calldata connectedContracts @@ -206,6 +211,14 @@ interface IRollupAdmin { address _sequencerInbox ) external; + /** + * @notice sets the rollup's inbox reference. Does not update the bridge's view. + * @param newInbox new address of inbox + */ + function setInbox( + IInboxBase newInbox + ) external; + /** * @notice set the validatorWhitelistDisabled flag * @param _validatorWhitelistDisabled new value of validatorWhitelistDisabled, i.e. true = disabled @@ -229,4 +242,16 @@ interface IRollupAdmin { function setChallengeManager( address _challengeManager ) external; + + /** + * @notice set a new MELConfig which updates the current version and sets new Inbox and Bridge contracts + * @param _melVersion new MEL Version + * @param _inbox new address of the inbox contract + * @param _sequencerInbox new address of sequencer inbox + */ + function setMELConfig( + uint64 _melVersion, + address _inbox, + address _sequencerInbox + ) external; } diff --git a/src/rollup/IRollupCore.sol b/src/rollup/IRollupCore.sol index 9376a73d..a170f18f 100644 --- a/src/rollup/IRollupCore.sol +++ b/src/rollup/IRollupCore.sol @@ -21,6 +21,17 @@ interface IRollupCore is IAssertionChain { address withdrawalAddress; } + struct MELConfig { + // MEL version + uint64 melVersion; + // Inbox contract that MEL will use from this moment on + address inbox; + // SequencerInbox contract that MEL will use from this moment on + address sequencerInbox; + // The block number at which this MEL version was activated + uint64 activationBlockNumber; + } + event RollupInitialized(bytes32 machineHash, uint256 chainId); event AssertionCreated( diff --git a/src/rollup/RollupAdminLogic.sol b/src/rollup/RollupAdminLogic.sol index bb875aa2..3fb450fd 100644 --- a/src/rollup/RollupAdminLogic.sol +++ b/src/rollup/RollupAdminLogic.sol @@ -414,7 +414,7 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl */ function setSequencerInbox( address _sequencerInbox - ) external override { + ) public { bridge.setSequencerInbox(_sequencerInbox); emit SequencerInboxSet(_sequencerInbox); // previously: emit OwnerFunctionCalled(27); @@ -426,7 +426,7 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl */ function setInbox( IInboxBase newInbox - ) external { + ) public { inbox = newInbox; emit InboxSet(address(newInbox)); // previously: emit OwnerFunctionCalled(28); @@ -467,4 +467,37 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl emit ChallengeManagerSet(_challengeManager); // previously: emit OwnerFunctionCalled(32); } + + /** + * @inheritdoc IRollupAdmin + */ + function setMELConfig( + uint64 _melVersion, + address _inbox, + address _sequencerInbox + ) external { + // MEL versions can only be increased + require(_melVersion > melVersion, "INVALID_MEL_VERSION"); + + // Setting the contracts + setInbox(IInboxBase(_inbox)); + setSequencerInbox(_sequencerInbox); + + // Set the new MEL version + melVersion = _melVersion; + + // Save the new MELConfig + MELConfig memory _melConfig = MELConfig({ + melVersion: _melVersion, + inbox: _inbox, + sequencerInbox: _sequencerInbox, + activationBlockNumber: uint64(block.number) + }); + + bytes32 melConfigHash = keccak256(abi.encode(_melConfig)); + melConfig[melConfigHash] = _melConfig; + + // Emit event to signal the update to nitro + emit MELConfigSet(_melVersion, _inbox, _sequencerInbox, uint64(block.number)); + } } diff --git a/src/rollup/RollupCore.sol b/src/rollup/RollupCore.sol index 035c9a0e..cec8a2af 100644 --- a/src/rollup/RollupCore.sol +++ b/src/rollup/RollupCore.sol @@ -117,6 +117,13 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { // If the chain RollupCore is deployed on, this will contain the ArbSys.blockNumber() at each node's creation. mapping(bytes32 => uint256) internal _assertionCreatedAtArbSysBlock; + // Message Extraction Layer (MEL) version + uint64 public melVersion; + + // Message Extraction Layer (MEL) config history + // MELConfig hash => MELConfig + mapping (bytes32 => MELConfig) public melConfig; + function sequencerInbox() public view virtual returns (ISequencerInbox) { return ISequencerInbox(bridge.sequencerInbox()); } From 1fc9408b672d765f38cfc085e5d56341d5e37d26 Mon Sep 17 00:00:00 2001 From: TucksonDev Date: Wed, 22 Apr 2026 14:37:20 +0100 Subject: [PATCH 2/8] Add initial changes to Rollup contracts --- src/challengeV2/EdgeChallengeManager.sol | 9 +- src/challengeV2/IAssertionChain.sol | 3 +- src/rollup/Assertion.sol | 5 +- src/rollup/IRollupAdmin.sol | 7 +- src/rollup/IRollupCore.sol | 3 +- src/rollup/IRollupLogic.sol | 3 +- src/rollup/MELState.sol | 46 +++++++++ src/rollup/RollupAdminLogic.sol | 26 ++--- src/rollup/RollupCore.sol | 120 ++++++----------------- src/rollup/RollupLib.sol | 17 ++-- src/rollup/RollupUserLogic.sol | 39 +++----- src/state/Deserialize.sol | 16 ++- src/state/GlobalState.sol | 52 +++++++++- 13 files changed, 186 insertions(+), 160 deletions(-) create mode 100644 src/rollup/MELState.sol diff --git a/src/challengeV2/EdgeChallengeManager.sol b/src/challengeV2/EdgeChallengeManager.sol index be1e736e..098c3c2a 100644 --- a/src/challengeV2/EdgeChallengeManager.sol +++ b/src/challengeV2/EdgeChallengeManager.sol @@ -224,15 +224,13 @@ contract EdgeChallengeManager is IEdgeChallengeManager, Initializable { assertionChain.validateAssertionHash( args.claimId, claimStateData.assertionState, - claimStateData.prevAssertionHash, - claimStateData.inboxAcc + claimStateData.prevAssertionHash ); assertionChain.validateAssertionHash( claimStateData.prevAssertionHash, predecessorStateData.assertionState, - predecessorStateData.prevAssertionHash, - predecessorStateData.inboxAcc + predecessorStateData.prevAssertionHash ); if (args.endHistoryRoot != claimStateData.assertionState.endHistoryRoot) { @@ -376,8 +374,7 @@ contract EdgeChallengeManager is IEdgeChallengeManager, Initializable { assertionChain.validateAssertionHash( topEdge.claimId, claimStateData.assertionState, - claimStateData.prevAssertionHash, - claimStateData.inboxAcc + claimStateData.prevAssertionHash ); assertionBlocks = assertionChain.getSecondChildCreationBlock( claimStateData.prevAssertionHash diff --git a/src/challengeV2/IAssertionChain.sol b/src/challengeV2/IAssertionChain.sol index 0a1bf52d..3b799cfb 100644 --- a/src/challengeV2/IAssertionChain.sol +++ b/src/challengeV2/IAssertionChain.sol @@ -15,8 +15,7 @@ interface IAssertionChain { function validateAssertionHash( bytes32 assertionHash, AssertionState calldata state, - bytes32 prevAssertionHash, - bytes32 inboxAcc + bytes32 prevAssertionHash ) external view; function validateConfig(bytes32 assertionHash, ConfigData calldata configData) external view; function getFirstChildCreationBlock( diff --git a/src/rollup/Assertion.sol b/src/rollup/Assertion.sol index 89705653..4b3d7ac7 100644 --- a/src/rollup/Assertion.sol +++ b/src/rollup/Assertion.sol @@ -5,6 +5,7 @@ pragma solidity ^0.8.0; import "./AssertionState.sol"; +import "./MELState.sol"; enum AssertionStatus { // No assertion at this index @@ -50,6 +51,7 @@ struct AssertionInputs { BeforeStateData beforeStateData; AssertionState beforeState; AssertionState afterState; + MELState afterMELState; } struct ConfigData { @@ -57,7 +59,8 @@ struct ConfigData { uint256 requiredStake; address challengeManager; uint64 confirmPeriodBlocks; - uint64 nextInboxPosition; + // The next assertion should process parent chain blocks up to this one + bytes32 nextParentChainBlockHash; } /** diff --git a/src/rollup/IRollupAdmin.sol b/src/rollup/IRollupAdmin.sol index 4de11d4a..1f9cbe79 100644 --- a/src/rollup/IRollupAdmin.sol +++ b/src/rollup/IRollupAdmin.sol @@ -162,9 +162,9 @@ interface IRollupAdmin { * After decreasing the base stake the current staker will still have full stake locked up. They can release it by creating a new staker with the * new smaller amount, and using it to create a child of the latest pending assertion. This will make the old staker inactive and withdrawable. * @param newBaseStake New base stake to be set. Must be less than current base stake, otherwise use increaseBaseStake - * @param latestNextInboxPosition The nextInboxPosition of the only pending latestStakedAssertion + * @param latestNextParentChainBlockHash The nextParentChainBlockHash of the only pending latestStakedAssertion */ - function decreaseBaseStake(uint256 newBaseStake, uint64 latestNextInboxPosition) external; + function decreaseBaseStake(uint256 newBaseStake, bytes32 latestNextParentChainBlockHash) external; /** * @notice Increase the base stake required for creating an assertion @@ -187,8 +187,7 @@ interface IRollupAdmin { function forceConfirmAssertion( bytes32 assertionHash, bytes32 parentAssertionHash, - AssertionState calldata confirmState, - bytes32 inboxAcc + AssertionState calldata confirmState ) external; function setLoserStakeEscrow( diff --git a/src/rollup/IRollupCore.sol b/src/rollup/IRollupCore.sol index a170f18f..ea638324 100644 --- a/src/rollup/IRollupCore.sol +++ b/src/rollup/IRollupCore.sol @@ -38,8 +38,7 @@ interface IRollupCore is IAssertionChain { bytes32 indexed assertionHash, bytes32 indexed parentAssertionHash, AssertionInputs assertion, - bytes32 afterInboxBatchAcc, - uint256 inboxMaxCount, + bytes32 nextParentChainBlockHash, bytes32 wasmModuleRoot, uint256 requiredStake, address challengeManager, diff --git a/src/rollup/IRollupLogic.sol b/src/rollup/IRollupLogic.sol index b3f825fd..b5762cdb 100644 --- a/src/rollup/IRollupLogic.sol +++ b/src/rollup/IRollupLogic.sol @@ -25,8 +25,7 @@ interface IRollupUser is IRollupCore, IOwnable { bytes32 prevAssertionHash, AssertionState calldata confirmState, bytes32 winningEdgeId, - ConfigData calldata prevConfig, - bytes32 inboxAcc + ConfigData calldata prevConfig ) external; function stakeOnNewAssertion( diff --git a/src/rollup/MELState.sol b/src/rollup/MELState.sol new file mode 100644 index 00000000..42d43184 --- /dev/null +++ b/src/rollup/MELState.sol @@ -0,0 +1,46 @@ +// Copyright 2021-2026, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +struct MELState { + // Versioning struct for the state, starting at 0. + uint16 version; + // The parent chain block number where MEL becomes part of the Arbitrum chain's consensus. + uint64 versionActivationBlockNumber; + + // Parent chain ID of the Arbitrum chain that is running MEL. + uint64 parentChainId; + // The latest parent chain block fields processed by MEL. + uint64 parentChainBlockNumber; + bytes32 parentChainBlockHash; + bytes32 parentChainPreviousBlockHash; + + // Address of the contract where batches are posted to. + address batchPostingTargetAddress; + // Address of the contract where delayed messages are posted to. + address delayedMessagePostingTargetAddress; + + // Number of batches observed when extracting with MEL. + uint64 batchCount; + + // Local accumulators related to messsages and delayed messages. + uint64 msgCount; + bytes32 localMsgAccumulator; + + // Accumulators and numbers related to delayed messages. + uint64 delayedMessagesRead; + uint64 delayedMessagesSeen; + bytes32 delayedMessageInboxAcc; + bytes32 delayedMessageOutboxAcc; +} + +/** + * @notice Utility functions for MELState + */ +library MELStateLib { + function hash(MELState memory state) internal pure returns (bytes32) { + return keccak256(abi.encode(state)); + } +} diff --git a/src/rollup/RollupAdminLogic.sol b/src/rollup/RollupAdminLogic.sol index 3fb450fd..4f50cc40 100644 --- a/src/rollup/RollupAdminLogic.sol +++ b/src/rollup/RollupAdminLogic.sol @@ -69,18 +69,12 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl anyTrustFastConfirmer = config.anyTrustFastConfirmer; bytes32 parentAssertionHash = bytes32(0); - bytes32 inboxAcc = bytes32(0); bytes32 genesisHash = RollupLib.assertionHash({ parentAssertionHash: parentAssertionHash, - afterStateHash: config.genesisAssertionState.hash(), - inboxAcc: inboxAcc + afterStateHash: config.genesisAssertionState.hash() }); - uint256 currentInboxCount = bridge.sequencerMessageCount(); - // ensure to move the inbox forward by at least one message - if (currentInboxCount == config.genesisInboxCount) { - currentInboxCount += 1; - } + bytes32 nextParentChainBlockHash = blockhash(block.number - 1); AssertionNode memory initialAssertion = AssertionNodeLib.createAssertion( true, RollupLib.configHash({ @@ -88,7 +82,7 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl requiredStake: baseStake, challengeManager: address(challengeManager), confirmPeriodBlocks: confirmPeriodBlocks, - nextInboxPosition: uint64(currentInboxCount) + nextParentChainBlockHash: nextParentChainBlockHash }) ); initializeCore(initialAssertion, genesisHash); @@ -99,8 +93,7 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl genesisHash, parentAssertionHash, assertionInputs, - inboxAcc, - currentInboxCount, + nextParentChainBlockHash, wasmModuleRoot, baseStake, address(challengeManager), @@ -267,7 +260,7 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl */ function decreaseBaseStake( uint256 newBaseStake, - uint64 latestNextInboxPosition + bytes32 latestNextParentChainBlockHash ) external override { require(newBaseStake < baseStake, "BASE_STAKE_NOT_DECREASED"); @@ -292,7 +285,7 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl requiredStake: baseStake, challengeManager: address(challengeManager), confirmPeriodBlocks: confirmPeriodBlocks, - nextInboxPosition: uint64(latestNextInboxPosition) + nextParentChainBlockHash: latestNextParentChainBlockHash }); uint256 pendingCount = 0; @@ -313,7 +306,7 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl requiredStake: newBaseStake, challengeManager: address(challengeManager), confirmPeriodBlocks: confirmPeriodBlocks, - nextInboxPosition: uint64(latestNextInboxPosition) + nextParentChainBlockHash: latestNextParentChainBlockHash }); pendingCount++; @@ -376,11 +369,10 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl function forceConfirmAssertion( bytes32 assertionHash, bytes32 parentAssertionHash, - AssertionState calldata confirmState, - bytes32 inboxAcc + AssertionState calldata confirmState ) external override whenPaused { // this skip deadline, prev, challenge validations - confirmAssertionInternal(assertionHash, parentAssertionHash, confirmState, inboxAcc); + confirmAssertionInternal(assertionHash, parentAssertionHash, confirmState); emit AssertionForceConfirmed(assertionHash); // previously: emit OwnerFunctionCalled(24); } diff --git a/src/rollup/RollupCore.sol b/src/rollup/RollupCore.sol index cec8a2af..91ab716c 100644 --- a/src/rollup/RollupCore.sol +++ b/src/rollup/RollupCore.sol @@ -9,6 +9,7 @@ import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeab import "./Assertion.sol"; import "./RollupLib.sol"; +import "./MELState.sol"; import "./IRollupEventInbox.sol"; import "./IRollupCore.sol"; @@ -23,6 +24,7 @@ import "../libraries/ArbitrumChecker.sol"; abstract contract RollupCore is IRollupCore, PausableUpgradeable { using AssertionNodeLib for AssertionNode; using GlobalStateLib for GlobalState; + using MELStateLib for MELState; using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; // Rollup Config @@ -279,8 +281,7 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { function confirmAssertionInternal( bytes32 assertionHash, bytes32 parentAssertionHash, - AssertionState calldata confirmState, - bytes32 inboxAcc + AssertionState calldata confirmState ) internal { AssertionNode storage assertion = getAssertionStorage(assertionHash); // Check that assertion is pending, this also checks that assertion exists @@ -291,8 +292,7 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { assertionHash == RollupLib.assertionHash({ parentAssertionHash: parentAssertionHash, - afterState: confirmState, - inboxAcc: inboxAcc + afterState: confirmState }), "CONFIRM_DATA" ); @@ -420,7 +420,7 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { AssertionInputs calldata assertion, bytes32 prevAssertionHash, bytes32 expectedAssertionHash - ) internal returns (bytes32 newAssertionHash, bool overflowAssertion) { + ) internal returns (bytes32 newAssertionHash) { // Validate the config hash RollupLib.validateConfigHash( assertion.beforeStateData.configData, getAssertionStorage(prevAssertionHash).configHash @@ -439,12 +439,17 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { require( RollupLib.assertionHash( assertion.beforeStateData.prevPrevAssertionHash, - assertion.beforeState, - assertion.beforeStateData.sequencerBatchAcc + assertion.beforeState ) == prevAssertionHash, "INVALID_BEFORE_STATE" ); + // validate the MELState hash provided + require( + assertion.afterMELState.hash() == assertion.afterState.globalState.getMELStateHash(), + "INVALID_MEL_STATE" + ); + // The rollup cannot advance from an errored state // If it reaches an errored state it must be corrected by an administrator // This will involve updating the wasm root and creating an alternative assertion @@ -453,88 +458,24 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { require(assertion.beforeState.machineStatus == MachineStatus.FINISHED, "BAD_PREV_STATUS"); AssertionNode storage prevAssertion = getAssertionStorage(prevAssertionHash); - // Required inbox position through which the next assertion (the one after this new assertion) must consume - uint256 nextInboxPosition; - bytes32 sequencerBatchAcc; { - // This new assertion consumes the messages from prevInboxPosition to afterInboxPosition + // This new assertion consumes the messages from prevParentChainBlockHash to afterParentChainBlockHash GlobalState calldata afterGS = assertion.afterState.globalState; GlobalState calldata beforeGS = assertion.beforeState.globalState; + MELState calldata afterMELState = assertion.afterMELState; + + // AfterState must have executed at least as many messages as beforeState + require(afterGS.compareExecutedMessages(beforeGS) >= 0, "INBOX_BACKWARDS"); - // there are 3 kinds of assertions that can be made. Assertions must be made when they fill the maximum number - // of blocks, or when they process all messages up to prev.nextInboxPosition. When they fill the max - // blocks, but dont manage to process all messages, we call this an "overflow" assertion. - // 1. ERRORED assertion - // The machine finished in an ERRORED state. This can happen with processing any - // messages, or moving the position in the message. - // 2. FINISHED assertion that did not overflow - // The machine finished as normal, and fully processed all the messages up to prev.nextInboxPosition. - // In this case the inbox position must equal prev.nextInboxPosition and position in message must be 0 - // 3. FINISHED assertion that did overflow - // The machine finished as normal, but didn't process all messages in the inbox. - // The inbox can be anywhere between the previous assertion's position and the nextInboxPosition, exclusive. - - // All types of assertion must have inbox position in the range prev.inboxPosition <= x <= prev.nextInboxPosition - require(afterGS.comparePositions(beforeGS) >= 0, "INBOX_BACKWARDS"); - int256 afterStateCmpMaxInbox = afterGS.comparePositionsAgainstStartOfBatch( - assertion.beforeStateData.configData.nextInboxPosition - ); - require(afterStateCmpMaxInbox <= 0, "INBOX_TOO_FAR"); - - if ( - assertion.afterState.machineStatus != MachineStatus.ERRORED - && afterStateCmpMaxInbox < 0 - ) { - // If we didn't reach the target next inbox position, this is an overflow assertion. - overflowAssertion = true; - // This shouldn't be necessary, but might as well constrain the assertion to be non-empty - require(afterGS.comparePositions(beforeGS) > 0, "OVERFLOW_STANDSTILL"); - } - // Inbox position at the time of this assertion being created - uint256 currentInboxPosition = bridge.sequencerMessageCount(); - // Cannot read more messages than currently exist in the inbox - require( - afterGS.comparePositionsAgainstStartOfBatch(currentInboxPosition) <= 0, - "INBOX_PAST_END" - ); - - // under normal circumstances prev.nextInboxPosition is guaranteed to exist - // because we populate it from bridge.sequencerMessageCount(). However, when - // the inbox message count doesnt change we artificially increase it by 1 as explained below - // in this case we need to ensure when the assertion is made the inbox messages are available - // to ensure that a valid assertion can actually be made. + // Checking the last processed block hash (we won't check for overflowing assertions) require( - assertion.beforeStateData.configData.nextInboxPosition <= currentInboxPosition, - "INBOX_NOT_POPULATED" + afterMELState.parentChainBlockHash == assertion.beforeStateData.configData.nextParentChainBlockHash, + "BAD_PARENT_CHAIN_BLOCK_HASH" ); - - // The next assertion must consume all the messages that are currently found in the inbox - uint256 afterInboxPosition = afterGS.getInboxPosition(); - if (afterInboxPosition == currentInboxPosition) { - // No new messages have been added to the inbox since the last assertion - // In this case if we set the next inbox position to the current one we would be insisting that - // the next assertion process no messages. So instead we increment the next inbox position to current - // plus one, so that the next assertion will process exactly one message. - // Thus, no assertion can be empty (except the genesis assertion, which is created - // via a different codepath). - nextInboxPosition = currentInboxPosition + 1; - } else { - nextInboxPosition = currentInboxPosition; - } - - // only the genesis assertion processes no messages, and that assertion is created - // when we initialize this contract. Therefore, all assertions created here should have a non - // zero inbox position. - require(afterInboxPosition != 0, "EMPTY_INBOX_COUNT"); - - // Fetch the inbox accumulator for this message count. Fetching this and checking against it - // allows the assertion creator to ensure they're creating an assertion against the expected - // inbox messages - sequencerBatchAcc = bridge.sequencerInboxAccs(afterInboxPosition - 1); } - newAssertionHash = - RollupLib.assertionHash(prevAssertionHash, assertion.afterState, sequencerBatchAcc); + // AfterState includes the hash of the MELState up to which messages have been processed + newAssertionHash = RollupLib.assertionHash(prevAssertionHash, assertion.afterState); // allow an assertion creator to ensure that they're creating their assertion against the expected state require( @@ -550,6 +491,9 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { "ASSERTION_SEEN" ); + // Next assertion will have to process messages from blocks up to the previous one + bytes32 nextParentChainBlockHash = blockhash(block.number - 1); + // state updates AssertionNode memory newAssertion = AssertionNodeLib.createAssertion( prevAssertion.firstChildBlock == 0, // assumes block 0 is impossible @@ -558,7 +502,7 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { requiredStake: baseStake, challengeManager: address(challengeManager), confirmPeriodBlocks: confirmPeriodBlocks, - nextInboxPosition: uint64(nextInboxPosition) + nextParentChainBlockHash: nextParentChainBlockHash }) ); @@ -571,8 +515,7 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { newAssertionHash, prevAssertionHash, assertion, - sequencerBatchAcc, - nextInboxPosition, + nextParentChainBlockHash, wasmModuleRoot, baseStake, address(challengeManager), @@ -593,11 +536,9 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { AssertionState memory emptyAssertionState = AssertionState(emptyGlobalState, MachineStatus.FINISHED, bytes32(0)); bytes32 parentAssertionHash = bytes32(0); - bytes32 inboxAcc = bytes32(0); return RollupLib.assertionHash({ parentAssertionHash: parentAssertionHash, - afterState: emptyAssertionState, - inboxAcc: inboxAcc + afterState: emptyAssertionState }); } @@ -616,11 +557,10 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { function validateAssertionHash( bytes32 assertionHash, AssertionState calldata state, - bytes32 prevAssertionHash, - bytes32 inboxAcc + bytes32 prevAssertionHash ) external pure { require( - assertionHash == RollupLib.assertionHash(prevAssertionHash, state, inboxAcc), + assertionHash == RollupLib.assertionHash(prevAssertionHash, state), "INVALID_ASSERTION_HASH" ); } diff --git a/src/rollup/RollupLib.sol b/src/rollup/RollupLib.sol index 83a069a3..448157ad 100644 --- a/src/rollup/RollupLib.sol +++ b/src/rollup/RollupLib.sol @@ -20,23 +20,22 @@ library RollupLib { // The `assertionHash` contains all the information needed to determine an assertion's validity. // This helps protect validators against reorgs by letting them bind their assertion to the current chain state. + // `afterState` includes a hash of the MELState up to which messages have been processed. function assertionHash( bytes32 parentAssertionHash, - AssertionState memory afterState, - bytes32 inboxAcc + AssertionState memory afterState ) internal pure returns (bytes32) { // we can no longer have `hasSibling` in the assertion hash as it would allow identical assertions - return assertionHash(parentAssertionHash, afterState.hash(), inboxAcc); + return assertionHash(parentAssertionHash, afterState.hash()); } // Takes in a hash of the afterState instead of the afterState itself function assertionHash( bytes32 parentAssertionHash, - bytes32 afterStateHash, - bytes32 inboxAcc + bytes32 afterStateHash ) internal pure returns (bytes32) { // we can no longer have `hasSibling` in the assertion hash as it would allow identical assertions - return keccak256(abi.encodePacked(parentAssertionHash, afterStateHash, inboxAcc)); + return keccak256(abi.encodePacked(parentAssertionHash, afterStateHash)); } // All these should be emited in AssertionCreated event @@ -45,7 +44,7 @@ library RollupLib { uint256 requiredStake, address challengeManager, uint64 confirmPeriodBlocks, - uint64 nextInboxPosition + bytes32 nextParentChainBlockHash ) internal pure returns (bytes32) { return keccak256( abi.encodePacked( @@ -53,7 +52,7 @@ library RollupLib { requiredStake, challengeManager, confirmPeriodBlocks, - nextInboxPosition + nextParentChainBlockHash ) ); } @@ -69,7 +68,7 @@ library RollupLib { configData.requiredStake, configData.challengeManager, configData.confirmPeriodBlocks, - configData.nextInboxPosition + configData.nextParentChainBlockHash ), "CONFIG_HASH_MISMATCH" ); diff --git a/src/rollup/RollupUserLogic.sol b/src/rollup/RollupUserLogic.sol index fdfca221..3595f222 100644 --- a/src/rollup/RollupUserLogic.sol +++ b/src/rollup/RollupUserLogic.sol @@ -77,8 +77,7 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { bytes32 prevAssertionHash, AssertionState calldata confirmState, bytes32 winningEdgeId, - ConfigData calldata prevConfig, - bytes32 inboxAcc + ConfigData calldata prevConfig ) external onlyValidator(msg.sender) whenNotPaused { /* * To confirm an assertion, the following must be true: @@ -124,7 +123,7 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { ); } - confirmAssertionInternal(assertionHash, prevAssertionHash, confirmState, inboxAcc); + confirmAssertionInternal(assertionHash, prevAssertionHash, confirmState); } /** @@ -146,14 +145,12 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { * @notice Computes the hash of an assertion * @param state The execution state for the assertion * @param prevAssertionHash The hash of the assertion's parent - * @param inboxAcc The inbox batch accumulator */ function computeAssertionHash( bytes32 prevAssertionHash, - AssertionState calldata state, - bytes32 inboxAcc + AssertionState calldata state ) external pure returns (bytes32) { - return RollupLib.assertionHash(prevAssertionHash, state, inboxAcc); + return RollupLib.assertionHash(prevAssertionHash, state); } /** @@ -192,8 +189,7 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { bytes32 prevAssertion = RollupLib.assertionHash( assertion.beforeStateData.prevPrevAssertionHash, - assertion.beforeState, - assertion.beforeStateData.sequencerBatchAcc + assertion.beforeState ); getAssertionStorage(prevAssertion).requireExists(); @@ -206,15 +202,12 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { "STAKED_ON_ANOTHER_BRANCH" ); - (bytes32 newAssertionHash, bool overflowAssertion) = - createNewAssertion(assertion, prevAssertion, expectedAssertionHash); + bytes32 newAssertionHash = createNewAssertion(assertion, prevAssertion, expectedAssertionHash); _stakerMap[msg.sender].latestStakedAssertion = newAssertionHash; - if (!overflowAssertion) { - uint256 timeSincePrev = block.number - getAssertionStorage(prevAssertion).createdAtBlock; - // Verify that assertion meets the minimum Delta time requirement - require(timeSincePrev >= minimumAssertionPeriod, "TIME_DELTA"); - } + uint256 timeSincePrev = block.number - getAssertionStorage(prevAssertion).createdAtBlock; + // Verify that assertion meets the minimum Delta time requirement + require(timeSincePrev >= minimumAssertionPeriod, "TIME_DELTA"); if (!getAssertionStorage(newAssertionHash).isFirstChild) { // We assume assertion.beforeStateData is valid here as it will be validated in createNewAssertion @@ -293,12 +286,11 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { function fastConfirmAssertion( bytes32 assertionHash, bytes32 parentAssertionHash, - AssertionState calldata confirmState, - bytes32 inboxAcc + AssertionState calldata confirmState ) public whenNotPaused { require(msg.sender == anyTrustFastConfirmer, "NOT_FAST_CONFIRMER"); // this skip deadline, prev, challenge validations - confirmAssertionInternal(assertionHash, parentAssertionHash, confirmState, inboxAcc); + confirmAssertionInternal(assertionHash, parentAssertionHash, confirmState); } /** @@ -321,15 +313,13 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { bytes32 prevAssertion = RollupLib.assertionHash( assertion.beforeStateData.prevPrevAssertionHash, - assertion.beforeState, - assertion.beforeStateData.sequencerBatchAcc + assertion.beforeState ); getAssertionStorage(prevAssertion).requireExists(); if (status == AssertionStatus.NoAssertion) { // If not exists, we create the new assertion - (bytes32 newAssertionHash,) = - createNewAssertion(assertion, prevAssertion, expectedAssertionHash); + bytes32 newAssertionHash = createNewAssertion(assertion, prevAssertion, expectedAssertionHash); if (!getAssertionStorage(newAssertionHash).isFirstChild) { // only 1 of the children can be confirmed and get their stake refunded // so we send the other children's stake to the loserStakeEscrow @@ -344,8 +334,7 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { fastConfirmAssertion( expectedAssertionHash, prevAssertion, - assertion.afterState, - bridge.sequencerInboxAccs(assertion.afterState.globalState.getInboxPosition() - 1) + assertion.afterState ); } diff --git a/src/state/Deserialize.sol b/src/state/Deserialize.sol index e77eff2f..84c22147 100644 --- a/src/state/Deserialize.sol +++ b/src/state/Deserialize.sol @@ -242,6 +242,8 @@ library Deserialize { // using constant ints for array size requires newer solidity bytes32[2] memory bytes32Vals; uint64[2] memory u64Vals; + bytes32[2] memory melBytes32Vals; + uint64[2] memory melU64Vals; for (uint8 i = 0; i < GlobalStateLib.BYTES32_VALS_NUM; i++) { (bytes32Vals[i], offset) = b32(proof, offset); @@ -249,7 +251,19 @@ library Deserialize { for (uint8 i = 0; i < GlobalStateLib.U64_VALS_NUM; i++) { (u64Vals[i], offset) = u64(proof, offset); } - state = GlobalState({bytes32Vals: bytes32Vals, u64Vals: u64Vals}); + for (uint8 i = 0; i < GlobalStateLib.BYTES32_VALS_NUM; i++) { + (melBytes32Vals[i], offset) = b32(proof, offset); + } + for (uint8 i = 0; i < GlobalStateLib.U64_VALS_NUM; i++) { + (melU64Vals[i], offset) = u64(proof, offset); + } + + state = GlobalState({ + bytes32Vals: bytes32Vals, + u64Vals: u64Vals, + melBytes32Vals: melBytes32Vals, + melU64Vals: melU64Vals + }); } function machine( diff --git a/src/state/GlobalState.sol b/src/state/GlobalState.sol index fb450530..57d26296 100644 --- a/src/state/GlobalState.sol +++ b/src/state/GlobalState.sol @@ -5,8 +5,15 @@ pragma solidity ^0.8.0; struct GlobalState { + // BlockHash and SendRoot bytes32[2] bytes32Vals; + // Deprecated after MEL: Batch (InboxPosition) and PositionInBatch (PositionInMessage) uint64[2] u64Vals; + + // MELState hash and NextMsg hash + bytes32[2] melBytes32Vals; + // MsgCount and ExecutedMsgCount + uint64[2] melU64Vals; } library GlobalStateLib { @@ -24,7 +31,11 @@ library GlobalStateLib { state.bytes32Vals[0], state.bytes32Vals[1], state.u64Vals[0], - state.u64Vals[1] + state.u64Vals[1], + state.melBytes32Vals[0], + state.melBytes32Vals[1], + state.melU64Vals[0], + state.melU64Vals[1] ) ); } @@ -53,6 +64,30 @@ library GlobalStateLib { return state.u64Vals[1]; } + function getMELStateHash( + GlobalState memory state + ) internal pure returns (bytes32) { + return state.melBytes32Vals[0]; + } + + function getMELNextMsgHash( + GlobalState memory state + ) internal pure returns (bytes32) { + return state.melBytes32Vals[1]; + } + + function getMELMsgCount( + GlobalState memory state + ) internal pure returns (uint64) { + return state.melU64Vals[0]; + } + + function getMELExecutedMsgCount( + GlobalState memory state + ) internal pure returns (uint64) { + return state.melU64Vals[1]; + } + function isEmpty( GlobalState calldata state ) internal pure returns (bool) { @@ -102,4 +137,19 @@ library GlobalStateLib { } } } + + function compareExecutedMessages( + GlobalState calldata a, + GlobalState calldata b + ) internal pure returns (int256) { + uint64 aPos = a.getMELExecutedMsgCount(); + uint64 bPos = b.getMELExecutedMsgCount(); + if (aPos < bPos) { + return -1; + } else if (aPos > bPos) { + return 1; + } else { + return 0; + } + } } From 7788919287ca065de7700db102d3c013c3b632de Mon Sep 17 00:00:00 2001 From: TucksonDev Date: Thu, 23 Apr 2026 11:16:47 +0100 Subject: [PATCH 3/8] Update MELState structure --- src/rollup/IRollupAdmin.sol | 4 ++-- src/rollup/MELState.sol | 20 +++++++++++--------- src/rollup/RollupAdminLogic.sol | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/rollup/IRollupAdmin.sol b/src/rollup/IRollupAdmin.sol index 1f9cbe79..de980e34 100644 --- a/src/rollup/IRollupAdmin.sol +++ b/src/rollup/IRollupAdmin.sol @@ -67,7 +67,7 @@ interface IRollupAdmin { /// @dev MELConfig was set event MELConfigSet( - uint64 indexed melVersion, address indexed inbox, address indexed sequencerInbox, uint64 activationBlock + uint16 indexed melVersion, address indexed inbox, address indexed sequencerInbox, uint64 activationBlock ); function initialize( @@ -249,7 +249,7 @@ interface IRollupAdmin { * @param _sequencerInbox new address of sequencer inbox */ function setMELConfig( - uint64 _melVersion, + uint16 _melVersion, address _inbox, address _sequencerInbox ) external; diff --git a/src/rollup/MELState.sol b/src/rollup/MELState.sol index 42d43184..065b38a3 100644 --- a/src/rollup/MELState.sol +++ b/src/rollup/MELState.sol @@ -7,28 +7,30 @@ pragma solidity ^0.8.0; struct MELState { // Versioning struct for the state, starting at 0. uint16 version; - // The parent chain block number where MEL becomes part of the Arbitrum chain's consensus. - uint64 versionActivationBlockNumber; - + // Parent chain ID of the Arbitrum chain that is running MEL. uint64 parentChainId; // The latest parent chain block fields processed by MEL. uint64 parentChainBlockNumber; - bytes32 parentChainBlockHash; - bytes32 parentChainPreviousBlockHash; - + // Address of the contract where batches are posted to. address batchPostingTargetAddress; // Address of the contract where delayed messages are posted to. address delayedMessagePostingTargetAddress; - + + // The latest parent chain block hash observed by MEL and the hash of its parent + bytes32 parentChainBlockHash; + bytes32 parentChainPreviousBlockHash; + // Number of batches observed when extracting with MEL. uint64 batchCount; - // Local accumulators related to messsages and delayed messages. + // Total messages extracted by MEL uint64 msgCount; + + // Represents messages accumulated during processing of this specific parent chain block bytes32 localMsgAccumulator; - + // Accumulators and numbers related to delayed messages. uint64 delayedMessagesRead; uint64 delayedMessagesSeen; diff --git a/src/rollup/RollupAdminLogic.sol b/src/rollup/RollupAdminLogic.sol index 4f50cc40..b59605a9 100644 --- a/src/rollup/RollupAdminLogic.sol +++ b/src/rollup/RollupAdminLogic.sol @@ -464,7 +464,7 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl * @inheritdoc IRollupAdmin */ function setMELConfig( - uint64 _melVersion, + uint16 _melVersion, address _inbox, address _sequencerInbox ) external { From d7f4c6a5b57b80064a31673a69d3f8fd556ca1c1 Mon Sep 17 00:00:00 2001 From: ganeshvanahalli Date: Fri, 24 Apr 2026 12:55:03 +0530 Subject: [PATCH 4/8] minimal change to make this branch work with nitro --- src/challengeV2/EdgeChallengeManager.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/challengeV2/EdgeChallengeManager.sol b/src/challengeV2/EdgeChallengeManager.sol index 098c3c2a..0d7de3e5 100644 --- a/src/challengeV2/EdgeChallengeManager.sol +++ b/src/challengeV2/EdgeChallengeManager.sol @@ -399,8 +399,11 @@ contract EdgeChallengeManager is IEdgeChallengeManager, Initializable { assertionChain.validateConfig(prevAssertionHash, prevConfig); + // TODO(PR 427): OSP contracts are marked as pending work in the PR. + // Inbox-position-based checks no longer apply; use type(uint256).max as + // a stopgap until OSP is rewired against `nextParentChainBlockHash`. ExecutionContext memory execCtx = ExecutionContext({ - maxInboxMessagesRead: prevConfig.nextInboxPosition, + maxInboxMessagesRead: type(uint256).max, bridge: assertionChain.bridge(), initialWasmModuleRoot: prevConfig.wasmModuleRoot }); From 6ef1a11357ea4214fce9b03666141a5ef2176c51 Mon Sep 17 00:00:00 2001 From: TucksonDev Date: Mon, 27 Apr 2026 13:02:00 +0100 Subject: [PATCH 5/8] Allow for setting melVersion=0, and modify GlobalState structure --- src/rollup/RollupAdminLogic.sol | 26 ++++++++--------- src/rollup/RollupCore.sol | 16 +++++------ src/state/Deserialize.sol | 19 ++---------- src/state/GlobalState.sol | 51 +++++++++++++++------------------ 4 files changed, 46 insertions(+), 66 deletions(-) diff --git a/src/rollup/RollupAdminLogic.sol b/src/rollup/RollupAdminLogic.sol index b59605a9..2cf1144d 100644 --- a/src/rollup/RollupAdminLogic.sol +++ b/src/rollup/RollupAdminLogic.sol @@ -463,20 +463,13 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl /** * @inheritdoc IRollupAdmin */ - function setMELConfig( - uint16 _melVersion, - address _inbox, - address _sequencerInbox - ) external { - // MEL versions can only be increased - require(_melVersion > melVersion, "INVALID_MEL_VERSION"); - - // Setting the contracts - setInbox(IInboxBase(_inbox)); - setSequencerInbox(_sequencerInbox); - - // Set the new MEL version - melVersion = _melVersion; + function setMELConfig(uint16 _melVersion, address _inbox, address _sequencerInbox) external { + // MEL versions can only be increased, except for the initial version, which must be version 0 + if (currentMelConfigHash == bytes32(0)) { + require(_melVersion == 0, "INVALID_MEL_VERSION"); + } else { + require(_melVersion > melConfig[currentMelConfigHash].melVersion, "INVALID_MEL_VERSION"); + } // Save the new MELConfig MELConfig memory _melConfig = MELConfig({ @@ -488,6 +481,11 @@ contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeabl bytes32 melConfigHash = keccak256(abi.encode(_melConfig)); melConfig[melConfigHash] = _melConfig; + currentMelConfigHash = melConfigHash; + + // Setting the contracts + setInbox(IInboxBase(_inbox)); + setSequencerInbox(_sequencerInbox); // Emit event to signal the update to nitro emit MELConfigSet(_melVersion, _inbox, _sequencerInbox, uint64(block.number)); diff --git a/src/rollup/RollupCore.sol b/src/rollup/RollupCore.sol index 91ab716c..110ff44f 100644 --- a/src/rollup/RollupCore.sol +++ b/src/rollup/RollupCore.sol @@ -119,12 +119,12 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { // If the chain RollupCore is deployed on, this will contain the ArbSys.blockNumber() at each node's creation. mapping(bytes32 => uint256) internal _assertionCreatedAtArbSysBlock; - // Message Extraction Layer (MEL) version - uint64 public melVersion; + // Message Extraction Layer (MEL) current config hash + bytes32 public currentMelConfigHash; // Message Extraction Layer (MEL) config history // MELConfig hash => MELConfig - mapping (bytes32 => MELConfig) public melConfig; + mapping(bytes32 => MELConfig) public melConfig; function sequencerInbox() public view virtual returns (ISequencerInbox) { return ISequencerInbox(bridge.sequencerInbox()); @@ -438,8 +438,7 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { // validate the provided before state is correct by checking that it's part of the prev assertion hash require( RollupLib.assertionHash( - assertion.beforeStateData.prevPrevAssertionHash, - assertion.beforeState + assertion.beforeStateData.prevPrevAssertionHash, assertion.beforeState ) == prevAssertionHash, "INVALID_BEFORE_STATE" ); @@ -463,18 +462,19 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { GlobalState calldata afterGS = assertion.afterState.globalState; GlobalState calldata beforeGS = assertion.beforeState.globalState; MELState calldata afterMELState = assertion.afterMELState; - + // AfterState must have executed at least as many messages as beforeState require(afterGS.compareExecutedMessages(beforeGS) >= 0, "INBOX_BACKWARDS"); // Checking the last processed block hash (we won't check for overflowing assertions) require( - afterMELState.parentChainBlockHash == assertion.beforeStateData.configData.nextParentChainBlockHash, + afterMELState.parentChainBlockHash + == assertion.beforeStateData.configData.nextParentChainBlockHash, "BAD_PARENT_CHAIN_BLOCK_HASH" ); } - // AfterState includes the hash of the MELState up to which messages have been processed + // AfterState includes the hash of the MELState up to which messages have been read newAssertionHash = RollupLib.assertionHash(prevAssertionHash, assertion.afterState); // allow an assertion creator to ensure that they're creating their assertion against the expected state diff --git a/src/state/Deserialize.sol b/src/state/Deserialize.sol index 84c22147..7c7a9ac6 100644 --- a/src/state/Deserialize.sol +++ b/src/state/Deserialize.sol @@ -240,10 +240,8 @@ library Deserialize { offset = startOffset; // using constant ints for array size requires newer solidity - bytes32[2] memory bytes32Vals; + bytes32[4] memory bytes32Vals; uint64[2] memory u64Vals; - bytes32[2] memory melBytes32Vals; - uint64[2] memory melU64Vals; for (uint8 i = 0; i < GlobalStateLib.BYTES32_VALS_NUM; i++) { (bytes32Vals[i], offset) = b32(proof, offset); @@ -251,19 +249,8 @@ library Deserialize { for (uint8 i = 0; i < GlobalStateLib.U64_VALS_NUM; i++) { (u64Vals[i], offset) = u64(proof, offset); } - for (uint8 i = 0; i < GlobalStateLib.BYTES32_VALS_NUM; i++) { - (melBytes32Vals[i], offset) = b32(proof, offset); - } - for (uint8 i = 0; i < GlobalStateLib.U64_VALS_NUM; i++) { - (melU64Vals[i], offset) = u64(proof, offset); - } - - state = GlobalState({ - bytes32Vals: bytes32Vals, - u64Vals: u64Vals, - melBytes32Vals: melBytes32Vals, - melU64Vals: melU64Vals - }); + + state = GlobalState({bytes32Vals: bytes32Vals, u64Vals: u64Vals}); } function machine( diff --git a/src/state/GlobalState.sol b/src/state/GlobalState.sol index 57d26296..0d41c211 100644 --- a/src/state/GlobalState.sol +++ b/src/state/GlobalState.sol @@ -5,21 +5,17 @@ pragma solidity ^0.8.0; struct GlobalState { - // BlockHash and SendRoot - bytes32[2] bytes32Vals; - // Deprecated after MEL: Batch (InboxPosition) and PositionInBatch (PositionInMessage) + // BlockHash, SendRoot, MELState hash and NextMsg hash + bytes32[4] bytes32Vals; + // TBD: Batch (InboxPosition) and PositionInBatch (PositionInMessage) + // or MsgCount and ExecutedMsgCount uint64[2] u64Vals; - - // MELState hash and NextMsg hash - bytes32[2] melBytes32Vals; - // MsgCount and ExecutedMsgCount - uint64[2] melU64Vals; } library GlobalStateLib { using GlobalStateLib for GlobalState; - uint16 internal constant BYTES32_VALS_NUM = 2; + uint16 internal constant BYTES32_VALS_NUM = 4; uint16 internal constant U64_VALS_NUM = 2; function hash( @@ -30,12 +26,10 @@ library GlobalStateLib { "Global state:", state.bytes32Vals[0], state.bytes32Vals[1], + state.bytes32Vals[2], + state.bytes32Vals[3], state.u64Vals[0], - state.u64Vals[1], - state.melBytes32Vals[0], - state.melBytes32Vals[1], - state.melU64Vals[0], - state.melU64Vals[1] + state.u64Vals[1] ) ); } @@ -52,40 +46,40 @@ library GlobalStateLib { return state.bytes32Vals[1]; } - function getInboxPosition( + function getMELStateHash( GlobalState memory state - ) internal pure returns (uint64) { - return state.u64Vals[0]; + ) internal pure returns (bytes32) { + return state.bytes32Vals[2]; } - function getPositionInMessage( + function getMELNextMsgHash( GlobalState memory state - ) internal pure returns (uint64) { - return state.u64Vals[1]; + ) internal pure returns (bytes32) { + return state.bytes32Vals[3]; } - function getMELStateHash( + function getInboxPosition( GlobalState memory state - ) internal pure returns (bytes32) { - return state.melBytes32Vals[0]; + ) internal pure returns (uint64) { + return state.u64Vals[0]; } - function getMELNextMsgHash( + function getPositionInMessage( GlobalState memory state - ) internal pure returns (bytes32) { - return state.melBytes32Vals[1]; + ) internal pure returns (uint64) { + return state.u64Vals[1]; } function getMELMsgCount( GlobalState memory state ) internal pure returns (uint64) { - return state.melU64Vals[0]; + return state.u64Vals[0]; } function getMELExecutedMsgCount( GlobalState memory state ) internal pure returns (uint64) { - return state.melU64Vals[1]; + return state.u64Vals[1]; } function isEmpty( @@ -93,6 +87,7 @@ library GlobalStateLib { ) internal pure returns (bool) { return ( state.bytes32Vals[0] == bytes32(0) && state.bytes32Vals[1] == bytes32(0) + && state.bytes32Vals[2] == bytes32(0) && state.bytes32Vals[3] == bytes32(0) && state.u64Vals[0] == 0 && state.u64Vals[1] == 0 ); } From 3e4d0c20d30ec8b2e02931796a26c699d9ebe933 Mon Sep 17 00:00:00 2001 From: TucksonDev Date: Mon, 18 May 2026 09:20:33 +0100 Subject: [PATCH 6/8] Clean structs and functions --- src/challengeV2/libraries/Structs.sol | 4 --- src/state/GlobalState.sol | 41 --------------------------- 2 files changed, 45 deletions(-) diff --git a/src/challengeV2/libraries/Structs.sol b/src/challengeV2/libraries/Structs.sol index 481613d8..cd8dae14 100644 --- a/src/challengeV2/libraries/Structs.sol +++ b/src/challengeV2/libraries/Structs.sol @@ -13,8 +13,6 @@ struct AssertionStateData { AssertionState assertionState; /// @notice assertion Hash of the prev assertion bytes32 prevAssertionHash; - /// @notice Inbox accumulator of the assertion - bytes32 inboxAcc; } /// @notice Data for creating a layer zero edge @@ -44,8 +42,6 @@ struct CreateEdgeArgs { /// bytes32[]: Inclusion proof - proof to show that the end state is the last state in the end history root /// AssertionStateData: the before state of the edge /// AssertionStateData: the after state of the edge - /// bytes32 predecessorId: id of the prev assertion - /// bytes32 inboxAcc: the inbox accumulator of the assertion /// For BigStep and SmallStep edges this is the abi encoding of: /// bytes32: Start state - first state the edge commits to /// bytes32: End state - last state the edge commits to diff --git a/src/state/GlobalState.sol b/src/state/GlobalState.sol index 0d41c211..de97090d 100644 --- a/src/state/GlobalState.sol +++ b/src/state/GlobalState.sol @@ -92,47 +92,6 @@ library GlobalStateLib { ); } - function comparePositions( - GlobalState calldata a, - GlobalState calldata b - ) internal pure returns (int256) { - uint64 aPos = a.getInboxPosition(); - uint64 bPos = b.getInboxPosition(); - if (aPos < bPos) { - return -1; - } else if (aPos > bPos) { - return 1; - } else { - uint64 aMsg = a.getPositionInMessage(); - uint64 bMsg = b.getPositionInMessage(); - if (aMsg < bMsg) { - return -1; - } else if (aMsg > bMsg) { - return 1; - } else { - return 0; - } - } - } - - function comparePositionsAgainstStartOfBatch( - GlobalState calldata a, - uint256 bPos - ) internal pure returns (int256) { - uint64 aPos = a.getInboxPosition(); - if (aPos < bPos) { - return -1; - } else if (aPos > bPos) { - return 1; - } else { - if (a.getPositionInMessage() > 0) { - return 1; - } else { - return 0; - } - } - } - function compareExecutedMessages( GlobalState calldata a, GlobalState calldata b From 02b14b02f951d17ebddea5a349c433f6a361cd79 Mon Sep 17 00:00:00 2001 From: TucksonDev Date: Tue, 19 May 2026 10:35:36 +0100 Subject: [PATCH 7/8] Relocate MELState --- src/rollup/Assertion.sol | 2 +- src/rollup/RollupCore.sol | 2 +- src/{rollup => state}/MELState.sol | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/{rollup => state}/MELState.sol (100%) diff --git a/src/rollup/Assertion.sol b/src/rollup/Assertion.sol index 4b3d7ac7..9d9553d3 100644 --- a/src/rollup/Assertion.sol +++ b/src/rollup/Assertion.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.0; import "./AssertionState.sol"; -import "./MELState.sol"; +import "../state/MELState.sol"; enum AssertionStatus { // No assertion at this index diff --git a/src/rollup/RollupCore.sol b/src/rollup/RollupCore.sol index 110ff44f..e68edab1 100644 --- a/src/rollup/RollupCore.sol +++ b/src/rollup/RollupCore.sol @@ -9,11 +9,11 @@ import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeab import "./Assertion.sol"; import "./RollupLib.sol"; -import "./MELState.sol"; import "./IRollupEventInbox.sol"; import "./IRollupCore.sol"; import "../state/Machine.sol"; +import "../state/MELState.sol"; import "../bridge/ISequencerInbox.sol"; import "../bridge/IBridge.sol"; diff --git a/src/rollup/MELState.sol b/src/state/MELState.sol similarity index 100% rename from src/rollup/MELState.sol rename to src/state/MELState.sol From 85bd3df449cce53821e7da23c9326b1b074ae10f Mon Sep 17 00:00:00 2001 From: TucksonDev Date: Thu, 21 May 2026 12:57:09 +0100 Subject: [PATCH 8/8] Format and signatures and storage --- src/challengeV2/EdgeChallengeManager.sol | 8 +- src/rollup/IRollupAdmin.sol | 16 +- src/rollup/RollupUserLogic.sol | 18 +- src/state/MELState.sol | 57 +++--- test/signatures/EdgeChallengeManager | 134 ++++++------ test/signatures/OneStepProofEntry | 2 +- test/signatures/RollupAdminLogic | 18 +- test/signatures/RollupCore | 178 ++++++++-------- test/signatures/RollupCreator | 2 +- test/signatures/RollupUserLogic | 250 ++++++++++++----------- test/storage/RollupAdminLogic | 134 ++++++------ test/storage/RollupCore | 134 ++++++------ test/storage/RollupUserLogic | 134 ++++++------ 13 files changed, 550 insertions(+), 535 deletions(-) diff --git a/src/challengeV2/EdgeChallengeManager.sol b/src/challengeV2/EdgeChallengeManager.sol index 0d7de3e5..7e51ad9f 100644 --- a/src/challengeV2/EdgeChallengeManager.sol +++ b/src/challengeV2/EdgeChallengeManager.sol @@ -222,9 +222,7 @@ contract EdgeChallengeManager is IEdgeChallengeManager, Initializable { ) = abi.decode(args.proof, (bytes32[], AssertionStateData, AssertionStateData)); assertionChain.validateAssertionHash( - args.claimId, - claimStateData.assertionState, - claimStateData.prevAssertionHash + args.claimId, claimStateData.assertionState, claimStateData.prevAssertionHash ); assertionChain.validateAssertionHash( @@ -372,9 +370,7 @@ contract EdgeChallengeManager is IEdgeChallengeManager, Initializable { ChallengeEdgeLib.levelToType(topEdge.level, NUM_BIGSTEP_LEVEL) == EdgeType.Block; if (isBlockLevel && assertionChain.isFirstChild(topEdge.claimId)) { assertionChain.validateAssertionHash( - topEdge.claimId, - claimStateData.assertionState, - claimStateData.prevAssertionHash + topEdge.claimId, claimStateData.assertionState, claimStateData.prevAssertionHash ); assertionBlocks = assertionChain.getSecondChildCreationBlock( claimStateData.prevAssertionHash diff --git a/src/rollup/IRollupAdmin.sol b/src/rollup/IRollupAdmin.sol index de980e34..569e42d9 100644 --- a/src/rollup/IRollupAdmin.sol +++ b/src/rollup/IRollupAdmin.sol @@ -67,7 +67,10 @@ interface IRollupAdmin { /// @dev MELConfig was set event MELConfigSet( - uint16 indexed melVersion, address indexed inbox, address indexed sequencerInbox, uint64 activationBlock + uint16 indexed melVersion, + address indexed inbox, + address indexed sequencerInbox, + uint64 activationBlock ); function initialize( @@ -164,7 +167,10 @@ interface IRollupAdmin { * @param newBaseStake New base stake to be set. Must be less than current base stake, otherwise use increaseBaseStake * @param latestNextParentChainBlockHash The nextParentChainBlockHash of the only pending latestStakedAssertion */ - function decreaseBaseStake(uint256 newBaseStake, bytes32 latestNextParentChainBlockHash) external; + function decreaseBaseStake( + uint256 newBaseStake, + bytes32 latestNextParentChainBlockHash + ) external; /** * @notice Increase the base stake required for creating an assertion @@ -248,9 +254,5 @@ interface IRollupAdmin { * @param _inbox new address of the inbox contract * @param _sequencerInbox new address of sequencer inbox */ - function setMELConfig( - uint16 _melVersion, - address _inbox, - address _sequencerInbox - ) external; + function setMELConfig(uint16 _melVersion, address _inbox, address _sequencerInbox) external; } diff --git a/src/rollup/RollupUserLogic.sol b/src/rollup/RollupUserLogic.sol index 3595f222..e6b75c33 100644 --- a/src/rollup/RollupUserLogic.sol +++ b/src/rollup/RollupUserLogic.sol @@ -188,8 +188,7 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { require(baseStake >= assertion.beforeStateData.configData.requiredStake, "STAKE_TOO_LOW"); bytes32 prevAssertion = RollupLib.assertionHash( - assertion.beforeStateData.prevPrevAssertionHash, - assertion.beforeState + assertion.beforeStateData.prevPrevAssertionHash, assertion.beforeState ); getAssertionStorage(prevAssertion).requireExists(); @@ -202,7 +201,8 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { "STAKED_ON_ANOTHER_BRANCH" ); - bytes32 newAssertionHash = createNewAssertion(assertion, prevAssertion, expectedAssertionHash); + bytes32 newAssertionHash = + createNewAssertion(assertion, prevAssertion, expectedAssertionHash); _stakerMap[msg.sender].latestStakedAssertion = newAssertionHash; uint256 timeSincePrev = block.number - getAssertionStorage(prevAssertion).createdAtBlock; @@ -312,14 +312,14 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { AssertionStatus status = getAssertionStorage(expectedAssertionHash).status; bytes32 prevAssertion = RollupLib.assertionHash( - assertion.beforeStateData.prevPrevAssertionHash, - assertion.beforeState + assertion.beforeStateData.prevPrevAssertionHash, assertion.beforeState ); getAssertionStorage(prevAssertion).requireExists(); if (status == AssertionStatus.NoAssertion) { // If not exists, we create the new assertion - bytes32 newAssertionHash = createNewAssertion(assertion, prevAssertion, expectedAssertionHash); + bytes32 newAssertionHash = + createNewAssertion(assertion, prevAssertion, expectedAssertionHash); if (!getAssertionStorage(newAssertionHash).isFirstChild) { // only 1 of the children can be confirmed and get their stake refunded // so we send the other children's stake to the loserStakeEscrow @@ -331,11 +331,7 @@ contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { } // This would revert if the assertion is already confirmed - fastConfirmAssertion( - expectedAssertionHash, - prevAssertion, - assertion.afterState - ); + fastConfirmAssertion(expectedAssertionHash, prevAssertion, assertion.afterState); } function owner() external view returns (address) { diff --git a/src/state/MELState.sol b/src/state/MELState.sol index 065b38a3..21ecf4e3 100644 --- a/src/state/MELState.sol +++ b/src/state/MELState.sol @@ -6,43 +6,38 @@ pragma solidity ^0.8.0; struct MELState { // Versioning struct for the state, starting at 0. - uint16 version; - - // Parent chain ID of the Arbitrum chain that is running MEL. - uint64 parentChainId; - // The latest parent chain block fields processed by MEL. - uint64 parentChainBlockNumber; - - // Address of the contract where batches are posted to. - address batchPostingTargetAddress; - // Address of the contract where delayed messages are posted to. - address delayedMessagePostingTargetAddress; - - // The latest parent chain block hash observed by MEL and the hash of its parent - bytes32 parentChainBlockHash; - bytes32 parentChainPreviousBlockHash; - - // Number of batches observed when extracting with MEL. - uint64 batchCount; - - // Total messages extracted by MEL - uint64 msgCount; - - // Represents messages accumulated during processing of this specific parent chain block - bytes32 localMsgAccumulator; - - // Accumulators and numbers related to delayed messages. - uint64 delayedMessagesRead; - uint64 delayedMessagesSeen; - bytes32 delayedMessageInboxAcc; - bytes32 delayedMessageOutboxAcc; + uint16 version; + // Parent chain ID of the Arbitrum chain that is running MEL. + uint64 parentChainId; + // The latest parent chain block fields processed by MEL. + uint64 parentChainBlockNumber; + // Address of the contract where batches are posted to. + address batchPostingTargetAddress; + // Address of the contract where delayed messages are posted to. + address delayedMessagePostingTargetAddress; + // The latest parent chain block hash observed by MEL and the hash of its parent + bytes32 parentChainBlockHash; + bytes32 parentChainPreviousBlockHash; + // Number of batches observed when extracting with MEL. + uint64 batchCount; + // Total messages extracted by MEL + uint64 msgCount; + // Represents messages accumulated during processing of this specific parent chain block + bytes32 localMsgAccumulator; + // Accumulators and numbers related to delayed messages. + uint64 delayedMessagesRead; + uint64 delayedMessagesSeen; + bytes32 delayedMessageInboxAcc; + bytes32 delayedMessageOutboxAcc; } /** * @notice Utility functions for MELState */ library MELStateLib { - function hash(MELState memory state) internal pure returns (bytes32) { + function hash( + MELState memory state + ) internal pure returns (bytes32) { return keccak256(abi.encode(state)); } } diff --git a/test/signatures/EdgeChallengeManager b/test/signatures/EdgeChallengeManager index f9049450..3642b4c6 100644 --- a/test/signatures/EdgeChallengeManager +++ b/test/signatures/EdgeChallengeManager @@ -1,69 +1,69 @@ -╭----------------------------------------------------------------------------------------------------------------+------------╮ -| Method | Identifier | -+=============================================================================================================================+ -| LAYERZERO_BIGSTEPEDGE_HEIGHT() | 416e6657 | -|----------------------------------------------------------------------------------------------------------------+------------| -| LAYERZERO_BLOCKEDGE_HEIGHT() | 1dce5166 | -|----------------------------------------------------------------------------------------------------------------+------------| -| LAYERZERO_SMALLSTEPEDGE_HEIGHT() | f8ee77d6 | -|----------------------------------------------------------------------------------------------------------------+------------| -| NUM_BIGSTEP_LEVEL() | 5d9e2444 | -|----------------------------------------------------------------------------------------------------------------+------------| -| assertionChain() | 48dd2924 | -|----------------------------------------------------------------------------------------------------------------+------------| -| bisectEdge(bytes32,bytes32,bytes) | c8bc4e43 | -|----------------------------------------------------------------------------------------------------------------+------------| -| calculateEdgeId(uint8,bytes32,uint256,bytes32,uint256,bytes32) | 004d8efe | -|----------------------------------------------------------------------------------------------------------------+------------| -| calculateMutualId(uint8,bytes32,uint256,bytes32,uint256) | c32d8c63 | -|----------------------------------------------------------------------------------------------------------------+------------| -| challengePeriodBlocks() | 46c2781a | -|----------------------------------------------------------------------------------------------------------------+------------| -| confirmEdgeByOneStepProof(bytes32,(bytes32,bytes),(bytes32,uint256,address,uint64,uint64),bytes32[],bytes32[]) | 8c1b3a40 | -|----------------------------------------------------------------------------------------------------------------+------------| -| confirmEdgeByTime(bytes32,(((bytes32[2],uint64[2]),uint8,bytes32),bytes32,bytes32)) | b2a1408e | -|----------------------------------------------------------------------------------------------------------------+------------| -| confirmedRival(bytes32) | e5b123da | -|----------------------------------------------------------------------------------------------------------------+------------| -| createLayerZeroEdge((uint8,bytes32,uint256,bytes32,bytes,bytes)) | 05fae141 | -|----------------------------------------------------------------------------------------------------------------+------------| -| edgeExists(bytes32) | 750e0c0f | -|----------------------------------------------------------------------------------------------------------------+------------| -| edgeLength(bytes32) | eae0328b | -|----------------------------------------------------------------------------------------------------------------+------------| -| excessStakeReceiver() | e94e051e | -|----------------------------------------------------------------------------------------------------------------+------------| -| firstRival(bytes32) | bce6f54f | -|----------------------------------------------------------------------------------------------------------------+------------| -| getEdge(bytes32) | fda2892e | -|----------------------------------------------------------------------------------------------------------------+------------| -| getLayerZeroEndHeight(uint8) | 42e1aaa8 | -|----------------------------------------------------------------------------------------------------------------+------------| -| getPrevAssertionHash(bytes32) | 5a48e0f4 | -|----------------------------------------------------------------------------------------------------------------+------------| -| hasLengthOneRival(bytes32) | 54b64151 | -|----------------------------------------------------------------------------------------------------------------+------------| -| hasMadeLayerZeroRival(address,bytes32) | 655b42f3 | -|----------------------------------------------------------------------------------------------------------------+------------| -| hasRival(bytes32) | 908517e9 | -|----------------------------------------------------------------------------------------------------------------+------------| -| initialize(address,uint64,address,uint256,uint256,uint256,address,address,uint8,uint256[]) | 1a72d54c | -|----------------------------------------------------------------------------------------------------------------+------------| -| multiUpdateTimeCacheByChildren(bytes32[],uint256) | 432bb78a | -|----------------------------------------------------------------------------------------------------------------+------------| -| oneStepProofEntry() | 48923bc5 | -|----------------------------------------------------------------------------------------------------------------+------------| -| refundStake(bytes32) | 748926f3 | -|----------------------------------------------------------------------------------------------------------------+------------| -| stakeAmounts(uint256) | 1c1b4f3a | -|----------------------------------------------------------------------------------------------------------------+------------| -| stakeToken() | 51ed6a30 | -|----------------------------------------------------------------------------------------------------------------+------------| -| timeUnrivaled(bytes32) | 3e35f5e8 | -|----------------------------------------------------------------------------------------------------------------+------------| -| updateTimerCacheByChildren(bytes32,uint256) | edaab54a | -|----------------------------------------------------------------------------------------------------------------+------------| -| updateTimerCacheByClaim(bytes32,bytes32,uint256) | 8826a370 | -╰----------------------------------------------------------------------------------------------------------------+------------╯ +╭-----------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==============================================================================================================================+ +| LAYERZERO_BIGSTEPEDGE_HEIGHT() | 416e6657 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| LAYERZERO_BLOCKEDGE_HEIGHT() | 1dce5166 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| LAYERZERO_SMALLSTEPEDGE_HEIGHT() | f8ee77d6 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| NUM_BIGSTEP_LEVEL() | 5d9e2444 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| assertionChain() | 48dd2924 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| bisectEdge(bytes32,bytes32,bytes) | c8bc4e43 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| calculateEdgeId(uint8,bytes32,uint256,bytes32,uint256,bytes32) | 004d8efe | +|-----------------------------------------------------------------------------------------------------------------+------------| +| calculateMutualId(uint8,bytes32,uint256,bytes32,uint256) | c32d8c63 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| challengePeriodBlocks() | 46c2781a | +|-----------------------------------------------------------------------------------------------------------------+------------| +| confirmEdgeByOneStepProof(bytes32,(bytes32,bytes),(bytes32,uint256,address,uint64,bytes32),bytes32[],bytes32[]) | d863f8ac | +|-----------------------------------------------------------------------------------------------------------------+------------| +| confirmEdgeByTime(bytes32,(((bytes32[4],uint64[2]),uint8,bytes32),bytes32)) | 5a7f2fb2 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| confirmedRival(bytes32) | e5b123da | +|-----------------------------------------------------------------------------------------------------------------+------------| +| createLayerZeroEdge((uint8,bytes32,uint256,bytes32,bytes,bytes)) | 05fae141 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| edgeExists(bytes32) | 750e0c0f | +|-----------------------------------------------------------------------------------------------------------------+------------| +| edgeLength(bytes32) | eae0328b | +|-----------------------------------------------------------------------------------------------------------------+------------| +| excessStakeReceiver() | e94e051e | +|-----------------------------------------------------------------------------------------------------------------+------------| +| firstRival(bytes32) | bce6f54f | +|-----------------------------------------------------------------------------------------------------------------+------------| +| getEdge(bytes32) | fda2892e | +|-----------------------------------------------------------------------------------------------------------------+------------| +| getLayerZeroEndHeight(uint8) | 42e1aaa8 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| getPrevAssertionHash(bytes32) | 5a48e0f4 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| hasLengthOneRival(bytes32) | 54b64151 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| hasMadeLayerZeroRival(address,bytes32) | 655b42f3 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| hasRival(bytes32) | 908517e9 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| initialize(address,uint64,address,uint256,uint256,uint256,address,address,uint8,uint256[]) | 1a72d54c | +|-----------------------------------------------------------------------------------------------------------------+------------| +| multiUpdateTimeCacheByChildren(bytes32[],uint256) | 432bb78a | +|-----------------------------------------------------------------------------------------------------------------+------------| +| oneStepProofEntry() | 48923bc5 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| refundStake(bytes32) | 748926f3 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| stakeAmounts(uint256) | 1c1b4f3a | +|-----------------------------------------------------------------------------------------------------------------+------------| +| stakeToken() | 51ed6a30 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| timeUnrivaled(bytes32) | 3e35f5e8 | +|-----------------------------------------------------------------------------------------------------------------+------------| +| updateTimerCacheByChildren(bytes32,uint256) | edaab54a | +|-----------------------------------------------------------------------------------------------------------------+------------| +| updateTimerCacheByClaim(bytes32,bytes32,uint256) | 8826a370 | +╰-----------------------------------------------------------------------------------------------------------------+------------╯ diff --git a/test/signatures/OneStepProofEntry b/test/signatures/OneStepProofEntry index f7ddf420..274bb5af 100644 --- a/test/signatures/OneStepProofEntry +++ b/test/signatures/OneStepProofEntry @@ -2,7 +2,7 @@ ╭---------------------------------------------------------------+------------╮ | Method | Identifier | +============================================================================+ -| getMachineHash(((bytes32[2],uint64[2]),uint8)) | c39619c4 | +| getMachineHash(((bytes32[4],uint64[2]),uint8)) | c0f88fa6 | |---------------------------------------------------------------+------------| | getStartMachineHash(bytes32,bytes32) | 04997be4 | |---------------------------------------------------------------+------------| diff --git a/test/signatures/RollupAdminLogic b/test/signatures/RollupAdminLogic index 0785cecf..1bea2fe3 100644 --- a/test/signatures/RollupAdminLogic +++ b/test/signatures/RollupAdminLogic @@ -20,11 +20,13 @@ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | confirmPeriodBlocks() | 2e7acfa6 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| decreaseBaseStake(uint256,uint64) | 089a5d99 | +| currentMelConfigHash() | 010816fb | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| forceConfirmAssertion(bytes32,bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32) | 5bf03833 | +| decreaseBaseStake(uint256,bytes32) | 3d64074a | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| forceCreateAssertion(bytes32,((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32) | 9a7b4556 | +| forceConfirmAssertion(bytes32,bytes32,((bytes32[4],uint64[2]),uint8,bytes32)) | e6cf817d | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| forceCreateAssertion(bytes32,((bytes32,bytes32,(bytes32,uint256,address,uint64,bytes32)),((bytes32[4],uint64[2]),uint8,bytes32),((bytes32[4],uint64[2]),uint8,bytes32),(uint16,uint64,uint64,address,address,bytes32,bytes32,uint64,uint64,bytes32,uint64,uint64,bytes32,bytes32)),bytes32) | 8fe07f10 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | forceRefundStaker(address[]) | 7c75c298 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| @@ -48,7 +50,7 @@ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | increaseBaseStake(uint256) | 8c69f782 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| initialize((uint64,address,uint256,bytes32,address,address,uint256,string,uint256,uint64,uint256[],(uint256,uint256,uint256,uint256),uint256,uint256,uint256,((bytes32[2],uint64[2]),uint8,bytes32),uint256,address,uint8,uint64,(uint64,uint64,uint64),uint256),(address,address,address,address,address,address,address,address,address)) | 10fb7a50 | +| initialize((uint64,address,uint256,bytes32,address,address,uint256,string,uint256,uint64,uint256[],(uint256,uint256,uint256,uint256),uint256,uint256,uint256,((bytes32[4],uint64[2]),uint8,bytes32),uint256,address,uint8,uint64,(uint64,uint64,uint64),uint256),(address,address,address,address,address,address,address,address,address)) | 94d9dbea | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | isFirstChild(bytes32) | 30836228 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| @@ -64,6 +66,8 @@ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | loserStakeEscrow() | f065de3f | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| melConfig(bytes32) | 13f1e3fa | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | minimumAssertionPeriod() | 45e38b64 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | outbox() | ce11e6ab | @@ -96,6 +100,8 @@ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | setLoserStakeEscrow(address) | fc8ffa03 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| setMELConfig(uint16,address,address) | a96d44ea | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | setMinimumAssertionPeriod(uint256) | 948d6588 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | setOutbox(address) | ff204f3b | @@ -126,9 +132,9 @@ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | upgradeToAndCall(address,bytes) | 4f1ef286 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| validateAssertionHash(bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32,bytes32) | e51019a6 | +| validateAssertionHash(bytes32,((bytes32[4],uint64[2]),uint8,bytes32),bytes32) | 7e356e9b | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| validateConfig(bytes32,(bytes32,uint256,address,uint64,uint64)) | 04972af9 | +| validateConfig(bytes32,(bytes32,uint256,address,uint64,bytes32)) | d13666eb | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | validatorAfkBlocks() | e6b3082c | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| diff --git a/test/signatures/RollupCore b/test/signatures/RollupCore index 96591747..de3dc208 100644 --- a/test/signatures/RollupCore +++ b/test/signatures/RollupCore @@ -1,89 +1,93 @@ -╭---------------------------------------------------------------------------------------+------------╮ -| Method | Identifier | -+====================================================================================================+ -| _stakerMap(address) | e8bd4922 | -|---------------------------------------------------------------------------------------+------------| -| amountStaked(address) | ef40a670 | -|---------------------------------------------------------------------------------------+------------| -| anyTrustFastConfirmer() | 55840a58 | -|---------------------------------------------------------------------------------------+------------| -| baseStake() | 76e7e23b | -|---------------------------------------------------------------------------------------+------------| -| bridge() | e78cea92 | -|---------------------------------------------------------------------------------------+------------| -| chainId() | 9a8a0592 | -|---------------------------------------------------------------------------------------+------------| -| challengeGracePeriodBlocks() | 3be680ea | -|---------------------------------------------------------------------------------------+------------| -| challengeManager() | 023a96fe | -|---------------------------------------------------------------------------------------+------------| -| confirmPeriodBlocks() | 2e7acfa6 | -|---------------------------------------------------------------------------------------+------------| -| genesisAssertionHash() | 353325e0 | -|---------------------------------------------------------------------------------------+------------| -| getAssertion(bytes32) | 88302884 | -|---------------------------------------------------------------------------------------+------------| -| getAssertionCreationBlockForLogLookup(bytes32) | 13c56ca7 | -|---------------------------------------------------------------------------------------+------------| -| getFirstChildCreationBlock(bytes32) | 11715585 | -|---------------------------------------------------------------------------------------+------------| -| getSecondChildCreationBlock(bytes32) | 56bbc9e6 | -|---------------------------------------------------------------------------------------+------------| -| getStaker(address) | a23c44b1 | -|---------------------------------------------------------------------------------------+------------| -| getStakerAddress(uint64) | 6ddd3744 | -|---------------------------------------------------------------------------------------+------------| -| getValidators() | b7ab4db5 | -|---------------------------------------------------------------------------------------+------------| -| inbox() | fb0e722b | -|---------------------------------------------------------------------------------------+------------| -| isFirstChild(bytes32) | 30836228 | -|---------------------------------------------------------------------------------------+------------| -| isPending(bytes32) | e531d8c7 | -|---------------------------------------------------------------------------------------+------------| -| isStaked(address) | 6177fd18 | -|---------------------------------------------------------------------------------------+------------| -| isValidator(address) | facd743b | -|---------------------------------------------------------------------------------------+------------| -| latestConfirmed() | 65f7f80d | -|---------------------------------------------------------------------------------------+------------| -| latestStakedAssertion(address) | 2abdd230 | -|---------------------------------------------------------------------------------------+------------| -| loserStakeEscrow() | f065de3f | -|---------------------------------------------------------------------------------------+------------| -| minimumAssertionPeriod() | 45e38b64 | -|---------------------------------------------------------------------------------------+------------| -| outbox() | ce11e6ab | -|---------------------------------------------------------------------------------------+------------| -| paused() | 5c975abb | -|---------------------------------------------------------------------------------------+------------| -| rollupDeploymentBlock() | 1b1689e9 | -|---------------------------------------------------------------------------------------+------------| -| rollupEventInbox() | aa38a6e7 | -|---------------------------------------------------------------------------------------+------------| -| sequencerInbox() | ee35f327 | -|---------------------------------------------------------------------------------------+------------| -| stakeToken() | 51ed6a30 | -|---------------------------------------------------------------------------------------+------------| -| stakerCount() | dff69787 | -|---------------------------------------------------------------------------------------+------------| -| totalWithdrawableFunds() | 71ef232c | -|---------------------------------------------------------------------------------------+------------| -| validateAssertionHash(bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32,bytes32) | e51019a6 | -|---------------------------------------------------------------------------------------+------------| -| validateConfig(bytes32,(bytes32,uint256,address,uint64,uint64)) | 04972af9 | -|---------------------------------------------------------------------------------------+------------| -| validatorAfkBlocks() | e6b3082c | -|---------------------------------------------------------------------------------------+------------| -| validatorWalletCreator() | bc45e0ae | -|---------------------------------------------------------------------------------------+------------| -| validatorWhitelistDisabled() | 12ab3d3b | -|---------------------------------------------------------------------------------------+------------| -| wasmModuleRoot() | 8ee1a126 | -|---------------------------------------------------------------------------------------+------------| -| withdrawableFunds(address) | 2f30cabd | -|---------------------------------------------------------------------------------------+------------| -| withdrawalAddress(address) | 84728cd0 | -╰---------------------------------------------------------------------------------------+------------╯ +╭-------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++============================================================================================+ +| _stakerMap(address) | e8bd4922 | +|-------------------------------------------------------------------------------+------------| +| amountStaked(address) | ef40a670 | +|-------------------------------------------------------------------------------+------------| +| anyTrustFastConfirmer() | 55840a58 | +|-------------------------------------------------------------------------------+------------| +| baseStake() | 76e7e23b | +|-------------------------------------------------------------------------------+------------| +| bridge() | e78cea92 | +|-------------------------------------------------------------------------------+------------| +| chainId() | 9a8a0592 | +|-------------------------------------------------------------------------------+------------| +| challengeGracePeriodBlocks() | 3be680ea | +|-------------------------------------------------------------------------------+------------| +| challengeManager() | 023a96fe | +|-------------------------------------------------------------------------------+------------| +| confirmPeriodBlocks() | 2e7acfa6 | +|-------------------------------------------------------------------------------+------------| +| currentMelConfigHash() | 010816fb | +|-------------------------------------------------------------------------------+------------| +| genesisAssertionHash() | 353325e0 | +|-------------------------------------------------------------------------------+------------| +| getAssertion(bytes32) | 88302884 | +|-------------------------------------------------------------------------------+------------| +| getAssertionCreationBlockForLogLookup(bytes32) | 13c56ca7 | +|-------------------------------------------------------------------------------+------------| +| getFirstChildCreationBlock(bytes32) | 11715585 | +|-------------------------------------------------------------------------------+------------| +| getSecondChildCreationBlock(bytes32) | 56bbc9e6 | +|-------------------------------------------------------------------------------+------------| +| getStaker(address) | a23c44b1 | +|-------------------------------------------------------------------------------+------------| +| getStakerAddress(uint64) | 6ddd3744 | +|-------------------------------------------------------------------------------+------------| +| getValidators() | b7ab4db5 | +|-------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------+------------| +| isFirstChild(bytes32) | 30836228 | +|-------------------------------------------------------------------------------+------------| +| isPending(bytes32) | e531d8c7 | +|-------------------------------------------------------------------------------+------------| +| isStaked(address) | 6177fd18 | +|-------------------------------------------------------------------------------+------------| +| isValidator(address) | facd743b | +|-------------------------------------------------------------------------------+------------| +| latestConfirmed() | 65f7f80d | +|-------------------------------------------------------------------------------+------------| +| latestStakedAssertion(address) | 2abdd230 | +|-------------------------------------------------------------------------------+------------| +| loserStakeEscrow() | f065de3f | +|-------------------------------------------------------------------------------+------------| +| melConfig(bytes32) | 13f1e3fa | +|-------------------------------------------------------------------------------+------------| +| minimumAssertionPeriod() | 45e38b64 | +|-------------------------------------------------------------------------------+------------| +| outbox() | ce11e6ab | +|-------------------------------------------------------------------------------+------------| +| paused() | 5c975abb | +|-------------------------------------------------------------------------------+------------| +| rollupDeploymentBlock() | 1b1689e9 | +|-------------------------------------------------------------------------------+------------| +| rollupEventInbox() | aa38a6e7 | +|-------------------------------------------------------------------------------+------------| +| sequencerInbox() | ee35f327 | +|-------------------------------------------------------------------------------+------------| +| stakeToken() | 51ed6a30 | +|-------------------------------------------------------------------------------+------------| +| stakerCount() | dff69787 | +|-------------------------------------------------------------------------------+------------| +| totalWithdrawableFunds() | 71ef232c | +|-------------------------------------------------------------------------------+------------| +| validateAssertionHash(bytes32,((bytes32[4],uint64[2]),uint8,bytes32),bytes32) | 7e356e9b | +|-------------------------------------------------------------------------------+------------| +| validateConfig(bytes32,(bytes32,uint256,address,uint64,bytes32)) | d13666eb | +|-------------------------------------------------------------------------------+------------| +| validatorAfkBlocks() | e6b3082c | +|-------------------------------------------------------------------------------+------------| +| validatorWalletCreator() | bc45e0ae | +|-------------------------------------------------------------------------------+------------| +| validatorWhitelistDisabled() | 12ab3d3b | +|-------------------------------------------------------------------------------+------------| +| wasmModuleRoot() | 8ee1a126 | +|-------------------------------------------------------------------------------+------------| +| withdrawableFunds(address) | 2f30cabd | +|-------------------------------------------------------------------------------+------------| +| withdrawalAddress(address) | 84728cd0 | +╰-------------------------------------------------------------------------------+------------╯ diff --git a/test/signatures/RollupCreator b/test/signatures/RollupCreator index de9b35f9..201abf38 100644 --- a/test/signatures/RollupCreator +++ b/test/signatures/RollupCreator @@ -6,7 +6,7 @@ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | challengeManagerTemplate() | 9c683d10 | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| createRollup(((uint64,address,uint256,bytes32,address,address,uint256,string,uint256,uint64,uint256[],(uint256,uint256,uint256,uint256),uint256,uint256,uint256,((bytes32[2],uint64[2]),uint8,bytes32),uint256,address,uint8,uint64,(uint64,uint64,uint64),uint256),address[],uint256,address,bool,uint256,address[],address,address,address)) | 2d12e32c | +| createRollup(((uint64,address,uint256,bytes32,address,address,uint256,string,uint256,uint64,uint256[],(uint256,uint256,uint256,uint256),uint256,uint256,uint256,((bytes32[4],uint64[2]),uint8,bytes32),uint256,address,uint8,uint64,(uint64,uint64,uint64),uint256),address[],uint256,address,bool,uint256,address[],address,address,address)) | a73e3440 | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | l2FactoriesDeployer() | ac0425bc | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| diff --git a/test/signatures/RollupUserLogic b/test/signatures/RollupUserLogic index 522238a6..7b36a26c 100644 --- a/test/signatures/RollupUserLogic +++ b/test/signatures/RollupUserLogic @@ -1,125 +1,129 @@ -╭-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ -| Method | Identifier | -+========================================================================================================================================================================================================+ -| _stakerMap(address) | e8bd4922 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| addToDeposit(address,address,uint256) | 685f5ecc | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| amountStaked(address) | ef40a670 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| anyTrustFastConfirmer() | 55840a58 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| baseStake() | 76e7e23b | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| bridge() | e78cea92 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| chainId() | 9a8a0592 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| challengeGracePeriodBlocks() | 3be680ea | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| challengeManager() | 023a96fe | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| computeAssertionHash(bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32) | 33635fc2 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| confirmAssertion(bytes32,bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32,(bytes32,uint256,address,uint64,uint64),bytes32) | 10b98a35 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| confirmPeriodBlocks() | 2e7acfa6 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| fastConfirmAssertion(bytes32,bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32) | 6096686d | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| fastConfirmNewAssertion(((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32) | 6420fb9f | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| genesisAssertionHash() | 353325e0 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| getAssertion(bytes32) | 88302884 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| getAssertionCreationBlockForLogLookup(bytes32) | 13c56ca7 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| getFirstChildCreationBlock(bytes32) | 11715585 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| getSecondChildCreationBlock(bytes32) | 56bbc9e6 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| getStaker(address) | a23c44b1 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| getStakerAddress(uint64) | 6ddd3744 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| getValidators() | b7ab4db5 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| inbox() | fb0e722b | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| initialize(address) | c4d66de8 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| isFirstChild(bytes32) | 30836228 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| isPending(bytes32) | e531d8c7 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| isStaked(address) | 6177fd18 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| isValidator(address) | facd743b | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| latestConfirmed() | 65f7f80d | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| latestStakedAssertion(address) | 2abdd230 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| loserStakeEscrow() | f065de3f | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| minimumAssertionPeriod() | 45e38b64 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| newStake(uint256,address) | 68129b14 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| newStakeOnNewAssertion(uint256,((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32) | 7300201c | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| newStakeOnNewAssertion(uint256,((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32,address) | 50f32f68 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| outbox() | ce11e6ab | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| owner() | 8da5cb5b | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| paused() | 5c975abb | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| proxiableUUID() | 52d1902d | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| reduceDeposit(uint256) | 1e83d30f | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| removeWhitelistAfterFork() | c2c2e68e | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| removeWhitelistAfterValidatorAfk() | 18baaab9 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| returnOldDeposit() | 57ef4ab9 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| returnOldDepositFor(address) | 588c7a16 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| rollupDeploymentBlock() | 1b1689e9 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| rollupEventInbox() | aa38a6e7 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| sequencerInbox() | ee35f327 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| stakeOnNewAssertion(((bytes32,bytes32,(bytes32,uint256,address,uint64,uint64)),((bytes32[2],uint64[2]),uint8,bytes32),((bytes32[2],uint64[2]),uint8,bytes32)),bytes32) | 3b86de19 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| stakeToken() | 51ed6a30 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| stakerCount() | dff69787 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| totalWithdrawableFunds() | 71ef232c | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| validateAssertionHash(bytes32,((bytes32[2],uint64[2]),uint8,bytes32),bytes32,bytes32) | e51019a6 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| validateConfig(bytes32,(bytes32,uint256,address,uint64,uint64)) | 04972af9 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| validatorAfkBlocks() | e6b3082c | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| validatorWalletCreator() | bc45e0ae | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| validatorWhitelistDisabled() | 12ab3d3b | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| wasmModuleRoot() | 8ee1a126 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| withdrawStakerFunds() | 61373919 | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| withdrawableFunds(address) | 2f30cabd | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| withdrawalAddress(address) | 84728cd0 | -╰-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ +╭-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++====================================================================================================================================================================================================================================================================================================================+ +| _stakerMap(address) | e8bd4922 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| addToDeposit(address,address,uint256) | 685f5ecc | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| amountStaked(address) | ef40a670 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| anyTrustFastConfirmer() | 55840a58 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| baseStake() | 76e7e23b | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| bridge() | e78cea92 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| chainId() | 9a8a0592 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| challengeGracePeriodBlocks() | 3be680ea | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| challengeManager() | 023a96fe | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| computeAssertionHash(bytes32,((bytes32[4],uint64[2]),uint8,bytes32)) | e05b0a7b | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| confirmAssertion(bytes32,bytes32,((bytes32[4],uint64[2]),uint8,bytes32),bytes32,(bytes32,uint256,address,uint64,bytes32)) | 4c10ee51 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| confirmPeriodBlocks() | 2e7acfa6 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| currentMelConfigHash() | 010816fb | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| fastConfirmAssertion(bytes32,bytes32,((bytes32[4],uint64[2]),uint8,bytes32)) | abc4dd38 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| fastConfirmNewAssertion(((bytes32,bytes32,(bytes32,uint256,address,uint64,bytes32)),((bytes32[4],uint64[2]),uint8,bytes32),((bytes32[4],uint64[2]),uint8,bytes32),(uint16,uint64,uint64,address,address,bytes32,bytes32,uint64,uint64,bytes32,uint64,uint64,bytes32,bytes32)),bytes32) | 7f34fd33 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| genesisAssertionHash() | 353325e0 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| getAssertion(bytes32) | 88302884 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| getAssertionCreationBlockForLogLookup(bytes32) | 13c56ca7 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| getFirstChildCreationBlock(bytes32) | 11715585 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| getSecondChildCreationBlock(bytes32) | 56bbc9e6 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| getStaker(address) | a23c44b1 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| getStakerAddress(uint64) | 6ddd3744 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| getValidators() | b7ab4db5 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| initialize(address) | c4d66de8 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| isFirstChild(bytes32) | 30836228 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| isPending(bytes32) | e531d8c7 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| isStaked(address) | 6177fd18 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| isValidator(address) | facd743b | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| latestConfirmed() | 65f7f80d | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| latestStakedAssertion(address) | 2abdd230 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| loserStakeEscrow() | f065de3f | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| melConfig(bytes32) | 13f1e3fa | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| minimumAssertionPeriod() | 45e38b64 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| newStake(uint256,address) | 68129b14 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| newStakeOnNewAssertion(uint256,((bytes32,bytes32,(bytes32,uint256,address,uint64,bytes32)),((bytes32[4],uint64[2]),uint8,bytes32),((bytes32[4],uint64[2]),uint8,bytes32),(uint16,uint64,uint64,address,address,bytes32,bytes32,uint64,uint64,bytes32,uint64,uint64,bytes32,bytes32)),bytes32) | 7f62c2af | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| newStakeOnNewAssertion(uint256,((bytes32,bytes32,(bytes32,uint256,address,uint64,bytes32)),((bytes32[4],uint64[2]),uint8,bytes32),((bytes32[4],uint64[2]),uint8,bytes32),(uint16,uint64,uint64,address,address,bytes32,bytes32,uint64,uint64,bytes32,uint64,uint64,bytes32,bytes32)),bytes32,address) | efa4cb29 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| outbox() | ce11e6ab | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| paused() | 5c975abb | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| proxiableUUID() | 52d1902d | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| reduceDeposit(uint256) | 1e83d30f | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| removeWhitelistAfterFork() | c2c2e68e | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| removeWhitelistAfterValidatorAfk() | 18baaab9 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| returnOldDeposit() | 57ef4ab9 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| returnOldDepositFor(address) | 588c7a16 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| rollupDeploymentBlock() | 1b1689e9 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| rollupEventInbox() | aa38a6e7 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| sequencerInbox() | ee35f327 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| stakeOnNewAssertion(((bytes32,bytes32,(bytes32,uint256,address,uint64,bytes32)),((bytes32[4],uint64[2]),uint8,bytes32),((bytes32[4],uint64[2]),uint8,bytes32),(uint16,uint64,uint64,address,address,bytes32,bytes32,uint64,uint64,bytes32,uint64,uint64,bytes32,bytes32)),bytes32) | 550dc268 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| stakeToken() | 51ed6a30 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| stakerCount() | dff69787 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| totalWithdrawableFunds() | 71ef232c | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| validateAssertionHash(bytes32,((bytes32[4],uint64[2]),uint8,bytes32),bytes32) | 7e356e9b | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| validateConfig(bytes32,(bytes32,uint256,address,uint64,bytes32)) | d13666eb | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| validatorAfkBlocks() | e6b3082c | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| validatorWalletCreator() | bc45e0ae | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| validatorWhitelistDisabled() | 12ab3d3b | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| wasmModuleRoot() | 8ee1a126 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| withdrawStakerFunds() | 61373919 | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| withdrawableFunds(address) | 2f30cabd | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| withdrawalAddress(address) | 84728cd0 | +╰-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ diff --git a/test/storage/RollupAdminLogic b/test/storage/RollupAdminLogic index 8f53588e..03cd85e8 100644 --- a/test/storage/RollupAdminLogic +++ b/test/storage/RollupAdminLogic @@ -1,67 +1,71 @@ -╭--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+===========================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| _paused | bool | 51 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------| -| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | -╰--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------------------╯ +╭--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++==============================================================================================================================================================+ +| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| _paused | bool | 51 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| currentMelConfigHash | bytes32 | 125 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------| +| melConfig | mapping(bytes32 => struct IRollupCore.MELConfig) | 126 | 0 | 32 | src/rollup/RollupAdminLogic.sol:RollupAdminLogic | +╰--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------------------╯ diff --git a/test/storage/RollupCore b/test/storage/RollupCore index e493175c..848153a3 100644 --- a/test/storage/RollupCore +++ b/test/storage/RollupCore @@ -1,67 +1,71 @@ -╭--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+===============================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| _paused | bool | 51 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupCore.sol:RollupCore | -|--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------| -| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | -╰--------------------------------+-----------------------------------------------+------+--------+-------+--------------------------------------╯ +╭--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++==================================================================================================================================================+ +| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| _paused | bool | 51 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| currentMelConfigHash | bytes32 | 125 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +|--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------| +| melConfig | mapping(bytes32 => struct IRollupCore.MELConfig) | 126 | 0 | 32 | src/rollup/RollupCore.sol:RollupCore | +╰--------------------------------+--------------------------------------------------+------+--------+-------+--------------------------------------╯ diff --git a/test/storage/RollupUserLogic b/test/storage/RollupUserLogic index b2edbafb..d4322042 100644 --- a/test/storage/RollupUserLogic +++ b/test/storage/RollupUserLogic @@ -1,67 +1,71 @@ -╭--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+=========================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| _paused | bool | 51 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -|--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------| -| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | -╰--------------------------------+-----------------------------------------------+------+--------+-------+------------------------------------------------╯ +╭--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++============================================================================================================================================================+ +| _initialized | uint8 | 0 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| _initializing | bool | 0 | 1 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| __gap | uint256[50] | 1 | 0 | 1600 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| _paused | bool | 51 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| __gap | uint256[49] | 52 | 0 | 1568 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| chainId | uint256 | 101 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| confirmPeriodBlocks | uint64 | 102 | 0 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| validatorAfkBlocks | uint64 | 102 | 8 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| baseStake | uint256 | 103 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| wasmModuleRoot | bytes32 | 104 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| challengeManager | contract IEdgeChallengeManager | 105 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| challengeGracePeriodBlocks | uint64 | 105 | 20 | 8 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| inbox | contract IInboxBase | 106 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| bridge | contract IBridge | 107 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| outbox | contract IOutbox | 108 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| rollupEventInbox | contract IRollupEventInbox | 109 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| validatorWalletCreator | address | 110 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| loserStakeEscrow | address | 111 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| stakeToken | address | 112 | 0 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| minimumAssertionPeriod | uint256 | 113 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| validators | struct EnumerableSetUpgradeable.AddressSet | 114 | 0 | 64 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| _latestConfirmed | bytes32 | 116 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| _assertions | mapping(bytes32 => struct AssertionNode) | 117 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| _stakerList | address[] | 118 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| _stakerMap | mapping(address => struct IRollupCore.Staker) | 119 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| _withdrawableFunds | mapping(address => uint256) | 120 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| totalWithdrawableFunds | uint256 | 121 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| rollupDeploymentBlock | uint256 | 122 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| validatorWhitelistDisabled | bool | 123 | 0 | 1 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| anyTrustFastConfirmer | address | 123 | 1 | 20 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| _assertionCreatedAtArbSysBlock | mapping(bytes32 => uint256) | 124 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| currentMelConfigHash | bytes32 | 125 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------| +| melConfig | mapping(bytes32 => struct IRollupCore.MELConfig) | 126 | 0 | 32 | src/rollup/RollupUserLogic.sol:RollupUserLogic | +╰--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------╯