Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge Version: 1.5.1-dev Commit SHA: e589ccf
What version of Foundryup are you on?
foundryup: 1.5.0
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
When creating forks, the default Spec (hardfork) is being used for it (currently prague).
This is surprising as I would expect it to either use the fork's actual EVM version or keep the environment's Spec (which is the behavior that the section on evm_version configuration suggests).
The following test fails:
/// forge-config: default.evm_version = "cancun"
function testKeepsEvmVersion() public {
assertEq(vm.getEvmVersion(), "cancun");
vm.createSelectFork("anyfork", 1);
vm.assertEq(vm.getEvmVersion(), "cancun"); // is "prague"
}