Validator Keys

Validator Keys: Overview and Extraction Guide

Understanding and managing your Validator Key is critical for secure and efficient node operation on the OneFinity network.

The validatorKey.pem file is essential in the node setup process for OneFinity network participants, acting as a vault for the Validator Keys. This file is automatically generated and is located in the $HOME/onefinity-nodes/node-0 directory. For backup and restoration purposes, a zipped version of this file is also stored in the $HOME/VALIDATOR_KEYS directory.

What is a Validator Key?

A Validator Key is a private key vitally important for a node's operation in the network. It serves two crucial functions:

  • Signing Blocks: It allows the validator to sign blocks, affirming their participation and agreement with the blocks' content.

  • Consensus Messages: It is used to sign consensus messages that the validator sends to other validators, enabling secure and verified communication within the network.

Example:

-----BEGIN PRIVATE KEY for 45e7131ba37e05c5de3f8862b4d8294812f004a5b660abb793e89b65816dbff2b02f54c25f139359c9c98be0fa657d0bf1ae4115dcf6fdbf5f3a470f1d251f769610b48fe34eeab59e82ac1cc0336d1d9109a14b768b97ccb4db4c2431629688-----

YmRiNmViOGYzMmQ3OWY0YjE4ODJjMzE1ODA4YjQyZmZjODhiZDQxNzMwNmE5MTRiZjQ4OTAyNjM0MTcyNjMzMw==

-----END PRIVATE KEY for 45e7131ba37e05c5de3f8862b4d8294812f004a5b660abb793e89b65816dbff2b02f54c25f139359c9c98be0fa657d0bf1ae4115dcf6fdbf5f3a470f1d251f769610b48fe34eeab59e82ac1cc0336d1d9109a14b768b97ccb4db4c2431629688-----

In plain English:

-----The private key for this``*PUBLIC KEY*``starts below-----
**PRIVATE KEY**
-----The private key for this``*PUBLIC KEY*``was listed above-----

*PUBLIC KEY:* 45e7131ba37e05c5de3f8862b4d8294812f004a5b660abb793e89b65816dbff2b02f54c25f139359c9c98be0fa657d0bf1ae4115dcf6fdbf5f3a470f1d251f769610b48fe34eeab59e82ac1cc0336d1d9109a14b768b97ccb4db4c2431629688

**PRIVATE KEY:**YmRiNmViOGYzMmQ3OWY0YjE4ODJjMzE1ODA4YjQyZmZjODhiZDQxNzMwNmE5MTRiZjQ4OTAyNjM0MTcyNjMzMw==

Public keys are akin to your phone numberโ€”there's no harm in others knowing it. In fact, it's often necessary to share it, but you should do so judiciously, much like how you would with your phone number. Always safeguard your private keys; they embody the equivalent of your bank's username, password, and two-factor authentication all rolled into one.

How to generate a new keyโ€‹

To create a new validator key, utilize the keygenerator tool located near the node.

Links for tools will be provided when testnet phase starts

To generate a new validator key, if golang is already set on the host, run:

$ git clone https://github.com/onefinityRepository/of-chain-go.git
$ cd of-chain-go/cmd/keygenerator
$ go build
$ ./keygenerator --key-type validator

Alternatively, if you have already installed a node on the host, you can issue the following command:

$ cd ~/onefinity-utils/
$ ./keygenerator --key-type validator

Validator keys are highly sensitive.

  • If someone steals your keys and maliciously uses them on the OneFinity network, they can engage in harmful activities such as double-signing, producing incorrect blocks, injecting fake transactions, minting new coins, etc. All these actions are subject to penalties, meaning you can lose your ONE stakeโ€”all 3000!

  • If you lose access to your keys and your node crashes irreparably (e.g., you delete the virtual machine, or your VPS provider deletes/loses it), you won't be able to revive it and will consequently stop earning rewards with it.

Make multiple safe backups of the Validator private keys on:

  • paper

  • hardware

  • encrypted physical storage

  • distributed cloud storage, etc

Last updated