Skip to content

Commit b921c24

Browse files
committed
add indexes to IFlashtestationRegistry and IBlockBuilderPolicy events
This addresses N-05 of the Q3 2025 OZ audit: Throughout the codebase, several events do not have indexed parameters: The WorkloadAddedToPolicy event of BlockBuilderPolicy.sol. The WorkloadRemovedFromPolicy event of BlockBuilderPolicy.sol. The RegistrySet event of BlockBuilderPolicy.sol. The BlockBuilderProofVerified event of BlockBuilderPolicy.sol. The TEEServiceRegistered event of IFlashtestationRegistry.sol. The TEEServiceInvalidated event of IFlashtestationRegistry.sol. To improve the ability of off-chain services to search and filter for specific events, consider indexing event parameters. Note: we didn't add it to the BlockBuilderProofVerified event, in order to keep that event as efficient as possible
1 parent ff1ef38 commit b921c24

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/interfaces/IBlockBuilderPolicy.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ interface IBlockBuilderPolicy {
3131

3232
/// @notice Emitted when a workload is added to the policy
3333
/// @param workloadId The workload identifier
34-
event WorkloadAddedToPolicy(bytes32 workloadId);
34+
event WorkloadAddedToPolicy(bytes32 indexed workloadId);
3535
/// @notice Emitted when a workload is removed from the policy
3636
/// @param workloadId The workload identifier
37-
event WorkloadRemovedFromPolicy(bytes32 workloadId);
37+
event WorkloadRemovedFromPolicy(bytes32 indexed workloadId);
3838
/// @notice Emitted when the registry is set in the initializer
3939
/// @param registry The address of the registry
40-
event RegistrySet(address registry);
40+
event RegistrySet(address indexed registry);
4141
/// @notice Emitted when a block builder proof is successfully verified
4242
/// @param caller The address that called the verification function (TEE address)
4343
/// @param workloadId The workload identifier of the TEE

src/interfaces/IFlashtestationRegistry.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ interface IFlashtestationRegistry {
2525
/// @param teeAddress The address of the TEE service
2626
/// @param rawQuote The raw quote from the TEE device
2727
/// @param alreadyExists Whether the TEE service is already registered
28-
event TEEServiceRegistered(address teeAddress, bytes rawQuote, bool alreadyExists);
28+
event TEEServiceRegistered(address indexed teeAddress, bytes rawQuote, bool alreadyExists);
2929
/// @notice Emitted when a TEE service is invalidated
3030
/// @param teeAddress The address of the TEE service
31-
event TEEServiceInvalidated(address teeAddress);
31+
event TEEServiceInvalidated(address indexed teeAddress);
3232
/// @notice Emitted when a previous signature is invalidated
3333
/// @param teeAddress The address of the TEE service
3434
/// @param invalidatedNonce The nonce of the invalidated signature
35-
event PreviousSignatureInvalidated(address teeAddress, uint256 invalidatedNonce);
35+
event PreviousSignatureInvalidated(address indexed teeAddress, uint256 invalidatedNonce);
3636

3737
// ============ Errors ============
3838

0 commit comments

Comments
 (0)