Skip to content

test: queue transaction fast forward #1306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: v1.3.0-updates
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion script/configs/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"params": {
"ethPOS": "0x00000000219ab540356cBB839Cbe05303d7705Fa",
"EIGENPOD_GENESIS_TIME": 1606824023,
"CALCULATION_INTERVAL_SECONDS": 604800,
"CALCULATION_INTERVAL_SECONDS": 86400,
"MAX_REWARDS_DURATION": 6048000,
"MAX_RETROACTIVE_LENGTH": 14515200,
"MAX_FUTURE_LENGTH": 2592000,
Expand Down
12 changes: 4 additions & 8 deletions script/configs/mainnet/mainnet-addresses.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"lastUpdated": "v0.4.3-mainnet-foundation-incentives",
"lastUpdated": "v0.5.4",
"addresses": {
"avsDirectory": "0x135dda560e946695d6f155dacafc6f1f25c1f5af",
"avsDirectoryImplementation": "0xdabdb3cd346b7d5f5779b0b614ede1cc9dcba5b7",
"beaconOracle": "0x343907185b71aDF0eBa9567538314396aa985442",
"baseStrategyImplementation": "0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3",
"delayedWithdrawalRouter": "0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8",
"delayedWithdrawalRouterImplementation": "0x4bb6731b02314d40abbffbc4540f508874014226",
"delegationManager": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A",
"delegationManagerImplementation": "0x1784be6401339fc0fedf7e9379409f5c1bfe9dda",
"eigenLayerPauserReg": "0x0c431C66F4dE941d089625E5B423D00707977060",
Expand All @@ -17,9 +14,7 @@
"eigenPodManagerImplementation": "0x731A0aD160e407393Ff662231Add6Dd145AD3FEa",
"emptyContract": "0x1f96861fEFa1065a5A96F20Deb6D8DC3ff48F7f9",
"rewardsCoordinator": "0x7750d328b314EfFa365A0402CcfD489B80B0adda",
"rewardsCoordinatorImplementation": "0xb6738A8E7793D44c5895B6A6F2a62F6bF86Ba8d2",
"slasher": "0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd",
"slasherImplementation": "0xf3234220163a757edf1e11a8a085638d9b236614",
"rewardsCoordinatorImplementation": "0x29A954e9e7F12936Db89b183ECdf879fBBB99F14",
"strategyManager": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A",
"strategyManagerImplementation": "0x70f44c13944d49a236e3cd7a94f48f5dab6c619b",
"strategyFactory": "0x5e4C39Ad7A3E881585e383dB9827EB4811f6F647",
Expand Down Expand Up @@ -75,7 +70,8 @@
"executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111",
"operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90",
"pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390",
"timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF",
"protocolCouncilMultisig": "0x461854d84ee845f905e0ecf6c288ddeeb4a9533f",
"timelockController": "0xC06Fd4F821eaC1fF1ae8067b36342899b57BAa2d",
"semver": "v0.5.4"
}
}
41 changes: 12 additions & 29 deletions script/utils/ExistingDeploymentParser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity ^0.8.27;
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";

