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.4.4-beta.0 - ✨ Mystery Flavor ✨

30 Apr 22:58
v6.4.4-beta.0
b90b141
Compare
Choose a tag to compare
Pre-release

 Highlights    How to Upgrade    Changelog    Related Releases 


We're moving to a betalatest release pipeline, where all non-hotfix changes are first released in a beta before being promoted to a stable release.

We'd love it if you'd start using the latest betas and let us know early and often if you find any bugs or regressions!

Highlights

Forked transactions have been fixed before, but the previous fix didn't get all the bugs, and the fix before that had to be reverted due to unwanted side effects. We've created a monster. The fix is back, back again, tell a friend!

We've also add support for binary data over websockets, updated eth-sig-util to fix a global variable leak, and fixed some other bugs, too!


In case you missed it, we're holding TruffleCon 2019 August 2 - 4 at Microsoft's campus in Redmond, WA! And it'll be awesome. You should be there.


How to Upgrade

Upgrade to the latest beta version of ganache-cli by running:

npm

npm uninstall -g ganache-cli
npm install -g ganache-cli@beta

yarn

yarn global remove ganache-cli
yarn global add ganache-cli@beta

Changelog

Bug Fixes

Maintenance

Related Releases


💖 The Truffle Team

v6.4.3 - Forking Bugs ⋔🐞

15 Apr 20:14
v6.4.3
c75a27e
Compare
Choose a tag to compare

 Highlights    How to Upgrade    Changelog    Related Releases 


We're moving to a betalatest release pipeline, where all non-hotfix changes are first released in a beta before being promoted to a stable release.

We'd love it if you'd start using the latest betas and let us know early and often if you find any bugs or regressions!

Highlights

Forked transactions have been fixed before, but the previous fix had to be reverted due to unwanted side effects. The fix is back now, and is hopefully side-effect free this time!

We've also fixed some other bugs, improved documentation, and did a little maintenance, too.

How to Upgrade

Upgrade to the latest version of ganache-cli by running:

npm

npm uninstall ganache-cli
npm install ganache-cli@latest

yarn

yarn remove ganache-cli
yarn add ganache-cli@latest

Changelog

Bug Fixes

Maintenance

Documentation

Related Releases


💖 The Truffle Team

v6.4.3-beta.0 - Forking Bugs ⋔🐞

08 Apr 21:51
v6.4.3-beta.0
4bc3901
Compare
Choose a tag to compare
Pre-release

 Highlights    How to Upgrade    Changelog    Related Releases 


Quick bug-fix beta release here. We're moving to a betalatest release pipeline, where all non-hotfix changes are first released in a beta before being promoted to a stable release.

We'd love it if you'd start using the latest betas and let us know early and often if you find any bugs or regressions!

Highlights

Forked transactions have been fixed before, but the previous fix had to be reverted due to unwanted side effects. The fix is back now, and is hopefully side-effect free this time!

We've also fixed some other bugs, improved documentation, and did a little maintenance, too.

How to Upgrade

Upgrade to the beta version of ganache-cli by running:

npm

npm uninstall ganache-cli
npm install ganache-cli@beta

yarn

yarn remove ganache-cli
yarn add ganache-cli@beta

Changelog

Bug Fixes

Maintenance

Documentation

Related Releases


💖 The Truffle Team

v6.4.2 - Gas Exactimation 📏

04 Apr 22:38
v6.4.2
1ebd8a8
Compare
Choose a tag to compare

 Highlights    How to Upgrade    Changelog    Related Releases 


A long-standing issue with Ganache has been the fact that we haven't returned EIP-114 compliant gas estimations, AKA the "1/64ths rule". This caused our gas estimates to be too low in cases where a transaction executed opcodes that are subject to this EIP. This in turn was the cause of many frustrations, especially in situations where tools would use gas estimations in transactions without allowing the user to intercept or change the transaction's supplied gas.

Highlights

EIP-114 mandates that certain stackdepth-creating opcodes withhold 1/64th of remaining gas from the stack they create. This has two non-obvious effects:

  1. The gas required for a successful transaction can be greater than the actual gas spent. This is similar to how gas refunds behave.
  2. The extra gas required for a successful transaction varies depending on the transaction's initial gas amount!

Let's say we want to run the following example transaction (note: this transaction is nonsensical and is intended only to illustrate the 1/64ths rule):

