diff --git a/contracts/docs/api/messaging/l1/v1/L1MessageManagerV1.mdx b/contracts/docs/api/messaging/l1/v1/L1MessageManagerV1.mdx index 38aa292d..199f1521 100644 --- a/contracts/docs/api/messaging/l1/v1/L1MessageManagerV1.mdx +++ b/contracts/docs/api/messaging/l1/v1/L1MessageManagerV1.mdx @@ -40,7 +40,8 @@ uint8 OUTBOX_STATUS_RECEIVED mapping(bytes32 => uint256) outboxL1L2MessageStatus ``` -_DEPRECATED in favor of the rollingHashes mapping on the L1MessageManager for L1 to L2 messaging._ +_DEPRECATED in favor of the rollingHashes mapping on the L1MessageManager for L1 to L2 messaging. +Cannot be made private because there may be unclaimed messages stored in this data structure._ ### inboxL2L1MessageStatus diff --git a/contracts/docs/api/messaging/l1/v1/L1MessageServiceV1.mdx b/contracts/docs/api/messaging/l1/v1/L1MessageServiceV1.mdx index f8e98530..a7d19952 100644 --- a/contracts/docs/api/messaging/l1/v1/L1MessageServiceV1.mdx +++ b/contracts/docs/api/messaging/l1/v1/L1MessageServiceV1.mdx @@ -6,14 +6,6 @@ uint256 nextMessageNumber ``` -### _messageSender - -```solidity -address _messageSender -``` - -_DEPRECATED in favor of new transient storage with `MESSAGE_SENDER_TRANSIENT_KEY` key._ - ### REFUND_OVERHEAD_IN_GAS ```solidity diff --git a/contracts/docs/api/rollup/LineaRollup.mdx b/contracts/docs/api/rollup/LineaRollup.mdx index 9604dfa5..eecf3e33 100644 --- a/contracts/docs/api/rollup/LineaRollup.mdx +++ b/contracts/docs/api/rollup/LineaRollup.mdx @@ -80,62 +80,6 @@ uint256 SIX_MONTHS_IN_SECONDS _In practice, when used, this is expected to be a close approximation to 6 months, and is intentional._ -### dataFinalStateRootHashes - -```solidity -mapping(bytes32 => bytes32) dataFinalStateRootHashes -``` - -_DEPRECATED in favor of the single blobShnarfExists mapping._ - -### dataParents - -```solidity -mapping(bytes32 => bytes32) dataParents -``` - -_DEPRECATED in favor of the single blobShnarfExists mapping._ - -### dataShnarfHashes - -```solidity -mapping(bytes32 => bytes32) dataShnarfHashes -``` - -_DEPRECATED in favor of the single blobShnarfExists mapping._ - -### dataStartingBlock - -```solidity -mapping(bytes32 => uint256) dataStartingBlock -``` - -_DEPRECATED in favor of the single blobShnarfExists mapping._ - -### dataEndingBlock - -```solidity -mapping(bytes32 => uint256) dataEndingBlock -``` - -_DEPRECATED in favor of the single blobShnarfExists mapping._ - -### currentL2StoredL1MessageNumber - -```solidity -uint256 currentL2StoredL1MessageNumber -``` - -_DEPRECATED in favor of currentFinalizedState hash._ - -### currentL2StoredL1RollingHash - -```solidity -bytes32 currentL2StoredL1RollingHash -``` - -_DEPRECATED in favor of currentFinalizedState hash._ - ### currentFinalizedShnarf ```solidity diff --git a/contracts/docs/api/rollup/ZkEvmV2.mdx b/contracts/docs/api/rollup/ZkEvmV2.mdx index c74fc689..d13c66b2 100644 --- a/contracts/docs/api/rollup/ZkEvmV2.mdx +++ b/contracts/docs/api/rollup/ZkEvmV2.mdx @@ -12,14 +12,6 @@ uint256 MODULO_R bytes32 OPERATOR_ROLE ``` -### currentTimestamp - -```solidity -uint256 currentTimestamp -``` - -_DEPRECATED in favor of currentFinalizedState hash._ - ### currentL2BlockNumber ```solidity diff --git a/contracts/scripts/gnosis/queryContract.ts b/contracts/scripts/gnosis/queryContract.ts deleted file mode 100644 index ff123f56..00000000 --- a/contracts/scripts/gnosis/queryContract.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ethers } from "hardhat"; -import { LineaRollup } from "../../typechain-types"; - -async function main() { - // TESTING ON L1 - - const factory = await ethers.getContractFactory("LineaRollup"); - const proxyContract = factory.attach("0x41B186Dc7C46f08ADFdCe21Da1b07f605819E9Ab") as LineaRollup; - - const verifier0 = await proxyContract.verifiers(0); - const verifier1 = await proxyContract.verifiers(1); - const verifier2 = await proxyContract.verifiers(2); - - console.log({ verifier0, verifier1, verifier2 }); - - const limitInWei = await proxyContract.limitInWei(); - const systemMigrationBlock = await proxyContract.systemMigrationBlock(); - - console.log({ "systemMigrationBlock:": systemMigrationBlock, "limitInWei:": limitInWei }); - - const outboxL1L2Mapping = await proxyContract.outboxL1L2MessageStatus( - "0x0706629f2d6735d342c62fda7484482f77d9c2f53133e5b391d55b81a820ce27", - ); - console.log("outboxL1L2Mapping :", outboxL1L2Mapping); - - const dataStartingBlock = await proxyContract.dataStartingBlock( - "0x0000000000000000000000000000000000000000000000000000000000000001", - ); - const dataEndingBlock = await proxyContract.dataEndingBlock( - "0x0000000000000000000000000000000000000000000000000000000000000001", - ); - - console.log("dataStartingBlock :", dataStartingBlock); - console.log("dataEndingBlock :", dataEndingBlock); - console.log("L1 Test done"); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/contracts/src/_testing/unit/rollup/TestLineaRollup.sol b/contracts/src/_testing/unit/rollup/TestLineaRollup.sol index 0c0cee4b..fcb2c8a3 100644 --- a/contracts/src/_testing/unit/rollup/TestLineaRollup.sol +++ b/contracts/src/_testing/unit/rollup/TestLineaRollup.sol @@ -13,10 +13,6 @@ contract TestLineaRollup is LineaRollup { rollingHashes[_messageNumber] = _rollingHash; } - function setLastTimeStamp(uint256 _timestamp) external { - currentTimestamp = _timestamp; - } - function validateL2ComputedRollingHash(uint256 _rollingHashMessageNumber, bytes32 _rollingHash) external view { _validateL2ComputedRollingHash(_rollingHashMessageNumber, _rollingHash); } @@ -29,22 +25,10 @@ contract TestLineaRollup is LineaRollup { blobShnarfExists[_shnarf] = 1; } - function setupParentDataShnarf(bytes32 _parentDataHash, bytes32 _shnarf) external { - dataShnarfHashes[_parentDataHash] = _shnarf; - } - function setLastFinalizedBlock(uint256 _blockNumber) external { currentL2BlockNumber = _blockNumber; } - function setupParentFinalizedStateRoot(bytes32 _parentDataHash, bytes32 _blockStateRoot) external { - dataFinalStateRootHashes[_parentDataHash] = _blockStateRoot; - } - - function setupStartingBlockForDataHash(bytes32 _dataHash, uint256 _blockNumber) external { - dataStartingBlock[_dataHash] = _blockNumber; - } - function setLastFinalizedShnarf(bytes32 _lastFinalizedShnarf) external { currentFinalizedShnarf = _lastFinalizedShnarf; } diff --git a/contracts/src/messaging/l1/v1/L1MessageManagerV1.sol b/contracts/src/messaging/l1/v1/L1MessageManagerV1.sol index 892d06bb..77f738fb 100644 --- a/contracts/src/messaging/l1/v1/L1MessageManagerV1.sol +++ b/contracts/src/messaging/l1/v1/L1MessageManagerV1.sol @@ -19,6 +19,7 @@ abstract contract L1MessageManagerV1 is IL1MessageManagerV1 { uint8 public constant OUTBOX_STATUS_RECEIVED = 2; /// @dev DEPRECATED in favor of the rollingHashes mapping on the L1MessageManager for L1 to L2 messaging. + /// @dev Cannot be made private because there may be unclaimed messages stored in this data structure. mapping(bytes32 messageHash => uint256 messageStatus) public outboxL1L2MessageStatus; /** diff --git a/contracts/src/messaging/l1/v1/L1MessageServiceV1.sol b/contracts/src/messaging/l1/v1/L1MessageServiceV1.sol index c7a48f17..450d4b85 100644 --- a/contracts/src/messaging/l1/v1/L1MessageServiceV1.sol +++ b/contracts/src/messaging/l1/v1/L1MessageServiceV1.sol @@ -27,7 +27,7 @@ abstract contract L1MessageServiceV1 is uint256 public nextMessageNumber; /// @dev DEPRECATED in favor of new transient storage with `MESSAGE_SENDER_TRANSIENT_KEY` key. - address internal _messageSender; + address private _messageSender_DEPRECATED; /// @dev Total contract storage is 52 slots including the gap below. /// @dev Keep 50 free storage slots for future implementation updates to avoid storage collision. diff --git a/contracts/src/rollup/LineaRollup.sol b/contracts/src/rollup/LineaRollup.sol index 08f042f7..737ec0ff 100644 --- a/contracts/src/rollup/LineaRollup.sol +++ b/contracts/src/rollup/LineaRollup.sol @@ -17,7 +17,7 @@ contract LineaRollup is AccessControlUpgradeable, ZkEvmV2, L1MessageService, Per using EfficientLeftRightKeccak for *; /// @notice This is the ABI version and not the reinitialize version. - string public constant CONTRACT_VERSION = "6.0"; + string public constant CONTRACT_VERSION = "7.0"; /// @notice The role required to set/add proof verifiers by type. bytes32 public constant VERIFIER_SETTER_ROLE = keccak256("VERIFIER_SETTER_ROLE"); @@ -48,20 +48,20 @@ contract LineaRollup is AccessControlUpgradeable, ZkEvmV2, L1MessageService, Per uint256 internal constant SIX_MONTHS_IN_SECONDS = (365 / 2) * 24 * 60 * 60; /// @dev DEPRECATED in favor of the single blobShnarfExists mapping. - mapping(bytes32 dataHash => bytes32 finalStateRootHash) public dataFinalStateRootHashes; + mapping(bytes32 dataHash => bytes32 finalStateRootHash) private dataFinalStateRootHashes_DEPRECATED; /// @dev DEPRECATED in favor of the single blobShnarfExists mapping. - mapping(bytes32 dataHash => bytes32 parentHash) public dataParents; + mapping(bytes32 dataHash => bytes32 parentHash) private dataParents_DEPRECATED; /// @dev DEPRECATED in favor of the single blobShnarfExists mapping. - mapping(bytes32 dataHash => bytes32 shnarfHash) public dataShnarfHashes; + mapping(bytes32 dataHash => bytes32 shnarfHash) private dataShnarfHashes_DEPRECATED; /// @dev DEPRECATED in favor of the single blobShnarfExists mapping. - mapping(bytes32 dataHash => uint256 startingBlock) public dataStartingBlock; + mapping(bytes32 dataHash => uint256 startingBlock) private dataStartingBlock_DEPRECATED; /// @dev DEPRECATED in favor of the single blobShnarfExists mapping. - mapping(bytes32 dataHash => uint256 endingBlock) public dataEndingBlock; + mapping(bytes32 dataHash => uint256 endingBlock) private dataEndingBlock_DEPRECATED; /// @dev DEPRECATED in favor of currentFinalizedState hash. - uint256 public currentL2StoredL1MessageNumber; + uint256 private currentL2StoredL1MessageNumber_DEPRECATED; /// @dev DEPRECATED in favor of currentFinalizedState hash. - bytes32 public currentL2StoredL1RollingHash; + bytes32 private currentL2StoredL1RollingHash_DEPRECATED; /// @notice Contains the most recent finalized shnarf. bytes32 public currentFinalizedShnarf; diff --git a/contracts/src/rollup/ZkEvmV2.sol b/contracts/src/rollup/ZkEvmV2.sol index bf362bec..31ab44cd 100644 --- a/contracts/src/rollup/ZkEvmV2.sol +++ b/contracts/src/rollup/ZkEvmV2.sol @@ -15,7 +15,7 @@ abstract contract ZkEvmV2 is AccessControlUpgradeable, L1MessageServiceV1, IZkEv bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); /// @dev DEPRECATED in favor of currentFinalizedState hash. - uint256 public currentTimestamp; + uint256 private currentTimestamp_DEPRECATED; /// @notice The most recent finalized L2 block number. uint256 public currentL2BlockNumber; diff --git a/contracts/src/security/pausing/PauseManager.sol b/contracts/src/security/pausing/PauseManager.sol index 55558247..9e9d7d64 100644 --- a/contracts/src/security/pausing/PauseManager.sol +++ b/contracts/src/security/pausing/PauseManager.sol @@ -28,7 +28,7 @@ abstract contract PauseManager is IPauseManager, AccessControlUpgradeable { uint256 public constant COOLDOWN_DURATION = 24 hours; // @dev DEPRECATED. USE _pauseTypeStatusesBitMap INSTEAD - mapping(bytes32 pauseType => bool pauseStatus) private pauseTypeStatuses; + mapping(bytes32 pauseType => bool pauseStatus) private pauseTypeStatuses_DEPRECATED; /// @dev The bitmap containing the pause statuses mapped by type. uint256 private _pauseTypeStatusesBitMap; diff --git a/contracts/test/hardhat/rollup/LineaRollup/BlobSubmission.ts b/contracts/test/hardhat/rollup/LineaRollup/BlobSubmission.ts index fa91fb14..42f743ef 100644 --- a/contracts/test/hardhat/rollup/LineaRollup/BlobSubmission.ts +++ b/contracts/test/hardhat/rollup/LineaRollup/BlobSubmission.ts @@ -47,7 +47,7 @@ describe("Linea Rollup contract: EIP-4844 Blob submission tests", () => { let operator: SignerWithAddress; let nonAuthorizedAccount: SignerWithAddress; - const { prevShnarf, parentDataHash, parentStateRootHash } = firstCompressedDataContent; + const { prevShnarf } = firstCompressedDataContent; before(async () => { ({ securityCouncil, operator, nonAuthorizedAccount } = await loadFixture(getAccountsFixture)); @@ -57,8 +57,6 @@ describe("Linea Rollup contract: EIP-4844 Blob submission tests", () => { ({ lineaRollup } = await loadFixture(deployLineaRollupFixture)); await lineaRollup.setLastFinalizedBlock(0); await lineaRollup.setupParentShnarf(prevShnarf); - await lineaRollup.setupParentDataShnarf(parentDataHash, prevShnarf); - await lineaRollup.setupParentFinalizedStateRoot(parentDataHash, parentStateRootHash); }); it("Should successfully submit blobs", async () => {