You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i'm trying to improve the gas tests on the aave-dao repository atm and am facing an issue with isolation.
As far as i can understand the isolate flag should isolate top level calls from the test setup, when i test gas usage of the getUserAccountData method, it seems like it is in fact getting affected by the test setup.
In case one the setUp did not yet touch the aave oracle, so fetching the price via AaveOracle::getAssetPrice(USDX: [0xffD4505B3452Dc22f8473616d50503bA9E1710Ac]) costs [7865] gas.
In the second case the setUp did borrow some assets, which in turn will fetch oracle prices for validation. Due to storage hotness the cost dropped to [1365].
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (59f354c 2024-12-11T00:29:25.224313000Z)
What command(s) is the bug in?
forge test --isolate
Operating System
macOS (Apple Silicon)
Describe the bug
Hello, i'm trying to improve the gas tests on the aave-dao repository atm and am facing an issue with isolation.
As far as i can understand the isolate flag should isolate top level calls from the test setup, when i test gas usage of the
getUserAccountData
method, it seems like it is in fact getting affected by the test setup.In case one the setUp did not yet touch the aave oracle, so fetching the price via
AaveOracle::getAssetPrice(USDX: [0xffD4505B3452Dc22f8473616d50503bA9E1710Ac])
costs[7865]
gas.In the second case the setUp did borrow some assets, which in turn will fetch oracle prices for validation. Due to storage hotness the cost dropped to
[1365]
.Case 1:
Case 2:
The text was updated successfully, but these errors were encountered: