HYCHAIN / guardian-node-software

The command line interface for windows, mac and linux to run HYCHAIN's guardian node software. Guardian node keys can be purchased at https://node.hychain.com - Learn more about Guardian Nodes here: https://docs.hychain.com/docs/how-do-i-operate-a-node
https://hychain.com
10 stars 0 forks source link

HYCHAIN Guardian Node Software

This repository contains the compiled command line interface binaries for running a guardian node on Windows, Mac and Linux operating systems.

Use this repository if you intend to run your guardian node on your own device. Alternatively, if you'd prefer to use a hosted service to quickly get a node up and running, you can use our node hosting partners NodeOps, here.

By operating the HYCHAIN Guardian Node Software, you agree to our terms of service.

Quickstart

A guardian submit assertions for node keys that they either own or have been approved to submit assertions for.

Command to run guardian software. This will validate and submit assertions for all node keys that are approved for, or owned by the address.

./guardian-cli-{your-os} guardian run <guardian-private-key> --loop-interval-ms 3600000

​ Command to run to claim rewards for a list of node keys. Signer private key can be for any wallet with sufficient native token (TOPIA) to pay for gas required to claim rewards.

./guardian-cli-{your-os} guardian claim-multiple-rewards <node-key-ids> <signer-private-key>

Please note, the address associated with the must maintain a $TOPIA balance on HYCHAIN in order to properly submit assertions or claims.

Wallet Delegation (Delegate.xyz)

If you do not want to use the private key of your wallet that owns your node keys, you can delegate to a burner/hot wallet to handle the operation of your node. HYCHAIN Guardian Node operation fully supports delegate.xyz. Please use this link to delegate to the hot wallet you intend to use: https://delegate.xyz/?r&chainId=2911&contract=0xE1060b30D9fF01Eef71248906Ce802801a670A48

Challenge Architecture / Flow Overview

  1. A challenge is produced every time a batch from the Rollup is submitted to Ethereum. This is done by a challenger service hosted by Caldera
  2. Each Node Key will submit assertions to a subset of challenges with an average of 1 assertion per day per node key. Whether a node key is eligible to submit an assertion to a challenge is determined on chain.
  3. Each challenge will have an expiry period of 1 day. This means a guardian will need to run the guardian software successfully at least once a day, or keep the guardian node running constantly with --loop-interval-ms
  4. Once a challenge expires, the challenger service will verify all assertions made and revoke any node keys who submitted invalid assertions. So please be certain to run your node with the --loop-interval-ms flag, or have a scheduled submission of your one-shot assertions.

Expanded Usage Details

For the main workflow of submitting assertions for user node keys:

IMPORTANT: Make sure to execute the binary from the directory it is contained in.

./guardian-cli-{your-os} guardian run <guardian-private-key>

This will start the guardian and submit assertions for all node keys owned / approved for the private key address for currently open challenges. It will then end and exit the program. Additionally the --node-key-allowlist can be used to only submit assertions for a list of keys and --loop-interval-ms can be used to keep the guardian running forever (with a time delay between checking). If this option is used, we reccomend an interval of an hour since new challenges are made on average once an hour.

To claim rewards:

./guardian-cli-{your-os} guardian claim-rewards --owned-keys --approved-keys

For other usage, refer to the cli help manual

$ ./guardian-cli-{your-os} help guardian

Usage: guardian-cli guardian [options] [command]

Guardian Node related commands

Options:
  -h, --help                                          display help for command

Commands:
  run [options] <guardian-private-key>                Run the Guardian service
  reward-to-claim <node-key-ids>                      Get rewards to claim for multiple Node Keys
  node-keys-approved-for-guardian <guardian-address>  Get node keys that a guardian is approved for via delegate.xyz
  claim-rewards [options] <signer-private-key>        Claim rewards for a list of Node Keys
  total-claimed-rewards-for-node-keys <node-key-ids>  Get total claimed rewards for a list of Node Keys
  owned-node-keys <address>                           Get node keys that a public address owns
  help [command]                                      display help for command

Can run help for more details on each command. Example:

$ ./guardian-cli-linux guardian help reward-to-claim

Usage: guardian-cli guardian reward-to-claim [options] <node-key-ids>

Get rewards to claim for multiple Node Keys

Arguments:
  node-key-ids  The IDs of the Node Keys

Options:
  -h, --help    display help for command