Skip to content

Commit

Permalink
Bumping develop to alpha version (ethereum#3960)
Browse files Browse the repository at this point in the history
* Release candidate version

* fix json formatting

* Make tests readable again

* Using same node version as electron

* Update eslint

* Add eslint-plugin-import

* Add ecmaVersion and globals

* Add eslint-plugin-react

* Update prettier

* Set env es6

* Enable attaching geth with a private network (ethereum#3916)

* Better checking of blockNumber

* reject promise if unknown network

* Better setting of network in store

* Remove console.logs

* Removes stale test

* Disables other networks on private

* Fix showing clientUpdateAvailable popup

* update to geth 1.8.10 (ethereum#3925)

* Enabling linux .deb builds (ethereum#3914)

* Temporarily disabling tests, so we skip to the build process

* Enabling .deb builds

* Adding gulp verify-artifacts

* Add gulp task to pipeline

* Re-enabling tests on Travis

* unzip package naming

* Removing node-unzip-2 from package.json (already included in subdependency)

* Using ethereum-client-binaries from npm instead of github

* Introduces local debug server (ethereum#3922)

* Introduces local debug server

* Move `node-unzip-2` from devDependencies to dependencies

* Fresh install (ethereum#3941)

* Install wallet deps prior to building (ethereum#3940)

* When gas estimate fails, defaults to 1M gas but allow tx (ethereum#3946)

* When gas estimate fails, defaults to 1M gas but allow tx

* Allow eth_estimateGas to route to Infura

* Adds local wallet in asar file (ethereum#3951)

* load wallet from local asar package

* refactoring exec statement

* Minor refactor

* Cleaning yarn.lock conflicted strings; adding asar package

* Local wallet inside app.asar

* Update README.md

* layout changes for admin tab

* * Add gulp pack-wallet to postinstall script
* In pack-wallet: Remove ./meteor-dapp-wallet after generating ./wallet
* Add ./wallet to .gitignore

* change breadcrumb behavior

* Gracefully handle ws errors

* Disables wallet refreshing

* Add meteor-build-client to devDependencies so it does not need to be installed globally

* Updates test to reflect removed wallet url input

* Set wallet as first tab

* Change default browser url

* Update/improve sortable code

* Enabling partition mode for local wallet

* Dealing with local files url matching

* Updating test case
  • Loading branch information
evertonfraga authored Jun 13, 2018
1 parent a3e3be2 commit d2735b4
Show file tree
Hide file tree
Showing 24 changed files with 447 additions and 4,320 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ config.json
mist.log
npm-debug.log
yarn-debug.log
yarn-error.log
yarn-error.log
wallet
102 changes: 46 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,32 @@

The Mist browser is the tool of choice to browse and use Ðapps.

For the Mist API see the [MISTAPI.md](MISTAPI.md).
For the Mist API see [MISTAPI.md](MISTAPI.md).

Please note that this repository is the Electron host for the Meteor based wallet dapp whose repository is located here: https://github.com/ethereum/meteor-dapp-wallet.
This repository is the Electron host for the [Meteor-based wallet dapp](https://github.com/ethereum/meteor-dapp-wallet).

## Help and troubleshooting

In order to get help regarding Mist or Ethereum Wallet, please follow:
In order to get help regarding Mist or Ethereum Wallet:

1. Please check the [Mist troubleshooting guide](https://github.com/ethereum/mist/wiki).
1. Go to the [Gitter Channel](https://gitter.im/ethereum/mist) to connect with the community for instant help.
1. Go to our [Gitter channel](https://gitter.im/ethereum/mist) to connect with the community for instant help.
1. Search for [similar issues](https://github.com/ethereum/mist/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Canonical%22) and potential help.
1. Or create a [new issue](https://github.com/ethereum/mist/issues).
1. Or create a [new issue](https://github.com/ethereum/mist/issues) and provide as much information as you can to recreate your problem.

## How to contribute

Contributions via Pull Requests are welcome. You can see where to help looking for issues with the [Enhancement](https://github.com/ethereum/mist/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Enhancement%22) or [Bug](https://github.com/ethereum/mist/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Bug%22) labels. We can help guiding you towards the solution.
Contributions via Pull Requests are welcome. You can see where to help looking for issues with the [Enhancement](https://github.com/ethereum/mist/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Enhancement%22) or [Bug](https://github.com/ethereum/mist/issues?q=is%3Aopen+is%3Aissue+label%3A%22Type%3A+Bug%22) labels. We can help guide you towards the solution.

You can also help by [responding to issues](https://github.com/ethereum/mist/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Triage%22). Sign up on [CodeTriage](https://www.codetriage.com/ethereum/mist) and it'll send you gentle notifications with a configurable frequency. It is a nice way to help while learning.

## Installation

If you want to install the app from a pre-built version on the [release page](https://github.com/ethereum/mist/releases),
you can simply run the executeable after download.
If you want to install the app from a pre-built version on the [release page](https://github.com/ethereum/mist/releases), you can simply run the executable after download.

For updating simply download the new version and copy it over the old one (keep a backup of the old one if you want to be sure).
For updating, simply download the new version and copy it over the old one (keep a backup of the old one if you want to be sure).

### Linux .zip installs
#### Linux .zip installs

In order to install from .zip files, please install `libgconf2-4` first:

Expand All @@ -44,39 +43,36 @@ apt-get install libgconf2-4

### Config folder

The data folder for Mist is stored in other places:
The data folder for Mist depends on your operating system:

* Windows `%APPDATA%\Mist`
* macOS `~/Library/Application\ Support/Mist`
* Linux `~/.config/Mist`
- Windows `%APPDATA%\Mist`
- macOS `~/Library/Application\ Support/Mist`
- Linux `~/.config/Mist`

## Development

For development, a Meteor server will need to be started to assist with live reload and CSS injection.
For development, a Meteor server assists with live reload and CSS injection.

Once a Mist version is released the Meteor frontend part is bundled using the `meteor-build-client` npm package to create pure static files.

### Dependencies

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.11` cross platform desktop app framework
* [Gulp](http://gulpjs.com/) build and automation system
- [Node.js](https://nodejs.org) `v7.x` (use the preferred installation method for your OS)
- [Meteor](https://www.meteor.com/install) javascript app framework
- [Yarn](https://yarnpkg.com/) package manager

Install the latter ones via:

```bash
$ curl https://install.meteor.com/ | sh
$ curl -o- -L https://yarnpkg.com/install.sh | bash
$ yarn global add [email protected]
$ yarn global add gulp
```

### Initialisation
### Initialization

Now you're ready to initialise Mist for development:
Now you're ready to initialize Mist for development:

```bash
$ git clone https://github.com/ethereum/mist.git
Expand All @@ -94,7 +90,8 @@ $ yarn

### Run Mist

For development we start the interface with a Meteor server for autoreload etc.
For development we start the interface with a Meteor server for auto-reload etc.

_Start the interface in a separate terminal window:_

```bash
Expand All @@ -108,7 +105,7 @@ $ cd mist
$ yarn dev:electron
```

_NOTE: client-binaries (e.g. [geth](https://github.com/ethereum/go-ethereum)) specified in [clientBinaries.json](https://github.com/ethereum/mist/blob/master/clientBinaries.json) will be checked during every startup and downloaded if out-of-date, binaries are stored in the [config folder](#config-folder)_
_NOTE: Client binaries (e.g. [geth](https://github.com/ethereum/go-ethereum)) specified in [clientBinaries.json](https://github.com/ethereum/mist/blob/master/clientBinaries.json) will be checked during every startup and downloaded if out-of-date, binaries are stored in the [config folder](#config-folder)._

_NOTE: use `--help` to display available options, e.g. `--loglevel debug` (or `trace`) for verbose output_

Expand All @@ -133,13 +130,12 @@ $ cd mist
$ yarn dev:electron --mode wallet
```

### Connecting to node via HTTP instead of IPC
### Connect your own node

This is useful if you have a node running on another machine, though note that
it's less secure than using the default IPC method.
This is useful if you are already running your own node or would like to connect with a private or development network.

```bash
$ yarn dev:electron --rpc http://localhost:8545
$ yarn dev:electron --rpc path/to/geth.ipc
```

### Passing options to Geth
Expand All @@ -155,56 +151,50 @@ The `--rpc` Mist option is a special case. If you set this to an IPC socket file
path then the `--ipcpath` option automatically gets set, i.e.:

```bash
$ yarn dev:electron --rpc /my/geth.ipc
$ yarn dev:electron --rpc path/to/geth.ipc
```

...is the same as doing...

```bash
$ yarn dev:electron --rpc /my/geth.ipc --node-ipcpath /my/geth.ipc
$ yarn dev:electron --rpc /my/geth.ipc --node-ipcpath /path/to/geth.ipc
```

### Creating a local private net

See this guide to quickly set up a local private network on your computer:
https://gist.github.com/evertonfraga/9d65a9f3ea399ac138b3e40641accf23

### Using Mist with a privatenet

To run a private network you will need to set the IPC path, network id and data
folder:
If you would like to quickly set up a local private network on your computer, run:

```bash
$ yarn dev:electron --rpc ~/Library/Ethereum/geth.ipc --node-networkid 1234 --node-datadir ~/Library/Ethereum/privatenet
geth --dev
```

_NOTE: since `ipcpath` is also a Mist option you do not need to also include a
`--node-ipcpath` option._
Look for the IPC path in the resulting geth output, then start Mist with:

You can also launch `geth` separately with the same options prior starting
Mist.
```bash
$ yarn dev:electron --rpc path/to/geth.ipc
```

### Deployment

Our build system relies on [gulp](http://gulpjs.com/) and [electron-builder](https://github.com/electron-userland/electron-builder/).

#### Dependencies

[meteor-build-client](https://github.com/frozeman/meteor-build-client) bundles the [meteor](https://www.meteor.com/)-based interface. Install it via:
Cross-platform builds require additional [`electron-builder` dependencies](https://www.electron.build/multi-platform-build).

##### macOS

```bash
$ npm install -g meteor-build-client
$ brew install rpm
```

Furthermore cross-platform builds require additional [`electron-builder` dependencies](https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux). On macOS those are:

Windows deps:
##### Windows

```bash
$ brew install wine --without-x11 mono makensis
```

Linux deps:
##### Linux

```bash
$ brew install gnu-tar libicns graphicsmagick xz
Expand Down Expand Up @@ -242,13 +232,13 @@ $ gulp --win # windows

With the `walletSource` you can specify the Wallet branch to use, default is `master`:

$ gulp --wallet --walletSource develop
$ gulp --wallet --walletSource local

Options are:

* `master`
* `develop`
* `local` Will try to build the wallet from [mist/]../meteor-dapp-wallet/app
- `master`
- [any meteor-dapp-wallet branch](https://github.com/ethereum/meteor-dapp-wallet/branches)
- `local` Will try to build the wallet from [mist/]../meteor-dapp-wallet/app

_Note: applicable only when combined with `--wallet`_

Expand All @@ -262,7 +252,7 @@ $ gulp --mac --skipTasks=bundling-interface,release-dist

##### Checksums

Spits out the MD5 checksums of distributables.
Spits out the MD5 checksums of the distributables.

It expects installer/zip files to be in the generated folders e.g. `dist_mist/release`

Expand All @@ -288,7 +278,7 @@ $ gulp checksums [--wallet]

## Testing

Tests are ran using [Spectron](https://github.com/electron/spectron/), a webdriver.io runner built for Electron.
Tests run using [Spectron](https://github.com/electron/spectron/), a webdriver.io runner built for Electron.

First make sure to build Mist with:

Expand Down
44 changes: 33 additions & 11 deletions gulpTasks/building.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ gulp.task('copy-app-source-files', () => {
'./sounds/*',
'./errorPages/*',
'customProtocols.js',
'wallet/**/*',
'!node_modules/electron/',
'!node_modules/electron/**/*',
'!./tests/wallet/*',
Expand Down Expand Up @@ -73,17 +74,34 @@ gulp.task('switch-production', cb => {
);
});

gulp.task('pack-wallet', cb => {
if (options.type == 'mist') {
del(['./wallet', './meteor-dapp-wallet']).then(() => {
console.log('Building wallet...');
exec(
`git clone --depth 1 https://github.com/ethereum/meteor-dapp-wallet.git && \
cd meteor-dapp-wallet/app && \
npm install && \
../../node_modules/.bin/meteor-build-client ../../wallet -p ""`,
(err, stdout, stderr) => {
console.log(stdout, stderr);
del(['./meteor-dapp-wallet']);
cb(err);
}
);
});
} else {
cb();
}
});

gulp.task('bundling-interface', cb => {
const bundle = additionalCommands => {
const buildPath = path.join('..', `dist_${type}`, 'app', 'interface');

exec(
`cd interface \
&& meteor-build-client ${path.join(
'..',
`dist_${type}`,
'app',
'interface'
)} -p "" \
${additionalCommands}`,
`../node_modules/.bin/meteor-build-client ${buildPath} -p "" ${additionalCommands}`,
{ cwd: 'interface' },
(err, stdout) => {
console.log(stdout);
cb(err);
Expand All @@ -95,7 +113,8 @@ gulp.task('bundling-interface', cb => {
if (options.walletSource === 'local') {
console.log('Use local wallet at ../meteor-dapp-wallet/app');
bundle(`&& cd ../../meteor-dapp-wallet/app \
&& meteor-build-client ../../mist/dist_${type}/app/interface/wallet -p ""`);
&& npm install \
&& ../../../node_modules/.bin/meteor-build-client ../../mist/dist_${type}/app/interface/wallet -p ""`);
} else {
console.log(
`Pulling https://github.com/ethereum/meteor-dapp-wallet/tree/${
Expand All @@ -105,7 +124,8 @@ gulp.task('bundling-interface', cb => {
bundle(`&& cd ../dist_${type} \
&& git clone --depth 1 https://github.com/ethereum/meteor-dapp-wallet.git \
&& cd meteor-dapp-wallet/app \
&& meteor-build-client ../../app/interface/wallet -p "" \
&& npm install \
&& ../../../node_modules/.bin/meteor-build-client ../../app/interface/wallet -p "" \
&& cd ../../ \
&& rm -rf meteor-dapp-wallet`);
}
Expand Down Expand Up @@ -231,7 +251,9 @@ gulp.task('release-dist', done => {
};

_.each(options.activePlatforms, platform => {
switch (platform) { // eslint-disable-line default-case
switch (
platform // eslint-disable-line default-case
) {
case 'win':
cp(
`${applicationName}-${version}-ia32-win.zip`,
Expand Down
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ gulp.task('upload-queue', gulp.series('checksums', 'upload-binaries'));
const skipTasks = options.skipTasks.replace(/\s/g, '').split(',');
const tasks = [
'clean-dist',
'pack-wallet',
'copy-app-source-files',
'transpile-main',
'transpile-modules',
Expand Down
Loading

0 comments on commit d2735b4

Please sign in to comment.