DEPTH OPCODE OP FEE
0 PUSH1 3
0 CALL 700
1 ADD 3
1 EXPENSIVE 10000
1 RETURN 0
0 POP 2
0 STOP 0
  Total Gas: 10708

This transaction would cost exactly 10708 gas. However, if you attempted to run this transaction by supplying only 10708 gas it would fail with an "out of gas" exception when it gets to the EXPENSIVE opcode!

The reason for this failure is that the opcode CALL is subject to EIP-114. Here's a breakdown of how this gas is used:

DEPTH OPCODE GAS AVAILABLE OP FEE 1⁄64 WITHHELD
0 PUSH1 10708 3  
0 CALL 10705 700 156
1 ADD 9849 3  
1 EXPENSIVE 9846 10000  
  REVERT OOG    

Instead of 10005 gas available (10705 gas available − 700 op fee) at the ADD opcode,
only 9849 is actually available due to the "withheld" 1/64th: 10005 − FLOOR( 10005 ⁄ 64 ) = 9849; we are now 154 gas short!

All we need to do now is increase our supplied gas by 154, right? Let's see what happens now:

DEPTH OPCODE GAS AVAILABLE OP FEE 1⁄64 WITHHELD
0 PUSH1 10862 3  
0 CALL 10859 700 158
1 ADD 10001 3  
1 EXPENSIVE 9998 10000  
  REVERT OOG    

We still don't have enough gas! The amount withheld increased by 2 gas because the gas supplied to the transaction increased as well!

Because the 1/64ths rule gets applied to the gas remaining, which has increased since our first estimate, 2 more gas gets withheld, resulting in an OOG error!

Now, let's run the same transaction one more time, this time using the result of our new gas estimation algorithm:

DEPTH OPCODE GAS AVAILABLE OP FEE 1⁄64 WITHHELD
0 PUSH1 10864 3  
0 CALL 10861 700 158
1 ADD 10003 3  
1 EXPENSIVE 10000 10000  
1 RETURN 0 0 −158
0 POP 158 2  
0 STOP 156 0  
    156    

It works! Notice that 156 gas was unspent at the end of the transaction, but had we provided even 1 less gas the transaction would have resulted in an "out of gas" exception at EXPENSIVE opcode.


This series of simplified examples attempts to provide a high-level overview of the 1/64th gas estimation calculation. To correctly estimate gas on any contract, we must consider how the gas withheld at any nested stack depth/frame affects the gas needed outside of its execution context.

It's a tricky problem to solve. Some implementations of gas estimation after EIP-114 use interval halving (binary search) by running the transaction through the EVM until the gas estimation converges. This seemed like an unnecessarily CPU-intensive approach to the problem, and we set out to find a (theoretically) more performant, and perfectly accurate, way of estimating gas (which we now refer to as "gas exactimation" here at Truffle).

If you find that any of your transactions are running in to unexpected OOG errors please let us know by filing an issue.


We are especially proud of this algorithm, and we are even more proud of the brilliant minds that went into its creation. Thank you Nick Paterno (@nicholasjpaterno), Amal Sudama (@cds-amal), Chris Cowell (@ccowell), Mike Seese (@seesemichaelj), Benjamin Burns (@benjamincburns), and David Murdoch (@davidmurdoch) for all the work you've put in to this release!

We'll follow up with a detailed blog post on the algorithm itself in the coming weeks.

How to Upgrade

Upgrade to the latest version of ganache-cli by running:

npm

npm uninstall -g ganache-cli
npm install -g ganache-cli@latest

yarn

yarn global remove ganache-cli
yarn global add ganache-cli@latest

Changelog

Bug Fixes

Documentation

Related Releases


💖 The Truffle Team

v6.4.2-beta.0 - Gas Exactimation 📏

21 Mar 17:50
v6.4.2-beta.0
d539557
Compare
Choose a tag to compare
Pre-release

 Highlights    How to Upgrade    Changelog    Related Releases 


A long-standing issue with Ganache has been the fact that we haven't returned EIP-114 compliant gas estimations, AKA the "1/64ths rule". This caused our gas estimates to be too low in cases where a transaction executed opcodes that are subject to this EIP. This in turn was the cause of many frustrations, especially in situations where tools would use gas estimations in transactions without allowing the user to intercept or change the transaction's supplied gas.

Highlights

