From 9a4a991a4f6fee11f16908fd5b2480f69b828852 Mon Sep 17 00:00:00 2001 From: Nick Paterno <43416138+nicholasjpaterno@users.noreply.github.com> Date: Wed, 22 Jan 2020 13:07:52 -0500 Subject: [PATCH] Change VM hardfork default to `muirGlacier` (#541) --- README.md | 2 +- lib/blockchain_double.js | 2 +- lib/database/txserializer.js | 2 +- lib/utils/transaction.js | 2 +- typings/index.d.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8e9204efad..abf39638ab 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Both `.provider()` and `.server()` take a single object which allows you to spec * `"account_keys_path"`: `String` - Specifies a file to save accounts and private keys to, for testing. * `"vmErrorsOnRPCResponse"`: `boolean` - Whether or not to transmit transaction failures as RPC errors. Set to `false` for error reporting behaviour which is compatible with other clients such as geth and Parity. This is `true` by default to replicate the error reporting behavior of previous versions of ganache. * `"hdPath"`: The hierarchical deterministic path to use when generating accounts. Default: "m/44'/60'/0'/0/" -* `"hardfork"`: `String` Allows users to specify which hardfork should be used. Supported hardforks are `byzantium`, `constantinople`, `petersburg`, and `istanbul` (default). +* `"hardfork"`: `String` Allows users to specify which hardfork should be used. Supported hardforks are `byzantium`, `constantinople`, `petersburg`, `istanbul`, and `muirGlacier` (default). * `"allowUnlimitedContractSize"`: `boolean` - Allows unlimited contract sizes while debugging (NOTE: this setting is often used in conjuction with an increased `gasLimit`). By setting this to `true`, the check within the EVM for contract size limit of 24KB (see [EIP-170](https://git.io/vxZkK)) is bypassed. Setting this to `true` **will** cause `ganache-core` to behave differently than production environments. (default: `false`; **ONLY** set to `true` during debugging). * `"gasPrice"`: `String::hex` Sets the default gas price for transactions if not otherwise specified. Must be specified as a `hex` encoded string in `wei`. Defaults to `"0x77359400"` (2 `gwei`). * `"gasLimit"`: `String::hex | number` Sets the block gas limit. Must be specified as a `hex` string or `number`(integer). Defaults to `"0x6691b7"`. diff --git a/lib/blockchain_double.js b/lib/blockchain_double.js index 49e3f7a9b0..c111a0c290 100644 --- a/lib/blockchain_double.js +++ b/lib/blockchain_double.js @@ -44,7 +44,7 @@ const defaultOptions = { defaultTransactionGasLimit: "0x15f90", time: null, debug: false, - hardfork: "istanbul", + hardfork: "muirGlacier", allowUnlimitedContractSize: false }; diff --git a/lib/database/txserializer.js b/lib/database/txserializer.js index 684be9db55..10de485572 100644 --- a/lib/database/txserializer.js +++ b/lib/database/txserializer.js @@ -31,7 +31,7 @@ const decode = function(json, done) { comment: "Local test network" }; - let hardfork = "istanbul"; + let hardfork = "muirGlacier"; if (json._options) { hardfork = json._options.hardfork; commonOptions.chainId = json._options.chainId; diff --git a/lib/utils/transaction.js b/lib/utils/transaction.js index b619ebaa1f..69c6197cb1 100644 --- a/lib/utils/transaction.js +++ b/lib/utils/transaction.js @@ -152,7 +152,7 @@ module.exports = class Transaction extends EthereumJsTransaction { comment: "Local test network", bootstrapNodes: [] }, - "istanbul" + "muirGlacier" ); } super(undefined, { common }); diff --git a/typings/index.d.ts b/typings/index.d.ts index 08cab91345..9942eeb329 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -14,7 +14,7 @@ declare module "ganache-core" { fork_block_number?: string | number; gasLimit?: string | number; gasPrice?: string; - hardfork?: "byzantium" | "constantinople" | "petersburg" | "istanbul"; + hardfork?: "byzantium" | "constantinople" | "petersburg" | "istanbul" | "muirGlacier"; hd_path?: string; locked?: boolean; logger?: {