NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.28k stars 1.41k forks source link

hardhat node fails to start with latest geth 1.14.11 #5816

Closed nicolae-quorum-ex closed 2 weeks ago

nicolae-quorum-ex commented 4 weeks ago

The 1.14.11 go-ethereum release has removed the totalDifficulty from the eth.getBlock RPC API.

When trying to start the hardhat node forked from my sepolia testnet node I get the following error:

$ RUST_BACKTRACE=full npx hardhat node
thread 'tokio-runtime-worker' panicked at /build/crates/edr_evm/src/blockchain/remote.rs:232:14:
Must be present as this is not a pending block
stack backtrace:
   0:     0x7d8b36e3d835 - <unknown>
   1:     0x7d8b36e6533b - <unknown>
   2:     0x7d8b36e3ac4f - <unknown>
   3:     0x7d8b36e3d60e - <unknown>
   4:     0x7d8b36e3e739 - <unknown>
   5:     0x7d8b36e3e47d - <unknown>
   6:     0x7d8b36e3ebd3 - <unknown>
   7:     0x7d8b36e3eab4 - <unknown>
   8:     0x7d8b36e3dcf9 - <unknown>
   9:     0x7d8b36e3e7e7 - <unknown>
  10:     0x7d8b36280d83 - <unknown>
  11:     0x7d8b36e630fc - <unknown>
  12:     0x7d8b36280d4c - <unknown>
  13:     0x7d8b36495c3b - <unknown>
  14:     0x7d8b36483de3 - <unknown>
  15:     0x7d8b36684fe2 - <unknown>
  16:     0x7d8b365696ca - <unknown>
  17:     0x7d8b364be3a2 - <unknown>
  18:     0x7d8b3642b43b - <unknown>
  19:     0x7d8b366f414a - <unknown>
  20:     0x7d8b36469fb4 - <unknown>
  21:     0x7d8b36d9928d - <unknown>
  22:     0x7d8b36d9c65c - <unknown>
  23:     0x7d8b36d9cfe2 - <unknown>
  24:     0x7d8b36e4168b - <unknown>
  25:     0x7d8b65c9ca94 - start_thread
                               at ./nptl/pthread_create.c:447:8
  26:     0x7d8b65d29c3c - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
  27:                0x0 - <unknown>

I had to roll back to geth 1.14.10 (which still has the totalDifficulty field).

I'm using hardhat version 2.22.13.

kanej commented 2 weeks ago

The EDR fix has been released as part of Hardhat v2.22.14:

https://github.com/NomicFoundation/hardhat/releases/tag/hardhat%402.22.14