EIP-114 mandates that certain stackdepth-creating opcodes withhold 1/64th of remaining gas from the stack they create. This has two non-obvious effects:

  1. The gas required for a successful transaction can be greater than the actual gas spent. This is similar to how gas refunds behave.
  2. The extra gas required for a successful transaction varies depending on the transaction's initial gas amount!

Let's say we want to run the following example transaction (note: this transaction is nonsensical and is intended only to illustrate the 1/64ths rule):

DEPTH OPCODE OP FEE
0 PUSH1 3
0 CALL 700
1 ADD 3
1 EXPENSIVE 10000
1 RETURN 0
0 POP 2
0 STOP 0
  Total Gas: 10708

This transaction would cost exactly 10708 gas. However, if you attempted to run this transaction by supplying only 10708 gas it would fail with an "out of gas" exception when it gets to the EXPENSIVE opcode!

The reason for this failure is that the opcode CALL is subject to EIP-114. Here's a breakdown of how this gas is used:

DEPTH OPCODE GAS AVAILABLE OP FEE 1⁄64 WITHHELD
0 PUSH1 10708 3  
0 CALL 10705 700 156
1 ADD 9849 3  
1 EXPENSIVE 9846 10000  
  REVERT OOG    

Instead of 10005 gas available (10705 gas available − 700 op fee) at the ADD opcode,
only 9849 is actually available due to the "withheld" 1/64th: 10005 − FLOOR( 10005 ⁄ 64 ) = 9849; we are now 154 gas short!

All we need to do now is increase our supplied gas by 154, right? Let's see what happens now:

DEPTH OPCODE GAS AVAILABLE OP FEE 1⁄64 WITHHELD
0 PUSH1 10862 3  
0 CALL 10859 700 158
1 ADD 10001 3  
1 EXPENSIVE 9998 10000  
  REVERT OOG    

We still don't have enough gas! The amount withheld increased by 2 gas because the gas supplied to the transaction increased as well!

Because the 1/64ths rule gets applied to the gas remaining, which has increased since our first estimate, 2 more gas gets withheld, resulting in an OOG error!

Now, let's run the same transaction one more time, this time using the result of our new gas estimation algorithm:

DEPTH OPCODE GAS AVAILABLE OP FEE 1⁄64 WITHHELD
0 PUSH1 10864 3  
0 CALL 10861 700 158
1 ADD 10003 3  
1 EXPENSIVE 10000 10000  
1 RETURN 0 0 −158
0 POP 158 2  
0 STOP 156 0  
    156    

It works! Notice that 156 gas was unspent at the end of the transaction, but had we provided even 1 less gas the transaction would have resulted in an "out of gas" exception at EXPENSIVE opcode.


This series of simplified examples attempts to provide a high-level overview of the 1/64th gas estimation calculation. To correctly estimate gas on any contract, we must consider how the gas withheld at any nested stack depth/frame affects the gas needed outside of its execution context.

It's a tricky problem to solve. Some implementations of gas estimation after EIP-114 use interval halving (binary search) by running the transaction through the EVM until the gas estimation converges. This seemed like an unnecessarily CPU-intensive approach to the problem, and we set out to find a (theoretically) more performant, and perfectly accurate, way of estimating gas (which we now refer to as "gas exactimation" here at Truffle).

Our new gas estimation algorithm is being released as a beta in order to get real-world metrics on its accuracy as well as to prove some assumptions we've made about the EVM behavior. It's possible the algorithm still has crash-inducing bugs or could even return estimates that are too low.

If you find that any of your transactions are running in to unexpected OOG errors please let us know by filing an issue.


We are especially proud of this algorithm, and we are even more proud of the brilliant minds that went into its creation. Thank you Nick Paterno (@nicholasjpaterno), Amal Sudama (@cds-amal), Chris Cowell (@ccowell), Mike Seese (@seesemichaelj), Benjamin Burns (@benjamincburns), and David Murdoch (@davidmurdoch) for all the work you've put in to this release!

We'll follow up with a detailed blog post on the algorithm itself in the coming weeks.

How to Upgrade

Upgrade to the beta version of ganache-cli by running:

npm

npm uninstall -g ganache-cli
npm install -g ganache-cli@beta

yarn

yarn global remove ganache-cli
yarn global add ganache-cli@beta

Changelog

Bug Fixes

Documentation

Related Releases


💖 The Truffle Team

