github trufflesuite/ganache v7.0.1

latest releases: v7.9.2, ganache@7.9.2, v7.9.1...
2 years ago

 Fixes   Changelog   Known Issues   Future Plans 

Since the release of Ganache v7, we've seen exiting increase in engagement and downloads and an uptick in repo star gazers. Welcome to our new users following along!

Thank you to all of those who have opened issues (@teknoxic, @PeterYinusa, @NikZak, @haseebrabbani, @gorbak25, @fabianorodrigo), you are a huge help and you keep us humble 😅. We've got two fixes out for you today!

We've changed 13 files across 3 merged pull requests, tallying 247 additions and 86 deletions, since our last release.


Fixes

  • Restructure Errors on eth_call
  • Keep an index to latest block in the persisted database

Restructure Errors on eth_call (#2186)

Before this change, errors from eth_call were formatted in our "non-standard" vmErrorsOnRPCResponse format, which uses the error's data property to store some extra helpful information (program counter, hash, etc.):

{
   "error": {
     "message": "...",
     "code": ...
     "data": {
          ... bunch of props, like `hash` and `programCounter`...
         "result": "<raw revert hex string>" <---- this moves (See below)
     }
   }
}

The problem with this approach is that it differs from how a real node handles these errors, causing our users to have to handle eth_call errors differently when using Ganache. Now, the error's data property only contains the raw revert hex string, which should more closely match real node's error handling:

{
   "error": {
     "message": "...", // <- we'll change the message
     "code": ...
     "data": "<raw revert hex string>"  <---- new home
   }
}

Our hope is that this will allow users to remove any conditionals handling errors differently between Ganache and real Ethereum nodes.

back to fixes

Keep an index to latest block in the persisted database (#2196)

Ganache wasn't saving a pointer to the "latest" block correctly, so when a persisted database (the dbPath flag) was restarted after block 255 (2^⁸-1) the "latest" block would always be set to block 255 (this pattern would occur again once blocks reached 2¹⁶ - 1, 2²⁴ - 1, 2³² - 1 and so on). Ganache now tracks the index correctly.

back to fixes

back to top


Changelog

back to changelog

back to top


Known Issues

Top Priority Issues:

  • evm_mine and miner_start don't respect --mode.instamine=eager (#2029)
  • Ganache forking is not working as expected (#2122)
  • Ganache's provider type is not compatible with Web3 (#2125)
  • Ganache v7.0.1 - typings are broken (#2134)
  • Simulating transactions on Ganache v7 fork throws insufficient funds error (#2162)
  • A rejected transaction should possibly be added back into the pool (#2176)
  • Shutting down the Ganache Server v7.0.1 (#2185)
  • Node.js v12 outputs a µWS warning in the console (#2095)

Coming Soon™:

  • evm_setAccountNonce is race-conditiony (#1646)
  • --miner.callGasLimit implementation is wrong (#1645)
  • We don't return a proper pending block (#772)
  • Forking doesn't work in the browser (#1245)
  • Uncles aren't fully supported when forking (#786)
  • Forking may fail in weird and unexpected ways. We need to "error better" here (#615)
  • Node.js v12 doesn't handle memory as well as 14+ and may crash computing very large debug_traceTransaction results (#2106)
  • Our bundle size is larger than ideal (#2096)

back to top


Future Plans

  • Update the eth_maxPriorityFeePerGas RPC method to return as Geth does, eth_gasPrice - baseFeePerGas (#2097)
  • Add support for the eth_feeHistory RPC method (#1470)
  • Support for enabling eligible draft EIPs before they are finalized or considered for inclusion in a hard fork (#1507)
  • New hard fork support well in advance of the hard fork launch (#2099)
  • Add an eth_createAccessList method (#1056)
  • Track test performance metrics over time (#2105)
  • Track real world Ganache usage (opt-in and anonymized) to better tune performance and drive bug fixes and feature development (#2100)
  • Track test coverage (#2101)
  • evm_mine will return the new blocks instead of just 0x0 (#536)
  • Add new evm_setCode and evm_setStorageAt RPC methods (#649)
  • Make evm_snapshot ids globally unique (unpredictable instead of a counter) (#655)
  • Support eth_getRawTransactionByHash RPC method (#135)
  • Support debug_accountAt RPC method (#813)
  • Allow "mining" to be disabled on start up (#248)
  • Set CLI options via config file, package.json, or ENV vars (#2102)
  • Create a CLI interactive/REPL mode (#2103)
  • Enable a CLI daemon mode (#2104)
  • "Flavor" Plugins: We're building support for Layer 2 plugins into Ganache so we can start up and manage other chains. e.g., The ganache filecoin command will look for the @ganache/filecoin package and start up a Filecoin and IPFS server.
  • Multi-chain configurations: you'll be able to start up your project's entire blockchain "ecosystem" from a single ganache command: e.g., ganache --flavor ethereum --flavor filecoin --flavor optimism.
    • this is where defining your CLI options via JSON config will come in very handy!
  • We've laid the groundwork for additional performance improvements. We expect to see an additional 2-5x speed up for typical testing work loads in the near future.

Open new issues (or join our team) to influence what we gets implemented and prioritized.

back to top


💖 The Truffle Team

Don't miss a new ganache release

NewReleases is sending notifications on new releases.