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 living vertigo mutations #618

Closed
Rubilmax opened this issue Nov 23, 2023 · 5 comments
Closed

Test living vertigo mutations #618

Rubilmax opened this issue Nov 23, 2023 · 5 comments

Comments

@Rubilmax
Copy link
Contributor

Rubilmax commented Nov 23, 2023

Mutation testing report:
Number of mutations:    163
Killed:                 124 / 163

Mutations:
Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/Morpho.sol
    Line nr: 245
    Result: Lived
    Original line:
                 _accrueInterest(marketParams, id);

    Mutated line:
                 

Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/Morpho.sol
    Line nr: 129
    Result: Lived
    Original line:
                 _accrueInterest(marketParams, id);

    Mutated line:
                 


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/libraries/periphery/MorphoStorageLib.sol
    Line nr: 50
    Result: Lived
    Original line:
                     uint256(keccak256(abi.encode(user, keccak256(abi.encode(id, POSITION_SLOT))))) + SUPPLY_SHARES_OFFSET

    Mutated line:
                     uint256(keccak256(abi.encode(user, keccak256(abi.encode(id, POSITION_SLOT))))) - SUPPLY_SHARES_OFFSET


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/libraries/periphery/MorphoStorageLib.sol
    Line nr: 62
    Result: Lived
    Original line:
                 return bytes32(uint256(keccak256(abi.encode(id, MARKET_SLOT))) + TOTAL_SUPPLY_ASSETS_AND_SHARES_OFFSET);

    Mutated line:
                 return bytes32(uint256(keccak256(abi.encode(id, MARKET_SLOT))) - TOTAL_SUPPLY_ASSETS_AND_SHARES_OFFSET);


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/libraries/periphery/MorphoStorageLib.sol
    Line nr: 90
    Result: Lived
    Original line:
                 return bytes32(uint256(keccak256(abi.encode(id, ID_TO_MARKET_PARAMS_SLOT))) + LOAN_TOKEN_OFFSET);

    Mutated line:
                 return bytes32(uint256(keccak256(abi.encode(id, ID_TO_MARKET_PARAMS_SLOT))) - LOAN_TOKEN_OFFSET);
@QGarchery
Copy link
Contributor

I think this is the reference to the tool.

This seems to be an excerpt of the ouput. Can you provide the full ouput please and how to get it (parameters and configuration) ?

@MerlinEgalite
Copy link
Contributor

Indeed @Rubilmax you should output the logs into a file instead of relying on the terminal output I think

Here are my logs meanwhile @QGarchery: log.txt

@Rubilmax
Copy link
Contributor Author

I don't get the difference between your file and my logs @MerlinEgalite @QGarchery

It is an excerpt because I removed all mutations that were killed or errored at compilation, leaving only the viable mutations that we should test

@QGarchery
Copy link
Contributor

QGarchery commented Nov 28, 2023

It is an excerpt because I removed all mutations that were killed or errored at compilation, leaving only the viable mutations that we should test

Ok got it now, sounds good.

How did you run the tool though ?

@Rubilmax
Copy link
Contributor Author

How did you run the tool though ?

As indicated in their README: clone their repo, install python environment then run python file within this repo
But it took a while...

@MathisGD MathisGD closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants