NEM-tools: Automated restart of delegated harvesting

in #nem7 years ago (edited)

Introduction

If you are currently not familiar with harvesting, delegated harvesting or the NEM-blockchain in general I suggest you to read these articles first:

The “problem” with delegated harvesting

Everybody who makes use of delegated harvesting on the NEM-blockchain is facing the same headaches:

  • delegated harvesting stops when the node you are harvesting on is getting rebooted for some reason
  • you need to manually search for a node with free slots (can be frustrating using NanoWallet)
  • maybe you are on vacation and you cannot afford to restart harvesting
    • you miss the chance to harvest new blocks

Solution

NEM-tools.com provides a service that performs this task for you automatically. When you register for automated restart of delegated harvesting the service will check every 5 minutes whether delegated harvesting for your account is still active or not.

If the node your remote account used to harvest was rebootet or harvesting stopped for some other reason the service will detect this and automatically search for a new node with free slots. If delegated harvesting was successfully restarted you will receive an e-mail with respective information.

Note

The service needs the private key of your delegated account in order to be able to automatically restart delegated harvesting.

  • your delegated private key will be stored encrypted in a database (and can only be decrypted with a secret-key that is stored as environment-variable)
  • in theory it isn’t problematic to publish the private key of your delegated account since your delegated account doesn’t store any value in form of mosaics (XEM or others)

Cautions

Well you noticed that it shouldn’t be a problem to give out the private key of your delegated account, right? So why should there be cautions to use the service?

NEM is rewarding people by calculating their PoI (read more) and the higher someones importance score is, the higher is his/her chance to harvest new blocks.

You have to be aware of that the more people use this service, the higher will be the attraction for hackers trying to collect and decrypt these encrypted private keys of the delegated accounts stored in the database. Although I tried my best to ensure that this service cannot be compromised by hackers, I cannot guarantee that someone is able to reveal the private keys.

What could happen if a hacker is able to reveal all private keys stored in the database?

  • the hacker would be able to stop harvesting for all accounts and so increase his own “real” PoI because all of the people using this service would not be able to harvest new blocks if he/she stops delegated harvesting for all of you
  • he/she could NOT access the funds (mosaics) that are stored on your main-account
  • worst case scenario would be that everyone who used this service would have to create a new account/wallet, transfer his/her funds to a new account and activate delegated harvesting again
    • correct me if I am wrong with this assumption (!)
    • I am open for any discussion about this topic :-)
    • for sure they would have to wait again that they have a minimum of 10.000 XEM vested (calculate vested XEM)

Ok I have read enough, now tell me what I have to do!

You need to go click here: http://nem-tools.com/#/harvesting

You have to fill in 3 entries in the given formular:

  1. your e-mail address
    • needed to confirm (or delete) your subscription
  2. the public key of your delegated account
    • open NanoWallet
    • click on “Services”
    • click on “Manage delegated account”
    • click on “show delegated account keys”
  3. the private key of your delegated account
    -> enter the password of your wallet below the delegated public key and click on the “plus”-sign (afterwards the private key of your delegated account which is needed to restart harvesting is shown)

Further steps

  1. You will receive an e-mail and need to confirm your request
  2. You will receive an e-mail every time the service of nem-tools restarts delegated harvesting for you
    or
    if there occured an error while restarting delegated harvesting for some reason

Note

  • in order to be able to see in NanoWallet whether harvesting is really active you need to manually set the IP/hostname you received via mail as custom node to check against
    • many people get confused by this
    • this is necessary because the NanoWallet doesn't know on which node the service of nem-tools started harvesting on
    • if you do not change this manually in NanoWallet delegated harvesting may seem to be inactive although it is active
  • If you want to unsubscribe from this service you can click on the link provided in the e-mail you receive
    • at this moment all of your provided data will be deleted immediately from the database!

Questions, doubts, suggestions?

Feel free to comment this entry or participate in the thread of the official NEM-forum:

You like this service?

Do not forget to upvote and feel free to send me some XEM or other mosaics ;-)

  • NBEZ5S43KR7KXPPLW26TK4JPKC6U2GFM6AI6XF6U
    qr_donation.png
