11# Ganache Upgrade Guide
22
3+ ## ganache v7.0.0 - v7.4.3 to ganache v7.5.0+
4+
5+ Node.js v12 and v13 support have been removed. You must upgrade your version of
6+ Node to v14 or later.
7+
8+ Kovan support has been removed. If you need Kovan support you must use an older
9+ version of ganache.
10+
311## ganache-core v2.x.x and ganache-cli v6.x.x to ganache v7.x.x
412
513### Installing
@@ -89,8 +97,8 @@ depending on how you originally installed ganache-cli or ganache-core._
8997#### Allowed transaction signature changes
9098
9199Previously, Ganache allowed transaction signatures to originate from 3 chains
92- ids: ` 1 ` , ` chainId ` , and ` networkId ` . Ganache now allows only transactions
93- signed with its own ` chainId ` .
100+ ids: ` 1 ` , ` chainId ` , and ` networkId ` . Ganache now allows only transactions
101+ signed with its own ` chainId ` .
94102
95103#### ` _chainId ` and ` _chainIdRpc ` options removed
96104
@@ -113,7 +121,7 @@ and it defaulted to `true`.
113121
114122Ganache now _ disables_ the ` vmErrorsOnRPCResponse ` functionality by default.
115123
116- If your code relies on these non-standard errors on transaction failure, you'll
124+ If your code relies on these non-standard errors on transaction failure, you'll
117125need to _ enable_ the ` vmErrorsOnRpcResponse ` flag to restore this behavior:
118126
119127``` console
@@ -144,7 +152,7 @@ You may want to remove your old Docker images and containers and then pull
144152Ganache from the new location before updating, but this step is not required.
145153
146154> Note: Before updating you may want to prune your Docker images and containers.
147- Read more on [ docker pruning] ( https://docs.docker.com/config/pruning/ ) .
155+ > Read more on [ docker pruning] ( https://docs.docker.com/config/pruning/ ) .
148156
149157You can view the list of local Docker containers by running:
150158
@@ -183,7 +191,6 @@ or to pull and run it simultaneously:
183191$ docker run --port 8545:8545 trufflesuite/ganache:latest
184192```
185193
186-
187194#### Default startup ether is now 1000 instead of 100
188195
189196We polled 50 developers about Ganache's startup Ether amount. 44% had no
@@ -207,7 +214,7 @@ ganache.provider({
207214 wallet: {
208215 defaultBalance: 100
209216 }
210- })
217+ });
211218```
212219
213220#### Ganache's provider and server interfaces have changed
@@ -222,8 +229,8 @@ If you were previously programmatically accessing the VM step events by
222229traversing Ganache internals you can now access these via a new Event System:
223230
224231In addition to [ EIP-1193's] ( https://eips.ethereum.org/EIPS/eip-1193 ) ` "message" `
225- event and the legacy ` "data" ` event, Ganache emits 3 additional events:
226- ` "ganache:vm:tx:before" ` , ` "ganache:vm:tx:step" ` , and ` "ganache:vm:tx:after" ` .
232+ event and the legacy ` "data" ` event, Ganache emits 3 additional events:
233+ ` "ganache:vm:tx:before" ` , ` "ganache:vm:tx:step" ` , and ` "ganache:vm:tx:after" ` .
227234
228235These events can be used to observe the lifecycle of any transaction executed
229236via ` *sendTransaction ` , ` eth_call ` , ` debug_traceTransaction ` , or ` debug_storageRangeAt ` .
@@ -286,7 +293,7 @@ likely enable this in the future.
286293
287294Ganache's old database format is incompatible with this version. We've decided
288295to hold off on building migration tools for this. If you will need a migration
289- tool (you use the ` db ` flag or the ` db_path ` option and are unable to recreate
296+ tool (you use the ` db ` flag or the ` db_path ` option and are unable to recreate
290297your initial DB state) please
291298[ open an issue] ( https://github.com/trufflesuite/ganache/issues/new )
292299to let us know.
@@ -341,7 +348,7 @@ If you send a transaction with `eth_sendTransaction` and that transaction doesn'
341348
342349``` typescript
343350// send a "legacy" transaction
344- const hash = await provider .request (" eth_sendTransaction" , [{ from }]);
351+ const hash = await provider .request (" eth_sendTransaction" , [{ from }]);
345352const tx = await provider .request (" eth_getTransactionByHash" , [hash ]);
346353// The returned `type` field indicates it was updated to a type 2 transaction
347354assert .strictEqual (tx .type , " 0x2" );
@@ -433,17 +440,17 @@ sending account to cover the maximum cost.
433440- ` logs ` subscription events are emitted before ` newHeads ` events
434441- the default ` callGasLimit ` has changed from ` Number.MAX_SAFE_INTEGER ` ($2^{53} - 1$) to ` 50_000_000 ` .
435442
436-
437-
438- [ ^ 1 ] : yarn and pnpm don't support dependency lock files, like npm's npm-shrinkwrap.json,
439- which permits supply-chain attacks through automatic transitive dependency
440- updates, like the [ left-pad attack] ( https://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm.html ) and mostly recently the
441- [ colors and faker attack ] ( https://security.snyk.io/vuln/SNYK-JS-COLORS-2331906 ) .
442-
443- [ ^ 2 ] : ` eth_call ` can't always perfectly reproduce the state that the original
444- transaction was run in if other transactions run before it in a block. This is
445- very rare in testing scenarios, but should be something you are aware of. We'll
446- be addressing this shortcoming in a future EIP and release by extending eth_call
447- with an option to run the transaction at a certain _ index _ in the specified
448- block (you likely won't ever see this option enabled on public nodes, like
449- Infura, as it can be a very CPU-intensive process).
443+ [ ^ 1 ] :
444+ yarn and pnpm don't support dependency lock files, like npm's npm-shrinkwrap.json,
445+ which permits supply-chain attacks through automatic transitive dependency
446+ updates, like the [ left-pad attack ] ( https://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm.html ) and mostly recently the
447+ [ colors and faker attack] ( https://security.snyk.io/vuln/SNYK-JS-COLORS-2331906 ) .
448+
449+ [ ^ 2 ] :
450+ ` eth_call ` can't always perfectly reproduce the state that the original
451+ transaction was run in if other transactions run before it in a block. This is
452+ very rare in testing scenarios, but should be something you are aware of. We'll
453+ be addressing this shortcoming in a future EIP and release by extending eth * call
454+ with an option to run the transaction at a certain \_ index * in the specified
455+ block (you likely won't ever see this option enabled on public nodes, like
456+ Infura, as it can be a very CPU-intensive process).
0 commit comments