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

test(medusa): requester properties #57

Merged
merged 29 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
730db68
test: property-id 1
0xJabberwock Nov 19, 2024
24f492c
test(medusa): property-id 2
0xJabberwock Nov 20, 2024
e45ff98
test(medusa): epoch manager handler
0xJabberwock Nov 20, 2024
149474b
test(medusa): remove _ghost_epochChainIds
0xJabberwock Nov 20, 2024
823c735
test(medusa): update ghost state in property function
0xJabberwock Nov 20, 2024
f13c8ff
test(medusa): properties md update
simon-something Nov 20, 2024
c0ffee6
refactor(medusa): sanity check in setup
simon-something Nov 21, 2024
c0ffeed
chore(medusa): lib deployement
simon-something Nov 21, 2024
28d711a
test(medusa): tweak ebo request creator handler
0xJabberwock Nov 21, 2024
28d58da
test(medusa): assertion failure reasons
0xJabberwock Nov 21, 2024
5fafe29
chore(medusa): refactor chainId handling
simon-something Nov 22, 2024
1e453c7
chore(medusa): rm epoch mgr handler
simon-something Nov 22, 2024
59b46aa
chore(medusa): bound min max
simon-something Nov 22, 2024
c19b12d
chore(medusa): rm useless bounds
simon-something Nov 22, 2024
b7da278
chore(medusa): redo constraint we needed
simon-something Nov 22, 2024
3e7ae3e
test(medusa): track chains added after setup
0xJabberwock Nov 22, 2024
8072e09
test(medusa): wrap ghost logic within try blocks
0xJabberwock Nov 25, 2024
1c33374
test(medusa): rewrite prop-1 to assert
0xJabberwock Nov 25, 2024
98303e6
test(medusa): remove handlers around setters
0xJabberwock Nov 25, 2024
ed0d9fc
test(medusa): comment out chain removal handler
0xJabberwock Nov 27, 2024
10a7a07
test(medusa): unwrap ghost logic from try blocks
0xJabberwock Nov 27, 2024
710c3d1
test(medusa): compliant properties
0xJabberwock Nov 27, 2024
bc114a9
test(medusa): correct prop-1
0xJabberwock Nov 27, 2024
3730d59
test(medusa): disputer properties (#58)
simon-something Nov 27, 2024
23dff81
test(medusa): fix compilation after merge
0xJabberwock Nov 27, 2024
049f6fe
test(medusa): aggregate properties 1 and 2
0xJabberwock Nov 27, 2024
c349092
test(medusa): update helper functions
0xJabberwock Nov 27, 2024
9498da3
Merge branch 'test/handler-cov' of github-wonderland:defi-wonderland/…
0xJabberwock Nov 27, 2024
70ae4f8
test(medusa): progress proposer properties
0xJabberwock Nov 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/invariants/handlers/HandlerEBORequestCreator.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ contract HandlerEBORequestCreator is BaseHandler {
// Get current request data
IOracle.Request memory requestData = eboRequestCreator.getRequestData();

// Build request module parameters
IEBORequestModule.RequestParameters memory requestParams =
abi.decode(requestData.requestModuleData, (IEBORequestModule.RequestParameters));
requestParams.epoch = _epoch;
requestParams.chainId = chainId;
requestData.requestModuleData = abi.encode(requestParams);

// Calculate request ID using same logic as Oracle
bytes32 requestId = keccak256(abi.encode(requestData));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ pragma solidity 0.8.26;

import {HandlerParent} from '../handlers/HandlerParent.t.sol';

contract PropertyEbo is HandlerParent {
contract PropertyEBORequestCreator is HandlerParent {
//solhint-disable no-empty-blocks
constructor() {}

/// @custom:property-id 1
/// @custom:property Requester can always create a request as long as the same chainId/epoch isn't requested yet
// function property_canAlwaysCreateRequest(uint256 _epoch, uint256 _chainId) external {
// _epoch = _boundEpoch(_epoch);
// string memory _chainId = _generateChainId(_chainId);
// }
function property_canAlwaysCreateRequest(uint256 _epoch, uint256 _chainIdSeed) external {
try HandlerParent(this).handleCreateRequest(_epoch, _chainIdSeed) {}
catch {
assert(false);
0xJabberwock marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
4 changes: 2 additions & 2 deletions test/invariants/properties/PropertyParent.t.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

import {PropertyEbo} from './PropertyEbo.t.sol';
import {PropertyEBORequestCreator} from './PropertyEBORequestCreator.t.sol';
import {PropertySanityCheck} from './PropertySanityCheck.t.sol';

contract PropertyParent is PropertyEbo, PropertySanityCheck {
contract PropertyParent is PropertyEBORequestCreator, PropertySanityCheck {
//solhint-disable no-empty-blocks
constructor() {}
}
Loading