solmate icon indicating copy to clipboard operation
solmate copied to clipboard

ci(forge): fix failing workflow

Open sambacha opened this issue 2 years ago • 4 comments

The previous commit saw a CI failure due to not having --tolerance specified. I took the difference and rounded up (~2.64% difference in gas snapshot to the value of 3).

Also updated the foundry tool chain to the appropriate repo, and updated checkout to use v3.

Description

Describe the changes made in your pull request here.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • [x] Ran forge snapshot?
  • [x] Ran npm run lint?
  • [x] Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

sambacha avatar Sep 03 '23 16:09 sambacha

thanks! but what happened to having a deterministic seed?

transmissions11 avatar Sep 04 '23 17:09 transmissions11

thanks! but what happened to having a deterministic seed?

You want to create a secondary check with tolerance if the original check fails then?

sambacha avatar Sep 05 '23 01:09 sambacha

hm? forge used to use a deterministic random seed such that re-running would always give the same result and we wouldn't need tolerance at all

transmissions11 avatar Sep 05 '23 15:09 transmissions11

hm? forge used to use a deterministic random seed such that re-running would always give the same result and we wouldn't need tolerance at all

https://book.getfoundry.sh/reference/config/testing?highlight=seed#seed

  • Type: string (hexadecimal)
  • Default: none
  • Environment: FOUNDRY_FUZZ_SEED

Optional seed for the fuzzing RNG algorithm.

I think this changed with the revm switchover, not sure tbh.

sambacha avatar Sep 17 '23 13:09 sambacha