Skip to content

Commit

Permalink
chore: cleanup dwr and unused code (#593)
Browse files Browse the repository at this point in the history
* chore: cleanup dwr and unused code

* chore: comment out pod specs
  • Loading branch information
8sunyuan authored and wadealexc committed Jun 21, 2024
1 parent b09e0ce commit 88c5bc4
Show file tree
Hide file tree
Showing 61 changed files with 90 additions and 6,607 deletions.
3 changes: 1 addition & 2 deletions certora/harnesses/EigenPodHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ contract EigenPodHarness is EigenPod {

constructor(
IETHPOSDeposit _ethPOS,
IDelayedWithdrawalRouter _delayedWithdrawalRouter,
IEigenPodManager _eigenPodManager,
uint64 _MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR,
uint64 _GENESIS_TIME
)
EigenPod(_ethPOS, _delayedWithdrawalRouter, _eigenPodManager, _MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR, _GENESIS_TIME) {}
EigenPod(_ethPOS, _eigenPodManager, _MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR, _GENESIS_TIME) {}

function get_validatorIndex(bytes32 pubkeyHash) public view returns (uint64) {
return _validatorPubkeyHashToInfo[pubkeyHash].validatorIndex;
Expand Down
2 changes: 1 addition & 1 deletion certora/scripts/core/verifyStrategyManager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ solc-select use 0.8.12

certoraRun certora/harnesses/StrategyManagerHarness.sol \
lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol lib/openzeppelin-contracts/contracts/mocks/ERC1271WalletMock.sol \
src/contracts/pods/EigenPodManager.sol src/contracts/pods/EigenPod.sol src/contracts/pods/DelayedWithdrawalRouter.sol \
src/contracts/pods/EigenPodManager.sol src/contracts/pods/EigenPod.sol \
src/contracts/strategies/StrategyBase.sol src/contracts/core/DelegationManager.sol \
src/contracts/core/Slasher.sol src/contracts/permissions/PauserRegistry.sol \
--verify StrategyManagerHarness:certora/specs/core/StrategyManager.spec \
Expand Down
34 changes: 17 additions & 17 deletions certora/scripts/pods/verifyEigenPod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ then
RULE="--rule $2"
fi

solc-select use 0.8.12
# solc-select use 0.8.12

certoraRun certora/harnesses/EigenPodHarness.sol \
src/contracts/core/DelegationManager.sol src/contracts/pods/EigenPodManager.sol \
src/contracts/core/Slasher.sol src/contracts/permissions/PauserRegistry.sol \
src/contracts/core/StrategyManager.sol \
src/contracts/strategies/StrategyBase.sol \
lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol \
lib/openzeppelin-contracts/contracts/mocks/ERC1271WalletMock.sol \
--verify EigenPodHarness:certora/specs/pods/EigenPod.spec \
--optimistic_loop \
--prover_args '-recursionEntryLimit 3' \
--optimistic_hashing \
--parametric_contracts EigenPodHarness \
$RULE \
--loop_iter 1 \
--packages @openzeppelin=lib/openzeppelin-contracts @openzeppelin-upgrades=lib/openzeppelin-contracts-upgradeable \
--msg "EigenPod $1 $2" \
# certoraRun certora/harnesses/EigenPodHarness.sol \
# src/contracts/core/DelegationManager.sol src/contracts/pods/EigenPodManager.sol \
# src/contracts/core/Slasher.sol src/contracts/permissions/PauserRegistry.sol \
# src/contracts/core/StrategyManager.sol \
# src/contracts/strategies/StrategyBase.sol \
# lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol \
# lib/openzeppelin-contracts/contracts/mocks/ERC1271WalletMock.sol \
# --verify EigenPodHarness:certora/specs/pods/EigenPod.spec \
# --optimistic_loop \
# --prover_args '-recursionEntryLimit 3' \
# --optimistic_hashing \
# --parametric_contracts EigenPodHarness \
# $RULE \
# --loop_iter 1 \
# --packages @openzeppelin=lib/openzeppelin-contracts @openzeppelin-upgrades=lib/openzeppelin-contracts-upgradeable \
# --msg "EigenPod $1 $2" \
26 changes: 13 additions & 13 deletions certora/scripts/pods/verifyEigenPodManager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ then
RULE="--rule $2"
fi

solc-select use 0.8.12
# solc-select use 0.8.12

certoraRun certora/harnesses/EigenPodManagerHarness.sol \
src/contracts/core/DelegationManager.sol src/contracts/pods/EigenPod.sol src/contracts/strategies/StrategyBase.sol src/contracts/core/StrategyManager.sol \
src/contracts/core/Slasher.sol src/contracts/permissions/PauserRegistry.sol \
--verify EigenPodManagerHarness:certora/specs/pods/EigenPodManager.spec \
--optimistic_loop \
--optimistic_fallback \
--optimistic_hashing \
--parametric_contracts EigenPodManagerHarness \
$RULE \
--loop_iter 3 \
--packages @openzeppelin=lib/openzeppelin-contracts @openzeppelin-upgrades=lib/openzeppelin-contracts-upgradeable \
--msg "EigenPodManager $1 $2" \
# certoraRun certora/harnesses/EigenPodManagerHarness.sol \
# src/contracts/core/DelegationManager.sol src/contracts/pods/EigenPod.sol src/contracts/strategies/StrategyBase.sol src/contracts/core/StrategyManager.sol \
# src/contracts/core/Slasher.sol src/contracts/permissions/PauserRegistry.sol \
# --verify EigenPodManagerHarness:certora/specs/pods/EigenPodManager.spec \
# --optimistic_loop \
# --optimistic_fallback \
# --optimistic_hashing \
# --parametric_contracts EigenPodManagerHarness \
# $RULE \
# --loop_iter 3 \
# --packages @openzeppelin=lib/openzeppelin-contracts @openzeppelin-upgrades=lib/openzeppelin-contracts-upgradeable \
# --msg "EigenPodManager $1 $2" \
3 changes: 0 additions & 3 deletions certora/specs/core/DelegationManager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ methods {

// external calls to EigenPod
function _.withdrawRestakedBeaconChainETH(address,uint256) external => DISPATCHER(true);

// external calls to DelayedWithdrawalRouter (from EigenPod)
function _.createDelayedWithdrawal(address, address) external => DISPATCHER(true);

// external calls to PauserRegistry
function _.isPauser(address) external => DISPATCHER(true);
Expand Down
3 changes: 0 additions & 3 deletions certora/specs/core/Slasher.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ methods {
// external calls to EigenPod
function _.withdrawRestakedBeaconChainETH(address,uint256) external => DISPATCHER(true);

// external calls to DelayedWithdrawalRouter (from EigenPod)
function _.createDelayedWithdrawal(address, address) external => DISPATCHER(true);

// external calls to PauserRegistry
function _.isPauser(address) external => DISPATCHER(true);
function _.unpauser() external => DISPATCHER(true);
Expand Down
3 changes: 0 additions & 3 deletions certora/specs/core/StrategyManager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ methods {

// external calls to EigenPod
function _.withdrawRestakedBeaconChainETH(address,uint256) external => DISPATCHER(true);

// external calls to DelayedWithdrawalRouter (from EigenPod)
function _.createDelayedWithdrawal(address, address) external => DISPATCHER(true);

// external calls to PauserRegistry
function _.isPauser(address) external => DISPATCHER(true);
Expand Down
4 changes: 0 additions & 4 deletions certora/specs/pods/EigenPod.spec
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ methods {
// external calls to ETH2Deposit contract
function _.deposit(bytes, bytes, bytes, bytes32) external => NONDET;

// external calls to DelayedWithdrawalRouter (from EigenPod)
function _.createDelayedWithdrawal(address, address) external => DISPATCHER(true);

// external calls to PauserRegistry
function _.isPauser(address) external => DISPATCHER(true);
function _.unpauser() external => DISPATCHER(true);
Expand All @@ -75,7 +72,6 @@ methods {
function validatorPubkeyHashToInfo(bytes32 validatorPubkeyHash) external returns (IEigenPod.ValidatorInfo) envfree;
function provenWithdrawal(bytes32 validatorPubkeyHash, uint64 slot) external returns (bool) envfree;
function validatorStatus(bytes32 pubkeyHash) external returns (IEigenPod.VALIDATOR_STATUS) envfree;
function delayedWithdrawalRouter() external returns (address) envfree;
function nonBeaconChainETHBalanceWei() external returns (uint256) envfree;

// harnessed functions
Expand Down
4 changes: 0 additions & 4 deletions certora/specs/pods/EigenPodManager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ methods {

// external calls to EigenPod
function _.withdrawRestakedBeaconChainETH(address,uint256) external => DISPATCHER(true);

// external calls to DelayedWithdrawalRouter (from EigenPod)
function _.createDelayedWithdrawal(address, address) external => DISPATCHER(true);

// external calls to PauserRegistry
function _.isPauser(address) external => DISPATCHER(true);
Expand All @@ -40,7 +37,6 @@ methods {
function getPod(address podOwner) external returns (address) envfree;
function ethPOS() external returns (address) envfree;
function eigenPodBeacon() external returns (address) envfree;
function beaconChainOracle() external returns (address) envfree;
function getBlockRootAtTimestamp(uint64 timestamp) external returns (bytes32) envfree;
function strategyManager() external returns (address) envfree;
function slasher() external returns (address) envfree;
Expand Down
2 changes: 1 addition & 1 deletion pkg/bindings/AVSDirectory/binding.go

Large diffs are not rendered by default.

1,969 changes: 0 additions & 1,969 deletions pkg/bindings/DelayedWithdrawalRouter/binding.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/bindings/DelegationManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/bindings/EigenPod/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/bindings/EigenPodManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/bindings/EigenStrategy/binding.go

Large diffs are not rendered by default.

212 changes: 0 additions & 212 deletions pkg/bindings/IBeaconChainOracle/binding.go

This file was deleted.

Loading

0 comments on commit 88c5bc4

Please sign in to comment.