v6.4.1 - Hot Fix 🔥

02 Mar 15:26
v6.4.1
44a1d6b
Compare
Choose a tag to compare

Release Highlights

Fixes an issue where a ganache-core websocket server may crash when closing the server connection while eth_unsubscribe calls are still in flight. PR: trufflesuite/ganache#347

Related Releases

v6.4.0 - Petersburg fork & More! ⋔

28 Feb 16:21
v6.4.0
58588c3
Compare
Choose a tag to compare

v6.4.0 - Petersburg fork & More! ⋔

The Petersburg hardfork is scheduled to go live on mainnet on block number 7,280,000, estimated to occur on February 28th. This hardfork removes the reentrancy attack vector introduced in the Constantinople hardfork (which also goes live on mainnet on block 7,280,000). This release includes [email protected] which includes support for the Petersburg hardfork. Also: bug fixes!

Release Highlights

The default hardfork option (-kor --hardfork on the command line) in ganache-cli and ganache-core is now petersburg. We also fixed lots of bugs and paid off some technical debt!

New Features:

Bug Fixes:

This release also contains some bug fixes!

Maintenance and Testing:

Documentation:

  • Clarify evm_snapshot behavior in README.md (#615)

More steady releases to come in the future so keep on filing issues and submitting PRs!

💖 The Truffle Team

Related Releases

v6.3.0 - C̶o̶n̶s̶t̶a̶n̶t̶i̶n̶o̶p̶l̶e̶ 🌿

30 Jan 02:29
v6.3.0
6517054
Compare
Choose a tag to compare

v6.3.0 - C̶o̶n̶s̶t̶a̶n̶t̶i̶n̶o̶p̶l̶e̶ 🌿

Let's talk about that constantinople bug that was discovered in the 11th hour, shall we? We are proud to have created software that played a roll in the discovery of the attack and love the way the community of builders (and buidlers!) worked together to postpone the hardfork and come up with a solution!

This release contains the original Constantinople hardfork implementation and is now the default hardfork in ganache-cli.

It is safe and recommended to test your contracts using the default "constantinople" hardfork available in this release of ganache-cli. The only expected difference between the hardfork in this release and the proposed Petersburg hardfork is that some transactions under Petersburg will cost more in gas due to the removal of the vulnerable EIP.

Release Highlights

Implements EIP-1013, Hardfork: Constantinople behind a new flag, hardfork. Valid values are currently "byzantium" and "constantinople". The default value is "constantinople".

This version contains the Constantinople hardfork implementation as it was originally intended by EIP-1013. This hardfork did not go live on Mainnet as planned due to a reentrancy attack discovered by ChainSecurity.

We are expecting a variant of Constantinople, currently named Petersburg, with the reentrancy attack vector removed to go live on Mainnet a few weeks from now (EIP PR: ethereum/EIPs#1716). The proposed change from the original Constantinople hardfork is to remove the offending EIP, EIP-1283.

New Features:

Bug Fixes:

This release also contains some bug fixes!

Documentation:

  • Clarify accounts usage in options (#616)

More steady releases to come in the future so keep on filing issues and submitting PRs!

💖 The Truffle Team

Related Releases

v6.4.0-eip1283.0 - Constantinople w/ EIP 1283 Removed

24 Jan 21:56
8914e0c
Compare
Choose a tag to compare

This version contains an experimental build of the ethereumjs-vm with EIP-1283 changes removed.

This version adds a new hardfork option constantinople-1283-removed. The default hardfork in this experimental build is constantinople-1283-removed.

Installation

This is a tagged release specifically for the Ethereum protocol development community. you'll need to specify the specific version of this release when installing. To do this, run npm install -g [email protected] or via tagged release npm install -g ganache-cli@eip1283 and not the usual command npm install -g ganache-cli


To use the docker build: docker run -d -p 8545:8545 trufflesuite/ganache-cli:eip1283

[email protected] release notes

v6.3.0-beta.0 - Constantinople 🏟

10 Jan 00:48
6f86dc8
Compare
Choose a tag to compare
Pre-release

Release Highlights 🐈

  • Updates to [email protected] which adds support for EIP-1013, Harfork: Constantinople behind a new flag, hardfork. Valid values are currently "byzantium" and "constantinople". The default value remains "byzantium"; the release version of 6.3.0 is slated to be released with "constantinople" as the default value.