Skip to content

Commit

Permalink
test: certora config
Browse files Browse the repository at this point in the history
  • Loading branch information
8sunyuan committed Feb 12, 2024
1 parent 983a4cd commit 695f8f1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
40 changes: 40 additions & 0 deletions certora/config/registryCoordinator.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"files": [
"certora/harnesses/RegistryCoordinatorHarness.sol",
"lib/openzeppelin-contracts/contracts/mocks/ERC1271WalletMock.sol",
"test/mocks/ServiceManagerMock.sol",
"src/StakeRegistry.sol",
"src/BLSApkRegistry.sol",
"src/IndexRegistry.sol",
"lib/eigenlayer-contracts/src/contracts/core/Slasher.sol",
"lib/eigenlayer-contracts/src/contracts/core/AVSDirectory.sol",
"lib/eigenlayer-contracts/src/contracts/core/DelegationManager.sol"
],
"verify": "RegistryCoordinatorHarness:certora/specs/RegistryCoordinator.spec",
"loop_iter": "2",
"parametric_contracts": ["RegistryCoordinatorHarness"],
"packages": [
"@openzeppelin=lib/openzeppelin-contracts",
"@openzeppelin-upgrades=lib/openzeppelin-contracts-upgradeable",
"eigenlayer-contracts=lib/eigenlayer-contracts"
],
"link": [
"RegistryCoordinatorHarness:serviceManager=ServiceManagerMock",
"AVSDirectory:delegation=DelegationManager",
"StakeRegistry:delegation=DelegationManager",
"ServiceManagerMock:_avsDirectory=AVSDirectory",
"RegistryCoordinatorHarness:blsApkRegistry=BLSApkRegistry",
"RegistryCoordinatorHarness:indexRegistry=IndexRegistry",
"RegistryCoordinatorHarness:stakeRegistry=StakeRegistry"
],
"prover_args": [
"-optimisticFallback true",
"-recursionEntryLimit 2",
// "-splitParallel true",
"-mediumTimeout 30",
"-depth 5"
],
"optimistic_loop": true,
"optimistic_hashing": true,
"rule_sanity": "basic"
}
1 change: 1 addition & 0 deletions certora/specs/RegistryCoordinator.spec
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ methods {
function registries(uint256) external returns (address) envfree;
function numRegistries() external returns (uint256) envfree;
function calculateOperatorChurnApprovalDigestHash(
address registeringOperator,
bytes32 registeringOperatorId,
IRegistryCoordinator.OperatorKickParam[] operatorKickParams,
bytes32 salt,
Expand Down
16 changes: 16 additions & 0 deletions certora/specs/setup.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using ServiceManagerMock as serviceManager;
using StakeRegistry as stakeRegistry;
using BLSApkRegistry as blsApkRegistry;
using IndexRegistry as indexRegistry;
using DelegationManager as delegation;
methods {
function _.isValidSignature(bytes32 hash, bytes signature) external => NONDET; // isValidSignatureCVL(hash,signature) expect bytes4;
function _.unpauser() external => unpauser expect address;
function _.isPauser(address user) external => isPauserCVL(user) expect bool;
}
ghost address unpauser;
ghost mapping(address => bool) pausers;
function isPauserCVL(address user) returns bool {
return pausers[user];
}
use builtin rule sanity;

0 comments on commit 695f8f1

Please sign in to comment.