Skip to content

Commit

Permalink
Multi-whitelisted operators [audited] (#299)
Browse files Browse the repository at this point in the history
* update project dependencies

* remove not relevant files

* upgrade github actions

* edr dependency

* fix solidity-coverage, slither

* update tests viem way

* add data structure

* set operators whitelists

* support for ERC165

* refactor operators update on cluster registration

* add view functions, refactors

* update validator registration flow

* add operator whitelisting tests

* set operator public/private, add tests

* added fork tests

* update docs

* upgrade to 0.8.24, gas improvements

* CI forked tests action

* test fix CI

* explicit imports, add fork test

* change whitelist checks priority when registering validators

* add reentrancy tests

* omit to make private operator when setting whitelisting contract

* remove privacy setting when whitelisting and removing opertors

* add SSVViews.isAddressWhitelistedInWhitelistingContract

* add edge cases, improve contract-helpers

* fix CI test

* env settings, remove GOERLI config and references

* add tests, update hardhat

* add integration tests, fix CI

* remove setOperatorWhitelist

* enhace custom errors

* update errors

* update CHANGELOG

* add RELEASE_NOTES

* deploy holesky stage

* rename bulk funcs, move operator privacy funcs

* registerOperator can set privacy status

* update docs

* deploy stage

* getWhitelistedOperators update

* getWhitelistedOperators legacy whitelist support, fix reduceOperatorFee

* fix CI coverage

* stage upgrade

* new holesky deployment

* audit fixes/improvements

* upgrade testnet metadata

* added custom test

* add audit report

* update CHANGELOG

* refactor whitelist check on validator registration

* update audit reports

* unlock pragma for interfaces

* update audit report
  • Loading branch information
mtabasco authored Jul 7, 2024
1 parent 499d63a commit 085874c
Show file tree
Hide file tree
Showing 85 changed files with 16,715 additions and 769 deletions.
4 changes: 1 addition & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
GOERLI_ETH_NODE_URL=
GOERLI_OWNER_PRIVATE_KEY=
HOLESKY_ETH_NODE_URL=
HOLESKY_OWNER_PRIVATE_KEY=
MAINNET_ETH_NODE_URL=
MAINNET_OWNER_PRIVATE_KEY=
GAS_PRICE=
GAS=
ETHERSCAN_KEY=
INFURA_KEY=
NODE_PROVIDER_KEY=
MINIMUM_BLOCKS_BEFORE_LIQUIDATION=100800
MINIMUM_LIQUIDATION_COLLATERAL=200000000
OPERATOR_MAX_FEE_INCREASE=3
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/tests-forked.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run tests

on: [push]

jobs:
ci:
runs-on: ubuntu-latest
name: Hardhat unit test (forked network)
env: # Set environment variables for all steps in this job
FORK_TESTING_ENABLED: true
GH_TOKEN: ${{ secrets.github_token }}
MAINNET_ETH_NODE_URL: ${{ secrets.mainnet_eth_node_url }}
NODE_PROVIDER_KEY: ${{ secrets.node_provider_key }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
- run: npm ci
- run: npx hardhat test test-forked/*.ts
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
- run: npm ci
env:
GH_TOKEN: ${{ secrets.github_token }}
- run: npx hardhat test
- run: npx hardhat test --parallel
Loading

0 comments on commit 085874c

Please sign in to comment.