From 9ce1c5d74d18962c71584561f80966d5da0c1809 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:18:42 -0800 Subject: [PATCH] docs: update validator reg inline docs (#486) --- contracts/contracts/validator-registry/README.md | 15 ++++++++++----- .../middleware/DeployMiddleware.s.sol | 5 +++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/contracts/contracts/validator-registry/README.md b/contracts/contracts/validator-registry/README.md index 7554df679..c94132430 100644 --- a/contracts/contracts/validator-registry/README.md +++ b/contracts/contracts/validator-registry/README.md @@ -1,15 +1,20 @@ # Validator Registry Design doc -Validators are able to _opt-in to mev-commit_ in one of two ways: +Validators are able to _opt-in to mev-commit_ in one of three ways: 1. Restaking with the `MevCommitAVS` contract. -2. Simple staking with the `VanillaRegistry` contract. +2. Restaking with the `MevCommitMiddleware` contract. +3. Simple staking with the `VanillaRegistry` contract. -The `ValidatorOptInRouter` contract acts as a query router between both solutions, allowing any actor to query whether a group of validator pubkeys is opted-in to mev-commit. +The `ValidatorOptInRouter` contract acts as a query router between all three solutions, allowing any actor to query whether a group of validator pubkeys is opted-in to mev-commit. -## Mev-commit AVS - Restaking Solution +## Mev-commit AVS - Eigenlayer Restaking Solution -For more details on the Mev-commit AVS, please refer to the [Mev-commit AVS README](avs/README.md). +For more details on the `MevCommitAVS` contract, please refer to the [MevCommitAVS README](avs/README.md). + +## Mev-commit Middleware - Symbiotic Restaking Solution + +For more details on the `MevCommitMiddleware` contract, please refer to the [MevCommitMiddleware README](middleware/README.md). ## Vanilla Registry - Simple Staking Solution diff --git a/contracts/scripts/validator-registry/middleware/DeployMiddleware.s.sol b/contracts/scripts/validator-registry/middleware/DeployMiddleware.s.sol index 0d396586a..8abd56dac 100644 --- a/contracts/scripts/validator-registry/middleware/DeployMiddleware.s.sol +++ b/contracts/scripts/validator-registry/middleware/DeployMiddleware.s.sol @@ -83,9 +83,10 @@ contract DeployHolesky is BaseDeploy { ); INetworkMiddlewareService networkMiddlewareService = INetworkMiddlewareService(address(SymbioticHoleskyDevnetConsts.NETWORK_MIDDLEWARE_SERVICE)); - if (networkMiddlewareService.middleware(msg.sender) == address(0)) { - networkMiddlewareService.setMiddleware(mevCommitMiddlewareProxy); + if (networkMiddlewareService.middleware(msg.sender) != address(0)) { + console.log("WARNING: overwriting existing middleware registration for network:", msg.sender); } + networkMiddlewareService.setMiddleware(mevCommitMiddlewareProxy); IBaseDelegator vault1Delegator = IBaseDelegator(address(SymbioticHoleskyDevnetConsts.VAULT_1_DELEGATOR)); vault1Delegator.setMaxNetworkLimit(SUBNETWORK_ID, VAULT1_MAX_NETWORK_LIMIT);