Releases: trufflesuite/ganache-cli-archive
v6.1.6 - Bug Fixes 🐛
Release Highlights
- Updates to
[email protected]
, which works around a problem inethereumjs-tx
which brokeeth_sendRawTransaction
v6.1.5 - Bug Fixes 🐛
Release highlights
- Updates ganache-core to v2.1.4 - see release notes for more info.
- Fixes support for node >= v6.5.0.
- Note: if you're depending on
ganache-core
directly instead ofganache-cli
, you will still need node >= 8.
- Note: if you're depending on
- Displays account balances on startup.
- Makes better use of new
yargs
flags initialization, fixing numerous bugs including: - Fixes docker image build process to include
package-lock.json
so that exact package versions are used.
v6.1.4 - Bug Fixes 🐛
Release highlights
Fixes bug which caused us to listen on 0.0.0.0 instead of 127.0.0.1 by default.
Bumps ganache-core
to v2.1.3, which has the following effects:
- Completes fix from previous release for less strict checks on filter/subscription IDs and on addresses specified in log filters/subscriptions to allow for mixed case hex encoding.
- Removes vulnerability caused by transitive dependency on
hoek
v6.1.2 - Bug Fixes 🐛
Release highlights
Bumps ganache-core
to v2.1.1, which has the following effects:
- Minimum required version of node is now 8.9.0
- Allows us to use the async/await keywords or dependencies which use these keywords
- Makes it possible to fetch
revert
orrequire
reason strings when--noVMErrorsOnRPCResponse
flag is specified - Correctly restores time deltas on snapshot/revert
- Preserves transaction signatures sent along with
eth_sendRawTransaction
- Makes it possible to disable storage/memory/stack output in
debug_traceTransaction
(useful for code coverage tooling) - Fixes JSON encoding of log & receipt types, respecting the data/quantity format types specified in the RPC wiki.
- Less strict checks on filter/subscription IDs and on addresses specified in log filters/subscriptions to allow for mixed case hex encoding.
- Renamed
blocktime
toblockTime
to follow ganache-cli changes. - Fixes
Server.listen
so that it now passes theSateManager
in its callback. - Returns more helpful error message when
eth_getTransactionCount
is called with a bad block number.
v6.1.0 - Candy Apple 🍎
Release Highlights
- Updates to
ganache-core
2.1.0 for stable release- Includes changes from other previous v2.1.0 beta releases, including:
- WebSockets support
- Numerous stability improvements
- Introduction of
--noVMErrorsOnRPCResponse
option (defaults tofalse
)- When this flag is left unset, and when blocktime is unspecified (instamining), contract runtime errors are reported as RPC errors when the transaction is submitted. If the flag is set, we behave as geth/Parity do and return the transaction hash, even if the transaction fails due to a contract runtime error
- Includes changes from other previous v2.1.0 beta releases, including:
Known Issues
--help
broken by updating to latestyargs
. Use-?
instead.
Note: This release is a beta, meaning we think it's going to be great, but we haven't put it through rigorous manual testing just yet. Please help us out and raise issues for any problems you discover!
v6.1.0-beta.4 - Candy Apple 🍎
Release Highlights
- Updates to
ganache-core
2.1.0-beta.7
Known Issues
--help
broken by updating to latestyargs
. Use-?
instead.
Note: This release is a beta, meaning we think it's going to be great, but we haven't put it through rigorous manual testing just yet. Please help us out and raise issues for any problems you discover!
v6.1.0-beta.3 - Candy Apple 🍎
Release Highlights
- Updates to
ganache-core
2.1.0-beta.5. - Updates numerous package dependencies to latest versions.
Known Issues
--help
broken by updating to latestyargs
. Use-?
instead.
Note: This release is a beta, meaning we think it's going to be great, but we haven't put it through rigorous manual testing just yet. Please help us out and raise issues for any problems you discover!
v6.1.0-beta.2 - Candy Apple 🍎
Release Highlights
- Fixes bug preventing use of forking feature caused by upgrading to web3 1.0
Note: This release is a beta, meaning we think it's going to be great, but we haven't put it through rigorous manual testing just yet. Please help us out and raise issues for any problems you discover!
v6.1.0-beta.1 - Candy Apple 🍎
Release Highlights
- Includes fixes from ganache-core v2.1.0-beta.1
- Fixes
evm_mine
to return a valid JSON RPC response (trufflesuite/ganache#354) - Revert default value of
vmErrorsOnRPCResponse
to true to avoid breaking change - Fixes invalid RPC response errors caused by transactions which should have been rejected before entering
the transaction pool (trufflesuite/ganache#84, trufflesuite/ganache#471) - Makes
eth_call
use the block gas limit when no gas limit is specified - Fixes batch request support (trufflesuite/ganache#320)
- Fixes
Note: This release is a beta, meaning we think it's going to be great, but we haven't put it through rigorous manual testing just yet. Please help us out and raise issues for any problems you discover!
Candy Apple 🍎 - Beta 1
Note: since this release no longer comes with breaking changes, we're republishing as a patch release, and unpublishing v7.0.0-beta.0 from the npm repository to avoid undue confusion.
Changes made since previous beta release:
- Add --noVMErrorsOnRPCResponse flag
- Update dependency
ganache-core
tov6.1.0-beta.0
- Fixed crash due to
Cannot read property 'gasPrice' of undefined
, trufflesuite/ganache#293 - Checks number of arguments in request matches required number of arguments for each method, fixes trufflesuite/ganache#255
- Makes
threads
argument tomining_start
optional, fixes trufflesuite/ganache#383 - Reverts default value of vmErrorsOnRPCResponse to
true
to avoid breaking change
- Fixed crash due to
Release highlights
- Introduces support for websockets, along with pub/sub support via
eth_subscribe
andeth_unsubscribe
- This finally makes it possible to use web3 1.0 with Ganache!
- Special thanks to @perissology and @MicahZoltu for their contributions on this!
- Fixes an incredibly annoying race condition, responsible for the vast majority of Ganache 1.0.0 and 1.0.1 crashes reported
- Contract runtime error reporting is now consistent with geth, Parity, and other clients
- Introduces
--noVMErrorsOnRPCResponse
flag, which if enabled will make runtime errors in contract code no longer causeweb3.eth.sendTransaction
to return promises which revert or to pass an error to the callback function. - When this flag is enabled, you must check the
status
field of the transaction receipt to determine whether your transaction succeeded. Astatus
value of0x1
means success, and0x0
means failure. - Important:
- This is no longer enabled by default in this beta build, however we will likely enable it by default in a future, major release.
- For discussion on why this change was made, please see "Important note about contract runtime error reporting" below.
- Introduces
Note: This release is a beta, meaning we think it's going to be great, but we haven't put it through rigorous manual testing just yet. Please ping us in the truffle gitter channel or on twitter with your feedback, and raise issues for any problems which you discover!
Important note about contract runtime error reporting
One of the benefits of TestRPC early on (back before we called it ganache) was that when running a transaction that triggered a runtime error in your contract code, it would pass that runtime error object from the EVM back to your client application. This was achieved via the JSON RPC error
field in the response object.
Prior to the Byzantium hard fork, Ethereum RPC endpoints other than TestRPC couldn't reliably tell you whether or not your transaction succeeded or failed. The only way to tell if your transaction failed was to check whether the gasUsed
field in your transaction receipt matched the gas limit you specified on your transaction. But what if you set your gas limit perfectly? What does gasUsed == gasLimit
mean then? Fortunately, in the post Byzantium world the transaction receipt now includes a status
field, with a value of 0x1
for success, and 0x0
for failure.
The trade-off that we made in TestRPC in our pre-Byzantium days was that we'd fail fast and fail loudly (good), but if people wanted to write portable tests that ran against TestRPC and against other test networks they'd have to include network-specific branches in their transaction failure checks (bad). Further, over time we've come to observe that people new to Ethereum Dapp development may lean too heavily on ganache and not realize that they need to implement transaction failure checks which check their transaction receipt. This would mean that their tests might not fail on other test networks when they otherwise should be (ugly).
tl;dr: Now that Byzantium is here to stay, we've introduced the --noVMErrorsOnRPCResponse
flag, which makes Ganache behave more like other clients. In this mode of operation, contract runtime errors encountered during transaction processing will no longer trigger a response object with the error
field set. You must now check the status
field of the transaction receipt to determine whether or not your transaction succeeded, as ganache will no longer cause web3.eth.sendTransaction
to populate the first argument (error) of the callback, or to reject the returned promise on contract runtime errors.
If you're used to determining why things failed by reading the message
on this error object, you can find the error in the Ganache log output. For ganache-cli
this will be written to the same console where ganache-cli
is running, and for the Ganache UI this can be found in the Logs
tab.
But keep in mind that error messages only go so far. It's nice to know that something failed, but I want to know why it failed. To answer that question, please check out truffle debug
- it'll change your life for the better!
Installation instructions
Since this is a beta release, you'll still get 6.0.3
if you follow the usual install instructions. Instead you need to install the beta
tag by doing the following:
npm install -g ganache-cli@beta
Other noteworthy changes
- No longer hangs on quit when clients connected (trufflesuite/ganache#365)
- Runs
eth_call
with correct block metadata (trufflesuite/ganache#205) - Adds the missing
logsBloom
field to the transaction receipt (#440) - Adds a
--defaultBalanceEther
flag so that you can specify the starting balance of auto-generated accounts. - Actually uses source maps when generating stack traces this time!
status
field of transaction receipt is now hex (#451)- adds
pesonal_importRawKey
(trufflesuite/ganache#31) - Various corrections to hex string encoding (more will be necessary, however - keep those issues coming!)
- Logs opcode operands on
debug_traceTransaction
(trufflesuite/ganache#10) - Doesn't crash on bad tx parameters, and accepts empty string in
to
field as null (trufflesuite/ganache#257)- Makes contract deployment from MEW work better
- Only reports error message in JSON RPC
error.message
field - useerror.data
for the stack trace- Makes logged error output more readable