foundry-rs / foundry-toolchain

GitHub action to install Foundry
Apache License 2.0
225 stars 92 forks source link

CI Tests failing due to foundry toolchain possibly using an older foundry build #28

Open 0xTimepunk opened 1 year ago

0xTimepunk commented 1 year ago

Hi,

During our test suite with foundry-toolchain/github actions the following error appears:

image
Test result: ok. 5 passed; 0 failed; finished in 1.08s
[269](https://github.com/superform-xyz/super-vaults/actions/runs/4113946632/jobs/7100701243#step:6:270)
2023-02-07T12:37:21.274109Z ERROR sharedbackend: Failed to send/recv `basic` err=GetAccount(0x7fa9385be102ac3eac297483dd6233d62b3e1496, 
[270](https://github.com/superform-xyz/super-vaults/actions/runs/4113946632/jobs/7100701243#step:6:271)
(code: -32000, message: cannot query unfinalized data, data: None)) address=0x7fa9385be102ac3eac297483dd6233d62b3e1496
[271](https://github.com/superform-xyz/super-vaults/actions/runs/4113946632/jobs/7100701243#step:6:272)

[272](https://github.com/superform-xyz/super-vaults/actions/runs/4113946632/jobs/7100701243#step:6:273)
Running 1 test for src/aave-v3/test/AaveV3ERC4626Reinvest.t.sol:AaveV3ERC4626ReinvestTest
[273](https://github.com/superform-xyz/super-vaults/actions/runs/4113946632/jobs/7100701243#step:6:274)
[FAIL. Reason: Failed to get account for 0x7fa9385be102ac3eac297483dd6233d62b3e1496: 0x7fa9385be102ac3eac297483dd6233d62b3e1496]

which appears to be related to https://github.com/foundry-rs/foundry/issues/3874 but was fixed apparently in a nightly build at the end of December as commented here: https://github.com/foundry-rs/foundry/issues/3874#issuecomment-1358862493

It seems to us that the toolchain is possibly not using the latest version with this fix?

Our CI is supposedly using foundry "nightly" build: image

Thank you

PaulRBerg commented 1 year ago

This might be related to the recently added cache - have you tried manually deleting the cache by following the instructions in the README?

0xTimepunk commented 1 year ago

I went to the mentioned caches page and couldn't find any cache.

I added a cache: false to the CI file. Also the issue seems random, because when you try sometimes re-running the CI job it passes without errors.

onbjerg commented 1 year ago

This is likely because the RPC you are talking to either times out, or does not have the data available. Remember that non-archive nodes only support accessing state for the n latest blocks.

0xTimepunk commented 1 year ago

This is likely because the RPC you are talking to either times out, or does not have the data available. Remember that non-archive nodes only support accessing state for the n latest blocks.

We are using quicknodes for all the chains we need the service and all of our nodes are archive nodes. So unless they are timing out, which I would find odd, I would rule out that.

Is it possible that what timeouts is because of foundry itself, expecting to get return data faster than what is possible?. Doesn't seem related foundry-toolchain actually.