harmony-one / harmony

The core protocol of harmony
https://harmony.one
GNU Lesser General Public License v3.0
1.47k stars 288 forks source link

[~2,000 USD] Alert mechanisms for validators and delegators #2717

Closed gizemcakil closed 4 years ago

gizemcakil commented 4 years ago

image

About The Bounty

Please carefully review the competition terms and submission process before starting. https://github.com/harmony-one/harmony-open/blob/master/README.md

Description

Set of tools that could help validators and delegators be informed about the changes that are important to them. Some examples:

There is already a good example of this on Telegram: https://t.me/HarmonyOne_ValidatorBot

Useful readings:

Prizes

There are two tiers of prizes for this bounty. The prize tier for each submission will be evaluated and decided by the Harmony engineering team. The judging criteria for the prizes are:

image

IMPORTANT NOTE: The prizes will be paid in native ONE tokens, the fiat value of prizes will change with token prices.

Explore All Bounties

https://gitcoin.co/profile/harmony-one

liszper commented 4 years ago

What would be the targeted platform(s)? Is the source of the bot available? Could you provide a required feature set we have to achieve? Will you pay maintenance fee after completion?

mindstyle85 commented 4 years ago

What would be the targeted platform(s)? Is the source of the bot available? Could you provide a required feature set we have to achieve? Will you pay maintenance fee after completion?

No targeted platforms, basically the easiest and most accessible solution for most validators, the Telegram notifications already seem good to me for example. The bot was made by a community member si i doubt the source is available. There can be many features though and most likely some that will get added with time:

The tool could probably run on Harmony servers too but i think the better solution would be so that everyone can run it on his own.

liszper commented 4 years ago

I think it would be great to combine this bounty with the auto-staking script and make a unified self-hosted dashboard for validators.

mindstyle85 commented 4 years ago

it can very well be combined for sure, though i believe some might want to manually adjust their stakes and bls keys, so makes sense to have them separate too

cc: @gizemcakil

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.001 ETH (0.17 USD @ $170.32/ETH) attached to it as part of the harmony-one fund.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 11 hours from now. Please review their action plans below:

1) staking4all has started work.

Linked bounty (please link the related bounty posting for your work)

https://gitcoin.co/issue/harmony-one/harmony/2717

Description of the product/tool

The product will be a telegram bot, it already exists as https://t.me/HarmonyOne_ValidatorBot , as version 0.1 it is a helpful product. We will extend the functionality of this bot to include bounty items and enhance existing features. The bot with all features will include ● Allow validators or delegate to register telegram account. This will be referred to as Telegram User ● Telegram user can select to use delegator monitoring or validator monitoring ● Delegator monitoring will focus on sending messages related to delegating, the aim is to keep the person who delegated up to date on validator performance and also rewards. This would include: ○ register delegation wallets being delegated with, purely monitoring. No private keys ○ alert when fee changes of validators being delegated to ○ alert when validator they delegated to performed poorly over last 4 epochs ○ provide info on validator performance which includes sign % ○ rewards earned per delegated account registered ● Validator monitoring will provide info on validator node status, aimed for validators to use. This includes: ○ Alert when validators missing blocks ○ Alert when validators recovered from missing blocks ○ Alert when validators not in committee anymore ○ Alert when validator returns to committee again ○ Alert for median stake changes more than X% ○ Alert for any whale votes on validator ○ Provide info on node status by interacting with the bot, will provide option to view all info including

  1. Details of the validators being watched
  2. Validators sign % for current epoch, also for lifetime
  3. By Validator the rewards they generated
  4. Number of delegators
  5. Median stake ● Ability to broadcast important messages to delegators or validators ● Validators can send message to it’s delegators that have notifications on ● For OpenStaking testnet will include a faucet. Will removed when in mainnet ○ Faucet can be required directly in validators information menu, or through main menu in case validator address is not registered ○ Faucet will have a rate limit per user request

Steps taken to build the product/tool

The current telegram bot will be extended, currently is ● Programa Language: GoLang ● Database: MongoDB ● API: RPC communication with node API ● KeyManager: Faucet key managed by HamonyONE GoSDK ● System: 2 docker containers wrap in a docker-compose, one for MongoDB and one for Bot, easily managed and upgradable. ● Machine: 1vCPU 256GB RAM

proof of use-case (e.g. screenshot, video, github code source)

https://t.co/ItHAdXBWmL?amp=1

Perceived impact to another user or the organization

This will assist in informing the community and validators on their Harmony one interest/investment. ● Delegators can monitor performance on their rewards and be notified if anything will impact their financial returns. ● validators can use this to monitor their nodes. Will assist with stability of the network and uptime of the validators.

List of URLs and affected parameters (if applicable)

Not applicable

Browser, OS and/or app version used during testing (if applicable)

https://t.me/HarmonyOne_ValidatorBot 2) dawidzioor has started work.

J44j4j4b4vhhcfovjhckn89vvb 2rhehrjrbrnr 3) ibrizai has started work.

Harmony Alert Bot

“Harmony Alert Bot” is a telegram chatbot where users will be notified regarding Fee changes, median stake changes, change in delegations, Rewards Distribution, Node Status, Whale Transactions and so on. Both delegators, as well as validators, can use this bot.

