Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Ethereum-wallet should default to light client mode #2372

Closed
jtoomim opened this issue May 29, 2017 · 23 comments
Closed

Ethereum-wallet should default to light client mode #2372

jtoomim opened this issue May 29, 2017 · 23 comments

Comments

@jtoomim
Copy link

jtoomim commented May 29, 2017

When launching ethereum-wallet, the default mode should be to run geth in light client mode. There are a few main reasons for this:

  1. Running a full node with a complete state trie is only useful to advanced users, and advanced users know how to change configuration options. Casual users need to have default options that address their needs with as little UX friction as possible.

  2. Applications should be configured to use the minimum amount of system resources possible by default until directed by the user that greater functionality is needed.

  3. Going from 100 MB of data to 10 GB of data means that a lot of people simply can't run ethereum-wallet with its default configuration as it would cause them to run out of disk space.

  4. There are no good easy-to-use light client options for ethereum wallets with decent encryption of wallet files and open source code. Ethereum-wallet is pretty close, but the need to run it with special command line options in order to not make it use a ton of memory means that I can't just tell my mom to download and run it.

@paddycy
Copy link

paddycy commented May 29, 2017

I agree with this guy. It is ridiculous to have a 10gb download for a wallet. I CANNOT sync the wallet for over a week now

@housemobile
Copy link

What flags can you input to sync EW or Mist in light mode?

@jtoomim
Copy link
Author

jtoomim commented May 30, 2017

Usually, with ./ethereum-wallet --node-light. However, light mode got borked in the most recent release of Ethereum-wallet due to some changes in the geth command line options in 1.6.0 (#2254). That should be fixed by the next mist/ethereum-wallet release, though.

@MaximRunev
Copy link

Full node (ethereum wallet) let normal sync only on SSD hard drive.

@User195
Copy link

User195 commented Jul 19, 2017

I also vote to set light mode as default

@jtoomim
Copy link
Author

jtoomim commented Jul 19, 2017

#1547

@pparent76
Copy link

pparent76 commented Jul 27, 2017

Unfortunately the light client mode don't seem to work better in 0.9 than it was working on 0.8.9:


Node type: geth
Network: main
Platform: linux (Architecure x64)

...Fatal: flags --fast, --light can't be used at the same time

[2017-07-27 11:28:04.557] [INFO] EthereumNode - Node type: geth
[2017-07-27 11:28:04.557] [INFO] EthereumNode - Network: main
[2017-07-27 11:28:04.557] [INFO] EthereumNode - Start node: geth main
[2017-07-27 11:28:04.558] [INFO] EthereumNode - Start node using /home/pparent/.config/Ethereum Wallet/binaries/Geth/unpacked/geth
[2017-07-27 11:28:07.596] [INFO] EthereumNode - 3000ms elapsed, assuming node started up successfully
[2017-07-27 11:28:07.597] [INFO] EthereumNode - Started node successfully: geth main
[2017-07-27 11:28:07.598] [INFO] Sockets/node-ipc - Connect to {"path":"/home/pparent/.ethereum/geth.ipc"}
[2017-07-27 11:28:07.599] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:08.600] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:09.601] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:10.602] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:11.604] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:12.605] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:13.607] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:14.608] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:15.610] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:16.611] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:17.613] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:18.614] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:19.616] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:20.617] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:21.619] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:22.629] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:23.631] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:24.633] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:25.634] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:26.636] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:27.638] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:28.639] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:29.640] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:30.642] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:31.643] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:32.645] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:33.647] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:34.649] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:35.650] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:36.652] [WARN] Sockets/node-ipc - Connection failed, retrying after 1000ms...
[2017-07-27 11:28:37.599] [ERROR] Sockets/node-ipc - Connection failed (30000ms elapsed)
[2017-07-27 11:28:37.600] [ERROR] EthereumNode - Failed to connect to node Error: Unable to connect to socket: timeout
    at Timeout.setTimeout (/opt/Ethereum Wallet/resources/app.asar/modules/sockets/base.js:97:43)
    at tryOnTimeout (timers.js:232:11)
    at Timer.listOnTimeout (timers.js:202:5)
[2017-07-27 11:28:37.620] [ERROR] EthereumNode - Failed to start node Error: Unable to connect to socket: timeout
    at Timeout.setTimeout (/opt/Ethereum Wallet/resources/app.asar/modules/sockets/base.js:97:43)
    at tryOnTimeout (timers.js:232:11)
    at Timer.listOnTimeout (timers.js:202:5)
