-
Notifications
You must be signed in to change notification settings - Fork 15
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
Chore/ ynETH/ynEigen verify implementation and proxyadmins #176
Chore/ ynETH/ynEigen verify implementation and proxyadmins #176
Conversation
…issue in ynLSDe-1
@@ -16,7 +16,7 @@ | |||
"implementation-eigenStrategyManager": "0xE2343a850394ee1b1e33b16Da5bD73B076D6Fa81", | |||
"implementation-rateProvider": "0xAEDC83F607126b4D2437F79285e2C635685BBA01", | |||
"implementation-tokenStakingNodesManager": "0x17e77F964538fed3ADEc3E8dBB6147dA258206Da", | |||
"implementation-ynEigenDepositAdapter": "0x5F8c55A5A33d63CAa231c668a62f69AA862020E9", | |||
"implementation-ynEigenDepositAdapter": "0xA9CD5a5199177b704287e379e85af95F0f061Bf2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implementation was not updated properly in the json file post hotfix
@@ -17,15 +17,18 @@ | |||
"implementation-rewardsDistributor": "0x306EBed66642867B94b29752be37b8f20fEb5F72", | |||
"implementation-stakingNodesManager": "0xaBD3A755E4eEF24f862c268D21Fd5235904cc811", | |||
"implementation-ynETH": "0x14DC3d915107DcA9ed39E29E14fbdfe4358a1346", | |||
"implementation-ynViewer": "0x0365a6eF790e05EEe386B57326e5Ceaf5B10899e", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in ynViewer which was missing
@@ -11,20 +11,32 @@ | |||
"STAKING_NODES_OPERATOR": "0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39", | |||
"STAKING_NODE_CREATOR": "0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39", | |||
"VALIDATOR_MANAGER": "0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39", | |||
"implementation-StakingNodesManager": "0x104f0c5156BC0D9Cbda3f30d1B74F42b5610A2dF", | |||
"implementation-ynETH": "0x0E60A5db38c545ced3d3480B6768811cc603649A", | |||
"implementation-stakingNodesManager": "0xC9cf6740282617f3B392f900De0449E687Ce05e3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was outdated post M3 upgrade
"implementation-StakingNodesManager": "0x104f0c5156BC0D9Cbda3f30d1B74F42b5610A2dF", | ||
"implementation-ynETH": "0x0E60A5db38c545ced3d3480B6768811cc603649A", | ||
"implementation-stakingNodesManager": "0xC9cf6740282617f3B392f900De0449E687Ce05e3", | ||
"implementation-ynETH": "0x090D67d3C97712f6C17a037515CbB8502561EE57", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was outdated post M3 upgrade
"implementation-executionLayerReceiver": "0x1fbedf3773418f20b9dfeafcd9d263030eb0e42f", | ||
"implementation-consensusLayerReceiver": "0xe7acc0533c650ad0cc11f57f81c38fa19634b1d7", | ||
"implementation-RewardsDistributor": "0xb6ec4d9f71e437c672147c576f1c70ba5da8d159", | ||
"implementation-rewardsDistributor": "0xb6ec4d9f71e437c672147c576f1c70ba5da8d159", | ||
"implementation-withdrawalsProcessor": "0x36a38AA91947DbE6539e19512E6FF26576015Bb2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add in the missing withdrawals extra contracts + ynViewer
@@ -64,7 +71,12 @@ contract ActorAddresses { | |||
// TODO: replace with concrete deployment | |||
YNStrategyController: 0x1234567890123456789012345678901234567890, | |||
// TODO: replace with concrete deployment | |||
YNTokenStakingNodeOperator: 0x2234567890123456789012345678901234567890 | |||
YNTokenStakingNodeOperator: 0x2234567890123456789012345678901234567890, | |||
ynETHWithdrawalsWallets: YnETHWithdrawalsWallets({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add in freshly created multisigs to handle withdrawals on Holesky
|
||
// TODO: MUST fill for prod. same as YnDev for now | ||
ynETHWithdrawalsWallets: YnETHWithdrawalsWallets({ | ||
YNStakingNodesWithdrawer: 0xa08F39d30dc865CC11a49b6e5cBd27630D6141C3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have YnDEV for now until set to newly minted multisigs
abstract contract BaseScript is Script, Utils { | ||
using stdJson for string; | ||
|
||
struct ProxyAddresses { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load up all data from JSON file into this struct.
This way you can assert that the JSON matches the on-chain for the trinity:
Proxy - ProxyAdmin - Implementation
deployment.ynViewer = ynViewer(payable(jsonContent.readAddress(".proxy-ynViewer"))); | ||
proxies.ynViewer = loadProxyAddresses(jsonContent, "ynViewer"); | ||
|
||
if (block.chainid == 17000) { // Holesky chain ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing to parse until we deploy those for mainnet.
@@ -0,0 +1,717 @@ | |||
/// SPDX-License-Identifier: BSD 3-Clause License | |||
pragma solidity ^0.8.24; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the verify ynETH is now heavily enhanced to check:
Proxy - ProxyAdmin - Implementation Trinity matches the JSON with what's on-chain.
All the deps and fields of withdrawals are asserted currently just for holesky, to be enabled easily for mainnet.
A suite of sanity checks check supply, total assets and that other sums are consistent.
console.log(string.concat("\u2705 ", contractName, ": Implementation address - ", vm.toString(implementationAddress))); | ||
} | ||
|
||
function verifyProxies() internal view { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the trinity
Proxy - ProxyAdmin - Implementation
for ynEigen as well
| Contract Name | Contract Address | | ||
|----------------------------|-------------------------------------------| | ||
| ynETH Proxy | [`0x09db87A538BD693E9d08544577d5cCfAA6373A48`](https://etherscan.io/address/0x09db87A538BD693E9d08544577d5cCfAA6373A48) | | ||
| StakingNodesManager Proxy | [`0x8C33A1d6d062dB7b51f79702355771d44359cD7d`](https://etherscan.io/address/0x8C33A1d6d062dB7b51f79702355771d44359cD7d) | | ||
| RewardsDistributor Proxy | [`0x40d5FF3E218f54f4982661a0464a298Cf6652351`](https://etherscan.io/address/0x40d5FF3E218f54f4982661a0464a298Cf6652351) | | ||
| ExecutionLayerReceiver Proxy | [`0x1D6b2a11FFEa5F9a8Ed85A02581910b3d695C12b`](https://etherscan.io/address/0x1D6b2a11FFEa5F9a8Ed85A02581910b3d695C12b) | | ||
| ConsensusLayerReceiver Proxy | [`0xE439fe4563F7666FCd7405BEC24aE7B0d226536e`](https://etherscan.io/address/0xE439fe4563F7666FCd7405BEC24aE7B0d226536e) | | ||
|
||
### Implementations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep only proxies here to not confuse people
Happened numerous times they'd copy paste the implementation instead of the proxy address.
Add assertions to ensure the json deployment contracts never go out of sync, and the verify scripts always cross check all entries.
The focus is to see given the Proxy address, do the ProxyAdmin and implementation of said proxy match what's stored in the json.
Additionally checks are added for all withdrawals contracts.
Consolidates:
all deployed contracts into the single ynETH-1.json and ynETH-17000.json:
delete deployments/ynETHWithdrawals-17000.json
delete deployments/ynETHWithdrawalsProcessor-17000.json
And add the contents to ynETH-17000.json
add the missing ynViewer which acts as a rate provider to ynETH-1.json and ynETH-17000.json
The following all pass:
make ynEigen-verify path=script/ynEigen/input/lsd-mainnet.json rpc="https://black-young-pool.quiknode.pro/[mykey]"
make ynEigen-verify path=script/ynEigen/input/lsd-holesky.json rpc="https://rpc.ankr.com/eth_holesky"
forge script script/ynETH/VerifyYnETH.s.sol --rpc-url https://rpc.ankr.com/eth_holesky
forge script script/ynETH/VerifyYnETH.s.sol --rpc-url https://black-young-pool.quiknode.pro/[mykey]