trufflesuite / ganache

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
2.62k stars 678 forks source link

`eth_getBlockByNumber` returns block header with non-zero difficulty #3851

Closed yehted closed 1 year ago

yehted commented 1 year ago

By default, the --miner.difficulty option is set to 0x1. After the merge, shouldn't it be 0x0 by default? This is causing problems if someone uses, for example, the ethereumjs/block package, method Block.fromRPC(...), where it expects the difficulty to be zero.

davidmurdoch commented 1 year ago

Are you using ganache@alpha

yehted commented 1 year ago

I'm using v7.4.4

davidmurdoch commented 1 year ago

The stable/latest releases don't yet support the merge. You can track progress on it here: https://github.com/trufflesuite/ganache/issues/3693#issuecomment-1284540912

In the meantime you can use https://github.com/trufflesuite/ganache/releases/tag/v7.4.4-alpha.0 if you need merge hardfork logic.