almindor / etherwall

Ethereum QT5 Wallet
GNU General Public License v3.0
142 stars 59 forks source link

Portable Mode? #151

Open AJolly opened 7 months ago

AJolly commented 7 months ago

Is it possible to force etherwall to store all info in the local directory?

almindor commented 7 months ago

You mean not use external blockchain data? If so then yes, you will need to run your own ethereum node however and point to it.

AJolly commented 7 months ago

I mean store all of the configuration and associated files in the local directory, and not elsewhere on the system (like users\appdata).

Imagine you have it stored on a flash drive, if you move from one computer to another will it still run perfectly?

Yes I'd expect it to still need to talk to a node

almindor commented 7 months ago

This is not supported atm. but can be done. I don't have the cycles to do it anytime soon but would happily review a PR. The steps would be roughly:

  1. Search for <binary file location>/portable.ini config file BEFORE loading from the standard config file locations
  2. If a config file is found there use that one
  3. Expand node command line options hanlding such that in "portable" mode, Etherwall would tell Geth to use a specific data location that's relative to it's binary file (e.g. ./data). NOTE: I'm not sure if geth itself accepts relative paths so an absolute path might need to be calculated before node start

It sounds like a lot but code-wise it shouldn't be too hard, the most tricky part is probably the node cmdline interaction.