Skip to content
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(linting): add commit linter #296

Merged
merged 8 commits into from
Nov 7, 2023
Merged

Conversation

stevennevins
Copy link
Contributor

@stevennevins stevennevins commented Oct 26, 2023

I'll repost this in Slack, but the steps to have this automatically work in your local environment are as follows:

npm install

npx husky install 

npx husky add .husky/commit-msg  'npx --no -- commitlint --edit ${1}'

When you git commit -m "some message," husky will run as a hook on your commit message and validate that it is the appropriate format. Additionally, it will run in the CI and verify that all commit messages in a PR and a single push are valid.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Contributor

@ChaoticWalrus ChaoticWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; we'll see if I regret the decision after this yells at me for commits 🙃
Noted a couple minor things in the documentation to address before merging.

@stevennevins stevennevins merged commit 4f2018c into master Nov 7, 2023
33 of 34 checks passed
@stevennevins stevennevins deleted the feat/commit-linting branch November 7, 2023 19:52
ChaoticWalrus added a commit that referenced this pull request Apr 5, 2024
* final

* fixed yml

* init

* add event

* Update EPmgr docs with final missing functions, and update README to reflect withdrawal queue refactor!

* pushn

* added new storage

* changed name

* added logic

* fixed storage gap

* changed variable name

* changed variable name

* Update docs with latest EigenPod change

* add validation; pending storage gap checks

* fixed most tests

* fixed

* added multiple queuedwithdrawals function

* made update outside of loop

* add gap support; reorganize storage representation

* fix syntax highlighting

* fixed all tests

* remove stale comments

* fixed

* fixed tests

* init

* dedupe EigenPod and Withdrawals

* add README for storage validation script

* fix README formatting

* fixed

* removed bls pubkeycompendium deployment from m2 deployment script

* fix layouts for EPM and SM

