Closed nazariyv closed 1 year ago
It looks like you hit Etherscan rate limiting when fetching a contract type.
It also smells like a proxy (safe?) related issue and the reason you may not be hitting it locally is that you already successfully have the contracts cached.
I fixed it by fixing the ape-foundry plugin version to "0.6.14".
Can you try 0.6.15 and see if the problem still happens? I am having a hard time knowing how 0.6.15 of ape-foundry could contain the bug if it does, that is a small amount of diff to analyze. I have a hunch the bug was maybe in evm-trace a23 (we released a24 a little bit ago). Also, I had a similar issue with Anvil and Solidity today ...
And one last thing, do you have your Etherscan API key set? If that 429 caused this, then that would explain why eventually it stopped happening (contracts eventually cached). But if you set the API key that may help, or include the contracts in your projects.
so the ci job that is failing: https://github.com/nazariyv/ape-recursion-error/actions/runs/6051011716/job/16421551565, is running "0.6.15": https://github.com/nazariyv/ape-recursion-error/blob/main/ape-config.yaml#L5
I have actually never set an etherscan api key. Neither locally, nor in github secrets (for it to pick up in the ci job)
if I downgrade ape-foundry to "0.6.14" you can see that this very same test now passes in the ci with no issue: https://github.com/nazariyv/ape-recursion-error/actions/runs/6054804220/job/16432787905
(no changes to setting etherscan api key anywhere)
The issue must be in that it is failing for some reason to calculate a sourc traceback, likely due to needing contract types and only having etherscan to fetch them from (even though it wasn't given an API key).
So i made foundry handle these errors and work the same as before if stuff like that happens. Let me know (if you can) if that fixes it for you
Not sure how to incorporate the above. Can I specify the version for ape-foundry
via commit hash in ape-config.yaml
?
Not sure how to incorporate the above. Can I specify the version for
ape-foundry
via commit hash inape-config.yaml
?
No, not today. But also our plugins system is just a wrapper around pip
and you can install via commit hashes w/ pip install git+...
Brilliant, this fixes the issue, you can confirm with this job: https://github.com/nazariyv/ape-recursion-error/actions/runs/6066810063/job/16457801974
Using the fixed commit hash for ape-foundry as suggested: https://github.com/nazariyv/ape-recursion-error/commit/4a520bdbf0380a6474c0faf13668bb9351fde3ec
Thank you!
Perfect! We will try and trace down/resolve this issue, but at least you have a workaround for now
I have actually downgraded to ape-foundry 0.6.14, and that works too :) Thanks for figuring this out so quickly!
Environment information
OS: linux
Python Version: 3.11.4
ape
and plugin versions: ape is 0.6.19 ape-foundry is 0.6.15 etherscan is 0.6.10Contents of your
ape-config.yaml
(NOTE: do not post anything private like RPC urls or secrets!): I have made a repo that reproduces the bug. So I will just share that shortly.What went wrong?
We started experiencing CI issues yesterday. No code changed on our side, so we suspected it must be the plugins that ape is pulling in (since we didn't fix foundry version in
ape-config.yaml
). That was correct.Here is the repo I prepped that reproduces the bug: https://github.com/nazariyv/ape-recursion-error
Tests run fine locally, see the Readme in the above repo.
However, running them in CI fails (see last github action: https://github.com/nazariyv/ape-recursion-error/actions/runs/6051011716/job/16421551565)
How can it be fixed?
I fixed it by fixing the
ape-foundry
plugin version to "0.6.14".