diff --git a/boilerplate/config/blockchain.json b/boilerplate/config/blockchain.json index 961c8be60..c6d471422 100644 --- a/boilerplate/config/blockchain.json +++ b/boilerplate/config/blockchain.json @@ -13,6 +13,7 @@ "account": { "password": "config/development/password" }, + "targetGasLimit": 8000000, "wsOrigins": "http://localhost:8000", "wsRPC": true, "wsHost": "localhost", diff --git a/boilerplate/config/development/genesis.json b/boilerplate/config/development/genesis.json index 4a50a438b..4b6ce0db5 100644 --- a/boilerplate/config/development/genesis.json +++ b/boilerplate/config/development/genesis.json @@ -12,5 +12,5 @@ "timestamp": "0x00", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x", - "gasLimit": "0x4c4b40" + "gasLimit": "0x7a1200" } diff --git a/demo/config/blockchain.json b/demo/config/blockchain.json index 215b68c4c..1d02efcea 100644 --- a/demo/config/blockchain.json +++ b/demo/config/blockchain.json @@ -13,6 +13,7 @@ "account": { "password": "config/development/password" }, + "targetGasLimit": 8000000, "wsOrigins": "http://localhost:8000", "wsRPC": true, "wsHost": "localhost", diff --git a/demo/config/development/genesis.json b/demo/config/development/genesis.json index 4a50a438b..4b6ce0db5 100644 --- a/demo/config/development/genesis.json +++ b/demo/config/development/genesis.json @@ -12,5 +12,5 @@ "timestamp": "0x00", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x", - "gasLimit": "0x4c4b40" + "gasLimit": "0x7a1200" } diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 524cba5a8..9c9d600fe 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -37,7 +37,8 @@ var Blockchain = function(options) { wsPort: this.blockchainConfig.wsPort || 8546, wsOrigins: this.blockchainConfig.wsOrigins || false, wsApi: (this.blockchainConfig.wsApi || ['eth', 'web3', 'net', 'shh']), - vmdebug: this.blockchainConfig.vmdebug || false + vmdebug: this.blockchainConfig.vmdebug || false, + targetGasLimit: this.blockchainConfig.targetGasLimit || false }; if (this.blockchainConfig === {} || JSON.stringify(this.blockchainConfig) === '{"enabled":true}') { diff --git a/lib/cmds/blockchain/geth_commands.js b/lib/cmds/blockchain/geth_commands.js index 2e25f2eff..e28e559c6 100644 --- a/lib/cmds/blockchain/geth_commands.js +++ b/lib/cmds/blockchain/geth_commands.js @@ -193,6 +193,12 @@ class GethCommands { } callback(null, ""); }, + function gasLimit(callback) { + if (config.targetGasLimit) { + return callback(null, "--targetgaslimit " + config.targetGasLimit); + } + callback(null, ""); + }, function mineWhenNeeded(callback) { if (config.mineWhenNeeded) { return callback(null, "js .embark/" + self.env + "/js/mine.js"); diff --git a/test_app/config/blockchain.json b/test_app/config/blockchain.json index b23fea5f2..41400449a 100644 --- a/test_app/config/blockchain.json +++ b/test_app/config/blockchain.json @@ -13,6 +13,7 @@ "account": { "password": "config/development/password" }, + "targetGasLimit": 8000000, "wsOrigins": "http://localhost:8000", "wsRPC": true, "wsHost": "localhost", diff --git a/test_app/config/development/genesis.json b/test_app/config/development/genesis.json index 4a50a438b..4b6ce0db5 100644 --- a/test_app/config/development/genesis.json +++ b/test_app/config/development/genesis.json @@ -12,5 +12,5 @@ "timestamp": "0x00", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x", - "gasLimit": "0x4c4b40" + "gasLimit": "0x7a1200" }