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

Fix/fuzz tests improvements #178

Merged
merged 11 commits into from
Jul 29, 2024

Conversation

0xteddybear
Copy link

No description provided.

@0xteddybear 0xteddybear marked this pull request as ready for review July 26, 2024 23:53
package.json Outdated Show resolved Hide resolved
* feat: creating BCoWPoolForTest to avoid modifying core contracts

* fix: test:echidna script

* fix: safeTransfer issue with echidna
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: MIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why only this one is MIT? i think we should make all test files MIT

function bmul_exposed(uint256 a, uint256 b) public pure returns (uint256) {
return bmul(a, b);
}
// function fuzz_settlerSettle() public {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we remove this alltogether?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't remove it because I interpreted @drgorillamd intended to implement it at some point

Comment on lines 91 to 92
calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut No newline at end of file
calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird..

@@ -227,6 +229,7 @@ contract FuzzProtocol is EchidnaTest {
// 19
assert(pool.isFinalized());
} catch (bytes memory errorData) {
// 25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Copy link
Member

@wei3erHase wei3erHase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 !

@0xteddybear 0xteddybear merged commit 42d2a04 into feat/fuzz-symb-tests Jul 29, 2024
4 checks passed
@0xteddybear 0xteddybear deleted the fix/fuzz-tests-improvements branch July 29, 2024 15:58
wei3erHase added a commit that referenced this pull request Aug 2, 2024
* feat: echidna and halmos bmath bnum protocol

* fix: remove tests halmos cannot handle

* fix: setup cow pool

* chore(wip): echidna

* feat: clamp util

* feat(echidna): prop and tob erc20

* test(echidna): protocol prop (part)

* test(echidna): swap/join prop (part)

* test(echidna): all properties

* test(halmos): part

* feat: summary prop md and last tests

* chore: reorg

* feat: more bnum pain

* chore: format

Co-authored-by: Weißer Hase <[email protected]>

* chore: format

Co-authored-by: Weißer Hase <[email protected]>

* chore: typo

Co-authored-by: Weißer Hase <[email protected]>

* chore: typo

Co-authored-by: Weißer Hase <[email protected]>

* test(echidna): more bnum tests

* chore: unused import

* chore: more assert in protocol

* feat: evm version

* chore: summary

* fix: direct transfer then swapExactOut case

* chore: fmt

* feat: shanghai in summary

* fix: typo

* chore: typo

* chore: revert consistency

* chore: summary fmt

* chore: fmt

* Fix/fuzz tests improvements (#178)

* chore: fix linter setup

* chore: update smocked files

* chore: add missing spdx identifier

* chore: add an npm script to run echidna tests

* test: ensure SpotPriceAfterBelowSpotPriceBefore is never thrown

* chore: fix natspec issues

* test: ensure fuzz_joinExitPool body is runnable

* chore: cleaning up fuzz (#179)

* feat: creating BCoWPoolForTest to avoid modifying core contracts

* fix: test:echidna script

* fix: safeTransfer issue with echidna

* chore: update test contract licenses

* test: document property 25

* chore: remove unimplemented function

---------

Co-authored-by: Weißer Hase <[email protected]>

* chore: update forge snapshots

* chore: update gas snapshots

* chore: updating Properties document after merge

* dev: improving bmath fuzz test (#184)

* feat: improving bmath fuzz test

* chore: updating Properties file

* feat: adding min amount to test environment

* test: ensure results are 0.1% from each other (#187)

---------

Co-authored-by: teddy <[email protected]>

* docs: update test summary (#189)

* chore: fuzz sym fixes (#190)

* test: deal with previously commented code

* chore: pass name and symbol to ForTest contracts

* fix: work around hevm not supporting mcopy

* fix: remove unprovable property and replace it with two provable ones

---------

Co-authored-by: Weißer Hase <[email protected]>
Co-authored-by: teddy <[email protected]>
Co-authored-by: Weißer Hase <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants