-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to be used in conjuction with forwarding time helpers #74
Comments
Hey @area, there's definitely something weird going on here, but something that caught my attention is your use of I don't fully understand what |
I can't claim to know exactly what's going on either! However, when trying to use
I assumed that this was something to do with not tracing against an 'in-process' node and didn't think much further about it, but if this could be a symptom of something related that's not working, happy to explore further. |
That's weird, can you double-check that you are using the latest versions of Hardhat and |
I appear to be. Full reproduction steps for that side of things, for you, using
Download this patch for the hardhat config and apply with Then in one console: In a second console:
And then:
|
In that case this seems like a problem on the |
Sorry I was afk last week. I will look into this problem tomorrow and try to fix it. |
Sorry for the long delay. I have tried a fix. Can you please try the release |
This appears to now be possible when using
|
I was able to reproduce this problem when using If Without the Here are steps to reproduce outside of hardhat tracer. Terminal 1:
Terminal 2: $ npx hardhat console --network localhost
> s = await hre.ethers.provider.getSigner(0)
> await s.sendTransaction({to:s.address, data:"0xdeadbeef"})
> await hre.ethers.provider.send("evm_increaseTime", [10000])
> await s.sendTransaction({to:s.address, data:"0xdeadbeef"})
> block_num = await hre.ethers.provider.getBlockNumber()
// 2 Terminal 3: $ npx hardhat console
> hre.network.name
// "hardhat"
> await hre.network.provider.send("hardhat_reset", [{forking: {jsonRpcUrl: "http://127.0.0.1:8545/", blockNumber: 2 }}]);
// thread 'tokio-runtime-worker' panicked at /Users/runner/work/edr/edr/crates/edr_provider/src/data.rs:2503:18:
// current time must be after fork block: SystemTimeError(9978.213897s)
// note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
// Uncaught [Error: task 15 panicked] { code: 'GenericFailure' }
> await hre.network.provider.send("hardhat_reset", [{forking: {jsonRpcUrl: "http://127.0.0.1:8545/", blockNumber: 1 }}]);
// true cc @fvictorio The reason I am doing hardhat_reset is to be able to replay remote transactions locally on EDR. Is it possible to allow remote blocks to use future timestamp? Given that many startups these days offer customisable private testnets RPCs which might have future timestamp. Or maybe a flag that allows for it? |
Maybe my original message was unclear, but I think we're in agreement - when using |
It is currently (as far as I can tell) impossible to trace a transaction that has happened in the future, as might happen in a development environment when using helpers.
Running
npx hardhat node
in one console, in another inside anpx hardhat console
connected to the node:If you now try and trace those transactions:
This command works
This does not work, and fails with:
This error is being thrown here
I was unsure whether to make this here or in the EDR repository directly, but I see @fvictorio is active in this repository as well, so I am hopeful it will end up in the right place regardless!
I haven't tried with a pre-EDR version of hardhat, so do not know if this a regression.
The text was updated successfully, but these errors were encountered: