25 Commits

Author SHA1 Message Date
emizzle
3d5ce687c1 Updated online/offline event checks so they are run during initialisation.
Changed the online event to `once` and set it to be bound every time the node goes offline.

The above changes handle the case where:
1) `embark run` runs and starts geth.
2) geth is killed manually
3) `embark blockchain` is run in separate process to restart geth
4) the `embark run` process detects this change and restarts the web3 provider and recompiles/deploys/builds

Every time `embark blochain` is restarted, an error is appended and all are emitted from the `eth-block-tracker`. This is a bug but can't figure out where it originates. The downside is that if, for example, `embark blockchain` is restarted 4 times, there will be 4 errors emitted from the `eth-block-tracker`. Because of this, errors emitted from `eth-block-tracker` have been reduced to trace to avoid clogging the logs.
2018-09-30 09:20:12 -04:00
emizzle
5022012a6c 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-09-30 09:20:12 -04:00
Iuri Matias
8518e4aa2a fixes due to bad rebase 2018-09-30 09:18:45 -04:00
Iuri Matias
45cc43bfc8 move blockchain connection code to its own module 2018-09-30 08:33:35 -04:00
Iuri Matias
79360ae3c2 fixes due to bad rebase 2018-09-29 20:55:31 -04:00
Iuri Matias
0c25ae2bbf fixes due to bad rebase 2018-09-29 20:55:31 -04:00
Iuri Matias
97b19d4a69 fixes due to bad rebase 2018-09-29 20:47:49 -04:00
Iuri Matias
50124435d8 move blockchain connection code to its own module 2018-09-29 20:33:25 -04:00
emizzle
ffa2c44c96 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-09-29 19:42:50 -04:00
Iuri Matias
3ae5157e47 Revert "Delay contract deploiement if share bytecode"
This reverts commit 527dbcca8b4bcdcb196ff7d6dbfcbc3cb40420ba.
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