: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.
New Features
Fixes
Miscellaneous
Changelog
Known Issues
Future Plans
Presenting the latest version of Ganache! This release brings a couple of important bug fixes and one new feature: the ability to specify a file path for Ganache to write logs to – handy when using detach mode, where the logs are not (yet) available.
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 59 files across 14 merged pull requests, tallying 2485 additions and 563 deletions, since our last release.
--logging.file
argument (#4195)
Ganache now outputs the hardfork to the console along with the rest of the startup information:
Chain
==================
Hardfork: shanghai
Id: 1337
--logging.file
argument (#4195)Introducing the ability to specify a log file for Ganache to write its logs to. No more sifting through endless terminal output to find that one critical message you need. Just provide a path to your desired log file with ganache --logging.file <path-to-log-file>
, and you're all set! Now you can sit back, relax, and let Ganache do the heavy lifting while you focus on building awesome applications.
ganache instances
is executed without a subcommand (#4368)
mergeForkIdTransition
(#4463)
ganache instances
is executed without a subcommand (#4368)When ganache instances
is executed, a subcommand must be provided.
Previously an unhelpful error was thrown, with this fix we output a simple error message, followed by the the help text for ganache instances
.
$ ganache instances
ganache instances requires a subcommand:
ganache instances
Manage instances of Ganache running in detached mode.
(Ganache can be run in detached mode by providing the --detach flag)
Commands:
ganache instances list List instances running in detached mode
ganache instances stop <name> Stop the instance specified by <name>
Options:
-?, --help Show help [boolean]
fixes: #4360
Starting with Shanghai, hardforks are determined by timestamp, rather than block number. When resolving the hardfork to use for a given block, we now consider the blocknumber and the timestamp.
fixes: #4450 (in that the correct hardfork is now resolved, which is not mergeForkIdTransition
)
See #4463
mergeForkIdTransition
(#4463)Add internal support for mergeForkIdTransition
"hardfork", which is presently live only on Sepolia, but assumedly will eventually happen on other networks.
This doesn't add any functionality, but fixes: #4450 for transactions happening on mergeForkIdTransition
hardfork.
See #4455
Fixes #4359
localhost
as hostname for docs.preview
dev command (#4357)
Python 2.7 is no longer a requirement to build ganache, but make
is.
localhost
as hostname for docs.preview
dev command (#4357)This is just to make ganache development from WSL easier.
Previously, tests that depend on an INFURA_KEY would be skipped if it were not provided. After this change these tests will fail in CI if no INFURA_KEY is provided.
Additionally, a test which was previously skipped is now run on Windows and Linux agents in Github Actions only. ( > server > listens on given interface only
)
Does what it says on the tin.
Minor performance improvement on startup.
Changes the contrast on links on ganache.dev in light mode.
Minor performance improvement on start up.
Reduces page load time on ganache.dev by initiating downloads of assets that will get loaded from other CSS and JS files later.
localhost
as hostname for docs.preview
dev command (@davidmurdoch)ganache instances
is executed without a subcommand (@jeffsmale90)--logging.file
argument (@jeffsmale90)mergeForkIdTransition
(@jeffsmale90)debug_storageRangeAt
doesn't work (#3203)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues to influence what we gets implemented and prioritized.
💖 The Truffle Team
New Features
Changelog
Known Issues
Future Plans
Introducing the newest addition to our lineup - Ganache v7.8.0! This release comes with support for the highly anticipated Shanghai hardfork.
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 84 files across 1 merged pull requests, tallying 6,243 additions and 4,642 deletions, since our last release.
shanghai
hardfork (#4272)We've added a new option allowUnlimitedInitCodeSize
to disable EIP-3860 (Limit and meter initcode) to continue to allow for uploading very large contracts. In most cases it will need to be combined with the allowUnlimitedContractSize
option.
This also fixes two bugs:
size
was not computed correctly (persisted databases will be updated and migrated automatically)
--database.dbPath
). This should be insignificant for the majority of cases. The migration was benchmarked with 180,000 blocks, and completed in 6.4 seconds.accessList
fees, if there are any.shanghai
hardfork (@davidmurdoch)debug_storageRangeAt
doesn't work (#3203)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues to influence what gets implemented and prioritized.
💖 The Truffle Team
Highlights
Fixes
Changelog
Known Issues
Future Plans
A huge thanks to @MicaiahReid for all of his hard work making this release possible. We've had a vision to create "Interactive Documentation" for JSON-RPC since we started the Ganache rewrite back in April of 2019. This documentation had been 80% complete for well over a year, and as most of us know, it's the last 20% that is always the hardest. Micaiah revived this stalled docs initiative and took on the challenge of finishing up that last 20%; he decreased the "time to interactive" from dozens of seconds down to under 3 seconds, fixed tons of bugs, and polished up the interface (with the help of @OnlyOneJMJQ) for a much more usable and consistent look and feel.
We consider this a "first-pass" at interactive documentation, and we have big (top secret!) plans for this platform we hope to bring to life in the future. If you discover any issues, or have ideas on how we can improve the user experience let us know by opening a new issue.
Scroll down to the Highlights section to learn more!
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 if you really want to get involved.
We've changed 29 files across 1 merged pull request, tallying 18716 additions and 4094 deletions, since our last release.
Download high-res video with audio
We are beyond thrilled to announce the official launch of our new interactive documentation site, ganache.dev!
ganache.dev will be the new home of Ganache's documentation. We're starting with interactive JSON-RPC documentation, but we will be building on this platform to provide 100%-in-browser tutorials, examples, and how-to guides, in addition to this reference documentation.
We designed ganache.dev to be useful for advanced users, but also (hopefully) easy for those new to the JSON-RPC layer of Ethereum. If you want to help improve this new "education" initiative there are a few ways you can help:
evm_setAccountNonce
@EIP
tags to RPC methods, e.g. EIP-155
And if you really want to help, get the word out! Here's a handy link that will draft a tweet for you:
Happy hacking!
This PR:
Known Issues:
Transaction
, DATA
, QUANTITY
, etc aren't documentedconsole
and assert
helpers in the editors are incomplete implementations (and lack types)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues to influence what we gets implemented and prioritized.
💖 The Truffle Team
Fixes
Changelog
Known Issues
Future Plans
Thanks again to @MicaiahReid for his excellent work, and to @benams and @adjisb for their contributions!
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, open a PR to fix an existing issue if you really want to get involved.
We've changed 5 files across 2 merged pull requests, tallying 174 additions and 112 deletions, since our last release.
The RPC method eth_getBlockTransactionCountByHash
had a bug that caused it to not return results when requesting a block before the effective "forkBlockNumber".
@benams ran into a confusing situation in which future-nonce transactions that are sent to Ganache running in eager mining mode (the default) appear to hang indefinitely, rather than being mined or rejected. This is expected behavior in eager mode, as Ganache does not return the hash until after it is mined. To help alleviate the confusion we now log a message about the status of these kinds of transactions.
Closes #4165
eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues to influence what we gets implemented and prioritized.
💖 The Truffle Team
Fixes
Changelog
Known Issues
Future Plans
Thanks to @davidmurdoch, @MicaiahReid, @tenthirtyone, and @haltman-at for your contributions to this release, which brings a fix to the debug_storageRangeAt
RPC method.
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 9 files across 2 merged pull requests, tallying 588 additions and 562 deletions, since our last release.
debug_storageRangeAt
return all known keys at transaction index (#3470)debug_storageRangeAt
would sometimes fail to find storage that was there at the start of the transaction if the storage slots were written to in the same block as the target transaction. Ganache now waits to read storage slots until after the requisite transactions in the block have been processed.
Fixes #3338, also fixes #3468
Remove unnecessary boilerplate setting npm python config.
debug_storageRangeAt
return all known keys at transaction index (@davidmurdoch)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues or give a +1 to existing issues to influence what we gets implemented and prioritized.
💖 The Truffle Team
Fixes
Miscellaneous
Changelog
Known Issues
Future Plans
Thanks to @MicaiahReid, @adjisb, @WyseNynja, @sewinter, and @davidmurdoch for your contributions to this release, which brings a couple of big fixes.
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 20 files across 4 merged pull requests, tallying 191 additions and 105 deletions, since our last release.
earliest
block tag on startup when forking (#3755)
0
bind to any available port (#4070)
Before the latest upgrade of etheremjs-vm, we would manually set the _isInitialized
property of the VM
to avoid some extra computation that came along with initialization that we didn't need. After the ethereumjs-vm upgrade, creating the VM
also initializes it, so this manual setting of the private property is unnecessary, but we didn't remove it. This change removes the manual setting of vm._isInitialized
.
earliest
block tag on startup when forking (#3755)This change updates Ganache's startup procedure when forking to retrieve the earliest
block from the remote and cache this block as the earliest
block in Ganache's block manager. This fixes a bug where calling eth_getBlockByNumber
with the "earliest"
block tag parameter yielded no result.
0
bind to any available port (#4070)Specifying a port of 0
is a way to tell a server that you want the Operating System to let you bind to any open port. Ganache claimed to support binding to port 0, but would rudely yell at you if you tried: Port should be >= 0 and < 65536. Received 0
:facepalm:! This PR rights our wrongs.
Using port 0
is useful when you don't care which port you bind to, you just want an open port.
You can use port 0
in a few ways:
$ ganache --port 0
…
RPC Listening on 127.0.0.1:35006
note: port 0 binding in detach mode doesn't yet provide a scripting friendly way of returning the port
$ ganache --detach --port 0
frozen_caramel_doughnut
$ ganache instances list
┌───────┬─────────────────────────┬──────────┬─────────┬─────────────────┬────────┐
│ PID │ Name │ Flavor │ Version │ Host │ Uptime │
├───────┼─────────────────────────┼──────────┼─────────┼─────────────────┼────────┤
│ 58078 │ frozen_caramel_doughnut │ ethereum │ 7.7.3 │ 127.0.0.1:35006 │ 14s │
└───────┴─────────────────────────┴──────────┴─────────┴─────────────────┴────────┘
import ganache from "ganache";
const server = ganache.server();
await server.listen(0);
console.log("Listening on port: ", server.address().port);
Fixes #2643 and #3805
Some whitespace wasn't aligned, now it is.
earliest
block tag on startup when forking (@adjisb)0
bind to any available port (@davidmurdoch)debug_storageRangeAt
fails to find storage when the slot was created earlier in the same block (#3338)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues, or give a +1 to existing issues to influence what gets implemented and prioritized.
💖 The Truffle Team
Fixes
Miscellaneous
Changelog
Known Issues
Future Plans
Thank you to our contributors @legobeat, @MicaiahReid, @brendene, and @jeffsmale90 for your contributions to this release!
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, open a PR to fix an existing issue if you really want to get involved.
We've changed 18 files across 8 merged pull requests, tallying 184 additions and 140 deletions, since our last release.
"EADDRINUSE"
as code
to server Error
(#4045)
effectiveGasPrice
(#4112)
evm_revert
fails in some cases (#4136)
"EADDRINUSE"
as code
to server Error
(#4045)This PR sets the code
property related to the error "listen EADDRINUSE: address already in use { address }"
to "EADDRINUSE", making detecting this kind of "address in use" error programmatically much easier and straightforward. This property existed in Ganache v6 and earlier and was removed in v7.0.0 in error.
Previously:
{
"message": "listen EADDRINUSE: address already in use 127.0.0.1:5001"
}
Now:
{
"code": "EADDRINUSE",
"message": "listen EADDRINUSE: address already in use 127.0.0.1:5001"
}
Fixes #4020
effectiveGasPrice
(#4112)Previously we were returning the wrong gasPrice
when a transaction was fetched via eth_getTransactionByHash
. This was happening because when we saved the transaction to the chain, we didn't update the transaction's effectiveGasPrice
field based off of the baseFeePerGas
of the block that the transaction was mined onto in some cases.
However, the effectiveGasPrice
returned on a receipt was correct because when the receipt was fetched, we would calculate the effectiveGasPrice
on the fly just to correct what we return to the user, rather than directly using what the database returned.
This change removes the on-the-fly calculation of the effectiveGasPrice
on the receipt, and presets the transaction's effectiveGasPrice
based off of the next block's baseFeePerGas
when the transaction is added to the pool. As block's are mined, the miner updates all pending transaction's effectiveGasPrice
based off of the next block's baseFeePerGas
.
Fixes #4094.
evm_revert
fails in some cases (#4136)Resolves an issue where evm_revert
would fail with error .for is not iterable
. This happened when a user would attempt to revert a change that deletes a key that exists in an upstream network.
fixes: #4093
Some of the GitHub Actions commands used by our Docker Publish Action are deprecated. This PR updates the Actions to versions that have since been updated to stop using these deprecated commands.
This PR adds a note in our CONTRIBUTING.MD document that instructs contributors to ensure they do not use npm as the root user.
Just updating CI to run the newer macos-12 runner instead of macos-11.
The GitHub Actions runner was warning about deprecated API use by the setup-python package, so this PR updates it to the latest tagged version.
Updating CI, including the "Release" action, to use Ubuntu 22.04, while also dropping support for ubuntu-18.04
.
"EADDRINUSE"
as code
to server Error
(@davidmurdoch)effectiveGasPrice
(@MicaiahReid)evm_revert
fails in some cases (@jeffsmale90)debug_storageRangeAt
fails to find storage when the slot was created earlier in the same block (#3338)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues to influence what we gets implemented and prioritized.
💖 The Truffle Team
Fixes
Miscellaneous
Changelog
Known Issues
Future Plans
Here's another hotfix that corrects issues for some users facing Unhandled Promise Rejection...
on NodeJs/Operating System combinations using eth_estimateGas
.
We've changed 5 files across 2 merged pull requests, tallying 59 additions and 295 deletions, since our last release.
eth_gasEstimate
reverts correctly to prevent potential process crash (#4056)When updating to support the Merge hardfork code that handled eth_gasEstimate
was refactored. A code block that previously "short circuited" the function no longer did, causing a JavaScript Promise to be fullfilled with a handled rejection, but then also an unhandled rejection. :badger:
We've fixed the short circuit code and added a test to prevent this from regressing in the future.
Promise.allSettled
shim (#4003)This was TODO'd to be removed if we bumped typescript
to 4.2.3+
Promise.allSettled
shim (@tenthirtyone)eth_gasEstimate
reverts correctly to prevent potential process crash (@davidmurdoch)debug_storageRangeAt
fails to find storage when the slot was created earlier in the same block (#3338)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues to influence what we gets implemented and prioritized.
💖 The Truffle Team
Fixes
Miscellaneous
Changelog
Known Issues
Future Plans
We released v7.7.0 yesterday, but it caused installation problems for Windows users without windows-build-tools. This hot fix resolves the issue for those affected users.
If you are still experiencing issues installing Ganache please open a new issue.
We've changed 3 files across 3 merged pull requests, tallying 12 additions and 9 deletions, since our last release.
To install this latest release, run
npm install ganache@latest --global
For reasons not yet understood, the leveldown
package must be bundled or installations on Windows without windows-build-tools installed fails. This puts the leveldown
package back into the ganache
package's bundledDependencies
.
This PR also introduces changes to our CI process to build a release candidate tarball during test runs.
Fixes #3661
Reason for this change: https://github.com/badges/shields/issues/8671
Before:
After:
In my haste to get the hot fix out to fix v7.7.0 I added a release candidate tarball to a PR and we didn't notice until it was merged into the develop
branch :facepalm:. This PR just removes that mistake.
debug_storageRangeAt
fails to find storage when the slot was created earlier in the same block (#3338)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues to influence what we gets implemented and prioritized.
💖 The Truffle Team
New Features
Miscellaneous
Changelog
Known Issues
Future Plans
It's been just two days since our last release, but we just couldn't wait any longer! This release has just two PRs, one which adds support for the Merge to Ganache, and the other which fixes an issue with the previous PR :sweat_smile:. Skip ahead to read the details of the Merge PR.
We use your feedback to plan our roadmap, so 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 134 files across 2 merged pull requests, tallying 7230 additions and 4319 deletions, since our last release.
To install this latest release, run
npm install ganache@latest --global
merge
hardfork (#3971)This release (re)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 released Ganache v7.4.4-alpha.0 back in September with support for the Merge. This PR brings that set of features to our stable release.
This introduces a few important changes and features that are worth explaining.
Upgrading ethereumjs required dropping support for Node.js v12. In Ganache v7.0.0 we gave a deprecation notice for Node.js v12, and this release finalizes the removal of support for this version. To use Ganache, you'll need to install Node.js v14 or greater.
One 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.
The new default hardfork when starting Ganache is merge
. To start Ganache with a different hardfork, use the --chain.hardfork
option.
You know when you spend a really long time on a big PR and finally think you've got every little detail settled, then the whole team reviews the PR and finds a few other little things that you fix, then they all approve the PR, so you all think you've got every little detail settled, then you finally merge the PR and you immediately realize that you forgot to remove a now unsupported version of node from your CI tests that only run once the PR has been merged into develop, so now you have to make another PR to remove the now unsupported node version from your CI tests? Yeah I hate when that happens.
merge
hardfork (@MicaiahReid)debug_storageRangeAt
fails to find storage when the slot was created earlier in the same block (#3338)eth_createAccessList
RPC method (#1056)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)evm_mine
, eth_getLogs
returns same logs for all blocks (#533)Open new issues (or join our team) to influence what we gets implemented and prioritized.
💖 The Truffle Team