Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/BlockBuilderPolicy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,4 @@ contract BlockBuilderPolicy is
function domainSeparator() external view returns (bytes32) {
return _domainSeparatorV4();
}

/// @inheritdoc IBlockBuilderPolicy
function getApprovedWorkloads(bytes32 workloadId)
external
view
override
returns (string memory commitHash, string[] memory sourceLocators)
{
return (approvedWorkloads[workloadId].commitHash, approvedWorkloads[workloadId].sourceLocators);
}
}
14 changes: 3 additions & 11 deletions src/interfaces/IBlockBuilderPolicy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ interface IBlockBuilderPolicy {
/// @param workloadId The workload identifier
function removeWorkloadFromPolicy(WorkloadId workloadId) external;

/// @notice Get the metadata for a workload
/// @notice Mapping from workloadId to its metadata (commit hash and source locators)
/// @dev This is only updateable by governance (i.e. the owner) of the Policy contract
/// Adding and removing a workload is O(1)
/// @param workloadId The workload identifier to query
/// @return The metadata associated with the workload
function getWorkloadMetadata(WorkloadId workloadId) external view returns (WorkloadMetadata memory);
Expand Down Expand Up @@ -176,16 +178,6 @@ interface IBlockBuilderPolicy {

// ============ Auto-generated getters for public state ============

/// @notice Mapping from workloadId to its metadata (commit hash and source locators)
/// @dev This is only updateable by governance (i.e. the owner) of the Policy contract
/// Adding and removing a workload is O(1).
/// This means the critical `_cachedIsAllowedPolicy` function is O(1) since we can directly check if a workloadId exists
/// in the mapping
function getApprovedWorkloads(bytes32 workloadId)
external
view
returns (string memory commitHash, string[] memory sourceLocators);

/// @notice Address of the FlashtestationRegistry contract that verifies TEE quotes
function registry() external view returns (address);

Expand Down