Parallel Universe
  • Learn
    • Introduction to PUT
    • Getting started with PUT
  • Architecture
    • What is a PUT Cluster?
    • Clusters
      • PUT Clusters
      • RPC Endpoints
      • Benchmark a Cluster
      • Performance Metrics
    • Consensus
      • Synchronization
      • Leader Rotation
      • Fork Generation
      • Managing Forks
      • Turbine Block Propagation
      • Commitment Status
      • Secure Vote Signing
      • Stake Delegation and Rewards
    • Validators
      • Overview
      • TPU
      • TVU
      • Blockstore
      • Gossip Service
      • The Runtime
  • CLI
    • Command-line Guide
    • Install the PUT Tool Suite
    • Command-line Wallets
      • Command Line Wallets
      • Paper Wallet
      • File System Wallet
      • Support / Troubleshooting
    • Using PUT CLI
    • Connecting to a Cluster
    • Send and Receive Tokens
    • Staking
    • Deploy a Program
    • Offline Transaction Signing
    • Durable Transaction Nonces
    • CLI Usage Reference
  • Developers
    • Get Started
      • Hello World
      • Local development
      • Rust program
    • Core Concepts
      • Accounts
      • Transactions
        • Overview
        • Versioned Transactions
        • Address Lookup Tables
      • Programs
      • Rent
      • Calling between programs
      • Runtime
    • Clients
      • JSON RPC API -1
      • JSON RPC API -2
      • JSON RPC API -3
      • Web3 JavaScript API
      • Web3 API Reference
      • Rust API
    • Writing Programs
      • Overview
      • Developing with Rust
      • Deploying
      • Debugging
      • Program Examples
      • FAQ
    • Native Programs
      • Overview
      • Sysvar Cluster Data
    • Local Development
      • PUT Test Validator
    • Backward Compatibility Policy
  • Validators
    • Running a Validator
    • Getting Started
      • Validator Requirements
    • Voting Setup
      • Starting a Validator
      • Vote Account Management
      • Staking
      • Monitoring a Validator
      • Publishing Validator Info
      • Failover Setup
      • Troubleshooting
    • Geyser
      • Geyser Plugins
  • Staking
    • Staking on PUT
    • Stake Account Structure
  • Integrations
    • Add PUT to Your Exchange
    • Retrying Transactions
  • Library
    • Introduction
    • Token Program
    • Associated Token Account Program
    • Memo Program
    • Name Service
    • Feature Proposal Program
    • NFT Program
      • Overview
      • Interface
      • Usage Guidelines
        • Create a new NFT-Mint
        • Cast NFT
        • Transfer an NFT
        • Change account status
        • Permission settings
        • Query Interface
        • Continuous casting
        • Change the Mint attribute
      • Operation Overview
        • Create a new NFT-Mint
        • Transfer NFT
        • Destroy
        • Freeze NFT accounts
        • Update
    • PUT multi-sign program
      • Overview
      • Interface
      • Usage Guidelines
        • Create a multi-signature account
        • Create a proposal account
        • Vote proposal
        • Verify Proposal
        • Add-singer
        • Remove-signer
      • Operation Overview
        • Create a multi-signature account
        • Create a proposal account
        • Vote
        • Verify
        • Add-singer
        • Remove-signer
  • PUT Privacy Policy
Powered by GitBook
On this page
  • Monitoring Catch Up
  • Create Stake Keypair
  • Delegate Stake
  • Validator Stake Warm-up
  • Monitor Your Staked Validator
  • Deactivating Stake
  1. Validators
  2. Voting Setup

Staking

By default your validator will have no stake.

This means it will be ineligible to become leader.

Monitoring Catch Up

To delegate stake, first make sure your validator is running and has caught up to the cluster. It may take some time to catch up after your validator boots.

Use the catchup command to monitor your validator through this process: put catchup ~/validator-keypair.json

Until your validator has caught up, it will not be able to vote successfully and stake cannot be delegated to it.

Also if you find the cluster's slot advancing faster than yours, you will likely never catch up.

This typically implies some kind of networking issue between your validator and the rest of the cluster.

Create Stake Keypair

If you haven’t already done so, create a staking keypair.

