edr icon indicating copy to clipboard operation
edr copied to clipboard

Allow forking blocks with future timestamps

Open fvictorio opened this issue 6 months ago • 0 comments

If EDR forks a block whose timestamp is in "the future", then it panics with an error like this:

thread 'tokio-runtime-worker' panicked at /build/crates/edr_provider/src/data.rs:2564:18:
current time must be after fork block: SystemTimeError(3340.313588137s)

The easiest way to reproduce this manually is to just set the system clock back one hour and then fork mainnet.

I don't see any good reason to disallow this and, as far as I can tell, pre-EDR Hardhat didn't have this behavior.

See https://github.com/zemse/hardhat-tracer/issues/74#issuecomment-2271140832 for more context.

fvictorio avatar Aug 08 '24 08:08 fvictorio