Commit Graph

34 Commits

Author SHA1 Message Date
Iuri Matias 43448f62ef
move blockchain connection code to its own module 2018-10-23 09:56:18 +02:00
Iuri Matias 8ed808a101
fixes due to bad rebase 2018-10-23 09:47:41 +02:00
Iuri Matias 95df68e67c
fixes due to bad rebase 2018-10-23 09:46:40 +02:00
Iuri Matias b8cbee460b
move blockchain connection code to its own module 2018-10-23 09:41:26 +02:00
emizzle c83b6dde60
Handle geth process exit via crash/kill and also via killing `embark blockchain`
First case - run `embark run` which starts a blockchain node, then manually kill the `geth` process. Would throw `{ [Error: connect ECONNREFUSED 127.0.0.1:8543] message: 'connect ECONNREFUSED 127.0.0.1:8543', code: -32603 }` error and ruins the dashboard.

Second case, 1) run `embark blockchain` 2) run `embark run` 3) kill `embark blockchain` throws the error `{ [Error: connect ECONNREFUSED 127.0.0.1:8543] message: 'connect ECONNREFUSED 127.0.0.1:8543', code: -32603 }` and ruins the dashboard.

The first case was solved by having the child blockchain process that spawns geth listen for geth exit, then kill itself.

The second case required updating of `eth-block-tracker` to v4.0.1 inside of the `embark-web3-provider-engine`. v4.0.1 was a major version update and introduced breaking changes. Those changes were handled inside of `embark-web3-provider-engine`, covered in **blocker** PR https://github.com/jrainville/provider-engine/pull/1.
2018-10-23 09:01:13 +02:00
emizzle 294e14446f
Auto set swarm account to account controlled by the node
When there is no account/password specified for swarm, there was an error shown in the logs (asking for address/password), and the swarm process would quit.

This PR changes the behaviour so that if a swarm address/password are not specified in the config, it attempts to use the blockchain address/password specified in `config/blockchain > account`. If `config/blockchain > account > address` doesn’t exist, the first account controlled by the node is used (provided by `web3.eth.getAccounts`, along with the password from `config/blockchain > account > password`.
2018-10-22 19:54:50 +02:00
Jonathan Rainville 75d9998c57
refactor to not use the blockchain_connector directly 2018-10-22 19:54:47 +02:00
Jonathan Rainville f4d7636b7a
make code coverage work with refactored tests 2018-10-22 19:54:45 +02:00
Jonathan Rainville 7516bad619
use blockchain_connector's provider for nodes 2018-10-22 19:54:45 +02:00
Jonathan Rainville 5a5485d447
get rid of dependency on web3 2018-10-22 19:54:45 +02:00
Jonathan Rainville ddc8b36329
make tests work by using events 2018-10-22 19:54:45 +02:00
Jonathan Rainville ca3aea7923
BROKEN: solc doesnt load 2018-10-22 19:54:45 +02:00
Anthony Laibe 27973461b1
In case of ws, use the connected attribute
Instead of relying on non reliable source, directly
check the ws status
2018-10-22 19:54:44 +02:00
Giuseppe Bertone 81e798c89c
Add support for Parity
Addons
 - New chain initialization and genesis management
 - Option to choose client to use
 - Option to "ping forever" for Geth
 - Creation and unlock of accounts at client's start
 - Utility to fund accounts with ethers
 - Miner settings inside the ethereum client
 - Workaround to CORS problem: origin is now http://embark
 - Several double callback's checks

Updates
 - Boilerplate, templates, configuration files and demo stuff
 - Messages and i18n strings
 - Tests

Fixes
 - Geth client now uses miner.gastarget instead of the deprecated targetGasLimit
 - Workaround for shh_version with Parity

Reworks of other PRs into the new code
 - Included delayed proxy
 - Send ready only when the proxy is started
 - Start HTTP and WS proxies individually
 - Async setupProxy
 - Fixed datadir for GethMiner
2018-10-22 19:53:49 +02:00
Jonathan Rainville 9c0bff4515
remove console dir that I forgot to remove 2018-10-22 19:40:52 +02:00
Jonathan Rainville 5f8ad923c7
use an event to get web3 instead of global 2018-10-22 19:35:58 +02:00
Jonathan Rainville eaafa9bed2
add default account if set in config 2018-10-22 19:35:04 +02:00
Anthony Laibe 850a80c90c
ENS config use the actual network ID
Instead of relying on the name of network.
Fetch the real network id and configure ENS
based on that value
2018-10-22 19:25:16 +02:00
Iuri Matias 3ae5157e47 Revert "Delay contract deploiement if share bytecode"
This reverts commit 527dbcca8b.
2018-09-26 17:39:11 -04:00
Iuri Matias 8d13cd8e9d
Merge pull request #905 from embark-framework/bugfix/infura-simultaneous-tx
Bugfix/infura simultaneous tx
2018-09-26 14:21:30 -04:00
Andre Medeiros ad2eb9ad9f Warn, don't trace 2018-09-25 12:41:22 -04:00
Anthony Laibe 527dbcca8b Delay contract deploiement if share bytecode 2018-09-25 14:58:19 +01:00
Iuri Matias 4af9114681 fix blockchain node not found msg so it actually shows red 2018-09-21 17:51:53 -04:00
Anthony Laibe 98c785a4bb Fix register var and runcode 2018-08-30 10:04:58 +01:00
Iuri Matias 7eb52c1f8f
Merge pull request #735 from embark-framework/bugfix/allow-zero-config-blockchain
Allow zero config in blockchain
2018-08-29 17:33:15 -04:00
Anthony Laibe 23f7ec396a Allow zero config in blockchain 2018-08-27 10:06:37 +01:00
Jonathan Rainville 13e0d453ae fix websocket test, but still some hangs on second test run 2018-08-24 12:09:38 -04:00
Jonathan Rainville 2fe1b05492 use embarkJS secureSend 2018-08-21 16:11:06 -04:00
Jonathan Rainville c211430fbd use secureSend for deploy 2018-08-21 16:11:06 -04:00
Jonathan Rainville 083c936351 create separate function for secure send 2018-08-21 16:10:22 -04:00
Iuri Matias 53cd27b87d move subscriptions listener to blockchain connector module 2018-08-21 16:09:48 -04:00
Jonathan Rainville e5c498b59d hotfix network id comparison string vs number 2018-08-21 16:07:58 -04:00
Jonathan Rainville ca32d7aac0 warn if mismatch on network id 2018-08-21 16:05:59 -04:00
Iuri Matias 4919114f36 move blockchain connection code to its own module 2018-08-21 16:04:22 -04:00