Conversation
shaspitz
left a comment
There was a problem hiding this comment.
High level design lgtm 👍
| } | ||
|
|
||
| /// @notice Returns an array of bool lists indicating whether each validator pubkey is opted in to mev-commit. | ||
| function areValidatorsOptedIn(bytes[] calldata valBLSPubKeys) external view returns (bool[][] memory) { |
There was a problem hiding this comment.
How does the caller know which registry corresponds to which bool for each pubkey?
There was a problem hiding this comment.
Considered adding a string label for read only purposes, but the caller can also just read the registries array to know the registry address at each index
There was a problem hiding this comment.
String label would be nice for UX purposes, but optional until there's a concrete need for it
| @@ -8,89 +8,67 @@ pragma solidity 0.8.26; | |||
| import {Script} from "forge-std/Script.sol"; | |||
There was a problem hiding this comment.
Imo we should create an entirely new deployment script since we are introducing a new contract here. Separately we can create another file for updating the old registry to ref the new one for backwards compatibility
Describe your changes
New ValidatorOptInHub contract which allows future registry support/removal/updates.
-Backwards compatibility with OptInRouter, where the OptInRouter's vanilla address will be set to the Hub. Hub will then check every registry and return true if validator is registered in any of them. Existing AVS and Middleware addresses will be replaced to return false in the OptInRouter since they will be covered by the Hub check.
-IsValidatorOptedIn() now returns an array of booleans instead of the previous OptInStatus struct.
-areValidatorsOptedIn() now returns an array of boolean arrays instead of an array of OptInStatus structs.
-The new contract also contains additional
isValidatorOptedIn**Any**, which just returns a single bool to signal whether a key is opted-in in any of the registries. The same pattern used in anareValidatorsOptedIn**Any**function which returns a list of bools to signal whether each key is opted-in in any of the registriesIssue ticket number and link
Fixes # (issue)
Checklist before requesting a review