Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Releases: trufflesuite/ganache-cli-archive

v6.0.3 - Bug fix release

16 Nov 01:11
Compare
Choose a tag to compare

Release includes following fixes, PRs

  • fix for interval mining race conditions, partially fixing #403
  • build now includes source maps
  • trufflesuite/ganache#25 - use block gas limit instead of default tx gas limit for eth_estimateGas when gas argument not specified
  • trufflesuite/ganache#6 - allow for custom DB providers
  • updated default block gas limit to correspond with Truffle's default gas limit to prevent truffle users from needing to make an unnecessary configuration entry

v6.0.2 - Bug fix release

16 Nov 01:17
Compare
Choose a tag to compare

Release includes following fixes, PRs

  • #417 - fixed invalid JSON-RPC response for error'd eth_call requests
  • #413 - Fix the docker builds for v6 releases

v6.0.1 - Crème Brûlée

16 Nov 01:33
Compare
Choose a tag to compare

Hello

With this release we've updated to ganache-core v2.0.0, thereby introducing full support for the new EVM features released in the Byzantium fork!

What's New

  • Full support for all new Byzantium opcodes, compiled contracts, and API changes
  • #29 - ensure gasPrice can be set to 0
  • Fix bad response for eth_getBlockByNumber and eth_getBlockByHash -- receiptRoot should have been receiptsRoot
  • Fix #287 - race condition when handling eth_call and eth_estimateGas
  • Initialization performance improvement (see PR trufflesuite/ganache#17)
  • Numerous small testing improvements

Get the new version!

To get the new version, first uninstall the previous version of the TestRPC:

$ npm uninstall -g ethereumjs-testrpc

Then install the new version:

$ npm install -g ethereumjs-testrpc

v4.1.1 - Chocolate Chips

23 Aug 15:51
Compare
Choose a tag to compare

Hey all!

This release adds delectably sweet chocolate chips to our cookie dough (and an upgrade to ganache-core v1.1.2). 🍪 It's a small but delicious addition that sweetens how we handle runtime errors on transactions:

  • If a runtime error is encountered in eth_sendTransaction or eth_sendRawTransaction, the TestRPC will now also return a result with a transaction hash, mimicking other Ethereum clients (e.g., geth). This ensures that applications expecting a geth-like response to transactions with runtime errors still get the response they expect.

As always, happy development, and let us know if you have questions!
Tim

v4.1.0 - Cookie Dough

22 Aug 17:23
Compare
Choose a tag to compare

Hello all!

The TestRPC has new filling, codenamed Cookie Dough 🍪 (see ganache-core). This release upgrades ganache-core to v1.1.1, providing the following features and bug fixes:

What's New

  • debug_traceTransaction now available!
  • Added stubs for a few requests: bzz_hive, bzz_info, shh_version
  • New personal_* API! Thanks @axic! (see here)
  • Stub added for eth_protocolVersion. Thanks @nanexcool! (see here)
  • You can now pass Arrays to filter requests. Thanks @thisbejim! (see here)
  • Bip39 has been upgraded to support more mnemonics / languages.
  • Internal upgrades to Web3
  • More error cases have been handled for certain requests to prevent crashes (e.g., here and #4).
  • You should now be able to use redux-devtools and the TestRPC together (see here)

Get the new version!

To get the new version, first uninstall the previous version of the TestRPC:

$ npm uninstall -g ethereumjs-testrpc

Then install the new version:

$ npm install -g ethereumjs-testrpc

What's ganache-core?

The TestRPC is in the process of rebranding. What was once a blockchain client intended solely for testing, it's now grown up to support tons of advanced development use cases, and it deserves a name that reflects all it can do. The TestRPC has been a Truffle project since 2015, and it will soon become part of Truffle's new Ganache line of tools and libraries.

ganache-core is the core code that powers the TestRPC, as well as soon-to-be-released blockchain development tools that'll become the tasty center of your Truffle development process (hence the sweet name 😃 ). Stay tuned for more information in the coming weeks!

Need help?

Free free to join the Truffle support chat to get help from the community as well as Truffle employees. As always, we appreciate your feedback and would love to hear about your development experience.

Cheers!
Tim

v4.0.0 - "Operation"

28 Jun 16:02
Compare
Choose a tag to compare

Hi all,

Like our Truffle release yesterday, we have more good news. This release is called "Operation", because the TestRPC's internals have changed significantly. 👨‍⚕️ 👩‍⚕️

What's in this release

  • Installation issues are gone. (Yep, even on Windows.)
  • Memory issues are gone. (We now have a steady memory footprint.)
  • You can now save your TestRPC's blockchain using the new --db option. (see README)
  • New endpoint: debug_traceTransaction, following geth. (input parameters not supported)
  • Some minor bug fixes and improvements.

How we did it

First, let's talk about installation. We've been working hard to make installation issues for the TestRPC a thing of the past. Like Truffle, installing the TestRPC was tough, and was the number-one complaint amongst our users. To fix every installation issue – and not just a few, but all of them – we completely revamped the installation process under the hood, and bypassed the system that caused those issues in the first place. You can find more information about this work on our blog.

Now let's address our memory footprint. The TestRPC used to be a "blockchain in memory", so it was no surprise that eventually, if you left it running long enough, your computer's memory would fill up. If you think this is an obvious conclusion, well, you're right; we're wondering how we missed it too. To fix this, we had to switch the TestRPC's internals to a completely new mechanism, one that was backed by a database (more on that below). This allowed us to have a clean memory footprint, one that lets you run the TestRPC for days on end without seeing an issue. This stability was hard fought, and we're very proud of it.

This leads us to our next point: The database. Because we backed the TestRPC via the filesystem, this means you can now save your blockchain's data for later use. That's right, if you close the TestRPC and reopen it later, say, you can start up right where you left off. You'll need to use the new --db option (see the README) to tell the TestRPC where you'd like the data saved. You'll also likely want to use the --mnemonic option to use the same accounts each time. We'd very much like to point out that you can now use the TestRPC as an instant private network between groups and coworkers, where actual consensus is not required (say, a persistent, internal test net). This is pretty sweet. 💪

Lastly, we're gearing up to provide you debugging support in our tools, and the TestRPC is an integral part of that. We've implemented debug_traceTransaction, first pioneered by geth, so you can use the TestRPC as part of your debugging solution. More on this to come later.

How you can get it

To get the new version, first uninstall the previous version of the TestRPC:

$ npm uninstall -g ethereumjs-testrpc

Then install the new version:

$ npm install -g ethereumjs-testrpc

What's next

Though we're very proud of the features above, it's very clear we have a lot of work cut out for us. We've heard your requests, appreciate your feedback, and will be circling around soon to follow up on the next round of important issues.

Thanks!

As always, we'd love to hear from you. Don't hesitate to drop into the Truffle Gitter and say hi.

Cheers!
-- Tim & the Truffle Team


After this release was made, version 4.0.1 was released to provide minor README updates.

TestRPC 3.0.0 - I wanna be like you ooh ooh

05 Oct 17:23
Compare
Choose a tag to compare

The TestRPC is always striving to be closer to a real blockchain environment, with added benefits for testing and development. Often, we use geth as our oracle, constantly ensuring that when you deploy to the TestRPC, you're setting yourself up to deploy to geth. So this release is our "more like geth" release, like Mowgli in the Jungle Book. 😃

Install

$ npm install ethereumjs-testrpc

Breaking Changes

This version contains many changes, some of them breaking changes. The biggest are the following:

  • Default gas price is now 0.02 szabo, mimicking geth
  • Default gas limit for transactions is now 90000 gas instead of the full block gas limit. This also mimics geth, and sets users up for deploying to live blockchains.

Both of these change the default values of the TestRPC. The gas price change affects the total amount of Ether required to send a transaction, which may break some tests. The gas limit change, however, is likely to cause a wide range of failures, making many previously-successful transactions now run out of gas. The reason we made this change is so the TestRPC will behave more like geth, so that you're aware of gas limit issues during development before being blindsided later when deploying to production. Without this change, you could easily write code for the TestRPC that wouldn't run correctly on the live network.

To avoid these new out of gas errors, you can now pass a higher gas limit as a parameter to web3:

web3.eth.sendTransaction({..., gas: 3141592}) // choose your own gas limit suitable for you

New Features

Along with breaking changes we have some new features -- features that have been in the works for awhile.

  • We've added support for the miner_start and miner_stop requests, like those supported by geth. You can use these to toggle mining on and off, and allow transactions to be queued when mining is off (great for tests). Mining is on by default.
  • We added support for the rpc_modules request, which is used by geth. You can now use geth attach to attach to the TestRPC.
  • Similarly, we added support for the eth_getTransactionByBlockHashAndIndex and eth_getTransactionByBlockNumberAndIndex requests, which are fairly new additions to the RPC spec.
  • Perhaps our biggest feature is under the hood, where block processing has been significantly improved. Queued transactions are now ordered by price, nonce and gas limit (also like geth) and the TestRPC will attempt to fit as many transactions in a block as possible.
  • There are now three block processing strategies available that should improve testing and development. These are: instamine (default behavior), mine on interval (--blocktime), and mine by request (miner_stop + transaction queuing + multiple evm_mine requests). You can stop mining whenever you'd like and continue to queue transactions. While mining is stopped, you can send an evm_mine request to make TestRPC process one block with as many transactions as it can fit. Huge thanks to @area for making this and many of the above features a reality.
  • --blocktime is now disjointed from instamining, and will now act like a real blockchain. If you specify --blocktime, transactions will only be processed on the interval, and won't be instamined (this differs from TestRPC 2.x behavior where transactions were instamined in addition to blocks being processed on interval). You can use this feature to test how your dapp behaves when transactions aren't processed immediately. Note that, like geth errors aren't returned in transaction requests when --blocktime is used since block processing is disjoint from transactions.
  • Transaction errors are now printed to the TestRPC log, so you know exactly which transaction failed.
  • We've added the --secure flag, which automatically makes all accounts locked by default, meaning transactions won't be signed by the TestRPC. This is useful if you want to ensure signing is working properly through other mechanisms (like Metamask) and you want to be sure the TestRPC isn't performing that signing.
  • In addition to --secure, we added the --unlock/-u flags, which can be used any number of times to unlock any account, even ones you don't own. When used with --secure you can unlock accounts that are created for you via the TestRPC. When used with --fork you can use this feature to "impersonate" any account on the blockchain, allowing you to bypass transaction signing and use that address as if you owned it. This has wide implications for testing and dynamic analysis.
  • To keep up with new features, error handling has been overhauled to support multiple transactions per block and therefore multiple errors per evm_mine request (when using miner_start/miner_stop and transaction queuing)
  • We fixed an issue with -a not working properly. Now testrpc -a 3 will only create 3 accounts.
  • As requested, we upgraded solc version to 0.4.x
  • We also added a ton more tests. Our testing has been significantly hardened, which benefits everyone.

Special Thanks

Many people have contributed PRs and written tickets that supported this release. Thanks goes to @tjade273, @uzyn and @chevdor for the PRs, @FlySwatter and @PeterBorah for the feature requests. Very special thanks goes to @area for contributing the bulk of these new features and laying the groundwork for them to become a reality.

We sincerely hope the TestRPC continues to be useful for testing and development. Please let us know how you're using it, and if you run into any trouble or have feature requests. Cheers!