Commit Graph

133 Commits

Author SHA1 Message Date
Iuri Matias d7c67ffcf7 move blockchain process related files into blockchain module 2018-08-21 16:02:18 -04:00
Michael Bradley, Jr 0307ba7ead blockchain -- defaultHost, dockerHostSwap 2018-08-21 15:53:39 -04:00
Anthony Laibe b679d3031a Remove code dependencies to underscore 2018-08-21 15:47:05 -04:00
Andre Medeiros e2d5e6fd57 Linting 2018-08-21 15:33:00 -04:00
Andre Medeiros 8be8ca508f Fix failing test on blockchain 2018-08-21 15:33:00 -04:00
Jonathan Rainville 054215ce21 wip changes 2018-08-21 15:31:55 -04:00
Jonathan Rainville a3d612f8ba remove use of initConfig 2018-08-21 15:30:43 -04:00
Jonathan Rainville ff340fe88c remove useless change 2018-08-21 15:30:10 -04:00
Jonathan Rainville 01900f8c6e wip fixes 2018-08-21 15:26:31 -04:00
Jonathan Rainville abb3d4e327 fix syncmode 2018-08-21 15:23:44 -04:00
Jonathan Rainville 18f60768f9 fix when using mining script 2018-08-21 15:21:24 -04:00
Jonathan Rainville dcc7b44377 fix miner 2018-08-21 15:20:12 -04:00
Jonathan Rainville fcbd4739dc only put isDev when specifically set 2018-08-21 15:20:11 -04:00
Jonathan Rainville cf403df1fb make it work 2018-08-21 15:18:12 -04:00
Jonathan Rainville 95a222e443 change fund account function 2018-08-21 15:18:12 -04:00
Jonathan Rainville 3e65d1c11b add geth miner. Needs to change eth and web3 2018-08-21 15:18:12 -04:00
Jonathan Rainville 1970f8fc53 use right path depending of os 2018-08-21 15:18:12 -04:00
Jonathan Rainville 5581964fab conflict in package json 2018-08-21 15:17:05 -04:00
emizzle bcd5593040 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-08-21 15:08:25 -04:00
emizzle ee59d43c77 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-08-21 15:08:25 -04:00
Michael Bradley, Jr d70264adb6 blockchain -- defaultHost, dockerHostSwap 2018-08-02 15:31:55 -05:00
emizzle 9b41fa8ac2 Modified DevFunds to “factory pattern”
Added a “factory pattern” to DevFunds to allow for async calls to be made during object construction. This allows for `web3.eth.getAccounts` to be called and the `accounts` property assigned on instantiation.

This modification allows each unit test case to be run independently of the others.
2018-08-01 11:35:42 +10:00
emizzle 7cb9cd5622 Basic unit tests complete for dev funds
Finished added unit tests for dev_funds. These are weak tests as the FakeIpcProvider does not provide enough support for keeping track of accounts and balances and instead we are injecting the provider responses in the tests, which kind of defeats the purposes of the tests. Instead, the FakeIpcProvider should be a little smarter and do more of what a real node would do.
2018-07-31 14:59:55 +10:00
emizzle 12304eac16 Adding in unit tests for dev_funds (WIP) 2018-07-31 14:59:55 +10:00
Iuri Matias c44a95e6ea fix linting issue 2018-07-30 06:58:54 -04:00
Iuri Matias 71e9eed67b use config password file; tolerate somethign going terribly wrong since it wouldnt' affect the blockchain process generally 2018-07-19 11:15:16 +03:00
Iuri Matias 69f356b3f0 only use personal in --dev mode 2018-07-19 10:58:47 +03:00
Iuri Matias 0099078e94 fix lint 2018-07-18 17:53:37 +03:00
Iuri Matias c1809e3752 Merge branch 'fund_accounts' of github.com:embark-framework/embark into fund_accounts 2018-07-18 17:48:58 +03:00
Iuri Matias 20406ba51a fix lint 2018-07-18 17:47:53 +03:00
emizzle 9382f98933 Housekeeping and removal of none additions
Clean up debugging statements from fund_accounts.

Removed the addition of the nonce increment for contracts deploy as this was only affecting mneumonic-generated accounts which is not meant for dev environment.
2018-07-18 14:08:32 +02:00
Iuri Matias 5e3740f088 add regular account unlocks in devMod due to issues with geth 2018-07-18 13:45:18 +03:00
Iuri Matias 28dd6dba60 add interval to send txs to deal with geth --dev bug 2018-07-18 13:29:02 +03:00
Iuri Matias 3d1db2b21e Merge branch 'fund_accounts' of github.com:embark-framework/embark into fund_accounts 2018-07-17 17:49:32 +03:00
Iuri Matias 91f1748d60 don't wait for account funds 2018-07-17 17:30:23 +03:00
emizzle 7e12c5a9f7 funding dev account updates
Now funds accounts only if they have not been funded, and also funds with only the amount needed.

Also fixed bug with unlocking accounts when re-running `unlockAccounts` on already created accounts.
2018-07-17 10:57:31 +02:00
emizzle 296663edc7 password read from config file and fix for gasprice 2018-07-16 21:19:01 +02:00
emizzle 11d6980f70 further dev funding 2018-07-16 18:48:32 +02:00
Iuri Matias f2213970f7 first stab at funding accounts in geth given config 2018-07-13 15:56:59 +03:00
Jonathan Rainville da01ab15db enable using both syncMode and syncmode 2018-07-06 09:31:28 -04:00
Iuri Matias 289be4b8a4 check for cmd not found in stderr 2018-07-04 16:40:46 +03:00
Iuri Matias a7a6a62edc make linter happy 2018-07-04 16:36:49 +03:00
Iuri Matias 6c03a2e212 ignore stderr since geth outputs normal logs to it 2018-07-04 16:10:12 +03:00
Jonathan Rainville ffb3ec544b fix account initialization and address use 2018-07-03 14:55:04 -04:00
Iuri Matias 76ab330546 add debug option 2018-06-18 09:44:16 -04:00
Jonathan Rainville d77083ee8c enable syncMode 2018-06-15 16:33:59 -04:00
VoR0220 391777d5bf fix test app config and swap olympic for rinkeby as testnet option
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
2018-06-15 13:18:37 -05:00
Jonathan Rainville a09f680ca7 fix testnet and olympic network types 2018-06-14 15:22:01 -04:00
Iuri Matias e0ff5b3580 remove anoying backtrace 2018-06-12 13:58:21 -04:00
Iuri Matias 5b1eeab7ed make debug a default api option 2018-06-12 12:21:46 -04:00