import "../../src/contracts/core/StrategyManager.sol";
import "../../src/contracts/core/DelegationManager.sol";
Expand Down Expand Up @@ -160,9 +161,10 @@ contract ExistingDeploymentParser is Script, Logger {

address executorMultisig;
address operationsMultisig;
address protocolCouncilMultisig;
address communityMultisig;
address pauserMultisig;
address timelock;
TimelockController timelockController;

// strategies deployed
uint256 numStrategiesDeployed;
Expand Down Expand Up @@ -206,39 +208,14 @@ contract ExistingDeploymentParser is Script, Logger {
// read all of the deployed addresses
executorMultisig = json.readAddress(".parameters.executorMultisig");
operationsMultisig = json.readAddress(".parameters.operationsMultisig");
protocolCouncilMultisig = json.readAddress(".parameters.protocolCouncilMultisig");
communityMultisig = json.readAddress(".parameters.communityMultisig");
pauserMultisig = json.readAddress(".parameters.pauserMultisig");
timelock = json.readAddress(".parameters.timelock");
timelockController = TimelockController(payable(json.readAddress(".parameters.timelockController")));

eigenLayerProxyAdmin = ProxyAdmin(json.readAddress(".addresses.eigenLayerProxyAdmin"));
eigenLayerPauserReg = PauserRegistry(json.readAddress(".addresses.eigenLayerPauserReg"));

// FIXME: hotfix - remove later...
permissionControllerImplementation = new PermissionController(SEMVER);
permissionController = PermissionController(
address(
new TransparentUpgradeableProxy(
address(permissionControllerImplementation), address(eigenLayerProxyAdmin), ""
)
)
);

allocationManagerImplementation = new AllocationManager(
delegationManager,
eigenLayerPauserReg,
permissionController,
DEALLOCATION_DELAY,
ALLOCATION_CONFIGURATION_DELAY,
SEMVER
);
allocationManager = AllocationManager(
address(
new TransparentUpgradeableProxy(
address(allocationManagerImplementation), address(eigenLayerProxyAdmin), ""
)
)
);

// // AllocationManager
// allocationManager = AllocationManager(json.readAddress(".addresses.allocationManager"));
// allocationManagerImplementation = json.readAddress(".addresses.allocationManagerImplementation");
Expand Down Expand Up @@ -757,9 +734,10 @@ contract ExistingDeploymentParser is Script, Logger {
string memory parameters = "parameters";
parameters.serialize("executorMultisig", executorMultisig);
parameters.serialize("operationsMultisig", operationsMultisig);
parameters.serialize("protocolCouncilMultisig", protocolCouncilMultisig);
parameters.serialize("communityMultisig", communityMultisig);
parameters.serialize("pauserMultisig", pauserMultisig);
parameters.serialize("timelock", timelock);
parameters.serialize("timelockController", address(timelockController));
string memory parameters_output = parameters.serialize("operationsMultisig", operationsMultisig);

string memory chain_info = "chainInfo";
Expand Down Expand Up @@ -800,8 +778,13 @@ contract ExistingDeploymentParser is Script, Logger {
REWARDS_COORDINATOR_GENESIS_REWARDS_TIMESTAMP =
uint32(json.readUint(".config.params.GENESIS_REWARDS_TIMESTAMP"));

ETHPOSDepositAddress = address(json.readAddress(".config.params.ethPOS"));
EIGENPOD_GENESIS_TIME = uint64(json.readUint(".config.params.EIGENPOD_GENESIS_TIME"));
DEALLOCATION_DELAY = uint32(json.readUint(".config.params.MIN_WITHDRAWAL_DELAY_BLOCKS"));
ALLOCATION_CONFIGURATION_DELAY = uint32(json.readUint(".config.params.ALLOCATION_CONFIGURATION_DELAY"));
REWARDS_COORDINATOR_ACTIVATION_DELAY = uint32(json.readUint(".config.params.ACTIVATION_DELAY"));
REWARDS_COORDINATOR_DEFAULT_OPERATOR_SPLIT_BIPS =
uint32(json.readUint(".config.params.GLOBAL_OPERATOR_COMMISSION_BIPS"));
DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS =
uint32(json.readUint(".config.params.MIN_WITHDRAWAL_DELAY_BLOCKS"));
}
Expand Down
48 changes: 32 additions & 16 deletions src/test/integration/IntegrationDeployer.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";
import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";

import "forge-std/Test.sol";

import "src/contracts/core/DelegationManager.sol";
Expand Down Expand Up @@ -39,7 +41,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser {

// Fork ids for specific fork tests
bool isUpgraded;
uint mainnetForkBlock = 21_616_692; // Post Protocol Council upgrade
uint mainnetForkBlock = 22_219_882; // Post Queueing Slashing Upgrade

string version = "v9.9.9";

Expand Down Expand Up @@ -260,27 +262,41 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser {
}

function _upgradeMainnetContracts() public virtual {
cheats.startPrank(address(executorMultisig));
// Warp time to past the slashing queue transaction
cheats.warp(block.timestamp + 10 days);

// First, deploy the new contracts as empty contracts
emptyContract = new EmptyContract();
allocationManager =
AllocationManager(address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")));
permissionController =
PermissionController(address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")));
bytes memory payload =
hex"6A76120200000000000000000000000040A2ACCBD92BCA938B02010E17A5B8929B49130D000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000EA00000000000000000000000000000000000000000000000000000000000000D248D80FF0A00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000CC6008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC4000000000000000000000000135DDA560E946695D6F155DACAFC6F1F25C1F5AF000000000000000000000000A396D855D70E1A1EC1A0199ADB9845096683B6A2008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC400000000000000000000000039053D51B77DC0D36036FC1FCC8CB819DF8EF37A000000000000000000000000A75112D1DF37FA53A431525CD47A7D7FACEA7E73008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC40000000000000000000000007750D328B314EFFA365A0402CCFD489B80B0ADDA000000000000000000000000A505C0116AD65071F0130061F94745B7853220AB008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC4000000000000000000000000858646372CC42E1A627FCE94AA7A7033E7CF075A000000000000000000000000BA4B2B8A076851A3044882493C2E36503D50B925005A2A4F2F3C18F09179B6703E63D9EDD165909073000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659CFE6000000000000000000000000B132A8DAD03A507F1B9D2F467A4936DF2161C63E008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC400000000000000000000000091E677B07F7AF907EC9A428AAFA9FC14A0D3A3380000000000000000000000009801266CBBBE1E94BB9DAF7DE8D61528F49CEC77008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC4000000000000000000000000ACB55C530ACDB2849E6D4F36992CD8C9D50ED8F700000000000000000000000090B074DDD680BD06C72E28B09231A0F848205729000ED6703C298D28AE0878D1B28E88CA87F9662FE9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659CFE60000000000000000000000000EC17EF9C00F360DB28CA8008684A4796B11E456008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC40000000000000000000000005E4C39AD7A3E881585E383DB9827EB4811F6F6470000000000000000000000001B97D8F963179C0E17E5F3D85CDFD9A31A49BC66008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC400000000000000000000000093C4B944D05DFE6DF7645A86CD2206016C51564D000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC40000000000000000000000001BEE69B7DFFFA4E2D53C2A2DF135C388AD25DCD2000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC400000000000000000000000054945180DB7943C0ED0FEE7EDAB2BD24620256BC000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC40000000000000000000000009D7ED45EE2E8FC5482FA2428F15C971E6369011D000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC400000000000000000000000013760F50A9D7377E4F20CB8CF9E4C26586C658FF000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC4000000000000000000000000A4C637E0F704745D182E4D38CAB7E7485321D059000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC400000000000000000000000057BA429517C3473B6D34CA9ACD56C0E735B94C02000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC40000000000000000000000000FE4F44BEE93503346A3AC9EE5A26B130A5796D6000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC40000000000000000000000007CA911E83DABF90C90DD3DE5411A10F1A6112184000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC40000000000000000000000008CA7A5D6F3ACD3A7A8BC468A8CD0FB14B6BD28B6000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC4000000000000000000000000AE60D8180437B5C34BB956822AC2710972584473000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF178008B9566ADA63B64D1E1DCF1418B43FD1433B724440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004499A88EC4000000000000000000000000298AFB19A105D59E74658C4C334FF360BADE6DD2000000000000000000000000AFDA870D4A94B9444F9F22A0E61806178B6BF1780091E677B07F7AF907EC9A428AAFA9FC14A0D3A33800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024FABC1CBC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041000000000000000000000000C06FD4F821EAC1FF1AE8067B36342899B57BAA2D00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000";
cheats.startPrank(protocolCouncilMultisig);
timelockController.execute({target: executorMultisig, value: 0, payload: payload, predecessor: 0, salt: 0});
cheats.stopPrank();

emit log_named_uint("EPM pause status", eigenPodManager.paused());
/// Manually set new addresses:

// Deploy new implementation contracts and upgrade all proxies to point to them
_deployImplementations();
_upgradeProxies();
// core
avsDirectoryImplementation = AVSDirectory(0xA396D855D70e1A1ec1A0199ADB9845096683B6A2);
allocationManager = AllocationManager(0x948a420b8CC1d6BFd0B6087C2E7c344a2CD0bc39);
allocationManagerImplementation = AllocationManager(0x740058839A1668Af5700e5d7B062007275e77D25);
delegationManagerImplementation = DelegationManager(0xA75112d1df37FA53a431525CD47A7d7faCEA7E73);
rewardsCoordinatorImplementation = RewardsCoordinator(0xa505c0116aD65071F0130061F94745b7853220aB);
strategyManagerImplementation = StrategyManager(0xba4b2b8A076851A3044882493C2e36503d50b925);

emit log_named_uint("EPM pause status", eigenPodManager.paused());
// permissions
eigenLayerPauserReg = PauserRegistry(0xB8765ed72235d279c3Fb53936E4606db0Ef12806);
permissionController = PermissionController(0x25E5F8B1E7aDf44518d35D5B2271f114e081f0E5);
permissionControllerImplementation = PermissionController(0xe7f3705c9Addf2DE14e03C345fA982CAb2c1C6B1);

// Initialize the newly-deployed proxy
allocationManager.initialize({initialOwner: executorMultisig, initialPausedStatus: 0});
// pods
eigenPodImplementation = EigenPod(payable(0xB132a8DaD03A507f1b9D2F467A4936Df2161C63e));
eigenPodManagerImplementation = EigenPodManager(0x9801266CbBbe1E94bB9dAf7de8D61528f49CeC77);

cheats.stopPrank();
// strategies
strategyFactoryImplementation = StrategyFactory(0x1b97d8F963179C0e17E5F3d85cdfd9a31A49bc66);
eigenStrategyImpl = EigenStrategy(0x90B074DDD680bD06C72e28b09231A0F848205729);
strategyFactoryBeaconImplementation = StrategyBase(0x0EC17ef9c00F360DB28CA8008684a4796b11E456); // base
baseStrategyImplementation = StrategyBase(0xaFDa870d4A94B9444F9F22A0e61806178b6Bf178); // TVL Limits

console.log("Slashing upgrade executed after queue");
}

function _deployProxies() public {
Expand Down
Loading
Loading