* event fix (#272)

* made some corrections

* done

* added underflow handling

* cleaned up all warnings

* Remove Middleware from Core (#260)

* remove middleware from core

* remove go files from ffi

* use stub

* delete Prover rules for `BLSRegistryCoordinatorWithIndices` (#261)

these are getting migrated to a separate repo

* add weird fix

* move stub to mocks

* remove additional interfaces from imports

* port over alexs interface change

* add back whitelister

* add back script per PR comment

---------

Co-authored-by: steven <[email protected]>
Co-authored-by: ChaoticWalrus <[email protected]>

* split the tests again

* Revert "split the tests again"

This reverts commit bf48e9d.

* skeleton refactor

* init

* Update DelegationManager.md

* Update EigenPod.md

* Update BeaconChainProofs.md

* all tests working

* cleanup

* init

* require cannot q withdrawal for 0 strategies and update docs

* copilot crazy grammar

* finished EPM unit tests

* fix tree diagram typos

* fix _checkPodDeployed function

* split max pod revert tests

* fuzz removeShares tests

* update initializePodWithShares to not use stdStorage

* added reg test

* add error messages on asserts

* tidy up

* chore: have DelegationManager use stub interface instead of full interface

Should help to resolve some of the import hell that we are experiencing.

* initial cleanup of SM tests, added deployments to UnitTestSetup file

* Using `EigenLayerUnitTestSetup` for deployment

* remove middleware interfaces from this repo

this commit also removes a ton of detritus from existing tests, which appears to have functionally been doing absolutely nothing.

* init

* change 31 to 32

* all tests working

* close out tests

* cleanup

* fixed balance update code

* rectified test

* removed test import

* fixed

* removed other references to hysterisis

* Separate into base and setup deploy contracts

* made updates consistent

* renamed function test names, removed unused variables

* Update DelegationManager.md

* chore: remove never-used storage at end of storage layout and increase __gap size to compensate

This storage is at the end of the used slots in the storage layout, and was never used either on testnet or mainnet. Therefore, it should be able to be safety deleted without consequence.
This commit also increases the size of the __gap variable to compensate for the removed storage.

* Update EigenPod.md

* clarified as effective not actual balance

* removed inline comment

* chore: fix compiler warnings

This commit addresses a compiler warning in the DelegationManager contract, and fixes compiler warnings in various test files.
These warnings were all ultimately due to unused variables.
I've also added some comments to the EigenPod.t.sol file about the strange address-collision-reversion behavior that we're currently working around (since the workaround was related to an 'unused' variable).

* changed proof gen repo commands

* made the changes to createPod()

* EigenPodManager Unit Test Refactor (#290)

* skeleton refactor

* finished EPM unit tests

* fix tree diagram typos

* fix _checkPodDeployed function

* split max pod revert tests

* fuzz removeShares tests

* update initializePodWithShares to not use stdStorage

* add error messages on asserts

* fix tree file name

* add share adjustment tests

* create temp file for pod and pod manager unit tests

* remove unused constant in EPM unit test

* added fuzzing)

* fixed

* fixed

* fixed tests

* chore: fix compilation error

a forbidden implicit type conversion slipped in, which was causing build errors. this minimal commit fixes the issue.

* reording the indexes in-order, added a few extra comments

* commenting

* remove reeneterer from utils setUp()

* remove strategy deployments in the setUp() helper

* init

* all tests working

* cleanup

* tidy up

* added the previous PR changes to new branch

* added new expectEmit checks

* changes

* CI err fix

* chore: filter fuzzed inputs to fix 3 flaky test failures (#306)

* chore: filter fuzzed inputs to fix 2 flaky test failures

1) failure in a test that appears to be due to the fuzzed 'withdrawer' matching a Strategy's address -- see run here https://github.com/Layr-Labs/eigenlayer-contracts/actions/runs/6672856290/job/18137522930#step:5:46
2) failure in a test when the fuzzed 'staker' address matches a fixed operator address which we are using (the reverting behavior is intended in this case)

* fix one more flaky test failure with fuzzed input filtering

this test fails (appropriately) when the `notUnpauser` input is fuzzed to the ProxyAdmin address

* Fixed import errors and updated `setUp()`

* Removed strategies from utils helper setup

* Removed Utils.sol as its only functions is only used in StrategyManagerUnit.t.sol

* formatting

* Chore/fix flaky test failures (#308)

* chore: filter fuzzed inputs to fix 2 flaky test failures

1) failure in a test that appears to be due to the fuzzed 'withdrawer' matching a Strategy's address -- see run here https://github.com/Layr-Labs/eigenlayer-contracts/actions/runs/6672856290/job/18137522930#step:5:46
2) failure in a test when the fuzzed 'staker' address matches a fixed operator address which we are using (the reverting behavior is intended in this case)

* fix one more flaky test failure with fuzzed input filtering

this test fails (appropriately) when the `notUnpauser` input is fuzzed to the ProxyAdmin address

* fix one more flaky test failure

this failed in the following run: https://github.com/Layr-Labs/eigenlayer-contracts/actions/runs/6697166090/job/18196461283#step:5:116
I dug into it and this was ultimately because the fuzzed `staker` param matched the ProxyAdmin address

* init

* Added tree file

* Update README.md

* Update README.md

* Update README.md

* Updated tree file to match code paths rather than test cases

* tree branches for add/remove strategies

* cleanup and typo

* removed unused internal functions

* check `_isDepositedStrategy()` after removing shares from all strats

* chore: turn require statements into assertEq(), assertTrue(), assertFalse()

* chore: changed startPrank() -> prank() where reasonable

Sometimes having a wrapping startPrank() and stopPrank() code segment is useful to easily recognize which address is being pranked for those calls, especially when we prank again afterwards. That said, certain tests with single function calls could be cleaner with simply `prank()`

* fix: missed stopPrank() to delete

* chore: specific revert messages

* chore: removed event checks, additional tests, rename variable

Removed some of the StrategyAddedToDepositWhitelist event checks in the tests to cleanup. Added additional unit tests for addStrategiesToDepositWhitelist including adding already existing whitelisted strategies and ensuring events aren't emitted there.

* fix: removed unneeded eigenpod doc, it's entirely captured already by EigenPodManager.md

* remove balance update proof functionality

* chore: github compatability and tree branching convention

* add comment explaining validator fields proof for balance update

* chore: remove bytes casing

* test: check storage variables after intialize()

* fix: tree file, nonce doesn't increment for depositIntoStrategy()

* Filter addresses for EPM and EP fuzz tests (#312)

* Filter proxy admin address for EPM fuzz tests

* filter zero address on EP unit tests

* comment out failing tests; compiling

* added proofs

* test: additional coverage andfilterFuzzInput modifier

Tests added:
- initialize() storage variables properly
- depositIntoStrategyWithSignature() revert when token transfer fails
- removeShares() reverts with 0 shares
- removeShares() with removeAmount less than deposit
- addShares() with MAX_STAKER_STRATEGY_LIST_LENGTH strategies
- removeStrategiesFromDepositWhitelist() doesn't emit event on non-whitelisted strategy
- removeStrategiesFromDepositWhitelist() emits event on removing whitelisted strategy
Also added some small commenting, renamed tests, and updated tree file

* update EigenPod unit and integration tests

* update docs to reflect balance update refactor

* remove unused functions from ProofParsing test util

* changes

* bug fix

* eigenpod test file changes

* changes

* removed extra func

* chore: migrate BitmapUtils and BN254 to middleware

* chore: add correct M2 Goerli deployment info (#320)

* feat(linting): add commit linter (#296)

* ci(linting): apply linting to CI and update docs for it

* chore: remove git-patch for applying these changes

* fix: typo and mistake in git url

* ci: force fail fast to be false

* ci: remove fail fast behavior

* ci: move fail-fast option

---------

Co-authored-by: steven <[email protected]>

* EigenPod Unit Test Refactor (#317)

* chore: delete unused files (#321)

minor cleanup of some unused files; should help to clarify things a bit

* Docs: Note edge case for not completing a queued withdrawal for EigenPod (#324)

* fix: remove redudant command (#322)

Co-authored-by: steven <[email protected]>

* chore: fix broken links and clean up readme (#326)

* chore: use a fixed prover version (#327)

Certora will be introducing v5 soon, which is expected to include breaking changes.
Fixing the version at v4.13.1 should allow continuity until we make changes to upgrade.

* chore: update DelegationManager docs to reflect plural queueWithdrawals function (#330)

* chore: switch implementation addresses in README table to M2 versions (#328)

* chore: switch implementation addresses in README table to M2 versions

* chore: fix link/"preview" text for updated links

* chore: fix misplaced link text (oops!)

* chore: fix misplaced text for _another_ link

my bad, don't know how I made this mistake 2x

* test: create integration test framework (#335)

See `/integration/README.md` for details on how it works

---------

Co-authored-by: Yash Patil <[email protected]>

* feat: interface change for mw sigchecker

* init

* test: support native eth in integration tests (#340)

see PR for changelog

* eigenpod and eigenpodmanager integration tests (#347)

* base

* add base setup file

* readd refactored file

* pending withdrawal tests

* add withdrawal test scaffold

* push

* finish withdrawal tests; pending additional proof sizes

* remove old EigenPod unit test file; transfer integration tests to EP test file

* update tree file

* add tests for proofs <32 ETH

* remove unused files and test comments

* remove stale comment

* base setup

* add more base test cases

* fix: update setup file pod address

* buggy

* test: fix setup

* pause tests

* some changes

* test: add verify WC test

* test: add withdrawal tests

* nit changes

---------

Co-authored-by: Yash Patil <[email protected]>

* test: implement random withdrawal generator (#349)

see PR for changes/notes

* Test: DelegationManager unit tests refactor (#332)

* refactor: initial changes

- Commented out and moved 'integration-like' withdrawal tests to Delegation.t.sol
- import paths are absolute
- fixed solidity version
- Inheriting EigenLayerUnitTestSetup helper contract now (deploys mocks contracts, pauserRegistry, etc)

* test: initial tree file

* refactor: revert tree file back to # syntax while wip

* test: update setup file; add initialization + setter tests

* test: minor tree file updates

* test: adding to tree file

* test: fixed `mananger` typo

* test: add register operator cases

* test: add modify operator tests

* test: add share adjustment tests

* test: add undelegate unit tests

* test: update tree file for withdrawals

* test: delegateTo unit tests

* fix: error from changed internal helper

* test: delegateToBySignature unit tests

* fix: update tree file

* test: minor cleanup

* test: add pausing tests

* test: remove unused helper functions

* test: update all tests to use defaultOperator

* test: remove old tests and formatting

- formatted tree file
- formatted unit test file
- removed old tests that have been readded and refactored
- removed bytes casting for revert strings

test: remove getPods file

* fix: remove duplicated logic

- removed assumes out of internal helpers
- removed a lot of dup tree branching for readability
- small nit fixes

* fix: delegateToBySignature tree cleanup

---------

Co-authored-by: Yash Patil <[email protected]>

* test: update eigen pod unit tests with new balance update functionality

* feat: enable AVS update metadata uri (#354)

* feat:enable AVS update metadata uri

* test: add unit test

* test: fuzz staker address != delegationApprover (#360)

Failing fuzz test was result of fuzzed staker address being
the same address as delegationApprover address

* feat: add Certora Prover to m2-mainnet CI (#359)

* fix: update rpc on withdrawal migrationt tests (#362)

* Feat: Remove set withdrawal delay (#355)

* feat: remove setWithdrawalDelayBlocks()

removing ability to modify withdrawalDelayBlocks, will only be initialized once

* fix: fixed delegation.initialize() calls

- Added `initializedWithdrawalDelayBlocks` to initialize params
- Added regression test for initializing> MAX_WITHDRAWAL_DELAY_BLOCKS
- DelegationUnit.t.sol, small fix for internal function `_registerOperatorWith1271DelegationApprover`

* chore: emit WithdrawalDelayBlocksSet

* Integration Tests: Scenarios 2-3 (#350)

* test: support random balance updates in integration tests (#364)

- also adds user-level logging

* Fix: update balance update not pod caller revert test (#366)

* chore: repo cleanup (#365)

- update main and docs README
- update DelegationManager docs to remove method
- remove stake update pushes from DelegationManager
- deprecate stakeRegistry storage variable in DelegationManager
- turn Slasher into a Stub
- remove Slasher tests

* chore: migrate to certora prover v5 (#369)

- switch from fixed v4.13.1 to floating / latest version

- implement minimal changes that (hopefully) make existing specs work with v5

* chore: update README, docs, and prune old files (#371)

* chore: update README, docs, and prune old files

* fix: add integration test reference to README

* docs: fix withdrawal router comment

* feat: support avs<>operator mapping with new APIs (#363)

* feat: support avs<>operator mapping with new APIs and events

* feat: more formal verification for eigenpods (#368)

* add draft Prover rules + invariants for EigenPod contract

includes new spec, script, and harness files

* feat: add invariant for withdrawn validators having zero restaked balance

* chore: try to tune script to fix timeout errors

Prover runs for the EigenPod spec have been hitting timeouts (e.g. [here](https://prover.certora.com/output/83341/c0f1187dfb5f413caeea598ff85d82dd?anonymousKey=ee5301c2dbc2262a0d274d81ef2944c321faae0e))-- this commit is an attempt to fix these timeouts

* chore: relax script parameters to try to address Prover timeouts

see documentation (https://docs.certora.com/en/latest/docs/prover/cli/options.html) to understand these flags

* feat: add envfree functions and a couple draft rules to EPM spec

* chore: add a couple more 'envfree' functions to EigenPod spec

* feat: add draft for key invariant (commented out due to compiler failures)

see comments for more context on this.

also included are 2 new harnessed functions

* chore: remove `hashing_length_bound` in script

this should make rules non-vacuous; by using different summaries we can still solve timeouts

* chore: add a ton more summarization, and fix hook

deals with timeouts much more effectively, and the hook works now. the `baseInvariant` rule is still broken -- see comment in the axiom definition

* chore: add more dispatching and filter parametric contracts

* feat: new (draft) rule to capture more of EigenPods' accounting model

* fix: use correct summarization syntax

* feat: hack together solution for ignoring special case

the summarization of the `EigenPod. _sendETH()` function appears to still be broken

I've commented this out and the rule now passes (at least from running locally), but this is definitely suboptimal

am leaving several TODOs for now.

* add draft Prover rules + invariants for EigenPod contract

includes new spec, script, and harness files

* feat: add invariant for withdrawn validators having zero restaked balance

* chore: try to tune script to fix timeout errors

Prover runs for the EigenPod spec have been hitting timeouts (e.g. [here](https://prover.certora.com/output/83341/c0f1187dfb5f413caeea598ff85d82dd?anonymousKey=ee5301c2dbc2262a0d274d81ef2944c321faae0e))-- this commit is an attempt to fix these timeouts

* chore: relax script parameters to try to address Prover timeouts

see documentation (https://docs.certora.com/en/latest/docs/prover/cli/options.html) to understand these flags

* feat: add envfree functions and a couple draft rules to EPM spec

* chore: add a couple more 'envfree' functions to EigenPod spec

* feat: add draft for key invariant (commented out due to compiler failures)

see comments for more context on this.

also included are 2 new harnessed functions

* chore: remove `hashing_length_bound` in script

this should make rules non-vacuous; by using different summaries we can still solve timeouts

* chore: add a ton more summarization, and fix hook

deals with timeouts much more effectively, and the hook works now. the `baseInvariant` rule is still broken -- see comment in the axiom definition

* chore: add more dispatching and filter parametric contracts

* feat: new (draft) rule to capture more of EigenPods' accounting model

* fix: use correct summarization syntax

* feat: hack together solution for ignoring special case

the summarization of the `EigenPod. _sendETH()` function appears to still be broken

I've commented this out and the rule now passes (at least from running locally), but this is definitely suboptimal

am leaving several TODOs for now.

* chore: repo cleanup (#365)

- update main and docs README
- update DelegationManager docs to remove method
- remove stake update pushes from DelegationManager
- deprecate stakeRegistry storage variable in DelegationManager
- turn Slasher into a Stub
- remove Slasher tests

* chore: migrate to certora prover v5 (#369)

- switch from fixed v4.13.1 to floating / latest version

- implement minimal changes that (hopefully) make existing specs work with v5

* add draft Prover rules + invariants for EigenPod contract

includes new spec, script, and harness files

* feat: add invariant for withdrawn validators having zero restaked balance

* chore: try to tune script to fix timeout errors

Prover runs for the EigenPod spec have been hitting timeouts (e.g. [here](https://prover.certora.com/output/83341/c0f1187dfb5f413caeea598ff85d82dd?anonymousKey=ee5301c2dbc2262a0d274d81ef2944c321faae0e))-- this commit is an attempt to fix these timeouts

* chore: relax script parameters to try to address Prover timeouts

see documentation (https://docs.certora.com/en/latest/docs/prover/cli/options.html) to understand these flags

* feat: add envfree functions and a couple draft rules to EPM spec

* chore: add a couple more 'envfree' functions to EigenPod spec

* feat: add draft for key invariant (commented out due to compiler failures)

see comments for more context on this.

also included are 2 new harnessed functions

* chore: remove `hashing_length_bound` in script

this should make rules non-vacuous; by using different summaries we can still solve timeouts

* chore: add a ton more summarization, and fix hook

deals with timeouts much more effectively, and the hook works now. the `baseInvariant` rule is still broken -- see comment in the axiom definition

* chore: add more dispatching and filter parametric contracts

* feat: new (draft) rule to capture more of EigenPods' accounting model

* fix: use correct summarization syntax

* feat: hack together solution for ignoring special case

the summarization of the `EigenPod. _sendETH()` function appears to still be broken

I've commented this out and the rule now passes (at least from running locally), but this is definitely suboptimal

am leaving several TODOs for now.

* feat: add draft for key invariant (commented out due to compiler failures)

see comments for more context on this.

also included are 2 new harnessed functions

* chore: add a ton more summarization, and fix hook

deals with timeouts much more effectively, and the hook works now. the `baseInvariant` rule is still broken -- see comment in the axiom definition

* chore: add more dispatching and filter parametric contracts

* feat: new (draft) rule to capture more of EigenPods' accounting model

* chore: fix merge artifacts / regen deletion of unused code

---------

Co-authored-by: Alex <[email protected]>

* fix: update docs and ensure important state changing methods are pausable (#372)

* docs: update eigenpod docs and add new dmgr functions

* docs: update createPod function sig

* chore: ensure complete coverage of pausability

* Test: Add back missing withdrawal tests to DelegationUnit.t.sol (#370)

* test: revert tests

* test: withdrawal tests

* chore: rename helper

* fix: several typos in the docs (#356)

* fix typo EigenPodManager.md

* fix typo AVS-Guide.md

* fix typo DeployOpenEigenLayer.s.sol

* fix typo README.md

---------

Co-authored-by: ChaoticWalrus <[email protected]>

* remove munged (#373)

* fix: make Prover CI run correctly (#376)

* Documentation Fixes: Grammar, Typos, and Prepositions (#377)

* fix typo: Change 'now' to 'more' in EigenLayer middleware documentation link description

* fix missing preposition in documentation: change 'according the their' to 'according to their'

* fixed grammatical errors in documentation: Changed 'lets' to 'let's' and 'who's' to 'whose' in the example sentence about Merkle trees

* made forceUndelegate queue a withdrawal for each strategy (#345)

* changes

* added back comments

* chore: fix tests to work with modified behavior (#378)

* chore: fix tests to work with modified behavior

integration tests in particular are now slightly more flexible

* fix: remove memory overwrite

* docs: update dmgr docs

---------

Co-authored-by: wadealexc <[email protected]>

---------

Co-authored-by: ChaoticWalrus <[email protected]>
Co-authored-by: wadealexc <[email protected]>

* Fix m2 deploy from scratch script m2 mainnet (#379)

* remove slasher checks from M2_Deploy_From_Scratch as they are no longer valid for m2-mainnet release

* update anvil config file for M2_deploy_from_scratch script to work

* Test: Delegation Integration tests (#358)

* Fix: flaky integration tests (#384)

* docs: update deployment lists for new mainnet and testnet strats (#404)

* fixed comment

* fix: update links in outdated issue templates (#390)

* feat: add m2-mainnet-fixes to m2-mainnet (#409)

* Fix: Update registration documentation & type hash (#383)

* feat: strategy configs (#392)

* Fix: flaky integration tests (#384)

* feat: strat settings

* Fix: flaky integration tests (#384)

* feat: strat settings

* feat: withdrawalDelayBlocks per strategy

* fix: set deprecated storage to private

* fix: pr review changes

* fix: require string

* docs: updated

* refactor: rename creditTransfersDisabled

* fix: doc typos

* docs: add new methods and fix formatting

* fix: nits and getWithdrawals view

* docs: add link

---------

Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: wadealexc <[email protected]>

* fix: update forge CI to include contract size checks (#402)

* fix: add contract size check

* fix: ignore harness build size

* refactor: decouple AVS<>Operator mapping from DelegationManager (#403)

* refactor: initial draft

* fix: revert require chages

* fix: small nits

* fix: operator<>AVS mapping tests (#407)

* test: added back avsRegistration tests

* fix: fuzz runs 4096

* fix: broken fuzz test

* docs: add docs for AVSDirectory (#408)

* Feat: Add events for beacon chain balance updates & move deposit event

* script update (#412)

* fix: middleware script (#414)

* Deneb Mainnet Patch (#395)

* init commit

* updated testFullWithdrawalFlow to deneb spec

* added two proof paths

* added both capella and deneb testS

* added testFullWithdrawalFlowCapellaWithdrawalAgainstDenebRoot

* added event

* fixed storage gap

* uncommented testsg

* fix: remove line

* fixed tesst

* added a setter in the EPM for deneForkTimetamp

* tests still broken

* cleanup

* added modifier

* fixing tests

* tests working

* added tests

* comments

* fixed failing test

* fix flaky test

* removed modifier

---------

Co-authored-by: gpsanant <[email protected]>

* feat: simplify fork timestamp setting logic (#416)

* feat: simplify fork timestamp setting logic

* test: fix tests to account for only setting timestamp once

---------

Co-authored-by: wadealexc <[email protected]>

* Goerli implementation script (#413)

* Create GoerliUpgrade2.s.sol

* preprod deploy

* Update GV2_preprod_deployment_2024_30_1.json

* nit: comments

* avs directory already deployed

* preprod deploy

* chore: fix numerous compiler warnings from script + test files (#419)

warnings were for unused or shadowed variables, or functions that could have stricter mutability

* docs: fixed comment

* Revert "fixed comment"

This reverts commit c3d7bff.

* Fixed comments (#422)

* fix: fixed comment

* fix: removed dead space

* fix: removed extraneous the

* fix: edited another comment

* feat: view func for avssync (#423)

* fix: failing certora-ci (#410)

* fix: try installing solc-select

* fix: addShares selector

* fix: add staker address to DEPOSIT typehash (#424)

This provides additional signature replay protection
for the `StrategyManager.depositIntoStrategyWithSignature` method

Specifically, it addresses the issue outlined in
https://mirror.xyz/curiousapple.eth/pFqAdW2LiJ-6S4sg_u1z08k4vK6BCJ33LcyXpnNb8yU
where some ERC1271 wallets might be vulnerable to "replays" of signatures

While the theoretical "damage" would be ~zero
(allowing someone to deposit and credit the deposit to a user),
adding this field to the typehash seems to be best practice, at least.

* Testnet Deploy (#425)

* fix: updated beacon chain proof docs and correct error message (#427)

* fix: updated doc

* fix: changed more incorrect references fo verifyBalanceUpdates

* fix: changed more incorrect references fo verifyBalanceUpdates

* fix: fixed image

* fix: fixed incorrect comment

* docs: fix formatting

---------

Co-authored-by: wadealexc <[email protected]>

* feat: slight refactor to make better use of strategybase hooks (#428)

* feat: slight refactor to make better use of strategybase hooks

* docs: add clarifying comment

* test: unit tests for strat config (#426)

* fix: use correct license (#431)

this should be MIT licensed; looks like this was missed

* docs: update README to point to deployment info (#432)

* fix: include missing field from TYPEHASH calculation (#435)

`delegationApprover` was missing from the `DELEGATION_APPROVAL_TYPEHASH` definition

* fix: disable initializers in constructor (#436)

* chore: beacon proof constants cleanup (#437)

* fix: removed misc constants

* feat: prevent queuing withdrawals to other addresses (#438)

* fix: add back setMinWithdrawalDelayBlocks (#439)

* fix:add back withdrawal delay

* docs: update docs with new function

---------

Co-authored-by: wadealexc <[email protected]>

* feat: cancel AVS registration salt  (#434)

* feat: cancel salt

* fix: require that salt cannot be cancelled twice

---------

Co-authored-by: wadealexc <[email protected]>

* test: fix borked test after rebase

---------

Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: Michael Sun <[email protected]>
Co-authored-by: quaq <[email protected]>
Co-authored-by: kachapah <[email protected]>
Co-authored-by: gpsanant <[email protected]>
Co-authored-by: ChaoticWalrus <[email protected]>
Co-authored-by: SiddyJ <[email protected]>

* docs: add common user flows to docs (#445)

* updated m2_deploy_from_scratch to use avsDirectory (#449)

* test: fix flaky delegation approver test (#450)

* chore: update license (#451)

- clarify wording about change dates

- rename the "licensed work" for greater specificity

* chore: Cleanup script/ directory (#454)

* chore: spring cleaning

* fix: test deployment path

* chore: revert back to  relative paths

* docs: add sigP report (#460)

* fix(ci): pin commitlint version (#466)

* feat: track active validator count in pods (#474)

* chore: remove maxPods (#463)

* chore: remove maxPods

* docs: update docs

* refactor: set to private

* feat: holesky deploy scripts (#473)

* script: parser script helpers

* feat: holesky deploy scripts

* fix: config

* fix: ops multisig whitelister

* feat: track active validator count in pods (#474)

* chore: remove maxPods (#463)

* chore: remove maxPods

* docs: update docs

* refactor: set to private

* script: parser script helpers

* feat: holesky deploy scripts

* fix: config

* fix: ops multisig whitelister

* refactor: maxpods removal

* feat: preprod deployment

* refactor: reuse other script

---------

Co-authored-by: Alex <[email protected]>

* fix: certora prover ci (#477)

* fix: fallback args

* fix: updated storage syntax

* fix: off-by-one error (#479)

* fix: off-by-one error

strict inequality could cause funds that were part of a withdrawal
in the block where `mostRecentWithdrawalTimestamp` gets set to become stuck.
changing to non-strict inequality fixes the issue.

* chore: add regression test for off-by-one error

added a function to the harness contract to make this test possible

confirmed fails with previous behavior, but passes with new behavior

* chore: delete confusing test

it's unclear quite what this is supposed to be checking

will follow-up with a more reasonable test for what I think this is trying to do

* chore: add test to check that "too early" proof fails

should replace the confusingly named + deleted `testDeployEigenPodTooSoon` test

* docs: reinstate contract addresses to their former glory (#478)

* docs: reinstate contract addresses to their former glory

* add updated contract addresses for holesky
* welcome home boys, we've missed you

* docs: fix typo

* docs: add missing strategy contracts

* feat: m2 mainnet upgrade script (#480)

* feat: m2-mainnet upgrade script

* chore: remove test output

* feat: add upgrade queue test (#481)

this commit also imports various tx-queuing-related utils

* feat: fix encoding & complete M2 upgrade queuing test

* chore: adjustments to ordering, use parsed address

* fix: correct genesis time

* fix: max restake gwei config

---------

Co-authored-by: ChaoticWalrus <[email protected]>

* merge `dev` into `m2-mainnet` branch (#499)

* feat: add m2 upgrade output file (#482)

* feat: add m2 upgrade output file

* fix: consistent writing + reading of deployment params

naming should now be consistent, so the ExistingDeploymentParser
should work with unmodified script outputs

* feat: appropriately parse new implementation addresses

`test_queueUpgrade` now more accurately models the upgrade,
and no longer simulates implementation deployment

* chore: appropriate timelock ETA

* chore: add a couple more "sanity" checks

these are performed after the upgrade is simulated

* chore: minor testing fixes (#486)

* chore: filter fork upgrade test out of default `forge t`

* chore: fix flaky test

this test failed when the fuzzed 'withdrawer' param collided with the sender.
by pranking the sender address, the 'assume' statement at the start of the test
now has its desired behavior

* test: updated fork integration tests (#483)

* test: clean pr for fork testing

* test: upgrade tests

* fix: gh secrets

* fix: remove lsts that error

* test: clean up fork testing (#487)

---------

Co-authored-by: Alex <[email protected]>

* chore: fork test via environment and custom foundry profile (#490)

* chore: remove parallel tests

* feat: trigger fork tests via env var and lower fuzz runs

* mainnet fork tests are now triggered by setting the FOUNDRY_PROFILE to forktest
* forktest profile uses lower fuzz runs to reduce RPC load
* CI workflow is split into unit tests, integration tests, and integration forktests

* fix: remove no-match from CI

* fix: flaky unit test and also continue running tests if one job fails

* fix: try a different job order

* test: double the fork test runs since daddy alchemy is serving

* docs: update integration test README with fork test info

* chore: update the pragma from =0.8.12 to ^0.8.12 (#485)

* chore: update the pragma from =0.8.12 to ^0.8.12

* test: add deprecated interface pragmas and fix flaky test

---------

Co-authored-by: wadealexc <[email protected]>

* docs: fix broken link (#493)

* fix: m2_deploy_from_scratch script for devnet (#495)

* fix: m2_deploy_from_scratch script for devnet

* feat: added github action to make sure deploy script is kept up-to-date

* fix(github-action): missing submodules in checkout step

* feat: update mainnet implementation addresses (#497)

* feat: update mainnet implementation addresses

additionally, add the EigenLayerBeaconOracle to table

* chore: correct shortened addresses for new implementations

* chore: remove duplicate entry, more consistent format

* chore: link to correct commit in table

* chore: holesky strats

* fix: update eigenpod beacon

---------

Co-authored-by: 8sunyuan <[email protected]>

---------

Co-authored-by: Michael Sun <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: steven <[email protected]>
Co-authored-by: wadealexc <[email protected]>
Co-authored-by: Samuel Laferriere <[email protected]>
Co-authored-by: 8sunyuan <[email protected]>

---------

Co-authored-by: sidu28 <[email protected]>
Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: gpsanant <[email protected]>
Co-authored-by: Gautham Anant <[email protected]>
Co-authored-by: wadealexc <[email protected]>
Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Samuel Laferriere <[email protected]>
Co-authored-by: quaq <[email protected]>
Co-authored-by: steven <[email protected]>
Co-authored-by: steven <[email protected]>
Co-authored-by: pandabadger <[email protected]>
Co-authored-by: 8sunyuan <[email protected]>
Co-authored-by: Gajesh Naik <[email protected]>
Co-authored-by: Michael Sun <[email protected]>
Co-authored-by: Bowen Li <[email protected]>
Co-authored-by: iwantanode <[email protected]>
Co-authored-by: teryanarmen <[email protected]>
Co-authored-by: joao <[email protected]>
Co-authored-by: SiddyJ <[email protected]>
Co-authored-by: Peter Straus <[email protected]>
wadealexc added a commit that referenced this pull request May 7, 2024
* fix: certora prover ci (#477)

* fix: fallback args

* fix: updated storage syntax

* fix: off-by-one error (#479)

* fix: off-by-one error

strict inequality could cause funds that were part of a withdrawal
in the block where `mostRecentWithdrawalTimestamp` gets set to become stuck.
changing to non-strict inequality fixes the issue.

* chore: add regression test for off-by-one error

added a function to the harness contract to make this test possible

confirmed fails with previous behavior, but passes with new behavior

* chore: delete confusing test

it's unclear quite what this is supposed to be checking

will follow-up with a more reasonable test for what I think this is trying to do

* chore: add test to check that "too early" proof fails

should replace the confusingly named + deleted `testDeployEigenPodTooSoon` test

* docs: reinstate contract addresses to their former glory (#478)

* docs: reinstate contract addresses to their former glory

* add updated contract addresses for holesky
* welcome home boys, we've missed you

* docs: fix typo

* docs: add missing strategy contracts

* feat: m2 mainnet upgrade script (#480)

* feat: m2-mainnet upgrade script

* chore: remove test output

* feat: add upgrade queue test (#481)

this commit also imports various tx-queuing-related utils

* feat: fix encoding & complete M2 upgrade queuing test

* chore: adjustments to ordering, use parsed address

* fix: correct genesis time

* fix: max restake gwei config

---------

Co-authored-by: ChaoticWalrus <[email protected]>

* feat: add m2 upgrade output file (#482)

* feat: add m2 upgrade output file

* fix: consistent writing + reading of deployment params

naming should now be consistent, so the ExistingDeploymentParser
should work with unmodified script outputs

* feat: appropriately parse new implementation addresses

`test_queueUpgrade` now more accurately models the upgrade,
and no longer simulates implementation deployment

* chore: appropriate timelock ETA

* chore: add a couple more "sanity" checks

these are performed after the upgrade is simulated

* chore: minor testing fixes (#486)

* chore: filter fork upgrade test out of default `forge t`

* chore: fix flaky test

this test failed when the fuzzed 'withdrawer' param collided with the sender.
by pranking the sender address, the 'assume' statement at the start of the test
now has its desired behavior

* test: updated fork integration tests (#483)

* test: clean pr for fork testing

* test: upgrade tests

* fix: gh secrets

* fix: remove lsts that error

* test: clean up fork testing (#487)

---------

Co-authored-by: Alex <[email protected]>

* chore: fork test via environment and custom foundry profile (#490)

* chore: remove parallel tests

* feat: trigger fork tests via env var and lower fuzz runs

* mainnet fork tests are now triggered by setting the FOUNDRY_PROFILE to forktest
* forktest profile uses lower fuzz runs to reduce RPC load
* CI workflow is split into unit tests, integration tests, and integration forktests

* fix: remove no-match from CI

* fix: flaky unit test and also continue running tests if one job fails

* fix: try a different job order

* test: double the fork test runs since daddy alchemy is serving

* docs: update integration test README with fork test info

* chore: update the pragma from =0.8.12 to ^0.8.12 (#485)

* chore: update the pragma from =0.8.12 to ^0.8.12

* test: add deprecated interface pragmas and fix flaky test

---------

Co-authored-by: wadealexc <[email protected]>

* docs: fix broken link (#493)

* fix: m2_deploy_from_scratch script for devnet (#495)

* fix: m2_deploy_from_scratch script for devnet

* feat: added github action to make sure deploy script is kept up-to-date

* fix(github-action): missing submodules in checkout step

* feat: update mainnet implementation addresses (#497)

* feat: update mainnet implementation addresses

additionally, add the EigenLayerBeaconOracle to table

* chore: correct shortened addresses for new implementations

* chore: remove duplicate entry, more consistent format

* chore: link to correct commit in table

* chore: holesky strats

* fix: update eigenpod beacon

---------

Co-authored-by: 8sunyuan <[email protected]>

* merge `m2-mainnet` into `mainnet` branch (#498)

* final

* fixed yml

* init

* add event

* Update EPmgr docs with final missing functions, and update README to reflect withdrawal queue refactor!

* pushn

* added new storage

* changed name

* added logic

* fixed storage gap

* changed variable name

* changed variable name

* Update docs with latest EigenPod change

* add validation; pending storage gap checks

* fixed most tests

* fixed

* added multiple queuedwithdrawals function

* made update outside of loop

* add gap support; reorganize storage representation

* fix syntax highlighting

* fixed all tests

* remove stale comments

* fixed

* fixed tests

* init

* dedupe EigenPod and Withdrawals

* add README for storage validation script

* fix README formatting

* fixed

* removed bls pubkeycompendium deployment from m2 deployment script

* fix layouts for EPM and SM

* event fix (#272)

* made some corrections

* done

* added underflow handling

* cleaned up all warnings

* Remove Middleware from Core (#260)

* remove middleware from core

* remove go files from ffi

* use stub

* delete Prover rules for `BLSRegistryCoordinatorWithIndices` (#261)

these are getting migrated to a separate repo

* add weird fix

* move stub to mocks

* remove additional interfaces from imports

* port over alexs interface change

* add back whitelister

* add back script per PR comment

---------

Co-authored-by: steven <[email protected]>
Co-authored-by: ChaoticWalrus <[email protected]>

* split the tests again

* Revert "split the tests again"

This reverts commit bf48e9d.

* skeleton refactor

* init

* Update DelegationManager.md

* Update EigenPod.md

* Update BeaconChainProofs.md

* all tests working

* cleanup

* init

* require cannot q withdrawal for 0 strategies and update docs

* copilot crazy grammar

* finished EPM unit tests

* fix tree diagram typos

* fix _checkPodDeployed function

* split max pod revert tests

* fuzz removeShares tests

* update initializePodWithShares to not use stdStorage

* added reg test

* add error messages on asserts

* tidy up

* chore: have DelegationManager use stub interface instead of full interface

Should help to resolve some of the import hell that we are experiencing.

* initial cleanup of SM tests, added deployments to UnitTestSetup file

* Using `EigenLayerUnitTestSetup` for deployment

* remove middleware interfaces from this repo

this commit also removes a ton of detritus from existing tests, which appears to have functionally been doing absolutely nothing.

* init

* change 31 to 32

* all tests working

* close out tests

* cleanup

* fixed balance update code

* rectified test

* removed test import

* fixed

* removed other references to hysterisis

* Separate into base and setup deploy contracts

* made updates consistent

* renamed function test names, removed unused variables

* Update DelegationManager.md

* chore: remove never-used storage at end of storage layout and increase __gap size to compensate

This storage is at the end of the used slots in the storage layout, and was never used either on testnet or mainnet. Therefore, it should be able to be safety deleted without consequence.
This commit also increases the size of the __gap variable to compensate for the removed storage.

* Update EigenPod.md

* clarified as effective not actual balance

* removed inline comment

* chore: fix compiler warnings

This commit addresses a compiler warning in the DelegationManager contract, and fixes compiler warnings in various test files.
These warnings were all ultimately due to unused variables.
I've also added some comments to the EigenPod.t.sol file about the strange address-collision-reversion behavior that we're currently working around (since the workaround was related to an 'unused' variable).

* changed proof gen repo commands

* made the changes to createPod()

* EigenPodManager Unit Test Refactor (#290)

* skeleton refactor

* finished EPM unit tests

* fix tree diagram typos

* fix _checkPodDeployed function

* split max pod revert tests

* fuzz removeShares tests

* update initializePodWithShares to not use stdStorage

* add error messages on asserts

* fix tree file name

* add share adjustment tests

* create temp file for pod and pod manager unit tests

* remove unused constant in EPM unit test

* added fuzzing)

* fixed

* fixed

* fixed tests

* chore: fix compilation error

a forbidden implicit type conversion slipped in, which was causing build errors. this minimal commit fixes the issue.

* reording the indexes in-order, added a few extra comments

* commenting

* remove reeneterer from utils setUp()

* remove strategy deployments in the setUp() helper

* init

* all tests working

* cleanup

* tidy up

* added the previous PR changes to new branch

* added new expectEmit checks

* changes

* CI err fix

* chore: filter fuzzed inputs to fix 3 flaky test failures (#306)

* chore: filter fuzzed inputs to fix 2 flaky test failures

1) failure in a test that appears to be due to the fuzzed 'withdrawer' matching a Strategy's address -- see run here https://github.com/Layr-Labs/eigenlayer-contracts/actions/runs/6672856290/job/18137522930#step:5:46
2) failure in a test when the fuzzed 'staker' address matches a fixed operator address which we are using (the reverting behavior is intended in this case)

* fix one more flaky test failure with fuzzed input filtering

this test fails (appropriately) when the `notUnpauser` input is fuzzed to the ProxyAdmin address

* Fixed import errors and updated `setUp()`

* Removed strategies from utils helper setup

* Removed Utils.sol as its only functions is only used in StrategyManagerUnit.t.sol

* formatting

* Chore/fix flaky test failures (#308)

* chore: filter fuzzed inputs to fix 2 flaky test failures

1) failure in a test that appears to be due to the fuzzed 'withdrawer' matching a Strategy's address -- see run here https://github.com/Layr-Labs/eigenlayer-contracts/actions/runs/6672856290/job/18137522930#step:5:46
2) failure in a test when the fuzzed 'staker' address matches a fixed operator address which we are using (the reverting behavior is intended in this case)

* fix one more flaky test failure with fuzzed input filtering

this test fails (appropriately) when the `notUnpauser` input is fuzzed to the ProxyAdmin address

* fix one more flaky test failure

this failed in the following run: https://github.com/Layr-Labs/eigenlayer-contracts/actions/runs/6697166090/job/18196461283#step:5:116
I dug into it and this was ultimately because the fuzzed `staker` param matched the ProxyAdmin address

* init

* Added tree file

* Update README.md

* Update README.md

* Update README.md

* Updated tree file to match code paths rather than test cases

* tree branches for add/remove strategies

* cleanup and typo

* removed unused internal functions

* check `_isDepositedStrategy()` after removing shares from all strats

* chore: turn require statements into assertEq(), assertTrue(), assertFalse()

* chore: changed startPrank() -> prank() where reasonable

Sometimes having a wrapping startPrank() and stopPrank() code segment is useful to easily recognize which address is being pranked for those calls, especially when we prank again afterwards. That said, certain tests with single function calls could be cleaner with simply `prank()`

* fix: missed stopPrank() to delete

* chore: specific revert messages

* chore: removed event checks, additional tests, rename variable

Removed some of the StrategyAddedToDepositWhitelist event checks in the tests to cleanup. Added additional unit tests for addStrategiesToDepositWhitelist including adding already existing whitelisted strategies and ensuring events aren't emitted there.

* fix: removed unneeded eigenpod doc, it's entirely captured already by EigenPodManager.md

* remove balance update proof functionality

* chore: github compatability and tree branching convention

* add comment explaining validator fields proof for balance update

* chore: remove bytes casing

* test: check storage variables after intialize()

* fix: tree file, nonce doesn't increment for depositIntoStrategy()

* Filter addresses for EPM and EP fuzz tests (#312)

* Filter proxy admin address for EPM fuzz tests

* filter zero address on EP unit tests

* comment out failing tests; compiling

* added proofs

* test: additional coverage andfilterFuzzInput modifier

Tests added:
- initialize() storage variables properly
- depositIntoStrategyWithSignature() revert when token transfer fails
- removeShares() reverts with 0 shares
- removeShares() with removeAmount less than deposit
- addShares() with MAX_STAKER_STRATEGY_LIST_LENGTH strategies
- removeStrategiesFromDepositWhitelist() doesn't emit event on non-whitelisted strategy
- removeStrategiesFromDepositWhitelist() emits event on removing whitelisted strategy
Also added some small commenting, renamed tests, and updated tree file

* update EigenPod unit and integration tests

* update docs to reflect balance update refactor

* remove unused functions from ProofParsing test util

* changes

* bug fix

* eigenpod test file changes

* changes

* removed extra func

* chore: migrate BitmapUtils and BN254 to middleware

* chore: add correct M2 Goerli deployment info (#320)

* feat(linting): add commit linter (#296)

* ci(linting): apply linting to CI and update docs for it

* chore: remove git-patch for applying these changes

* fix: typo and mistake in git url

* ci: force fail fast to be false

* ci: remove fail fast behavior

* ci: move fail-fast option

---------

Co-authored-by: steven <[email protected]>

* EigenPod Unit Test Refactor (#317)

* chore: delete unused files (#321)

minor cleanup of some unused files; should help to clarify things a bit

* Docs: Note edge case for not completing a queued withdrawal for EigenPod (#324)

* fix: remove redudant command (#322)

Co-authored-by: steven <[email protected]>

* chore: fix broken links and clean up readme (#326)

* chore: use a fixed prover version (#327)

Certora will be introducing v5 soon, which is expected to include breaking changes.
Fixing the version at v4.13.1 should allow continuity until we make changes to upgrade.

* chore: update DelegationManager docs to reflect plural queueWithdrawals function (#330)

* chore: switch implementation addresses in README table to M2 versions (#328)

* chore: switch implementation addresses in README table to M2 versions

* chore: fix link/"preview" text for updated links

* chore: fix misplaced link text (oops!)

* chore: fix misplaced text for _another_ link

my bad, don't know how I made this mistake 2x

* test: create integration test framework (#335)

See `/integration/README.md` for details on how it works

---------

Co-authored-by: Yash Patil <[email protected]>

* feat: interface change for mw sigchecker

* init

* test: support native eth in integration tests (#340)

see PR for changelog

* eigenpod and eigenpodmanager integration tests (#347)

* base

* add base setup file

* readd refactored file

* pending withdrawal tests

* add withdrawal test scaffold

* push

* finish withdrawal tests; pending additional proof sizes

* remove old EigenPod unit test file; transfer integration tests to EP test file

* update tree file

* add tests for proofs <32 ETH

* remove unused files and test comments

* remove stale comment

* base setup

* add more base test cases

* fix: update setup file pod address

* buggy

* test: fix setup

* pause tests

* some changes

* test: add verify WC test

* test: add withdrawal tests

* nit changes

---------

Co-authored-by: Yash Patil <[email protected]>

* test: implement random withdrawal generator (#349)

see PR for changes/notes

* Test: DelegationManager unit tests refactor (#332)

* refactor: initial changes

- Commented out and moved 'integration-like' withdrawal tests to Delegation.t.sol
- import paths are absolute
- fixed solidity version
- Inheriting EigenLayerUnitTestSetup helper contract now (deploys mocks contracts, pauserRegistry, etc)

* test: initial tree file

* refactor: revert tree file back to # syntax while wip

* test: update setup file; add initialization + setter tests

* test: minor tree file updates

* test: adding to tree file

* test: fixed `mananger` typo

* test: add register operator cases

* test: add modify operator tests

* test: add share adjustment tests

* test: add undelegate unit tests

* test: update tree file for withdrawals

* test: delegateTo unit tests

* fix: error from changed internal helper

* test: delegateToBySignature unit tests

* fix: update tree file

* test: minor cleanup

* test: add pausing tests

* test: remove unused helper functions

* test: update all tests to use defaultOperator

* test: remove old tests and formatting

- formatted tree file
- formatted unit test file
- removed old tests that have been readded and refactored
- removed bytes casting for revert strings

test: remove getPods file

* fix: remove duplicated logic

- removed assumes out of internal helpers
- removed a lot of dup tree branching for readability
- small nit fixes

* fix: delegateToBySignature tree cleanup

---------

Co-authored-by: Yash Patil <[email protected]>

* test: update eigen pod unit tests with new balance update functionality

* feat: enable AVS update metadata uri (#354)

* feat:enable AVS update metadata uri

* test: add unit test

* test: fuzz staker address != delegationApprover (#360)

Failing fuzz test was result of fuzzed staker address being
the same address as delegationApprover address

* feat: add Certora Prover to m2-mainnet CI (#359)

* fix: update rpc on withdrawal migrationt tests (#362)

* Feat: Remove set withdrawal delay (#355)

* feat: remove setWithdrawalDelayBlocks()

removing ability to modify withdrawalDelayBlocks, will only be initialized once

* fix: fixed delegation.initialize() calls

- Added `initializedWithdrawalDelayBlocks` to initialize params
- Added regression test for initializing> MAX_WITHDRAWAL_DELAY_BLOCKS
- DelegationUnit.t.sol, small fix for internal function `_registerOperatorWith1271DelegationApprover`

* chore: emit WithdrawalDelayBlocksSet

* Integration Tests: Scenarios 2-3 (#350)

* test: support random balance updates in integration tests (#364)

- also adds user-level logging

* Fix: update balance update not pod caller revert test (#366)

* chore: repo cleanup (#365)

- update main and docs README
- update DelegationManager docs to remove method
- remove stake update pushes from DelegationManager
- deprecate stakeRegistry storage variable in DelegationManager
- turn Slasher into a Stub
- remove Slasher tests

* chore: migrate to certora prover v5 (#369)

- switch from fixed v4.13.1 to floating / latest version

- implement minimal changes that (hopefully) make existing specs work with v5

* chore: update README, docs, and prune old files (#371)

* chore: update README, docs, and prune old files

* fix: add integration test reference to README

* docs: fix withdrawal router comment

* feat: support avs<>operator mapping with new APIs (#363)

* feat: support avs<>operator mapping with new APIs and events

* feat: more formal verification for eigenpods (#368)

* add draft Prover rules + invariants for EigenPod contract

includes new spec, script, and harness files

* feat: add invariant for withdrawn validators having zero restaked balance

* chore: try to tune script to fix timeout errors

Prover runs for the EigenPod spec have been hitting timeouts (e.g. [here](https://prover.certora.com/output/83341/c0f1187dfb5f413caeea598ff85d82dd?anonymousKey=ee5301c2dbc2262a0d274d81ef2944c321faae0e))-- this commit is an attempt to fix these timeouts

* chore: relax script parameters to try to address Prover timeouts

see documentation (https://docs.certora.com/en/latest/docs/prover/cli/options.html) to understand these flags

* feat: add envfree functions and a couple draft rules to EPM spec

* chore: add a couple more 'envfree' functions to EigenPod spec

* feat: add draft for key invariant (commented out due to compiler failures)

see comments for more context on this.

also included are 2 new harnessed functions

* chore: remove `hashing_length_bound` in script

this should make rules non-vacuous; by using different summaries we can still solve timeouts

* chore: add a ton more summarization, and fix hook

deals with timeouts much more effectively, and the hook works now. the `baseInvariant` rule is still broken -- see comment in the axiom definition

* chore: add more dispatching and filter parametric contracts

* feat: new (draft) rule to capture more of EigenPods' accounting model

* fix: use correct summarization syntax

* feat: hack together solution for ignoring special case

the summarization of the `EigenPod. _sendETH()` function appears to still be broken

I've commented this out and the rule now passes (at least from running locally), but this is definitely suboptimal

am leaving several TODOs for now.

* add draft Prover rules + invariants for EigenPod contract

includes new spec, script, and harness files

* feat: add invariant for withdrawn validators having zero restaked balance

* chore: try to tune script to fix timeout errors

Prover runs for the EigenPod spec have been hitting timeouts (e.g. [here](https://prover.certora.com/output/83341/c0f1187dfb5f413caeea598ff85d82dd?anonymousKey=ee5301c2dbc2262a0d274d81ef2944c321faae0e))-- this commit is an attempt to fix these timeouts

* chore: relax script parameters to try to address Prover timeouts

see documentation (https://docs.certora.com/en/latest/docs/prover/cli/options.html) to understand these flags

* feat: add envfree functions and a couple draft rules to EPM spec

* chore: add a couple more 'envfree' functions to EigenPod spec

* feat: add draft for key invariant (commented out due to compiler failures)

see comments for more context on this.

also included are 2 new harnessed functions

* chore: remove `hashing_length_bound` in script

this should make rules non-vacuous; by using different summaries we can still solve timeouts

* chore: add a ton more summarization, and fix hook

deals with timeouts much more effectively, and the hook works now. the `baseInvariant` rule is still broken -- see comment in the axiom definition

* chore: add more dispatching and filter parametric contracts

* feat: new (draft) rule to capture more of EigenPods' accounting model

* fix: use correct summarization syntax

* feat: hack together solution for ignoring special case

the summarization of the `EigenPod. _sendETH()` function appears to still be broken

I've commented this out and the rule now passes (at least from running locally), but this is definitely suboptimal

am leaving several TODOs for now.

* chore: repo cleanup (#365)

- update main and docs README
- update DelegationManager docs to remove method
- remove stake update pushes from DelegationManager
- deprecate stakeRegistry storage variable in DelegationManager
- turn Slasher into a Stub
- remove Slasher tests

* chore: migrate to certora prover v5 (#369)

- switch from fixed v4.13.1 to floating / latest version

- implement minimal changes that (hopefully) make existing specs work with v5

* add draft Prover rules + invariants for EigenPod contract

includes new spec, script, and harness files

* feat: add invariant for withdrawn validators having zero restaked balance

* chore: try to tune script to fix timeout errors

Prover runs for the EigenPod spec have been hitting timeouts (e.g. [here](https://prover.certora.com/output/83341/c0f1187dfb5f413caeea598ff85d82dd?anonymousKey=ee5301c2dbc2262a0d274d81ef2944c321faae0e))-- this commit is an attempt to fix these timeouts

* chore: relax script parameters to try to address Prover timeouts

see documentation (https://docs.certora.com/en/latest/docs/prover/cli/options.html) to understand these flags

* feat: add envfree functions and a couple draft rules to EPM spec

* chore: add a couple more 'envfree' functions to EigenPod spec

* feat: add draft for key invariant (commented out due to compiler failures)

see comments for more context on this.

also included are 2 new harnessed functions

* chore: remove `hashing_length_bound` in script

this should make rules non-vacuous; by using different summaries we can still solve timeouts

* chore: add a ton more summarization, and fix hook

deals with timeouts much more effectively, and the hook works now. the `baseInvariant` rule is still broken -- see comment in the axiom definition

* chore: add more dispatching and filter parametric contracts

* feat: new (draft) rule to capture more of EigenPods' accounting model

* fix: use correct summarization syntax

* feat: hack together solution for ignoring special case

the summarization of the `EigenPod. _sendETH()` function appears to still be broken

I've commented this out and the rule now passes (at least from running locally), but this is definitely suboptimal

am leaving several TODOs for now.

* feat: add draft for key invariant (commented out due to compiler failures)

see comments for more context on this.

also included are 2 new harnessed functions

* chore: add a ton more summarization, and fix hook

deals with timeouts much more effectively, and the hook works now. the `baseInvariant` rule is still broken -- see comment in the axiom definition

* chore: add more dispatching and filter parametric contracts

* feat: new (draft) rule to capture more of EigenPods' accounting model

* chore: fix merge artifacts / regen deletion of unused code

---------

Co-authored-by: Alex <[email protected]>

* fix: update docs and ensure important state changing methods are pausable (#372)

* docs: update eigenpod docs and add new dmgr functions

* docs: update createPod function sig

* chore: ensure complete coverage of pausability

* Test: Add back missing withdrawal tests to DelegationUnit.t.sol (#370)

* test: revert tests

* test: withdrawal tests

* chore: rename helper

* fix: several typos in the docs (#356)

* fix typo EigenPodManager.md

* fix typo AVS-Guide.md

* fix typo DeployOpenEigenLayer.s.sol

* fix typo README.md

---------

Co-authored-by: ChaoticWalrus <[email protected]>

* remove munged (#373)

* fix: make Prover CI run correctly (#376)

* Documentation Fixes: Grammar, Typos, and Prepositions (#377)

* fix typo: Change 'now' to 'more' in EigenLayer middleware documentation link description

* fix missing preposition in documentation: change 'according the their' to 'according to their'

* fixed grammatical errors in documentation: Changed 'lets' to 'let's' and 'who's' to 'whose' in the example sentence about Merkle trees

* made forceUndelegate queue a withdrawal for each strategy (#345)

* changes

* added back comments

* chore: fix tests to work with modified behavior (#378)

* chore: fix tests to work with modified behavior

integration tests in particular are now slightly more flexible

* fix: remove memory overwrite

* docs: update dmgr docs

---------

Co-authored-by: wadealexc <[email protected]>

---------

Co-authored-by: ChaoticWalrus <[email protected]>
Co-authored-by: wadealexc <[email protected]>

* Fix m2 deploy from scratch script m2 mainnet (#379)

* remove slasher checks from M2_Deploy_From_Scratch as they are no longer valid for m2-mainnet release

* update anvil config file for M2_deploy_from_scratch script to work

* Test: Delegation Integration tests (#358)

* Fix: flaky integration tests (#384)

* docs: update deployment lists for new mainnet and testnet strats (#404)

* fixed comment

* fix: update links in outdated issue templates (#390)

* feat: add m2-mainnet-fixes to m2-mainnet (#409)

* Fix: Update registration documentation & type hash (#383)

* feat: strategy configs (#392)

* Fix: flaky integration tests (#384)

* feat: strat settings

* Fix: flaky integration tests (#384)

* feat: strat settings

* feat: withdrawalDelayBlocks per strategy

* fix: set deprecated storage to private

* fix: pr review changes

* fix: require string

* docs: updated

* refactor: rename creditTransfersDisabled

* fix: doc typos

* docs: add new methods and fix formatting

* fix: nits and getWithdrawals view

* docs: add link

---------

Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: wadealexc <[email protected]>

* fix: update forge CI to include contract size checks (#402)

* fix: add contract size check

* fix: ignore harness build size

* refactor: decouple AVS<>Operator mapping from DelegationManager (#403)

* refactor: initial draft

* fix: revert require chages

* fix: small nits

* fix: operator<>AVS mapping tests (#407)

* test: added back avsRegistration tests

* fix: fuzz runs 4096

* fix: broken fuzz test

* docs: add docs for AVSDirectory (#408)

* Feat: Add events for beacon chain balance updates & move deposit event

* script update (#412)

* fix: middleware script (#414)

* Deneb Mainnet Patch (#395)

* init commit

* updated testFullWithdrawalFlow to deneb spec

* added two proof paths

* added both capella and deneb testS

* added testFullWithdrawalFlowCapellaWithdrawalAgainstDenebRoot

* added event

* fixed storage gap

* uncommented testsg

* fix: remove line

* fixed tesst

* added a setter in the EPM for deneForkTimetamp

* tests still broken

* cleanup

* added modifier

* fixing tests

* tests working

* added tests

* comments

* fixed failing test

* fix flaky test

* removed modifier

---------

Co-authored-by: gpsanant <[email protected]>

* feat: simplify fork timestamp setting logic (#416)

* feat: simplify fork timestamp setting logic

* test: fix tests to account for only setting timestamp once

---------

Co-authored-by: wadealexc <[email protected]>

* Goerli implementation script (#413)

* Create GoerliUpgrade2.s.sol

* preprod deploy

* Update GV2_preprod_deployment_2024_30_1.json

* nit: comments

* avs directory already deployed

* preprod deploy

* chore: fix numerous compiler warnings from script + test files (#419)

warnings were for unused or shadowed variables, or functions that could have stricter mutability

* docs: fixed comment

* Revert "fixed comment"

This reverts commit c3d7bff.

* Fixed comments (#422)

* fix: fixed comment

* fix: removed dead space

* fix: removed extraneous the

* fix: edited another comment

* feat: view func for avssync (#423)

* fix: failing certora-ci (#410)

* fix: try installing solc-select

* fix: addShares selector

* fix: add staker address to DEPOSIT typehash (#424)

This provides additional signature replay protection
for the `StrategyManager.depositIntoStrategyWithSignature` method

Specifically, it addresses the issue outlined in
https://mirror.xyz/curiousapple.eth/pFqAdW2LiJ-6S4sg_u1z08k4vK6BCJ33LcyXpnNb8yU
where some ERC1271 wallets might be vulnerable to "replays" of signatures

While the theoretical "damage" would be ~zero
(allowing someone to deposit and credit the deposit to a user),
adding this field to the typehash seems to be best practice, at least.

* Testnet Deploy (#425)

* fix: updated beacon chain proof docs and correct error message (#427)

* fix: updated doc

* fix: changed more incorrect references fo verifyBalanceUpdates

* fix: changed more incorrect references fo verifyBalanceUpdates

* fix: fixed image

* fix: fixed incorrect comment

* docs: fix formatting

---------

Co-authored-by: wadealexc <[email protected]>

* feat: slight refactor to make better use of strategybase hooks (#428)

* feat: slight refactor to make better use of strategybase hooks

* docs: add clarifying comment

* test: unit tests for strat config (#426)

* fix: use correct license (#431)

this should be MIT licensed; looks like this was missed

* docs: update README to point to deployment info (#432)

* fix: include missing field from TYPEHASH calculation (#435)

`delegationApprover` was missing from the `DELEGATION_APPROVAL_TYPEHASH` definition

* fix: disable initializers in constructor (#436)

* chore: beacon proof constants cleanup (#437)

* fix: removed misc constants

* feat: prevent queuing withdrawals to other addresses (#438)

* fix: add back setMinWithdrawalDelayBlocks (#439)

* fix:add back withdrawal delay

* docs: update docs with new function

---------

Co-authored-by: wadealexc <[email protected]>

* feat: cancel AVS registration salt  (#434)

* feat: cancel salt

* fix: require that salt cannot be cancelled twice

---------

Co-authored-by: wadealexc <[email protected]>

* test: fix borked test after rebase

---------

Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: Michael Sun <[email protected]>
Co-authored-by: quaq <[email protected]>
Co-authored-by: kachapah <[email protected]>
Co-authored-by: gpsanant <[email protected]>
Co-authored-by: ChaoticWalrus <[email protected]>
Co-authored-by: SiddyJ <[email protected]>

* docs: add common user flows to docs (#445)

* updated m2_deploy_from_scratch to use avsDirectory (#449)

* test: fix flaky delegation approver test (#450)

* chore: update license (#451)

- clarify wording about change dates

- rename the "licensed work" for greater specificity

* chore: Cleanup script/ directory (#454)

* chore: spring cleaning

* fix: test deployment path

* chore: revert back to  relative paths

* docs: add sigP report (#460)

* fix(ci): pin commitlint version (#466)

* feat: track active validator count in pods (#474)

* chore: remove maxPods (#463)

* chore: remove maxPods

* docs: update docs

* refactor: set to private

* feat: holesky deploy scripts (#473)

* script: parser script helpers

* feat: holesky deploy scripts

* fix: config

* fix: ops multisig whitelister

* feat: track active validator count in pods (#474)

* chore: remove maxPods (#463)

* chore: remove maxPods

* docs: update docs

* refactor: set to private

* script: parser script helpers

* feat: holesky deploy scripts

* fix: config

* fix: ops multisig whitelister

* refactor: maxpods removal

* feat: preprod deployment

* refactor: reuse other script

---------

Co-authored-by: Alex <[email protected]>

* fix: certora prover ci (#477)

* fix: fallback args

* fix: updated storage syntax

* fix: off-by-one error (#479)

* fix: off-by-one error

strict inequality could cause funds that were part of a withdrawal
in the block where `mostRecentWithdrawalTimestamp` gets set to become stuck.
changing to non-strict inequality fixes the issue.

* chore: add regression test for off-by-one error

added a function to the harness contract to make this test possible

confirmed fails with previous behavior, but passes with new behavior

* chore: delete confusing test

it's unclear quite what this is supposed to be checking

will follow-up with a more reasonable test for what I think this is trying to do

* chore: add test to check that "too early" proof fails

should replace the confusingly named + deleted `testDeployEigenPodTooSoon` test

* docs: reinstate contract addresses to their former glory (#478)

* docs: reinstate contract addresses to their former glory

* add updated contract addresses for holesky
* welcome home boys, we've missed you

* docs: fix typo

* docs: add missing strategy contracts

* feat: m2 mainnet upgrade script (#480)

* feat: m2-mainnet upgrade script

* chore: remove test output

* feat: add upgrade queue test (#481)

this commit also imports various tx-queuing-related utils

* feat: fix encoding & complete M2 upgrade queuing test

* chore: adjustments to ordering, use parsed address

* fix: correct genesis time

* fix: max restake gwei config

---------

Co-authored-by: ChaoticWalrus <[email protected]>

* merge `dev` into `m2-mainnet` branch (#499)

* feat: add m2 upgrade output file (#482)

* feat: add m2 upgrade output file

* fix: consistent writing + reading of deployment params

naming should now be consistent, so the ExistingDeploymentParser
should work with unmodified script outputs

* feat: appropriately parse new implementation addresses

`test_queueUpgrade` now more accurately models the upgrade,
and no longer simulates implementation deployment

* chore: appropriate timelock ETA

* chore: add a couple more "sanity" checks

these are performed after the upgrade is simulated

* chore: minor testing fixes (#486)

* chore: filter fork upgrade test out of default `forge t`

* chore: fix flaky test

this test failed when the fuzzed 'withdrawer' param collided with the sender.
by pranking the sender address, the 'assume' statement at the start of the test
now has its desired behavior

* test: updated fork integration tests (#483)

* test: clean pr for fork testing

* test: upgrade tests

* fix: gh secrets

* fix: remove lsts that error

* test: clean up fork testing (#487)

---------

Co-authored-by: Alex <[email protected]>

* chore: fork test via environment and custom foundry profile (#490)

* chore: remove parallel tests

* feat: trigger fork tests via env var and lower fuzz runs

* mainnet fork tests are now triggered by setting the FOUNDRY_PROFILE to forktest
* forktest profile uses lower fuzz runs to reduce RPC load
* CI workflow is split into unit tests, integration tests, and integration forktests

* fix: remove no-match from CI

* fix: flaky unit test and also continue running tests if one job fails

* fix: try a different job order

* test: double the fork test runs since daddy alchemy is serving

* docs: update integration test README with fork test info

* chore: update the pragma from =0.8.12 to ^0.8.12 (#485)

* chore: update the pragma from =0.8.12 to ^0.8.12

* test: add deprecated interface pragmas and fix flaky test

---------

Co-authored-by: wadealexc <[email protected]>

* docs: fix broken link (#493)

* fix: m2_deploy_from_scratch script for devnet (#495)

* fix: m2_deploy_from_scratch script for devnet

* feat: added github action to make sure deploy script is kept up-to-date

* fix(github-action): missing submodules in checkout step

* feat: update mainnet implementation addresses (#497)

* feat: update mainnet implementation addresses

additionally, add the EigenLayerBeaconOracle to table

* chore: correct shortened addresses for new implementations

* chore: remove duplicate entry, more consistent format

* chore: link to correct commit in table

* chore: holesky strats

* fix: update eigenpod beacon

---------

Co-authored-by: 8sunyuan <[email protected]>

---------

Co-authored-by: Michael Sun <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: steven <[email protected]>
Co-authored-by: wadealexc <[email protected]>
Co-authored-by: Samuel Laferriere <[email protected]>
Co-authored-by: 8sunyuan <[email protected]>

---------

Co-authored-by: sidu28 <[email protected]>
Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: gpsanant <[email protected]>
Co-authored-by: Gautham Anant <[email protected]>
Co-authored-by: wadealexc <[email protected]>
Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Samuel Laferriere <[email protected]>
Co-authored-by: quaq <[email protected]>
Co-authored-by: steven <[email protected]>
Co-authored-by: steven <[email protected]>
Co-authored-by: pandabadger <[email protected]>
Co-authored-by: 8sunyuan <[email protected]>
Co-authored-by: Gajesh Naik <[email protected]>
Co-authored-by: Michael Sun <[email protected]>
Co-authored-by: Bowen Li <[email protected]>
Co-authored-by: iwantanode <[email protected]>
Co-authored-by: teryanarmen <[email protected]>
Co-authored-by: joao <[email protected]>
Co-authored-by: SiddyJ <[email protected]>
Co-authored-by: Peter Straus <[email protected]>

* feat: add script for unpausing deposits (#496)

* chore: add avs directory to README (#506)

* docs: remove m1 references and clean deployment table (#508)

* docs: remove outdated m1 references

* docs: remove unneeded column and shorten avg column length

* docs: expand proxy addresses in table

* docs: separate tables into sections for visual clarity

* docs: add beacon chain eth to strategies section

* chore: add cantina report and rename files for clarity (#526)

* chore: cleanup script for generating bindings (#532)

update readme

Add setup step to readme

* chore: add token contracts (#535)

* add token contracts

* write eigen strategy script

* deploy on holesky and update mainnet config

* chore: add token deploy script (#536)

* write eigen strategy script

* deploy on holesky and update mainnet config

* fix pragmas

* add to readme

* fix nit

* label strategy

* add header

* add eigen/beigen to readme

* docs: fix typo in README and gen bindings for token contracts

* chore: gen bindings

---------

Co-authored-by: wadealexc <[email protected]>

* chore: fix merge conflicts for dev merge (#541)

* fix: whitelist strategies

* feat: deploy output

---------

Co-authored-by: 8sunyuan <[email protected]>

---------

Co-authored-by: Michael Sun <[email protected]>
Co-authored-by: ChaoticWalrus <[email protected]>
Co-authored-by: steven <[email protected]>
Co-authored-by: Samuel Laferriere <[email protected]>
Co-authored-by: 8sunyuan <[email protected]>
Co-authored-by: sidu28 <[email protected]>
Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: gpsanant <[email protected]>
Co-authored-by: Gautham Anant <[email protected]>
Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: quaq <[email protected]>
Co-authored-by: steven <[email protected]>
Co-authored-by: pandabadger <[email protected]>
Co-authored-by: Gajesh Naik <[email protected]>
Co-authored-by: Bowen Li <[email protected]>
Co-authored-by: iwantanode <[email protected]>
Co-authored-by: teryanarmen <[email protected]>
Co-authored-by: joao <[email protected]>
Co-authored-by: SiddyJ <[email protected]>
Co-authored-by: Peter Straus <[email protected]>
Co-authored-by: Sean McGary <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants