github trufflesuite/ganache v7.4.4-alpha.0

latest releases: v7.9.2, ganache@7.9.2, v7.9.1...
pre-release20 months ago

 Highlights   Fixes   Changelog   Known Issues   Future Plans 


Jump below to our highlights to see notes about post-merge Ganache!

If you have some time, we encourage you to browse our issues to find anything you'd like implemented/fixed sooner. Give them a +1 and we'll use this community feedback to help prioritize what we work on! Or better yet, open a new issue or open a PR to fix an existing issue.

We've changed 126 files across 3 merged pull requests, tallying 12,166 additions and 11,364 deletions, since our last release.


Highlights

This release introduces support for the Merge! In preparation for the merge, our friends at ethereumjs were working hard on a huge new release with quite a few breaking changes. Because we rely so heavily on the work that ethereumjs does, these breaking changes impacted just about every nook and cranny of the Ganache code base. We wanted to get the merge features to our users as soon as possible, while also doing our due diligence to make sure the sweeping changes made by the ethereumjs upgrade don't affect Ganache's stability. With all that in mind, we have an alpha release out today with support for the Merge!

This introduces a few important changes and features that are worth explaining.

Important Changes

  • Upgrading ethereumjs required dropping support for NodeJS v12. In Ganache v7.0.0 we gave a deprecation notice for node 12, and this release finalizes the removal of this version. To use Ganache, you'll need to install NodeJS v14 or greater.
  • Ethererumjs also dropped support for the Kovan testnet. We were already slated to remove zero-config mainnet forking support for Kovan in October; if you need Kovan support, we recommend using up to v7.4.3 of Ganache.

New Feature

The only new feature that could potentially impact our users is the introduction of the finalized and safe block tags. These can be used with eth_getBlockByNumber, or any other RPC method that receives a block tag:

const finalizeBlock = await provider.request({ method: "eth_getBlockByNumber", params: ["finalized", true] } );
const safeBlock = await provider.request({ method: "eth_getBlockByNumber", params: ["safe", true] } );

Note: These new block tags are aliases for the existing latest block tag.

back to top


Fixes

fix: calling evm_mine with a timestamp argument should reflect the change of time in subsequent blocks (#3531)

Previously, calling evm_mine with a timestamp argument would result in a block with the specified timestamp, but subsequent blocks would have a timestamp that didn't reflect this change in time. This only occurred when miner.timestampIncrement is unspecified or clock.

const provider = ganache.provider();

await provider.request({ method: "evm_mine", params: ["0x1"] });
const { timestamp: firstTimestamp } = await provider.request({
  method: "eth_getBlockByNumber",
  params: ["latest", false],
});

// wait 1 second before mining the second block
await new Promise((resolve, reject) => setTimeout(resolve, 1000));

await provider.request({ method: "evm_mine", params: [] });
const { timestamp: secondTimestamp } = await provider.request({
  method: "eth_getBlockByNumber",
  params: ["latest", false],
});

console.log({
  firstTimestamp,
  secondTimestamp,
});

Will output something like:

{ firstTimestamp: '0x1', secondTimestamp: '0x5e0be0ff' }

Where secondTimestamp is the current time in seconds, but should be 0x2.

With this change, blocks mined after providing a timestamp parameter to evm_mine, will have timestamps that reflect the change in time.

back to top


Changelog

back to top


Known Issues

Top Priority:

  • debug_storageRangeAt fails to find storage when the slot was created earlier in the same block (#3338)
  • Add eth_feeHistory RPC endpoint (#1470)
  • Add eth_createAccessList RPC method (#1056)

Coming Soon™:

  • Implications failed: fork.headers -> url (#2627)
  • In Geth chain-mode, logic to accept/reject transactions based on gas price/limit should match Geth (#2176)
  • evm_mine and miner_start don't respect --mode.instamine=eager (#2029)
  • evm_setAccount* is race-conditiony (#1646)
  • @ganache/filecoin@alpha doesn't work with ganache@alpha (#1150)
  • Launching ganache with fork is throwing revert errors when communicating with 3rd party contracts (#956)
  • Build a real pending block! (#772)
  • VM Exception when interfacing with Kyber contract (#606)
  • After calling evm_mine, eth_getLogs returns same logs for all blocks (#533)
  • personal_unlockAccount works with any password (#165)
  • --db Option Requires Same Mnemonic and Network ID (#1030)

back to top


Future Plans

Top Priority:

  • Add flag for starting ganache in detached mode (#1001)
  • Accept a genesis.json file (#1042)

Coming Soon™:

  • Switch to esbuild to make build times faster/reasonable (#1555)
  • Add eip-155 support (#880)
  • Allow to sync forked chain to the latest block (#643)
  • Implement a streaming trace capability (#381)
  • Improve log performance when forking (#145)
  • Log contract events (#45)

back to top

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


💖 The Truffle Team

Don't miss a new ganache release

NewReleases is sending notifications on new releases.