Estimated Time: 10 days

Functionalities and Features for both Validators and Delegators: Rewards Distributions Notifies the users’ when the rewards are distributed to the validator and delegator. Whale Transactions Notifies the users if a whale transaction occurs on the Harmony network. Harmony(One) Market Status Includes the current price, total supply, circulating supply. Epoch Change Notifies the user on changing every epoch also the remaining time for the next epoch. Alert for median stake changes more than X% Whenever the network median stake is changed, a notification will be passed about the change. Alert for slashing Delegator, as well as a validator, will be warned if their node is performing poorly for the epochs. Undelegate Alert Notifies the user if undelegate has been done from the wallet. Validator Status Delegator and Validator can get the status of the Validator which includes the uptime percentage, fees, stake rate, and so on. Faucet Users can directly use the website https://harmony-faucet.ibriz.ai from the bot to get the test ONE Tokens.

Delegators Features: Alert for fee change Whenever the validator changes its fees, the delegator will be notified.

Validators Features: Delegation Monitor Notification on the Change in delegation includes New delegator, changes in delegation amount and if anyone undelegate the validator. Node Status Notification of change of status of the node. Validator performance The validator will be notified of its node performance and will be alerted if it’s not eligible for the next epoch. Validator Status Monitor The validator will get a notification if elected in committee or is out of the committee While being elected on the committee, will be notified of missing the block signing and when it returns back to signing.

Platform: Telegram Messenger OS: As supported by Telegram Messenger Device: Supporting Telegram Messenger Programming: Python Database: MongoDB

For ICON Blockchain, we made a similar alert bot can check here: http://bit.ly/35axaTb 4) chainode has started work.

The submission will have two tools: Harmony Staking Manager -> this tool is Telegram based and is one tool to rule them all, for both stakers and validators. The tool will provide multiple validator and staker stats as well as notification alerts under certain circumstances. The feature package won't be released at this moment in order to prevent other candidates copying it. The concept is written and the bot is already under development with an expected release next week.

As noticed, it seems that many focus only on Telegram based tools, which is great but it could have certain limitations in terms of how many API calls can be submitted, especially if everyone will use it. This means delays of the alerts can happen. This is not desirable for validators, which have to react immediately. Therefore for validators we will create a more professional version, which is based on a script and sms alerts. While the telegram alerts can still work fine and use them, the script will assure that the accuracy is high and you don't have any delays in alerts.

Harmony Alerter -> this will be a script together with sms client and a tutorial how to setup it on your own validator. By using this you will have your own independent alert. The concept is ready and a version of the script was developed. Currently tests are being made and is expected to release it soon.

Learn more on the Gitcoin Issue Details page.

staking4all commented 4 years ago

The bounty is due in two days, but we finding several challenges

Thanks

sophoah commented 4 years ago

@staking4all for the second point how much do you need ? we can surely arrange to send you some but those should be excluded from any of the current on going event. @gupadhyaya any reason why the current-epoch performance were removed ?

sophoah commented 4 years ago

@gupadhyaya just a side node the current epoch is not removed but shown as null :

./hmy -n https://api.s0.os.hmny.io blockchain validator information one1u6c4wer2dkm767hmjeehnwu6tqqur62gx9vqsd
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "booted-status": "not booted",
    "current-epoch-performance": null,
    "currently-in-committee": true,
    "epos-status": "currently elected",
    "epos-winning-stake": null,
    "lifetime": {
      "apr": "0.000000000000000000",
      "blocks": {
        "signed": 76988,
        "to-sign": 76988
      },
      "reward-accumulated": 4.571909911703693e+22
    },
    "metrics": null,
    "total-delegation": 1.068028e+24,
    "validator": {
      "address": "one1u6c4wer2dkm767hmjeehnwu6tqqur62gx9vqsd",
gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 0.001 ETH (0.21 USD @ $212.09/ETH) has been submitted by:

  1. @staking4all
  2. @chainode
  3. @fragmnt

@gizemcakil please take a look at the submitted work:


staking4all commented 4 years ago

@staking4all for the second point how much do you need ? we can surely arrange to send you some but those should be excluded from any of the current on going event. @gupadhyaya any reason why the current-epoch performance were removed ?

thanks. looks like someone sent to me yesterday already :)

Thanks

staking4all commented 4 years ago

@gupadhyaya just a side node the current epoch is not removed but shown as null :

./hmy -n https://api.s0.os.hmny.io blockchain validator information one1u6c4wer2dkm767hmjeehnwu6tqqur62gx9vqsd
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "booted-status": "not booted",
    "current-epoch-performance": null,
    "currently-in-committee": true,
    "epos-status": "currently elected",
    "epos-winning-stake": null,
    "lifetime": {
      "apr": "0.000000000000000000",
      "blocks": {
        "signed": 76988,
        "to-sign": 76988
      },
      "reward-accumulated": 4.571909911703693e+22
    },
    "metrics": null,
    "total-delegation": 1.068028e+24,
    "validator": {
      "address": "one1u6c4wer2dkm767hmjeehnwu6tqqur62gx9vqsd",

Looks like the team fixed this now. Yes, was null all the time, even when elected. Now showing values ;)