From d4150b91001f2dc4323f94f1d83c809c19e77cb8 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 10 Jul 2015 07:03:01 -0400 Subject: [PATCH 1/7] update to 0.5.0 --- boilerplate/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boilerplate/package.json b/boilerplate/package.json index c3af2fe45..374bf431e 100644 --- a/boilerplate/package.json +++ b/boilerplate/package.json @@ -10,7 +10,7 @@ "license": "ISC", "homepage": "", "devDependencies": { - "embark-framework": "iurimatias/embark-framework#develop", + "embark-framework": "^0.5.0", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-coffee": "^0.13.0", "grunt-contrib-concat": "^0.5.1", From 5e0b45723baeef41f2c88d2425331d37b3f216a8 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 10 Jul 2015 07:29:53 -0400 Subject: [PATCH 2/7] updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b94cb7802..8cfec56e5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ See the [Wiki](https://github.com/iurimatias/embark-framework/wiki) for more det Installation ====== -Requirements: geth (0.9.32, warning: 0.9.34 not supported at the moment), solc (0.9.23), node (0.12.2) and npm +Requirements: geth (0.9.38), solc (0.9.23), node (0.12.2) and npm For specs: pyethereum, ethertdd.py From 6f808cfeb06e252f4673491bade8181b525b4e58 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Mon, 14 Sep 2015 19:58:52 -0500 Subject: [PATCH 3/7] ability to create multiple contracts with a single password for testing purposes --- boilerplate/config/blockchain.yml | 4 +--- lib/blockchain.js | 11 +++++++---- lib/config/blockchain.js | 3 +-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/boilerplate/config/blockchain.yml b/boilerplate/config/blockchain.yml index 49fb0add4..eec7cb53e 100644 --- a/boilerplate/config/blockchain.yml +++ b/boilerplate/config/blockchain.yml @@ -7,20 +7,19 @@ development: datadir: /tmp/embark chains: config/chains/development.json mine_when_needed: true - max_peers: 0 gas_limit: 500000 gas_price: 10000000000000 console: false account: init: true password: config/password + num: 1 staging: rpc_host: localhost rpc_port: 8101 rpc_whitelist: "*" datadir: default network_id: 0 - max_peers: 4 console: true account: init: false @@ -31,7 +30,6 @@ production: rpc_whitelist: "*" datadir: default network_id: 1 - max_peers: 4 console: true account: init: false diff --git a/lib/blockchain.js b/lib/blockchain.js index 9ab37a5c9..0915c2a8b 100644 --- a/lib/blockchain.js +++ b/lib/blockchain.js @@ -105,12 +105,15 @@ Blockchain.prototype.get_address = function() { console.log("=== already initialized"); address = result.output.match(/{(\w+)}/)[1]; } else { - console.log("running: " + this.init_command()); - result = exec(this.init_command()); - address = result.output.match(/{(\w+)}/)[1]; + console.log("running: " + this.init_command() + " " + this.account.num + " time(s)"); + result = ''; + for (var i = 0; i < this.account.num; i++){ + result = exec(this.init_command()) + '\n'; + address = result.output.match(/{(\w+)}/)[1]; //TODO: Write a proper reg expression to match multiple lines of output...not my forte + } } } - + if (this.account.num > 1) return exec(this.list_command()); return address; } diff --git a/lib/config/blockchain.js b/lib/config/blockchain.js index d0dcdd50f..70f2fd50c 100644 --- a/lib/config/blockchain.js +++ b/lib/config/blockchain.js @@ -41,7 +41,6 @@ BlockchainConfig.prototype.config = function(env) { genesisBlock: config.genesis_block, datadir: config.datadir, chains: config.chains, - deployTimeout: config.deploy_timeout || 20, networkId: networkId, maxPeers: 4, port: config.port || "30303", @@ -54,4 +53,4 @@ BlockchainConfig.prototype.config = function(env) { return config; }; -module.exports = BlockchainConfig; +module.exports = BlockchainConfig; \ No newline at end of file From bc96708d1389717564a14fefdd452ea9fe319a97 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Mon, 14 Sep 2015 20:06:36 -0500 Subject: [PATCH 4/7] correcting some changes I made in error --- boilerplate/config/blockchain.yml | 3 +++ lib/config/blockchain.js | 1 + 2 files changed, 4 insertions(+) diff --git a/boilerplate/config/blockchain.yml b/boilerplate/config/blockchain.yml index eec7cb53e..911fd1dcd 100644 --- a/boilerplate/config/blockchain.yml +++ b/boilerplate/config/blockchain.yml @@ -7,6 +7,7 @@ development: datadir: /tmp/embark chains: config/chains/development.json mine_when_needed: true + max_peers: 0 gas_limit: 500000 gas_price: 10000000000000 console: false @@ -20,6 +21,7 @@ staging: rpc_whitelist: "*" datadir: default network_id: 0 + max_peers: 4 console: true account: init: false @@ -30,6 +32,7 @@ production: rpc_whitelist: "*" datadir: default network_id: 1 + max_peers: 0 console: true account: init: false diff --git a/lib/config/blockchain.js b/lib/config/blockchain.js index 70f2fd50c..6fade581e 100644 --- a/lib/config/blockchain.js +++ b/lib/config/blockchain.js @@ -41,6 +41,7 @@ BlockchainConfig.prototype.config = function(env) { genesisBlock: config.genesis_block, datadir: config.datadir, chains: config.chains, + deployTimeout: config.deploy_timeout || 20, networkId: networkId, maxPeers: 4, port: config.port || "30303", From ef97e488f3ea9ad52affa296a8f4af16b1116894 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Mon, 14 Sep 2015 20:07:36 -0500 Subject: [PATCH 5/7] correcting some changes I made in error --- boilerplate/config/blockchain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boilerplate/config/blockchain.yml b/boilerplate/config/blockchain.yml index 911fd1dcd..7bfee1a58 100644 --- a/boilerplate/config/blockchain.yml +++ b/boilerplate/config/blockchain.yml @@ -32,7 +32,7 @@ production: rpc_whitelist: "*" datadir: default network_id: 1 - max_peers: 0 + max_peers: 4 console: true account: init: false From 1a4bcd168b762ebfc112dd515badcc7facc1eb24 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Wed, 16 Sep 2015 15:25:50 -0500 Subject: [PATCH 6/7] support solc version 1.0 --- lib/compiler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/compiler.js b/lib/compiler.js index bcac64e6a..4fc60bf46 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -29,7 +29,9 @@ Compiler.prototype.compile_solidity = function(contractFile) { output = result.output; if (result.code === 1) { - throw new Error(result.output); + if (version == '0.1.1' || version == '0.1.0'){ + throw new Error(result.output); + } } json = JSON.parse(output).contracts; From b3cec8287b53d5db01280346d3e1f0aeea7223cd Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Thu, 1 Oct 2015 08:23:41 -0500 Subject: [PATCH 7/7] added ability to boot nodes via a list --- boilerplate/config/blockchain.yml | 6 ++++++ lib/blockchain.js | 17 ++++++++++------- lib/config/blockchain.js | 6 ++++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/boilerplate/config/blockchain.yml b/boilerplate/config/blockchain.yml index 7bfee1a58..af5168004 100644 --- a/boilerplate/config/blockchain.yml +++ b/boilerplate/config/blockchain.yml @@ -23,6 +23,9 @@ staging: network_id: 0 max_peers: 4 console: true + bootnodes: + boot: false + enodes: [] #insert enode urls here. account: init: false address: @@ -34,6 +37,9 @@ production: network_id: 1 max_peers: 4 console: true + bootnodes: + boot: false + enodes: [] account: init: false address: diff --git a/lib/blockchain.js b/lib/blockchain.js index 0915c2a8b..3b03788a0 100644 --- a/lib/blockchain.js +++ b/lib/blockchain.js @@ -69,6 +69,12 @@ Blockchain.prototype.run_command = function(address, use_tmp) { cmd += "--unlock " + address + " "; } + if (config.bootNodes.init == true){ + cmd += "--bootnodes "; + for (var i = 0; i < config.bootNodes.enodes.length; i++){ + cmd += config.bootNodes.enodes[i] + " "; + } + } if (config.console_toggle) { cmd += "console"; } @@ -105,15 +111,12 @@ Blockchain.prototype.get_address = function() { console.log("=== already initialized"); address = result.output.match(/{(\w+)}/)[1]; } else { - console.log("running: " + this.init_command() + " " + this.account.num + " time(s)"); - result = ''; - for (var i = 0; i < this.account.num; i++){ - result = exec(this.init_command()) + '\n'; - address = result.output.match(/{(\w+)}/)[1]; //TODO: Write a proper reg expression to match multiple lines of output...not my forte - } + console.log("running: " + this.init_command()); + result = exec(this.init_command()); + address = result.output.match(/{(\w+)}/)[1]; } } - if (this.account.num > 1) return exec(this.list_command()); + return address; } diff --git a/lib/config/blockchain.js b/lib/config/blockchain.js index 6fade581e..33624bad1 100644 --- a/lib/config/blockchain.js +++ b/lib/config/blockchain.js @@ -30,6 +30,7 @@ BlockchainConfig.prototype.config = function(env) { else { networkId = config.network_id; } + config = { rpcHost: config.rpc_host, @@ -41,9 +42,10 @@ BlockchainConfig.prototype.config = function(env) { genesisBlock: config.genesis_block, datadir: config.datadir, chains: config.chains, + bootNodes: config.bootnodes, deployTimeout: config.deploy_timeout || 20, networkId: networkId, - maxPeers: 4, + maxPeers: config.max_peers || 4, port: config.port || "30303", console_toggle: config.console || false, mine_when_needed: config.mine_when_needed || false, @@ -54,4 +56,4 @@ BlockchainConfig.prototype.config = function(env) { return config; }; -module.exports = BlockchainConfig; \ No newline at end of file +module.exports = BlockchainConfig;