How do I prevent
mist from ever downloading the blockchain?
I have a small HDD and can't afford the disk space.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
You can have
geth's IPC (ie, pretend to be
geth), by running:
parity --light --geth
If you want to be lazy, you can add to your configuration file:
[parity] light = true geth = true
Then start mist as:
mist --syncmode light
If you get a blank screen when
mist loads, see here.
geth --light will not download the blockchain, but instead query other nodes for any information contained in the blockchain.
It took me quite a bit of investigation to work out how to use
geth --light, but the answer is to first start
Then start mist, telling it to use the node in light mode:
mist --syncmode light
You should be able to just run
mist --node-light, but this issue is currently preventing it.
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 :)
Bonus safety seatbelt:
Since geth doesn't support a startup file, you may want to ensure that geth will not start without using
Ensure geth cannot create a lock file on the blockchain database:
rm -rf ~/.ethereum/geth/chaindata/ && mkdir -m 000 ~/.ethereum/geth/chaindata/
This will remove any already downloaded blockchain data, and recreate the directory without write permissions.
In Windows, you can remove the write permissions for the current user by right-clicking on the chaindata directory, selecting "Properties" then "Permissions" and unticking "write" permissions for the current user.
If I then try to run
--light, I get:
Fatal: Error starting protocol stack: open /home/ravi/.ethereum/geth/chaindata/LOCK: permission denied
This is desirable because it: