-
Notifications
You must be signed in to change notification settings - Fork 84
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
[DO NOT MERGE] Slashing Release Branch Internal Security Review #331
Draft
nadir-akhtar
wants to merge
65
commits into
mainnet
Choose a base branch
from
feat/slashing-release-branch
base: mainnet
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
c29cf07
feat: automated ejector (#146)
0x0aa0 f224cf9
chore: bump forge-std and remove ds-test dependency (#227)
stevennevins 6454c05
feat: allowlist mapping (#226)
0x0aa0 0328639
feat: return ops ejected (#228)
0x0aa0 59ebd32
Use uint32 for number of ejected operators (#232)
jianoaix e18c19e
feat: service manager payments (#242)
8sunyuan 2b65511
fix: spacing (#244)
8sunyuan deebd4b
chore: rename audit report for clarity and consistency with core (#245)
wadealexc 1feb6ae
feat: batch operator id conversions (#248)
0x0aa0 1703d25
fix: vm assume too many rejections (#247)
stevennevins 74c86d2
feat: reregistration delay (#246)
0x0aa0 9968b1d
feat: ecdsa service manager (#234)
stevennevins 8ed82a4
fix: add init function for staleStakesForbidden in BLSSignatureChecke…
stevennevins 4ad5c85
feat: update core contracts submodule (#254)
8sunyuan c5b419a
fix: multiple rangepayments with same token (#257)
8sunyuan a23de11
test: fix flaky fuzz tests hitting the default operator who is alread…
stevennevins 0351419
chore: update license (#259)
ChaoticWalrus afbcba8
feat: ecdsa key rotation (#252)
stevennevins 1142437
fix: storage gap (#261)
stevennevins a7b1851
feat: `paymentInitiator` role in `ServiceManagerBase` (#260)
diyahir 51e36f1
chore: refactor with RewardsCoordinator (#262)
8sunyuan c75eb8e
chore: rewards release submodule (#264)
8sunyuan b45dced
fix: deprecated struct field for earning receiver (#265)
stevennevins da5cf42
perf: refactor to modifers to use internal functions (#272)
stevennevins 9f92f72
perf: refactor index registry to use internal functions for modifier …
stevennevins b1f706b
perf: refactor apk modifiers to use internal functions (#268)
stevennevins 89cbd3c
perf: refactor modifiers to use internal functions for stake registry…
stevennevins dc5385e
fix: storage layout (#275)
0x0aa0 b816138
feat: reward initiator for ECDSAServiceManagerBase (#274)
Gajesh2007 d643f3b
fix: comment typos in IServiceManagerUI (#278)
samlaf c00aad7
fix: correct index get operator restakable strategies (#280)
stevennevins 3b96caf
chore: update dev to eigenlayer contracts dev (#282)
shrimalmadhur 163f4c3
chore: upgrade core to target operator set release
stevennevins 17b1f44
fix: overflow (#290)
0x0aa0 ad64a45
Merge branch 'dev' into feat/operate-set-release-branch
stevennevins b7f4903
chore: update mock contracts with latest interfaces (#293)
shrimalmadhur d991827
chore: bump to latest operator set release commits
stevennevins 4966813
chore: fixes for depedency bump
stevennevins 4fabf80
feat: operator set migration-1-migration (#286)
stevennevins fe93ac6
feat: operator set migration-2-create quorum (#287)
stevennevins a9c1aa7
feat: mainnet rewards release tag (#297)
8sunyuan e5b2688
chore: bump operator set release dependency in core
stevennevins ec2fdf3
chore: updates from dependency bump
stevennevins 12eda5d
feat: add natspec
stevennevins 788cd09
docs: add natspec
stevennevins d64f4af
feat: add checks operator was registered for quorums when migrating
stevennevins a92d51a
fix: resolve code size issue in RegistryCoordinator
stevennevins 74438b7
build: update core submodule to new release (#298)
8sunyuan 32148de
chore: update to latest core (#299)
shrimalmadhur cb2b334
add overrides (#302)
gpsanant 86f0928
feat(op sets): update stakes when forceUnregister (#300)
stevennevins 3e4cb2b
merge dev
stevennevins f6ad20e
feat(op sets): register and deregister (#301)
stevennevins e0a79f1
feat(op sets): upgrade and migrate script (#303)
stevennevins eb0d6ad
chore: bump slashing core dependency (#312)
stevennevins cb4df12
feat: slasher templates / examples (#310)
stevennevins 145bdaf
chore: remove unused test util contracts (#319)
stevennevins 9a975df
feat: remove both option
stevennevins fa04f06
fix: storage gap remove one slot (#320)
stevennevins 388e9f9
feat: track total slashable stake and total delegated stake per quoru…
stevennevins 158a890
fix: use libraries with only internal vis (#324)
stevennevins 817ad42
feat: avs registrar registration flow changes (#318)
stevennevins dbd59dd
feat: registration changes part 2
stevennevins 6fd466e
chore: bump dependency for slashing mags updates (#329)
stevennevins f9ce2fc
Merge branch 'mainnet' into feat/slashing-release-branch
nadir-akhtar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ds-test
deleted from
e28215
Submodule eigenlayer-contracts
updated
428 files
Submodule forge-std
updated
32 files
+1 −0 | .gitattributes | |
+0 −3 | .gitmodules | |
+1 −1 | README.md | |
+1 −1 | foundry.toml | |
+0 −1 | lib/ds-test | |
+1 −1 | package.json | |
+635 −0 | scripts/vm.py | |
+518 −225 | src/StdAssertions.sol | |
+19 −5 | src/StdChains.sol | |
+2 −2 | src/StdCheats.sol | |
+7 −11 | src/StdJson.sol | |
+201 −106 | src/StdStorage.sol | |
+179 −0 | src/StdToml.sol | |
+61 −33 | src/StdUtils.sol | |
+4 −4 | src/Test.sol | |
+1,357 −462 | src/Vm.sol | |
+234 −0 | src/mocks/MockERC20.sol | |
+235 −0 | src/mocks/MockERC721.sol | |
+39 −909 | test/StdAssertions.t.sol | |
+31 −30 | test/StdChains.t.sol | |
+19 −11 | test/StdCheats.t.sol | |
+3 −1 | test/StdError.t.sol | |
+49 −0 | test/StdJson.t.sol | |
+8 −8 | test/StdMath.t.sol | |
+159 −11 | test/StdStorage.t.sol | |
+49 −0 | test/StdToml.t.sol | |
+20 −20 | test/StdUtils.t.sol | |
+3 −3 | test/Vm.t.sol | |
+8 −0 | test/fixtures/test.json | |
+6 −0 | test/fixtures/test.toml | |
+441 −0 | test/mocks/MockERC20.t.sol | |
+721 −0 | test/mocks/MockERC721.t.sol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
// Deploy L2AVS proxy | ||
|
||
import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; | ||
import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; | ||
|
||
import {Vm} from "forge-std/Vm.sol"; | ||
import {stdJson} from "forge-std/StdJson.sol"; | ||
|
||
library OperatorSetUpgradeLib { | ||
using stdJson for string; | ||
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); | ||
bytes32 internal constant IMPLEMENTATION_SLOT = | ||
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; | ||
|
||
bytes32 internal constant ADMIN_SLOT = | ||
0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; | ||
|
||
|
||
function upgrade(address proxy, address implementation, bytes memory data) internal { | ||
ProxyAdmin admin = ProxyAdmin(getAdmin(proxy)); | ||
admin.upgradeAndCall(TransparentUpgradeableProxy(payable(proxy)), implementation, data); | ||
} | ||
|
||
function upgrade(address proxy, address implementation) internal { | ||
ProxyAdmin admin = ProxyAdmin(getAdmin(proxy)); | ||
admin.upgrade(TransparentUpgradeableProxy(payable(proxy)), implementation); | ||
} | ||
|
||
function getAdmin(address proxy) internal view returns (address){ | ||
bytes32 value = vm.load(proxy, ADMIN_SLOT); | ||
return address(uint160(uint256(value))); | ||
} | ||
|
||
function getImplementation(address proxy) internal view returns (address) { | ||
bytes32 value = vm.load(proxy, IMPLEMENTATION_SLOT); | ||
return address(uint160(uint256(value))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"addresses":{ | ||
"avsDirectory": "0x141d6995556135D4997b2ff72EB443Be300353bC", | ||
"avsDirectoryImplementation": "0x357978adC03375BD6a3605DE055fABb84695d79A", | ||
"baseStrategyImplementation": "0x62450517EfA1CE60d79801daf8f95973865e8D40", | ||
"beaconOracle": "0x4C116BB629bff7A8373c2378bBd919f8349B8f25", | ||
"delayedWithdrawalRouter": "0xC4BC46a87A67a531eCF7f74338E1FA79533334Fa", | ||
"delayedWithdrawalRouterImplementation": "0x0011FA2c512063C495f77296Af8d195F33A8Dd38", | ||
"delegationManager": "0x75dfE5B44C2E530568001400D3f704bC8AE350CC", | ||
"delegationManagerImplementation": "0x56E88cb4f0136fC27D95499dE4BE2acf47946Fa1", | ||
"eigenLayerPauserReg": "0x9Ab2FEAf0465f0eD51Fc2b663eF228B418c9Dad1", | ||
"eigenLayerProxyAdmin": "0x1BEF05C7303d44e0E2FCD2A19d993eDEd4c51b5B", | ||
"eigenPodBeacon": "0x92Cc4a800A1513E85C481dDDf3A06C6921211eaC", | ||
"eigenPodImplementation": "0x2D6c7f9862BD80Cf0d9d93FC6b513D69E7Db7869", | ||
"eigenPodManager": "0xB8d8952f572e67B11e43bC21250967772fa883Ff", | ||
"eigenPodManagerImplementation": "0xc5B857A92245f64e9D90cCc5b096Db82eB77eB5c", | ||
"emptyContract": "0x9690d52B1Ce155DB2ec5eCbF5a262ccCc7B3A6D2", | ||
"rewardsCoordinator": "0xb22Ef643e1E067c994019A4C19e403253C05c2B0", | ||
"rewardsCoordinatorImplementation": "0x76d4D84c90a2AFf213F7D859d2a288685A1a2Ede", | ||
"slasher": "0x12699471dF8dca329C76D72823B1b79d55709384", | ||
"slasherImplementation": "0x9460fCe11E1e0365419fa860599903B4E5097cf0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"addresses":{ | ||
"blsApkRegistry": "0xAd7f9e558170a149Ca8E90f41Ab2444A5d3bd6aD", | ||
"blsApkRegistryImplementation": "0x482a96D5879e32347d8df125f038D7eC8Ab358dd", | ||
"eigenDAProxyAdmin": "0x9Fd7E279f5bD692Dc04792151E14Ad814FC60eC1", | ||
"eigenDAServiceManager": "0x54A03db2784E3D0aCC08344D05385d0b62d4F432", | ||
"eigenDAServiceManagerImplementation": "0xEB11a0f320E39d3371Fec4Bf5C76944DfBA8ee10", | ||
"indexRegistry": "0x8cE5F2a53cBd29710eb94A04e40C07A4DdF15d10", | ||
"indexRegistryImplementation": "0x1D4d6054BD11A5711ad7c5d3E376C987a603e17C", | ||
"mockRollup": "0x0433646AdCeE95fbF89b3BFDb8157e75c19b6C2e", | ||
"operatorStateRetriever": "0x17cA8C41a59466710443143b2ECF08CaA35d80ad", | ||
"registryCoordinator": "0x2c61EA360D6500b58E7f481541A36B443Bc858c6", | ||
"registryCoordinatorImplementation": "0x6f21A84E7f185cCBA248B436e3b583E609d1dE1D", | ||
"serviceManagerRouter": "0xDb028E067fe81e9f406C2DE382Ba82e9cD7cBD03", | ||
"stakeRegistry": "0x53668EBf2e28180e38B122c641BC51Ca81088871", | ||
"stakeRegistryImplementation": "0x854dc9e5d011B060bf77B1a492302C349f2f00b5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.27; | ||
|
||
import {IAVSRegistrar} from "eigenlayer-contracts/src/contracts/interfaces/IAVSRegistrar.sol"; | ||
import {IRegistryCoordinator} from "./interfaces/IRegistryCoordinator.sol"; | ||
import {IBLSApkRegistry} from "./interfaces/IBLSApkRegistry.sol"; | ||
import {IStakeRegistry} from "./interfaces/IStakeRegistry.sol"; | ||
import {IIndexRegistry} from "./interfaces/IIndexRegistry.sol"; | ||
|
||
abstract contract AVSRegistrar is IAVSRegistrar { | ||
function registerOperator( | ||
address operator, | ||
uint32[] calldata operatorSetIds, | ||
bytes calldata data | ||
) external virtual; | ||
|
||
function deregisterOperator( | ||
address operator, | ||
uint32[] calldata operatorSetIds | ||
) external virtual; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Curious why we instantiate this abstract contract even though it adds no new functions and implements none either