AlveyChain Documents
  • Alveychain Docs
  • Get-Started
    • Alveychain
    • Installation
    • Local Setup
    • Cloud Setup
    • Full Node
    • CLI Commands
    • JSON RPC Commands
    • Performance Reports
  • Configuration
    • Manage private keys
    • Set up Hashicorp Vault
    • Enable Prometheus metrics
  • Working-With-Node
    • Query JSON RPC endpoints
    • Query operator information
    • Backup/restore node instance
  • Consensus
    • Proof of Authority (PoA)
    • Proof of Stake
    • Set up and use Proof of Stake (PoS)
    • Migration from PoA to PoS
  • Additional Features
    • Alveycoin bridge
    • Network stress testing
    • Blockscout
  • Architecture
    • Architecture Overview
    • modules
      • Blockchain
      • Consensus
      • JSON RPC
      • Minimal
      • Networking
      • Other modules
      • Protocol
      • Sealer
      • State
      • Storage
      • TxPool
      • Types
  • Concepts
    • State in Ethereum
  • Community
    • Propose a new feature
    • Report an issue
  • Docs
    • Server Config File
    • how-tos
      • How to set up and use Proof of Stake (PoS)
Powered by GitBook
On this page
  • Overview
  • Key format
  • Consensus Private Key
  • Networking Private Key
  • Import / Export
  1. Configuration

Manage private keys

PreviousPerformance ReportsNextSet up Hashicorp Vault

Last updated 2 years ago

Overview

The alveychain has two types of private keys that it directly manages:

  • Private key used for the consensus mechanism

  • Private key used for networking by libp2p

Currently, the alveychain doesn't offer support for direct account management.

Based on the directory structure outlined in the , the alveychain stores these mentioned key files in two distinct directories - consensus and keystore.

Key format

The private keys are stored in simple Base64 format, so they can be human-readable and portable.

# Example private key
0802122068a1bdb1c8af5333e58fe586bc0e9fc7aff882da82affb678aef5d9a2b9100c0

:::info Key Type All private key files generated and used inside the alveychain are relying on ECDSA with the curve .

As the curve is non-standard, it cannot be encoded and stored in any standardized PEM format. Importing keys that don't conform to this key type is not supported. :::

Consensus Private Key

The private key file mentioned as the consensus private key is also referred to as the validator private key. This private key is used when the node is acting as a validator in the network and needs to sign new data.

The private key file is located in consensus/validator.key, and adheres to the mentioned.

Networking Private Key

The private key file mentioned for networking is used by libp2p to generate the corresponding PeerID, and allow the node to participate in the network.

Import / Export

As the key files are stored in simple Base64 on disk, they can be easily backed up or imported.

:::caution Changing the key files Any kind of change made to the key files on an already set up / running network can lead to serious network/consensus disruption, since the consensus and peer discovery mechanisms store the data derived from these keys in node-specific storage, and rely on this data to initiate connections and perform consensus logic :::

It is located in keystore/libp2p.key, and adheres to the mentioned.

Backup & Restore guide
secp256k1
key format
key format