2

I am trying to run ganache-cli with istanbul --hardfork, but I am having following error:

Error: Hardfork istanbul not set as supported in supportedHardforks


$ ganache-cli --version
Ganache CLI v6.4.1 (ganache-core: 2.5.3)

$ ganache-cli --allowUnlimitedContractSize --port 8547 --gasLimit 6721975 --accounts 10 --hardfork istanbul
Error: Hardfork istanbul not set as supported in supportedHardforks
    at e.setHardfork (/Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:2:148221)
    at new e (/Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:2:147540)
    at new _ (/Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:61:490034)
    at v.createVMFromStateTrie (/Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:47:116822)
    at /Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:47:116382
    at /Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:47:117447
    at /Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:61:1841439
    at /Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:61:1840514
    at /Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:61:1845356
    at /Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:61:1842719
    at /Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:61:1863594
    at /Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:61:1870971
    at ReadFileContext.callback (/Users/alper/.npm-packages/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:61:1869433)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:242:13)

[Q] What should I do to fix it?

2

As of December 30, 2019, ganache-cli support for Istanbul is only available via version 6.8.0-istanbul0 which is marked as a beta.

To upgrade to this version:

npm uninstall ganache-cli -g
npm install ganache-cli@istanbul -g
|improve this answer|||||
  • So how bad is it if I have conducted all of my "localhost tests" on ganache-cli v6.7.0? Is there anything that I should worry about? – goodvibration Dec 30 '19 at 19:58
  • The biggest concern is around the SLOAD gas reprice and it's potential impact on address.transfer. See medium.com/consensys-diligence/… – iamdefinitelyahuman Dec 30 '19 at 20:06
  • Also, if you are using solc 0.6.0 you should compile with the --evm-version petersburg flag when doing local testing, to avoid use of the new SELFBALANCE opcode. But that's not a security issue - just a potential source of confusion when tests fail :) – iamdefinitelyahuman Dec 30 '19 at 20:09
  • 1
    Oh yeah, I'm aware of that one... though I believe it's actually from v0.5.13. See my answer here from yesterday (feel free to correct it if I was wrong in assuming that). – goodvibration Dec 30 '19 at 20:19
  • Oooh good catch! It says istanbul has been the default evm ruleset since 0.5.14 but it must have been available prior if SELFBALANCE was in use in 0.5.13. – iamdefinitelyahuman Dec 30 '19 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.