Giter Site home page Giter Site logo

verus-staking-cli's Introduction

DEPRECATED

As of Verus version 0.7.0, shielding and unshielding of coinbase is no longer required.

After the hardfork on block 1053660, all coinbase rewards earned participate in the staking process after their minimum stake age is met.

This means you can comment out the core.php wallet shield cron entry, balance e-mails and wallet backups can still be used.

Introduction

These tools will help you stake on your permanently running machine using Verus CLI, instead of running the Agama GUI wallet.

Features

  • automatic shielding and unshielding of coinbase (staking, solo mining)
  • automatic tracking of total coins generated (also present in e-mail notifications)
  • optional e-mail notifications on newly generated coins
  • optional periodical wallet.dat backups, also as an encrypted ZIP archive
  • optional periodical wallet balance e-mail notifications

Initial Verus daemon configuration

Follow this guide to set-up your daemon for the first time. You will need a transparent address, a zs address and the daemon running with correct parameters (-mint -cheatcatcher=zs...).

Do not stake with the same wallet.dat on multiple nodes.

Installation

Prerequisites:

  1. install PHP 7.3+, use e.g apt-get install php7.3-cli php7.3-zip php7.3-bcmath as root

Perform the following steps as non-root user (the same user the verusd daemon runs as):

  1. cd; git clone https://github.com/kbs1/verus-staking-cli
  2. cd verus-staking-cli/engine
  3. cp config.php.EXAMPLE config.php, edit config.php. Read the comments to enable or disable features.
  4. install composer, run php composer.phar install
  5. configure the following CRON schedule (crontab -e). Substitute paths as appropriate. Don't enter entries you do not wish to perform. You can configure CRON timings arbitrarily, see the Usage section.
0 * * * * /usr/bin/php /home/verus/verus-staking-cli/engine/core.php wallet shield 2>&1 >> /home/verus/SHIELDING_LOG
45 3 * * * /usr/bin/php /home/verus/verus-staking-cli/engine/core.php wallet balanceEmail 2>&1 >> /home/verus/BALANCE_EMAILS_LOG
50 3 25 * * /usr/bin/php /home/verus/verus-staking-cli/engine/core.php wallet backupEmail 2>&1 >> /home/verus/BACKUP_EMAILS_LOG
*/5 * * * * /usr/bin/php /home/verus/verus-staking-cli/engine/core.php emails send 2>&1 >> /home/verus/QUEUED_EMAILS_LOG

Usage

You do not need to attend the machine. Each newly generated coinbase will be automatically shielded and unshielded. You will receive e-mail notifications whenever you generate a new block, if you configure them. You may also receive periodical wallet backups, and periodical balance reports.

When you upgrade Verus, you don't have to disable the CRON schedule temporarily. Just check with ps aux | grep php to see if the scripts aren't currently running. Otherwise you risk script failures with an inconsistent state as a result, should the verusd daemon become unexpectedly unavailable.

You may alter the crontab to run the scripts at any schedule. For example you can execute the shielding operation every minute if desired. Scripts contain protections that won't allow critical tasks (such as shielding and unshielding) to overlap, so no harm is caused if scripts are invoked by CRON arbitrarily fast.

To view operations log at any time, simply tail ..._LOG to view recent output of that command.

These scripts expect you have all your coins in transparent addresses only. For more advanced usage scenarios, update the source accordingly.

verus-staking-cli's People

Contributors

dependabot[bot] avatar kbs1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.