balancer / balancer-v3-monorepo

GNU General Public License v3.0
30 stars 7 forks source link

Close the bale on the warning firehose #674

Closed EndymionJkb closed 1 month ago

EndymionJkb commented 1 month ago

Description

Running yarn test gives an absolute flood of warnings before the actual tests begins - a tide of yellow that we all just ignore, hoping to see that sweet green of passing tests at the end. A lot of it is warning about the init size of contracts (e.g. Mocks) that will never be deployed, or the size of contracts we know are temporarily over, but will be fixed.

There's also a ton of forge errors arising from applying storage rules for contracts to test contracts (e.g., "function can be view" or "function can be pure", because the test doesn't write or read state).

What if there are "real" warnings lurking in there, though? We'd have to inspect the output very carefully to find them. Much better to drain that swamp, suppress spurious warnings, fix all the minor ones, and see what lurks in the mud below.

Turns out there were at least two hidden bugs: one that worked accidentally because the protocol and regular swap fees happened to have the same value.

Type of change

Checklist:

Issue Resolution