-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feat/slashing yn eth #220
base: bn-build-fix
Are you sure you want to change the base?
Feat/slashing yn eth #220
Conversation
On Holesky Failing tests: Encountered 1 failing test in test/scenarios/fork/ynETH/ProtocolUpgrade-Scenario.spec.sol:ProtocolUpgradeScenario Encountered 1 failing test in test/scenarios/fork/ynETH/Withdrawals.t.sol:M3WithdrawalsTest Encountered 1 failing test in test/scenarios/fork/ynETH/WithdrawalsWithRewards-Scenario.t.sol:M3WithdrawalsWithRewardsTest Encountered 2 failing tests in test/scenarios/ynEIGEN/Delegation.t.sol:YnEigenDelegationScenarioTest |
src/StakingNode.sol
Outdated
*/ | ||
mapping(bytes32 withdrawalRoot => uint256 withdrawableShares) public withdrawableSharesForWithdrawalRoot; | ||
|
||
/** @dev Allows only a whitelisted address to configure the contract */ |
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.
Why was the comment formatted into a one liner?
src/StakingNode.sol
Outdated
*/ | ||
function syncQueuedShares() external onlyDelegator { | ||
|
||
IDelegationManager delegationManager = IDelegationManager(address(stakingNodesManager.delegationManager())); |
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.
IDelegationManager delegationManager = IDelegationManager(address(stakingNodesManager.delegationManager())); | |
IDelegationManager delegationManager = stakingNodesManager.delegationManager(); |
Casting seems unnecessary.
The |
// SPDX-License-Identifier: BSD 3-Clause License | ||
pragma solidity ^0.8.24; | ||
|
||
contract MockAVS { |
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.
You can also use lib/eigenlayer-contracts/src/test/mocks/MockAVSRegistrar.sol which is the one used by eigen to mock an avs
test/integration/StakingNode.t.sol
Outdated
|
||
|
||
|
||
uint256 depositAmount = 32 ether; |
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.
Format
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.
done
src/StakingNode.sol
Outdated
delegatedTo = stakingNodesManager.delegationManager().delegatedTo(address(this)); | ||
} | ||
|
||
function initializeV4() external onlyStakingNodesManager reinitializer(4) { |
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.
If it is not already initialized in holesky, this could be done in the initializeV3
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.
updated
bytes32 withdrawalRoot = delegationManager.calculateWithdrawalRoot(withdrawal); | ||
uint256 withdrawableSharesForWithdrawalRootValue = withdrawableSharesForWithdrawalRoot[withdrawalRoot]; | ||
|
||
if (withdrawableSharesForWithdrawalRootValue != 0) { |
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.
withdrawableSharesForWithdrawalRootValue
could be 0 after an operator was fully slashed.
I don't know what happens with withdrawals that are fully slashed. (If they revert on Eigen or not).
But if they don't revert and this goes through the else condition. It might have accounting issues as queuedShares is decreased by scaledShares when it should be 0.
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.
updated code by considering queuedShares and legacyQueuedShares as separate entity and not mixing accounting
No description provided.