If you have completed this step, you should see the “validator-stake-keypair.json” in your Solana runtime directory.

put-keygen new -o ~/validator-stake-keypair.json

Delegate Stake

Now delegate 1 PUT to your validator by first creating your stake account:

put create-stake-account ~/validator-stake-keypair.json 1

and then delegating that stake to your validator:

put delegate-stake ~/validator-stake-keypair.json ~/vote-account-keypair.json

Don’t delegate your remaining PUT, as your validator will use those tokens to vote.

Stakes can be re-delegated to another node at any time with the same command, but only one re-delegation is permitted per epoch:

put delegate-stake ~/validator-stake-keypair.json ~/some-other-vote-account-keypair.json

Assuming the node is voting, now you're up and running and generating validator rewards. Rewards are paid automatically on epoch boundaries.

The rewards lamports earned are split between your stake account and the vote account according to the commission rate set in the vote account.

Rewards can only be earned while the validator is up and running. Further, once staked, the validator becomes an important part of the network.

In order to safely remove a validator from the network, first deactivate its stake.

At the end of each slot, a validator is expected to send a vote transaction.

These vote transactions are paid for by lamports from a validator's identity account.

This is a normal transaction so the standard transaction fee will apply. The transaction fee range is defined by the genesis block.

The actual fee will fluctuate based on transaction load.

You can determine the current fee via the RPC API “getRecentBlockhash” before submitting a transaction.

Learn more about transaction fees here.

Validator Stake Warm-up

To combat various attacks on consensus, new stake delegations are subject to a warm-up period.

Monitor a validator's stake during warmup by:

  • View your vote account:put vote-account ~/vote-account-keypair.json This displays the current state of all the votes the validator has submitted to the network.

  • View your stake account, the delegation preference and details of your stake:put stake-account ~/validator-stake-keypair.json

  • put validators displays the current active stake of all validators, including yours

  • put stake-history shows the history of stake warming up and cooling down over recent epochs

  • Look for log messages on your validator indicating your next leader slot: [2019-09-27T20:16:00.319721164Z INFO put_core::replay_stage] <VALIDATOR_IDENTITY_PUBKEY> voted and reset PoH at tick height ####. My next leader slot is ####

  • Once your stake is warmed up, you will see a stake balance listed for your validator by running put validators

Monitor Your Staked Validator

Confirm your validator becomes a leader

  • After your validator is caught up, use the put balance command to monitor the earnings as your validator is selected as leader and collects transaction fees

  • PUT nodes offer a number of useful JSON-RPC methods to return information about the network and your validator's participation. Make a request by using curl (or another http client of your choosing), specifying the desired method in JSON-RPC-formatted data. For example:

// Request curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://localhost:8899

// Result {"jsonrpc":"2.0","result":{"epoch":3,"slotIndex":126,"slotsInEpoch":256},"id":1}

Helpful JSON-RPC methods:

  • getEpochInfoAn epoch is the time, i.e. number of slots, for which a leader schedule is valid. This will tell you what the current epoch is and how far into it the cluster is.

  • getVoteAccounts This will tell you how much active stake your validator currently has. A % of the validator's stake is activated on an epoch boundary. You can learn more about staking on PUT here.

  • getLeaderSchedule At any given moment, the network expects only one validator to produce ledger entries. The validator currently selected to produce ledger entries is called the “leader”. This will return the complete leader schedule (on a slot-by-slot basis) for currently activated stake, the identity pubkey will show up 1 or more times here.

Deactivating Stake

Before detaching your validator from the cluster, you should deactivate the stake that was previously delegated by running:

put deactivate-stake ~/validator-stake-keypair.json

Stake is not deactivated immediately and instead cools down in a similar fashion as stake warm up.

Your validator should remain attached to the cluster while the stake is cooling down. While cooling down, your stake will continue to earn rewards.

Only after stake cooldown is it safe to turn off your validator or withdraw it from the network. Cooldown may take several epochs to complete, depending on active stake and the size of your stake.

Note that a stake account may only be used once, so after deactivation, use the cli's withdraw-stake command to recover the previously staked lamports.

PreviousVote Account ManagementNextMonitoring a Validator

Last updated 2 years ago