Highlights
Fixes
Miscellaneous
Changelog
Known Issues
Future Plans
We've got a few more fixes in this release! But much more importantly we'd like to welcome @jeffsmale90 to the Ganache team! He has hit the ground running and is responsible for three out of five bug fixes today. Welcome to the team, Jeff! We'd also like to thank our issue openers (@PeterYinusa, @robsmith11), PR contributors (@MatthieuScarset), and technical consultants (@cds-amal). Thank you for being a part of this community!
We've changed 26 files across 8 merged pull requests, tallying 584 additions and 150 deletions, since our last release.
Disable Rage Quit; Fix Regular Shutdown
Ganache v7 was released with a lovely feature that prevented Ganache from shutting down when some applications (including MetaMask) connect to Ganache and regularly poll for data. This feature was shipped to provide our users with some much needed practice expressing negative emotions as they repeatedly attempt to shut down Ganache, and Ganache says that it recognizes the shutdown signal but fails to shutdown.
We are, of course, kidding. This issue had multiple causes which are now fixed in this release. Ganache now facilitates graceful shutdown in cases where persistent HTTP connections previously held Ganache open. Thank you all for your patience in waiting for a fix on this issue. 🙏
back to top
- fix: use
host
param when passed inserver.listen
(#2397) - fix: correctly pad / truncate in JSON-RPC types, add tests to ethereum-address and json-rpc-data (#2716)
- fix: parse port to number type if provided in as string (#2610)
- fix: close http connections after http-server.close() has been called (#2667)
- fix: update @trufflesuite/uws-js-unofficial dependency to silence node12 warnings (#2807)
fix: use host
param when passed in server.listen
(#2397)
Ganache previously ignored the --host
parameter and would always bind to host 127.0.0.1
. It now binds to the given host as expected.
back to fixes
fix: correctly pad / truncate in JSON-RPC types, add tests to ethereum-address and json-rpc-data (#2716)
The internal Address
class previously wasn't properly padding compressed addresses. This would cause some RPC methods, like evm_addAccount
, to add invalid Ethereum addresses. The class will now pad addresses to the correct length, allowing this behavior:
const address = new Address("0x1");
console.log(address.toString()) // 0x0000000000000000000000000000000000000001
which will in turn allow:
const address = "0x1";
const passphrase = "passphrase"
const result = await provider.send("evm_addAccount", [address, passphrase] );
back to fixes
fix: parse port to number type if provided in as string (#2610)
Ganache now allows the port number passed via ganache --port
to be a string or a number. This allows the use case where the port is passed directly from args without parsing.
back to fixes
fix: close http connections after http-server.close() has been called (#2667)
As stated in our highlights, Ganache now facilitates graceful shutdown in cases where persistent HTTP connections previously held Ganache open. In the worst case where no requests are received over the persistent connection, Ganache will timeout after 10 seconds.
back to fixes
fix: update @trufflesuite/uws-js-unofficial dependency to silence node12 warnings (#2807)
If you've been using Ganache with nodejs 12, you've probably been bothered by the annoying error stating:
This version of µWS is not compatible with your Node.js build:
Error: node-loader:
Error: Module did not self-register: '/home/workspace/.nvm/versions/node/v12.22.1/lib/node_modules/ganache/dist/node/3wHsIyFE.node'.
Falling back to a NodeJS implementation; performance may be degraded.
This change silences the warning to give you the uncluttered CLI you deserve.
back to fixes
back to top
- ci: fix test timeouts (#2503)
- refactor: rearrange miner for easier readability (#2514)
- docs: fix example in README (#2789)
ci: fix test timeouts (#2503)
Tests that used to pass in CI started failing in GitHub Actions due to timeouts. We verified there were no performance regressions on our part, and that these timeouts were caused by GitHub Action runners becoming slower over time. We bumped the test timeout default value to 5 seconds.
back to miscellaneous
refactor: rearrange miner for easier readability (#2514)
We noticed some duplicate branches in a method and simplified it. There's nothing interesting to see here... 🙂
back to miscellaneous
docs: fix example in README (#2789)
The README.md example showing programmatic usage had a bug causing it to fail. The example now works as intended. Thanks again for pointing this out, @MatthieuScarset!
back to miscellaneous
back to top
- #2503 ci: fix test timeouts (@MicaiahReid)
- #2514 refactor: rearrange miner for easier readability (@davidmurdoch)
- #2397 fix: use
host
param when passed inserver.listen
(@davidmurdoch) - #2610 fix: parse port to number type if provided in as string (@jeffsmale90)
- #2716 fix: correctly pad / truncate in JSON-RPC types, add tests to ethereum-address and json-rpc-data (@jeffsmale90)
- #2667 fix: close http connections after http-server.close() has been called (@jeffsmale90)
- #2789 docs: fix example in README (@davidmurdoch)
- #2807 fix: update @trufflesuite/uws-js-unofficial dependency to silence node12 warnings (@trufflesuite)
back to top
Top Priority:
- A rejected transaction should possibly be added back into the pool (#2176)
- Ganache v7.0.0 - typings are broken (#2134)
- Ganache's provider type is not compatible with Web3 (#2125)
- Add
eth_feeHistory
RPC endpoint (#1470) evm_mine
andminer_start
don't respect --mode.instamine=eager (#2029)
Coming Soon™:
debug_traceTransaction
may crash on Node.js v12 (#2106)evm_setAccountNonce
is race-conditiony (#1646)@ganache/filecoin@alpha
doesn't work withganache@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) - --db Option Requires Same Mnemonic and Network ID (#1030)
- 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)
back to top
- Reduce Bundle Size (#2096)
- Add a way to create or modify arbitrary accounts and storage (#1889)
- Switch to esbuild to make build times faster/reasonable (#1555)
- Accept a genesis.json file (#1042)
- Add flag for starting ganache in detached mode (#1001)
- Add personal_ecRecover and personal_sign (#995)
- Support for EIP 1898- Add
blockHash
to JSON-RPC methods which accept a default block parameter (#973) - 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)
- Support IPC endpoint (#759)
- 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)
- Add
evm_setCode
andevm_setStorageAt
RPC methods (#649) - Add support for eth_call state-overrides (#554)
- Upgrade custom rpc method
evm_mine
to return the new block (#536) - 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)
back to top
Open new issues (or join our team) to influence what we gets implemented and prioritized.
💖 The Truffle Team