From d68a03adeecd3778809cfff3cc014d4d0291b9eb Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Mon, 24 Jun 2024 15:52:35 -0400 Subject: [PATCH] fixed compile --- .../state-transition/data-availability/CalldataDA.sol | 8 ++++---- .../data-availability/RelayedSLDAValidator.sol | 9 +++++---- .../data-availability/RollupL1DAValidator.sol | 5 ----- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol b/l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol index b5bf270b3..4478e9d79 100644 --- a/l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol +++ b/l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol @@ -4,10 +4,10 @@ pragma solidity 0.8.24; // solhint-disable gas-custom-errors, reason-string -// TODO: maybe move it here -import {BLOB_SIZE_BYTES} from "../chain-interfaces/IExecutor.sol"; - -uint256 constant BLOBS_SUPPORTED = 6; +/// @dev Total number of bytes in a blob. Blob = 4096 field elements * 31 bytes per field element +/// @dev EIP-4844 defines it as 131_072 but we use 4096 * 31 within our circuits to always fit within a field element +/// @dev Our circuits will prove that a EIP-4844 blob and our internal blob are the same. +uint256 constant BLOB_SIZE_BYTES = 126_976; /// @notice Contract that contains the functionality for process the calldata DA. /// @dev The expected l2DAValidator that should be used with it `RollupL2DAValidator`. diff --git a/l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol b/l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol index 145b9a69b..22b346d81 100644 --- a/l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol +++ b/l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol @@ -4,14 +4,11 @@ pragma solidity 0.8.24; // solhint-disable gas-custom-errors, reason-string -import {IL1DAValidator, L1DAValidatorOutput} from "../chain-interfaces/IL1DAValidator.sol"; +import {IL1DAValidator, L1DAValidatorOutput, PubdataSource} from "../chain-interfaces/IL1DAValidator.sol"; import {IL1Messenger} from "../../common/interfaces/IL1Messenger.sol"; import {CalldataDA} from "./CalldataDA.sol"; -// TODO: maybe move it here -import {PubdataSource} from "../chain-interfaces/IExecutor.sol"; - import {L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR} from "../../common/L2ContractAddresses.sol"; uint256 constant BLOBS_SUPPORTED = 6; @@ -80,4 +77,8 @@ contract RelayedSLDAValidator is IL1DAValidator, CalldataDA { ); } } + + function supportsInterface(bytes4 interfaceId) override external view returns (bool) { + return interfaceId == type(IL1DAValidator).interfaceId; + } } diff --git a/l1-contracts/contracts/state-transition/data-availability/RollupL1DAValidator.sol b/l1-contracts/contracts/state-transition/data-availability/RollupL1DAValidator.sol index eec02f596..95a5d936e 100644 --- a/l1-contracts/contracts/state-transition/data-availability/RollupL1DAValidator.sol +++ b/l1-contracts/contracts/state-transition/data-availability/RollupL1DAValidator.sol @@ -22,11 +22,6 @@ uint256 constant BLOB_DA_INPUT_SIZE = PUBDATA_COMMITMENT_SIZE + 32; /// point evaluation precompile uint256 constant BLS_MODULUS = 52435875175126190479447740508185965837690552500527637822603658699938581184513; -/// @dev Total number of bytes in a blob. Blob = 4096 field elements * 31 bytes per field element -/// @dev EIP-4844 defines it as 131_072 but we use 4096 * 31 within our circuits to always fit within a field element -/// @dev Our circuits will prove that a EIP-4844 blob and our internal blob are the same. -uint256 constant BLOB_SIZE_BYTES = 126_976; - /// @dev Offset in pubdata commitment of blobs for claimed value uint256 constant PUBDATA_COMMITMENT_CLAIMED_VALUE_OFFSET = 16;