Gridcoin-tasks icon indicating copy to clipboard operation
Gridcoin-tasks copied to clipboard

default option: start client at boot

Open Erkan-Yilmaz opened this issue 8 years ago • 12 comments

reason:

  • participation in staking

problems when making this as default:

  • the wallet should be unlocked automatically, or it fails our intended purpose here
  • Gridcoin's startup may slow down the startup, user gets annoyed, kills it, and then the blockchain or config file gets corrupted. And user can't start Gridcoin anymore

todo:

  • I've no Windows, so I'm asking around so people can check if autostart actually works right now
    • ideally on a fresh system, as a newbie would be

mentioned in hangout 2: 27:40

Erkan-Yilmaz avatar Jan 21 '17 15:01 Erkan-Yilmaz

I believe that https://github.com/Scalextrix has been working on auto-startup scripts/methods on raspberry pi's.

grctest avatar Jan 21 '17 20:01 grctest

Yes I have created the gridcoinresearchd as a service on a raspberry pi, this should work on any Linux distro that uses systemd. I will post some instructions tomorrow

Scalextrix avatar Jan 21 '17 22:01 Scalextrix

I run Win 7 x64 Pro and even though the check-box in Settings is marked, I still have to start the Wallet manually. This is not an issue for me since I prefer having some measure of control over what executes at Start-up ... particularly when I am performing maintenance or trouble-shooting. I would recommend against Auto-Start as being the default for such reasons. A desktop icon with the appropriate properties should be good enough ... not that hard to remember to double-click an icon in Windows ;-)

TG13088 avatar Jan 22 '17 02:01 TG13088

The following will work on Linux that has systemd: ~ $ gridcoinresearchd stop

~ $ cd /etc/systemd/system

~ $ sudo nano gridcoinresearchd.service

Enter the following

[Unit] Description=Gridcoin daemon services After=tlp-init.service

[Service] Type=simple RemainAfterExit=yes ExecStart=/usr/bin/gridcoinresearchd
Restart=always RestartSec=60 User=pi

[Install] WantedBy=multi-user.target

CTRL+X, Y and Enter

~ $ sudo systemctl enable gridcoinresearchd.service

~ $ sudo systemctl start gridcoinresearchd.service

~ $ systemctl status gridcoinresearchd.service

Should output something like:

? gridcoinresearchd.service - Gridcoin daemon services Loaded: loaded (/lib/systemd/system/gridcoinresearchd.service; enabled) Active: active (exited) since Sat 2016-12-10 16:22:58 GMT; 20h ago Process: 409 ExecStart=/usr/bin/gridcoinresearchd (code=exited, status=0/SUCCESS) Main PID: 409 (code=exited, status=0/SUCCESS) CGroup: /system.slice/gridcoinresearchd.service +-613 /usr/bin/gridcoinresearchd

In top you should see gridcoinresearchd running with the process id in the last line (mine is 613)

Scalextrix avatar Jan 23 '17 16:01 Scalextrix

The startup tick works fine with my linux system (opensuse 42.1)

TheCharlatan avatar Mar 17 '17 20:03 TheCharlatan

Here are my 2 cents :

  • The wallet should autostart at boot (with delay ?) if not encrypted or auto-unlock is setup
  • It should be possible to setup auto-unlock through the wallet, and at the end of the wizard autostart should be proposed as an option. Thought ?

pwnorbitals avatar Aug 28 '17 09:08 pwnorbitals

I guess auto unlock for staking could really be a checkbox, it's only generating a hash and auto adding it to gridcoinresearch.conf, someone smart can do that in the core wallet Im sure.

I added a delayed start for the Qt wallet in Windows Task Scheduler, again someone with enough smarts could probably automate that.

Scalextrix avatar Aug 28 '17 15:08 Scalextrix

What is the point of encrypting your wallet if it unlocks automatically?

tomasbrod avatar Aug 28 '17 17:08 tomasbrod

It only unlocks for staking, so you still have to fully unlock it to make any other transactions

Scalextrix avatar Aug 28 '17 17:08 Scalextrix

Don't be fool. The "for staking only" is just a flag, that prevents signing non-PoS transactions. The wallet is basically unlocked.

tomasbrod avatar Aug 28 '17 17:08 tomasbrod

This has nothing to do with autostart, this is a general security problem the users should be made aware of... but doesn't change the autostart thing. If the user accepts auto-unlock (with its problems) and autostart, then I don't see a problem as long as everything is made clear

pwnorbitals avatar Aug 28 '17 18:08 pwnorbitals

Are we saying unlocking the wallet for staking is insecure?

Scalextrix avatar Aug 28 '17 21:08 Scalextrix