Sort:  

Hi Marco, the tool asks only "email" and "the private key of your delegated account". Where is the field that asks for the public key of your delegated account. I want to make sure I am on the right xem-tools before providing the private key info. If no public key is required, would your tool know which account to restart?

Forget about the question... I just went on to your blog (https://forum.nem.io/t/nem-tools-com-automated-delegated-harvesting-export-of-transactions-and-more/5648) and read that you were updating the interface of xem-tools.

BTW, I just voted your post. Thank you!

yes I recently updated the interface. it is possible to get the public key and address with the private key so there is no longer a need to enter the public key for the delegated address.

you're welcome! :-)

other features of nem-tools will also be back soon. currently I am too busy :-/

That is an awesome and informative post sir. I will definitely resteeming this one. upvoted with 100% of my voting power.

wow, thanks! :-)

Keep being awesome :)

one of the most useful applications to help nem users :-)

thx aleix, really appreciate your comment! :-)

Hi. I am @greetbot - a bot that uses AI to look for newbies who write good content!
Your post was approved by me. As reward it will be resteemed by a resteeming service.
greetbot's stamp of approval

@greetbot evaluated your post's quality score as [41.09] points!
Good Job!

Resteemed by @resteembot! Good Luck!
The resteem was paid by @greetbot
Curious?
The @resteembot's introduction post
Get more from @resteembot with the #resteembotsentme initiative
Check out the great posts I already resteemed.

Great tool! Unfortunately, I put the wrong email address (typo) and can't register the same key for the correct email address. Any solution? Tnx!

it seems like there are all subscriptions confirmed. so the owner of the e-mail address you provided confirmed your request. this confuses me a bit :D ... I would have expected that your subscription could never have been confirmed if you put in the wrong e-mail address

can you give me your delegated public key or delegated address? then I can manually delete your subscription

Strange! I subscribed by ...@gmai.com. So far I haven't received any confirmation email.
Public Key: 28ef041e4a723de74b82d892b7e9c581e3604c61eb6f910a4e83e78b3428ff4f
Thanks!

well it seems like there is no record in the database for this address. can you try to register again and tell me whether it worked?

using the delegated public key you stated above should work

It's working now! I already got a notification that harvesting was restarted. However, there might be a problem with the confirmation email:

https://nem-services.herokuapp.com/
Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sun Jan 07 22:04:48 UTC 2018
There was an unexpected error (type=Internal Server Error, status=500).
No message available

well I see some error messages in the logs. did you click multiple times on the link to confirm the subscription?

the 2nd time you click on the confirmation-link there will be an error because the token isn't valid any longer.

yes there is no error mapping implemented as I didn't expect it to be necessary.

I will think about giving the user a better feedback if he/she has already confirmed the mail address

I think that I have the last question :). So when I open the web wallet I see status INACTIVE. I know that there is a warning that this status might not represent the actual​ status, so the question is how to check the reality? I use HW wallet to log-in, if that depends. I found out that if I log-out and then log-in right after the status​ already change to INACTIVE.

it seems like there is some small bug in the nanowallet regarding this topic:

https://github.com/NemProject/NanoWallet/issues/395

but you should also make sure, that you put in the node which you received via mail for checking about your status ;-)

Tool site is unsecured. Adding secured certificate would go a long way

site runs with https now

Site is not sending me the email after i have provided my delegate private key and email address. Can you confirm?

Hi.
This service has been terminated as the website has changed hands. I received the following email:

"Hello Nembers,
the domain nem-tools.com will change ownership and the service to automatically restart delegated harvesting will be discontinued!

From now on you won’t receive any mails from this address anymore and you need to take care on restarting delegated harvesting by yourself.

You don’t need to unsubscribe from the service. All data will be deleted!"

Which sucks.

Does anyone have any alternatives for auto-restarting harvesting?

Coin Marketplace

STEEM 0.22
TRX 0.26
JST 0.039
BTC 99024.83
ETH 3475.09
USDT 1.00
SBD 3.20