-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Bug: forge sends RPC requests for non-existent methods regardless of EVM Version specified #416
Comments
why not just use a constant for maxPriorityFeePerGas = BigNumber.from("2500000000");
maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); for some reason I was thinking that |
Because having a constant max fee per gas is not really correct :D We re-use the algorithm that MyCrypto uses, using the historical values: https://github.com/gakonst/ethers-rs/blob/e24117a1e1d6301d80101c7cc83c93ac4a8b1258/ethers-core/src/utils/mod.rs#L300-L318, which tends to give better estimates in my experience vs hardcoded. |
fyi this fails when using ganache (v7) - ganache does not have this RPC method implemented :( |
Yeah Ganache is still not fully London compatible, nothing we can do about that lol :D The method is in the JSON-RPC spec, tracked here for Ganache trufflesuite/ganache#1470 I added a |
Bug: forge sends request for
eth_feeHistory
on non-london+ EVM VersionsWhen running
forge create
and specifying an EVM Version lower thanberlin
forge will attempt to requesteth_feeHistory
Output
It should handle none, as I did not specify
numberOfRequestedBlocks
.Desired Behavior
by default it should use a value of 1 for
blockCount
andnewestBlock
- or simply do not send this request on any EVM version (or limit it just to post london EVM Versions)eth_feeHistory
response (example)Debug/RUSTC Log output
Raw Log Output
```sh Location: /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1914━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 10 frames hidden ⋮
11: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Resultcore::convert::Infallible,E>>::from_residual::h20d1fb275751fe54
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1914
12: forge::cmd::create::CreateArgs::deploy::{{closure}}::h93c90620ed9e5073
at /Users/sbacha/foundry-docker/foundry/cli/src/cmd/create.rs:
13: <core::future::from_generator::GenFuture as core::future::future::Future>::poll::ha84a55ea845c6e7f
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/future/mod.rs:80
14: tokio::park::thread::CachedParkThread::block_on::{{closure}}::haf8ca52c607682ca
at /Users/sbacha/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/park/thread.rs:263
15: tokio::coop::with_budget::{{closure}}::ha97f2f476892933f
at /Users/sbacha/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/coop.rs:102
16: std::thread::local::LocalKey::try_with::h0f67afacad12cbc9
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/thread/local.rs:399
17: std::thread::local::LocalKey::with::he5fd0962d8fef72e
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/thread/local.rs:375
18: tokio::coop::with_budget::h78a464ccd1aefed4
at /Users/sbacha/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/coop.rs:95
19: tokio::coop::budget::h78b34f00bbe5f4a7
at /Users/sbacha/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/coop.rs:72
20: tokio::park::thread::CachedParkThread::block_on::hd1d7fa6b9d8cfb73
at /Users/sbacha/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/park/thread.rs:263
21: tokio::runtime::enter::Enter::block_on::hd88631fb2265fbe6
at /Users/sbacha/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/runtime/enter.rs:151
22: tokio::runtime::thread_pool::ThreadPool::block_on::h982920b3c061fb06
at /Users/sbacha/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/runtime/thread_pool/mod.rs:77
23: tokio::runtime::Runtime::block_on::h7ad6a6e06036d78c
at /Users/sbacha/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/runtime/mod.rs:463
24: <forge::cmd::create::CreateArgs as forge::cmd::Cmd>::run::h12c3c7d54b26cdc8
at /Users/sbacha/foundry-docker/foundry/cli/src/cmd/create.rs:60
25: forge::main::ha36bb5ae4dda7416
at /Users/sbacha/foundry-docker/foundry/cli/src/forge.rs:34
26: core::ops::function::FnOnce::call_once::h35391823e5f9df29
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227
⋮ 2 frames hidden ⋮
The text was updated successfully, but these errors were encountered: