diff --git a/script/releases/v1.0.2-slashing-consolidated/1-deployContracts.s.sol b/script/releases/v1.0.2-slashing-consolidated/1-deployContracts.s.sol new file mode 100644 index 000000000..6c5828600 --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/1-deployContracts.s.sol @@ -0,0 +1,528 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.12; + +import {EOADeployer} from "zeus-templates/templates/EOADeployer.sol"; +import "../Env.sol"; + +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; + +/** + * Purpose: use an EOA to deploy all of the new contracts for this upgrade. + */ +contract Deploy is EOADeployer { + using Env for *; + + function _runAsEOA() internal override { + vm.startBroadcast(); + + /// permissions/ + + address[] memory pausers = new address[](3); + pausers[0] = Env.pauserMultisig(); + pausers[1] = Env.opsMultisig(); + pausers[2] = Env.executorMultisig(); + + deployImpl({ + name: type(PauserRegistry).name, + deployedTo: address(new PauserRegistry({ + _pausers: pausers, + _unpauser: Env.executorMultisig() + })) + }); + + deployImpl({ + name: type(PermissionController).name, + deployedTo: address(new PermissionController()) + }); + + deployProxy({ + name: type(PermissionController).name, + deployedTo: address(new TransparentUpgradeableProxy({ + _logic: address(Env.impl.permissionController()), + admin_: Env.proxyAdmin(), + _data: "" + })) + }); + + /// core/ + + deployImpl({ + name: type(AllocationManager).name, + deployedTo: address(new AllocationManager({ + _delegation: Env.proxy.delegationManager(), + _pauserRegistry: Env.impl.pauserRegistry(), + _permissionController: Env.proxy.permissionController(), + _DEALLOCATION_DELAY: Env.MIN_WITHDRAWAL_DELAY(), + _ALLOCATION_CONFIGURATION_DELAY: Env.ALLOCATION_CONFIGURATION_DELAY() + })) + }); + + deployProxy({ + name: type(AllocationManager).name, + deployedTo: address(new TransparentUpgradeableProxy({ + _logic: address(Env.impl.allocationManager()), + admin_: Env.proxyAdmin(), + _data: abi.encodeCall( + AllocationManager.initialize, + ( + Env.executorMultisig(), // initialOwner + 0 // initialPausedStatus + ) + ) + })) + }); + + deployImpl({ + name: type(AVSDirectory).name, + deployedTo: address(new AVSDirectory({ + _delegation: Env.proxy.delegationManager(), + _pauserRegistry: Env.impl.pauserRegistry() + })) + }); + + deployImpl({ + name: type(DelegationManager).name, + deployedTo: address(new DelegationManager({ + _strategyManager: Env.proxy.strategyManager(), + _eigenPodManager: Env.proxy.eigenPodManager(), + _allocationManager: Env.proxy.allocationManager(), + _pauserRegistry: Env.impl.pauserRegistry(), + _permissionController: Env.proxy.permissionController(), + _MIN_WITHDRAWAL_DELAY: Env.MIN_WITHDRAWAL_DELAY() + })) + }); + + deployImpl({ + name: type(RewardsCoordinator).name, + deployedTo: address(new RewardsCoordinator({ + _delegationManager: Env.proxy.delegationManager(), + _strategyManager: Env.proxy.strategyManager(), + _allocationManager: Env.proxy.allocationManager(), + _pauserRegistry: Env.impl.pauserRegistry(), + _permissionController: Env.proxy.permissionController(), + _CALCULATION_INTERVAL_SECONDS: Env.CALCULATION_INTERVAL_SECONDS(), + _MAX_REWARDS_DURATION: Env.MAX_REWARDS_DURATION(), + _MAX_RETROACTIVE_LENGTH: Env.MAX_RETROACTIVE_LENGTH(), + _MAX_FUTURE_LENGTH: Env.MAX_FUTURE_LENGTH(), + _GENESIS_REWARDS_TIMESTAMP: Env.GENESIS_REWARDS_TIMESTAMP() + })) + }); + + deployImpl({ + name: type(StrategyManager).name, + deployedTo: address(new StrategyManager({ + _delegation: Env.proxy.delegationManager(), + _pauserRegistry: Env.impl.pauserRegistry() + })) + }); + + /// pods/ + + deployImpl({ + name: type(EigenPodManager).name, + deployedTo: address(new EigenPodManager({ + _ethPOS: Env.ethPOS(), + _eigenPodBeacon: Env.beacon.eigenPod(), + _delegationManager: Env.proxy.delegationManager(), + _pauserRegistry: Env.impl.pauserRegistry() + })) + }); + + deployImpl({ + name: type(EigenPod).name, + deployedTo: address(new EigenPod({ + _ethPOS: Env.ethPOS(), + _eigenPodManager: Env.proxy.eigenPodManager(), + _GENESIS_TIME: Env.EIGENPOD_GENESIS_TIME() + })) + }); + + /// strategies/ + + deployImpl({ + name: type(StrategyBaseTVLLimits).name, + deployedTo: address(new StrategyBaseTVLLimits({ + _strategyManager: Env.proxy.strategyManager(), + _pauserRegistry: Env.impl.pauserRegistry() + })) + }); + + deployImpl({ + name: type(EigenStrategy).name, + deployedTo: address(new EigenStrategy({ + _strategyManager: Env.proxy.strategyManager(), + _pauserRegistry: Env.impl.pauserRegistry() + })) + }); + + deployImpl({ + name: type(StrategyFactory).name, + deployedTo: address(new StrategyFactory({ + _strategyManager: Env.proxy.strategyManager(), + _pauserRegistry: Env.impl.pauserRegistry() + })) + }); + + // for strategies deployed via factory + deployImpl({ + name: type(StrategyBase).name, + deployedTo: address(new StrategyBase({ + _strategyManager: Env.proxy.strategyManager(), + _pauserRegistry: Env.impl.pauserRegistry() + })) + }); + + vm.stopBroadcast(); + } + + function testScript() public virtual { + _runAsEOA(); + + _validateNewImplAddresses({ areMatching: false }); + _validateProxyAdmins(); + _validateImplConstructors(); + _validateImplsInitialized(); + _validateStrategiesAreWhitelisted(); + } + + /// @dev Validate that the `Env.impl` addresses are updated to be distinct from what the proxy + /// admin reports as the current implementation address. + /// + /// Note: The upgrade script can call this with `areMatching == true` to check that these impl + /// addresses _are_ matches. + function _validateNewImplAddresses(bool areMatching) internal view { + /// core/ -- can't check AllocationManager as it didn't exist before this deploy + + function (address, address, string memory) internal pure assertion = + areMatching ? _assertMatch : _assertNotMatch; + + assertion( + _getProxyImpl(address(Env.proxy.avsDirectory())), + address(Env.impl.avsDirectory()), + "avsDirectory impl failed" + ); + + assertion( + _getProxyImpl(address(Env.proxy.delegationManager())), + address(Env.impl.delegationManager()), + "delegationManager impl failed" + ); + + assertion( + _getProxyImpl(address(Env.proxy.rewardsCoordinator())), + address(Env.impl.rewardsCoordinator()), + "rewardsCoordinator impl failed" + ); + + assertion( + _getProxyImpl(address(Env.proxy.strategyManager())), + address(Env.impl.strategyManager()), + "strategyManager impl failed" + ); + + /// permissions/ -- can't check these because PauserRegistry has no proxy, and + /// PermissionController proxy didn't exist before this deploy + + /// pods/ + + assertion( + Env.beacon.eigenPod().implementation(), + address(Env.impl.eigenPod()), + "eigenPod impl failed" + ); + + assertion( + _getProxyImpl(address(Env.proxy.eigenPodManager())), + address(Env.impl.eigenPodManager()), + "eigenPodManager impl failed" + ); + + /// strategies/ + + assertion( + _getProxyImpl(address(Env.proxy.eigenStrategy())), + address(Env.impl.eigenStrategy()), + "eigenStrategy impl failed" + ); + + assertion( + Env.beacon.strategyBase().implementation(), + address(Env.impl.strategyBase()), + "strategyBase impl failed" + ); + + uint count = Env.instance.strategyBaseTVLLimits_Count(); + for (uint i = 0; i < count; i++) { + assertion( + _getProxyImpl(address(Env.instance.strategyBaseTVLLimits(i))), + address(Env.impl.strategyBaseTVLLimits()), + "strategyBaseTVLLimits impl failed" + ); + } + + assertion( + _getProxyImpl(address(Env.proxy.strategyFactory())), + address(Env.impl.strategyFactory()), + "strategyFactory impl failed" + ); + } + + /// @dev Ensure each deployed TUP/beacon is owned by the proxyAdmin/executorMultisig + function _validateProxyAdmins() internal view { + address pa = Env.proxyAdmin(); + + assertTrue( + _getProxyAdmin(address(Env.proxy.allocationManager())) == pa, + "allocationManager proxyAdmin incorrect" + ); + + assertTrue( + _getProxyAdmin(address(Env.proxy.avsDirectory())) == pa, + "avsDirectory proxyAdmin incorrect" + ); + + assertTrue( + _getProxyAdmin(address(Env.proxy.delegationManager())) == pa, + "delegationManager proxyAdmin incorrect" + ); + + assertTrue( + _getProxyAdmin(address(Env.proxy.rewardsCoordinator())) == pa, + "rewardsCoordinator proxyAdmin incorrect" + ); + + assertTrue( + _getProxyAdmin(address(Env.proxy.strategyManager())) == pa, + "strategyManager proxyAdmin incorrect" + ); + + /// permissions/ -- can't check these because PauserRegistry has no proxy, and + /// PermissionController proxy didn't exist before this deploy + + /// pods/ + + assertTrue( + Env.beacon.eigenPod().owner() == Env.executorMultisig(), + "eigenPod beacon owner incorrect" + ); + + assertTrue( + _getProxyAdmin(address(Env.proxy.eigenPodManager())) == pa, + "eigenPodManager proxyAdmin incorrect" + ); + + /// strategies/ + + assertTrue( + _getProxyAdmin(address(Env.proxy.eigenStrategy())) == pa, + "eigenStrategy proxyAdmin incorrect" + ); + + assertTrue( + Env.beacon.strategyBase().owner() == Env.executorMultisig(), + "strategyBase beacon owner incorrect" + ); + + uint count = Env.instance.strategyBaseTVLLimits_Count(); + for (uint i = 0; i < count; i++) { + assertTrue( + _getProxyAdmin(address(Env.instance.strategyBaseTVLLimits(i))) == pa, + "strategyBaseTVLLimits proxyAdmin incorrect" + ); + } + + assertTrue( + _getProxyAdmin(address(Env.proxy.strategyFactory())) == pa, + "strategyFactory proxyAdmin incorrect" + ); + } + + /// @dev Validate the immutables set in the new implementation constructors + function _validateImplConstructors() internal view { + { + /// permissions/ + + PauserRegistry registry = Env.impl.pauserRegistry(); + assertTrue(registry.isPauser(Env.pauserMultisig()), "pauser multisig should be pauser"); + assertTrue(registry.isPauser(Env.opsMultisig()), "ops multisig should be pauser"); + assertTrue(registry.isPauser(Env.executorMultisig()), "executor multisig should be pauser"); + assertTrue(registry.unpauser() == Env.executorMultisig(), "executor multisig should be unpauser"); + + /// PermissionController has no initial storage + } + + { + /// core/ + + AllocationManager allocationManager = Env.impl.allocationManager(); + assertTrue(allocationManager.delegation() == Env.proxy.delegationManager(), "alm.dm invalid"); + assertTrue(allocationManager.pauserRegistry() == Env.impl.pauserRegistry(), "alm.pR invalid"); + assertTrue(allocationManager.permissionController() == Env.proxy.permissionController(), "alm.pc invalid"); + assertTrue(allocationManager.DEALLOCATION_DELAY() == Env.MIN_WITHDRAWAL_DELAY(), "alm.deallocDelay invalid"); + assertTrue(allocationManager.ALLOCATION_CONFIGURATION_DELAY() == Env.ALLOCATION_CONFIGURATION_DELAY(), "alm.configDelay invalid"); + + AVSDirectory avsDirectory = Env.impl.avsDirectory(); + assertTrue(avsDirectory.delegation() == Env.proxy.delegationManager(), "avsD.dm invalid"); + assertTrue(avsDirectory.pauserRegistry() == Env.impl.pauserRegistry(), "avsD.pR invalid"); + + DelegationManager delegation = Env.impl.delegationManager(); + assertTrue(delegation.strategyManager() == Env.proxy.strategyManager(), "dm.sm invalid"); + assertTrue(delegation.eigenPodManager() == Env.proxy.eigenPodManager(), "dm.epm invalid"); + assertTrue(delegation.allocationManager() == Env.proxy.allocationManager(), "dm.alm invalid"); + assertTrue(delegation.pauserRegistry() == Env.impl.pauserRegistry(), "dm.pR invalid"); + assertTrue(delegation.permissionController() == Env.proxy.permissionController(), "dm.pc invalid"); + assertTrue(delegation.minWithdrawalDelayBlocks() == Env.MIN_WITHDRAWAL_DELAY(), "dm.withdrawalDelay invalid"); + + RewardsCoordinator rewards = Env.impl.rewardsCoordinator(); + assertTrue(rewards.delegationManager() == Env.proxy.delegationManager(), "rc.dm invalid"); + assertTrue(rewards.strategyManager() == Env.proxy.strategyManager(), "rc.sm invalid"); + assertTrue(rewards.allocationManager() == Env.proxy.allocationManager(), "rc.alm invalid"); + assertTrue(rewards.pauserRegistry() == Env.impl.pauserRegistry(), "rc.pR invalid"); + assertTrue(rewards.permissionController() == Env.proxy.permissionController(), "rc.pc invalid"); + assertTrue(rewards.CALCULATION_INTERVAL_SECONDS() == Env.CALCULATION_INTERVAL_SECONDS(), "rc.calcInterval invalid"); + assertTrue(rewards.MAX_REWARDS_DURATION() == Env.MAX_REWARDS_DURATION(), "rc.rewardsDuration invalid"); + assertTrue(rewards.MAX_RETROACTIVE_LENGTH() == Env.MAX_RETROACTIVE_LENGTH(), "rc.retroLength invalid"); + assertTrue(rewards.MAX_FUTURE_LENGTH() == Env.MAX_FUTURE_LENGTH(), "rc.futureLength invalid"); + assertTrue(rewards.GENESIS_REWARDS_TIMESTAMP() == Env.GENESIS_REWARDS_TIMESTAMP(), "rc.genesis invalid"); + + StrategyManager strategyManager = Env.impl.strategyManager(); + assertTrue(strategyManager.delegation() == Env.proxy.delegationManager(), "sm.dm invalid"); + assertTrue(strategyManager.pauserRegistry() == Env.impl.pauserRegistry(), "sm.pR invalid"); + } + + { + /// pods/ + EigenPod eigenPod = Env.impl.eigenPod(); + assertTrue(eigenPod.ethPOS() == Env.ethPOS(), "ep.ethPOS invalid"); + assertTrue(eigenPod.eigenPodManager() == Env.proxy.eigenPodManager(), "ep.epm invalid"); + assertTrue(eigenPod.GENESIS_TIME() == Env.EIGENPOD_GENESIS_TIME(), "ep.genesis invalid"); + + EigenPodManager eigenPodManager = Env.impl.eigenPodManager(); + assertTrue(eigenPodManager.ethPOS() == Env.ethPOS(), "epm.ethPOS invalid"); + assertTrue(eigenPodManager.eigenPodBeacon() == Env.beacon.eigenPod(), "epm.epBeacon invalid"); + assertTrue(eigenPodManager.delegationManager() == Env.proxy.delegationManager(), "epm.dm invalid"); + assertTrue(eigenPodManager.pauserRegistry() == Env.impl.pauserRegistry(), "epm.pR invalid"); + } + + { + /// strategies/ + EigenStrategy eigenStrategy = Env.impl.eigenStrategy(); + assertTrue(eigenStrategy.strategyManager() == Env.proxy.strategyManager(), "eigStrat.sm invalid"); + assertTrue(eigenStrategy.pauserRegistry() == Env.impl.pauserRegistry(), "eigStrat.pR invalid"); + + StrategyBase strategyBase = Env.impl.strategyBase(); + assertTrue(strategyBase.strategyManager() == Env.proxy.strategyManager(), "stratBase.sm invalid"); + assertTrue(strategyBase.pauserRegistry() == Env.impl.pauserRegistry(), "stratBase.pR invalid"); + + StrategyBaseTVLLimits strategyBaseTVLLimits = Env.impl.strategyBaseTVLLimits(); + assertTrue(strategyBaseTVLLimits.strategyManager() == Env.proxy.strategyManager(), "stratBaseTVL.sm invalid"); + assertTrue(strategyBaseTVLLimits.pauserRegistry() == Env.impl.pauserRegistry(), "stratBaseTVL.pR invalid"); + + StrategyFactory strategyFactory = Env.impl.strategyFactory(); + assertTrue(strategyFactory.strategyManager() == Env.proxy.strategyManager(), "sFact.sm invalid"); + assertTrue(strategyFactory.pauserRegistry() == Env.impl.pauserRegistry(), "sFact.pR invalid"); + } + } + + /// @dev Call initialize on all deployed implementations to ensure initializers are disabled + function _validateImplsInitialized() internal { + bytes memory errInit = "Initializable: contract is already initialized"; + + /// permissions/ + // PermissionController is initializable, but does not expose the `initialize` method + + { + /// core/ + + AllocationManager allocationManager = Env.impl.allocationManager(); + vm.expectRevert(errInit); + allocationManager.initialize(address(0), 0); + + AVSDirectory avsDirectory = Env.impl.avsDirectory(); + vm.expectRevert(errInit); + avsDirectory.initialize(address(0), 0); + + DelegationManager delegation = Env.impl.delegationManager(); + vm.expectRevert(errInit); + delegation.initialize(address(0), 0); + + RewardsCoordinator rewards = Env.impl.rewardsCoordinator(); + vm.expectRevert(errInit); + rewards.initialize(address(0), 0, address(0), 0, 0); + + StrategyManager strategyManager = Env.impl.strategyManager(); + vm.expectRevert(errInit); + strategyManager.initialize(address(0), address(0), 0); + } + + { + /// pods/ + EigenPod eigenPod = Env.impl.eigenPod(); + vm.expectRevert(errInit); + eigenPod.initialize(address(0)); + + EigenPodManager eigenPodManager = Env.impl.eigenPodManager(); + vm.expectRevert(errInit); + eigenPodManager.initialize(address(0), 0); + } + + { + /// strategies/ + EigenStrategy eigenStrategy = Env.impl.eigenStrategy(); + vm.expectRevert(errInit); + eigenStrategy.initialize(IEigen(address(0)), IBackingEigen(address(0))); + + StrategyBase strategyBase = Env.impl.strategyBase(); + vm.expectRevert(errInit); + strategyBase.initialize(IERC20(address(0))); + + StrategyBaseTVLLimits strategyBaseTVLLimits = Env.impl.strategyBaseTVLLimits(); + vm.expectRevert(errInit); + strategyBaseTVLLimits.initialize(0, 0, IERC20(address(0))); + + StrategyFactory strategyFactory = Env.impl.strategyFactory(); + vm.expectRevert(errInit); + strategyFactory.initialize(address(0), 0, UpgradeableBeacon(address(0))); + } + } + + /// @dev Iterate over StrategyBaseTVLLimits instances and validate that each is + /// whitelisted for deposit + function _validateStrategiesAreWhitelisted() internal view { + uint count = Env.instance.strategyBaseTVLLimits_Count(); + for (uint i = 0; i < count; i++) { + StrategyBaseTVLLimits strategy = Env.instance.strategyBaseTVLLimits(i); + + // emit log_named_uint("strategy", i); + // IERC20Metadata underlying = IERC20Metadata(address(strategy.underlyingToken())); + // emit log_named_string("- name", underlying.name()); + // emit log_named_string("- symbol", underlying.symbol()); + // emit log_named_uint("- totalShares", strategy.totalShares()); + + bool isWhitelisted = Env.proxy.strategyManager().strategyIsWhitelistedForDeposit(strategy); + // emit log_named_string("- is whitelisted", isWhitelisted ? "true" : "false"); + assertTrue(isWhitelisted, "not whitelisted!!"); + } + } + + /// @dev Query and return `proxyAdmin.getProxyImplementation(proxy)` + function _getProxyImpl(address proxy) internal view returns (address) { + return ProxyAdmin(Env.proxyAdmin()).getProxyImplementation(ITransparentUpgradeableProxy(proxy)); + } + + /// @dev Query and return `proxyAdmin.getProxyAdmin(proxy)` + function _getProxyAdmin(address proxy) internal view returns (address) { + return ProxyAdmin(Env.proxyAdmin()).getProxyAdmin(ITransparentUpgradeableProxy(proxy)); + } + + function _assertMatch(address a, address b, string memory err) private pure { + assertEq(a, b, err); + } + + function _assertNotMatch(address a, address b, string memory err) private pure { + assertNotEq(a, b, err); + } +} diff --git a/script/releases/v1.0.2-slashing-consolidated/2-queueUpgradeAndUnpause.s.sol b/script/releases/v1.0.2-slashing-consolidated/2-queueUpgradeAndUnpause.s.sol new file mode 100644 index 000000000..6d8915d97 --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/2-queueUpgradeAndUnpause.s.sol @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.12; + +import {Deploy} from "./1-deployContracts.s.sol"; +import "../Env.sol"; + +import {MultisigBuilder} from "zeus-templates/templates/MultisigBuilder.sol"; +import "zeus-templates/utils/Encode.sol"; + +import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol"; + +/** + * Purpose: + * * enqueue a multisig transaction which; + * - upgrades all the relevant contracts, and + * - unpauses the system. + * This should be run via the protocol council multisig. + */ +contract QueueAndUnpause is MultisigBuilder, Deploy { + using Env for *; + using Encode for *; + + function _runAsMultisig() prank(Env.opsMultisig()) internal virtual override { + bytes memory calldata_to_executor = _getCalldataToExecutor(); + + TimelockController timelock = Env.timelockController(); + timelock.schedule({ + target: Env.executorMultisig(), + value: 0, + data: calldata_to_executor, + predecessor: 0, + salt: 0, + delay: timelock.getMinDelay() + }); + } + + /// @dev Get the calldata to be sent from the timelock to the executor + function _getCalldataToExecutor() internal returns (bytes memory) { + MultisigCall[] storage executorCalls = Encode.newMultisigCalls() + /// core/ + .append({ + to: Env.proxyAdmin(), + data: Encode.proxyAdmin.upgrade({ + proxy: address(Env.proxy.avsDirectory()), + impl: address(Env.impl.avsDirectory()) + }) + }) + .append({ + to: Env.proxyAdmin(), + data: Encode.proxyAdmin.upgrade({ + proxy: address(Env.proxy.delegationManager()), + impl: address(Env.impl.delegationManager()) + }) + }) + .append({ + to: Env.proxyAdmin(), + data: Encode.proxyAdmin.upgrade({ + proxy: address(Env.proxy.rewardsCoordinator()), + impl: address(Env.impl.rewardsCoordinator()) + }) + }) + .append({ + to: Env.proxyAdmin(), + data: Encode.proxyAdmin.upgrade({ + proxy: address(Env.proxy.strategyManager()), + impl: address(Env.impl.strategyManager()) + }) + }) + /// pods/ + .append({ + to: address(Env.beacon.eigenPod()), + data: Encode.upgradeableBeacon.upgradeTo({ + newImpl: address(Env.impl.eigenPod()) + }) + }) + .append({ + to: Env.proxyAdmin(), + data: Encode.proxyAdmin.upgrade({ + proxy: address(Env.proxy.eigenPodManager()), + impl: address(Env.impl.eigenPodManager()) + }) + }) + /// strategies/ + .append({ + to: Env.proxyAdmin(), + data: Encode.proxyAdmin.upgrade({ + proxy: address(Env.proxy.eigenStrategy()), + impl: address(Env.impl.eigenStrategy()) + }) + }) + .append({ + to: address(Env.beacon.strategyBase()), + data: Encode.upgradeableBeacon.upgradeTo({ + newImpl: address(Env.impl.strategyBase()) + }) + }) + .append({ + to: Env.proxyAdmin(), + data: Encode.proxyAdmin.upgrade({ + proxy: address(Env.proxy.strategyFactory()), + impl: address(Env.impl.strategyFactory()) + }) + }); + + /// Add call to upgrade each pre-longtail strategy instance + uint count = Env.instance.strategyBaseTVLLimits_Count(); + for (uint i = 0; i < count; i++) { + address proxyInstance = address(Env.instance.strategyBaseTVLLimits(i)); + + executorCalls.append({ + to: Env.proxyAdmin(), + data: Encode.proxyAdmin.upgrade({ + proxy: proxyInstance, + impl: address(Env.impl.strategyBaseTVLLimits()) + }) + }); + } + + // /// Finally, add a call unpausing the EigenPodManager + // /// We will end up pausing it in step 3, so the unpause will + // /// go through as part of execution (step 5) + executorCalls.append({ + to: address(Env.proxy.eigenPodManager()), + data: abi.encodeCall(Pausable.unpause, 0) + }); + + return Encode.gnosisSafe.execTransaction({ + from: address(Env.timelockController()), + to: Env.multiSendCallOnly(), + op: Encode.Operation.DelegateCall, + data: Encode.multiSend(executorCalls) + }); + } + + function testScript() public virtual override { + runAsEOA(); + + TimelockController timelock = Env.timelockController(); + bytes memory calldata_to_executor = _getCalldataToExecutor(); + bytes32 txHash = timelock.hashOperation({ + target: Env.executorMultisig(), + value: 0, + data: calldata_to_executor, + predecessor: 0, + salt: 0 + }); + + // Check that the upgrade does not exist in the timelock + assertFalse(timelock.isOperationPending(txHash), "Transaction should NOT be queued."); + + execute(); + + // Check that the upgrade has been added to the timelock + assertTrue(timelock.isOperationPending(txHash), "Transaction should be queued."); + } +} diff --git a/script/releases/v1.0.2-slashing-consolidated/3-pause.s.sol b/script/releases/v1.0.2-slashing-consolidated/3-pause.s.sol new file mode 100644 index 000000000..030949d05 --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/3-pause.s.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.12; + +import "../Env.sol"; + +import {MultisigBuilder} from "zeus-templates/templates/MultisigBuilder.sol"; + +/** + * Purpose: Enqueue a transaction which immediately sets `EigenPodManager.PAUSED_START_CHECKPOINT=true` + */ +contract Pause is MultisigBuilder, EigenPodPausingConstants { + using Env for *; + + function _runAsMultisig() prank(Env.pauserMultisig()) internal virtual override { + uint mask = 1 << PAUSED_START_CHECKPOINT; + + Env.proxy.eigenPodManager().pause(mask); + } + + function testScript() public virtual { + execute(); + + assertTrue(Env.proxy.eigenPodManager().paused(PAUSED_START_CHECKPOINT), "Not paused!"); + + // Create a new pod and try to start a checkpoint + EigenPod pod = EigenPod(payable(Env.proxy.eigenPodManager().createPod())); + + // At this point in the upgrade process, we're not using error types yet + vm.expectRevert("EigenPod.onlyWhenNotPaused: index is paused in EigenPodManager"); + pod.startCheckpoint(false); + } +} diff --git a/script/releases/v1.0.2-slashing-consolidated/4-podCleanup.sh b/script/releases/v1.0.2-slashing-consolidated/4-podCleanup.sh new file mode 100644 index 000000000..f467ceb02 --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/4-podCleanup.sh @@ -0,0 +1 @@ +# TODO(justin): run a binary which completes all checkpoints on the network. \ No newline at end of file diff --git a/script/releases/v1.0.2-slashing-consolidated/5-executeUpgradeAndUnpause.s.sol b/script/releases/v1.0.2-slashing-consolidated/5-executeUpgradeAndUnpause.s.sol new file mode 100644 index 000000000..f237c41a1 --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/5-executeUpgradeAndUnpause.s.sol @@ -0,0 +1,267 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.12; + +import "../Env.sol"; +import {QueueAndUnpause} from "./2-queueUpgradeAndUnpause.s.sol"; +import {Pause} from "./3-pause.s.sol"; + +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; + +contract Execute is QueueAndUnpause, Pause { + using Env for *; + + function _runAsMultisig() prank(Env.protocolCouncilMultisig()) internal override(Pause, QueueAndUnpause) { + bytes memory calldata_to_executor = _getCalldataToExecutor(); + + TimelockController timelock = Env.timelockController(); + timelock.execute({ + target: Env.executorMultisig(), + value: 0, + payload: calldata_to_executor, + predecessor: 0, + salt: 0 + }); + } + + function testScript() public virtual override(Pause, QueueAndUnpause) { + runAsEOA(); + + TimelockController timelock = Env.timelockController(); + bytes memory calldata_to_executor = _getCalldataToExecutor(); + bytes32 txHash = timelock.hashOperation({ + target: Env.executorMultisig(), + value: 0, + data: calldata_to_executor, + predecessor: 0, + salt: 0 + }); + + assertFalse(timelock.isOperationPending(txHash), "Transaction should NOT be queued."); + + // 1- run queueing logic + QueueAndUnpause._runAsMultisig(); + _unsafeResetHasPranked(); // reset hasPranked so we can use it again + + assertTrue(timelock.isOperationPending(txHash), "Transaction should be queued."); + assertFalse(timelock.isOperationReady(txHash), "Transaction should NOT be ready for execution."); + assertFalse(timelock.isOperationDone(txHash), "Transaction should NOT be complete."); + + // 2- run pausing logic + Pause._runAsMultisig(); + _unsafeResetHasPranked(); // reset hasPranked so we can use it again + + assertTrue(Env.proxy.eigenPodManager().paused(PAUSED_START_CHECKPOINT), "EPM is not paused!"); + + // 2- warp past delay + vm.warp(block.timestamp + timelock.getMinDelay()); // 1 tick after ETA + assertEq(timelock.isOperationReady(txHash), true, "Transaction should be executable."); + + // 3- execute + execute(); + + assertTrue(timelock.isOperationDone(txHash), "Transaction should be complete."); + + _validateNewImplAddresses({ areMatching: true }); + _validateStrategiesAreWhitelisted(); + _validateProxyAdmins(); + _validateProxyConstructors(); + _validateProxiesInitialized(); + } + + function _validateNewProxyImplsMatch() internal view { + ProxyAdmin pa = ProxyAdmin(Env.proxyAdmin()); + + assertTrue( + pa.getProxyImplementation(ITransparentUpgradeableProxy(address(Env.proxy.allocationManager()))) == + address(Env.impl.allocationManager()), + "allocationManager impl failed" + ); + + assertTrue( + pa.getProxyImplementation(ITransparentUpgradeableProxy(address(Env.proxy.permissionController()))) == + address(Env.impl.permissionController()), + "permissionController impl failed" + ); + } + + /// @dev Mirrors the checks done in 1-deployContracts, but now we check each contract's + /// proxy, as the upgrade should mean that each proxy can see these methods/immutables + function _validateProxyConstructors() internal view { + { + /// permissions/ + + // exception: PauserRegistry doesn't have a proxy! + PauserRegistry registry = Env.impl.pauserRegistry(); + assertTrue(registry.isPauser(Env.pauserMultisig()), "pauser multisig should be pauser"); + assertTrue(registry.isPauser(Env.opsMultisig()), "ops multisig should be pauser"); + assertTrue(registry.isPauser(Env.executorMultisig()), "executor multisig should be pauser"); + assertTrue(registry.unpauser() == Env.executorMultisig(), "executor multisig should be unpauser"); + + /// PermissionController has no initial storage + } + + { + /// core/ + + AllocationManager allocationManager = Env.proxy.allocationManager(); + assertTrue(allocationManager.delegation() == Env.proxy.delegationManager(), "alm.dm invalid"); + assertTrue(allocationManager.pauserRegistry() == Env.impl.pauserRegistry(), "alm.pR invalid"); + assertTrue(allocationManager.permissionController() == Env.proxy.permissionController(), "alm.pc invalid"); + assertTrue(allocationManager.DEALLOCATION_DELAY() == Env.MIN_WITHDRAWAL_DELAY(), "alm.deallocDelay invalid"); + assertTrue(allocationManager.ALLOCATION_CONFIGURATION_DELAY() == Env.ALLOCATION_CONFIGURATION_DELAY(), "alm.configDelay invalid"); + + AVSDirectory avsDirectory = Env.proxy.avsDirectory(); + assertTrue(avsDirectory.delegation() == Env.proxy.delegationManager(), "avsD.dm invalid"); + assertTrue(avsDirectory.pauserRegistry() == Env.impl.pauserRegistry(), "avsD.pR invalid"); + + DelegationManager delegation = Env.proxy.delegationManager(); + assertTrue(delegation.strategyManager() == Env.proxy.strategyManager(), "dm.sm invalid"); + assertTrue(delegation.eigenPodManager() == Env.proxy.eigenPodManager(), "dm.epm invalid"); + assertTrue(delegation.allocationManager() == Env.proxy.allocationManager(), "dm.alm invalid"); + assertTrue(delegation.pauserRegistry() == Env.impl.pauserRegistry(), "dm.pR invalid"); + assertTrue(delegation.permissionController() == Env.proxy.permissionController(), "dm.pc invalid"); + assertTrue(delegation.minWithdrawalDelayBlocks() == Env.MIN_WITHDRAWAL_DELAY(), "dm.withdrawalDelay invalid"); + + RewardsCoordinator rewards = Env.proxy.rewardsCoordinator(); + assertTrue(rewards.delegationManager() == Env.proxy.delegationManager(), "rc.dm invalid"); + assertTrue(rewards.strategyManager() == Env.proxy.strategyManager(), "rc.sm invalid"); + assertTrue(rewards.allocationManager() == Env.proxy.allocationManager(), "rc.alm invalid"); + assertTrue(rewards.pauserRegistry() == Env.impl.pauserRegistry(), "rc.pR invalid"); + assertTrue(rewards.permissionController() == Env.proxy.permissionController(), "rc.pc invalid"); + assertTrue(rewards.CALCULATION_INTERVAL_SECONDS() == Env.CALCULATION_INTERVAL_SECONDS(), "rc.calcInterval invalid"); + assertTrue(rewards.MAX_REWARDS_DURATION() == Env.MAX_REWARDS_DURATION(), "rc.rewardsDuration invalid"); + assertTrue(rewards.MAX_RETROACTIVE_LENGTH() == Env.MAX_RETROACTIVE_LENGTH(), "rc.retroLength invalid"); + assertTrue(rewards.MAX_FUTURE_LENGTH() == Env.MAX_FUTURE_LENGTH(), "rc.futureLength invalid"); + assertTrue(rewards.GENESIS_REWARDS_TIMESTAMP() == Env.GENESIS_REWARDS_TIMESTAMP(), "rc.genesis invalid"); + + StrategyManager strategyManager = Env.proxy.strategyManager(); + assertTrue(strategyManager.delegation() == Env.proxy.delegationManager(), "sm.dm invalid"); + assertTrue(strategyManager.pauserRegistry() == Env.impl.pauserRegistry(), "sm.pR invalid"); + } + + { + /// pods/ + UpgradeableBeacon eigenPodBeacon = Env.beacon.eigenPod(); + assertTrue(eigenPodBeacon.implementation() == address(Env.impl.eigenPod()), "eigenPodBeacon.impl invalid"); + + EigenPodManager eigenPodManager = Env.proxy.eigenPodManager(); + assertTrue(eigenPodManager.ethPOS() == Env.ethPOS(), "epm.ethPOS invalid"); + assertTrue(eigenPodManager.eigenPodBeacon() == Env.beacon.eigenPod(), "epm.epBeacon invalid"); + assertTrue(eigenPodManager.delegationManager() == Env.proxy.delegationManager(), "epm.dm invalid"); + assertTrue(eigenPodManager.pauserRegistry() == Env.impl.pauserRegistry(), "epm.pR invalid"); + } + + { + /// strategies/ + EigenStrategy eigenStrategy = Env.proxy.eigenStrategy(); + assertTrue(eigenStrategy.strategyManager() == Env.proxy.strategyManager(), "eigStrat.sm invalid"); + assertTrue(eigenStrategy.pauserRegistry() == Env.impl.pauserRegistry(), "eigStrat.pR invalid"); + + UpgradeableBeacon strategyBeacon = Env.beacon.strategyBase(); + assertTrue(strategyBeacon.implementation() == address(Env.impl.strategyBase()), "strategyBeacon.impl invalid"); + + uint count = Env.instance.strategyBaseTVLLimits_Count(); + for (uint i = 0; i < count; i++) { + StrategyBaseTVLLimits strategy = Env.instance.strategyBaseTVLLimits(i); + + assertTrue(strategy.strategyManager() == Env.proxy.strategyManager(), "sFact.sm invalid"); + assertTrue(strategy.pauserRegistry() == Env.impl.pauserRegistry(), "sFact.pR invalid"); + } + + StrategyFactory strategyFactory = Env.proxy.strategyFactory(); + assertTrue(strategyFactory.strategyManager() == Env.proxy.strategyManager(), "sFact.sm invalid"); + assertTrue(strategyFactory.pauserRegistry() == Env.impl.pauserRegistry(), "sFact.pR invalid"); + } + } + + /// @dev Call initialize on all proxies to ensure they are initialized + /// Additionally, validate initialization variables + function _validateProxiesInitialized() internal { + bytes memory errInit = "Initializable: contract is already initialized"; + + /// permissions/ + // PermissionController is initializable, but does not expose the `initialize` method + + { + /// core/ + + AllocationManager allocationManager = Env.proxy.allocationManager(); + vm.expectRevert(errInit); + allocationManager.initialize(address(0), 0); + assertTrue(allocationManager.owner() == Env.executorMultisig(), "alm.owner invalid"); + assertTrue(allocationManager.paused() == 0, "alm.paused invalid"); + + AVSDirectory avsDirectory = Env.proxy.avsDirectory(); + vm.expectRevert(errInit); + avsDirectory.initialize(address(0), 0); + assertTrue(avsDirectory.owner() == Env.executorMultisig(), "avsD.owner invalid"); + assertTrue(avsDirectory.paused() == 0, "avsD.paused invalid"); + + DelegationManager delegation = Env.proxy.delegationManager(); + vm.expectRevert(errInit); + delegation.initialize(address(0), 0); + assertTrue(delegation.owner() == Env.executorMultisig(), "dm.owner invalid"); + assertTrue(delegation.paused() == 0, "dm.paused invalid"); + + RewardsCoordinator rewards = Env.proxy.rewardsCoordinator(); + vm.expectRevert(errInit); + rewards.initialize(address(0), 0, address(0), 0, 0); + assertTrue(rewards.owner() == Env.opsMultisig(), "rc.owner invalid"); + assertTrue(rewards.paused() == Env.REWARDS_PAUSE_STATUS(), "rc.paused invalid"); + assertTrue(rewards.rewardsUpdater() == Env.REWARDS_UPDATER(), "rc.updater invalid"); + assertTrue(rewards.activationDelay() == Env.ACTIVATION_DELAY(), "rc.activationDelay invalid"); + assertTrue(rewards.defaultOperatorSplitBips() == Env.DEFAULT_SPLIT_BIPS(), "rc.splitBips invalid"); + + StrategyManager strategyManager = Env.proxy.strategyManager(); + vm.expectRevert(errInit); + strategyManager.initialize(address(0), address(0), 0); + assertTrue(strategyManager.owner() == Env.executorMultisig(), "sm.owner invalid"); + assertTrue(strategyManager.paused() == 0, "sm.paused invalid"); + assertTrue(strategyManager.strategyWhitelister() == address(Env.proxy.strategyFactory()), "sm.whitelister invalid"); + } + + { + /// pods/ + // EigenPod proxies are initialized by individual users + + EigenPodManager eigenPodManager = Env.proxy.eigenPodManager(); + vm.expectRevert(errInit); + eigenPodManager.initialize(address(0), 0); + assertTrue(eigenPodManager.owner() == Env.executorMultisig(), "epm.owner invalid"); + assertTrue(eigenPodManager.paused() == 0, "epm.paused invalid"); + } + + { + /// strategies/ + + EigenStrategy eigenStrategy = Env.proxy.eigenStrategy(); + vm.expectRevert(errInit); + eigenStrategy.initialize(IEigen(address(0)), IBackingEigen(address(0))); + assertTrue(eigenStrategy.paused() == 0, "eigenStrat.paused invalid"); + assertTrue(eigenStrategy.EIGEN() == Env.proxy.eigen(), "eigenStrat.EIGEN invalid"); + assertTrue(eigenStrategy.underlyingToken() == Env.proxy.beigen(), "eigenStrat.underlying invalid"); + + // StrategyBase proxies are initialized when deployed by factory + + uint count = Env.instance.strategyBaseTVLLimits_Count(); + for (uint i = 0; i < count; i++) { + StrategyBaseTVLLimits strategy = Env.instance.strategyBaseTVLLimits(i); + + emit log_named_address("strat", address(strategy)); + + vm.expectRevert(errInit); + strategy.initialize(0, 0, IERC20(address(0))); + assertTrue(strategy.maxPerDeposit() == type(uint).max, "stratTVLLim.maxPerDeposit invalid"); + assertTrue(strategy.maxTotalDeposits() == type(uint).max, "stratTVLLim.maxPerDeposit invalid"); + } + + StrategyFactory strategyFactory = Env.proxy.strategyFactory(); + vm.expectRevert(errInit); + strategyFactory.initialize(address(0), 0, UpgradeableBeacon(address(0))); + assertTrue(strategyFactory.owner() == Env.opsMultisig(), "sFact.owner invalid"); + assertTrue(strategyFactory.paused() == 0, "sFact.paused invalid"); + assertTrue(strategyFactory.strategyBeacon() == Env.beacon.strategyBase(), "sFact.beacon invalid"); + } + } +} diff --git a/script/releases/v1.0.2-slashing-consolidated/cleanup/EigenPod.abi.json b/script/releases/v1.0.2-slashing-consolidated/cleanup/EigenPod.abi.json new file mode 100644 index 000000000..eea17671d --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/cleanup/EigenPod.abi.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"_ethPOS","type":"address","internalType":"contract IETHPOSDeposit"},{"name":"_eigenPodManager","type":"address","internalType":"contract IEigenPodManager"},{"name":"_GENESIS_TIME","type":"uint64","internalType":"uint64"}],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"},{"type":"function","name":"GENESIS_TIME","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"activeValidatorCount","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"checkpointBalanceExitedGwei","inputs":[{"name":"","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"currentCheckpoint","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct IEigenPodTypes.Checkpoint","components":[{"name":"beaconBlockRoot","type":"bytes32","internalType":"bytes32"},{"name":"proofsRemaining","type":"uint24","internalType":"uint24"},{"name":"podBalanceGwei","type":"uint64","internalType":"uint64"},{"name":"balanceDeltasGwei","type":"int64","internalType":"int64"},{"name":"prevBeaconBalanceGwei","type":"uint64","internalType":"uint64"}]}],"stateMutability":"view"},{"type":"function","name":"currentCheckpointTimestamp","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"eigenPodManager","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IEigenPodManager"}],"stateMutability":"view"},{"type":"function","name":"ethPOS","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IETHPOSDeposit"}],"stateMutability":"view"},{"type":"function","name":"getParentBlockRoot","inputs":[{"name":"timestamp","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"_podOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"lastCheckpointTimestamp","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"podOwner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"proofSubmitter","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"recoverTokens","inputs":[{"name":"tokenList","type":"address[]","internalType":"contract IERC20[]"},{"name":"amountsToWithdraw","type":"uint256[]","internalType":"uint256[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setProofSubmitter","inputs":[{"name":"newProofSubmitter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"stake","inputs":[{"name":"pubkey","type":"bytes","internalType":"bytes"},{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"depositDataRoot","type":"bytes32","internalType":"bytes32"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"startCheckpoint","inputs":[{"name":"revertIfNoBalance","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"validatorPubkeyHashToInfo","inputs":[{"name":"validatorPubkeyHash","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"tuple","internalType":"struct IEigenPodTypes.ValidatorInfo","components":[{"name":"validatorIndex","type":"uint64","internalType":"uint64"},{"name":"restakedBalanceGwei","type":"uint64","internalType":"uint64"},{"name":"lastCheckpointedAt","type":"uint64","internalType":"uint64"},{"name":"status","type":"uint8","internalType":"enum IEigenPodTypes.VALIDATOR_STATUS"}]}],"stateMutability":"view"},{"type":"function","name":"validatorPubkeyToInfo","inputs":[{"name":"validatorPubkey","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct IEigenPodTypes.ValidatorInfo","components":[{"name":"validatorIndex","type":"uint64","internalType":"uint64"},{"name":"restakedBalanceGwei","type":"uint64","internalType":"uint64"},{"name":"lastCheckpointedAt","type":"uint64","internalType":"uint64"},{"name":"status","type":"uint8","internalType":"enum IEigenPodTypes.VALIDATOR_STATUS"}]}],"stateMutability":"view"},{"type":"function","name":"validatorStatus","inputs":[{"name":"validatorPubkey","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"uint8","internalType":"enum IEigenPodTypes.VALIDATOR_STATUS"}],"stateMutability":"view"},{"type":"function","name":"validatorStatus","inputs":[{"name":"pubkeyHash","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint8","internalType":"enum IEigenPodTypes.VALIDATOR_STATUS"}],"stateMutability":"view"},{"type":"function","name":"verifyCheckpointProofs","inputs":[{"name":"balanceContainerProof","type":"tuple","internalType":"struct BeaconChainProofs.BalanceContainerProof","components":[{"name":"balanceContainerRoot","type":"bytes32","internalType":"bytes32"},{"name":"proof","type":"bytes","internalType":"bytes"}]},{"name":"proofs","type":"tuple[]","internalType":"struct BeaconChainProofs.BalanceProof[]","components":[{"name":"pubkeyHash","type":"bytes32","internalType":"bytes32"},{"name":"balanceRoot","type":"bytes32","internalType":"bytes32"},{"name":"proof","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"verifyStaleBalance","inputs":[{"name":"beaconTimestamp","type":"uint64","internalType":"uint64"},{"name":"stateRootProof","type":"tuple","internalType":"struct BeaconChainProofs.StateRootProof","components":[{"name":"beaconStateRoot","type":"bytes32","internalType":"bytes32"},{"name":"proof","type":"bytes","internalType":"bytes"}]},{"name":"proof","type":"tuple","internalType":"struct BeaconChainProofs.ValidatorProof","components":[{"name":"validatorFields","type":"bytes32[]","internalType":"bytes32[]"},{"name":"proof","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"verifyWithdrawalCredentials","inputs":[{"name":"beaconTimestamp","type":"uint64","internalType":"uint64"},{"name":"stateRootProof","type":"tuple","internalType":"struct BeaconChainProofs.StateRootProof","components":[{"name":"beaconStateRoot","type":"bytes32","internalType":"bytes32"},{"name":"proof","type":"bytes","internalType":"bytes"}]},{"name":"validatorIndices","type":"uint40[]","internalType":"uint40[]"},{"name":"validatorFieldsProofs","type":"bytes[]","internalType":"bytes[]"},{"name":"validatorFields","type":"bytes32[][]","internalType":"bytes32[][]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawRestakedBeaconChainETH","inputs":[{"name":"recipient","type":"address","internalType":"address"},{"name":"amountWei","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawableRestakedExecutionLayerGwei","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"event","name":"CheckpointCreated","inputs":[{"name":"checkpointTimestamp","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"beaconBlockRoot","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"validatorCount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"CheckpointFinalized","inputs":[{"name":"checkpointTimestamp","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"totalShareDeltaWei","type":"int256","indexed":false,"internalType":"int256"}],"anonymous":false},{"type":"event","name":"EigenPodStaked","inputs":[{"name":"pubkey","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"NonBeaconChainETHReceived","inputs":[{"name":"amountReceived","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ProofSubmitterUpdated","inputs":[{"name":"prevProofSubmitter","type":"address","indexed":false,"internalType":"address"},{"name":"newProofSubmitter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RestakedBeaconChainETHWithdrawn","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ValidatorBalanceUpdated","inputs":[{"name":"validatorIndex","type":"uint40","indexed":false,"internalType":"uint40"},{"name":"balanceTimestamp","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"newValidatorBalanceGwei","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ValidatorCheckpointed","inputs":[{"name":"checkpointTimestamp","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"validatorIndex","type":"uint40","indexed":true,"internalType":"uint40"}],"anonymous":false},{"type":"event","name":"ValidatorRestaked","inputs":[{"name":"validatorIndex","type":"uint40","indexed":false,"internalType":"uint40"}],"anonymous":false},{"type":"event","name":"ValidatorWithdrawn","inputs":[{"name":"checkpointTimestamp","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"validatorIndex","type":"uint40","indexed":true,"internalType":"uint40"}],"anonymous":false},{"type":"error","name":"AmountMustBeMultipleOfGwei","inputs":[]},{"type":"error","name":"BeaconTimestampTooFarInPast","inputs":[]},{"type":"error","name":"CannotCheckpointTwiceInSingleBlock","inputs":[]},{"type":"error","name":"CheckpointAlreadyActive","inputs":[]},{"type":"error","name":"CredentialsAlreadyVerified","inputs":[]},{"type":"error","name":"CurrentlyPaused","inputs":[]},{"type":"error","name":"InputAddressZero","inputs":[]},{"type":"error","name":"InputArrayLengthMismatch","inputs":[]},{"type":"error","name":"InsufficientWithdrawableBalance","inputs":[]},{"type":"error","name":"InvalidEIP4788Response","inputs":[]},{"type":"error","name":"InvalidProof","inputs":[]},{"type":"error","name":"InvalidProofLength","inputs":[]},{"type":"error","name":"InvalidProofLength","inputs":[]},{"type":"error","name":"InvalidPubKeyLength","inputs":[]},{"type":"error","name":"InvalidValidatorFieldsLength","inputs":[]},{"type":"error","name":"MsgValueNot32ETH","inputs":[]},{"type":"error","name":"NoActiveCheckpoint","inputs":[]},{"type":"error","name":"NoBalanceToCheckpoint","inputs":[]},{"type":"error","name":"OnlyEigenPodManager","inputs":[]},{"type":"error","name":"OnlyEigenPodOwner","inputs":[]},{"type":"error","name":"OnlyEigenPodOwnerOrProofSubmitter","inputs":[]},{"type":"error","name":"TimestampOutOfRange","inputs":[]},{"type":"error","name":"ValidatorInactiveOnBeaconChain","inputs":[]},{"type":"error","name":"ValidatorIsExitingBeaconChain","inputs":[]},{"type":"error","name":"ValidatorNotActiveInPod","inputs":[]},{"type":"error","name":"ValidatorNotSlashedOnBeaconChain","inputs":[]},{"type":"error","name":"WithdrawalCredentialsNotForEigenPod","inputs":[]}] \ No newline at end of file diff --git a/script/releases/v1.0.2-slashing-consolidated/cleanup/EigenPodManager.abi.json b/script/releases/v1.0.2-slashing-consolidated/cleanup/EigenPodManager.abi.json new file mode 100644 index 000000000..eca82221b --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/cleanup/EigenPodManager.abi.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"_ethPOS","type":"address","internalType":"contract IETHPOSDeposit"},{"name":"_eigenPodBeacon","type":"address","internalType":"contract IBeacon"},{"name":"_strategyManager","type":"address","internalType":"contract IStrategyManager"},{"name":"_delegationManager","type":"address","internalType":"contract IDelegationManager"},{"name":"_pauserRegistry","type":"address","internalType":"contract IPauserRegistry"}],"stateMutability":"nonpayable"},{"type":"function","name":"addShares","inputs":[{"name":"staker","type":"address","internalType":"address"},{"name":"strategy","type":"address","internalType":"contract IStrategy"},{"name":"","type":"address","internalType":"contract IERC20"},{"name":"shares","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"beaconChainETHStrategy","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IStrategy"}],"stateMutability":"view"},{"type":"function","name":"beaconChainSlashingFactor","inputs":[{"name":"podOwner","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"createPod","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"delegationManager","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IDelegationManager"}],"stateMutability":"view"},{"type":"function","name":"eigenPodBeacon","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IBeacon"}],"stateMutability":"view"},{"type":"function","name":"ethPOS","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IETHPOSDeposit"}],"stateMutability":"view"},{"type":"function","name":"getPod","inputs":[{"name":"podOwner","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"address","internalType":"contract IEigenPod"}],"stateMutability":"view"},{"type":"function","name":"hasPod","inputs":[{"name":"podOwner","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"initialOwner","type":"address","internalType":"address"},{"name":"_initPausedStatus","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"numPods","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"ownerToPod","inputs":[{"name":"podOwner","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"address","internalType":"contract IEigenPod"}],"stateMutability":"view"},{"type":"function","name":"pause","inputs":[{"name":"newPausedStatus","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"pauseAll","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"paused","inputs":[{"name":"index","type":"uint8","internalType":"uint8"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"paused","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"pauserRegistry","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IPauserRegistry"}],"stateMutability":"view"},{"type":"function","name":"podOwnerDepositShares","inputs":[{"name":"podOwner","type":"address","internalType":"address"}],"outputs":[{"name":"shares","type":"int256","internalType":"int256"}],"stateMutability":"view"},{"type":"function","name":"recordBeaconChainETHBalanceUpdate","inputs":[{"name":"podOwner","type":"address","internalType":"address"},{"name":"prevRestakedBalanceWei","type":"uint256","internalType":"uint256"},{"name":"balanceDeltaWei","type":"int256","internalType":"int256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"removeDepositShares","inputs":[{"name":"staker","type":"address","internalType":"address"},{"name":"strategy","type":"address","internalType":"contract IStrategy"},{"name":"depositSharesToRemove","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"stake","inputs":[{"name":"pubkey","type":"bytes","internalType":"bytes"},{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"depositDataRoot","type":"bytes32","internalType":"bytes32"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"stakerDepositShares","inputs":[{"name":"user","type":"address","internalType":"address"},{"name":"strategy","type":"address","internalType":"contract IStrategy"}],"outputs":[{"name":"depositShares","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"strategyManager","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IStrategyManager"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unpause","inputs":[{"name":"newPausedStatus","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawSharesAsTokens","inputs":[{"name":"staker","type":"address","internalType":"address"},{"name":"strategy","type":"address","internalType":"contract IStrategy"},{"name":"","type":"address","internalType":"contract IERC20"},{"name":"shares","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"BeaconChainETHDeposited","inputs":[{"name":"podOwner","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BeaconChainETHWithdrawalCompleted","inputs":[{"name":"podOwner","type":"address","indexed":true,"internalType":"address"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"nonce","type":"uint96","indexed":false,"internalType":"uint96"},{"name":"delegatedAddress","type":"address","indexed":false,"internalType":"address"},{"name":"withdrawer","type":"address","indexed":false,"internalType":"address"},{"name":"withdrawalRoot","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"BeaconChainSlashingFactorDecreased","inputs":[{"name":"staker","type":"address","indexed":false,"internalType":"address"},{"name":"wadSlashed","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newBeaconChainSlashingFactor","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"NewTotalShares","inputs":[{"name":"podOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newTotalShares","type":"int256","indexed":false,"internalType":"int256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"newPausedStatus","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"PodDeployed","inputs":[{"name":"eigenPod","type":"address","indexed":true,"internalType":"address"},{"name":"podOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"PodSharesUpdated","inputs":[{"name":"podOwner","type":"address","indexed":true,"internalType":"address"},{"name":"sharesDelta","type":"int256","indexed":false,"internalType":"int256"}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"newPausedStatus","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"CurrentlyPaused","inputs":[]},{"type":"error","name":"EigenPodAlreadyExists","inputs":[]},{"type":"error","name":"InputAddressZero","inputs":[]},{"type":"error","name":"InvalidNewPausedStatus","inputs":[]},{"type":"error","name":"InvalidStrategy","inputs":[]},{"type":"error","name":"LegacyWithdrawalsNotCompleted","inputs":[]},{"type":"error","name":"OnlyDelegationManager","inputs":[]},{"type":"error","name":"OnlyEigenPod","inputs":[]},{"type":"error","name":"OnlyPauser","inputs":[]},{"type":"error","name":"OnlyUnpauser","inputs":[]},{"type":"error","name":"SharesNegative","inputs":[]},{"type":"error","name":"SharesNotMultipleOfGwei","inputs":[]}] \ No newline at end of file diff --git a/script/releases/v1.0.2-slashing-consolidated/cleanup/go.mod b/script/releases/v1.0.2-slashing-consolidated/cleanup/go.mod new file mode 100644 index 000000000..54879f94b --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/cleanup/go.mod @@ -0,0 +1,74 @@ +module main + +go 1.22.4 + +require ( + github.com/Layr-Labs/eigenpod-proofs-generation v0.1.0-pepe-testnet.0.20240925202841-f6492b1cc9fc + github.com/attestantio/go-eth2-client v0.21.11 + github.com/ethereum/go-ethereum v1.14.9 + github.com/jbrower95/multicall-go v0.0.0-20241012224745-7e9c19976cb5 + github.com/samber/lo v1.47.0 +) + +require ( + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/StackExchange/wmi v1.2.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/consensys/bavard v0.1.13 // indirect + github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect + github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect + github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/ferranbt/fastssz v0.1.3 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/goccy/go-yaml v1.9.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/holiman/uint256 v1.3.1 // indirect + github.com/huandu/go-clone v1.6.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/minio/sha256-simd v1.0.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/pk910/dynamic-ssz v0.0.3 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e // indirect + github.com/r3labs/sse/v2 v2.10.0 // indirect + github.com/rs/zerolog v1.32.0 // indirect + github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/supranational/blst v0.3.11 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + go.opentelemetry.io/otel v1.16.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect + gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + rsc.io/tmplfunc v0.0.3 // indirect +) diff --git a/script/releases/v1.0.2-slashing-consolidated/cleanup/go.sum b/script/releases/v1.0.2-slashing-consolidated/cleanup/go.sum new file mode 100644 index 000000000..f100d52de --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/cleanup/go.sum @@ -0,0 +1,283 @@ +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Layr-Labs/eigenpod-proofs-generation v0.1.0-pepe-testnet.0.20240925202841-f6492b1cc9fc h1:xOvrJ2NHD7ykcikuqqvUVXZR6PNUomd05eO/vYQ2+g8= +github.com/Layr-Labs/eigenpod-proofs-generation v0.1.0-pepe-testnet.0.20240925202841-f6492b1cc9fc/go.mod h1:T7tYN8bTdca2pkMnz9G2+ZwXYWw5gWqQUIu4KLgC/vM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= +github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= +github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= +github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= +github.com/attestantio/go-eth2-client v0.21.11 h1:0ZYP69O8rJz41055WOf3n1C1NA4jNh2iME/NuTVfgmQ= +github.com/attestantio/go-eth2-client v0.21.11/go.mod h1:d7ZPNrMX8jLfIgML5u7QZxFo2AukLM+5m08iMaLdqb8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= +github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= +github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= +github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= +github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= +github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= +github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.14.9 h1:J7iwXDrtUyE9FUjUYbd4c9tyzwMh6dTJsKzo9i6SrwA= +github.com/ethereum/go-ethereum v1.14.9/go.mod h1:QeW+MtTpRdBEm2pUFoonByee8zfHv7kGp0wK0odvU1I= +github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 h1:8NfxH2iXvJ60YRB8ChToFTUzl8awsc3cJ8CbLjGIl/A= +github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/ferranbt/fastssz v0.1.3 h1:ZI+z3JH05h4kgmFXdHuR1aWYsgrg7o+Fw7/NCzM16Mo= +github.com/ferranbt/fastssz v0.1.3/go.mod h1:0Y9TEd/9XuFlh7mskMPfXiI2Dkw4Ddg9EyXt1W7MRvE= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/goccy/go-yaml v1.9.2 h1:2Njwzw+0+pjU2gb805ZC1B/uBuAs2VcZ3K+ZgHwDs7w= +github.com/goccy/go-yaml v1.9.2/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= +github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/go-clone v1.6.0 h1:HMo5uvg4wgfiy5FoGOqlFLQED/VGRm2D9Pi8g1FXPGc= +github.com/huandu/go-clone v1.6.0/go.mod h1:ReGivhG6op3GYr+UY3lS6mxjKp7MIGTknuU5TbTVaXE= +github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0XLdbUYN5U= +github.com/huandu/go-clone/generic v1.6.0/go.mod h1:xgd9ZebcMsBWWcBx5mVMCoqMX24gLWr5lQicr+nVXNs= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jbrower95/multicall-go v0.0.0-20241012224745-7e9c19976cb5 h1:MbF9mcEhOK8A1lphvcfh5Tg7Y2p4iUAtw2+yz3jUa94= +github.com/jbrower95/multicall-go v0.0.0-20241012224745-7e9c19976cb5/go.mod h1:cl6hJrk69g0EyKPgNySQbJE1nj29t2q7Pu0as27uC04= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= +github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/pk910/dynamic-ssz v0.0.3 h1:fCWzFowq9P6SYCc7NtJMkZcIHk+r5hSVD+32zVi6Aio= +github.com/pk910/dynamic-ssz v0.0.3/go.mod h1:b6CrLaB2X7pYA+OSEEbkgXDEcRnjLOZIxZTsMuO/Y9c= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e h1:ATgOe+abbzfx9kCPeXIW4fiWyDdxlwHw07j8UGhdTd4= +github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e/go.mod h1:wmuf/mdK4VMD+jA9ThwcUKjg3a2XWM9cVfFYjDyY4j4= +github.com/r3labs/sse/v2 v2.10.0 h1:hFEkLLFY4LDifoHdiCN/LlGBAdVJYsANaLqNYa1l/v0= +github.com/r3labs/sse/v2 v2.10.0/go.mod h1:Igau6Whc+F17QUgML1fYe1VPZzTV6EMCnYktEmkNJ7I= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc= +github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= +github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= +github.com/umbracle/gohashtree v0.0.2-alpha.0.20230207094856-5b775a815c10 h1:CQh33pStIp/E30b7TxDlXfM0145bn2e8boI30IxAhTg= +github.com/umbracle/gohashtree v0.0.2-alpha.0.20230207094856-5b775a815c10/go.mod h1:x/Pa0FF5Te9kdrlZKJK82YmAkvL8+f989USgz6Jiw7M= +github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= +github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/Knetic/govaluate.v3 v3.0.0 h1:18mUyIt4ZlRlFZAAfVetz4/rzlJs9yhN+U02F4u1AOc= +gopkg.in/Knetic/govaluate.v3 v3.0.0/go.mod h1:csKLBORsPbafmSCGTEh3U7Ozmsuq8ZSIlKk1bcqph0E= +gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= +gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/script/releases/v1.0.2-slashing-consolidated/cleanup/script.go b/script/releases/v1.0.2-slashing-consolidated/cleanup/script.go new file mode 100644 index 000000000..bbc3da4da --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/cleanup/script.go @@ -0,0 +1,328 @@ +package main + +import ( + "context" + _ "embed" + "encoding/json" + "fmt" + "math/big" + "os" + "sort" + "strings" + "time" + + proofgen "github.com/Layr-Labs/eigenpod-proofs-generation/cli/core" + eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" + v1 "github.com/attestantio/go-eth2-client/api/v1" + attestantio "github.com/attestantio/go-eth2-client/http" + "github.com/attestantio/go-eth2-client/spec/phase0" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + multicall "github.com/jbrower95/multicall-go" + "github.com/samber/lo" +) + +type EigenpodInfo struct { + Address string `json:"address"` + CurrentCheckpointTimestamp uint64 `json:"currentCheckpointTimestamp"` +} + +type TQueryAllEigenpodsOnNetworkArgs struct { + Ctx context.Context + AllValidators []ValidatorWithIndex + Eth *ethclient.Client + EigenpodAbi abi.ABI + PodManagerAbi abi.ABI + PodManagerAddress string + Mc *multicall.MulticallClient +} + +//go:embed EigenPod.abi.json +var EigenPodAbi string + +//go:embed EigenPodManager.abi.json +var EigenPodManagerAbi string + +type ValidatorWithIndex struct { + Validator *v1.Validator + Index phase0.ValidatorIndex +} + +type TArgs struct { + Node string + BeaconNode string + Sender string +} + +func main() { + err := runScript(TArgs{ + Node: os.Getenv("RPC_URL"), + BeaconNode: os.Getenv("BEACON_URL"), + Sender: os.Getenv("SENDER_PK"), + }) + if err != nil { + fmt.Printf("Error: %v\n", err) + os.Exit(1) + } +} + +func panicOnError(msg string, err error) { + if err != nil { + fmt.Printf("Error: %s", msg) + panic(err) + } +} + +func runScript(args TArgs) error { + ctx := context.Background() + + if args.Sender[:2] == "0x" { + args.Sender = args.Sender[2:] + } + fmt.Printf("Sender: %s\n", args.Sender) + + eigenpodAbi, err := abi.JSON(strings.NewReader(EigenPodAbi)) + panicOnError("failed to load eigenpod abi", err) + + podManagerAbi, err := abi.JSON(strings.NewReader(EigenPodManagerAbi)) + panicOnError("failed to load eigenpod manager abi", err) + + eth, err := ethclient.Dial(args.Node) + panicOnError("failed to reach eth node", err) + + chainId, err := eth.ChainID(ctx) + panicOnError("failed to read chainId", err) + + beaconClient, err := attestantio.New(ctx, + attestantio.WithAddress(args.BeaconNode), + ) + panicOnError("failed to reach beacon node", err) + + panicOnError("failed to reach ethereum clients", err) + + mc, err := multicall.NewMulticallClient(ctx, eth, &multicall.TMulticallClientOptions{ + MaxBatchSizeBytes: 8192, + }) + panicOnError("error initializing mc", err) + + podManagerAddress := os.Getenv("ZEUS_DEPLOYED_EigenPodManager_Proxy") + + // fetch latest beacon state. + _validators := (func() *map[phase0.ValidatorIndex]*v1.Validator { + if provider, isProvider := beaconClient.(eth2client.ValidatorsProvider); isProvider { + validators, err := provider.Validators(ctx, &api.ValidatorsOpts{ + State: "head", + Common: api.CommonOpts{ + Timeout: 60 * time.Second, + }, + }) + panicOnError("failed to load validator set", err) + return &validators.Data + } + return nil + })() + if _validators == nil { + panic("failed to load validators") + } + validators := *_validators + + fmt.Printf("Found %d validators\n", len(validators)) + + panicOnError("failed to load beacon state", err) + + panicOnError("failed to fetch validators", err) + allValidators := lo.Map(lo.Keys(validators), func(idx phase0.ValidatorIndex, i int) ValidatorWithIndex { + return ValidatorWithIndex{ + Validator: validators[idx], + Index: idx, + } + }) + + allEigenpods, err := queryAllEigenpodsOnNetwork(ctx, allValidators, eth, &eigenpodAbi, &podManagerAbi, podManagerAddress, mc) + panicOnError("queryAllEigenpodsOnNetwork", err) + + enc := json.NewEncoder(os.Stdout) + enc.SetIndent("", " ") + + fmt.Printf("Discovered %d eigenpods on the network.\n", len(allEigenpods)) + + pods := lo.Map(allEigenpods, func(pod string, i int) string { + return fmt.Sprintf("0x%s", pod) + }) + sort.Strings(pods) + fmt.Printf("%s\n", enc.Encode(pods)) + + // Now for each eigenpod, we want to fetch currentCheckpointTimestamp. + // We'll do a multicall to get currentCheckpointTimestamp from each eigenpod. + checkpointTimestamps, err := fetchCurrentCheckpointTimestamps(allEigenpods, &eigenpodAbi, mc) + panicOnError("failed to fetch currentCheckpointTimestamps", err) + + results := []EigenpodInfo{} + + for i, ep := range allEigenpods { + if checkpointTimestamps[i] > 0 { + results = append(results, EigenpodInfo{ + Address: fmt.Sprintf("0x%s", ep), + CurrentCheckpointTimestamp: checkpointTimestamps[i], + }) + } + } + + if len(results) == 0 { + fmt.Printf("No eigenpods had active checkpoints. OK.") + return nil + } + + fmt.Printf("%d EigenPods had active checkpoints\n\n", len(results)) + fmt.Printf("%s\n", enc.Encode(results)) + + fmt.Printf("Completing %d checkpoints....", len(results)) + coreBeaconClient, _, err := proofgen.NewBeaconClient(args.BeaconNode, true /* verbose */) + panicOnError("failed to instantiate beaconClient", err) + + for i := 0; i < len(results); i++ { + fmt.Printf("Completing [%d/%d]...", i+1, len(results)) + fmt.Printf("NOTE: this is expensive, and may take several minutes.") + completeCheckpointForEigenpod(ctx, results[i].Address, eth, chainId, coreBeaconClient, args.Sender) + } + + checkpointTimestamps, err = fetchCurrentCheckpointTimestamps(allEigenpods, &eigenpodAbi, mc) + panicOnError("failed to fetch currentCheckpointTimestamps", err) + + // require that all eigenpods have a checkpoint timestamp of 0 + for i, timestamp := range checkpointTimestamps { + if timestamp != 0 { + panic(fmt.Sprintf("expected all eigenpods to have a checkpoint timestamp of 0, but found %d on %s", timestamp, allEigenpods[i])) + } + } + + return nil +} + +func completeCheckpointForEigenpod(ctx context.Context, eigenpodAddress string, eth *ethclient.Client, chainId *big.Int, coreBeaconClient proofgen.BeaconClient, sender string) { + res, err := proofgen.GenerateCheckpointProof(ctx, eigenpodAddress, eth, chainId, coreBeaconClient, true) + panicOnError(fmt.Sprintf("failed to generate checkpoint proof for eigenpod:%s", eigenpodAddress), err) + + txns, err := proofgen.SubmitCheckpointProof(ctx, sender, eigenpodAddress, chainId, res, eth, 80 /* ideal checkpoint proof batch size */, true /* noPrompt */, false /* noSend */, true /* verbose */) + panicOnError(fmt.Sprintf("failed to submit checkpoint proof for eigenpod:%s", eigenpodAddress), err) + if txns == nil { + panic("submitting checkpoint proof generated no transactions. this is a bug.") + } + + for i, txn := range txns { + fmt.Printf("[%d/%d] %s\n", i+1, len(txns), txn.Hash()) + } +} + +// This is a simplified version of the queryAllEigenpodsOnNetwork function inline. +// It uses the logic from the provided code snippet in the commands package. +func queryAllEigenpodsOnNetwork( + ctx context.Context, + allValidators []ValidatorWithIndex, + eth *ethclient.Client, + eigenpodAbi, podManagerAbi *abi.ABI, + podManagerAddress string, + mc *multicall.MulticallClient, +) ([]string, error) { + args := TQueryAllEigenpodsOnNetworkArgs{ + Ctx: ctx, + AllValidators: allValidators, + Eth: eth, + EigenpodAbi: *eigenpodAbi, + PodManagerAbi: *podManagerAbi, + PodManagerAddress: podManagerAddress, + Mc: mc, + } + return internalQueryAllEigenpodsOnNetwork(args) +} + +// internalQueryAllEigenpodsOnNetwork is lifted from the provided snippet. +func internalQueryAllEigenpodsOnNetwork(args TQueryAllEigenpodsOnNetworkArgs) ([]string, error) { + // Filter out validators that are withdrawing to execution layer addresses + executionLayerWithdrawalCredentialValidators := lo.Filter(args.AllValidators, func(validator ValidatorWithIndex, i int) bool { + return validator.Validator.Validator.WithdrawalCredentials[0] == 1 + }) + + interestingWithdrawalAddresses := lo.Keys(lo.Reduce(executionLayerWithdrawalCredentialValidators, func(accum map[string]int, next ValidatorWithIndex, index int) map[string]int { + accum[common.Bytes2Hex(next.Validator.Validator.WithdrawalCredentials[12:])] = 1 + return accum + }, map[string]int{})) + + fmt.Printf("Querying %d beacon-chain withdrawal addresses to see if they may be eigenpods\n", len(interestingWithdrawalAddresses)) + + podOwners, err := multicall.DoManyAllowFailures[common.Address](args.Mc, lo.Map(interestingWithdrawalAddresses, func(address string, index int) *multicall.MultiCallMetaData[common.Address] { + callMeta, err := multicall.Describe[common.Address]( + common.HexToAddress(address), + args.EigenpodAbi, + "podOwner", + ) + panicOnError("failed to form mc", err) + return callMeta + })...) + + if podOwners == nil || err != nil || len(*podOwners) == 0 { + panicOnError("failed to fetch podOwners", err) + panic("loaded no pod owners") + } + + podToPodOwner := map[string]*common.Address{} + addressesWithPodOwners := lo.Filter(interestingWithdrawalAddresses, func(address string, i int) bool { + success := (*podOwners)[i].Success + if success { + podToPodOwner[address] = (*podOwners)[i].Value + } + return success + }) + + fmt.Printf("Querying %d addresses on (EigenPodManager=%s) to see if it knows about these eigenpods\n", len(addressesWithPodOwners), args.PodManagerAddress) + + eigenpodForOwner, err := multicall.DoMany( + args.Mc, + lo.Map(addressesWithPodOwners, func(address string, i int) *multicall.MultiCallMetaData[common.Address] { + claimedOwner := *podToPodOwner[address] + call, err := multicall.Describe[common.Address]( + common.HexToAddress(args.PodManagerAddress), + args.PodManagerAbi, + "ownerToPod", + claimedOwner, + ) + panicOnError("failed to form multicall", err) + return call + })..., + ) + panicOnError("failed to query", err) + + // now, see which are properly eigenpods + return lo.Filter(addressesWithPodOwners, func(address string, i int) bool { + return (*eigenpodForOwner)[i].Cmp(common.HexToAddress(addressesWithPodOwners[i])) == 0 + }), nil +} + +func fetchCurrentCheckpointTimestamps( + allEigenpods []string, + eigenpodAbi *abi.ABI, + mc *multicall.MulticallClient, +) ([]uint64, error) { + calls := lo.Map(allEigenpods, func(eigenpod string, i int) *multicall.MultiCallMetaData[uint64] { + call, err := multicall.Describe[uint64]( + common.HexToAddress(eigenpod), + *eigenpodAbi, + "currentCheckpointTimestamp", + ) + panicOnError("failed to form multicall", err) + return call + }) + + results, err := multicall.DoMany(mc, calls...) + if err != nil { + return nil, err + } + + out := make([]uint64, len(*results)) + for i, r := range *results { + out[i] = *r + } + return out, nil +} diff --git a/script/releases/v1.0.2-slashing-consolidated/cleanup/start.sh b/script/releases/v1.0.2-slashing-consolidated/cleanup/start.sh new file mode 100755 index 000000000..e75139d25 --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/cleanup/start.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +cd script/releases/v1.0.0-slashing/cleanup +go run script.go \ No newline at end of file diff --git a/script/releases/v1.0.2-slashing-consolidated/upgrade.json b/script/releases/v1.0.2-slashing-consolidated/upgrade.json new file mode 100644 index 000000000..1d7f57e10 --- /dev/null +++ b/script/releases/v1.0.2-slashing-consolidated/upgrade.json @@ -0,0 +1,32 @@ +{ + "name": "slashing-consolidated", + "from": "~0.5.3", + "to": "1.0.2", + "phases": [ + { + "type": "eoa", + "filename": "1-deployContracts.s.sol" + }, + { + "type": "multisig", + "filename": "2-queueUpgradeAndUnpause.s.sol" + }, + { + "type": "multisig", + "filename": "3-pause.s.sol" + }, + { + "type": "script", + "filename": "cleanup/start.sh", + "arguments": [ + {"type": "url", "passBy": "env", "inputType": "text", "name": "RPC_URL", "prompt": "Enter an ETH RPC URL"}, + {"type": "url", "passBy": "env", "inputType": "text", "name": "BEACON_URL", "prompt": "Enter an ETH2 Beacon RPC URL"}, + {"type": "privateKey", "passBy": "env", "inputType": "password", "name": "SENDER_PK", "prompt": "Enter an ETH wallet private key to complete checkpoints from:"} + ] + }, + { + "type": "multisig", + "filename": "5-executeUpgradeAndUnpause.s.sol" + } + ] +} \ No newline at end of file