From cf885ae043fdbd826c89bd17dfb074908488142e Mon Sep 17 00:00:00 2001 From: Juno Im Date: Thu, 5 Oct 2017 00:04:07 +0900 Subject: [PATCH 01/10] Update electron version. (#3125) Applied updated Electron version due to the RCE vulnerability reported b Hithereum Team. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5fcd63969..9efcca18b 100644 --- a/README.md +++ b/README.md @@ -43,14 +43,14 @@ To run mist in development you need: - [Node.js](https://nodejs.org) `v7.x` (use the prefered installation method for your OS) - [Meteor](https://www.meteor.com/install) javascript app framework - [Yarn](https://yarnpkg.com/) package manager -- [Electron](http://electron.atom.io/) `v1.4.15` cross platform desktop app framework +- [Electron](http://electron.atom.io/) `v1.7.8` cross platform desktop app framework - [Gulp](http://gulpjs.com/) build and automation system Install the latter ones via: $ curl https://install.meteor.com/ | sh $ curl -o- -L https://yarnpkg.com/install.sh | bash - $ yarn global add electron@1.4.15 + $ yarn global add electron@1.7.8 $ yarn global add gulp ### Initialisation From 96c103fb3c69c1584623674b02c472c805372cde Mon Sep 17 00:00:00 2001 From: Marc Garreau Date: Wed, 4 Oct 2017 09:05:10 -0600 Subject: [PATCH 02/10] Mist API doc cleanup (#3118) * Minor spelling/grammatical changes. * Tweaks update language --- MISTAPI.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/MISTAPI.md b/MISTAPI.md index eae5e34f3..c14105747 100644 --- a/MISTAPI.md +++ b/MISTAPI.md @@ -64,7 +64,7 @@ Asks the user to provide, or create a new account. #### Parameters -1. `Function` The callback to be called with the new address as the second param +1. `Function` The callback to be called with the new address as the second parameter. #### Example @@ -78,7 +78,7 @@ mist.requestAccount(function(e, address){ ### mist.menu -Provides functionality to control the sub menu of your dapp, when its add to the sidebar. +Provides functionality to control the sub menu of your dapp, when its added to the sidebar. *** @@ -91,10 +91,10 @@ Adds/Updates a sub menu entry, which is placed below you dapp button in the side 1. `String` **optional** and id string to identify your sub menu entry when updating. 2. `Object` The menu options: - `name` (`String`): The name of the sub menu button. - - `badge` (`String|null`) **optional**: The badge text for the sub menu button, e.g. `50` + - `badge` (`String|null`) **optional**: The badge text for the sub menu button, e.g. `50`. - `position` (`Number`) **optional**: The position of the submenu button, `1` is on the top. - - `selected` (`Boolean`) **optional**: whether or not this sub menu entry is currently selected. -3. `Function` **optional**: The callback to be called when the sub menu entry is clicked + - `selected` (`Boolean`) **optional**: Whether or not this sub menu entry is currently selected. +3. `Function` **optional**: The callback to be called when the sub menu entry is clicked. #### Minimal example @@ -125,7 +125,7 @@ mist.menu.add('tkrzU', { ### mist.menu.clear() Removes all sub menu entries. You can use this when you reload your app, -to clear up wrong menu entries, which might got lost since the last session. +to clear up incorrect menu entries, which might have been lost since the last session. #### Parameters @@ -145,11 +145,11 @@ Removes a sub menu entry. ### mist.menu.select(id) -Selects the according sub menu entry. +Selects the respective sub menu entry. #### Parameters -1. `String` the sub menu entry identifier +1. `String` the sub menu entry identifier. *** @@ -159,23 +159,23 @@ Sets the main badge of your dapp, right below your dapps menu button. #### Parameters -1. `String` the string used as the badge text +1. `String` the string used as the badge text. *** ### mist.menu.update(id, [, options] [, callback]) -Works like `mist.menu.add()`, but all but the `id` parameters are optional. +Works like `mist.menu.add()`, but only the `id` parameter is required. #### Parameters 1. `String` and id string to identify your sub menu entry. 2. `Object` The menu options: - `name` (`String`): (optional) The name of the sub menu button. - - `badge` (`String|null`): (optional) The badge text for the sub menu button, e.g. `50` + - `badge` (`String|null`): (optional) The badge text for the sub menu button, e.g. `50`. - `position` (`Number`): (optional) The position of the submenu button, `1` is on the top. - - `selected` (`Boolean`): (optional) whether or not this sub menu entry is currently selected. -3. `Function` (optional) The callback to be called when the sub menu entry is clicked + - `selected` (`Boolean`): (optional) Whether or not this sub menu entry is currently selected. +3. `Function` (optional) The callback to be called when the sub menu entry is clicked. #### Example From 46fc90cc25f151f75a7a38343b3f861f77887b5f Mon Sep 17 00:00:00 2001 From: Eric Jarvies Date: Wed, 4 Oct 2017 09:06:24 -0600 Subject: [PATCH 03/10] Minor spelling/grammatical changes. (#3084) --- CONTRIBUTING.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9c498404..492934425 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,15 +2,18 @@ ## Issues / Bug reports -**Read the existing issues first, and also search in the closed issues. You may find yours already.** +**Prior to submitting, please search -and read- _both_ open and closed issues -as _it_ may already exist.** -To help make Mist (Ethereum Wallet) better please file issue with the following basic descriptions: +To help improve Mist (_Ethereum Wallet_), please include the following: -- What do you run? binary from [releases](https://github.com/ethereum/mist/releases) or the development version from the [commandline](https://github.com/ethereum/mist#run-mist) -- Which version do you used? You can find that in the `VERSION` file in the Mist folder +- What do you run? (_Binary version from [releases](https://github.com/ethereum/mist/releases) or a development version from the [commandline](https://github.com/ethereum/mist#run-mist)_) +- Which version do you use? (_Check the `VERSION` file in the Mist folder_) - What OS you're on? -- Provide a log file if necessary, you can find that in the Mist data folder (Linux: `~/.config/Mist/*.log`, Windows: `%APPDATA%/Roaming/Mist/*.log`, MacOSX: `~/Library/Application Support/Mist/*.log`) -- Ideally also a screenshot, if its an interface issue + +If applicable: + +- Log file (Linux: `~/.config/Mist/*.log`, Windows: `%APPDATA%/Roaming/Mist/*.log`, MacOSX: `~/Library/Application Support/Mist/*.log`) +- Screenshot (for GUI related issues) ## Pull Requests From 145a768901e7f11d77afbd139451479f5273a19c Mon Sep 17 00:00:00 2001 From: Ev Date: Wed, 4 Oct 2017 12:07:09 -0300 Subject: [PATCH 04/10] Retrying when no peers are available (#3105) --- modules/nodeSync.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nodeSync.js b/modules/nodeSync.js index eb650674c..8a524ba32 100644 --- a/modules/nodeSync.js +++ b/modules/nodeSync.js @@ -147,6 +147,10 @@ class NodeSync extends EventEmitter { const blockResult = ret2.result; const now = Math.floor(new Date().getTime() / 1000); + if (!blockResult) { + return this._sync(); + } + log.debug(`Last block: ${Number(blockResult.number)}; timestamp: ${blockResult.timestamp}`); const diff = now - +blockResult.timestamp; From 149c58de4ff1695faf817e3132b1b5100fe976df Mon Sep 17 00:00:00 2001 From: Ev Date: Wed, 4 Oct 2017 12:07:26 -0300 Subject: [PATCH 05/10] Fixing log message (#3127) * Fixing log message * Logging the whole object --- modules/ethereumNode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ethereumNode.js b/modules/ethereumNode.js index 94f9ac708..731f20d7d 100644 --- a/modules/ethereumNode.js +++ b/modules/ethereumNode.js @@ -465,7 +465,7 @@ class EthereumNode extends EventEmitter { error.tag = UNABLE_TO_BIND_PORT_ERROR; } - log.debug(err.message); + log.debug(error); return reject(error); } From 0440db7ee904c088d9e98b103c380aa2e273963e Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Fri, 6 Oct 2017 15:00:58 -0300 Subject: [PATCH 06/10] Updating os-timesync package --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 93406aa0c..0cc4b2f7f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "minimongo-standalone": "^1.1.0-3", "numeral": "^2.0.6", "oboe": "^2.1.3", - "os-timesync": "^1.0.7", + "os-timesync": "^1.0.8", "semver": "^5.1.0", "solc": "^0.4.15", "swarm-js": "^0.1.21", diff --git a/yarn.lock b/yarn.lock index 8c49e7ce9..20488853a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3814,9 +3814,9 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -os-timesync@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/os-timesync/-/os-timesync-1.0.7.tgz#fc7ea7e6de1fc88742880cd08ff284327678e20d" +os-timesync@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/os-timesync/-/os-timesync-1.0.8.tgz#390ae8832e20183ea3fc1b97ea90bcbc97c0178f" os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: version "1.0.2" From 6a3c64315e3c5582567afe179c7988a82f88fbd0 Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Mon, 9 Oct 2017 10:47:35 -0300 Subject: [PATCH 07/10] Enables to skip tine syncing check --- main.js | 37 ++++++++++++++++++------------------- modules/settings.js | 13 ++++++++++++- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/main.js b/main.js index 095c952c0..9e57d70f2 100644 --- a/main.js +++ b/main.js @@ -270,26 +270,25 @@ onReady = () => { }); } - // check time sync - // var ntpClient = require('ntp-client'); - // ntpClient.getNetworkTime("pool.ntp.org", 123, function(err, date) { - timesync.checkEnabled((err, enabled) => { - if (err) { - log.error('Couldn\'t get time from NTP time sync server.', err); - return; - } - - if (!enabled) { - dialog.showMessageBox({ - type: 'warning', - buttons: ['OK'], - message: global.i18n.t('mist.errors.timeSync.title'), - detail: `${global.i18n.t('mist.errors.timeSync.description')}\n\n${global.i18n.t(`mist.errors.timeSync.${process.platform}`)}`, - }, () => { - }); - } - }); + // Checks time sync + if (!Settings.skiptimesynccheck) { + timesync.checkEnabled((err, enabled) => { + if (err) { + log.error('Couldn\'t infer if computer automatically syncs time.', err); + return; + } + if (!enabled) { + dialog.showMessageBox({ + type: 'warning', + buttons: ['OK'], + message: global.i18n.t('mist.errors.timeSync.title'), + detail: `${global.i18n.t('mist.errors.timeSync.description')}\n\n${global.i18n.t(`mist.errors.timeSync.${process.platform}`)}`, + }, () => { + }); + } + }); + } const kickStart = () => { // client binary stuff diff --git a/modules/settings.js b/modules/settings.js index b09f77afa..87beeae3c 100644 --- a/modules/settings.js +++ b/modules/settings.js @@ -132,6 +132,14 @@ const argv = require('yargs') group: 'Mist options:', type: 'boolean', }, + skiptimesynccheck: { + demand: false, + requiresArg: false, + nargs: 0, + describe: 'Disable checks for the presence of automatic time sync on your OS.', + group: 'Mist options:', + type: 'boolean', + }, '': { describe: 'To pass options to the underlying node (e.g. Geth) use the --node- prefix, e.g. --node-datadir', group: 'Node options:', @@ -141,7 +149,6 @@ const argv = require('yargs') .alias('h', 'help') .parse(process.argv.slice(1)); - argv.nodeOptions = []; for (const optIdx in argv) { @@ -304,6 +311,10 @@ class Settings { this.saveConfig('ui.i18n', langCode); } + get skiptimesynccheck() { + return argv.skiptimesynccheck; + } + initConfig() { global.config.insert({ ui: { From 65745c8b29ea11c4e727f069e6519ce87fcc41e1 Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Wed, 11 Oct 2017 09:06:57 -0300 Subject: [PATCH 08/10] Updates electron to 1.7.9 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 93406aa0c..9f2ac5438 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "co-mocha": "^1.2.0", "del": "^2.2.2", "ecstatic": "^2.1.0", - "electron": "1.7.8", + "electron": "1.7.9", "electron-builder": "^12.2.2", "eslint": "^3.14.1", "eslint-config-airbnb-base": "^11.0.1", diff --git a/yarn.lock b/yarn.lock index 8c49e7ce9..4cfd3287a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1474,9 +1474,9 @@ electron-window-state@^4.0.1: jsonfile "^2.2.3" mkdirp "^0.5.1" -electron@1.7.8: - version "1.7.8" - resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.8.tgz#27b791a6895171a7d52991b99442cdbd10a3539d" +electron@1.7.9: + version "1.7.9" + resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.9.tgz#add54e9f8f83ed02f6519ec10135f698b19336cf" dependencies: "@types/node" "^7.0.18" electron-download "^3.0.1" From dc1cdba8040788d5d00ca657010d33b6573d817b Mon Sep 17 00:00:00 2001 From: Ev Date: Wed, 11 Oct 2017 10:25:34 -0300 Subject: [PATCH 09/10] Bumping version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9f2ac5438..a5ece88a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Mist", - "version": "0.9.1", + "version": "0.9.2", "license": "GPL-3.0", "author": "Ethereum Mist Team ", "repository": { From 82858fd12544c0dc86aa7d33ec880e78dd3e2958 Mon Sep 17 00:00:00 2001 From: Ev Date: Wed, 11 Oct 2017 11:03:10 -0300 Subject: [PATCH 10/10] Electron 1.7.9 instructions in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9efcca18b..3cb69dca0 100644 --- a/README.md +++ b/README.md @@ -43,14 +43,14 @@ To run mist in development you need: - [Node.js](https://nodejs.org) `v7.x` (use the prefered installation method for your OS) - [Meteor](https://www.meteor.com/install) javascript app framework - [Yarn](https://yarnpkg.com/) package manager -- [Electron](http://electron.atom.io/) `v1.7.8` cross platform desktop app framework +- [Electron](http://electron.atom.io/) `v1.7.9` cross platform desktop app framework - [Gulp](http://gulpjs.com/) build and automation system Install the latter ones via: $ curl https://install.meteor.com/ | sh $ curl -o- -L https://yarnpkg.com/install.sh | bash - $ yarn global add electron@1.7.8 + $ yarn global add electron@1.7.9 $ yarn global add gulp ### Initialisation