Plian
English
English
  • Overview
  • Links
  • Downloads
  • FAQ
    • Node Status
    • Full Balance
    • Flow and FAQ on Becoming a Validator
    • Delegation
    • Staking Rewards
    • Monitor
    • PIScan
    • PIWallet
    • Cross-Chain Transactions
    • DApps
  • About The Blockchain
    • Multichain Framework
    • PDBFT 2.0 Consensus Algorithm
    • Validator Nodes
    • Building with Plian
  • Using The Blockchain
    • Overview
    • Delegating or Staking PI
    • Validator Node Guides
      • Express Node Setup Guide
      • Setting Up a Validator Node
      • Registering Your Node as Validator
      • Submitting Your Vote as Validator
      • Revealing Your Vote
      • Removing Your Node From the Candidate List
      • Alternate Installation Instructions
        • Building From the Source
        • Running Pchain in Docker
        • Installation Instructions for Ubuntu
        • Installation Instructions for Mac OS X
        • Installation Instructions for Windows 10
      • What is FullBalance
    • Token Swaps
    • Plian Javascript Console
    • PIwallet
      • Desktop Wallet
        • Light Wallet Mode
        • Local Node Mode
      • Mobile Wallets
      • How to Deploy a Smart Contract
    • PMetamask
    • MetaMask
      • How to import PIwallet address to MetaMask?
      • How to connect Metamask to Plian
      • How to import wallet address from MetaMask into PIWallet
      • How to deploy smart contract on Plian via Metamask + Remix
    • Advanced Features
      • Command Line Options
      • Management APIs
      • JSON RPC API
      • How to Sync and Run Testnet
    • How to buy Plian $PI
  • For Developers
    • PWeb3 Javascript API
    • How to Create Your Own Subchain
    • Writing Smart Contracts With Solidity
      • Introduction to Smart Contracts
      • Installing the Solidity Compiler
      • Solidity by Example
      • Solidity in Depth
        • Layout of a Solidity Source File
        • Structure of a Contract
        • Types
        • Units and Globally Available Variables
        • Expressions and Control Structures
        • Contracts
        • Solidity Assembly
        • Miscellaneous
      • Security Considerations
      • Resources
      • Using the compiler
      • Contract Metadata
      • Contract ABI Specification
      • Yul
      • Style Guide
      • Common Patterns
      • List of Known Bugs
      • Contributing
      • Frequently Asked Questions
      • LLL
      • Index
Powered by GitBook
On this page
  • Signing Your Address
  • Sending the Reveal Transaction
  • Check Next Epoch's Validators
  • Do I Need to Vote Every Epoch?
  • How to Quit Being a Validator

Was this helpful?

  1. Using The Blockchain
  2. Validator Node Guides

Revealing Your Vote

You can reveal your vote in the third phase of each Epoch, from 85% to 95% of the Epoch.

Phase

Block Number

What you can do

0% ~ 75%

start_block ~ vote_start_block - 1

apply candidates and delegate

75% ~ 85%

vote_start_block ~ vote_end_block

vote

85% ~ 95%

reveal_start_block ~ reveal_end_block

reveal vote

95% ~ 100%

reveal_end_block + 1 ~ end_block

check next epoch’s info

Signing Your Address

Before you can send the reveal vote transaction, you need to generate a signature signed by your consensus private key. You can generate it by RPC using chain_signAddress.

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"chain_signAddress","params":["address", "private_key"],"id":1}' localhost:6969/pchain

Where address and private_key are those associated with your node address. This returns a signature that is needed in the next step of the reveal transaction:

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"chain_signAddress","params":["0x4CACBCBF218679DCC9574A90A2061BCA4A8D8B6C", "0xD8AF52E355CD070ED3401800CBC920B6E94F3C49B42808C3049BF7BDB1FA3B19"],"id":1}' localhost:6969/pchain
"0x1214608bcdf2e464b2d37d19b1b671482253e275d33079264045253fbb18689385ac0d5b4128d0c593211588deafd9ea2507b4858bdd42aaef3999045c0407ae"

Sending the Reveal Transaction

You can now reveal your vote by RPC using tdm_revealVote.

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"tdm_revealVote","params":["address", "blspubkey", "amount", "salt", "signature"],"id":1}' localhost:6969/pchain

Where address, blspubkey, amount, and salt is from the vote transaction and signature is from the step above.

In this case:

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"tdm_revealVote","params":["0x4CACBCBF218679DCC9574A90A2061BCA4A8D8B6C", "085586D41F70435700850E19B7DE54B3E793C5EC4C6EC502D19030EF4F2122823E5A765E56CBA7B4C57E50561F77B022313C39895CA303F3C95D7B7282412F334778B95ACE046A79AEA4DB148334527250C8895AC5DB80459BF5D367236B59AF2DB5C0254E30A6D8CD1FA10AB8A5D872F5EBD312D3160D3E4DD496973BDC75E0", "0x9744d24923260b7d1a800", "ilovepchain", "0x1214608bcdf2e464b2d37d19b1b671482253e275d33079264045253fbb18689385ac0d5b4128d0c593211588deafd9ea2507b4858bdd42aaef3999045c0407ae"],"id":1}' localhost:6969/pchain

If successful, this will return a transaction hash that can be checked on PIScan for success.

Check Next Epoch's Validators

Once the Epoch transitions into its last phase, beyond 95%, you can check for your inclusion in the list of validators for the next epoch with the RPC call tdm_getNextEpochValidators.

curl -X POST -H "Content-Type:application/json" --data '{"jsonrpc":"2.0","method":"tdm_getNextEpochValidators","params":[],"id":1}' localhost:6969/pchain | jq '.'

If your node address is in the list outputted, you have successfully become a Pchain validator.

Do I Need to Vote Every Epoch?

Once you have successfully revealed your vote, there is no need to go through this process again unless you want to reduce your vote amount. All additional delegations will be automatically rolled into your node's vote power in the next epoch. If you would like to add your reward PI to your vote power, you can do so by the "append" function in the PIWallet.

How to Quit Being a Validator

If you no longer want to be a validator, you can quit by yourself. You will need to do the two-part process of Vote and Reveal Vote as the same above, with setting the amount to 0. If you are also a candidate node with delegations, you need to cancel candidate submission first.

PreviousSubmitting Your Vote as ValidatorNextRemoving Your Node From the Candidate List

Last updated 4 years ago

Was this helpful?