github trufflesuite/ganache v7.1.0

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

 Highlights   New Features   Miscellaneous   Changelog   Known Issues   Future Plans 


Here comes our first feature release since Ganache v7.0.0! We've worked through a good chunk of the bugs that have been discovered since the release, so we look forward to starting to add some new features! Don't worry, we're still working through bugs as well. Feel free to give any issues that you'd like to see implemented sooner a 👍 and we'll use this community feedback to help prioritize what we work! Or better yet, open a new issue, open a PR to fix an existing issue, or apply to join our team (we're hiring!) if you really want to get involved.

Speaking of the awesome community of Ganache users, we'd like to extend our gratitude to all issue openers (@fabioberger, @szgyuszi1) and contributors (@domob1812, @dekz, @jeffsmale90, @gnidan) who were a part of this release!

We've changed 9 files across 7 merged pull requests, tallying 1235 additions and 188 deletions, since our last release.


Highlights

VM Overrides During eth_call

Ganache now has support for overriding the contract code and storage and the account balance and nonce for simulations with eth_call. This feature is similarly supported by geth.

The eth_call RPC method now accepts a third override parameter which is a map from an address to the desired state of that address. The state object has the following keys, all of which are optional:

balance: QUANTITY - The balance to set for the account before executing the call.
nonce: QUANTITY - The nonce to set for the account before executing the call.
code: DATA - The EVM bytecode to set for the account before executing the call.
state*: OBJECT - Key-value mapping of storage slot to value that will clear all slots and then override individual slots in the account storage before executing the call.
stateDiff*: OBJECT - Key-value mapping of storage slot to value that will override individual slots in the account storage before executing the call.
*Note - state and stateDiff fields are mutually exclusive.

So, an example override object using all fields overriding multiple addresses could look like the following:

const overrides = {
  "0xd9c9cd5f6779558b6e0ed4e6acf6b1947e7fa1f3": { 
    "nonce": "0xa", 
    "balance": "0xffff", 
    "state": { 
      "0000000000000000000000000000000000000000000000000000000000000001": "0xbaddad42baddad42baddad42baddad42baddad42baddad42baddad42baddad42"
    } 
  },
  "0xebe8efa441b9302a0d7eaecc277c09d20d684540": { 
    "code": "0x123456", 
    "stateDiff": {
      "0000000000000000000000000000000000000000000000000000000000000002": "0xbaddad42baddad42baddad42baddad42baddad42baddad42baddad42baddad42"
    } 
  }
};
const transaction = { ... };
const result = await provider.request({ method: "eth_call", params: [ transaction, "latest", overrides ] });

Like all state changes made with eth_call, the changes are ephemeral and only last for that specific run of eth_call. Happy transaction simulating!

back to top


New Features

  • perf: improve performance of the persistent cache used in forking (#2811)
  • feat: allow balance, code, nonce, and state overrides in eth_call (#2565)

perf: improve performance of the persistent cache used in forking (#2811)

We've found some small adjustments that could be made to our persistent cache to slightly improve forking performance. Even more forking performance improvements are in the works now, too!

back to new features

feat: allow balance, code, nonce, and state overrides in eth_call (#2565)

This feature was demonstrated in our highlights above. We'd like to give a huge thank you to @domob1812 and @dekz for their initial contributions to this one, you both were a huge help.

The PR introducing this feature uses @dekz's #905 as a starting point, and fixes #554 and #2934.

back to new features

back to top


Miscellaneous

  • chore: remove outdated warning about EIP-1193 fork providers (#2856)
  • ci: automated release improvements (#2892)
  • chore: wrap comment at 80 chars (#2987)
  • ci: fix release tagging (#2979)

chore: remove outdated warning about EIP-1193 fork providers (#2856)

This PR removes the warning described in #2558 about non-EIP-1193 providers, since Web3.js appears to be sticking with this kind of provider for the foreseeable future.

back to miscellaneous

ci: automated release improvements (#2892)

This change updates the release automation process in a few ways:

  1. Adds a vX.x.x git tag to each release, in addition to the ganache@X.x.x tag that already was automatically added - Fixes #2279.
  2. After a successful "latest" release (into master), merges master back into develop to keep their commit history in sync.
  3. Signs all automation commits from @TrufBot - Fixes #2882.

back to miscellaneous

chore: wrap comment at 80 chars (#2987)

Just some cleanup - nothing to see here 😄

back to miscellaneous

ci: fix release tagging (#2979)

Our initial attempt at this v7.1.0 release did pan out as expected because our automated release process didn't correctly handle minor version changes. This led to the accidental creation of v7.0.5 😅

This PR updates our automated release process to parse through a release's commits, detect feature commits, and set the new release version accordingly (and hey! It looks like it works! Way to go @davidmurdoch).

back to miscellaneous

back to top


Changelog

back to top


Known Issues

Top Priority:

  • A transaction with maxFeePerGas less than the next block's baseFeePerGas should be rejected (#2176)
  • Ganache v7.0.0 - typings are broken (#2134)
  • ganache forking is not working as expected (#2122)

Coming Soon™:

  • debug_traceTransaction may crash on Node.js v12 (#2106)
  • evm_mine and miner_start don't respect --mode.instamine=eager (#2029)
  • evm_setAccountNonce is race-conditiony (#1646)
  • Add eth_feeHistory RPC endpoint (#1470)
  • @ganache/filecoin@alpha doesn't work with ganache@alpha (#1150)
  • sort executable/pending transactions that have the same price by the time at which the transaction was submitted (#1104)
  • Add eth_createAccessList RPC method (#1056)
  • Launching ganache with fork is throwing revert errors when communicating with 3rd party contracts (#956)
  • Build a real pending block! (#772)
  • Add an upper limit to # of accounts that can be generated by ganache (#736)
  • Incorrect gas cost for SSTORE opcode when using fork feature (#625)
  • Cannot get state root with uncommitted checkpoints error when starting ganache forking with infura RPC endpoint (#618)
  • System Error when sending batch request with 1 not valid item (#402)
  • --db Option Requires Same Mnemonic and Network ID (#1030)

back to top


Future Plans

  • Reduce Bundle Size (#2096)
  • Switch to esbuild to make build times faster/reasonable (#1555)
  • Opt-in tracking (#945)
  • Mine txs in same block with provided sorting (#899)
  • Add eip-155 support (#880)
  • Add support for debug_accountAt RPC method as implemented by Turbo-Geth (#813)
  • Enhance the database to allow for better UX and determinism (#756)
  • Create Project and set Milestones for Ganache interactive docs (#680)
  • idea: add in warning to help switch over to new "pending tx" mode (#674)
  • evm_snapshot ids should be opaque (#655)
  • Support for EIP 1898- Add blockHash to JSON-RPC methods which accept a default block parameter (#973)
  • Upgrade custom rpc method evm_mine to return the new block (#536)
  • Add personal_ecRecover and personal_sign (#995)
  • Add flag for starting ganache in detached mode (#1001)
  • Implement eth_getProof RPC message (#382)
  • Implement a streaming trace capability (#381)
  • Allow mining to be completely disabled on startup (#248)
  • Add support for eth_getRawTransactionByHash (#135)
  • Log contract events (#45)
  • Support IPC endpoint (#759)
  • Accept a genesis.json file (#1042)

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.