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
fresh install on new(to me) setup. using WSL ubuntu. do foundryup, everything is good. start an anvil local chain, it spins up nicely.
Genesis Timestamp
==================
1716225685
Listening on 127.0.0.1:8545
eth_blockNumber
Anvil is ready on port 8545.
then I go to run my deploy script with forge script script/Deploy.s.sol --broadcast --fork-url http://localhost:8545
get strange error I have never seen before when running this same script against local anvil on a different computer I have.
[⠊] Compiling...
[⠔] Compiling 35 files with Solc 0.8.25
[⠒] Solc 0.8.25 finished in 1.37s
Compiler run successful!
2024-05-20T17:21:29.426517Z ERROR foundry_evm_core::fork::init: It looks like you're trying to fork from an older block with a non-archive node which is not supported. Please try to change your RPC url to an archive node if the issue persists.
Error:
Could not instantiate forked environment with fork url: http://localhost:8545
Context:
- Failed to get block for block number: 12
latest block number: 12
I am not sure what an "archive node" is, and didn't see any mention of it on https://book.getfoundry.sh/reference/anvil/
tried explicitly passing various --fork-block-number, which didn't really change much. tried googling, and looked through the issues here. I see nothing. tried installing an earlier commit of foundry with foundryup -C 63fff3510408b552f11efb8196f48cfe6c1da664 and got same results. tried logging within my Deploy.s.sol, but none of the logs were ever hit, which leads me to believe it is happening at some earlier layer of code I didn't write. perhaps something in here?
import { Script } from "forge-std/Script.sol";
I'm happy to provide more information if needed.
The text was updated successfully, but these errors were encountered:
more digging seems to show that it's from anvil being started with --load-state option which seems to fail on the particular serialized state I'm using
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (54d8510 2024-05-20T00:19:01.949744889Z)
What command(s) is the bug in?
forge script
Operating System
Windows
Describe the bug
fresh install on new(to me) setup. using WSL ubuntu. do foundryup, everything is good. start an anvil local chain, it spins up nicely.
then I go to run my deploy script with
forge script script/Deploy.s.sol --broadcast --fork-url http://localhost:8545
get strange error I have never seen before when running this same script against local anvil on a different computer I have.
I am not sure what an "archive node" is, and didn't see any mention of it on https://book.getfoundry.sh/reference/anvil/
tried explicitly passing various
--fork-block-number
, which didn't really change much. tried googling, and looked through the issues here. I see nothing. tried installing an earlier commit of foundry withfoundryup -C 63fff3510408b552f11efb8196f48cfe6c1da664
and got same results. tried logging within myDeploy.s.sol
, but none of the logs were ever hit, which leads me to believe it is happening at some earlier layer of code I didn't write. perhaps something in here?I'm happy to provide more information if needed.
The text was updated successfully, but these errors were encountered: