Whenever I do a fork on mainnet at latest with hardhat, it's never at the latest block. Why is that? For example in the below:
console.log("BLOCK FRO ALCHEMY: ", (await alchemyEthProvider.getBlock("latest")).number); //block N
console.log("BLOCK FROM HARDHAT", (await hardhatProvider.getBlock("latest")).number); //block N-5
The hardhat settings for mainnet forking just uses the same provider as alchemyEthProvider
above, so it's sourced from the same provider, ultimately. But for some reason, forking is a bit slower.