[2017-07-27 11:28:37.621] [ERROR] main - Error starting up node and/or syncing Error: Unable to connect to socket: timeout
    at Timeout.setTimeout (/opt/Ethereum Wallet/resources/app.asar/modules/sockets/base.js:97:43)
    at tryOnTimeout (timers.js:232:11)
    at Timer.listOnTimeout (timers.js:202:5)

@muten85
Copy link

muten85 commented Jul 27, 2017

Same issue here. Not working on MIST 0.9

@pparent76
Copy link

I had it working with this staring script:

#!/bin/bash

ps -ae | grep geth
if [ "$?" -ne "0" ]; then
	geth  --syncmode "light"  &
	sleep 10;
fi
ethereumwallet --light-node

@evertonfraga
Copy link
Member

Light client still has some way to go in regards to logs (events). We're closely following this subject.

@forest-hermit
Copy link

I hope so, my wallet uses 118 GB right now, this is unsustainable for most of users.

@rodgermoore
Copy link

Thanks @pparent76 ! This works for Mist

I had it working with this staring script:

#!/bin/bash

ps -ae | grep geth
if [ "$?" -ne "0" ]; then
	geth  --syncmode "light"  &
	sleep 10;
fi
mist --light-node

@alex-miller-0
Copy link

I got around this by running geth at the command line:

geth --light

And then opening the Ethereum wallet. It should automatically find your geth client by RPC.

But I very much agree with this issue. Ethereum Wallet should be doing light syncing by default.

@HaleTom
Copy link

HaleTom commented Sep 24, 2017

As a work-around for linux users, based on @pparent76's script, I came up with:

#!/bin/bash
# Work around for issues:
# https://github.com/ethereum/mist/issues/2254
# https://github.com/ethereum/mist/issues/2372
# https://github.com/ethereum/mist/issues/2999
set -eu # For script robustness
geth=$(which geth)
mist=$(which mist) # Change to explicit path if you call this script "mist"

# Use pidof as procps' pgrep is broken:
# sleep 1& pgrep -ax '^sleep$' should return null
if ! geth_pid=$(pidof geth); then
  echo "Starting $geth."
  "$geth" --syncmode light &
else
  echo "Geth is already running with PID(s): $geth_pid"
fi

if ! mist_pid=$(pidof mist); then
  echo "Starting $mist."
  "$mist" --light-node
else
  echo "Mist is already running with PID(s): $mist_pid"
fi

Call the script "emist" so it doesn't recursively call itself :)

@evertonfraga
Copy link
Member

From Mist 0.9.1 on, there's a light client option under Develop menu.

Please note there are still some bugs on the wallet when using Light Client. It will be reassessed when fixed.

@jacktang
Copy link

jacktang commented Oct 24, 2017

I have download 110G+ data, and I switch to light client mode, How to deal with the data under full node mode? Can I delete the data? or any script the remove the data?

@alex-miller-0
Copy link

@jacktang The light client will create a different directory for the new data. Find the location of your Ethereum directory (see here) and navigate to /yourpath/Ethereum/geth. You will see two directories: chaindata and lightchaindata. If you only plan on using the light client from now on, you can remove chaindata and that should free up your 110GB 👍

@mahmoudilyan
Copy link

Does light client gets updated with the network?and can I do all the basic stuff inside it?

@solderzzc
Copy link

The chaindata is 167GB for now, it was taking 30+ days for me for the sync, if the procedure done faster, I would end up to sell them at $300...

@mrspiderbrain
Copy link

This would really help, the default install process looks all pretty but will fail on many people's hardware, or appear to fail due to the massive time required to sync.

@cloudzhong
Copy link

totally agree, meaningless for a wallet to sync so big data, it is not an node.

@evertonfraga
Copy link
Member

The Light Client's discovery protocol is defective at this very moment, making it almost unusable. It is treated as "highly experimental" by its own developers.

Here in Mist we're coming up with some solutions, that include a remote node integration (like INFURA), which you can follow on this branch: https://github.com/ethereum/mist/tree/layered-nodes

We'll keep you all posted about this progress.

@danielocdh
Copy link

@evertonfraga where are you keeping us posted? thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests